From: Roland McGrath Date: Thu, 8 Jul 1993 21:46:22 +0000 (+0000) Subject: Put error-conditions and error-message properties on 'mark-inactive. X-Git-Tag: emacs-19.34~11811 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=62d1c1fcb246db6ef9d9138cf9c34247847fe4d4;p=emacs.git Put error-conditions and error-message properties on 'mark-inactive. (mark): Signal 'mark-inactive instead of using error with a message. --- diff --git a/lisp/simple.el b/lisp/simple.el index 0416ba9bb26..b6b3b362f46 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1244,6 +1244,9 @@ When the option is non-nil, deactivation of the mark turns off region highlighting, but commands that use the mark behave as if the mark were still active.") +(put 'mark-inactive 'error-conditions '(mark-inactive error)) +(put 'mark-inactive 'error-message "The mark is not active now") + (defun mark (&optional force) "Return this buffer's mark value as integer; error if mark inactive. If optional argument FORCE is non-nil, access the mark value @@ -1254,7 +1257,7 @@ If you are using this in an editing command, you are most likely making a mistake; see the documentation of `set-mark'." (if (or force mark-active mark-even-if-inactive) (marker-position (mark-marker)) - (error "The mark is not currently active"))) + (signal 'mark-inactive nil))) (defun set-mark (pos) "Set this buffer's mark to POS. Don't use this function!