mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-03 10:31:37 -08:00
add file name to autoload error messages.
* lisp/emacs-lisp/autoload.el (autoload-save-buffers): add condition-case to add file name to error message.
This commit is contained in:
parent
4f855d6fc9
commit
fed091f7c2
1 changed files with 122 additions and 109 deletions
|
|
@ -524,6 +524,8 @@ different from OUTFILE, then OUTBUF is ignored.
|
|||
Return non-nil if and only if FILE adds no autoloads to OUTFILE
|
||||
\(or OUTBUF if OUTFILE is nil). The actual return value is
|
||||
FILE's modification time."
|
||||
;; Include the file name in any error messages
|
||||
(condition-case err
|
||||
(let (load-name
|
||||
(print-length nil)
|
||||
(print-level nil)
|
||||
|
|
@ -634,7 +636,18 @@ FILE's modification time."
|
|||
;; If the entries were added to some other buffer, then the file
|
||||
;; doesn't add entries to OUTFILE.
|
||||
otherbuf))
|
||||
(nth 5 (file-attributes absfile)))))
|
||||
(nth 5 (file-attributes absfile))))
|
||||
(error
|
||||
;; Probably unbalanced parens in forward-sexp. In that case, the
|
||||
;; condition is scan-error, and the signal data includes point
|
||||
;; where the error was found; we'd like to convert that to
|
||||
;; line:col, but line-number-at-pos gets the wrong line in batch
|
||||
;; mode for some reason.
|
||||
;;
|
||||
;; At least this gets the file name in the error message; the
|
||||
;; developer can use goto-char to get to the error position.
|
||||
(error "%s:0:0: error: %s: %s" file (car err) (cdr err)))
|
||||
))
|
||||
|
||||
(defun autoload-save-buffers ()
|
||||
(while autoload-modified-buffers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue