mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-21 06:55:39 +00:00
Prefer setq-local in most files
* lisp/apropos.el (apropos-print): * lisp/buff-menu.el (Buffer-menu-mode): * lisp/calc/calc.el (calc-trail-buffer): * lisp/chistory.el (command-history-mode): * lisp/dabbrev.el: * lisp/dframe.el (dframe-frame-mode): * lisp/doc-view.el (doc-view-presentation-mode): * lisp/ebuff-menu.el (electric-buffer-menu-mode) (electric-buffer-update-highlight): * lisp/edmacro.el (edit-kbd-macro): * lisp/face-remap.el (buffer-face-set, buffer-face-toggle): * lisp/files.el: (find-file-noselect-1, hack-local-variables-confirm) (set-visited-file-name, revert-buffer--default): * lisp/filesets.el (filesets-spawn-external-viewer): * lisp/find-dired.el (find-dired): * lisp/find-lisp.el (find-lisp-find-dired-internal): * lisp/finder.el (finder-mode): * lisp/font-core.el (font-lock-default-function): * lisp/format.el (format-annotate-function): * lisp/help-fns.el (describe-variable): * lisp/help-mode.el (help-mode): * lisp/icomplete.el (icomplete-minibuffer-setup) (icomplete--in-region-setup): * lisp/ido.el (ido-completion-help, ido-tidy): * lisp/international/robin.el (robin-activate): * lisp/leim/quail/hangul.el (hangul-input-method-activate): * lisp/leim/quail/uni-input.el (ucs-input-activate): * lisp/man.el (Man-mode): * lisp/master.el (master-set-slave): * lisp/minibuffer.el (minibuffer-completion-help) (read-file-name-default): * lisp/outline.el (outline-minor-mode): * lisp/pcomplete.el (pcomplete-comint-setup): * lisp/proced.el (proced-mode): * lisp/recentf.el (recentf-edit-list, recentf-open-files-items): * lisp/replace.el (occur-1): * lisp/reveal.el (reveal-mode): * lisp/ruler-mode.el (ruler--save-header-line-format): * lisp/scroll-lock.el (scroll-lock-mode): * lisp/startup.el (normal-top-level, normal-splash-screen): * lisp/strokes.el (strokes-list-strokes): * lisp/thumbs.el (thumbs-insert-image, thumbs-show-thumbs-list): * lisp/tree-widget.el (tree-widget-set-theme): * lisp/window.el (read-buffer-to-switch): * lisp/xwidget.el (xwidget-webkit-begin-edit-textarea): Prefer setq-local.
This commit is contained in:
parent
4489531b1e
commit
c50c0a19e3
@ -1225,8 +1225,8 @@ as a heading."
|
||||
(apropos-print-doc 6 'apropos-face t)
|
||||
(apropos-print-doc 5 'apropos-widget t)
|
||||
(apropos-print-doc 4 'apropos-plist nil))
|
||||
(set (make-local-variable 'truncate-partial-width-windows) t)
|
||||
(set (make-local-variable 'truncate-lines) t))))
|
||||
(setq-local truncate-partial-width-windows t)
|
||||
(setq-local truncate-lines t))))
|
||||
(prog1 apropos-accumulator
|
||||
(setq apropos-accumulator ()))) ; permit gc
|
||||
|
||||
|
@ -269,8 +269,8 @@ In Buffer Menu mode, the following commands are defined:
|
||||
\\[revert-buffer] Update the list of buffers.
|
||||
\\[Buffer-menu-toggle-files-only] Toggle whether the menu displays only file buffers.
|
||||
\\[Buffer-menu-bury] Bury the buffer listed on this line."
|
||||
(set (make-local-variable 'buffer-stale-function)
|
||||
(lambda (&optional _noconfirm) 'fast))
|
||||
(setq-local buffer-stale-function
|
||||
(lambda (&optional _noconfirm) 'fast))
|
||||
(add-hook 'tabulated-list-revert-hook 'list-buffers--refresh nil t))
|
||||
|
||||
(defun buffer-menu (&optional arg)
|
||||
|
@ -2100,7 +2100,7 @@ the United States."
|
||||
(set-buffer calc-trail-buffer)
|
||||
(unless (derived-mode-p 'calc-trail-mode)
|
||||
(calc-trail-mode)
|
||||
(set (make-local-variable 'calc-main-buffer) buf)))))
|
||||
(setq-local calc-main-buffer buf)))))
|
||||
(or (and calc-trail-pointer
|
||||
(eq (marker-buffer calc-trail-pointer) calc-trail-buffer))
|
||||
(with-current-buffer calc-trail-buffer
|
||||
|
@ -140,7 +140,7 @@ The buffer is left in Command History mode."
|
||||
Keybindings:
|
||||
\\{command-history-mode-map}"
|
||||
(lisp-mode-variables nil)
|
||||
(set (make-local-variable 'revert-buffer-function) 'command-history-revert)
|
||||
(setq-local revert-buffer-function 'command-history-revert)
|
||||
(set-syntax-table emacs-lisp-mode-syntax-table))
|
||||
|
||||
(defcustom command-history-hook nil
|
||||
|
@ -45,7 +45,7 @@
|
||||
;; dabbrev-case-replace nil t
|
||||
;;
|
||||
;; Set the variables you want special for your mode like this:
|
||||
;; (set (make-local-variable 'dabbrev-case-replace) nil)
|
||||
;; (setq-local dabbrev-case-replace nil)
|
||||
;; Then you don't interfere with other modes.
|
||||
;;
|
||||
;; If your mode handles buffers that refers to other buffers
|
||||
@ -59,10 +59,10 @@
|
||||
|
||||
;; Example for GNUS (when we write a reply, we want dabbrev to look in
|
||||
;; the article for expansion):
|
||||
;; (set (make-local-variable 'dabbrev-friend-buffer-function)
|
||||
;; (lambda (buffer)
|
||||
;; (with-current-buffer buffer
|
||||
;; (memq major-mode '(news-reply-mode gnus-article-mode)))))
|
||||
;; (setq-local dabbrev-friend-buffer-function
|
||||
;; (lambda (buffer)
|
||||
;; (with-current-buffer buffer
|
||||
;; (memq major-mode '(news-reply-mode gnus-article-mode)))))
|
||||
|
||||
|
||||
;; Known bugs and limitations.
|
||||
|
@ -280,7 +280,7 @@ CREATE-HOOK is a hook to run after creating a frame."
|
||||
|
||||
;; Enable mouse tracking in emacs
|
||||
(if dframe-track-mouse-function
|
||||
(set (make-local-variable 'track-mouse) t)) ;this could be messy.
|
||||
(setq-local track-mouse t)) ;this could be messy.
|
||||
|
||||
;; Override `temp-buffer-show-hook' so that help and such
|
||||
;; put their stuff into a frame other than our own.
|
||||
@ -290,10 +290,8 @@ CREATE-HOOK is a hook to run after creating a frame."
|
||||
;; FIXME: Doesn't this get us into an inf-loop when the
|
||||
;; `temp-buffer-show-function' runs `temp-buffer-show-hook'
|
||||
;; (as is normally the case)?
|
||||
(progn (make-local-variable 'temp-buffer-show-hook)
|
||||
(setq temp-buffer-show-hook temp-buffer-show-function)))
|
||||
(make-local-variable 'temp-buffer-show-function)
|
||||
(setq temp-buffer-show-function 'dframe-temp-buffer-show-function)
|
||||
(setq-local temp-buffer-show-hook temp-buffer-show-function))
|
||||
(setq-local temp-buffer-show-function 'dframe-temp-buffer-show-function)
|
||||
;; If this buffer is killed, we must make sure that we destroy
|
||||
;; the frame the dedicated window is in.
|
||||
(add-hook 'kill-buffer-hook (lambda ()
|
||||
|
@ -2055,7 +2055,7 @@ See the command `doc-view-mode' for more information on this mode."
|
||||
:init-value nil :keymap doc-view-presentation-mode-map
|
||||
(if doc-view-presentation-mode
|
||||
(progn
|
||||
(set (make-local-variable 'mode-line-format) nil)
|
||||
(setq-local mode-line-format nil)
|
||||
(doc-view-fit-page-to-window)
|
||||
;; (doc-view-convert-all-pages)
|
||||
)
|
||||
|
@ -202,8 +202,7 @@ Electric Buffer Menu mode is a minor mode which is automatically
|
||||
enabled and disabled by the \\[electric-buffer-list] command.
|
||||
See the documentation of `electric-buffer-list' for details."
|
||||
(setq mode-line-buffer-identification "Electric Buffer List")
|
||||
(set (make-local-variable 'Helper-return-blurb)
|
||||
"return to buffer editing"))
|
||||
(setq-local Helper-return-blurb "return to buffer editing"))
|
||||
|
||||
(define-obsolete-function-alias 'Electric-buffer-menu-mode
|
||||
'electric-buffer-menu-mode "24.3")
|
||||
@ -270,8 +269,8 @@ Return to Electric Buffer Menu when done."
|
||||
(when (derived-mode-p 'electric-buffer-menu-mode)
|
||||
;; Make sure we have an overlay to use.
|
||||
(or electric-buffer-overlay
|
||||
(set (make-local-variable 'electric-buffer-overlay)
|
||||
(make-overlay (point) (point))))
|
||||
(setq-local electric-buffer-overlay
|
||||
(make-overlay (point) (point))))
|
||||
(move-overlay electric-buffer-overlay
|
||||
(line-beginning-position)
|
||||
(line-end-position))
|
||||
|
@ -151,9 +151,9 @@ With a prefix argument, format the macro in a more concise way."
|
||||
(setq buffer-read-only nil)
|
||||
(setq major-mode 'edmacro-mode)
|
||||
(setq mode-name "Edit Macro")
|
||||
(set (make-local-variable 'edmacro-original-buffer) oldbuf)
|
||||
(set (make-local-variable 'edmacro-finish-hook) finish-hook)
|
||||
(set (make-local-variable 'edmacro-store-hook) store-hook)
|
||||
(setq-local edmacro-original-buffer oldbuf)
|
||||
(setq-local edmacro-finish-hook finish-hook)
|
||||
(setq-local edmacro-store-hook store-hook)
|
||||
(erase-buffer)
|
||||
(insert ";; Keyboard Macro Editor. Press C-c C-c to finish; "
|
||||
"press C-x k RET to cancel.\n")
|
||||
|
@ -446,7 +446,7 @@ local, and sets it to FACE."
|
||||
(setq specs (car specs)))
|
||||
(if (null specs)
|
||||
(buffer-face-mode 0)
|
||||
(set (make-local-variable 'buffer-face-mode-face) specs)
|
||||
(setq-local buffer-face-mode-face specs)
|
||||
(buffer-face-mode t)))
|
||||
|
||||
;;;###autoload
|
||||
@ -470,7 +470,7 @@ buffer local, and set it to SPECS."
|
||||
(if (or (null specs)
|
||||
(and buffer-face-mode (equal buffer-face-mode-face specs)))
|
||||
(buffer-face-mode 0)
|
||||
(set (make-local-variable 'buffer-face-mode-face) specs)
|
||||
(setq-local buffer-face-mode-face specs)
|
||||
(buffer-face-mode t)))
|
||||
|
||||
(defun buffer-face-mode-invoke (specs arg &optional interactive)
|
||||
|
@ -597,7 +597,7 @@ settings being applied, but still respect file-local ones.")
|
||||
|
||||
;; This is an odd variable IMO.
|
||||
;; You might wonder why it is needed, when we could just do:
|
||||
;; (set (make-local-variable 'enable-local-variables) nil)
|
||||
;; (setq-local enable-local-variables nil)
|
||||
;; These two are not precisely the same.
|
||||
;; Setting this variable does not cause -*- mode settings to be
|
||||
;; ignored, whereas setting enable-local-variables does.
|
||||
@ -2419,9 +2419,7 @@ Do you want to revisit the file normally now? ")))
|
||||
;; this is a permanent local, the major mode won't eliminate it.
|
||||
(and backup-enable-predicate
|
||||
(not (funcall backup-enable-predicate buffer-file-name))
|
||||
(progn
|
||||
(make-local-variable 'backup-inhibited)
|
||||
(setq backup-inhibited t)))
|
||||
(setq-local backup-inhibited t))
|
||||
(if rawfile
|
||||
(progn
|
||||
(set-buffer-multibyte nil)
|
||||
@ -3520,7 +3518,7 @@ n -- to ignore the local variables list.")
|
||||
(let ((print-escape-newlines t))
|
||||
(prin1 (cdr elt) buf))
|
||||
(insert "\n"))
|
||||
(set (make-local-variable 'cursor-type) nil)
|
||||
(setq-local cursor-type nil)
|
||||
(set-buffer-modified-p nil)
|
||||
(goto-char (point-min)))
|
||||
|
||||
@ -4492,9 +4490,7 @@ the old visited file has been renamed to the new name FILENAME."
|
||||
(and buffer-file-name
|
||||
backup-enable-predicate
|
||||
(not (funcall backup-enable-predicate buffer-file-name))
|
||||
(progn
|
||||
(make-local-variable 'backup-inhibited)
|
||||
(setq backup-inhibited t)))
|
||||
(setq-local backup-inhibited t))
|
||||
(let ((oauto buffer-auto-save-file-name))
|
||||
(cond ((null filename)
|
||||
(setq buffer-auto-save-file-name nil))
|
||||
@ -6219,7 +6215,7 @@ Non-file buffers need a custom function."
|
||||
;; Run after-revert-hook as it was before we reverted.
|
||||
(setq-default revert-buffer-internal-hook global-hook)
|
||||
(if local-hook
|
||||
(set (make-local-variable 'revert-buffer-internal-hook)
|
||||
(setq-local revert-buffer-internal-hook
|
||||
local-hook)
|
||||
(kill-local-variable 'revert-buffer-internal-hook))
|
||||
(run-hooks 'revert-buffer-internal-hook))
|
||||
|
@ -1336,8 +1336,7 @@ Use the viewer defined in EV-ENTRY (a valid element of
|
||||
(progn
|
||||
(switch-to-buffer (format "Filesets: %s %s" vwr file))
|
||||
(insert output)
|
||||
(make-local-variable 'filesets-output-buffer-flag)
|
||||
(setq filesets-output-buffer-flag t)
|
||||
(setq-local filesets-output-buffer-flag t)
|
||||
(set-visited-file-name file t)
|
||||
(when oh
|
||||
(run-hooks 'oh))
|
||||
|
@ -223,11 +223,10 @@ it finishes, type \\[kill-find]."
|
||||
(set-keymap-parent map (current-local-map))
|
||||
(define-key map "\C-c\C-k" 'kill-find)
|
||||
(use-local-map map))
|
||||
(make-local-variable 'dired-sort-inhibit)
|
||||
(setq dired-sort-inhibit t)
|
||||
(set (make-local-variable 'revert-buffer-function)
|
||||
`(lambda (ignore-auto noconfirm)
|
||||
(find-dired ,dir ,find-args)))
|
||||
(setq-local dired-sort-inhibit t)
|
||||
(setq-local revert-buffer-function
|
||||
`(lambda (ignore-auto noconfirm)
|
||||
(find-dired ,dir ,find-args)))
|
||||
;; Set subdir-alist so that Tree Dired will work:
|
||||
(if (fboundp 'dired-simple-subdir-alist)
|
||||
;; will work even with nested dired format (dired-nstd.el,v 1.15
|
||||
@ -235,9 +234,9 @@ it finishes, type \\[kill-find]."
|
||||
(dired-simple-subdir-alist)
|
||||
;; else we have an ancient tree dired (or classic dired, where
|
||||
;; this does no harm)
|
||||
(set (make-local-variable 'dired-subdir-alist)
|
||||
(list (cons default-directory (point-min-marker)))))
|
||||
(set (make-local-variable 'dired-subdir-switches) find-ls-subdir-switches)
|
||||
(setq-local dired-subdir-alist
|
||||
(list (cons default-directory (point-min-marker)))))
|
||||
(setq-local dired-subdir-switches find-ls-subdir-switches)
|
||||
(setq buffer-read-only nil)
|
||||
;; Subdir headlerline must come first because the first marker in
|
||||
;; subdir-alist points there.
|
||||
|
@ -212,21 +212,17 @@ It is a function which takes two arguments, the directory and its parent."
|
||||
|
||||
(use-local-map (append (make-sparse-keymap) (current-local-map)))
|
||||
|
||||
(make-local-variable 'find-lisp-file-predicate)
|
||||
(setq find-lisp-file-predicate file-predicate)
|
||||
(make-local-variable 'find-lisp-directory-predicate)
|
||||
(setq find-lisp-directory-predicate directory-predicate)
|
||||
(make-local-variable 'find-lisp-regexp)
|
||||
(setq find-lisp-regexp regexp)
|
||||
(setq-local find-lisp-file-predicate file-predicate)
|
||||
(setq-local find-lisp-directory-predicate directory-predicate)
|
||||
(setq-local find-lisp-regexp regexp)
|
||||
|
||||
(make-local-variable 'revert-buffer-function)
|
||||
(setq revert-buffer-function
|
||||
(lambda (_ignore1 _ignore2)
|
||||
(find-lisp-insert-directory
|
||||
default-directory
|
||||
find-lisp-file-predicate
|
||||
find-lisp-directory-predicate
|
||||
'ignore)))
|
||||
(setq-local revert-buffer-function
|
||||
(lambda (_ignore1 _ignore2)
|
||||
(find-lisp-insert-directory
|
||||
default-directory
|
||||
find-lisp-file-predicate
|
||||
find-lisp-directory-predicate
|
||||
'ignore)))
|
||||
|
||||
;; Set subdir-alist so that Tree Dired will work:
|
||||
(if (fboundp 'dired-simple-subdir-alist)
|
||||
@ -235,8 +231,8 @@ It is a function which takes two arguments, the directory and its parent."
|
||||
(dired-simple-subdir-alist)
|
||||
;; else we have an ancient tree dired (or classic dired, where
|
||||
;; this does no harm)
|
||||
(set (make-local-variable 'dired-subdir-alist)
|
||||
(list (cons default-directory (point-min-marker)))))
|
||||
(setq-local dired-subdir-alist
|
||||
(list (cons default-directory (point-min-marker)))))
|
||||
(find-lisp-insert-directory
|
||||
dir file-predicate directory-predicate 'ignore)
|
||||
(goto-char (point-min))
|
||||
|
@ -448,7 +448,7 @@ FILE should be in a form suitable for passing to `locate-library'."
|
||||
:syntax-table finder-mode-syntax-table
|
||||
(setq buffer-read-only t
|
||||
buffer-undo-list t)
|
||||
(set (make-local-variable 'finder-headmark) nil))
|
||||
(setq-local finder-headmark nil))
|
||||
|
||||
(defun finder-summary ()
|
||||
"Summarize basic Finder commands."
|
||||
|
@ -160,8 +160,8 @@ this function onto `change-major-mode-hook'."
|
||||
(defun font-lock-default-function (mode)
|
||||
;; Turn on Font Lock mode.
|
||||
(when mode
|
||||
(set (make-local-variable 'char-property-alias-alist)
|
||||
(copy-tree char-property-alias-alist))
|
||||
(setq-local char-property-alias-alist
|
||||
(copy-tree char-property-alias-alist))
|
||||
;; Add `font-lock-face' as an alias for the `face' property.
|
||||
(let ((elt (assq 'face char-property-alias-alist)))
|
||||
(if elt
|
||||
@ -171,8 +171,8 @@ this function onto `change-major-mode-hook'."
|
||||
;; Turn off Font Lock mode.
|
||||
(unless mode
|
||||
;; Remove `font-lock-face' as an alias for the `face' property.
|
||||
(set (make-local-variable 'char-property-alias-alist)
|
||||
(copy-tree char-property-alias-alist))
|
||||
(setq-local char-property-alias-alist
|
||||
(copy-tree char-property-alias-alist))
|
||||
(let ((elt (assq 'face char-property-alias-alist)))
|
||||
(when elt
|
||||
(setcdr elt (remq 'font-lock-face (cdr elt)))
|
||||
|
@ -237,9 +237,8 @@ For most purposes, consider using `format-encode-region' instead."
|
||||
;; delete the buffer once the write is done, but do
|
||||
;; it after running to-fn so it doesn't affect
|
||||
;; write-region calls in to-fn.
|
||||
(set (make-local-variable
|
||||
'write-region-post-annotation-function)
|
||||
'kill-buffer)))
|
||||
(setq-local write-region-post-annotation-function
|
||||
#'kill-buffer)))
|
||||
nil)
|
||||
;; Otherwise just call function, it will return annotations.
|
||||
(funcall to-fn from to orig-buf)))))
|
||||
|
@ -1137,8 +1137,7 @@ it is displayed along with the global value."
|
||||
(when (looking-at "value is") (replace-match ""))
|
||||
(save-excursion
|
||||
(insert "\n\nValue:")
|
||||
(set (make-local-variable 'help-button-cache)
|
||||
(point-marker)))
|
||||
(setq-local help-button-cache (point-marker)))
|
||||
(insert "value is shown ")
|
||||
(insert-button "below"
|
||||
'action help-button-cache
|
||||
|
@ -319,10 +319,10 @@ The format is (FUNCTION ARGS...).")
|
||||
Entry to this mode runs the normal hook `help-mode-hook'.
|
||||
Commands:
|
||||
\\{help-mode-map}"
|
||||
(set (make-local-variable 'revert-buffer-function)
|
||||
'help-mode-revert-buffer)
|
||||
(set (make-local-variable 'bookmark-make-record-function)
|
||||
'help-bookmark-make-record))
|
||||
(setq-local revert-buffer-function
|
||||
#'help-mode-revert-buffer)
|
||||
(setq-local bookmark-make-record-function
|
||||
#'help-bookmark-make-record))
|
||||
|
||||
;;;###autoload
|
||||
(defun help-mode-setup ()
|
||||
|
@ -441,7 +441,7 @@ Conditions are:
|
||||
"Run in minibuffer on activation to establish incremental completion.
|
||||
Usually run by inclusion in `minibuffer-setup-hook'."
|
||||
(when (and icomplete-mode (icomplete-simple-completing-p))
|
||||
(set (make-local-variable 'completion-show-inline-help) nil)
|
||||
(setq-local completion-show-inline-help nil)
|
||||
(use-local-map (make-composed-keymap icomplete-minibuffer-map
|
||||
(current-local-map)))
|
||||
(add-hook 'pre-command-hook #'icomplete-pre-command-hook nil t)
|
||||
@ -464,7 +464,7 @@ Usually run by inclusion in `minibuffer-setup-hook'."
|
||||
(when (and completion-in-region-mode
|
||||
icomplete-mode (icomplete-simple-completing-p))
|
||||
(setq icomplete--in-region-buffer (current-buffer))
|
||||
(set (make-local-variable 'completion-show-inline-help) nil)
|
||||
(setq-local completion-show-inline-help nil)
|
||||
(let ((tem (assq 'completion-in-region-mode
|
||||
minor-mode-overriding-map-alist)))
|
||||
(unless (memq icomplete-minibuffer-map (cdr tem))
|
||||
|
@ -3966,7 +3966,7 @@ If `ido-change-word-sub' cannot be found in WORD, return nil."
|
||||
(boundp 'ido-completion-buffer-full))
|
||||
(set-window-start win (point-min))
|
||||
(with-no-warnings
|
||||
(set (make-local-variable 'ido-completion-buffer-full) t))
|
||||
(setq-local ido-completion-buffer-full t))
|
||||
(setq full-list t
|
||||
display-it t))
|
||||
(scroll-other-window))
|
||||
@ -4810,8 +4810,7 @@ Modified from `icomplete-completions'."
|
||||
(delete-region ido-eoinput (point-max))))
|
||||
|
||||
;; Reestablish the local variable 'cause minibuffer-setup is weird:
|
||||
(make-local-variable 'ido-eoinput)
|
||||
(setq ido-eoinput 1))))
|
||||
(setq-local ido-eoinput 1))))
|
||||
|
||||
(defun ido-summary-buffers-to-end ()
|
||||
;; Move the summaries to the end of the buffer list.
|
||||
|
@ -424,8 +424,7 @@ While this input method is active, the variable
|
||||
(add-hook 'minibuffer-exit-hook 'robin-exit-from-minibuffer))
|
||||
(run-hooks 'input-method-activate-hook
|
||||
'robin-activate-hook)
|
||||
(set (make-local-variable 'input-method-function)
|
||||
'robin-input-method)))
|
||||
(setq-local input-method-function 'robin-input-method)))
|
||||
|
||||
(define-obsolete-variable-alias
|
||||
'robin-inactivate-hook
|
||||
|
@ -525,7 +525,7 @@ HELP-TEXT is a text set in `hangul-input-method-help-text'."
|
||||
(quail-delete-overlays)
|
||||
(if (eq (selected-window) (minibuffer-window))
|
||||
(add-hook 'minibuffer-exit-hook 'quail-exit-from-minibuffer))
|
||||
(set (make-local-variable 'input-method-function) func))
|
||||
(setq-local input-method-function func))
|
||||
|
||||
(defun hangul-input-method-deactivate ()
|
||||
"Deactivate the current Hangul input method."
|
||||
|
@ -105,8 +105,7 @@ While this input method is active, the variable
|
||||
(quail-delete-overlays)
|
||||
(if (eq (selected-window) (minibuffer-window))
|
||||
(add-hook 'minibuffer-exit-hook 'quail-exit-from-minibuffer))
|
||||
(set (make-local-variable 'input-method-function)
|
||||
'ucs-input-method)))
|
||||
(setq-local input-method-function 'ucs-input-method)))
|
||||
|
||||
(defun ucs-input-deactivate ()
|
||||
"Deactivate UCS input method."
|
||||
|
@ -1583,10 +1583,10 @@ The following key bindings are currently in effect in the buffer:
|
||||
(auto-fill-mode -1)
|
||||
(setq imenu-generic-expression (list (list nil Man-heading-regexp 0)))
|
||||
(imenu-add-to-menubar man-imenu-title)
|
||||
(set (make-local-variable 'outline-regexp) Man-heading-regexp)
|
||||
(set (make-local-variable 'outline-level) (lambda () 1))
|
||||
(set (make-local-variable 'bookmark-make-record-function)
|
||||
'Man-bookmark-make-record)
|
||||
(setq-local outline-regexp Man-heading-regexp)
|
||||
(setq-local outline-level (lambda () 1))
|
||||
(setq-local bookmark-make-record-function
|
||||
#'Man-bookmark-make-record)
|
||||
(add-hook 'window-state-change-functions #'Man--window-state-change nil t))
|
||||
|
||||
(defun Man-build-section-list ()
|
||||
|
@ -96,8 +96,7 @@ yourself the value of `master-of' by calling `master-show-slave'."
|
||||
"Makes BUFFER the slave of the current buffer.
|
||||
Use \\[master-mode] to toggle control of the slave buffer."
|
||||
(interactive "bSlave: ")
|
||||
(make-local-variable 'master-of)
|
||||
(setq master-of buffer)
|
||||
(setq-local master-of buffer)
|
||||
(run-hooks 'master-set-slave-hook))
|
||||
|
||||
(defun master-show-slave ()
|
||||
|
@ -2067,14 +2067,14 @@ variables.")
|
||||
(funcall aff-fun completions)))
|
||||
|
||||
(with-current-buffer standard-output
|
||||
(set (make-local-variable 'completion-base-position)
|
||||
(setq-local completion-base-position
|
||||
(list (+ start base-size)
|
||||
;; FIXME: We should pay attention to completion
|
||||
;; boundaries here, but currently
|
||||
;; completion-all-completions does not give us the
|
||||
;; necessary information.
|
||||
end))
|
||||
(set (make-local-variable 'completion-list-insert-choice-function)
|
||||
(setq-local completion-list-insert-choice-function
|
||||
(let ((ctable minibuffer-completion-table)
|
||||
(cpred minibuffer-completion-predicate)
|
||||
(cprops completion-extra-properties))
|
||||
@ -2866,7 +2866,7 @@ See `read-file-name' for the meaning of the arguments."
|
||||
;; On the first request on `M-n' fill
|
||||
;; `minibuffer-default' with a list of defaults
|
||||
;; relevant for file-name reading.
|
||||
(set (make-local-variable 'minibuffer-default-add-function)
|
||||
(setq-local minibuffer-default-add-function
|
||||
(lambda ()
|
||||
(with-current-buffer
|
||||
(window-buffer (minibuffer-selected-window))
|
||||
|
@ -318,7 +318,7 @@ See the command `outline-mode' for more information on this mode."
|
||||
(add-hook 'change-major-mode-hook
|
||||
(lambda () (outline-minor-mode -1))
|
||||
nil t)
|
||||
(set (make-local-variable 'line-move-ignore-invisible) t)
|
||||
(setq-local line-move-ignore-invisible t)
|
||||
;; Cause use of ellipses for invisible text.
|
||||
(add-to-invisibility-spec '(outline . t)))
|
||||
(setq line-move-ignore-invisible nil)
|
||||
|
@ -738,12 +738,12 @@ user actually typed in."
|
||||
COMPLETEF-SYM should be the symbol where the
|
||||
dynamic-complete-functions are kept. For comint mode itself,
|
||||
this is `comint-dynamic-complete-functions'."
|
||||
(set (make-local-variable 'pcomplete-parse-arguments-function)
|
||||
#'pcomplete-parse-comint-arguments)
|
||||
(setq-local pcomplete-parse-arguments-function
|
||||
#'pcomplete-parse-comint-arguments)
|
||||
(add-hook 'completion-at-point-functions
|
||||
#'pcomplete-completions-at-point nil 'local)
|
||||
(set (make-local-variable completef-sym)
|
||||
(copy-sequence (symbol-value completef-sym)))
|
||||
(setq-local ompletef-sym
|
||||
(copy-sequence (symbol-value completef-sym)))
|
||||
(let* ((funs (symbol-value completef-sym))
|
||||
(elem (or (memq 'comint-filename-completion funs)
|
||||
(memq 'shell-filename-completion funs)
|
||||
|
@ -664,9 +664,9 @@ After displaying or updating a Proced buffer, Proced runs the normal hook
|
||||
truncate-lines t
|
||||
header-line-format '(:eval (proced-header-line)))
|
||||
(add-hook 'post-command-hook #'force-mode-line-update nil t) ;; FIXME: Why?
|
||||
(set (make-local-variable 'revert-buffer-function) #'proced-revert)
|
||||
(set (make-local-variable 'font-lock-defaults)
|
||||
'(proced-font-lock-keywords t nil nil beginning-of-line))
|
||||
(setq-local revert-buffer-function #'proced-revert)
|
||||
(setq-local font-lock-defaults
|
||||
'(proced-font-lock-keywords t nil nil beginning-of-line))
|
||||
(if (and (not proced-auto-update-timer) proced-auto-update-interval)
|
||||
(setq proced-auto-update-timer
|
||||
(run-at-time t proced-auto-update-interval
|
||||
|
@ -1127,7 +1127,7 @@ IGNORE arguments."
|
||||
(unless recentf-list
|
||||
(error "The list of recent files is empty"))
|
||||
(recentf-dialog (format "*%s - Edit list*" recentf-menu-title)
|
||||
(set (make-local-variable 'recentf-edit-list) nil)
|
||||
(setq-local recentf-edit-list nil)
|
||||
(widget-insert
|
||||
(format-message
|
||||
"Click on OK to delete selected files from the recent list.
|
||||
@ -1196,8 +1196,8 @@ IGNORE other arguments."
|
||||
|
||||
(defun recentf-open-files-items (files)
|
||||
"Return a list of widgets to display FILES in a dialog buffer."
|
||||
(set (make-local-variable 'recentf--files-with-key)
|
||||
(recentf-trunc-list files 10))
|
||||
(setq-local recentf--files-with-key
|
||||
(recentf-trunc-list files 10))
|
||||
(mapcar 'recentf-open-files-item
|
||||
(append
|
||||
;; When requested group the files with shortcuts together
|
||||
|
@ -1706,7 +1706,7 @@ See also `multi-occur'."
|
||||
(buffer-undo-list t)
|
||||
(occur--final-pos nil))
|
||||
(erase-buffer)
|
||||
(set (make-local-variable 'occur-highlight-regexp) regexp)
|
||||
(setq-local occur-highlight-regexp regexp)
|
||||
(let ((count
|
||||
(if (stringp nlines)
|
||||
;; Treat nlines as a regexp to collect.
|
||||
|
@ -233,7 +233,7 @@ Also see the `reveal-auto-hide' variable."
|
||||
:keymap reveal-mode-map
|
||||
(if reveal-mode
|
||||
(progn
|
||||
(set (make-local-variable 'search-invisible) t)
|
||||
(setq-local search-invisible t)
|
||||
(add-hook 'post-command-hook 'reveal-post-command nil t))
|
||||
(kill-local-variable 'search-invisible)
|
||||
(remove-hook 'post-command-hook 'reveal-post-command t)))
|
||||
|
@ -584,8 +584,8 @@ format first."
|
||||
(when (and (not ruler-mode)
|
||||
(local-variable-p 'header-line-format)
|
||||
(not (local-variable-p 'ruler-mode-header-line-format-old)))
|
||||
(set (make-local-variable 'ruler-mode-header-line-format-old)
|
||||
header-line-format))
|
||||
(setq-local ruler-mode-header-line-format-old
|
||||
header-line-format))
|
||||
(setq header-line-format ruler-mode-header-line-format))
|
||||
|
||||
;;;###autoload
|
||||
|
@ -64,7 +64,7 @@ MS-Windows systems if `w32-scroll-lock-modifier' is non-nil."
|
||||
(progn
|
||||
(setq scroll-lock-preserve-screen-pos-save
|
||||
scroll-preserve-screen-position)
|
||||
(set (make-local-variable 'scroll-preserve-screen-position) 'always))
|
||||
(setq-local scroll-preserve-screen-position 'always))
|
||||
(setq scroll-preserve-screen-position
|
||||
scroll-lock-preserve-screen-pos-save)))
|
||||
|
||||
|
@ -633,7 +633,7 @@ It is the default value of the variable `top-level'."
|
||||
(with-current-buffer "*Messages*"
|
||||
(messages-buffer-mode)
|
||||
;; Make it easy to do like "tail -f".
|
||||
(set (make-local-variable 'window-point-insertion-type) t)
|
||||
(setq-local window-point-insertion-type t)
|
||||
;; Give *Messages* the same default-directory as *scratch*,
|
||||
;; just to keep things predictable.
|
||||
(setq default-directory (or dir (expand-file-name "~/")))))
|
||||
@ -1999,7 +1999,7 @@ splash screen in another window."
|
||||
(setq buffer-read-only nil)
|
||||
(erase-buffer)
|
||||
(setq default-directory command-line-default-directory)
|
||||
(set (make-local-variable 'tab-width) 8)
|
||||
(setq-local tab-width 8)
|
||||
|
||||
(if pure-space-overflow
|
||||
(insert pure-space-overflow-message))
|
||||
|
@ -1231,8 +1231,8 @@ the stroke as a character in some language."
|
||||
;; mode-popup-menu edit-strokes-menu) ; what about extent-specific stuff?
|
||||
;; (and (featurep 'menubar)
|
||||
;; current-menubar
|
||||
;; (set (make-local-variable 'current-menubar)
|
||||
;; (copy-sequence current-menubar))
|
||||
;; (setq-local current-menubar
|
||||
;; (copy-sequence current-menubar))
|
||||
;; (add-submenu nil edit-strokes-menu)))
|
||||
|
||||
;;(let ((map edit-strokes-mode-map))
|
||||
@ -1363,13 +1363,13 @@ If STROKES-MAP is not given, `strokes-global-map' will be used instead."
|
||||
finally do (unless (eobp)
|
||||
(kill-region (1+ (point)) (point-max))))
|
||||
(view-buffer "*Strokes List*" nil)
|
||||
(set (make-local-variable 'view-mode-map)
|
||||
(let ((map (copy-keymap view-mode-map)))
|
||||
(define-key map "q" `(lambda ()
|
||||
(interactive)
|
||||
(View-quit)
|
||||
(set-window-configuration ,config)))
|
||||
map))
|
||||
(setq-local view-mode-map
|
||||
(let ((map (copy-keymap view-mode-map)))
|
||||
(define-key map "q" `(lambda ()
|
||||
(interactive)
|
||||
(View-quit)
|
||||
(set-window-configuration ,config)))
|
||||
map))
|
||||
(goto-char (point-min))))
|
||||
|
||||
(defun strokes-alphabetic-lessp (stroke1 stroke2)
|
||||
|
@ -347,8 +347,7 @@ If MARKED is non-nil, the image is marked."
|
||||
:conversion ,(if marked 'disabled)
|
||||
:margin ,thumbs-margin)))
|
||||
(insert-image i)
|
||||
(set (make-local-variable 'thumbs-current-image-size)
|
||||
(image-size i t))))
|
||||
(setq-local thumbs-current-image-size (image-size i t))))
|
||||
|
||||
(defun thumbs-insert-thumb (img &optional marked)
|
||||
"Insert the thumbnail for IMG at point.
|
||||
@ -387,7 +386,7 @@ If MARKED is non-nil, the image is marked."
|
||||
(if dir (setq default-directory dir))
|
||||
(thumbs-do-thumbs-insertion list)
|
||||
(goto-char (point-min))
|
||||
(set (make-local-variable 'thumbs-current-dir) default-directory)))
|
||||
(setq-local thumbs-current-dir default-directory)))
|
||||
|
||||
;;;###autoload
|
||||
(defun thumbs-show-from-dir (dir &optional reg same-window)
|
||||
|
@ -260,10 +260,9 @@ Typically it should contain something like this:
|
||||
\\='(:ascent center :mask (heuristic t)))"
|
||||
(or name (setq name (or tree-widget-theme "default")))
|
||||
(unless (string-equal name (tree-widget-theme-name))
|
||||
(set (make-local-variable 'tree-widget--theme)
|
||||
(make-vector 4 nil))
|
||||
(tree-widget-set-parent-theme name)
|
||||
(tree-widget-set-parent-theme "default")))
|
||||
(setq-local tree-widget--theme (make-vector 4 nil))
|
||||
(tree-widget-set-parent-theme name)
|
||||
(tree-widget-set-parent-theme "default")))
|
||||
|
||||
(defun tree-widget--locate-sub-directory (name path)
|
||||
"Locate all occurrences of the sub-directory NAME in PATH.
|
||||
|
@ -8390,9 +8390,9 @@ from the list of completions and default values."
|
||||
;; here manually.
|
||||
(if (and (boundp 'icomplete-with-completion-tables)
|
||||
(listp icomplete-with-completion-tables))
|
||||
(set (make-local-variable 'icomplete-with-completion-tables)
|
||||
(cons rbts-completion-table
|
||||
icomplete-with-completion-tables))))
|
||||
(setq-local icomplete-with-completion-tables
|
||||
(cons rbts-completion-table
|
||||
icomplete-with-completion-tables))))
|
||||
(read-buffer prompt (other-buffer (current-buffer))
|
||||
(confirm-nonexistent-file-or-buffer)))))
|
||||
|
||||
|
@ -451,7 +451,7 @@ function findactiveelement(doc){
|
||||
XW is the xwidget identifier, TEXT is retrieved from the webkit."
|
||||
(switch-to-buffer
|
||||
(generate-new-buffer "textarea"))
|
||||
(set (make-local-variable 'xwidget-xwbl) xw)
|
||||
(setq-local xwidget-xwbl xw)
|
||||
(insert text))
|
||||
|
||||
(defun xwidget-webkit-end-edit-textarea ()
|
||||
|
Loading…
Reference in New Issue
Block a user