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.