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

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

mark without starting region


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

i use marks for two different purposes at different times: starting a region, as well as pushing a position on the stack so i can come back to it later. When starting a region, i like having transient mark mode on so i can see the region highlighted. However, this becomes an annoyance when im using the mark for simply remembering a position. Of course one way to do it to map the transient-mark-mode toggle to a key, and just toggle that on and off.... however, what i would really want is two different functions: one sets a mark and starts a region, the other just sets a mark... is there any such thing? 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)
)

any tips?



reply via email to

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