From 71873e2b335b721e0b3c585e88211c9564f4c743 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 4 May 2012 19:16:47 -0400 Subject: Add new error and function `user-error'. * lisp/subr.el (user-error): New function. * lisp/window.el (switch-to-buffer): * lisp/vc/smerge-mode.el (smerge-resolve-function, smerge-resolve) (smerge-match-conflict): * lisp/simple.el (previous-matching-history-element) (next-matching-history-element, goto-history-element, undo-more) (undo-start): * lisp/progmodes/etags.el (visit-tags-table-buffer, find-tag-tag) (find-tag-noselect, find-tag-in-order, etags-goto-tag-location) (next-file, tags-loop-scan, list-tags, complete-tag): * lisp/progmodes/compile.el (compilation-loop): * lisp/mouse.el (mouse-minibuffer-check): * lisp/man.el (Man-bgproc-sentinel, Man-goto-page): * lisp/info.el (Info-find-node-2, Info-extract-pointer, Info-history-back) (Info-history-forward, Info-follow-reference, Info-menu) (Info-extract-menu-item, Info-extract-menu-counting) (Info-forward-node, Info-backward-node, Info-next-menu-item) (Info-last-menu-item, Info-next-preorder, Info-last-preorder) (Info-next-reference, Info-prev-reference, Info-index) (Info-index-next, Info-follow-nearest-node) (Info-copy-current-node-name): * lisp/imenu.el (imenu--make-index-alist) (imenu-default-create-index-function, imenu-add-to-menubar): * lisp/files.el (basic-save-buffer, recover-file): * lisp/emacs-lisp/easy-mmode.el (easy-mmode-define-navigation): * lisp/emacs-lisp/checkdoc.el (checkdoc-continue, checkdoc-comments) (checkdoc-message-text, checkdoc-defun): * lisp/dabbrev.el (dabbrev-completion, dabbrev--abbrev-at-point): * lisp/cus-edit.el (customize-changed-options, customize-rogue) (customize-saved, custom-variable-set, custom-variable-mark-to-save) (custom-variable-mark-to-reset-standard) (custom-variable-reset-backup, custom-face-mark-to-reset-standard) (custom-file): * lisp/completion.el (check-completion-length): * lisp/comint.el (comint-search-arg) (comint-previous-matching-input-string-position) (comint-previous-matching-input) (comint-replace-by-expanded-history-before-point, comint-send-input) (comint-copy-old-input, comint-backward-matching-input) (comint-goto-process-mark, comint-set-process-mark): * lisp/calendar/calendar.el (calendar-cursor-to-date): Use it. * lisp/bindings.el (debug-ignored-errors): Remove regexps, add `user-error'. * src/data.c (PUT_ERROR): New macro. (syms_of_data): Use it. Add new error type `user-error'. * src/undo.c (user_error): New function. (Fprimitive_undo): Use it. * src/print.c (print_error_message): Adjust print style for `user-error'. * src/keyboard.c (user_error): New function. (Fexit_recursive_edit, Fabort_recursive_edit): Use it. --- lisp/man.el | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'lisp/man.el') diff --git a/lisp/man.el b/lisp/man.el index 6912486dffa..dd64613c495 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -1273,8 +1273,8 @@ manpage command." (if (not Man-page-list) (let ((args Man-arguments)) (kill-buffer (current-buffer)) - (error "Can't find the %s manpage" - (Man-page-from-arguments args))) + (user-error "Can't find the %s manpage" + (Man-page-from-arguments args))) (set-buffer-modified-p nil)))) ;; Restore case-fold-search before calling ;; Man-notify-when-ready because it may switch buffers. @@ -1649,7 +1649,7 @@ Specify which REFERENCE to use; default is based on word at point." (when Man-page-list (if (or (< page 1) (> page (length Man-page-list))) - (error "No manpage %d found" page)) + (user-error "No manpage %d found" page)) (let* ((page-range (nth (1- page) Man-page-list)) (page-start (car page-range)) (page-end (car (cdr page-range)))) @@ -1742,9 +1742,6 @@ Uses `Man-name-local-regexp'." ;; Init the man package variables, if not already done. (Man-init-defvars) -(add-to-list 'debug-ignored-errors "^No manpage [0-9]* found$") -(add-to-list 'debug-ignored-errors "^Can't find the .* manpage$") - (provide 'man) ;;; man.el ends here -- cgit v1.2.1