aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepak Goel2007-12-08 00:57:23 +0000
committerDeepak Goel2007-12-08 00:57:23 +0000
commita867ead0d05d7809c12f15704f65431ce8a7aaee (patch)
tree19d0e35a35a36e3ecfc0735bf50216fd995bbe89
parent3d587afd35bfdad13523d7b856d8d054e5826a4d (diff)
downloademacs-a867ead0d05d7809c12f15704f65431ce8a7aaee.tar.gz
emacs-a867ead0d05d7809c12f15704f65431ce8a7aaee.zip
Improves calls to `error', per mail from RMS.
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/mail/feedmail.el2
-rw-r--r--lisp/mail/uce.el2
-rw-r--r--lisp/progmodes/ada-xref.el14
-rw-r--r--lisp/progmodes/idlw-shell.el2
-rw-r--r--lisp/progmodes/vhdl-mode.el5
6 files changed, 22 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1424867caff..5d2c39d3552 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
12007-12-07 D. Goel <deego3@gmail.com>
2
3 * progmodes/idlw-shell.el (idlwave-shell-display-line)
4 * progmodes/ada-xref.el (ada-find-file, ada-get-all-references)
5 (ada-xref-find-in-modified-ali, ada-find-in-src-path)
6 * mail/uce.el (uce-reply-to-uce)
7 * progmodes/vhdl-mode.el (vhdl-template-modify)
8 * mail/feedmail.el (feedmail-dump-message-to-queue): Improve calls
9 to `error' (as suggested by RMS.)
10
12007-12-07 Glenn Morris <rgm@gnu.org> 112007-12-07 Glenn Morris <rgm@gnu.org>
2 12
3 * allout.el (allout-write-file-hook-handler): 13 * allout.el (allout-write-file-hook-handler):
diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el
index 7fb40baa7c8..ab8611424db 100644
--- a/lisp/mail/feedmail.el
+++ b/lisp/mail/feedmail.el
@@ -1922,7 +1922,7 @@ mapped to mostly alphanumerics for safety."
1922 ;; progn to get nil result no matter what 1922 ;; progn to get nil result no matter what
1923 (progn (make-directory queue-directory t) nil) 1923 (progn (make-directory queue-directory t) nil)
1924 (file-accessible-directory-p queue-directory) 1924 (file-accessible-directory-p queue-directory)
1925 (error "%s" (concat "FQM: Message not queued; trouble with directory " queue-directory))) 1925 (error "FQM: Message not queued; trouble with directory %s" queue-directory))
1926 (let ((filename) 1926 (let ((filename)
1927 (is-fqm) 1927 (is-fqm)
1928 (is-in-this-dir) 1928 (is-in-this-dir)
diff --git a/lisp/mail/uce.el b/lisp/mail/uce.el
index 54933993068..094cb03f861 100644
--- a/lisp/mail/uce.el
+++ b/lisp/mail/uce.el
@@ -239,7 +239,7 @@ address, and postmaster of the mail relay used."
239 (full-header-p (and (eq uce-mail-reader 'rmail) 239 (full-header-p (and (eq uce-mail-reader 'rmail)
240 (not (rmail-msg-is-pruned))))) 240 (not (rmail-msg-is-pruned)))))
241 (or (get-buffer message-buffer) 241 (or (get-buffer message-buffer)
242 (error "%s" (concat "No buffer " message-buffer ", cannot find UCE"))) 242 (error "No buffer %s, cannot find UCE" message-buffer))
243 (switch-to-buffer message-buffer) 243 (switch-to-buffer message-buffer)
244 ;; We need the message with headers pruned. 244 ;; We need the message with headers pruned.
245 (if full-header-p 245 (if full-header-p
diff --git a/lisp/progmodes/ada-xref.el b/lisp/progmodes/ada-xref.el
index a92705f92fa..00be89553a7 100644
--- a/lisp/progmodes/ada-xref.el
+++ b/lisp/progmodes/ada-xref.el
@@ -564,7 +564,7 @@ Completion is available."
564 (let ((file (ada-find-src-file-in-dir filename))) 564 (let ((file (ada-find-src-file-in-dir filename)))
565 (if file 565 (if file
566 (find-file file) 566 (find-file file)
567 (error "%s" (concat filename " not found in src_dir"))))) 567 (error "%s not found in src_dir" filename))))
568 568
569 569
570;; ----- Utilities ------------------------------------------------- 570;; ----- Utilities -------------------------------------------------
@@ -1722,8 +1722,8 @@ Information is extracted from the ali file."
1722 ;; No more idea to find the declaration. Give up 1722 ;; No more idea to find the declaration. Give up
1723 (progn 1723 (progn
1724 (kill-buffer ali-buffer) 1724 (kill-buffer ali-buffer)
1725 (error "%s" (concat "No declaration of " (ada-name-of identlist) 1725
1726 " found.")) 1726 (error "No declaration of %s found." (ada-name-of identlist))
1727 ))) 1727 )))
1728 ) 1728 )
1729 1729
@@ -1808,10 +1808,8 @@ This function is disabled for operators, and only works for identifiers."
1808 ;; none => error 1808 ;; none => error
1809 ((= len 0) 1809 ((= len 0)
1810 (kill-buffer (current-buffer)) 1810 (kill-buffer (current-buffer))
1811 (error "%s" (concat "No declaration of " 1811 (error "No declaration of %s recorded in .ali file"
1812 (ada-name-of identlist) 1812 (ada-name-of identlist)))
1813 " recorded in .ali file")))
1814
1815 ;; one => should be the right one 1813 ;; one => should be the right one
1816 ((= len 1) 1814 ((= len 1)
1817 (goto-line (caar declist))) 1815 (goto-line (caar declist)))
@@ -2011,7 +2009,7 @@ the declaration and documentation of the subprograms one is using."
2011 (string-to-number (nth 2 (car list))) 2009 (string-to-number (nth 2 (car list)))
2012 identlist 2010 identlist
2013 other-frame) 2011 other-frame)
2014 (error "%s" (concat (caar list) " not found in src_dir"))) 2012 (error "%s not found in src_dir" (caar list)))
2015 (message "This is only a (good) guess at the cross-reference.") 2013 (message "This is only a (good) guess at the cross-reference.")
2016 ) 2014 )
2017 2015
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el
index 153b95e65e4..1f184ea157d 100644
--- a/lisp/progmodes/idlw-shell.el
+++ b/lisp/progmodes/idlw-shell.el
@@ -2375,7 +2375,7 @@ matter what the settings of that variable."
2375 (if (not (idlwave-shell-valid-frame frame)) 2375 (if (not (idlwave-shell-valid-frame frame))
2376 ;; fixme: errors are dangerous in shell filters. but i think i 2376 ;; fixme: errors are dangerous in shell filters. but i think i
2377 ;; have never encountered this one. 2377 ;; have never encountered this one.
2378 (error "%s" (concat "invalid frame - unable to access file: " (car frame))) 2378 (error "invalid frame - unable to access file: %s" (car frame))
2379;;; 2379;;;
2380;;; buffer : the buffer to display a line in. 2380;;; buffer : the buffer to display a line in.
2381;;; select-shell: current buffer is the shell. 2381;;; select-shell: current buffer is the shell.
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index 5b14e6a857f..dc9934a593d 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -9095,8 +9095,9 @@ otherwise."
9095 (progn (delete-region (point) (progn (end-of-line) (point))) 9095 (progn (delete-region (point) (progn (end-of-line) (point)))
9096 (vhdl-template-insert-date)) 9096 (vhdl-template-insert-date))
9097 (unless noerror 9097 (unless noerror
9098 (error "%s" (concat "ERROR: Modification date prefix string \"" 9098 (error "ERROR: Modification date prefix string \"%s\" not found"
9099 vhdl-modify-date-prefix-string "\" not found"))))))) 9099 vhdl-modify-date-prefix-string))))))
9100
9100 9101
9101(defun vhdl-template-modify-noerror () 9102(defun vhdl-template-modify-noerror ()
9102 "Call `vhdl-template-modify' with NOERROR non-nil." 9103 "Call `vhdl-template-modify' with NOERROR non-nil."