mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
Avoid lexbind warnings in kkc.el
* lisp/international/kkc.el (kkc-lookup-key): Suppress warnings about lexical-binding cookies. (kkc-save-init-file): Write the lexical-binding cookie when saving the KKC init file. (Bug#79136)
This commit is contained in:
parent
cd31c3cb42
commit
0d7b1c912c
1 changed files with 8 additions and 4 deletions
|
|
@ -64,9 +64,12 @@ This string is shown at mode line when users are in KKC mode.")
|
|||
(not (eq kkc-init-file-flag t)))
|
||||
(let ((coding-system-for-write 'iso-2022-7bit)
|
||||
(print-length nil))
|
||||
(write-region (format "(setq kkc-lookup-cache '%S)\n" kkc-lookup-cache)
|
||||
nil
|
||||
kkc-init-file-name))))
|
||||
(write-region
|
||||
(format
|
||||
";; -*- lexical-binding: t; -*-\n\n(setq kkc-lookup-cache '%S)\n"
|
||||
kkc-lookup-cache)
|
||||
nil
|
||||
kkc-init-file-name))))
|
||||
|
||||
;; Sequence of characters to be used for indexes for shown list. The
|
||||
;; Nth character is for the Nth conversion in the list currently shown.
|
||||
|
|
@ -178,7 +181,8 @@ area while indicating the current selection by `<N>'."
|
|||
(add-hook 'kill-emacs-hook 'kkc-save-init-file)
|
||||
(if (file-readable-p kkc-init-file-name)
|
||||
(condition-case nil
|
||||
(load-file kkc-init-file-name)
|
||||
(let ((warning-inhibit-types '((files missing-lexbind-cookie))))
|
||||
(load-file kkc-init-file-name))
|
||||
(kkc-error "Invalid data in %s" kkc-init-file-name))))
|
||||
(or (and (nested-alist-p kkc-lookup-cache)
|
||||
(eq (car kkc-lookup-cache) kkc-lookup-cache-tag))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue