]> git.eshelyaron.com Git - emacs.git/commitdiff
Prefer defvar-local in international/*.el
authorStefan Kangas <stefan@marxist.se>
Sun, 31 Jan 2021 14:56:53 +0000 (15:56 +0100)
committerStefan Kangas <stefan@marxist.se>
Sun, 31 Jan 2021 14:56:53 +0000 (15:56 +0100)
* lisp/international/mule-cmds.el (current-input-method)
(current-input-method-title, current-transient-input-method)
(previous-transient-input-method, input-method-history)
(deactivate-current-input-method-function)
(describe-current-input-method-function):
* lisp/international/mule.el (buffer-file-coding-system-explicit):
* lisp/international/quail.el (quail-current-package)
(quail-guidance-str, quail-overlay, quail-conv-overlay)
(quail-current-key, quail-current-str)
(quail-current-translations, quail-current-data):
* lisp/international/robin.el (robin-mode)
(robin-current-package-name): Prefer defvar-local in
international/*.el.

lisp/international/mule-cmds.el
lisp/international/mule.el
lisp/international/quail.el
lisp/international/robin.el

index 8202c3ee27a07b9fd5c17d69b04a363d392423b4..5dc3de4422b0ef33312d8e55473e409aa7d4a5ad 100644 (file)
@@ -1315,15 +1315,13 @@ Each function is called with one arg, LEIM directory name.")
   (dolist (function update-leim-list-functions)
     (apply function dirs)))
 
-(defvar current-input-method nil
+(defvar-local current-input-method nil
   "The current input method for multilingual text.
 If nil, that means no input method is activated now.")
-(make-variable-buffer-local 'current-input-method)
 (put 'current-input-method 'permanent-local t)
 
-(defvar current-input-method-title nil
+(defvar-local current-input-method-title nil
   "Title string of the current input method shown in mode line.")
-(make-variable-buffer-local 'current-input-method-title)
 (put 'current-input-method-title 'permanent-local t)
 
 (define-widget 'mule-input-method-string 'string
@@ -1355,45 +1353,40 @@ This is the input method activated by the command
   :set-after '(current-language-environment)
   :version "28.1")
 
-(defvar current-transient-input-method nil
+(defvar-local current-transient-input-method nil
   "Current input method temporarily enabled by `activate-transient-input-method'.
 If nil, that means no transient input method is active now.")
-(make-variable-buffer-local 'current-transient-input-method)
 (put 'current-transient-input-method 'permanent-local t)
 
-(defvar previous-transient-input-method nil
+(defvar-local previous-transient-input-method nil
   "The input method that was active before enabling the transient input method.
 If nil, that means no previous input method was active.")
-(make-variable-buffer-local 'previous-transient-input-method)
 (put 'previous-transient-input-method 'permanent-local t)
 
 (put 'input-method-function 'permanent-local t)
 
-(defvar input-method-history nil
+(defvar-local input-method-history nil
   "History list of input methods read from the minibuffer.
 
 Maximum length of the history list is determined by the value
 of `history-length', which see.")
-(make-variable-buffer-local 'input-method-history)
 (put 'input-method-history 'permanent-local t)
 
 (define-obsolete-variable-alias
   'inactivate-current-input-method-function
   'deactivate-current-input-method-function "24.3")
-(defvar deactivate-current-input-method-function nil
+(defvar-local deactivate-current-input-method-function nil
   "Function to call for deactivating the current input method.
 Every input method should set this to an appropriate value when activated.
 This function is called with no argument.
 
 This function should never change the value of `current-input-method'.
 It is set to nil by the function `deactivate-input-method'.")
-(make-variable-buffer-local 'deactivate-current-input-method-function)
 (put 'deactivate-current-input-method-function 'permanent-local t)
 
-(defvar describe-current-input-method-function nil
+(defvar-local describe-current-input-method-function nil
   "Function to call for describing the current input method.
 This function is called with no argument.")
-(make-variable-buffer-local 'describe-current-input-method-function)
 (put 'describe-current-input-method-function 'permanent-local t)
 
 (defvar input-method-alist nil
index 6a32cffe9a6004991b77e3222873eed703ff08c1..52e743e6f3dfc51f47958a710c0fefc1c5eae0ae 100644 (file)
@@ -1191,12 +1191,11 @@ FORM is a form to evaluate to define the coding-system."
 ;; `last-coding-system-used'.  (It used to set it unconditionally, but
 ;; that seems unnecessary; see Bug#4533.)
 
-(defvar buffer-file-coding-system-explicit nil
+(defvar-local buffer-file-coding-system-explicit nil
   "The file coding system explicitly specified for the current buffer.
 The value is a cons of coding systems for reading (decoding) and
 writing (encoding).
 Internal use only.")
-(make-variable-buffer-local 'buffer-file-coding-system-explicit)
 (put 'buffer-file-coding-system-explicit 'permanent-local t)
 
 (defun read-buffer-file-coding-system ()
index c66aa6a53756651ea16db7463dea97b604d8b223..67ea00665fc2a5096799392b416191f6a1b151f8 100644 (file)
 
 ;; Buffer local variables
 
-(defvar quail-current-package nil
+(defvar-local quail-current-package nil
   "The current Quail package, which depends on the current input method.
 See the documentation of `quail-package-alist' for the format.")
-(make-variable-buffer-local 'quail-current-package)
 (put 'quail-current-package 'permanent-local t)
 
 ;; Quail uses the following variables to assist users.
 ;; A string containing available key sequences or translation list.
-(defvar quail-guidance-str nil)
+(defvar-local quail-guidance-str nil)
 ;; A buffer to show completion list of the current key sequence.
 (defvar quail-completion-buf nil)
 ;; We may display the guidance string in a buffer on a one-line frame.
@@ -78,41 +77,34 @@ See the documentation of `quail-package-alist' for the format.")
 
 ;; Each buffer in which Quail is activated should use different
 ;; guidance string.
-(make-variable-buffer-local 'quail-guidance-str)
 (put 'quail-guidance-str 'permanent-local t)
 
-(defvar quail-overlay nil
+(defvar-local quail-overlay nil
   "Overlay which covers the current translation region of Quail.")
-(make-variable-buffer-local 'quail-overlay)
 
-(defvar quail-conv-overlay nil
+(defvar-local quail-conv-overlay nil
   "Overlay which covers the text to be converted in Quail mode.")
-(make-variable-buffer-local 'quail-conv-overlay)
 
-(defvar quail-current-key nil
+(defvar-local quail-current-key nil
   "Current key for translation in Quail mode.")
-(make-variable-buffer-local 'quail-current-key)
 
-(defvar quail-current-str nil
+(defvar-local quail-current-str nil
   "Currently selected translation of the current key.")
-(make-variable-buffer-local 'quail-current-str)
 
-(defvar quail-current-translations nil
+(defvar-local quail-current-translations nil
   "Cons of indices and vector of possible translations of the current key.
 Indices is a list of (CURRENT START END BLOCK BLOCKS), where
 CURRENT is an index of the current translation,
 START and END are indices of the start and end of the current block,
 BLOCK is the current block index,
 BLOCKS is a number of  blocks of translation.")
-(make-variable-buffer-local 'quail-current-translations)
 
-(defvar quail-current-data nil
+(defvar-local quail-current-data nil
   "Any Lisp object holding information of current translation status.
 When a key sequence is mapped to TRANS and TRANS is a cons
 of actual translation and some Lisp object to be referred
 for translating the longer key sequence, this variable is set
 to that Lisp object.")
-(make-variable-buffer-local 'quail-current-data)
 
 ;; Quail package handlers.
 
index 55390df315f3529ec27a38f730760885f99399ba..e4a11801c38d382888587060e83ac2d480a4ae1d 100644 (file)
@@ -371,14 +371,12 @@ Internal use only."
 
 ;;; Interactive use
 
-(defvar robin-mode nil
+(defvar-local robin-mode nil
   "If non-nil, `robin-input-method' is active.")
-(make-variable-buffer-local 'robin-mode)
 
-(defvar robin-current-package-name nil
+(defvar-local robin-current-package-name nil
   "String representing the name of the current robin package.
 A nil value means no package is selected.")
-(make-variable-buffer-local 'robin-current-package-name)
 
 ;;;###autoload
 (defun robin-use-package (name)