mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-05 22:20:24 -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)))
|
(not (eq kkc-init-file-flag t)))
|
||||||
(let ((coding-system-for-write 'iso-2022-7bit)
|
(let ((coding-system-for-write 'iso-2022-7bit)
|
||||||
(print-length nil))
|
(print-length nil))
|
||||||
(write-region (format "(setq kkc-lookup-cache '%S)\n" kkc-lookup-cache)
|
(write-region
|
||||||
nil
|
(format
|
||||||
kkc-init-file-name))))
|
";; -*- 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
|
;; Sequence of characters to be used for indexes for shown list. The
|
||||||
;; Nth character is for the Nth conversion in the list currently shown.
|
;; 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)
|
(add-hook 'kill-emacs-hook 'kkc-save-init-file)
|
||||||
(if (file-readable-p kkc-init-file-name)
|
(if (file-readable-p kkc-init-file-name)
|
||||||
(condition-case nil
|
(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))))
|
(kkc-error "Invalid data in %s" kkc-init-file-name))))
|
||||||
(or (and (nested-alist-p kkc-lookup-cache)
|
(or (and (nested-alist-p kkc-lookup-cache)
|
||||||
(eq (car kkc-lookup-cache) kkc-lookup-cache-tag))
|
(eq (car kkc-lookup-cache) kkc-lookup-cache-tag))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue