]> git.eshelyaron.com Git - emacs.git/commitdiff
Prefer setq-local in several progmodes
authorStefan Kangas <stefan@marxist.se>
Sun, 6 Dec 2020 07:57:54 +0000 (08:57 +0100)
committerStefan Kangas <stefan@marxist.se>
Sun, 6 Dec 2020 09:06:22 +0000 (10:06 +0100)
* 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.

13 files changed:
lisp/progmodes/executable.el
lisp/progmodes/f90.el
lisp/progmodes/flymake-cc.el
lisp/progmodes/fortran.el
lisp/progmodes/gud.el
lisp/progmodes/hideshow.el
lisp/progmodes/icon.el
lisp/progmodes/ld-script.el
lisp/progmodes/mixal-mode.el
lisp/progmodes/modula2.el
lisp/progmodes/simula.el
lisp/progmodes/subword.el
lisp/progmodes/which-func.el

index bae2bb664034b6f518d1c434d0d05a7816efdbad..cc7280921ad25e4afdd3cf183113cd00e9db8557 100644 (file)
@@ -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*"))))
 
index 1fbbc892c03ab405b4ae5ef574a9a32ca25e75d4..3c5c29bd8d9fbcb31bb90940393e838164097044 100644 (file)
@@ -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))
 
 \f
 ;; Inline-functions.
index d1985b4f7777757aa55a89dc32169a3a25cb0c5f..19cef855c54a06c6de5069ce4896ee5cb31b6080 100644 (file)
@@ -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)
index d84c3795653d8b72f8fca32dfd90f28e90d0f65b..3a0274c60905dbabb03f33c82569fbea2bed9b27 100644 (file)
@@ -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))
 
 \f
index 81021bc64f44dd0fe7313a9b5b2937a724bef817..279a70b0d752e5785f2b0ade05875d67df15e967 100644 (file)
@@ -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))))
index 4dee72c737d7c1d6c49744a74015095e8a898050..c882b7bc52c49c2da10c40a9743890560d99c240 100644 (file)
@@ -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.
index bb43215c33ea13109a1f146d1a475ab45d87c782..dd0ee952a26fecbc26223421c643a254bb3d6dfc 100644 (file)
@@ -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)
index b17f255ba6af23dd27108f93b1fbfda5703ae861..656af69d42be9718f580777b99fe4a0256da2584 100644 (file)
 ;;;###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)
 
index b9f60598f63c8acc58c08ccfff5ab7f49ed2f2c5..1f88e87c651a8b6c16d19fc416b4982b950bb739 100644 (file)
@@ -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)
 
index aa412304c5978a3473515a5c9ea637bae0fe1e4a..a77a4e2b2164c829c447a2f2433b17b4c64245d5 100644 (file)
@@ -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
index be3edfdc6e4c7a9a4dbace88275089a18cc68851..44d4a9ca449cb154f91dc7e710aef14418f9067f 100644 (file)
@@ -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 ()
index 0f2c9431f6ee8f1e3fbdc76edde11c27e62d4342..b0df90995bf2c14bba4d26338fe82049d636ba4a 100644 (file)
@@ -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)))
index 266f40abbae690c13df93e221a07897ce5e75a12..a524bbaa2231fe696fe9b4b1e1a19f539e0f9817 100644 (file)
@@ -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)