diff options
Diffstat (limited to 'lisp/progmodes')
-rw-r--r-- | lisp/progmodes/ada-mode.el | 2 | ||||
-rw-r--r-- | lisp/progmodes/ada-xref.el | 16 | ||||
-rw-r--r-- | lisp/progmodes/js.el | 7 |
3 files changed, 10 insertions, 15 deletions
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index 805444d08b9..33b21d6cc07 100644 --- a/lisp/progmodes/ada-mode.el +++ b/lisp/progmodes/ada-mode.el @@ -130,6 +130,8 @@ (defvar ispell-check-comments) (defvar skeleton-further-elements) +(define-error 'ada-mode-errors nil) + (defun ada-mode-version () "Return Ada mode version." (interactive) diff --git a/lisp/progmodes/ada-xref.el b/lisp/progmodes/ada-xref.el index e44b7c191bf..d29fa8c1d36 100644 --- a/lisp/progmodes/ada-xref.el +++ b/lisp/progmodes/ada-xref.el @@ -1142,7 +1142,7 @@ If OTHER-FRAME is non-nil, display the cross-reference in another frame." (condition-case err (ada-find-in-ali identlist other-frame) ;; File not found: print explicit error message - (error-file-not-found + (ada-error-file-not-found (message (concat (error-message-string err) (nthcdr 1 err)))) @@ -1637,7 +1637,7 @@ Search in project file for possible paths." (let ((filename (ada-find-src-file-in-dir file))) (if filename (expand-file-name filename) - (signal 'error-file-not-found (file-name-nondirectory file))) + (signal 'ada-error-file-not-found (file-name-nondirectory file))) ))) (defun ada-find-file-number-in-ali (file) @@ -1828,7 +1828,7 @@ Information is extracted from the ali file." (ada-file-of identlist))) ;; Else clean up the ali file - (error-file-not-found + (ada-error-file-not-found (signal (car err) (cdr err))) (error (kill-buffer ali-buffer) @@ -2127,7 +2127,7 @@ the declaration and documentation of the subprograms one is using." (string-to-number (nth 2 (nth choice list))) identlist other-frame) - (signal 'error-file-not-found (car (nth choice list)))) + (signal 'ada-error-file-not-found (car (nth choice list)))) (message "This is only a (good) guess at the cross-reference.") )))) @@ -2362,12 +2362,8 @@ For instance, it creates the gnat-specific menus, sets some hooks for (add-hook 'ada-mode-hook 'ada-xref-initialize) ;; Define a new error type -(put 'error-file-not-found - 'error-conditions - '(error ada-mode-errors error-file-not-found)) -(put 'error-file-not-found - 'error-message - "File not found in src-dir (check project file): ") +(define-error 'ada-error-file-not-found + "File not found in src-dir (check project file): " 'ada-mode-errors) (provide 'ada-xref) diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 28ee859f9db..49a21933133 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -2244,11 +2244,8 @@ current buffer. Pushes a mark onto the tag ring just like ;;; MozRepl integration -(put 'js-moz-bad-rpc 'error-conditions '(error timeout)) -(put 'js-moz-bad-rpc 'error-message "Mozilla RPC Error") - -(put 'js-js-error 'error-conditions '(error js-error)) -(put 'js-js-error 'error-message "Javascript Error") +(define-error 'js-moz-bad-rpc "Mozilla RPC Error") ;; '(timeout error)) +(define-error 'js-js-error "Javascript Error") ;; '(js-error error)) (defun js--wait-for-matching-output (process regexp timeout &optional start) |