summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/easy-mmode.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-05-25 11:19:24 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2012-05-25 11:19:24 -0700
commit42b2a986d9d4b7040fb20c90ec0efeffb78e761a (patch)
treed38e7bf5307837f2f38982757f088100de18a64e /lisp/emacs-lisp/easy-mmode.el
parente4d81efc58695c19154d5f6733d91172b4c3e5b7 (diff)
parenta8d3cbf75d219d7a249fc0623219511179e959da (diff)
downloademacs-42b2a986d9d4b7040fb20c90ec0efeffb78e761a.tar.gz
emacs-42b2a986d9d4b7040fb20c90ec0efeffb78e761a.tar.bz2
emacs-42b2a986d9d4b7040fb20c90ec0efeffb78e761a.zip
Merge from trunk.
Diffstat (limited to 'lisp/emacs-lisp/easy-mmode.el')
-rw-r--r--lisp/emacs-lisp/easy-mmode.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index 0d6716a2e63..a11f213e646 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -142,7 +142,8 @@ For example, you could write
(define-minor-mode foo-mode \"If enabled, foo on you!\"
:lighter \" Foo\" :require 'foo :global t :group 'hassle :version \"27.5\"
...BODY CODE...)"
- (declare (debug (&define name stringp
+ (declare (doc-string 2)
+ (debug (&define name stringp
[&optional [&not keywordp] sexp
&optional [&not keywordp] sexp
&optional [&not keywordp] sexp]
@@ -335,7 +336,7 @@ enabled, then disabling and reenabling MODE should make MODE work
correctly with the current major mode. This is important to
prevent problems with derived modes, that is, major modes that
call another major mode in their body."
-
+ (declare (doc-string 2))
(let* ((global-mode-name (symbol-name global-mode))
(pretty-name (easy-mmode-pretty-mode-name mode))
(pretty-global-name (easy-mmode-pretty-mode-name global-mode))
@@ -572,8 +573,6 @@ BODY is executed after moving to the destination location."
(when was-narrowed (,narrowfun)))))))
(unless name (setq name base-name))
`(progn
- (add-to-list 'debug-ignored-errors
- ,(concat "^No \\(previous\\|next\\) " (regexp-quote name)))
(defun ,next-sym (&optional count)
,(format "Go to the next COUNT'th %s." name)
(interactive "p")
@@ -584,7 +583,7 @@ BODY is executed after moving to the destination location."
`(if (not (re-search-forward ,re nil t count))
(if (looking-at ,re)
(goto-char (or ,(if endfun `(,endfun)) (point-max)))
- (error "No next %s" ,name))
+ (user-error "No next %s" ,name))
(goto-char (match-beginning 0))
(when (and (eq (current-buffer) (window-buffer (selected-window)))
(called-interactively-p 'interactive))
@@ -603,7 +602,7 @@ BODY is executed after moving to the destination location."
(if (< count 0) (,next-sym (- count))
,(funcall when-narrowed
`(unless (re-search-backward ,re nil t count)
- (error "No previous %s" ,name)))
+ (user-error "No previous %s" ,name)))
,@body))
(put ',prev-sym 'definition-name ',base))))