help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mark without starting region


From: Shaddin Doghmi
Subject: Re: mark without starting region
Date: Wed, 23 Jul 2003 15:30:03 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

Kevin Rodgers wrote:

Shaddin Doghmi wrote:

i tried writing two elisp functions to do it, but i know practically no elisp so its no wonder they didnt work(complains about number of arguments to set-mark-command):

(defun just-mark ()
     (interactive)
     (transient-mark-mode 0)
     (set-mark-command)
)


(defun mark-and-highlight ()
     (interactive)
     (transient-mark-mode 1)
     (set-mark-command)
)



`C-h f set-mark-command RET' displays:


| set-mark-command is an interactive compiled Lisp function in `simple'.
| (set-mark-command ARG)
| | Set mark at where point is, or jump to mark.
| With no prefix argument, set mark, push old mark position on local mark
| ring, and push mark on global mark ring.
| With argument, jump to mark, and pop a new position for mark off the ring
| (does not affect global mark ring).
| | Novice Emacs Lisp programmers often try to use the mark for the wrong
| purposes.  See the documentation of `set-mark' for more information.


So you need to specify a single argument, probably nil for your purpose.

yup! that works!
thanks



reply via email to

[Prev in Thread] Current Thread [Next in Thread]