emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r111051: Convert several major modes


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111051: Convert several major modes to setq-local.
Date: Sat, 01 Dec 2012 12:09:55 +0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111051
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sat 2012-12-01 12:09:55 +0800
message:
  Convert several major modes to setq-local.
  
  * emacs-lisp/lisp-mode.el (lisp-mode-variables, lisp-mode):
  * progmodes/autoconf.el (autoconf-mode):
  * progmodes/js.el (js-mode):
  * progmodes/make-mode.el (makefile-mode, makefile-makepp-mode)
  (makefile-bsdmake-mode, makefile-imake-mode, makefile-browse):
  * progmodes/perl-mode.el (perl-mode):
  * progmodes/sh-script.el (sh-mode, sh-set-shell):
  * textmodes/css-mode.el (css-mode):
  * textmodes/sgml-mode.el (html-mode, sgml-mode)
  (sgml-tags-invisible, sgml-guess-indent):
  * textmodes/tex-mode.el (tex-common-initialization)
  (latex-complete-bibtex-keys, tex-shell, tex-main-file)
  (doctex-mode, plain-tex-mode, latex-mode):
  * textmodes/texinfo.el (texinfo-mode): Use setq-local.
modified:
  lisp/ChangeLog
  lisp/emacs-lisp/lisp-mode.el
  lisp/progmodes/autoconf.el
  lisp/progmodes/js.el
  lisp/progmodes/make-mode.el
  lisp/progmodes/perl-mode.el
  lisp/progmodes/sh-script.el
  lisp/textmodes/css-mode.el
  lisp/textmodes/sgml-mode.el
  lisp/textmodes/tex-mode.el
  lisp/textmodes/texinfo.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-12-01 02:10:53 +0000
+++ b/lisp/ChangeLog    2012-12-01 04:09:55 +0000
@@ -1,3 +1,20 @@
+2012-12-01  Chong Yidong  <address@hidden>
+
+       * emacs-lisp/lisp-mode.el (lisp-mode-variables, lisp-mode):
+       * progmodes/autoconf.el (autoconf-mode):
+       * progmodes/js.el (js-mode):
+       * progmodes/make-mode.el (makefile-mode, makefile-makepp-mode)
+       (makefile-bsdmake-mode, makefile-imake-mode, makefile-browse):
+       * progmodes/perl-mode.el (perl-mode):
+       * progmodes/sh-script.el (sh-mode, sh-set-shell):
+       * textmodes/css-mode.el (css-mode):
+       * textmodes/sgml-mode.el (html-mode, sgml-mode)
+       (sgml-tags-invisible, sgml-guess-indent):
+       * textmodes/tex-mode.el (tex-common-initialization)
+       (latex-complete-bibtex-keys, tex-shell, tex-main-file)
+       (doctex-mode, plain-tex-mode, latex-mode):
+       * textmodes/texinfo.el (texinfo-mode): Use setq-local.
+
 2012-12-01  Kirk Kelsey  <address@hidden>
 
        * vc/vc-hg.el (vc-hg-next-revision):

=== modified file 'lisp/emacs-lisp/lisp-mode.el'
--- a/lisp/emacs-lisp/lisp-mode.el      2012-11-25 04:50:20 +0000
+++ b/lisp/emacs-lisp/lisp-mode.el      2012-12-01 04:09:55 +0000
@@ -195,45 +195,33 @@
 font-lock keywords will not be case sensitive."
   (when lisp-syntax
     (set-syntax-table lisp-mode-syntax-table))
-  (make-local-variable 'paragraph-ignore-fill-prefix)
-  (setq paragraph-ignore-fill-prefix t)
-  (make-local-variable 'fill-paragraph-function)
-  (setq fill-paragraph-function 'lisp-fill-paragraph)
+  (setq-local paragraph-ignore-fill-prefix t)
+  (setq-local fill-paragraph-function 'lisp-fill-paragraph)
   ;; Adaptive fill mode gets the fill wrong for a one-line paragraph made of
   ;; a single docstring.  Let's fix it here.
-  (set (make-local-variable 'adaptive-fill-function)
-       (lambda () (if (looking-at "\\s-+\"[^\n\"]+\"\\s-*$") "")))
+  (setq-local adaptive-fill-function
+             (lambda () (if (looking-at "\\s-+\"[^\n\"]+\"\\s-*$") "")))
   ;; Adaptive fill mode gets in the way of auto-fill,
   ;; and should make no difference for explicit fill
   ;; because lisp-fill-paragraph should do the job.
   ;;  I believe that newcomment's auto-fill code properly deals with it  -stef
   ;;(set (make-local-variable 'adaptive-fill-mode) nil)
-  (make-local-variable 'indent-line-function)
-  (setq indent-line-function 'lisp-indent-line)
-  (make-local-variable 'outline-regexp)
-  (setq outline-regexp ";;;\\(;* [^ \t\n]\\|###autoload\\)\\|(")
-  (make-local-variable 'outline-level)
-  (setq outline-level 'lisp-outline-level)
-  (make-local-variable 'comment-start)
-  (setq comment-start ";")
-  (make-local-variable 'comment-start-skip)
+  (setq-local indent-line-function 'lisp-indent-line)
+  (setq-local outline-regexp ";;;\\(;* [^ \t\n]\\|###autoload\\)\\|(")
+  (setq-local outline-level 'lisp-outline-level)
+  (setq-local comment-start ";")
   ;; Look within the line for a ; following an even number of backslashes
   ;; after either a non-backslash or the line beginning.
-  (setq comment-start-skip "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *")
-  (make-local-variable 'font-lock-comment-start-skip)
+  (setq-local comment-start-skip "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ 
*")
   ;; Font lock mode uses this only when it KNOWS a comment is starting.
-  (setq font-lock-comment-start-skip ";+ *")
-  (make-local-variable 'comment-add)
-  (setq comment-add 1)                 ;default to `;;' in comment-region
-  (make-local-variable 'comment-column)
-  (setq comment-column 40)
+  (setq-local font-lock-comment-start-skip ";+ *")
+  (setq-local comment-add 1)           ;default to `;;' in comment-region
+  (setq-local comment-column 40)
   ;; Don't get confused by `;' in doc strings when paragraph-filling.
-  (set (make-local-variable 'comment-use-global-state) t)
-  (make-local-variable 'imenu-generic-expression)
-  (setq imenu-generic-expression lisp-imenu-generic-expression)
-  (make-local-variable 'multibyte-syntax-as-symbol)
-  (setq multibyte-syntax-as-symbol t)
-  (set (make-local-variable 'syntax-begin-function) 'beginning-of-defun)
+  (setq-local comment-use-global-state t)
+  (setq-local imenu-generic-expression lisp-imenu-generic-expression)
+  (setq-local multibyte-syntax-as-symbol t)
+  (setq-local syntax-begin-function 'beginning-of-defun)
   (setq font-lock-defaults
        `((lisp-font-lock-keywords
           lisp-font-lock-keywords-1 lisp-font-lock-keywords-2)
@@ -519,10 +507,9 @@
 Entry to this mode calls the value of `lisp-mode-hook'
 if that value is non-nil."
   (lisp-mode-variables nil t)
-  (set (make-local-variable 'find-tag-default-function) 'lisp-find-tag-default)
-  (make-local-variable 'comment-start-skip)
-  (setq comment-start-skip
-       "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *")
+  (setq-local find-tag-default-function 'lisp-find-tag-default)
+  (setq-local comment-start-skip
+             "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *")
   (setq imenu-case-fold-search t))
 
 (defun lisp-find-tag-default ()

=== modified file 'lisp/progmodes/autoconf.el'
--- a/lisp/progmodes/autoconf.el        2012-08-07 11:13:23 +0000
+++ b/lisp/progmodes/autoconf.el        2012-12-01 04:09:55 +0000
@@ -78,22 +78,19 @@
 ;;;###autoload
 (define-derived-mode autoconf-mode prog-mode "Autoconf"
   "Major mode for editing Autoconf configure.ac files."
-  (set (make-local-variable 'parens-require-spaces) nil) ; for M4 arg lists
-  (set (make-local-variable 'defun-prompt-regexp)
-       "^[ \t]*A[CM]_\\(\\sw\\|\\s_\\)+")
-  (set (make-local-variable 'comment-start) "dnl ")
-  (set (make-local-variable 'comment-start-skip)
-       "\\(?:\\(\\W\\|\\`\\)dnl\\|#\\) +")
-  (set (make-local-variable 'syntax-propertize-function)
-       (syntax-propertize-rules ("\\<dnl\\>" (0 "<"))))
-  (set (make-local-variable 'font-lock-defaults)
-       `(autoconf-font-lock-keywords nil nil (("_" . "w"))))
-  (set (make-local-variable 'imenu-generic-expression)
-       autoconf-imenu-generic-expression)
-  (set (make-local-variable 'imenu-syntax-alist) '(("_" . "w")))
-  (set (make-local-variable 'indent-line-function) #'indent-relative)
-  (set (make-local-variable 'add-log-current-defun-function)
-       #'autoconf-current-defun-function))
+  (setq-local parens-require-spaces nil) ; for M4 arg lists
+  (setq-local defun-prompt-regexp "^[ \t]*A[CM]_\\(\\sw\\|\\s_\\)+")
+  (setq-local comment-start "dnl ")
+  (setq-local comment-start-skip "\\(?:\\(\\W\\|\\`\\)dnl\\|#\\) +")
+  (setq-local syntax-propertize-function
+             (syntax-propertize-rules ("\\<dnl\\>" (0 "<"))))
+  (setq-local font-lock-defaults
+             `(autoconf-font-lock-keywords nil nil (("_" . "w"))))
+  (setq-local imenu-generic-expression autoconf-imenu-generic-expression)
+  (setq-local imenu-syntax-alist '(("_" . "w")))
+  (setq-local indent-line-function #'indent-relative)
+  (setq-local add-log-current-defun-function
+             #'autoconf-current-defun-function))
 
 (provide 'autoconf-mode)
 (provide 'autoconf)

=== modified file 'lisp/progmodes/js.el'
--- a/lisp/progmodes/js.el      2012-11-08 19:44:52 +0000
+++ b/lisp/progmodes/js.el      2012-12-01 04:09:55 +0000
@@ -3306,29 +3306,21 @@
 (define-derived-mode js-mode prog-mode "Javascript"
   "Major mode for editing JavaScript."
   :group 'js
-
-  (set (make-local-variable 'indent-line-function) 'js-indent-line)
-  (set (make-local-variable 'beginning-of-defun-function)
-       'js-beginning-of-defun)
-  (set (make-local-variable 'end-of-defun-function)
-       'js-end-of-defun)
-
-  (set (make-local-variable 'open-paren-in-column-0-is-defun-start) nil)
-  (set (make-local-variable 'font-lock-defaults)
-       (list js--font-lock-keywords))
-  (set (make-local-variable 'syntax-propertize-function)
-       #'js-syntax-propertize)
-
-  (set (make-local-variable 'parse-sexp-ignore-comments) t)
-  (set (make-local-variable 'parse-sexp-lookup-properties) t)
-  (set (make-local-variable 'which-func-imenu-joiner-function)
-       #'js--which-func-joiner)
+  (setq-local indent-line-function 'js-indent-line)
+  (setq-local beginning-of-defun-function 'js-beginning-of-defun)
+  (setq-local end-of-defun-function 'js-end-of-defun)
+  (setq-local open-paren-in-column-0-is-defun-start nil)
+  (setq-local font-lock-defaults (list js--font-lock-keywords))
+  (setq-local syntax-propertize-function #'js-syntax-propertize)
+
+  (setq-local parse-sexp-ignore-comments t)
+  (setq-local parse-sexp-lookup-properties t)
+  (setq-local which-func-imenu-joiner-function #'js--which-func-joiner)
 
   ;; Comments
-  (set (make-local-variable 'comment-start) "// ")
-  (set (make-local-variable 'comment-end) "")
-  (set (make-local-variable 'fill-paragraph-function)
-       'js-c-fill-paragraph)
+  (setq-local comment-start "// ")
+  (setq-local comment-end "")
+  (setq-local fill-paragraph-function 'js-c-fill-paragraph)
 
   ;; Parse cache
   (add-hook 'before-change-functions #'js--flush-caches t t)
@@ -3338,8 +3330,7 @@
 
   ;; Imenu
   (setq imenu-case-fold-search nil)
-  (set (make-local-variable 'imenu-create-index-function)
-       #'js--imenu-create-index)
+  (setq imenu-create-index-function #'js--imenu-create-index)
 
   ;; for filling, pretend we're cc-mode
   (setq c-comment-prefix-regexp "//+\\|\\**"
@@ -3350,10 +3341,10 @@
         c-comment-start-regexp "/[*/]\\|\\s!"
         comment-start-skip "\\(//+\\|/\\*+\\)\\s *")
 
-  (set (make-local-variable 'electric-indent-chars)
-       (append "{}():;," electric-indent-chars)) ;FIXME: js2-mode adds "[]*".
-  (set (make-local-variable 'electric-layout-rules)
-       '((?\; . after) (?\{ . after) (?\} . before)))
+  (setq-local electric-indent-chars
+             (append "{}():;," electric-indent-chars)) ;FIXME: js2-mode adds 
"[]*".
+  (setq-local electric-layout-rules
+             '((?\; . after) (?\{ . after) (?\} . before)))
 
   (let ((c-buffer-is-cc-mode t))
     ;; FIXME: These are normally set by `c-basic-common-init'.  Should
@@ -3365,8 +3356,7 @@
     (make-local-variable 'adaptive-fill-regexp)
     (c-setup-paragraph-variables))
 
-  (set (make-local-variable 'syntax-begin-function)
-       #'js--syntax-begin-function)
+  (setq-local syntax-begin-function #'js--syntax-begin-function)
 
   ;; Important to fontify the whole buffer syntactically! If we don't,
   ;; then we might have regular expression literals that aren't marked

=== modified file 'lisp/progmodes/make-mode.el'
--- a/lisp/progmodes/make-mode.el       2012-05-08 01:25:52 +0000
+++ b/lisp/progmodes/make-mode.el       2012-12-01 04:09:55 +0000
@@ -879,41 +879,42 @@
   (make-local-variable 'makefile-need-macro-pickup)
 
   ;; Font lock.
-  (set (make-local-variable 'font-lock-defaults)
-       ;; SYNTAX-BEGIN set to backward-paragraph to avoid slow-down
-       ;; near the end of a large buffer, due to parse-partial-sexp's
-       ;; trying to parse all the way till the beginning of buffer.
-       '(makefile-font-lock-keywords
-         nil nil
-         ((?$ . "."))
-         backward-paragraph))
-  (set (make-local-variable 'syntax-propertize-function)
-       makefile-syntax-propertize-function)
+  (setq-local font-lock-defaults
+             ;; Set SYNTAX-BEGIN to backward-paragraph to avoid
+             ;; slow-down near the end of a large buffer, due to
+             ;; `parse-partial-sexp' trying to parse all the way till
+             ;; the beginning of buffer.
+             '(makefile-font-lock-keywords
+               nil nil
+               ((?$ . "."))
+               backward-paragraph))
+  (setq-local syntax-propertize-function
+             makefile-syntax-propertize-function)
 
   ;; Add-log.
-  (set (make-local-variable 'add-log-current-defun-function)
-       'makefile-add-log-defun)
+  (setq-local add-log-current-defun-function
+             'makefile-add-log-defun)
 
   ;; Imenu.
-  (set (make-local-variable 'imenu-generic-expression)
-       makefile-imenu-generic-expression)
+  (setq-local imenu-generic-expression
+             makefile-imenu-generic-expression)
 
   ;; Dabbrev.
-  (set (make-local-variable 'dabbrev-abbrev-skip-leading-regexp) "\\$")
+  (setq-local dabbrev-abbrev-skip-leading-regexp "\\$")
 
   ;; Other abbrevs.
   (setq local-abbrev-table makefile-mode-abbrev-table)
 
   ;; Filling.
-  (set (make-local-variable 'fill-paragraph-function) 'makefile-fill-paragraph)
+  (setq-local fill-paragraph-function 'makefile-fill-paragraph)
 
   ;; Comment stuff.
-  (set (make-local-variable 'comment-start) "#")
-  (set (make-local-variable 'comment-end) "")
-  (set (make-local-variable 'comment-start-skip) "#+[ \t]*")
+  (setq-local comment-start "#")
+  (setq-local comment-end "")
+  (setq-local comment-start-skip "#+[ \t]*")
 
   ;; Make sure TAB really inserts \t.
-  (set (make-local-variable 'indent-line-function) 'indent-to-left-margin)
+  (setq-local indent-line-function 'indent-to-left-margin)
 
   ;; Real TABs are important in makefiles
   (setq indent-tabs-mode t))
@@ -934,8 +935,7 @@
 ;;;###autoload
 (define-derived-mode makefile-makepp-mode makefile-mode "Makeppfile"
   "An adapted `makefile-mode' that knows about makepp."
-  (set (make-local-variable 'makefile-rule-action-regex)
-       makefile-makepp-rule-action-regex)
+  (setq-local makefile-rule-action-regex makefile-makepp-rule-action-regex)
   (setq font-lock-defaults
        `(makefile-makepp-font-lock-keywords ,@(cdr font-lock-defaults))
        imenu-generic-expression
@@ -945,11 +945,9 @@
 ;;;###autoload
 (define-derived-mode makefile-bsdmake-mode makefile-mode "BSDmakefile"
   "An adapted `makefile-mode' that knows about BSD make."
-  (set (make-local-variable 'makefile-dependency-regex)
-       makefile-bsdmake-dependency-regex)
-  (set (make-local-variable 'makefile-dependency-skip) "^:!")
-  (set (make-local-variable 'makefile-rule-action-regex)
-       makefile-bsdmake-rule-action-regex)
+  (setq-local makefile-dependency-regex makefile-bsdmake-dependency-regex)
+  (setq-local makefile-dependency-skip "^:!")
+  (setq-local makefile-rule-action-regex makefile-bsdmake-rule-action-regex)
   (setq font-lock-defaults
        `(makefile-bsdmake-font-lock-keywords ,@(cdr font-lock-defaults))))
 
@@ -957,7 +955,7 @@
 (define-derived-mode makefile-imake-mode makefile-mode "Imakefile"
   "An adapted `makefile-mode' that knows about imake."
   :syntax-table makefile-imake-mode-syntax-table
-  (set (make-local-variable 'syntax-propertize-function) nil)
+  (setq-local syntax-propertize-function nil)
   (setq font-lock-defaults
         `(makefile-imake-font-lock-keywords ,@(cdr font-lock-defaults))))
 
@@ -1501,8 +1499,8 @@
        (pop-to-buffer browser-buffer)
        (makefile-browser-fill targets macros)
        (shrink-window-if-larger-than-buffer)
-       (set (make-local-variable 'makefile-browser-selection-vector)
-            (make-vector (+ (length targets) (length macros)) nil))
+       (setq-local makefile-browser-selection-vector
+                   (make-vector (+ (length targets) (length macros)) nil))
        (makefile-browser-start-interaction))))
 
 (defun makefile-switch-to-browser ()

=== modified file 'lisp/progmodes/perl-mode.el'
--- a/lisp/progmodes/perl-mode.el       2012-11-08 15:37:29 +0000
+++ b/lisp/progmodes/perl-mode.el       2012-12-01 04:09:55 +0000
@@ -631,15 +631,15 @@
 
 Turning on Perl mode runs the normal hook `perl-mode-hook'."
   :abbrev-table perl-mode-abbrev-table
-  (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 'indent-line-function) #'perl-indent-line)
-  (set (make-local-variable 'comment-start) "# ")
-  (set (make-local-variable 'comment-end) "")
-  (set (make-local-variable 'comment-start-skip) "\\(^\\|\\s-\\);?#+ *")
-  (set (make-local-variable 'comment-indent-function) #'perl-comment-indent)
-  (set (make-local-variable 'parse-sexp-ignore-comments) t)
+  (setq-local paragraph-start (concat "$\\|" page-delimiter))
+  (setq-local paragraph-separate paragraph-start)
+  (setq-local paragraph-ignore-fill-prefix t)
+  (setq-local indent-line-function #'perl-indent-line)
+  (setq-local comment-start "# ")
+  (setq-local comment-end "")
+  (setq-local comment-start-skip "\\(^\\|\\s-\\);?#+ *")
+  (setq-local comment-indent-function #'perl-comment-indent)
+  (setq-local parse-sexp-ignore-comments t)
   ;; Tell font-lock.el how to handle Perl.
   (setq font-lock-defaults '((perl-font-lock-keywords
                              perl-font-lock-keywords-1
@@ -647,22 +647,20 @@
                             nil nil ((?\_ . "w")) nil
                              (font-lock-syntactic-face-function
                               . perl-font-lock-syntactic-face-function)))
-  (set (make-local-variable 'syntax-propertize-function)
-       #'perl-syntax-propertize-function)
+  (setq-local syntax-propertize-function #'perl-syntax-propertize-function)
   (add-hook 'syntax-propertize-extend-region-functions
             #'syntax-propertize-multiline 'append 'local)
   ;; Electricity.
   ;; FIXME: setup electric-layout-rules.
-  (set (make-local-variable 'electric-indent-chars)
-       (append '(?\{ ?\} ?\; ?\:) electric-indent-chars))
+  (setq-local electric-indent-chars
+             (append '(?\{ ?\} ?\; ?\:) electric-indent-chars))
   (add-hook 'electric-indent-functions #'perl-electric-noindent-p nil t)
   ;; Tell imenu how to handle Perl.
-  (set (make-local-variable 'imenu-generic-expression)
-       perl-imenu-generic-expression)
+  (setq-local imenu-generic-expression perl-imenu-generic-expression)
   (setq imenu-case-fold-search nil)
   ;; Setup outline-minor-mode.
-  (set (make-local-variable 'outline-regexp) perl-outline-regexp)
-  (set (make-local-variable 'outline-level) 'perl-outline-level))
+  (setq-local outline-regexp perl-outline-regexp)
+  (setq-local outline-level 'perl-outline-level))
 
 ;; This is used by indent-for-comment
 ;; to decide how much to indent a comment in Perl code

=== modified file 'lisp/progmodes/sh-script.el'
--- a/lisp/progmodes/sh-script.el       2012-10-31 03:10:25 +0000
+++ b/lisp/progmodes/sh-script.el       2012-12-01 04:09:55 +0000
@@ -1497,42 +1497,41 @@
   (make-local-variable 'sh-shell-file)
   (make-local-variable 'sh-shell)
 
-  (set (make-local-variable 'skeleton-pair-default-alist)
-       sh-skeleton-pair-default-alist)
-  (set (make-local-variable 'skeleton-end-hook)
-       (lambda () (or (eolp) (newline) (indent-relative))))
+  (setq-local skeleton-pair-default-alist
+             sh-skeleton-pair-default-alist)
+  (setq-local skeleton-end-hook
+             (lambda () (or (eolp) (newline) (indent-relative))))
 
-  (set (make-local-variable 'paragraph-start) (concat page-delimiter "\\|$"))
-  (set (make-local-variable 'paragraph-separate) paragraph-start)
-  (set (make-local-variable 'comment-start) "# ")
-  (set (make-local-variable 'comment-start-skip) "#+[\t ]*")
-  (set (make-local-variable 'local-abbrev-table) sh-mode-abbrev-table)
-  (set (make-local-variable 'comint-dynamic-complete-functions)
-       sh-dynamic-complete-functions)
+  (setq-local paragraph-start (concat page-delimiter "\\|$"))
+  (setq-local paragraph-separate paragraph-start)
+  (setq-local comment-start "# ")
+  (setq-local comment-start-skip "#+[\t ]*")
+  (setq-local local-abbrev-table sh-mode-abbrev-table)
+  (setq-local comint-dynamic-complete-functions
+             sh-dynamic-complete-functions)
   (add-hook 'completion-at-point-functions 'comint-completion-at-point nil t)
   ;; we can't look if previous line ended with `\'
-  (set (make-local-variable 'comint-prompt-regexp) "^[ \t]*")
-  (set (make-local-variable 'imenu-case-fold-search) nil)
-  (set (make-local-variable 'font-lock-defaults)
-       `((sh-font-lock-keywords
-          sh-font-lock-keywords-1 sh-font-lock-keywords-2)
-         nil nil
-         ((?/ . "w") (?~ . "w") (?. . "w") (?- . "w") (?_ . "w")) nil
-         (font-lock-syntactic-face-function
-          . sh-font-lock-syntactic-face-function)))
-  (set (make-local-variable 'syntax-propertize-function)
-       #'sh-syntax-propertize-function)
+  (setq-local comint-prompt-regexp "^[ \t]*")
+  (setq-local imenu-case-fold-search nil)
+  (setq font-lock-defaults
+       `((sh-font-lock-keywords
+          sh-font-lock-keywords-1 sh-font-lock-keywords-2)
+         nil nil
+         ((?/ . "w") (?~ . "w") (?. . "w") (?- . "w") (?_ . "w")) nil
+         (font-lock-syntactic-face-function
+          . sh-font-lock-syntactic-face-function)))
+  (setq-local syntax-propertize-function #'sh-syntax-propertize-function)
   (add-hook 'syntax-propertize-extend-region-functions
             #'syntax-propertize-multiline 'append 'local)
   (sh-electric-here-document-mode 1)
-  (set (make-local-variable 'skeleton-pair-alist) '((?` _ ?`)))
-  (set (make-local-variable 'skeleton-pair-filter-function) 'sh-quoted-p)
-  (set (make-local-variable 'skeleton-further-elements)
-       '((< '(- (min sh-indentation (current-column))))))
-  (set (make-local-variable 'skeleton-filter-function) 'sh-feature)
-  (set (make-local-variable 'skeleton-newline-indent-rigidly) t)
-  (set (make-local-variable 'defun-prompt-regexp)
-       (concat "^\\(function[ \t]\\|[[:alnum:]]+[ \t]+()[ \t]+\\)"))
+  (setq-local skeleton-pair-alist '((?` _ ?`)))
+  (setq-local skeleton-pair-filter-function 'sh-quoted-p)
+  (setq-local skeleton-further-elements
+             '((< '(- (min sh-indentation (current-column))))))
+  (setq-local skeleton-filter-function 'sh-feature)
+  (setq-local skeleton-newline-indent-rigidly t)
+  (setq-local defun-prompt-regexp
+             (concat "^\\(function[ \t]\\|[[:alnum:]]+[ \t]+()[ \t]+\\)"))
   ;; Parse or insert magic number for exec, and set all variables depending
   ;; on the shell thus determined.
   (sh-set-shell
@@ -2104,19 +2103,19 @@
            (executable-set-magic shell (sh-feature sh-shell-arg)
                                  no-query-flag insert-flag)))
   (setq mode-line-process (format "[%s]" sh-shell))
-  (set (make-local-variable 'sh-shell-variables) nil)
-  (set (make-local-variable 'sh-shell-variables-initialized) nil)
-  (set (make-local-variable 'imenu-generic-expression)
-       (sh-feature sh-imenu-generic-expression))
+  (setq-local sh-shell-variables nil)
+  (setq-local sh-shell-variables-initialized nil)
+  (setq-local imenu-generic-expression
+             (sh-feature sh-imenu-generic-expression))
   (let ((tem (sh-feature sh-mode-syntax-table-input)))
     (when tem
-      (set (make-local-variable 'sh-mode-syntax-table)
-           (apply 'sh-mode-syntax-table tem))
+      (setq-local sh-mode-syntax-table
+                 (apply 'sh-mode-syntax-table tem))
       (set-syntax-table sh-mode-syntax-table)))
   (dolist (var (sh-feature sh-variables))
     (sh-remember-variable var))
-  (if (set (make-local-variable 'sh-indent-supported-here)
-           (sh-feature sh-indent-supported))
+  (if (setq-local sh-indent-supported-here
+                 (sh-feature sh-indent-supported))
       (progn
        (message "Setting up indent for shell type %s" sh-shell)
         (if sh-use-smie
@@ -2127,16 +2126,16 @@
                           (funcall mksym "rules")
                           :forward-token  (funcall mksym "forward-token")
                           :backward-token (funcall mksym "backward-token")))
-          (set (make-local-variable 'parse-sexp-lookup-properties) t)
-          (set (make-local-variable 'sh-kw-alist) (sh-feature sh-kw))
+          (setq-local parse-sexp-lookup-properties t)
+          (setq-local sh-kw-alist (sh-feature sh-kw))
           (let ((regexp (sh-feature sh-kws-for-done)))
             (if regexp
-                (set (make-local-variable 'sh-regexp-for-done)
-                     (sh-mkword-regexpr (regexp-opt regexp t)))))
+                (setq-local sh-regexp-for-done
+                           (sh-mkword-regexpr (regexp-opt regexp t)))))
           (message "setting up indent stuff")
           ;; sh-mode has already made indent-line-function local
           ;; but do it in case this is called before that.
-          (set (make-local-variable 'indent-line-function) 'sh-indent-line))
+          (setq-local indent-line-function 'sh-indent-line))
        (if sh-make-vars-local
            (sh-make-vars-local))
        (message "Indentation setup for shell type %s" sh-shell))

=== modified file 'lisp/textmodes/css-mode.el'
--- a/lisp/textmodes/css-mode.el        2012-07-11 23:13:41 +0000
+++ b/lisp/textmodes/css-mode.el        2012-12-01 04:09:55 +0000
@@ -266,22 +266,21 @@
 ;;;###autoload
 (define-derived-mode css-mode fundamental-mode "CSS"
   "Major mode to edit Cascading Style Sheets."
-  (set (make-local-variable 'font-lock-defaults) css-font-lock-defaults)
-  (set (make-local-variable 'comment-start) "/*")
-  (set (make-local-variable 'comment-start-skip) "/\\*+[ \t]*")
-  (set (make-local-variable 'comment-end) "*/")
-  (set (make-local-variable 'comment-end-skip) "[ \t]*\\*+/")
-  (set (make-local-variable 'forward-sexp-function) 'css-forward-sexp)
-  (set (make-local-variable 'parse-sexp-ignore-comments) t)
-  (set (make-local-variable 'indent-line-function) 'css-indent-line)
-  (set (make-local-variable 'fill-paragraph-function)
-       'css-fill-paragraph)
+  (setq-local font-lock-defaults css-font-lock-defaults)
+  (setq-local comment-start "/*")
+  (setq-local comment-start-skip "/\\*+[ \t]*")
+  (setq-local comment-end "*/")
+  (setq-local comment-end-skip "[ \t]*\\*+/")
+  (setq-local forward-sexp-function 'css-forward-sexp)
+  (setq-local parse-sexp-ignore-comments t)
+  (setq-local indent-line-function 'css-indent-line)
+  (setq-local fill-paragraph-function 'css-fill-paragraph)
   (when css-electric-keys
     (let ((fc (make-char-table 'auto-fill-chars)))
       (set-char-table-parent fc auto-fill-chars)
       (dolist (c css-electric-keys)
         (aset fc c 'indent-according-to-mode))
-      (set (make-local-variable 'auto-fill-chars) fc))))
+      (setq-local auto-fill-chars fc))))
 
 (defvar comment-continue)
 

=== modified file 'lisp/textmodes/sgml-mode.el'
--- a/lisp/textmodes/sgml-mode.el       2012-11-25 16:07:58 +0000
+++ b/lisp/textmodes/sgml-mode.el       2012-12-01 04:09:55 +0000
@@ -463,47 +463,39 @@
   ;; A start or end tag by itself on a line separates a paragraph.
   ;; This is desirable because SGML discards a newline that appears
   ;; immediately after a start tag or immediately before an end tag.
-  (set (make-local-variable 'paragraph-start) (concat "[ \t]*$\\|\
+  (setq-local paragraph-start (concat "[ \t]*$\\|\
 \[ \t]*</?\\(" sgml-name-re sgml-attrs-re "\\)?>"))
-  (set (make-local-variable 'paragraph-separate)
-       (concat paragraph-start "$"))
-  (set (make-local-variable 'adaptive-fill-regexp) "[ \t]*")
+  (setq-local paragraph-separate (concat paragraph-start "$"))
+  (setq-local adaptive-fill-regexp "[ \t]*")
   (add-hook 'fill-nobreak-predicate 'sgml-fill-nobreak nil t)
-  (set (make-local-variable 'indent-line-function) 'sgml-indent-line)
-  (set (make-local-variable 'comment-start) "<!-- ")
-  (set (make-local-variable 'comment-end) " -->")
-  (set (make-local-variable 'comment-indent-function) 'sgml-comment-indent)
-  (set (make-local-variable 'comment-line-break-function)
-       'sgml-comment-indent-new-line)
-  (set (make-local-variable 'skeleton-further-elements)
-       '((completion-ignore-case t)))
-  (set (make-local-variable 'skeleton-end-hook)
-       (lambda ()
-         (or (eolp)
-             (not (or (eq v2 '\n) (eq (car-safe v2) '\n)))
-             (newline-and-indent))))
-  (set (make-local-variable 'font-lock-defaults)
-       '((sgml-font-lock-keywords
-          sgml-font-lock-keywords-1
-          sgml-font-lock-keywords-2)
-         nil t))
-  (set (make-local-variable 'syntax-propertize-function)
-       sgml-syntax-propertize-function)
-  (set (make-local-variable 'facemenu-add-face-function)
-       'sgml-mode-facemenu-add-face-function)
-  (set (make-local-variable 'sgml-xml-mode) (sgml-xml-guess))
-  (if sgml-xml-mode
-      ()
-    (set (make-local-variable 'skeleton-transformation-function)
-         sgml-transformation-function))
+  (setq-local indent-line-function 'sgml-indent-line)
+  (setq-local comment-start "<!-- ")
+  (setq-local comment-end " -->")
+  (setq-local comment-indent-function 'sgml-comment-indent)
+  (setq-local comment-line-break-function 'sgml-comment-indent-new-line)
+  (setq-local skeleton-further-elements '((completion-ignore-case t)))
+  (setq-local skeleton-end-hook
+             (lambda ()
+               (or (eolp)
+                   (not (or (eq v2 '\n) (eq (car-safe v2) '\n)))
+                   (newline-and-indent))))
+  (setq font-lock-defaults '((sgml-font-lock-keywords
+                             sgml-font-lock-keywords-1
+                             sgml-font-lock-keywords-2)
+                            nil t))
+  (setq-local syntax-propertize-function sgml-syntax-propertize-function)
+  (setq-local facemenu-add-face-function 'sgml-mode-facemenu-add-face-function)
+  (setq-local sgml-xml-mode (sgml-xml-guess))
+  (unless sgml-xml-mode
+    (setq-local skeleton-transformation-function sgml-transformation-function))
   ;; This will allow existing comments within declarations to be
   ;; recognized.
   ;; I can't find a clear description of SGML/XML comments, but it seems that
   ;; the only reliable ones are <!-- ... --> although it's not clear what
   ;; "..." can contain.  It used to accept -- ... -- as well, but that was
   ;; apparently a mistake.
-  (set (make-local-variable 'comment-start-skip) "<!--[ \t]*")
-  (set (make-local-variable 'comment-end-skip) "[ \t]*--[ \t\n]*>")
+  (setq-local comment-start-skip "<!--[ \t]*")
+  (setq-local comment-end-skip "[ \t]*--[ \t\n]*>")
   ;; This definition has an HTML leaning but probably fits well for other 
modes.
   (setq imenu-generic-expression
        `((nil
@@ -982,10 +974,10 @@
     (unwind-protect
        (save-excursion
          (goto-char (point-min))
-         (if (set (make-local-variable 'sgml-tags-invisible)
-                  (if arg
-                      (>= (prefix-numeric-value arg) 0)
-                    (not sgml-tags-invisible)))
+         (if (setq-local sgml-tags-invisible
+                         (if arg
+                             (>= (prefix-numeric-value arg) 0)
+                           (not sgml-tags-invisible)))
              (while (re-search-forward sgml-tag-name-re nil t)
                (setq string
                      (cdr (assq (intern-soft (downcase (match-string 1)))
@@ -1564,8 +1556,7 @@
     (goto-char (point-min))
     (if (re-search-forward "^\\([ \t]+\\)<" 500 'noerror)
         (progn
-          (set (make-local-variable 'sgml-basic-offset)
-               (1- (current-column)))
+          (setq-local sgml-basic-offset (1- (current-column)))
           (message "Guessed sgml-basic-offset = %d"
                    sgml-basic-offset)
           ))))
@@ -1979,33 +1970,28 @@
    (eval-after-load \"sgml-mode\" '(aset sgml-char-names ?' nil))
 
 \\{html-mode-map}"
-  (set (make-local-variable 'sgml-display-text) html-display-text)
-  (set (make-local-variable 'sgml-tag-face-alist) html-tag-face-alist)
-  (make-local-variable 'sgml-tag-alist)
-  (make-local-variable 'sgml-face-tag-alist)
-  (make-local-variable 'sgml-tag-help)
-  (make-local-variable 'outline-regexp)
-  (make-local-variable 'outline-heading-end-regexp)
-  (make-local-variable 'outline-level)
-  (make-local-variable 'sentence-end-base)
-  (setq sentence-end-base "[.?!][]\"'”)}]*\\(<[^>]*>\\)*"
-       sgml-tag-alist html-tag-alist
-       sgml-face-tag-alist html-face-tag-alist
-       sgml-tag-help html-tag-help
-       outline-regexp "^.*<[Hh][1-6]\\>"
-       outline-heading-end-regexp "</[Hh][1-6]>"
-       outline-level (lambda ()
-                       (char-before (match-end 0))))
+  (setq-local sgml-display-text html-display-text)
+  (setq-local sgml-tag-face-alist html-tag-face-alist)
+  (setq-local sgml-tag-alist html-tag-alist)
+  (setq-local sgml-face-tag-alist html-face-tag-alist)
+  (setq-local sgml-tag-help html-tag-help)
+  (setq-local outline-regexp "^.*<[Hh][1-6]\\>")
+  (setq-local outline-heading-end-regexp "</[Hh][1-6]>")
+  (setq-local outline-level
+             (lambda () (char-before (match-end 0))))
+  (setq-local sentence-end-base "[.?!][]\"'”)}]*\\(<[^>]*>\\)*")
+
   (setq imenu-create-index-function 'html-imenu-index)
-  (set (make-local-variable 'sgml-empty-tags)
-       ;; From HTML-4.01's loose.dtd, parsed with `sgml-parse-dtd',
-       ;; plus manual addition of "wbr".
-       '("area" "base" "basefont" "br" "col" "frame" "hr" "img" "input"
-        "isindex" "link" "meta" "param" "wbr"))
-  (set (make-local-variable 'sgml-unclosed-tags)
-       ;; From HTML-4.01's loose.dtd, parsed with `sgml-parse-dtd'.
-       '("body" "colgroup" "dd" "dt" "head" "html" "li" "option"
-        "p" "tbody" "td" "tfoot" "th" "thead" "tr"))
+
+  (setq-local sgml-empty-tags
+             ;; From HTML-4.01's loose.dtd, parsed with
+             ;; `sgml-parse-dtd', plus manual addition of "wbr".
+             '("area" "base" "basefont" "br" "col" "frame" "hr" "img" "input"
+               "isindex" "link" "meta" "param" "wbr"))
+  (setq-local sgml-unclosed-tags
+             ;; From HTML-4.01's loose.dtd, parsed with `sgml-parse-dtd'.
+             '("body" "colgroup" "dd" "dt" "head" "html" "li" "option"
+               "p" "tbody" "td" "tfoot" "th" "thead" "tr"))
   ;; It's for the user to decide if it defeats it or not  -stef
   ;; (make-local-variable 'imenu-sort-function)
   ;; (setq imenu-sort-function nil) ; sorting the menu defeats the purpose

=== modified file 'lisp/textmodes/tex-mode.el'
--- a/lisp/textmodes/tex-mode.el        2012-10-07 15:54:30 +0000
+++ b/lisp/textmodes/tex-mode.el        2012-12-01 04:09:55 +0000
@@ -1062,10 +1062,10 @@
 Entering Plain-tex mode runs the hook `text-mode-hook', then the hook
 `tex-mode-hook', and finally the hook `plain-tex-mode-hook'.  When the
 special subshell is initiated, the hook `tex-shell-hook' is run."
-  (set (make-local-variable 'tex-command) tex-run-command)
-  (set (make-local-variable 'tex-start-of-header) "%\\*\\*start of header")
-  (set (make-local-variable 'tex-end-of-header) "%\\*\\*end of header")
-  (set (make-local-variable 'tex-trailer) "\\bye\n"))
+  (setq-local tex-command tex-run-command)
+  (setq-local tex-start-of-header "%\\*\\*start of header")
+  (setq-local tex-end-of-header "%\\*\\*end of header")
+  (setq-local tex-trailer "\\bye\n"))
 
 ;;;###autoload
 (define-derived-mode latex-mode tex-mode "LaTeX"
@@ -1108,11 +1108,10 @@
 Entering Latex mode runs the hook `text-mode-hook', then
 `tex-mode-hook', and finally `latex-mode-hook'.  When the special
 subshell is initiated, `tex-shell-hook' is run."
-  (set (make-local-variable 'tex-command) latex-run-command)
-  (set (make-local-variable 'tex-start-of-header)
-       "\\\\document\\(style\\|class\\)")
-  (set (make-local-variable 'tex-end-of-header) "\\\\begin\\s-*{document}")
-  (set (make-local-variable 'tex-trailer) "\\end{document}\n")
+  (setq-local tex-command latex-run-command)
+  (setq-local tex-start-of-header "\\\\document\\(style\\|class\\)")
+  (setq-local tex-end-of-header "\\\\begin\\s-*{document}")
+  (setq-local tex-trailer "\\end{document}\n")
   ;; A line containing just $$ is treated as a paragraph separator.
   ;; A line starting with $$ starts a paragraph,
   ;; but does not separate paragraphs if it has more stuff on it.
@@ -1138,18 +1137,17 @@
                                              "marginpar" "parbox" "caption"))
                "\\|\\$\\$\\|[a-z]*\\(space\\|skip\\|page[a-z]*\\)"
                "\\>\\)[ \t]*\\($\\|%\\)\\)"))
-  (set (make-local-variable 'imenu-create-index-function)
-       'latex-imenu-create-index)
-  (set (make-local-variable 'tex-face-alist) tex-latex-face-alist)
+  (setq-local imenu-create-index-function 'latex-imenu-create-index)
+  (setq-local tex-face-alist tex-latex-face-alist)
   (add-hook 'fill-nobreak-predicate 'latex-fill-nobreak-predicate nil t)
-  (set (make-local-variable 'indent-line-function) 'latex-indent)
-  (set (make-local-variable 'fill-indent-according-to-mode) t)
+  (setq-local indent-line-function 'latex-indent)
+  (setq-local fill-indent-according-to-mode t)
   (add-hook 'completion-at-point-functions
             'latex-complete-data nil 'local)
-  (set (make-local-variable 'outline-regexp) latex-outline-regexp)
-  (set (make-local-variable 'outline-level) 'latex-outline-level)
-  (set (make-local-variable 'forward-sexp-function) 'latex-forward-sexp)
-  (set (make-local-variable 'skeleton-end-hook) nil))
+  (setq-local outline-regexp latex-outline-regexp)
+  (setq-local outline-level 'latex-outline-level)
+  (setq-local forward-sexp-function 'latex-forward-sexp)
+  (setq-local skeleton-end-hook nil))
 
 ;;;###autoload
 (define-derived-mode slitex-mode latex-mode "SliTeX"
@@ -1198,39 +1196,35 @@
 
 (defun tex-common-initialization ()
   ;; Regexp isearch should accept newline and formfeed as whitespace.
-  (set (make-local-variable 'search-whitespace-regexp) "[ \t\r\n\f]+")
+  (setq-local search-whitespace-regexp "[ \t\r\n\f]+")
   ;; A line containing just $$ is treated as a paragraph separator.
-  (set (make-local-variable 'paragraph-start)
-       "[ \t]*$\\|[\f\\\\%]\\|[ \t]*\\$\\$")
+  (setq-local paragraph-start "[ \t]*$\\|[\f\\\\%]\\|[ \t]*\\$\\$")
   ;; A line starting with $$ starts a paragraph,
   ;; but does not separate paragraphs if it has more stuff on it.
-  (set (make-local-variable 'paragraph-separate)
-       "[ \t]*$\\|[\f\\\\%]\\|[ \t]*\\$\\$[ \t]*$")
-  (set (make-local-variable 'comment-start) "%")
-  (set (make-local-variable 'comment-add) 1)
-  (set (make-local-variable 'comment-start-skip)
-       "\\(\\(^\\|[^\\\n]\\)\\(\\\\\\\\\\)*\\)\\(%+ *\\)")
-  (set (make-local-variable 'parse-sexp-ignore-comments) t)
-  (set (make-local-variable 'compare-windows-whitespace)
-       'tex-categorize-whitespace)
-  (set (make-local-variable 'facemenu-add-face-function)
-       'tex-facemenu-add-face-function)
-  (set (make-local-variable 'facemenu-end-add-face) "}")
-  (set (make-local-variable 'facemenu-remove-face-function) t)
-  (set (make-local-variable 'font-lock-defaults)
-       '((tex-font-lock-keywords tex-font-lock-keywords-1
-         tex-font-lock-keywords-2 tex-font-lock-keywords-3)
-        nil nil nil nil
-        ;; Who ever uses that anyway ???
-        (font-lock-mark-block-function . mark-paragraph)
-        (font-lock-syntactic-face-function
-         . tex-font-lock-syntactic-face-function)
-        (font-lock-unfontify-region-function
-         . tex-font-lock-unfontify-region)))
-  (set (make-local-variable 'syntax-propertize-function)
-       (syntax-propertize-rules latex-syntax-propertize-rules))
+  (setq-local paragraph-separate "[ \t]*$\\|[\f\\\\%]\\|[ \t]*\\$\\$[ \t]*$")
+  (setq-local comment-start "%")
+  (setq-local comment-add 1)
+  (setq-local comment-start-skip
+             "\\(\\(^\\|[^\\\n]\\)\\(\\\\\\\\\\)*\\)\\(%+ *\\)")
+  (setq-local parse-sexp-ignore-comments t)
+  (setq-local compare-windows-whitespace 'tex-categorize-whitespace)
+  (setq-local facemenu-add-face-function 'tex-facemenu-add-face-function)
+  (setq-local facemenu-end-add-face "}")
+  (setq-local facemenu-remove-face-function t)
+  (setq-local font-lock-defaults
+             '((tex-font-lock-keywords tex-font-lock-keywords-1
+                tex-font-lock-keywords-2 tex-font-lock-keywords-3)
+               nil nil nil nil
+               ;; Who ever uses that anyway ???
+               (font-lock-mark-block-function . mark-paragraph)
+               (font-lock-syntactic-face-function
+                . tex-font-lock-syntactic-face-function)
+               (font-lock-unfontify-region-function
+                . tex-font-lock-unfontify-region)))
+  (setq-local syntax-propertize-function
+             (syntax-propertize-rules latex-syntax-propertize-rules))
   ;; TABs in verbatim environments don't do what you think.
-  (set (make-local-variable 'indent-tabs-mode) nil)
+  (setq-local indent-tabs-mode nil)
   ;; Other vars that should be buffer-local.
   (make-local-variable 'tex-command)
   (make-local-variable 'tex-start-of-header)
@@ -1523,8 +1517,7 @@
                            (looking-at bibtex-reference-key))
                   (push (match-string-no-properties 0) keys)))))
           ;; Fill the cache.
-          (set (make-local-variable 'latex-complete-bibtex-cache)
-               (list files key keys)))
+          (setq-local latex-complete-bibtex-cache (list files key keys)))
         (complete-with-action action keys key pred)))))
 
 (defun latex-complete-envnames ()
@@ -1885,8 +1878,7 @@
 ;; The utility functions:
 
 (define-derived-mode tex-shell shell-mode "TeX-Shell"
-  (set (make-local-variable 'compilation-error-regexp-alist)
-       tex-error-regexp-alist)
+  (setq-local compilation-error-regexp-alist tex-error-regexp-alist)
   (compilation-shell-minor-mode t))
 
 ;;;###autoload
@@ -2099,8 +2091,7 @@
                   (with-no-warnings
                    (when (boundp 'TeX-master)
                      (cond ((stringp TeX-master)
-                            (make-local-variable 'tex-main-file)
-                            (setq tex-main-file TeX-master))
+                            (setq-local tex-main-file TeX-master))
                            ((and (eq TeX-master t) buffer-file-name)
                             (file-relative-name buffer-file-name)))))
                   ;; Try to guess the main file.
@@ -2870,8 +2861,8 @@
                    (cons (car x) 'doctex-font-lock-syntactic-face-function))
                   (_ x)))
               (cdr font-lock-defaults))))
-  (set (make-local-variable 'syntax-propertize-function)
-       (syntax-propertize-rules doctex-syntax-propertize-rules)))
+  (setq-local syntax-propertize-function
+             (syntax-propertize-rules doctex-syntax-propertize-rules)))
 
 (run-hooks 'tex-mode-load-hook)
 

=== modified file 'lisp/textmodes/texinfo.el'
--- a/lisp/textmodes/texinfo.el 2012-07-11 23:13:41 +0000
+++ b/lisp/textmodes/texinfo.el 2012-12-01 04:09:55 +0000
@@ -33,6 +33,15 @@
 ;;; Code:
 
 (eval-when-compile (require 'tex-mode))
+(declare-function tex-buffer "tex-mode" ())
+(declare-function tex-region "tex-mode" (beg end))
+(declare-function tex-send-command "tex-mode")
+(declare-function tex-recenter-output-buffer "tex-mode" (linenum))
+(declare-function tex-print "tex-mode" (&optional alt))
+(declare-function tex-view "tex-mode" ())
+(declare-function tex-shell-running "tex-mode" ())
+(declare-function tex-kill-job "tex-mode" ())
+
 (defvar outline-heading-alist)
 
 (defgroup texinfo nil
@@ -571,66 +580,50 @@
 
 Entering Texinfo mode calls the value of `text-mode-hook', and then the
 value of `texinfo-mode-hook'."
-  (set (make-local-variable 'page-delimiter)
-       (concat
-       "address@hidden [ \t]*[Tt]op\\|address@hidden("
-       texinfo-chapter-level-regexp
-       "\\)\\>"))
-  (make-local-variable 'require-final-newline)
-  (setq require-final-newline mode-require-final-newline)
-  (make-local-variable 'indent-tabs-mode)
-  (setq indent-tabs-mode nil)
-  (make-local-variable 'paragraph-separate)
-  (setq paragraph-separate
-       (concat "\b\\|@[a-zA-Z]*[ \n]\\|" paragraph-separate))
-  (make-local-variable 'paragraph-start)
-  (setq paragraph-start (concat "\b\\|@[a-zA-Z]*[ \n]\\|" paragraph-start))
-  (set (make-local-variable 'sentence-end-base)
-       "\\(@\\(end\\)?dots{}\\|[.?!]\\)[]\"'”)}]*")
-  (make-local-variable 'fill-column)
-  (setq fill-column 70)
-  (make-local-variable 'comment-start)
-  (setq comment-start "@c ")
-  (make-local-variable 'comment-start-skip)
-  (setq comment-start-skip "@c +\\|@comment +")
-  (make-local-variable 'words-include-escapes)
-  (setq words-include-escapes t)
-  (make-local-variable 'imenu-generic-expression)
-  (setq imenu-generic-expression texinfo-imenu-generic-expression)
+  (setq-local page-delimiter
+             (concat "address@hidden [ \t]*[Tt]op\\|address@hidden("
+                     texinfo-chapter-level-regexp
+                     "\\)\\>"))
+  (setq-local require-final-newline mode-require-final-newline)
+  (setq-local indent-tabs-mode nil)
+  (setq-local paragraph-separate
+             (concat "\b\\|@[a-zA-Z]*[ \n]\\|" paragraph-separate))
+  (setq-local paragraph-start (concat "\b\\|@[a-zA-Z]*[ \n]\\|" 
paragraph-start))
+  (setq-local sentence-end-base "\\(@\\(end\\)?dots{}\\|[.?!]\\)[]\"'”)}]*")
+  (setq-local fill-column 70)
+  (setq-local comment-start "@c ")
+  (setq-local comment-start-skip "@c +\\|@comment +")
+  (setq-local words-include-escapes t)
+  (setq-local imenu-generic-expression texinfo-imenu-generic-expression)
   (setq imenu-case-fold-search nil)
-  (make-local-variable 'font-lock-defaults)
   (setq font-lock-defaults
        '(texinfo-font-lock-keywords nil nil nil backward-paragraph))
-  (set (make-local-variable 'syntax-propertize-function)
-       texinfo-syntax-propertize-function)
-  (set (make-local-variable 'parse-sexp-lookup-properties) t)
+  (setq-local syntax-propertize-function texinfo-syntax-propertize-function)
+  (setq-local parse-sexp-lookup-properties t)
 
   ;; Outline settings.
-  (set (make-local-variable 'outline-heading-alist)
-       ;; We should merge outline-heading-alist and texinfo-section-list
-       ;; but in the mean time, let's just generate one from the other.
-       (mapcar (lambda (x) (cons (concat "@" (car x)) (cadr x)))
-              texinfo-section-list))
-  (set (make-local-variable 'outline-regexp)
-       (concat (regexp-opt (mapcar 'car outline-heading-alist) t)
-              "\\>"))
-
-  (make-local-variable 'tex-start-of-header)
-  (setq tex-start-of-header "%\\*\\*start")
-  (make-local-variable 'tex-end-of-header)
-  (setq tex-end-of-header "%\\*\\*end")
-  (make-local-variable 'tex-first-line-header-regexp)
-  (setq tex-first-line-header-regexp "^\\\\input")
-  (make-local-variable 'tex-trailer)
-  (setq tex-trailer "@bye\n")
-
-  ;; Prevent filling certain lines, in addition to ones specified
-  ;; by the user.
-  (let ((prevent-filling "address@hidden(def\\|multitable\\)"))
-    (set (make-local-variable 'auto-fill-inhibit-regexp)
-        (if (null auto-fill-inhibit-regexp)
-            prevent-filling
-          (concat auto-fill-inhibit-regexp "\\|" prevent-filling)))))
+  (setq-local outline-heading-alist
+             ;; We should merge `outline-heading-alist' and
+             ;; `texinfo-section-list'.  But in the mean time, let's
+             ;; just generate one from the other.
+             (mapcar (lambda (x) (cons (concat "@" (car x)) (cadr x)))
+                     texinfo-section-list))
+  (setq-local outline-regexp
+             (concat (regexp-opt (mapcar 'car outline-heading-alist) t)
+                     "\\>"))
+
+  (setq-local tex-start-of-header "%\\*\\*start")
+  (setq-local tex-end-of-header "%\\*\\*end")
+  (setq-local tex-first-line-header-regexp "^\\\\input")
+  (setq-local tex-trailer "@bye\n")
+
+  ;; Prevent filling certain lines, in addition to ones specified by
+  ;; the user.
+  (setq-local auto-fill-inhibit-regexp
+             (let ((prevent-filling "address@hidden(def\\|multitable\\)"))
+               (if (null auto-fill-inhibit-regexp)
+                   prevent-filling
+                 (concat auto-fill-inhibit-regexp "\\|" prevent-filling)))))
 
 
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]