summaryrefslogtreecommitdiff
path: root/lisp/international/quail.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2021-02-24 20:32:09 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2021-02-24 20:32:09 +0100
commit46b54e5bb42f26a57f6cdbedf83bd80c6c717a4f (patch)
tree55b4b2a08dcdc70ccce0e80c63c8bab3c8f6d715 /lisp/international/quail.el
parent8fd97b1de0b1b0b563133cbb4d4f258bbb936257 (diff)
downloademacs-46b54e5bb42f26a57f6cdbedf83bd80c6c717a4f.tar.gz
Improve quail-update-leim-list-file error messaging
* lisp/international/quail.el (quail-update-leim-list-file): Give a better error message.
Diffstat (limited to 'lisp/international/quail.el')
-rw-r--r--lisp/international/quail.el41
1 files changed, 22 insertions, 19 deletions
diff --git a/lisp/international/quail.el b/lisp/international/quail.el
index 67ea00665fc..f52747084b2 100644
--- a/lisp/international/quail.el
+++ b/lisp/international/quail.el
@@ -3066,28 +3066,31 @@ of each directory."
;; Don't get fooled by commented-out code.
(while (re-search-forward "^[ \t]*(quail-define-package" nil t)
(goto-char (match-beginning 0))
- (condition-case nil
- (let ((form (read (current-buffer))))
- (with-current-buffer list-buf
- (insert
- (format "(register-input-method
+ (let (form)
+ (condition-case err
+ (progn
+ (setq form (read (current-buffer)))
+ (with-current-buffer list-buf
+ (insert
+ (format "(register-input-method
%S %S '%s
%S %S
%S)\n"
- (nth 1 form) ; PACKAGE-NAME
- (nth 2 form) ; LANGUAGE
- 'quail-use-package ; ACTIVATE-FUNC
- (nth 3 form) ; PACKAGE-TITLE
- (progn ; PACKAGE-DESCRIPTION (one line)
- (string-match ".*" (nth 5 form))
- (match-string 0 (nth 5 form)))
- (file-relative-name ; PACKAGE-FILENAME
- (file-name-sans-extension (car pkg-list))
- (car dirnames))))))
- (error
- ;; Ignore the remaining contents of this file.
- (goto-char (point-max))
- (message "Some part of \"%s\" is broken" (car pkg-list))))))
+ (nth 1 form) ; PACKAGE-NAME
+ (nth 2 form) ; LANGUAGE
+ 'quail-use-package ; ACTIVATE-FUNC
+ (nth 3 form) ; PACKAGE-TITLE
+ (progn ; PACKAGE-DESCRIPTION (one line)
+ (string-match ".*" (nth 5 form))
+ (match-string 0 (nth 5 form)))
+ (file-relative-name ; PACKAGE-FILENAME
+ (file-name-sans-extension (car pkg-list))
+ (car dirnames))))))
+ (error
+ ;; Ignore the remaining contents of this file.
+ (goto-char (point-max))
+ (message "Some part of \"%s\" is broken: %s in %s"
+ (car pkg-list) err form))))))
(setq pkg-list (cdr pkg-list)))
(setq quail-dirs (cdr quail-dirs) dirnames (cdr dirnames))))