summaryrefslogtreecommitdiff
path: root/lisp/progmodes/ada-xref.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2013-08-09 17:22:44 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2013-08-09 17:22:44 -0400
commit54bd972f159fb8c25b4f4042ac6db5da557d9108 (patch)
tree02debb972eec68ea4520474aca74d54843f0d708 /lisp/progmodes/ada-xref.el
parent14ba08227d9272a34a0a95d20640f4bbdd0b6033 (diff)
downloademacs-54bd972f159fb8c25b4f4042ac6db5da557d9108.tar.gz
* lisp/subr.el (define-error): New function.
* doc/lispref/control.texi (Signaling Errors): Refer to define-error. (Error Symbols): Add `define-error'. * doc/lispref/errors.texi (Standard Errors): Don't refer to `error-conditions'. * lisp/progmodes/ada-xref.el (ada-error-file-not-found): Rename from error-file-not-found and define with define-error. * lisp/emacs-lisp/cl-lib.el (cl-assertion-failed): Move here from subr.el and define with define-error. * lisp/userlock.el (file-locked, file-supersession): * lisp/simple.el (mark-inactive): * lisp/progmodes/js.el (js-moz-bad-rpc, js-js-error): * lisp/progmodes/ada-mode.el (ada-mode-errors): * lisp/play/life.el (life-extinct): * lisp/nxml/xsd-regexp.el (xsdre-invalid-regexp, xsdre-parse-error): * lisp/nxml/xmltok.el (xmltok-markup-declaration-parse-error): * lisp/nxml/rng-util.el (rng-error): * lisp/nxml/rng-uri.el (rng-uri-error): * lisp/nxml/rng-match.el (rng-compile-error): * lisp/nxml/rng-cmpct.el (rng-c-incorrect-schema): * lisp/nxml/nxml-util.el (nxml-error, nxml-file-parse-error): * lisp/nxml/nxml-rap.el (nxml-scan-error): * lisp/nxml/nxml-outln.el (nxml-outline-error): * lisp/net/soap-client.el (soap-error): * lisp/net/gnutls.el (gnutls-error): * lisp/net/ange-ftp.el (ftp-error): * lisp/mpc.el (mpc-proc-error): * lisp/json.el (json-error, json-readtable-error, json-unknown-keyword) (json-number-format, json-string-escape, json-string-format) (json-key-format, json-object-format): * lisp/jka-compr.el (compression-error): * lisp/international/quail.el (quail-error): * lisp/international/kkc.el (kkc-error): * lisp/emacs-lisp/ert.el (ert-test-failed): * lisp/calc/calc.el (calc-error, inexact-result, math-overflow) (math-underflow): * lisp/bookmark.el (bookmark-error-no-filename): * lisp/epg.el (epg-error): Define with define-error.
Diffstat (limited to 'lisp/progmodes/ada-xref.el')
-rw-r--r--lisp/progmodes/ada-xref.el16
1 files changed, 6 insertions, 10 deletions
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)