auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] [elpa] externals/auctex 688349a 12/12: Merge remote-track


From: Tassilo Horn
Subject: [AUCTeX-diffs] [elpa] externals/auctex 688349a 12/12: Merge remote-tracking branch 'origin/master' into externals/auctex
Date: Sat, 17 Apr 2021 15:13:23 -0400 (EDT)

branch: externals/auctex
commit 688349a00d8db9a31eea482305e33ef92f5da05a
Merge: 83403e9 953fcb7
Author: Tassilo Horn <tsdh@gnu.org>
Commit: Tassilo Horn <tsdh@gnu.org>

    Merge remote-tracking branch 'origin/master' into externals/auctex
---
 bib-cite.el                    |   6 +--
 context.el                     |   3 --
 doc/auctex.texi                |  10 ++--
 doc/tex-ref.tex                |   4 +-
 font-latex.el                  |  29 +++---------
 latex.el                       |  95 +++++++++++++++++++-------------------
 multi-prompt.el                |  17 +++----
 preview.el                     |  16 +++----
 style/amsmath.el               |   2 +-
 style/amsthm.el                |   6 +--
 style/biblatex.el              |   4 +-
 style/dinbrief.el              |   8 +++-
 style/dk-bib.el                |   4 +-
 style/exam.el                  |   2 +-
 style/jurabib.el               |   6 +--
 style/kpfonts.el               |   8 ++--
 style/letter.el                |   4 +-
 style/minted.el                |   2 +-
 style/natbib.el                |   6 +--
 style/ntheorem.el              |  20 ++++----
 style/pythontex.el             |   4 +-
 style/tcolorbox.el             |   6 +--
 style/theorem.el               |   4 +-
 style/xparse.el                |   6 +--
 tests/latex/font-latex-test.el |   6 +--
 tex-bar.el                     |  28 ++++++------
 tex-buf.el                     |  16 ++-----
 tex-fold.el                    |  14 ++----
 tex-info.el                    |   2 +-
 tex-site.el.in                 |   2 +-
 tex.el                         | 101 ++++++++++++++++-------------------------
 toolbar-x.el                   |  18 ++++----
 32 files changed, 204 insertions(+), 255 deletions(-)

diff --git a/bib-cite.el b/bib-cite.el
index 99b9278..465f18f 100644
--- a/bib-cite.el
+++ b/bib-cite.el
@@ -611,7 +611,7 @@ call a function in RefTeX to find or display the cross 
reference of a
   "Give advice to novice users about what commands to use next."
   :type 'boolean)
 
-(defcustom bib-switch-to-buffer-function 'switch-to-buffer
+(defcustom bib-switch-to-buffer-function #'switch-to-buffer
   "Function used to select buffers if they differ from the original.
 You may use `switch-to-buffer' `switch-to-buffer-other-window' or
 `switch-to-buffer-other-frame'."
@@ -1331,9 +1331,7 @@ e.g.: \\cite{Wadhams81,Bourke.et.al87,SchneiderBudeus94}
        ((and (re-search-backward "[\n{, ]" nil t)
              (string-equal "{" (buffer-substring (match-beginning 0)
                                                  (match-end 0))))
-        (if (fboundp 'buffer-substring-no-properties)
-            (buffer-substring-no-properties (1+ (point)) here)
-        (buffer-substring (1+ (point)) here)))))))
+        (buffer-substring-no-properties (1+ (point)) here))))))
 
 ;;--------------------------------------------------------------------------
 ;; Functions for Displaying or moving to matching \ref or \label command
diff --git a/context.el b/context.el
index 435bd18..eac68e4 100644
--- a/context.el
+++ b/context.el
@@ -1550,7 +1550,6 @@ else.  There might be text before point."
   "Update entries on AUCTeX menu."
   (or (not (memq major-mode '(context-mode)))
       (null ConTeXt-menu-changed)
-      (not (fboundp 'easy-menu-change))
       (progn
         (TeX-update-style)
         (setq ConTeXt-menu-changed nil)
@@ -1770,8 +1769,6 @@ i.e. you do _not_ have to cater for this yourself by 
adding \\\\' or $."
   (use-local-map ConTeXt-mode-map)
   (setq ConTeXt-menu-changed t)
 
-  (if (fboundp 'make-local-hook)
-      (make-local-hook 'activate-menubar-hook))
   (add-hook 'activate-menubar-hook #'ConTeXt-menu-update nil t)
 
   ;; Outline support
diff --git a/doc/auctex.texi b/doc/auctex.texi
index b38a056..fbd64cb 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -1177,7 +1177,7 @@ variable @code{LaTeX-math-abbrev-prefix}.
 To enable LaTeX Math mode by default, add the following in your
 @file{.emacs} file:
 @lisp
-(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
+(add-hook 'LaTeX-mode-hook #'LaTeX-math-mode)
 @end lisp
 
 @defopt LaTeX-math-abbrev-prefix
@@ -1721,7 +1721,7 @@ automatically as you write it.
 init file:
 
 @lisp
-(add-hook 'LaTeX-mode-hook 'turn-on-auto-fill)
+(add-hook 'LaTeX-mode-hook #'turn-on-auto-fill)
 @end lisp
 
 You can manually fill explicitely marked regions, paragraphs,
@@ -2444,7 +2444,7 @@ add it to a hook and make sure the function is called 
after font locking
 is set up for the buffer.  The following code should accomplish this:
 
 @lisp
-(add-hook 'find-file-hook 'TeX-fold-buffer t)
+(add-hook 'find-file-hook #'TeX-fold-buffer t)
 @end lisp
 
 The command can be used any time to refresh the whole buffer and fold
@@ -5599,8 +5599,8 @@ defined.  We can specify this information in a style hook 
file.
   "Clear `Tex-auto-multi' before use."
   (setq TeX-auto-multi nil))
 
-(add-hook 'TeX-auto-prepare-hook 'TeX-macro-prepare)
-(add-hook 'TeX-auto-cleanup-hook 'TeX-macro-cleanup)
+(add-hook 'TeX-auto-prepare-hook #'TeX-macro-prepare)
+(add-hook 'TeX-auto-cleanup-hook #'TeX-macro-cleanup)
 
 (TeX-add-style-hook
  "macro"
diff --git a/doc/tex-ref.tex b/doc/tex-ref.tex
index 026f64d..2affa85 100644
--- a/doc/tex-ref.tex
+++ b/doc/tex-ref.tex
@@ -580,7 +580,7 @@ RefTeX is part of Emacs.  To activate and make it interact 
with
 AUCTeX, insert the following lines in \file{init.el}.
 \vskip-3mm
 \beginexample
-(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
+(add-hook 'LaTeX-mode-hook \#'turn-on-reftex)
 (setq reftex-plug-into-AUCTeX t)
 \endexample
 
@@ -646,7 +646,7 @@ consistent.
 
 \vskip-4mm
 \beginexample
-(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
+(add-hook 'LaTeX-mode-hook \#'turn-on-reftex)
 (setq reftex-plug-into-AUCTeX t)
 \endexample
 
diff --git a/font-latex.el b/font-latex.el
index ae19c38..7ba3792 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -1090,9 +1090,7 @@ have changed."
 ;;; Faces
 
 (defface font-latex-bold-face
-  (let ((font (cond ((assq :inherit custom-face-attributes) '(:inherit bold))
-                    ((assq :weight custom-face-attributes) '(:weight bold))
-                    (t '(:bold t)))))
+  (let ((font '(:inherit bold)))
     `((((class grayscale) (background light))
        (:foreground "DimGray" ,@font))
       (((class grayscale) (background dark))
@@ -1106,9 +1104,7 @@ have changed."
   :group 'font-latex-highlighting-faces)
 
 (defface font-latex-italic-face
-  (let ((font (cond ((assq :inherit custom-face-attributes) '(:inherit italic))
-                    ((assq :slant custom-face-attributes) '(:slant italic))
-                    (t '(:italic t)))))
+  (let ((font '(:inherit italic)))
     `((((class grayscale) (background light))
        (:foreground "DimGray" ,@font))
       (((class grayscale) (background dark))
@@ -1122,9 +1118,7 @@ have changed."
   :group 'font-latex-highlighting-faces)
 
 (defface font-latex-math-face
-  (let ((font (cond ((assq :inherit custom-face-attributes)
-                     '(:inherit underline))
-                    (t '(:underline t)))))
+  (let ((font '(:inherit underline)))
     `((((class grayscale) (background light))
        (:foreground "DimGray" ,@font))
       (((class grayscale) (background dark))
@@ -1148,9 +1142,7 @@ have changed."
   :group 'font-latex-highlighting-faces)
 
 (defface font-latex-string-face
-  (let ((font (cond ((assq :inherit custom-face-attributes) '(:inherit italic))
-                    ((assq :slant custom-face-attributes) '(:slant italic))
-                    (t '(:italic t)))))
+  (let ((font '(:inherit italic)))
     `((((type tty) (class color))
        (:foreground "green"))
       (((class grayscale) (background light))
@@ -1166,9 +1158,7 @@ have changed."
   :group 'font-latex-highlighting-faces)
 
 (defface font-latex-warning-face
-  (let ((font (cond ((assq :inherit custom-face-attributes) '(:inherit bold))
-                    ((assq :weight custom-face-attributes) '(:weight bold))
-                    (t '(:bold t)))))
+  (let ((font '(:inherit bold)))
     `((((class grayscale)(background light))
        (:foreground "DimGray" ,@font))
       (((class grayscale)(background dark))
@@ -1182,10 +1172,7 @@ have changed."
   :group 'font-latex-highlighting-faces)
 
 (defface font-latex-verbatim-face
-  (let ((font (if (and (assq :inherit custom-face-attributes)
-                       (facep 'fixed-pitch))
-                  '(:inherit fixed-pitch)
-                '(:family "courier"))))
+  (let ((font '(:inherit fixed-pitch)))
     `((((class grayscale) (background light))
        (:foreground "DimGray" ,@font))
       (((class grayscale) (background dark))
@@ -1209,9 +1196,7 @@ have changed."
   :group 'font-latex-highlighting-faces)
 
 (defface font-latex-script-char-face
-  (let ((font (cond ((assq :inherit custom-face-attributes)
-                     '(:inherit underline))
-                    (t '(:underline t)))))
+  (let ((font '(:inherit underline)))
     `((((class grayscale) (background light))
        (:foreground "DarkGray" ,@font))
       (((class grayscale) (background dark))
diff --git a/latex.el b/latex.el
index 68ed0f3..fd6459c 100644
--- a/latex.el
+++ b/latex.el
@@ -1097,7 +1097,8 @@ corresponding entry."
 
 (make-variable-buffer-local 'LaTeX-label-alist)
 
-(defvar TeX-read-label-prefix) ;; Defined further below.
+(defvar TeX-read-label-prefix nil
+  "Initial input for the label in `TeX-read-label'.")
 
 (defun LaTeX-label (name &optional type no-insert)
   "Insert a label for NAME at point.
@@ -1484,7 +1485,7 @@ If SUPPRESS is non-nil, do not insert line break macro."
       (just-one-space)
       (TeX-insert-macro "\\")))
   (LaTeX-insert-ampersands
-   LaTeX-array-skipping-regexp 'LaTeX-array-count-columns))
+   LaTeX-array-skipping-regexp #'LaTeX-array-count-columns))
 
 (defun LaTeX-item-tabular* (&optional suppress)
   "Insert line break macro on the last line and suitable number of &'s.
@@ -1497,7 +1498,7 @@ If SUPPRESS is non-nil, do not insert line break macro."
       (just-one-space)
       (TeX-insert-macro "\\")))
   (LaTeX-insert-ampersands
-   LaTeX-tabular*-skipping-regexp 'LaTeX-array-count-columns))
+   LaTeX-tabular*-skipping-regexp #'LaTeX-array-count-columns))
 
 (defun LaTeX-insert-ampersands (regexp func)
   "Insert suitable number of ampersands for the current environment.
@@ -2015,9 +2016,6 @@ If OPTIONAL is non-nil, insert the resulting value as an 
optional
 argument, otherwise as a mandatory one."
   (TeX-argument-insert (eval args t) optional))
 
-(defvar TeX-read-label-prefix nil
-  "Initial input for the label in `TeX-read-label.'")
-
 (defun TeX-read-label (optional &optional prompt definition)
   "Prompt for a label completing with known labels and return it.
 This function always returns a string depending on user input:
@@ -2936,30 +2934,24 @@ Normally bound to keys \(, { and [."
 ;; Cater for `delete-selection-mode' (bug#36385)
 ;; See the header comment of delsel.el for detail.
 (put #'LaTeX-insert-left-brace 'delete-selection
-     ;; COMPATIBILITY for Emacs < 24.3
-     (if (and (= emacs-major-version 24)
-              (< emacs-minor-version 3))
-         ;; Emacs < 24.3 doesn't support a function as value of
-         ;; `delete-selection' property.
-         nil
-       (lambda ()
-         ;; Consult `delete-selection' property when
-         ;; `LaTeX-insert-left-brace' works just the same as
-         ;; `self-insert-command'.
-         (and (or (not LaTeX-electric-left-right-brace)
-                  current-prefix-arg)
-              (let ((f (get #'self-insert-command 'delete-selection)))
-                ;; If `delete-selection' property of
-                ;; `self-insert-command' is one of the predefined
-                ;; special symbols, just return itself.
-                (if (memq f '(yank supersede kill t nil))
-                    ;; FIXME: if this list of special symbols is
-                    ;; extended in future delsel.el, this discrimination
-                    ;; will become wrong.
-                    f
-                  ;; Otherwise, call it as a function and return
-                  ;; its value.
-                  (funcall f)))))))
+     (lambda ()
+       ;; Consult `delete-selection' property when
+       ;; `LaTeX-insert-left-brace' works just the same as
+       ;; `self-insert-command'.
+       (and (or (not LaTeX-electric-left-right-brace)
+                current-prefix-arg)
+            (let ((f (get #'self-insert-command 'delete-selection)))
+              ;; If `delete-selection' property of
+              ;; `self-insert-command' is one of the predefined
+              ;; special symbols, just return itself.
+              (if (memq f '(yank supersede kill t nil))
+                  ;; FIXME: if this list of special symbols is
+                  ;; extended in future delsel.el, this discrimination
+                  ;; will become wrong.
+                  f
+                ;; Otherwise, call it as a function and return
+                ;; its value.
+                (funcall f))))))
 
 (defun LaTeX-insert-corresponding-right-macro-and-brace
   (lmacro lbrace &optional optional prompt)
@@ -3689,16 +3681,25 @@ outer indentation in case of a commented line.  The 
symbols
   "Move point to the first non-whitespace character on this line.
 If it is commented and comments are formatted syntax-aware move
 point to the first non-whitespace character after the comment
-character(s).  The optional argument FORCE-TYPE can be used to
-force point being moved to the inner or outer indentation in case
-of a commented line.  The symbols 'inner and 'outer are
-recognized."
+character(s), but only if `this-command' is an actual indentation
+command.  The optional argument FORCE-TYPE can be used to force
+point being moved to the inner or outer indentation in case of a
+commented line.  The symbols 'inner and 'outer are recognized."
   (if (or (and force-type
                (eq force-type 'inner))
           (and (not force-type)
                (or (and (TeX-in-line-comment)
                         (eq major-mode 'doctex-mode))
                    (and (TeX-in-commented-line)
+                        ;; Only move after the % if we're actually
+                        ;; performing an indent command and not, e.g.,
+                        ;; our `TeX-newline-function' which will be
+                        ;; invoked automatically by
+                        ;; `electric-indent-mode' (bug#47757).
+                        (memq this-command
+                              `(,indent-line-function
+                                indent-for-tab-command
+                                LaTeX-indent-line))
                         LaTeX-syntactic-comments))))
       (progn
         (beginning-of-line)
@@ -4012,9 +4013,7 @@ space does not end a sentence, so don't break a line 
there."
   "Move to the position where the line should be broken."
   (fill-move-to-break-point linebeg)
   ;; Prevent line break between 2-byte char and 1-byte char.
-  (when (and (featurep 'mule)
-             enable-multibyte-characters
-             (or (and (not (looking-at LaTeX-nospace-between-char-regexp))
+  (when (and (or (and (not (looking-at LaTeX-nospace-between-char-regexp))
                       (TeX-looking-at-backward
                        LaTeX-nospace-between-char-regexp 1))
                  (and (not (TeX-looking-at-backward
@@ -5368,7 +5367,7 @@ MENU and CHARACTER, see `LaTeX-math-list' for details.")
 (defun LaTeX-math-initialize ()
   (let ((math (reverse (append LaTeX-math-list LaTeX-math-default)))
         (map LaTeX-math-keymap)
-        (unicode (and LaTeX-math-menu-unicode (fboundp 'decode-char))))
+        (unicode LaTeX-math-menu-unicode))
     (while math
       (let* ((entry (car math))
              (key (nth 0 entry))
@@ -5378,7 +5377,7 @@ MENU and CHARACTER, see `LaTeX-math-list' for details.")
              value menu name)
         (setq math (cdr math))
         (if (and prefix
-                 (setq prefix (decode-char 'ucs (nth 3 entry))))
+                 (setq prefix (nth 3 entry)))
             (setq prefix (concat (string prefix) " \\"))
           (setq prefix "\\"))
         (if (listp (cdr entry))
@@ -5389,8 +5388,8 @@ MENU and CHARACTER, see `LaTeX-math-list' for details.")
         (if (stringp value)
             (progn
               (setq name (intern (concat "LaTeX-math-" value)))
-              (fset name (list 'lambda (list 'arg) (list 'interactive "*P")
-                               (list 'LaTeX-math-insert value 'arg))))
+              (fset name (lambda (arg) (interactive "*P")
+                           (LaTeX-math-insert value arg))))
           (setq name value))
         (if key
             (progn
@@ -5486,7 +5485,7 @@ commands are defined:
   "Menu used in math minor mode."
   LaTeX-math-menu)
 
-(defcustom LaTeX-math-insert-function 'TeX-insert-macro
+(defcustom LaTeX-math-insert-function #'TeX-insert-macro
   "Function called with argument STRING to insert \\STRING."
   :group 'LaTeX-math
   :type 'function)
@@ -5556,8 +5555,8 @@ char."
                           (submenu   (nth 2 elt))
                           (unicode   (nth 3 elt))
                           uchar noargp)
-                      (when (and (fboundp 'decode-char) (integerp unicode))
-                        (setq uchar (decode-char 'ucs unicode)))
+                      (when (integerp unicode)
+                        (setq uchar unicode))
                       (when (listp submenu) (setq submenu (nth 1 submenu)))
                       (setq noargp
                             (not (string-match
@@ -5643,13 +5642,13 @@ environments."
 
 (defun LaTeX-environment-menu-entry (entry)
   "Create an entry for the environment menu."
-  (vector (car entry) (list 'LaTeX-environment-menu (car entry)) t))
+  (vector (car entry) (list #'LaTeX-environment-menu (car entry)) t))
 
 (defvar LaTeX-environment-modify-menu-name "Change Environment  (C-u C-c C-e)")
 
 (defun LaTeX-environment-modify-menu-entry (entry)
   "Create an entry for the change environment menu."
-  (vector (car entry) (list 'LaTeX-modify-environment (car entry)) t))
+  (vector (car entry) (list #'LaTeX-modify-environment (car entry)) t))
 
 (defun LaTeX-section-enable-symbol (level)
   "Symbol used to enable section LEVEL in the menu bar."
@@ -5671,7 +5670,7 @@ environments."
 (defun LaTeX-section-menu-entry (entry)
   "Create an ENTRY for the section menu."
   (let ((enable (LaTeX-section-enable-symbol (nth 1 entry))))
-    (vector (car entry) (list 'LaTeX-section-menu (nth 1 entry)) enable)))
+    (vector (car entry) (list #'LaTeX-section-menu (nth 1 entry)) enable)))
 
 (defcustom LaTeX-menu-max-items 25
   "Maximum number of items in the menu for LaTeX environments.
@@ -6924,7 +6923,7 @@ function would return non-nil and `(match-string 1)' 
would return
                    (regexp-opt
                     (let (out)
                       (mapc (lambda (x)
-                              (when (eq (cadr x) 'LaTeX-indent-tabular)
+                              (when (eq (cadr x) #'LaTeX-indent-tabular)
                                 (push (car x) out)))
                             LaTeX-indent-environment-list)
                       out)))))
diff --git a/multi-prompt.el b/multi-prompt.el
index 409e1d0..dacc85d 100644
--- a/multi-prompt.el
+++ b/multi-prompt.el
@@ -39,6 +39,9 @@
 (defvar multi-prompt-found nil
   "List of entries currently added during a `multi-prompt'.")
 
+;; FIXME: Modify all caller (including ones in reftex-auc.el) to use
+;; more sophisticated crm.el.  After that, we no longer need the
+;; former half of this file.
 ;;;###autoload
 (defun multi-prompt (separator
                      unique prompt table
@@ -54,8 +57,8 @@ are the arguments to `completing-read'.  See that."
         (new-map (make-sparse-keymap)))
     (set-keymap-parent new-map old-map)
     (define-key new-map separator (if require-match
-                                      'multi-prompt-next-must-match
-                                    'multi-prompt-next))
+                                      #'multi-prompt-next-must-match
+                                    #'multi-prompt-next))
     (define-key new-map "\C-?" #'multi-prompt-delete)
     (let* ((minibuffer-local-completion-map new-map)
            (minibuffer-local-must-match-map new-map)
@@ -104,18 +107,12 @@ are the arguments to `completing-read'.  See that."
 (defun multi-prompt-next ()
   (interactive)
   (throw 'multi-prompt-next
-         (cond
-          ((fboundp 'minibuffer-contents-no-properties)
-           ;; buffer-substring no longer works in emacs-21, it returns 
-           ;; the whole prompt line. Use this instead.
-           (minibuffer-contents-no-properties))
-          (t
-           (buffer-substring-no-properties (point-min) (point-max))))))
+         (minibuffer-contents-no-properties)))
          
 (defun multi-prompt-next-must-match ()
   (interactive)
   (when  (call-interactively #'minibuffer-complete)
-    (let ((content (buffer-substring-no-properties (point-min) (point-max))))
+    (let ((content (minibuffer-contents-no-properties)))
       (when (or ;; (not require-match)
                 (assoc content minibuffer-completion-table))
         (throw 'multi-prompt-next content)))))
diff --git a/preview.el b/preview.el
index e1030eb..34bed52 100644
--- a/preview.el
+++ b/preview.el
@@ -1625,7 +1625,7 @@ Fallback to :inherit and 'default implemented."
 
 (defcustom preview-auto-reveal
   '(eval (preview-arrived-via (key-binding [left]) (key-binding [right])
-                              'backward-char 'forward-char))
+                              #'backward-char #'forward-char))
   "Cause previews to open automatically when entered.
 Possibilities are:
 T autoopens,
@@ -1701,7 +1701,7 @@ to the default background in most other cases."
 ;; Emacs blinks politely when point is on an image (the tested
 ;; unrelated function was introduced at about the time image blinking
 ;; became tolerable).
-(defcustom preview-transparent-border (unless (fboundp 'posn-object-x-y) 1.5)
+(defcustom preview-transparent-border nil
   "Width of transparent border for previews in pt.
 Setting this to a numeric value will add a border of
 `preview-transparent-color' around images, and will turn
@@ -2590,8 +2590,7 @@ Those lists get concatenated together and get passed
 to the close hook."
   (preview-clearout start end tempdir)
   (let ((ov (make-overlay start end nil nil nil)))
-    (when (fboundp 'TeX-overlay-prioritize)
-      (overlay-put ov 'priority (TeX-overlay-prioritize start end)))
+    (overlay-put ov 'priority (TeX-overlay-prioritize start end))
     (overlay-put ov 'preview-map
                  (preview-make-clickable
                   nil nil nil
@@ -2674,8 +2673,7 @@ if any."
       (setcdr filename TeX-active-tempdir)
       (setq filename (list filename)))
     (let ((ov (make-overlay start end nil nil nil)))
-      (when (fboundp 'TeX-overlay-prioritize)
-        (overlay-put ov 'priority (TeX-overlay-prioritize start end)))
+      (overlay-put ov 'priority (TeX-overlay-prioritize start end))
       (overlay-put ov 'preview-map
                    (preview-make-clickable
                     nil nil nil
@@ -2843,7 +2841,7 @@ using MML mode."
   (when (catch 'badcolor
           (let ((str (car (preview-format-mml ov))))
             (if str
-                (if (eq last-command 'kill-region)
+                (if (eq last-command #'kill-region)
                     (kill-append str nil)
                   (kill-new str))
               (error "No image file available")))
@@ -2869,7 +2867,7 @@ using MML mode."
               (setq str (concat (substring str 0 (nth 0 elt))
                                 (nth 2 elt)
                                 (substring str (nth 1 elt)))))
-            (if (eq last-command 'kill-region)
+            (if (eq last-command #'kill-region)
                 (kill-append str nil)
               (kill-new str)))
           nil)
@@ -4135,7 +4133,7 @@ It returns the started process."
   (let* ((geometry (preview-get-geometry))
          (commandbuff (current-buffer))
          (pr-file (cons
-                   'TeX-active-master
+                   #'TeX-active-master
                    (file-name-nondirectory file)))
          (master (TeX-master-file))
          (master-file (expand-file-name master))
diff --git a/style/amsmath.el b/style/amsmath.el
index 6f51588..a2b7831 100644
--- a/style/amsmath.el
+++ b/style/amsmath.el
@@ -236,7 +236,7 @@ If SUPPRESS is non-nil, do not insert line break macro."
    (concat "\\(?:"
            (regexp-quote LaTeX-optop) "[tb]" (regexp-quote LaTeX-optcl)
            "\\)?")
-   'LaTeX-amsmath-alignat-number-of-ampersands))
+   #'LaTeX-amsmath-alignat-number-of-ampersands))
 
 (defun LaTeX-amsmath-alignat-number-of-ampersands (start end)
   "Return the number of ampersands to insert.
diff --git a/style/amsthm.el b/style/amsthm.el
index a009ae0..866951a 100644
--- a/style/amsthm.el
+++ b/style/amsthm.el
@@ -112,7 +112,7 @@ RefTeX users should customize or add ENVIRONMENT to
   "Move parsed results from `LaTeX-auto-amsthm-newtheorem' and
 make them available as new environments."
   (dolist (newthm (mapcar #'car (LaTeX-amsthm-newtheorem-list)))
-    (LaTeX-add-environments (list newthm 'LaTeX-amsthm-env-label))))
+    (LaTeX-add-environments (list newthm #'LaTeX-amsthm-env-label))))
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-amsthm-auto-prepare t)
 (add-hook 'TeX-auto-cleanup-hook #'LaTeX-amsthm-auto-cleanup t)
@@ -137,7 +137,7 @@ make them available as new environments."
          (let ((nthm (TeX-read-string
                       (TeX-argument-prompt nil nil "Environment"))))
            (LaTeX-add-amsthm-newtheorems nthm)
-           (LaTeX-add-environments (list nthm 'LaTeX-amsthm-env-label))
+           (LaTeX-add-environments (list nthm #'LaTeX-amsthm-env-label))
            (format "%s" nthm))))
       [ TeX-arg-environment "Numbered like" ]
       t [ (TeX-arg-eval progn (if (eq (save-excursion
@@ -155,7 +155,7 @@ make them available as new environments."
                (heading (TeX-read-string
                          (TeX-argument-prompt nil nil "Heading"))))
            (LaTeX-add-amsthm-newtheorems nthm)
-           (LaTeX-add-environments (list nthm 'LaTeX-amsthm-env-label))
+           (LaTeX-add-environments (list nthm #'LaTeX-amsthm-env-label))
            (insert (concat TeX-grop nthm TeX-grcl))
            (format "%s" heading)))))
 
diff --git a/style/biblatex.el b/style/biblatex.el
index c925c93..3e86b71 100644
--- a/style/biblatex.el
+++ b/style/biblatex.el
@@ -515,7 +515,7 @@ for citation keys."
              (list
               (car cmd)
               '(TeX-arg-conditional TeX-arg-cite-note-p (["Postnote"]) nil)
-              'TeX-arg-cite))
+              #'TeX-arg-cite))
             ((= (cdr cmd) 2)
              ;; Pre and post notes
              (list
@@ -523,7 +523,7 @@ for citation keys."
               '(TeX-arg-conditional TeX-arg-cite-note-p
                                     ([LaTeX-arg-biblatex-natbib-notes])
                                   nil)
-              'TeX-arg-cite))))
+              #'TeX-arg-cite))))
          cmds))
 
      ;; Fontification for compat macros does not go into `font-latex.el':
diff --git a/style/dinbrief.el b/style/dinbrief.el
index e676ca4..57bf773 100644
--- a/style/dinbrief.el
+++ b/style/dinbrief.el
@@ -71,8 +71,10 @@
 
 (defun LaTeX-dinbrief-style ()
   "Insert some useful packages for writing german letters."
+  ;; COMPATIBILITY for EMACS<26
   (let ((func (if (fboundp 'indent-relative-first-indent-point)
-                  'indent-relative-first-indent-point
+                  #'indent-relative-first-indent-point
+                ;; Stay away from using #' to avoid compiler warning.
                 'indent-relative-maybe)))
     (save-excursion
       (goto-char (point-min)) ; insert before \begin{document}
@@ -107,8 +109,10 @@
         (closing (TeX-read-string "Schluss: "))
         (signature (TeX-read-string "Unterschrift: "))
         (anlage (TeX-read-string "Anlagen: "))
+        ;; COMPATIBILITY for EMACS<26
         (func (if (fboundp 'indent-relative-first-indent-point)
-                  'indent-relative-first-indent-point
+                  #'indent-relative-first-indent-point
+                ;; Stay away from using #' to avoid compiler warning.
                 'indent-relative-maybe)))
     (if (string= fenster "ja")
         (progn
diff --git a/style/dk-bib.el b/style/dk-bib.el
index 21422a5..18db014 100644
--- a/style/dk-bib.el
+++ b/style/dk-bib.el
@@ -44,9 +44,7 @@
     (when (string-match "\\(ordinaldepth=\\)\\([^0-9]\\|$\\)" options)
       (while (or (< depth 0)
                  (> depth 20))
-        (setq depth (if (fboundp 'read-number)
-                        (read-number "Ordinal depth: ")
-                      (string-to-number (TeX-read-string "Ordinal depth: "))))
+        (setq depth (read-number "Ordinal depth: "))
         (when (or (< depth 0)
                   (> depth 20))
           (message "Ordinal depth must be between 0 and 20")
diff --git a/style/exam.el b/style/exam.el
index 15b7928..0ca7c63 100644
--- a/style/exam.el
+++ b/style/exam.el
@@ -121,7 +121,7 @@ Arguments NAME and TYPE are the same as for the function
                  "checkboxes" "oneparcheckboxes")))
      (dolist (env envs)
        (add-to-list 'LaTeX-item-list
-                    (cons env 'LaTeX-exam-insert-item)
+                    (cons env #'LaTeX-exam-insert-item)
                     t)))
 
    ;; Append us only once:
diff --git a/style/jurabib.el b/style/jurabib.el
index dc01954..68c02fc 100644
--- a/style/jurabib.el
+++ b/style/jurabib.el
@@ -68,19 +68,19 @@
          (cond 
           ((= (cdr cmd) 0)
            ;; No optional arguments
-           (list (car cmd) 'TeX-arg-cite))
+           (list (car cmd) #'TeX-arg-cite))
           ((= (cdr cmd) 1)
            ;; Just one optional argument, the post note
            (list
             (car cmd)
             '(TeX-arg-conditional TeX-arg-cite-note-p (["Post-note"]) nil)
-            'TeX-arg-cite))
+            #'TeX-arg-cite))
           ((= (cdr cmd) 2)
            ;; Pre and post notes
            (list
             (car cmd)
             '(TeX-arg-conditional TeX-arg-cite-note-p (natbib-note-args) nil)
-            'TeX-arg-cite))))
+            #'TeX-arg-cite))))
        citecmds))
      ;; Special cases
      (TeX-add-symbols
diff --git a/style/kpfonts.el b/style/kpfonts.el
index 09ba8a2..654378f 100644
--- a/style/kpfonts.el
+++ b/style/kpfonts.el
@@ -442,7 +442,7 @@ the sequence by initializing this variable.")
 
 (let ((math (reverse LaTeX-kpfonts-default))
       (map LaTeX-kpfonts-keymap)
-      (unicode (and LaTeX-math-menu-unicode (fboundp 'decode-char))))
+      (unicode LaTeX-math-menu-unicode))
   (while math
     (let* ((entry (car math))
            (key (nth 0 entry))
@@ -452,7 +452,7 @@ the sequence by initializing this variable.")
            value menu name)
       (setq math (cdr math))
       (setq prefix (if (and prefix
-                            (setq prefix (decode-char 'ucs (nth 3 entry))))
+                            (setq prefix (nth 3 entry)))
                        (concat (string prefix) " \\")
                      "\\"))
       (if (listp (cdr entry))
@@ -463,8 +463,8 @@ the sequence by initializing this variable.")
       (if (stringp value)
           (progn
             (setq name (intern (concat "LaTeX-kpfonts-" value)))
-            (fset name (list 'lambda (list 'arg) (list 'interactive "*P")
-                             (list 'LaTeX-math-insert value 'arg))))
+            (fset name (lambda (arg) (interactive "*P")
+                         (LaTeX-math-insert value arg))))
         (setq name value))
       (if key
           (progn
diff --git a/style/letter.el b/style/letter.el
index c51be18..a07aba5 100644
--- a/style/letter.el
+++ b/style/letter.el
@@ -102,8 +102,10 @@
         (opening (TeX-read-string "Opening: "))
         (closing (TeX-read-string "Closing: "))
         (date (TeX-read-string "Date: " (LaTeX-today)))
+        ;; COMPATIBILITY for EMACS<26
         (func (if (fboundp 'indent-relative-first-indent-point)
-                  'indent-relative-first-indent-point
+                  #'indent-relative-first-indent-point
+                ;; Stay away from using #' to avoid compiler warning.
                 'indent-relative-maybe)))
 
     (insert TeX-esc "name" TeX-grop sender TeX-grcl)
diff --git a/style/minted.el b/style/minted.el
index 9a919cc..dd4d545 100644
--- a/style/minted.el
+++ b/style/minted.el
@@ -277,7 +277,7 @@ are loaded."
            (env* (concat env "*")))
       (add-to-list 'LaTeX-auto-environment (list env))
       (add-to-list 'LaTeX-auto-environment
-                   (list env* 'LaTeX-env-args
+                   (list env* #'LaTeX-env-args
                          '(TeX-arg-key-val 
LaTeX-minted-key-val-options-local)))
       (add-to-list 'LaTeX-indent-environment-list `(,env current-indentation) 
t)
       (add-to-list 'LaTeX-indent-environment-list `(,env* current-indentation) 
t)
diff --git a/style/natbib.el b/style/natbib.el
index 5481629..ba6622a 100644
--- a/style/natbib.el
+++ b/style/natbib.el
@@ -63,19 +63,19 @@
          (cond
           ((= (cdr cmd) 0)
            ;; No optional arguments
-           (list (car cmd) 'TeX-arg-cite))
+           (list (car cmd) #'TeX-arg-cite))
           ((= (cdr cmd) 1)
            ;; Just one optional argument, the post note
            (list
             (car cmd)
             '(TeX-arg-conditional TeX-arg-cite-note-p (["Post-note"]) nil)
-            'TeX-arg-cite))
+            #'TeX-arg-cite))
           ((= (cdr cmd) 2)
            ;; Pre and post notes
            (list
             (car cmd)
             '(TeX-arg-conditional TeX-arg-cite-note-p 
([LaTeX-arg-natbib-notes]) nil)
-            'TeX-arg-cite))))
+            #'TeX-arg-cite))))
        citecmds))
 
      ;; Make an entry in TeX-complete-list
diff --git a/style/ntheorem.el b/style/ntheorem.el
index e3ab7ad..35c4e45 100644
--- a/style/ntheorem.el
+++ b/style/ntheorem.el
@@ -141,9 +141,9 @@ make them available as new environments.  Update
 `LaTeX-ntheorem-theoremstyle-list' with styles defined with
 \"\\newtheoremstyle\"."
   (dolist (newthm (mapcar #'car (LaTeX-ntheorem-newtheorem-list)))
-    (LaTeX-add-environments (list newthm 'LaTeX-ntheorem-env-label))
+    (LaTeX-add-environments (list newthm #'LaTeX-ntheorem-env-label))
     (LaTeX-add-environments (list (concat newthm "*")
-                                  'LaTeX-ntheorem-env-label)))
+                                  #'LaTeX-ntheorem-env-label)))
   (dolist (newthmstyle (LaTeX-ntheorem-newtheoremstyle-list))
     (add-to-list (make-local-variable 'LaTeX-ntheorem-theoremstyle-list)
                  newthmstyle))
@@ -189,9 +189,9 @@ make them available as new environments.  Update
          (let ((nthm (TeX-read-string
                       (TeX-argument-prompt nil nil "Environment"))))
            (LaTeX-add-ntheorem-newtheorems nthm)
-           (LaTeX-add-environments (list nthm 'LaTeX-ntheorem-env-label))
+           (LaTeX-add-environments (list nthm #'LaTeX-ntheorem-env-label))
            (LaTeX-add-environments (list (concat nthm "*")
-                                         'LaTeX-ntheorem-env-label))
+                                         #'LaTeX-ntheorem-env-label))
            (format "%s" nthm))))
       [ TeX-arg-environment "Numbered like" ]
       t [ (TeX-arg-eval progn (if (eq (save-excursion
@@ -260,9 +260,9 @@ make them available as new environments.  Update
                    "Proof"      "Beweis")))
         (dolist (elt env)
           (LaTeX-add-ntheorem-newtheorems elt)
-          (LaTeX-add-environments (list elt 'LaTeX-ntheorem-env-label))
+          (LaTeX-add-environments (list elt #'LaTeX-ntheorem-env-label))
           (LaTeX-add-environments (list (concat elt "*")
-                                        'LaTeX-ntheorem-env-label)))))
+                                        #'LaTeX-ntheorem-env-label)))))
 
     ;; 2.3.7 Framed and Boxed Theorems
     '("newframedtheorem"
@@ -271,9 +271,9 @@ make them available as new environments.  Update
          (let ((nthm (TeX-read-string
                       (TeX-argument-prompt nil nil "Environment"))))
            (LaTeX-add-ntheorem-newtheorems nthm)
-           (LaTeX-add-environments (list nthm 'LaTeX-ntheorem-env-label))
+           (LaTeX-add-environments (list nthm #'LaTeX-ntheorem-env-label))
            (LaTeX-add-environments (list (concat nthm "*")
-                                         'LaTeX-ntheorem-env-label))
+                                         #'LaTeX-ntheorem-env-label))
            (format "%s" nthm))))
       [ TeX-arg-environment "Numbered like" ]
       t [ (TeX-arg-eval progn (if (eq (save-excursion
@@ -289,9 +289,9 @@ make them available as new environments.  Update
          (let ((nthm (TeX-read-string
                       (TeX-argument-prompt nil nil "Environment"))))
            (LaTeX-add-ntheorem-newtheorems nthm)
-           (LaTeX-add-environments (list nthm 'LaTeX-ntheorem-env-label))
+           (LaTeX-add-environments (list nthm #'LaTeX-ntheorem-env-label))
            (LaTeX-add-environments (list (concat nthm "*")
-                                         'LaTeX-ntheorem-env-label))
+                                         #'LaTeX-ntheorem-env-label))
            (format "%s" nthm))))
       [ TeX-arg-environment "Numbered like" ]
       t [ (TeX-arg-eval progn (if (eq (save-excursion
diff --git a/style/pythontex.el b/style/pythontex.el
index 4c5089d..08c0033 100644
--- a/style/pythontex.el
+++ b/style/pythontex.el
@@ -243,11 +243,11 @@ a list of strings."
           (verb-envs-regexp (regexp-opt verb-envs "\\(?:")))
      (apply #'TeX-add-symbols
             (mapcar (lambda (mac)
-                      (list mac [ "Session" ] 'TeX-arg-verb-delim-or-brace))
+                      (list mac [ "Session" ] #'TeX-arg-verb-delim-or-brace))
                     verb-macs))
      (apply #'LaTeX-add-environments
             (mapcar (lambda (env)
-                      (list env 'LaTeX-env-pythontex))
+                      (list env #'LaTeX-env-pythontex))
                     verb-envs))
      ;; Filling:
      (dolist (mac verb-macs)
diff --git a/style/tcolorbox.el b/style/tcolorbox.el
index 68cd0aa..c7e7051 100644
--- a/style/tcolorbox.el
+++ b/style/tcolorbox.el
@@ -510,8 +510,8 @@ e.g. \"tcolorboxlib-raster.el\"."
                   opt (not (string= opt  "")))
              (LaTeX-add-environments
               (list box
-                    'LaTeX-env-args
-                    (vector 'TeX-arg-key-val 
'LaTeX-tcolorbox-keyval-options-local)
+                    #'LaTeX-env-args
+                    [TeX-arg-key-val LaTeX-tcolorbox-keyval-options-local]
                     (1- (string-to-number arg)))))
             (;; mandatory argument(s) only
              (and arg (not (string= arg ""))
@@ -539,7 +539,7 @@ e.g. \"tcolorboxlib-raster.el\"."
              (and arg (not (string= arg ""))
                   opt (not (string= opt  "")))
              (TeX-add-symbols (list box
-                               (vector 'TeX-arg-key-val 
'LaTeX-tcolorbox-keyval-options-local)
+                               [TeX-arg-key-val 
LaTeX-tcolorbox-keyval-options-local]
                                (1- (string-to-number arg)))))
             (;; mandatory argument(s) only
              (and arg (not (string= arg ""))
diff --git a/style/theorem.el b/style/theorem.el
index 4c3547b..d844129 100644
--- a/style/theorem.el
+++ b/style/theorem.el
@@ -114,7 +114,7 @@ RefTeX users should customize or add ENVIRONMENT to
   "Move parsed results from `LaTeX-auto-theorem-newtheorem' and
 make them available as new environments."
   (dolist (newthm (mapcar #'car (LaTeX-theorem-newtheorem-list)))
-    (LaTeX-add-environments (list newthm 'LaTeX-theorem-env-label))))
+    (LaTeX-add-environments (list newthm #'LaTeX-theorem-env-label))))
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-theorem-auto-prepare t)
 (add-hook 'TeX-auto-cleanup-hook #'LaTeX-theorem-auto-cleanup t)
@@ -136,7 +136,7 @@ make them available as new environments."
          (let ((nthm (TeX-read-string
                       (TeX-argument-prompt nil nil "Environment"))))
            (LaTeX-add-theorem-newtheorems nthm)
-           (LaTeX-add-environments (list nthm 'LaTeX-theorem-env-label))
+           (LaTeX-add-environments (list nthm #'LaTeX-theorem-env-label))
            (format "%s" nthm))))
       [ TeX-arg-environment "Numbered like" ]
       t [ (TeX-arg-eval progn (if (eq (save-excursion
diff --git a/style/xparse.el b/style/xparse.el
index 5dd4f84..b02b3f9 100644
--- a/style/xparse.el
+++ b/style/xparse.el
@@ -141,7 +141,7 @@ TYPE is one of the symobols mac or env."
                 ;; v: Use `TeX-arg-verb-delim-or-brace'
                 ((looking-at-p "v")
                  (forward-char 1)
-                 (push 'TeX-arg-verb-delim-or-brace args))
+                 (push #'TeX-arg-verb-delim-or-brace args))
                 ;; Optional arguments:
                 ;; o standard LaTeX optional in square brackets
                 ((looking-at-p "o")
@@ -150,7 +150,7 @@ TYPE is one of the symobols mac or env."
                 ;; d<token1><token2>
                 ((looking-at-p "d")
                  (re-search-forward "d\\(?:\\(.\\)\\(.\\)\\)" (+ (point) 3) t)
-                 (push (vector 'LaTeX-arg-xparse-query
+                 (push (vector #'LaTeX-arg-xparse-query
                                (match-string-no-properties 1)
                                (match-string-no-properties 2))
                        args))
@@ -163,7 +163,7 @@ TYPE is one of the symobols mac or env."
                 ((looking-at-p "D")
                  (re-search-forward "D\\(?:\\(.\\)\\(.\\)\\)" (+ (point) 3) t)
                  (forward-sexp)
-                 (push (vector 'LaTeX-arg-xparse-query
+                 (push (vector #'LaTeX-arg-xparse-query
                                (match-string-no-properties 1)
                                (match-string-no-properties 2))
                        args))
diff --git a/tests/latex/font-latex-test.el b/tests/latex/font-latex-test.el
index 577ec77..744ffdd 100644
--- a/tests/latex/font-latex-test.el
+++ b/tests/latex/font-latex-test.el
@@ -34,7 +34,7 @@
   ;; it should not stop there and return nil, but instead should
   ;; ignore them and search another occurence of $. That is the
   ;; behavior expected for MATCHER function of `font-lock-keywords'.
-  (should (let ((TeX-install-font-lock 'font-latex-setup))
+  (should (let ((TeX-install-font-lock #'font-latex-setup))
             (with-temp-buffer
               (insert "% $$$ $$$
 $a$")
@@ -46,7 +46,7 @@ $a$")
 (ert-deftest font-latex-extend-region-backwards-quotation ()
   "Test f-l-e-r-b-q doesn't extend region too eagerly."
   (with-temp-buffer
-    (let ((TeX-install-font-lock 'font-latex-setup)
+    (let ((TeX-install-font-lock #'font-latex-setup)
           (font-latex-quotes 'french)
           font-lock-beg font-lock-end)
       (LaTeX-mode)
@@ -86,7 +86,7 @@ $a$")
 (ert-deftest font-latex-general-fontification ()
   "Test general fontification in a LaTeX file."
   (with-temp-buffer
-    (let ((TeX-install-font-lock 'font-latex-setup)
+    (let ((TeX-install-font-lock #'font-latex-setup)
           (font-latex-fontify-sectioning 'color))
       (insert "\
 \\documentclass[10pt]{article}
diff --git a/tex-bar.el b/tex-bar.el
index 06f767a..49e1b3c 100644
--- a/tex-bar.el
+++ b/tex-bar.el
@@ -137,13 +137,13 @@ the argument BUTTON-ALIST in function 
`toolbarx-install-toolbar'."
   '((tex :image (lambda nil (if TeX-PDF-mode "pdftex" "tex"))
          :command (progn
                     (TeX-save-document #'TeX-master-file)
-                    (TeX-command "TeX" 'TeX-master-file -1))
+                    (TeX-command "TeX" #'TeX-master-file -1))
          :help (lambda (&rest ignored)
                  (TeX-bar-help-from-command-list "TeX")))
     (pdftex :image "pdftex"
             :command (progn
                        (TeX-save-document #'TeX-master-file)
-                       (TeX-command "PDFTeX" 'TeX-master-file -1))
+                       (TeX-command "PDFTeX" #'TeX-master-file -1))
             :help (lambda (&rest ignored)
                     (TeX-bar-help-from-command-list "PDFTeX")))
     (next-error :image "error"
@@ -151,24 +151,24 @@ the argument BUTTON-ALIST in function 
`toolbarx-install-toolbar'."
                 :enable (TeX-error-report-has-errors-p)
                 :visible (TeX-error-report-has-errors-p))
     (view :image (lambda nil (if TeX-PDF-mode "viewpdf" "viewdvi"))
-          :command (TeX-command "View" 'TeX-master-file -1)
+          :command (TeX-command "View" #'TeX-master-file -1)
           :help (lambda (&rest ignored)
                   (TeX-bar-help-from-command-list "View")))
     (file :image "dvips"
-          :command (TeX-command "File" 'TeX-master-file -1)
+          :command (TeX-command "File" #'TeX-master-file -1)
           :visible (not TeX-PDF-mode)
           :help (lambda (&rest ignored)
                   (TeX-bar-help-from-command-list "File")))
     (bibtex :image "bibtex"
-            :command (TeX-command "BibTeX" 'TeX-master-file -1)
+            :command (TeX-command "BibTeX" #'TeX-master-file -1)
             :help (lambda (&rest ignored)
                     (TeX-bar-help-from-command-list "BibTeX")))
     (clean  :image "delete"
-            :command (TeX-command "Clean" 'TeX-master-file -1)
+            :command (TeX-command "Clean" #'TeX-master-file -1)
             :help (lambda (&rest ignored)
                     (TeX-bar-help-from-command-list "Clean")))
     (spell  :image "spell"
-            :command (TeX-command "Spell" 'TeX-master-file -1)
+            :command (TeX-command "Spell" #'TeX-master-file -1)
             :help (lambda (&rest ignored)
                     (TeX-bar-help-from-command-list "Spell"))))
   ;; latex-symbols-experimental?
@@ -278,13 +278,13 @@ the argument BUTTON-ALIST in function 
`toolbarx-install-toolbar'."
   '((latex :image (lambda nil (if TeX-PDF-mode "pdftex" "tex"))
            :command (progn
                       (TeX-save-document #'TeX-master-file)
-                      (TeX-command "LaTeX" 'TeX-master-file -1))
+                      (TeX-command "LaTeX" #'TeX-master-file -1))
            :help (lambda (&rest ignored)
                    (TeX-bar-help-from-command-list "LaTeX")))
     (pdflatex :image "pdftex"
               :command (progn
                          (TeX-save-document #'TeX-master-file)
-                         (TeX-command "PDFLaTeX" 'TeX-master-file -1))
+                         (TeX-command "PDFLaTeX" #'TeX-master-file -1))
               :help (lambda (&rest ignored)
                       (TeX-bar-help-from-command-list "PDFLaTeX")))
     (next-error :image "error"
@@ -292,26 +292,26 @@ the argument BUTTON-ALIST in function 
`toolbarx-install-toolbar'."
                 :enable (TeX-error-report-has-errors-p)
                 :visible (TeX-error-report-has-errors-p))
     (view :image (lambda nil (if TeX-PDF-mode "viewpdf" "viewdvi"))
-          :command (TeX-command "View" 'TeX-master-file -1)
+          :command (TeX-command "View" #'TeX-master-file -1)
           :help (lambda (&rest ignored)
                   (TeX-bar-help-from-command-list "View")))
     (file :image "dvips"
-          :command (TeX-command "File" 'TeX-master-file -1)
+          :command (TeX-command "File" #'TeX-master-file -1)
           :visible (not TeX-PDF-mode)
           :help (lambda (&rest ignored)
                   (TeX-bar-help-from-command-list "File")))
     (bibtex :image "bibtex"
             :command (TeX-command (if LaTeX-using-Biber "Biber" "BibTeX")
-                                  'TeX-master-file -1)
+                                  #'TeX-master-file -1)
             :help (lambda (&rest ignored)
                     (TeX-bar-help-from-command-list
                      (if LaTeX-using-Biber "Biber" "BibTeX"))))
     (clean  :image "delete"
-            :command (TeX-command "Clean" 'TeX-master-file -1)
+            :command (TeX-command "Clean" #'TeX-master-file -1)
             :help (lambda (&rest ignored)
                     (TeX-bar-help-from-command-list "Clean")))
     (spell  :image "spell"
-            :command (TeX-command "Spell" 'TeX-master-file -1)
+            :command (TeX-command "Spell" #'TeX-master-file -1)
             :help (lambda (&rest ignored)
                     (TeX-bar-help-from-command-list "Spell")))
     (latex-symbols-experimental . (:alias :eval-group
diff --git a/tex-buf.el b/tex-buf.el
index f0e26bc..114ceac 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -48,13 +48,8 @@
   :type 'file)
 
 (defcustom TeX-shell-command-option
-  (cond ((memq system-type '(ms-dos emx windows-nt) )
-         (cond ((boundp 'shell-command-option)
-                shell-command-option)
-               ((boundp 'shell-command-switch)
-                shell-command-switch)
-               (t
-                "/c")))
+  (cond ((memq system-type '(ms-dos emx windows-nt))
+         shell-command-switch)
         (t                              ;Unix & EMX (Emacs 19 port to OS/2)
          "-c"))
   "Shell argument indicating that next argument is the command."
@@ -105,7 +100,7 @@ depend on it being positive instead of the entry in 
`TeX-command-list'."
   (interactive "P")
   (TeX-master-file nil nil t)  ;; call to ask if necessary
   (TeX-command (TeX-command-query #'TeX-master-file)
-               'TeX-master-file override-confirm))
+               #'TeX-master-file override-confirm))
 
 (defcustom TeX-region-extra ""
   "String to insert in the region file between the header and the text."
@@ -476,8 +471,7 @@ Do you want to select one of these engines? "
              ;; make it nil.
              (setq TeX-check-engine-list nil))))
        (TeX-engine-set engine)
-       (when (and (fboundp 'add-file-local-variable)
-                  (y-or-n-p "Do you want to remember the choice? "))
+       (when (y-or-n-p "Do you want to remember the choice? ")
          (add-file-local-variable 'TeX-engine engine)
          (save-buffer))))))
 
@@ -977,7 +971,7 @@ depending on the last command issued."
   (interactive)
   (let ((output-file (TeX-active-master (TeX-output-extension))))
     (if (file-exists-p output-file)
-        (TeX-command "View" 'TeX-active-master 0)
+        (TeX-command "View" #'TeX-active-master 0)
       (message "Output file %S does not exist." output-file))))
 
 ;;; Command Hooks
diff --git a/tex-fold.el b/tex-fold.el
index b5b19f7..ba7e9c0 100644
--- a/tex-fold.el
+++ b/tex-fold.el
@@ -455,9 +455,7 @@ Return non-nil if an item was found and folded, nil 
otherwise."
                                    (t
                                     (concat (regexp-quote TeX-esc)
                                             "\\([A-Za-z@*]+\\)"))))
-                            (if (fboundp 'match-string-no-properties)
-                                (match-string-no-properties 1)
-                              (match-string 1))))
+                            (match-string-no-properties 1)))
                (fold-list (cond ((eq type 'env) 
TeX-fold-env-spec-list-internal)
                                 ((eq type 'math)
                                  TeX-fold-math-spec-list-internal)
@@ -845,15 +843,13 @@ Remove the respective properties from the overlay OV."
                            TeX-fold-open-spots))
                    (old-ols (mapcar #'cdr (car spots))))
               (setq TeX-fold-open-spots (cdr spots))
-              (when (or (and (boundp 'disable-point-adjustment)
-                             disable-point-adjustment)
-                        (and (boundp 'global-disable-point-adjustment)
-                             global-disable-point-adjustment)
+              (when (or disable-point-adjustment
+                        global-disable-point-adjustment
                         ;; See preview.el on how to make this configurable.
                         (memq this-command
                               (list (key-binding [left]) (key-binding [right])
-                                    'backward-char 'forward-char
-                                    'mouse-set-point)))
+                                    #'backward-char #'forward-char
+                                    #'mouse-set-point)))
                 ;; Open new overlays.
                 (dolist (ol (nconc (when (and TeX-fold-unfold-around-mark
                                               mark-active)
diff --git a/tex-info.el b/tex-info.el
index 185f755..57e14c3 100644
--- a/tex-info.el
+++ b/tex-info.el
@@ -680,7 +680,7 @@ value of `Texinfo-mode-hook'."
   (set (make-local-variable 'outline-level) 'texinfo-outline-level)
 
   ;; Mostly AUCTeX stuff
-  (set (make-local-variable 'TeX-command-current) 'TeX-command-master)
+  (set (make-local-variable 'TeX-command-current) #'TeX-command-master)
 
   (setq TeX-default-extension "texi")
   (set (make-local-variable 'TeX-esc) "@")
diff --git a/tex-site.el.in b/tex-site.el.in
index ffd0c63..42d81bf 100644
--- a/tex-site.el.in
+++ b/tex-site.el.in
@@ -105,7 +105,7 @@ shared by all users of a site."
                   ;; fails on non-list elements in Emacs 21.
                   (let* ((alist (car list))
                          (tail alist)
-                         (key 'TeX-modes-set))
+                         (key #'TeX-modes-set))
                     (while tail
                       (if (and (consp (car tail))
                                (eq (car (car tail)) key))
diff --git a/tex.el b/tex.el
index dcdabf6..06f0686 100644
--- a/tex.el
+++ b/tex.el
@@ -57,6 +57,8 @@
                   nil)
 (declare-function tex--prettify-symbols-compose-p "ext:tex-mode"
                   (start end match))
+(declare-function gnuserv-start "ext:gnuserv"
+                  (&optional leave-dead) t)
 
 ;; Silence the compiler for variables:
 ;; tex.el: Variables defined somewhere in this file:
@@ -575,7 +577,7 @@ string."
                          (null TeX-source-correlate-output-page-function)
                          (eq (TeX-source-correlate-method-active) 'synctex)
                          (setq TeX-source-correlate-output-page-function
-                               'TeX-synctex-output-page))
+                               #'TeX-synctex-output-page))
                     (or (if TeX-source-correlate-output-page-function
                             (funcall 
TeX-source-correlate-output-page-function))
                         "1")))
@@ -1235,8 +1237,8 @@ viewer."
   "Run `TeX-evince-sync-view-1', which see, set up for Evince."
   (TeX-evince-sync-view-1 "gnome" "evince"))
 
-(defun TeX-xreader-sync-view ()
-  "Run `TeX-evince-sync-view-1', which see, set up for Evince."
+(defun TeX-reader-sync-view ()
+  "Run `TeX-evince-sync-view-1', which see, set up for Xreader."
   (TeX-evince-sync-view-1 "x" "reader"))
 
 (defun TeX-view-program-select-evince (de app)
@@ -1612,7 +1614,7 @@ For available TYPEs, see variable `TeX-engine'."
   :group 'TeX-command
   (TeX-engine-set (if TeX-Omega-mode 'omega 'default)))
 (defalias 'tex-omega-mode #'TeX-Omega-mode)
-(make-obsolete 'TeX-Omega-mode 'TeX-engine-set "11.86")
+(make-obsolete 'TeX-Omega-mode #'TeX-engine-set "11.86")
 (make-obsolete-variable 'TeX-Omega-mode 'TeX-engine "11.86")
 
 ;;; Forward and inverse search
@@ -1656,15 +1658,15 @@ The function should take no arguments and return the 
page numer
 as a string.")
 (make-variable-buffer-local 'TeX-source-correlate-output-page-function)
 
+(define-obsolete-variable-alias 'TeX-source-specials-view-start-server
+  'TeX-source-correlate-start-server "11.86")
+
 (defcustom TeX-source-correlate-start-server 'ask
   "Control if server should be started for inverse search."
   :type '(choice (const :tag "Always" t)
                  (const :tag "Never" nil)
                  (const :tag "Ask" ask))
   :group 'TeX-view)
-(when (fboundp 'defvaralias)
-  (defvaralias 'TeX-source-specials-view-start-server
-    'TeX-source-correlate-start-server))
 
 (defvar TeX-source-correlate-start-server-asked nil
   "Keep track if question about server start search was asked.")
@@ -1694,7 +1696,7 @@ This is the case if 
`TeX-source-correlate-start-server-flag' is non-nil."
   (when (and TeX-source-correlate-start-server-flag
              (not (TeX-source-correlate-server-enabled-p)))
     (let* ((gnuserv-p (TeX-source-correlate-gnuserv-p))
-           (start (if gnuserv-p 'gnuserv-start 'server-start)))
+           (start (if gnuserv-p #'gnuserv-start #'server-start)))
       (cond
        ;; Server should be started unconditionally
        ((eq TeX-source-correlate-start-server t)
@@ -2700,8 +2702,7 @@ are returned."
 
 (defcustom TeX-auto-private
   (list (expand-file-name TeX-auto-local
-                          (or (and (boundp 'user-emacs-directory)
-                                   (concat user-emacs-directory "auctex/"))
+                          (or (concat user-emacs-directory "auctex/")
                               "~/.emacs.d/auctex/")))
   "List of directories containing automatically generated AUCTeX style files.
 
@@ -2714,8 +2715,7 @@ These correspond to the personal TeX macros."
 
 (defcustom TeX-style-private
   (list (expand-file-name TeX-style-local
-                          (or (and (boundp 'user-emacs-directory)
-                                   (concat user-emacs-directory "auctex/"))
+                          (or (concat user-emacs-directory "auctex/")
                               "~/.emacs.d/auctex/")))
   "List of directories containing hand-generated AUCTeX style files.
 
@@ -3218,15 +3218,8 @@ Or alternatively:
                    (let ((window (get-buffer-window buf-name)))
                      (when window (delete-window window))))
                   (t
-                   (if (fboundp 'completion-in-region)
-                       (completion-in-region begin end
-                                             (all-completions symbol list nil))
-                     (message "Making completion list...")
-                     (let ((list (all-completions symbol list nil)))
-                       (with-output-to-temp-buffer buf-name
-                         (display-completion-list list)))
-                     (set-window-dedicated-p (get-buffer-window buf-name) 
'soft)
-                     (message "Making completion list...done")))))
+                   (completion-in-region begin end
+                                         (all-completions symbol list nil)))))
         (funcall (nth 1 entry))))))
 
 (defun TeX--completion-at-point ()
@@ -3611,7 +3604,7 @@ argument OPTIONAL is ignored."
 
 ;;; Font Locking
 
-(defcustom TeX-install-font-lock 'font-latex-setup
+(defcustom TeX-install-font-lock #'font-latex-setup
   "Function to call to install font lock support.
 Choose `ignore' if you don't want AUCTeX to install support for font locking."
   :group 'TeX-misc
@@ -3733,9 +3726,7 @@ The algorithm is as follows:
         "\\)*\\)\\(%+[ \t]*\\)"))
   (set (make-local-variable 'comment-end-skip) "[ \t]*\\(\\s>\\|\n\\)")
   (set (make-local-variable 'comment-use-syntax) t)
-  ;; `comment-padding' is defined here as an integer for compatibility
-  ;; reasons because older Emacsen could not cope with a string.
-  (set (make-local-variable 'comment-padding) 1)
+  (set (make-local-variable 'comment-padding) " ")
   ;; Removed as commenting in (La)TeX is done with one `%' not two
   ;; (make-local-variable 'comment-add)
   ;; (setq comment-add 1) ;default to `%%' in comment-region
@@ -3782,9 +3773,8 @@ The algorithm is as follows:
            #'TeX--prettify-symbols-compose-p)))
 
   ;; Standard Emacs completion-at-point support
-  (when (boundp 'completion-at-point-functions)
-    (add-hook 'completion-at-point-functions
-              #'TeX--completion-at-point nil t))
+  (add-hook 'completion-at-point-functions
+            #'TeX--completion-at-point nil t)
 
   ;; Let `TeX-master-file' be called after a new file was opened and
   ;; call `TeX-update-style' on any file opened.  (The addition to the
@@ -3811,6 +3801,7 @@ The algorithm is as follows:
 
 ;;; Hilighting
 
+;; FIXME: It's likely that `hilit-patterns-alist' is much obsolete.
 (if (boundp 'hilit-patterns-alist)
     (let ((latex-patterns (cdr-safe (assq 'latex-mode hilit-patterns-alist)))
           (plain-tex-patterns (cdr-safe (assq 'plain-tex-mode
@@ -4192,9 +4183,7 @@ If SKIP is not-nil, don't insert code for SKIP."
   "List of regular expressions guaranteed to match nothing.")
 
 (defvar TeX-token-char
-  (if (featurep 'mule)
-      "\\(?:[a-zA-Z]\\|\\cj\\)"
-    "[a-zA-Z]")
+  "\\(?:[a-zA-Z]\\|\\cj\\)"
   "Regexp matching a character in a TeX macro.
 
 Please use a shy group if you use a grouping construct, because
@@ -4806,7 +4795,7 @@ element to ALIST-VAR."
 
 ;;; Menu Support
 
-(defvar TeX-command-current 'TeX-command-master
+(defvar TeX-command-current #'TeX-command-master
   "Specify whether to run command on master, buffer or region.")
 ;; Function used to run external command.
 
@@ -4814,19 +4803,19 @@ element to ALIST-VAR."
   "Determine that the next command will be on the master file."
   (interactive)
   (message "Next command will be on the master file.")
-  (setq TeX-command-current 'TeX-command-master))
+  (setq TeX-command-current #'TeX-command-master))
 
 (defun TeX-command-select-buffer ()
   "Determine that the next command will be on the buffer."
   (interactive)
   (message "Next command will be on the buffer")
-  (setq TeX-command-current 'TeX-command-buffer))
+  (setq TeX-command-current #'TeX-command-buffer))
 
 (defun TeX-command-select-region ()
   "Determine that the next command will be on the region."
   (interactive)
   (message "Next command will be on the region")
-  (setq TeX-command-current 'TeX-command-region))
+  (setq TeX-command-current #'TeX-command-region))
 
 (defvar TeX-command-force nil)
 ;; If non-nil, TeX-command-query will return the value of this
@@ -4891,7 +4880,7 @@ affected.  See `TeX-electric-macro' for detail."
   :group 'TeX-macro
   :type 'boolean)
 
-(defcustom TeX-newline-function 'newline
+(defcustom TeX-newline-function #'newline
   "Function to be called upon pressing `RET'."
   :group 'TeX-indentation
   :type '(choice (const newline)
@@ -4997,15 +4986,15 @@ Brace insertion is only done if point is in a math 
construct and
    `("Command on"
      [ "Master File" TeX-command-select-master
        :keys "C-c C-c" :style radio
-       :selected (eq TeX-command-current 'TeX-command-master)
+       :selected (eq TeX-command-current #'TeX-command-master)
        :help "Commands in this menu work on the Master File"]
      [ "Buffer" TeX-command-select-buffer
        :keys "C-c C-b" :style radio
-       :selected (eq TeX-command-current 'TeX-command-buffer)
+       :selected (eq TeX-command-current #'TeX-command-buffer)
        :help "Commands in this menu work on the current buffer"]
      [ "Region" TeX-command-select-region
        :keys "C-c C-r" :style radio
-       :selected (eq TeX-command-current 'TeX-command-region)
+       :selected (eq TeX-command-current #'TeX-command-region)
        :help "Commands in this menu work on the region"]
      [ "Fix the Region" TeX-pin-region
        :active (or (if prefix-arg
@@ -5030,7 +5019,7 @@ Brace insertion is only done if point is in a math 
construct and
       :visible TeX-parse-all-errors]
      ["Error Overview" TeX-error-overview
       :help "Open an overview of errors occured in the last TeX run"
-      :visible (and TeX-parse-all-errors (fboundp 'tabulated-list-mode))]
+      :visible TeX-parse-all-errors]
      ["Quick View" TeX-view
       :help "Start a viewer without prompting"]
      "-"
@@ -5704,7 +5693,7 @@ An optional fourth (or sixth) element means always 
replace if t."
                      (string :tag "Math Suffix")))
             (option (sexp :format "Replace\n" :value t)))))
 
-(defvar TeX-font-replace-function 'TeX-font-replace
+(defvar TeX-font-replace-function #'TeX-font-replace
   "Determines the function which is called when a font should be replaced.")
 
 (defun TeX-describe-font-entry (entry)
@@ -5927,17 +5916,17 @@ sign.  With optional ARG, insert that many dollar 
signs."
           (exchange-point-and-mark))
       (cond
        ;; $...$ to $$...$$
-       ((and (eq last-command 'TeX-insert-dollar)
+       ((and (eq last-command #'TeX-insert-dollar)
              (re-search-forward "\\=\\$\\([^$][^z-a]*[^$]\\)\\$" (mark) t))
         (replace-match "$$\\1$$")
         (set-mark (match-beginning 0)))
        ;; \(...\) to \[...\]
-       ((and (eq last-command 'TeX-insert-dollar)
+       ((and (eq last-command #'TeX-insert-dollar)
              (re-search-forward "\\=\\\\(\\([^z-a]*\\)\\\\)" (mark) t))
         (replace-match "\\\\[\\1\\\\]")
         (set-mark (match-beginning 0)))
        ;; Strip \[...\] or $$...$$
-       ((and (eq last-command 'TeX-insert-dollar)
+       ((and (eq last-command #'TeX-insert-dollar)
              (or (re-search-forward "\\=\\\\\\[\\([^z-a]*\\)\\\\\\]" (mark) t)
                  (re-search-forward "\\=\\$\\$\\([^z-a]*\\)\\$\\$" (mark) t)))
         (replace-match "\\1")
@@ -5972,13 +5961,9 @@ sign.  With optional ARG, insert that many dollar signs."
   "Toggle off input method when entering math mode."
   (and TeX-math-toggle-off-input-method
        (texmathp)
-       (boundp 'current-input-method) current-input-method
+       current-input-method
        (string-match TeX-math-input-method-off-regexp current-input-method)
-       ;; inactivate-input-method is obsolete since emacs 24.3.
-       (if (fboundp 'deactivate-input-method)
-           (deactivate-input-method)
-         (with-no-warnings
-           (inactivate-input-method)))))
+       (deactivate-input-method)))
 
 ;;; Simple Commands
 
@@ -6183,7 +6168,7 @@ closing brace."
 
 Don't hesitate to report any problems or inaccurate documentation.
 
-If you don't have setup sending mail from (X)Emacs, please copy the
+If you don't have setup sending mail from Emacs, please copy the
 output buffer into your mail program, as it gives us important
 information about your AUCTeX version and AUCTeX configuration."
   (interactive)
@@ -6599,8 +6584,7 @@ error."
        (defvar ,symbol nil
          ,(format "Abbrev table for %s mode." name))
        (define-abbrev-table ',symbol nil)
-       (when (fboundp 'abbrev-table-put)
-         (abbrev-table-put ,symbol :parents (list text-mode-abbrev-table))))))
+       (abbrev-table-put ,symbol :parents (list text-mode-abbrev-table)))))
 
 
 ;;; Special provisions for other modes and libraries
@@ -6624,14 +6608,9 @@ error."
 ;; `delete-selection-mode', but when it's nil users may want to be able to
 ;; delete active region if `delete-selection-mode' is active, see bug#23177.  
We
 ;; can dynamically determine the behavior of `delete-selection' with
-;; `TeX-insert-dollar' based on the value of `TeX-electric-math'.  This
-;; dynamicity has been introduced in Emacs 24.3, for previous versions keep
-;; `TeX-insert-dollar' without this property.
-(if (or (> emacs-major-version 24)
-        (and (= emacs-major-version 24)
-             (>= emacs-minor-version 3)))
-    (put 'TeX-insert-dollar 'delete-selection
-         (lambda () (null TeX-electric-math))))
+;; `TeX-insert-dollar' based on the value of `TeX-electric-math'.
+(put 'TeX-insert-dollar 'delete-selection
+     (lambda () (null TeX-electric-math)))
 
 (defun TeX--list-of-string-p (lst)
   "Return non-nil iff `LST' is a list of strings.
diff --git a/toolbar-x.el b/toolbar-x.el
index 903701c..d95ca59 100644
--- a/toolbar-x.el
+++ b/toolbar-x.el
@@ -251,13 +251,15 @@ command, COMM is returned."
              (not app)
              comm-is-command)
         comm
-      (append '(lambda nil (interactive))
-              (when prep (list prep))
-              (when comm
-                (if comm-is-command
-                    `((call-interactively (function ,comm)))
-                  (list comm)))
-              (when app (list app))))))
+      (lambda () (interactive)
+        (let (result)
+          (when prep (setq result (eval prep t)))
+          (when comm (setq result
+                           (if comm-is-command
+                               (call-interactively comm)
+                             (eval comm t))))
+          (when app  (setq result (eval app  t)))
+          result)))))
 
 (defun toolbarx-emacs-mount-popup-menu
     (strings var type &optional title save)
@@ -1478,7 +1480,7 @@ line of buttons.  The only property supported for this 
button is
           :command undo
           :enable (and (not buffer-read-only)
                         (not (eq t buffer-undo-list))
-                        (if (eq last-command 'undo)
+                        (if (eq last-command #'undo)
                             pending-undo-list
                           (consp buffer-undo-list)))
           :help "Undo last operation"




reply via email to

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