Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!brutus.cs.uiuc.edu!lll-winken!ames!pasteur!ucbvax!VENERA.ISI.EDU!katz From: katz@VENERA.ISI.EDU Newsgroups: comp.emacs Subject: Re: Thanks ...but the `fix' does not work Message-ID: <9002022215.AA13972@tardis.isi.edu> Date: 2 Feb 90 22:15:20 GMT References: Sender: daemon@ucbvax.BERKELEY.EDU Lines: 41 OK, you will probably get tons of responses, but apart from using the 'high level' commands in a lisp program (which you should not do), the problems with even getting your function to run are: 1. The extra parenthesis. Just because you get a wierd error message you don't understand without it doesn't mean putting it in is correct!! 2. you did not give set-mark-command the correct number of arguments (ie 1 of them). Here is the source: (defun set-mark-command (arg) "Set mark at where point is, or jump to mark. With no prefix argument, set mark, and push previous mark on mark ring. With argument, jump to mark, and pop into mark off the 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." (interactive "P") (if (null arg) (push-mark) (if (null (mark)) (error "No mark set in this buffer") (goto-char (mark)) (pop-mark)))) Notice that it takes one argument, ARG. Used interactively, it gets this by examining the prefix arg, but if called from a lisp program (WHICH YOU SHOULD NOT DO ANYWAY!) it needs an argument. (As an aside, the program checks to see if ARG is nil, so if the declaration said: set-mark-command (&optional arg) it would have worked.) Since you did not provide the correct number of arguments, when it got called, an error was signaled which appeared in the mini-buffer. Alan