From: Stefan Kangas Date: Sun, 6 Dec 2020 07:57:54 +0000 (+0100) Subject: Prefer setq-local in several progmodes X-Git-Tag: emacs-28.0.90~4906 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e5c06669b89bd005ec2e5c17f307dbe128019f25;p=emacs.git Prefer setq-local in several progmodes * lisp/progmodes/executable.el (executable-interpret): * lisp/progmodes/f90.el (f90-mode): * lisp/progmodes/flymake-cc.el (flymake-cc--make-diagnostics): * lisp/progmodes/fortran.el (fortran-mode): * lisp/progmodes/gud.el (gud-gdb, sdb, dbx, xdb, perldb, pdb) (jdb, gud-mode, gud-common-init, gdb-script-mode) (gud-tooltip-activate-mouse-motions): * lisp/progmodes/hideshow.el (hs-minor-mode): * lisp/progmodes/icon.el (icon-mode): * lisp/progmodes/ld-script.el (ld-script-mode): * lisp/progmodes/mixal-mode.el (mixal-mode): * lisp/progmodes/modula2.el (m2-mode): * lisp/progmodes/simula.el (simula-mode): * lisp/progmodes/subword.el (subword-setup-buffer): * lisp/progmodes/which-func.el (which-function): Prefer setq-local. --- diff --git a/lisp/progmodes/executable.el b/lisp/progmodes/executable.el index bae2bb66403..cc7280921ad 100644 --- a/lisp/progmodes/executable.el +++ b/lisp/progmodes/executable.el @@ -197,7 +197,7 @@ command to find the next error. The buffer is also in `comint-mode' and buffer-file-name)))) (require 'compile) (save-some-buffers (not compilation-ask-about-save)) - (set (make-local-variable 'executable-command) command) + (setq-local executable-command command) (let ((compilation-error-regexp-alist executable-error-regexp-alist)) (compilation-start command t (lambda (_x) "*interpretation*")))) diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index 1fbbc892c03..3c5c29bd8d9 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el @@ -1179,29 +1179,26 @@ Turning on F90 mode calls the value of the variable `f90-mode-hook' with no args, if that value is non-nil." :group 'f90 :abbrev-table f90-mode-abbrev-table - (set (make-local-variable 'indent-line-function) 'f90-indent-line) - (set (make-local-variable 'indent-region-function) 'f90-indent-region) - (set (make-local-variable 'comment-start) "!") - (set (make-local-variable 'comment-start-skip) "!+ *") - (set (make-local-variable 'comment-indent-function) 'f90-comment-indent) - (set (make-local-variable 'abbrev-all-caps) t) - (set (make-local-variable 'normal-auto-fill-function) 'f90-do-auto-fill) + (setq-local indent-line-function #'f90-indent-line) + (setq-local indent-region-function #'f90-indent-region) + (setq-local comment-start "!") + (setq-local comment-start-skip "!+ *") + (setq-local comment-indent-function 'f90-comment-indent) + (setq-local abbrev-all-caps t) + (setq-local normal-auto-fill-function #'f90-do-auto-fill) (setq indent-tabs-mode nil) ; auto buffer local - (set (make-local-variable 'fill-paragraph-function) 'f90-fill-paragraph) - (set (make-local-variable 'font-lock-defaults) - '((f90-font-lock-keywords f90-font-lock-keywords-1 - f90-font-lock-keywords-2 - f90-font-lock-keywords-3 - f90-font-lock-keywords-4) - nil t)) - (set (make-local-variable 'imenu-case-fold-search) t) - (set (make-local-variable 'imenu-generic-expression) - f90-imenu-generic-expression) - (set (make-local-variable 'beginning-of-defun-function) - 'f90-beginning-of-subprogram) - (set (make-local-variable 'end-of-defun-function) 'f90-end-of-subprogram) - (set (make-local-variable 'add-log-current-defun-function) - #'f90-current-defun)) + (setq-local fill-paragraph-function #'f90-fill-paragraph) + (setq-local font-lock-defaults + '((f90-font-lock-keywords f90-font-lock-keywords-1 + f90-font-lock-keywords-2 + f90-font-lock-keywords-3 + f90-font-lock-keywords-4) + nil t)) + (setq-local imenu-case-fold-search t) + (setq-local imenu-generic-expression f90-imenu-generic-expression) + (setq-local beginning-of-defun-function #'f90-beginning-of-subprogram) + (setq-local end-of-defun-function #'f90-end-of-subprogram) + (setq-local add-log-current-defun-function #'f90-current-defun)) ;; Inline-functions. diff --git a/lisp/progmodes/flymake-cc.el b/lisp/progmodes/flymake-cc.el index d1985b4f777..19cef855c54 100644 --- a/lisp/progmodes/flymake-cc.el +++ b/lisp/progmodes/flymake-cc.el @@ -50,7 +50,7 @@ SOURCE." ;; TODO: if you can understand it, use `compilation-mode's regexps ;; or even some of its machinery here. ;; - ;; (set (make-local-variable 'compilation-locs) + ;; (setq-local compilation-locs ;; (make-hash-table :test 'equal :weakness 'value)) ;; (compilation-parse-errors (point-min) (point-max) ;; 'gnu 'gcc-include) diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index d84c3795653..3a0274c6090 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el @@ -861,36 +861,34 @@ with no args, if that value is non-nil." :group 'fortran :syntax-table fortran-mode-syntax-table :abbrev-table fortran-mode-abbrev-table - (set (make-local-variable 'indent-line-function) 'fortran-indent-line) - (set (make-local-variable 'indent-region-function) + (setq-local indent-line-function 'fortran-indent-line) + (setq-local indent-region-function (lambda (start end) (let (fortran-blink-matching-if ; avoid blinking delay indent-region-function) (indent-region start end nil)))) - (set (make-local-variable 'require-final-newline) mode-require-final-newline) + (setq-local require-final-newline mode-require-final-newline) ;; The syntax tables don't understand the column-0 comment-markers. - (set (make-local-variable 'comment-use-syntax) nil) - (set (make-local-variable 'comment-padding) "$$$") - (set (make-local-variable 'comment-start) fortran-comment-line-start) - (set (make-local-variable 'comment-start-skip) + (setq-local comment-use-syntax nil) + (setq-local comment-padding "$$$") + (setq-local comment-start fortran-comment-line-start) + (setq-local comment-start-skip ;; We can't reuse `fortran-comment-line-start-skip' directly because ;; it contains backrefs whereas we need submatch-1 to end at the ;; beginning of the comment delimiter. ;; (concat "\\(\\)\\(![ \t]*\\|" fortran-comment-line-start-skip "\\)") "\\(\\)\\(?:^[CcDd*]\\|!\\)\\(?:\\([^ \t\n]\\)\\2+\\)?[ \t]*") - (set (make-local-variable 'comment-indent-function) 'fortran-comment-indent) - (set (make-local-variable 'comment-region-function) 'fortran-comment-region) - (set (make-local-variable 'uncomment-region-function) - 'fortran-uncomment-region) - (set (make-local-variable 'comment-insert-comment-function) - 'fortran-indent-comment) - (set (make-local-variable 'abbrev-all-caps) t) - (set (make-local-variable 'normal-auto-fill-function) 'fortran-auto-fill) - (set (make-local-variable 'indent-tabs-mode) (fortran-analyze-file-format)) + (setq-local comment-indent-function 'fortran-comment-indent) + (setq-local comment-region-function 'fortran-comment-region) + (setq-local uncomment-region-function 'fortran-uncomment-region) + (setq-local comment-insert-comment-function 'fortran-indent-comment) + (setq-local abbrev-all-caps t) + (setq-local normal-auto-fill-function 'fortran-auto-fill) + (setq-local indent-tabs-mode (fortran-analyze-file-format)) (setq mode-line-process '(indent-tabs-mode fortran-tab-mode-string)) - (set (make-local-variable 'fill-column) fortran-line-length) - (set (make-local-variable 'fill-paragraph-function) 'fortran-fill-paragraph) - (set (make-local-variable 'font-lock-defaults) + (setq-local fill-column fortran-line-length) + (setq-local fill-paragraph-function 'fortran-fill-paragraph) + (setq-local font-lock-defaults '((fortran-font-lock-keywords fortran-font-lock-keywords-1 fortran-font-lock-keywords-2 @@ -898,20 +896,19 @@ with no args, if that value is non-nil." fortran-font-lock-keywords-4) nil t ((?/ . "$/") ("_$" . "w")) fortran-beginning-of-subprogram)) - (set (make-local-variable 'syntax-propertize-function) + (setq-local syntax-propertize-function (fortran-make-syntax-propertize-function fortran-line-length)) - (set (make-local-variable 'imenu-case-fold-search) t) - (set (make-local-variable 'imenu-generic-expression) - fortran-imenu-generic-expression) - (set (make-local-variable 'imenu-syntax-alist) '(("_$" . "w"))) - (set (make-local-variable 'beginning-of-defun-function) - #'fortran-beginning-of-subprogram) - (set (make-local-variable 'end-of-defun-function) - #'fortran-end-of-subprogram) - (set (make-local-variable 'add-log-current-defun-function) - #'fortran-current-defun) - (set (make-local-variable 'dabbrev-case-fold-search) 'case-fold-search) - (set (make-local-variable 'gud-find-expr-function) 'fortran-gud-find-expr) + (setq-local imenu-case-fold-search t) + (setq-local imenu-generic-expression fortran-imenu-generic-expression) + (setq-local imenu-syntax-alist '(("_$" . "w"))) + (setq-local beginning-of-defun-function + #'fortran-beginning-of-subprogram) + (setq-local end-of-defun-function + #'fortran-end-of-subprogram) + (setq-local add-log-current-defun-function + #'fortran-current-defun) + (setq-local dabbrev-case-fold-search 'case-fold-search) + (setq-local gud-find-expr-function 'fortran-gud-find-expr) (add-hook 'hack-local-variables-hook 'fortran-hack-local-variables nil t)) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 81021bc64f4..279a70b0d75 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -758,7 +758,7 @@ the buffer in which this command was invoked." "Multiple debugging requires restarting in text command mode")) (gud-common-init command-line nil 'gud-gdb-marker-filter) - (set (make-local-variable 'gud-minor-mode) 'gdb) + (setq-local gud-minor-mode 'gdb) (gud-def gud-break "break %f:%l" "\C-b" "Set breakpoint at current line.") (gud-def gud-tbreak "tbreak %f:%l" "\C-t" @@ -788,7 +788,7 @@ the buffer in which this command was invoked." (add-hook 'completion-at-point-functions #'gud-gdb-completion-at-point nil 'local) - (set (make-local-variable 'gud-gdb-completion-function) 'gud-gdb-completions) + (setq-local gud-gdb-completion-function 'gud-gdb-completions) (local-set-key "\C-i" 'completion-at-point) (setq comint-prompt-regexp "^(.*gdb[+]?) *") @@ -1044,7 +1044,7 @@ and source-file directory for your debugger." (error "The sdb support requires a valid tags table to work")) (gud-common-init command-line nil 'gud-sdb-marker-filter 'gud-sdb-find-file) - (set (make-local-variable 'gud-minor-mode) 'sdb) + (setq-local gud-minor-mode 'sdb) (gud-def gud-break "%l b" "\C-b" "Set breakpoint at current line.") (gud-def gud-tbreak "%l c" "\C-t" "Set temporary breakpoint at current line.") @@ -1323,7 +1323,7 @@ and source-file directory for your debugger." (gud-common-init command-line 'gud-dbx-massage-args 'gud-dbx-marker-filter))) - (set (make-local-variable 'gud-minor-mode) 'dbx) + (setq-local gud-minor-mode 'dbx) (cond (gud-mips-p @@ -1424,7 +1424,7 @@ directories if your program contains sources from more than one directory." (gud-common-init command-line 'gud-xdb-massage-args 'gud-xdb-marker-filter) - (set (make-local-variable 'gud-minor-mode) 'xdb) + (setq-local gud-minor-mode 'xdb) (gud-def gud-break "b %f:%l" "\C-b" "Set breakpoint at current line.") (gud-def gud-tbreak "b %f:%l\\t" "\C-t" @@ -1578,7 +1578,7 @@ and source-file directory for your debugger." (gud-common-init command-line 'gud-perldb-massage-args 'gud-perldb-marker-filter) - (set (make-local-variable 'gud-minor-mode) 'perldb) + (setq-local gud-minor-mode 'perldb) (gud-def gud-break "b %l" "\C-b" "Set breakpoint at current line.") (gud-def gud-remove "B %l" "\C-d" "Remove breakpoint at current line") @@ -1696,7 +1696,7 @@ directory and source-file directory for your debugger." (list (gud-query-cmdline 'pdb))) (gud-common-init command-line nil 'gud-pdb-marker-filter) - (set (make-local-variable 'gud-minor-mode) 'pdb) + (setq-local gud-minor-mode 'pdb) (gud-def gud-break "break %d%f:%l" "\C-b" "Set breakpoint at current line.") (gud-def gud-remove "clear %d%f:%l" "\C-d" "Remove breakpoint at current line") @@ -2418,7 +2418,7 @@ gud, see `gud-mode'." (gud-common-init command-line 'gud-jdb-massage-args 'gud-jdb-marker-filter) - (set (make-local-variable 'gud-minor-mode) 'jdb) + (setq-local gud-minor-mode 'jdb) ;; If a -classpath option was provided, set gud-jdb-classpath (if gud-jdb-classpath-string @@ -2569,14 +2569,14 @@ Other commands for interacting with the debugger process are inherited from comint mode, which see." (setq mode-line-process '(":%s")) (define-key (current-local-map) "\C-c\C-l" 'gud-refresh) - (set (make-local-variable 'gud-last-frame) nil) + (setq-local gud-last-frame nil) (if (boundp 'tool-bar-map) ; not --without-x (setq-local tool-bar-map gud-tool-bar-map)) (make-local-variable 'comint-prompt-regexp) ;; Don't put repeated commands in command history many times. - (set (make-local-variable 'comint-input-ignoredups) t) + (setq-local comint-input-ignoredups t) (make-local-variable 'paragraph-start) - (set (make-local-variable 'gud-delete-prompt-marker) (make-marker)) + (setq-local gud-delete-prompt-marker (make-marker)) (add-hook 'kill-buffer-hook 'gud-kill-buffer-hook nil t)) (defcustom gud-chdir-before-run t @@ -2649,10 +2649,10 @@ comint mode, which see." (if massage-args (funcall massage-args file args) args)) ;; Since comint clobbered the mode, we don't set it until now. (gud-mode) - (set (make-local-variable 'gud-target-name) + (setq-local gud-target-name (and file-word (file-name-nondirectory file)))) - (set (make-local-variable 'gud-marker-filter) marker-filter) - (if find-file (set (make-local-variable 'gud-find-file) find-file)) + (setq-local gud-marker-filter marker-filter) + (if find-file (setq-local gud-find-file find-file)) (setq gud-last-last-frame nil) (set-process-filter (get-buffer-process (current-buffer)) 'gud-filter) @@ -3348,23 +3348,23 @@ Treats actions as defuns." ;;;###autoload (define-derived-mode gdb-script-mode prog-mode "GDB-Script" "Major mode for editing GDB scripts." - (set (make-local-variable 'comment-start) "#") - (set (make-local-variable 'comment-start-skip) "#+\\s-*") - (set (make-local-variable 'outline-regexp) "[ \t]") - (set (make-local-variable 'imenu-generic-expression) - '((nil "^define[ \t]+\\(\\w+\\)" 1))) - (set (make-local-variable 'indent-line-function) 'gdb-script-indent-line) - (set (make-local-variable 'beginning-of-defun-function) - #'gdb-script-beginning-of-defun) - (set (make-local-variable 'end-of-defun-function) - #'gdb-script-end-of-defun) - (set (make-local-variable 'font-lock-defaults) - '(gdb-script-font-lock-keywords nil nil ((?_ . "w")) nil - (font-lock-syntactic-face-function - . gdb-script-font-lock-syntactic-face))) + (setq-local comment-start "#") + (setq-local comment-start-skip "#+\\s-*") + (setq-local outline-regexp "[ \t]") + (setq-local imenu-generic-expression + '((nil "^define[ \t]+\\(\\w+\\)" 1))) + (setq-local indent-line-function 'gdb-script-indent-line) + (setq-local beginning-of-defun-function + #'gdb-script-beginning-of-defun) + (setq-local end-of-defun-function + #'gdb-script-end-of-defun) + (setq-local font-lock-defaults + '(gdb-script-font-lock-keywords nil nil ((?_ . "w")) nil + (font-lock-syntactic-face-function + . gdb-script-font-lock-syntactic-face))) ;; Recognize docstrings. - (set (make-local-variable 'syntax-propertize-function) - gdb-script-syntax-propertize-function) + (setq-local syntax-propertize-function + gdb-script-syntax-propertize-function) (add-hook 'syntax-propertize-extend-region-functions #'syntax-propertize-multiline 'append 'local)) @@ -3471,8 +3471,8 @@ only tooltips in the buffer containing the overlay arrow." ACTIVATEP non-nil means activate mouse motion events." (if activatep (progn - (set (make-local-variable 'gud-tooltip-mouse-motions-active) t) - (set (make-local-variable 'track-mouse) t)) + (setq-local gud-tooltip-mouse-motions-active t) + (setq-local track-mouse t)) (when gud-tooltip-mouse-motions-active (kill-local-variable 'gud-tooltip-mouse-motions-active) (kill-local-variable 'track-mouse)))) diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 4dee72c737d..c882b7bc52c 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el @@ -948,7 +948,7 @@ Key bindings: (add-hook 'change-major-mode-hook #'turn-off-hideshow nil t) - (set (make-local-variable 'line-move-ignore-invisible) t) + (setq-local line-move-ignore-invisible t) (add-to-invisibility-spec '(hs . t))) (remove-from-invisibility-spec '(hs . t)) ;; hs-show-all does nothing unless h-m-m is non-nil. diff --git a/lisp/progmodes/icon.el b/lisp/progmodes/icon.el index bb43215c33e..dd0ee952a26 100644 --- a/lisp/progmodes/icon.el +++ b/lisp/progmodes/icon.el @@ -163,25 +163,24 @@ Variables controlling indentation style: Turning on Icon mode calls the value of the variable `icon-mode-hook' with no args, if that value is non-nil." :abbrev-table icon-mode-abbrev-table - (set (make-local-variable 'paragraph-start) (concat "$\\|" page-delimiter)) - (set (make-local-variable 'paragraph-separate) paragraph-start) - (set (make-local-variable 'indent-line-function) #'icon-indent-line) - (set (make-local-variable 'comment-start) "# ") - (set (make-local-variable 'comment-end) "") - (set (make-local-variable 'comment-start-skip) "# *") - (set (make-local-variable 'comment-indent-function) 'icon-comment-indent) - (set (make-local-variable 'indent-line-function) 'icon-indent-line) + (setq-local paragraph-start (concat "$\\|" page-delimiter)) + (setq-local paragraph-separate paragraph-start) + (setq-local indent-line-function #'icon-indent-line) + (setq-local comment-start "# ") + (setq-local comment-end "") + (setq-local comment-start-skip "# *") + (setq-local comment-indent-function 'icon-comment-indent) + (setq-local indent-line-function 'icon-indent-line) ;; font-lock support - (set (make-local-variable 'font-lock-defaults) - '((icon-font-lock-keywords - icon-font-lock-keywords-1 icon-font-lock-keywords-2) - nil nil ((?_ . "w")) beginning-of-defun - ;; Obsoleted by Emacs 19.35 parse-partial-sexp's COMMENTSTOP. - ;;(font-lock-comment-start-regexp . "#") - (font-lock-mark-block-function . mark-defun))) + (setq-local font-lock-defaults + '((icon-font-lock-keywords + icon-font-lock-keywords-1 icon-font-lock-keywords-2) + nil nil ((?_ . "w")) beginning-of-defun + ;; Obsoleted by Emacs 19.35 parse-partial-sexp's COMMENTSTOP. + ;;(font-lock-comment-start-regexp . "#") + (font-lock-mark-block-function . mark-defun))) ;; imenu support - (set (make-local-variable 'imenu-generic-expression) - icon-imenu-generic-expression) + (setq-local imenu-generic-expression icon-imenu-generic-expression) ;; hideshow support ;; we start from the assertion that `hs-special-modes-alist' is autoloaded. (unless (assq 'icon-mode hs-special-modes-alist) diff --git a/lisp/progmodes/ld-script.el b/lisp/progmodes/ld-script.el index b17f255ba6a..656af69d42b 100644 --- a/lisp/progmodes/ld-script.el +++ b/lisp/progmodes/ld-script.el @@ -173,10 +173,9 @@ ;;;###autoload (define-derived-mode ld-script-mode prog-mode "LD-Script" "A major mode to edit GNU ld script files" - (set (make-local-variable 'comment-start) "/* ") - (set (make-local-variable 'comment-end) " */") - (set (make-local-variable 'font-lock-defaults) - '(ld-script-font-lock-keywords nil))) + (setq-local comment-start "/* ") + (setq-local comment-end " */") + (setq-local font-lock-defaults '(ld-script-font-lock-keywords nil))) (provide 'ld-script) diff --git a/lisp/progmodes/mixal-mode.el b/lisp/progmodes/mixal-mode.el index b9f60598f63..1f88e87c651 100644 --- a/lisp/progmodes/mixal-mode.el +++ b/lisp/progmodes/mixal-mode.el @@ -1141,18 +1141,18 @@ Assumes that file has been compiled with debugging support." ;;;###autoload (define-derived-mode mixal-mode prog-mode "mixal" "Major mode for the mixal asm language." - (set (make-local-variable 'comment-start) "*") - (set (make-local-variable 'comment-start-skip) "^\\*[ \t]*") - (set (make-local-variable 'font-lock-defaults) - '(mixal-font-lock-keywords)) - (set (make-local-variable 'syntax-propertize-function) - mixal-syntax-propertize-function) + (setq-local comment-start "*") + (setq-local comment-start-skip "^\\*[ \t]*") + (setq-local font-lock-defaults + '(mixal-font-lock-keywords)) + (setq-local syntax-propertize-function + mixal-syntax-propertize-function) ;; might add an indent function in the future - ;; (set (make-local-variable 'indent-line-function) 'mixal-indent-line) - (set (make-local-variable 'compile-command) - (concat "mixasm " - (if buffer-file-name - (shell-quote-argument buffer-file-name))))) + ;; (setq-local indent-line-function 'mixal-indent-line) + (setq-local compile-command + (concat "mixasm " + (if buffer-file-name + (shell-quote-argument buffer-file-name))))) (provide 'mixal-mode) diff --git a/lisp/progmodes/modula2.el b/lisp/progmodes/modula2.el index aa412304c59..a77a4e2b216 100644 --- a/lisp/progmodes/modula2.el +++ b/lisp/progmodes/modula2.el @@ -308,14 +308,14 @@ followed by the first character of the construct. `m2-indent' controls the number of spaces for each indentation. `m2-compile-command' holds the command to compile a Modula-2 program. `m2-link-command' holds the command to link a Modula-2 program." - (set (make-local-variable 'paragraph-start) (concat "$\\|" page-delimiter)) - (set (make-local-variable 'paragraph-separate) paragraph-start) - (set (make-local-variable 'paragraph-ignore-fill-prefix) t) - (set (make-local-variable 'comment-start) "(* ") - (set (make-local-variable 'comment-end) " *)") - (set (make-local-variable 'comment-start-skip) "\\(?:(\\*+\\|//+\\) *") - (set (make-local-variable 'parse-sexp-ignore-comments) t) - (set (make-local-variable 'font-lock-defaults) + (setq-local paragraph-start (concat "$\\|" page-delimiter)) + (setq-local paragraph-separate paragraph-start) + (setq-local paragraph-ignore-fill-prefix t) + (setq-local comment-start "(* ") + (setq-local comment-end " *)") + (setq-local comment-start-skip "\\(?:(\\*+\\|//+\\) *") + (setq-local parse-sexp-ignore-comments t) + (setq-local font-lock-defaults '((m3-font-lock-keywords m3-font-lock-keywords-1 m3-font-lock-keywords-2) nil nil ((?_ . "w") (?. . "w") (?< . ". 1") (?> . ". 4")) nil diff --git a/lisp/progmodes/simula.el b/lisp/progmodes/simula.el index be3edfdc6e4..44d4a9ca449 100644 --- a/lisp/progmodes/simula.el +++ b/lisp/progmodes/simula.el @@ -365,22 +365,22 @@ Variables controlling indentation style: Turning on SIMULA mode calls the value of the variable simula-mode-hook with no arguments, if that value is non-nil." - (set (make-local-variable 'comment-column) 40) - ;; (set (make-local-variable 'end-comment-column) 75) - (set (make-local-variable 'paragraph-start) "[ \t]*$\\|\f") - (set (make-local-variable 'paragraph-separate) paragraph-start) - (set (make-local-variable 'indent-line-function) 'simula-indent-line) - (set (make-local-variable 'comment-start) "! ") - (set (make-local-variable 'comment-end) " ;") - (set (make-local-variable 'comment-start-skip) "!+ *") - (set (make-local-variable 'parse-sexp-ignore-comments) nil) - (set (make-local-variable 'comment-multi-line) t) - (set (make-local-variable 'font-lock-defaults) - '((simula-font-lock-keywords simula-font-lock-keywords-1 - simula-font-lock-keywords-2 simula-font-lock-keywords-3) - nil t ((?_ . "w")))) - (set (make-local-variable 'syntax-propertize-function) - simula-syntax-propertize-function) + (setq-local comment-column 40) + ;; (setq-local end-comment-column 75) + (setq-local paragraph-start "[ \t]*$\\|\f") + (setq-local paragraph-separate paragraph-start) + (setq-local indent-line-function 'simula-indent-line) + (setq-local comment-start "! ") + (setq-local comment-end " ;") + (setq-local comment-start-skip "!+ *") + (setq-local parse-sexp-ignore-comments nil) + (setq-local comment-multi-line t) + (setq-local font-lock-defaults + '((simula-font-lock-keywords simula-font-lock-keywords-1 + simula-font-lock-keywords-2 simula-font-lock-keywords-3) + nil t ((?_ . "w")))) + (setq-local syntax-propertize-function + simula-syntax-propertize-function) (abbrev-mode 1)) (defun simula-indent-exp () diff --git a/lisp/progmodes/subword.el b/lisp/progmodes/subword.el index 0f2c9431f6e..b0df90995bf 100644 --- a/lisp/progmodes/subword.el +++ b/lisp/progmodes/subword.el @@ -332,7 +332,7 @@ as parts of words: e.g., in `superword-mode', searching subwords in order to avoid unwanted reentrancy.") (defun subword-setup-buffer () - (set (make-local-variable 'find-word-boundary-function-table) + (setq-local find-word-boundary-function-table (if (or subword-mode superword-mode) subword-find-word-boundary-function-table subword-empty-char-table))) diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index 266f40abbae..a524bbaa223 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el @@ -293,7 +293,7 @@ If no function name is found, return nil." (null which-function-imenu-failed)) (ignore-errors (imenu--make-index-alist t)) (unless imenu--index-alist - (set (make-local-variable 'which-function-imenu-failed) t))) + (setq-local which-function-imenu-failed t))) ;; If we have an index alist, use it. (when (and (null name) (boundp 'imenu--index-alist) imenu--index-alist)