aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/shell.el
diff options
context:
space:
mode:
authorStefan Kangas2020-12-08 08:50:54 +0100
committerStefan Kangas2020-12-08 08:52:42 +0100
commit095a41ed896304c668bf98eae7e472e237fe49be (patch)
tree12254824a3780f4af1f33c5e6a60263ead7d31ad /lisp/shell.el
parentdb001f8dab605d2dc1512ecada78745d67e7eb46 (diff)
downloademacs-095a41ed896304c668bf98eae7e472e237fe49be.tar.gz
emacs-095a41ed896304c668bf98eae7e472e237fe49be.zip
Prefer setq-local in shell.el
* lisp/shell.el (shell-completion-vars, shell-mode): Prefer setq-local.
Diffstat (limited to 'lisp/shell.el')
-rw-r--r--lisp/shell.el46
1 files changed, 23 insertions, 23 deletions
diff --git a/lisp/shell.el b/lisp/shell.el
index 5fed6513b96..5cc9a189c72 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -471,32 +471,32 @@ Shell buffers. It implements `shell-completion-execonly' for
471 471
472(defun shell-completion-vars () 472(defun shell-completion-vars ()
473 "Setup completion vars for `shell-mode' and `read-shell-command'." 473 "Setup completion vars for `shell-mode' and `read-shell-command'."
474 (set (make-local-variable 'comint-completion-fignore) 474 (setq-local comint-completion-fignore
475 shell-completion-fignore) 475 shell-completion-fignore)
476 (set (make-local-variable 'comint-delimiter-argument-list) 476 (setq-local comint-delimiter-argument-list
477 shell-delimiter-argument-list) 477 shell-delimiter-argument-list)
478 (set (make-local-variable 'comint-file-name-chars) shell-file-name-chars) 478 (setq-local comint-file-name-chars shell-file-name-chars)
479 (set (make-local-variable 'comint-file-name-quote-list) 479 (setq-local comint-file-name-quote-list
480 shell-file-name-quote-list) 480 shell-file-name-quote-list)
481 (set (make-local-variable 'comint-file-name-prefix) 481 (setq-local comint-file-name-prefix
482 (or (file-remote-p default-directory) "")) 482 (or (file-remote-p default-directory) ""))
483 (set (make-local-variable 'comint-dynamic-complete-functions) 483 (setq-local comint-dynamic-complete-functions
484 shell-dynamic-complete-functions) 484 shell-dynamic-complete-functions)
485 (setq-local comint-unquote-function #'shell--unquote-argument) 485 (setq-local comint-unquote-function #'shell--unquote-argument)
486 (setq-local comint-requote-function #'shell--requote-argument) 486 (setq-local comint-requote-function #'shell--requote-argument)
487 (set (make-local-variable 'pcomplete-parse-arguments-function) 487 (setq-local pcomplete-parse-arguments-function
488 #'shell--parse-pcomplete-arguments) 488 #'shell--parse-pcomplete-arguments)
489 (set (make-local-variable 'pcomplete-termination-string) 489 (setq-local pcomplete-termination-string
490 (cond ((not comint-completion-addsuffix) "") 490 (cond ((not comint-completion-addsuffix) "")
491 ((stringp comint-completion-addsuffix) 491 ((stringp comint-completion-addsuffix)
492 comint-completion-addsuffix) 492 comint-completion-addsuffix)
493 ((not (consp comint-completion-addsuffix)) " ") 493 ((not (consp comint-completion-addsuffix)) " ")
494 (t (cdr comint-completion-addsuffix)))) 494 (t (cdr comint-completion-addsuffix))))
495 (set (make-local-variable 'pcomplete-command-completion-function) 495 (setq-local pcomplete-command-completion-function
496 #'shell-command-completion-function) 496 #'shell-command-completion-function)
497 ;; Don't use pcomplete's defaulting mechanism, rely on 497 ;; Don't use pcomplete's defaulting mechanism, rely on
498 ;; shell-dynamic-complete-functions instead. 498 ;; shell-dynamic-complete-functions instead.
499 (set (make-local-variable 'pcomplete-default-completion-function) #'ignore) 499 (setq-local pcomplete-default-completion-function #'ignore)
500 (setq-local comint-input-autoexpand shell-input-autoexpand) 500 (setq-local comint-input-autoexpand shell-input-autoexpand)
501 ;; Not needed in shell-mode because it's inherited from comint-mode, but 501 ;; Not needed in shell-mode because it's inherited from comint-mode, but
502 ;; placed here for read-shell-command. 502 ;; placed here for read-shell-command.
@@ -596,7 +596,7 @@ buffer."
596 (and (stringp hsize) 596 (and (stringp hsize)
597 (integerp (setq hsize (string-to-number hsize))) 597 (integerp (setq hsize (string-to-number hsize)))
598 (> hsize 0) 598 (> hsize 0)
599 (set (make-local-variable 'comint-input-ring-size) hsize)) 599 (setq-local comint-input-ring-size hsize))
600 (setq comint-input-ring-file-name 600 (setq comint-input-ring-file-name
601 (concat 601 (concat
602 remote 602 remote