auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 39699a711d7101442c43a


From: Ikumi Keita
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 39699a711d7101442c43a849060e77bf614bbb25
Date: Mon, 5 Apr 2021 10:53:51 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
       via  39699a711d7101442c43a849060e77bf614bbb25 (commit)
       via  b587fdbeb82f48831fd1a27d6807a2d052003bc6 (commit)
       via  7ba3caa2e199be4d0af96566636e4e0b3b6c8693 (commit)
      from  65b8b29a279e3a99297f3fe552d2ed14b9050e1c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 39699a711d7101442c43a849060e77bf614bbb25
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Date:   Thu Apr 1 18:07:36 2021 +0900

    Simplify conditionals evaluating to constant
    
    * font-latex.el (font-latex-bold-face, font-latex-italic-face)
    (font-latex-math-face, font-latex-string-face)
    (font-latex-warning-face, font-latex-verbatim-face)
    (font-latex-script-char-face):
    All supported emacsens support :inherit attribute for face and
    have `fixed-pitch' basic face.

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))

commit b587fdbeb82f48831fd1a27d6807a2d052003bc6
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Date:   Sun Mar 28 03:26:16 2021 +0900

    Resolve constant fboundp/boundp/featurep
    
    * bib-cite.el (bib-apropos-keyword-at-point):
    * context.el (ConTeXt-menu-update)
    (ConTeXt-mode-common-initialization):
    * latex.el (LaTeX-math-initialize)
    (LaTeX-fill-move-to-break-point):
    * multi-prompt.el (multi-prompt-next):
    * preview.el.in (preview-transparent-border)
    (preview-place-preview, preview-reinstate-preview):
    * style/kpfonts.el (math):
    * style/dk-bib.el (LaTeX-dk-bib-package-options):
    * tex-buf.el (TeX-shell-command-option, TeX-check-engine):
    * tex-fold.el (TeX-fold-item, TeX-fold-post-command):
    * tex.el (TeX-source-specials-view-start-server)
    (TeX-auto-private, TeX-style-private, TeX-complete-symbol)
    (VirTeX-common-initialization, TeX-token-char)
    (TeX-mode-specific-command-menu-entries)
    (TeX-math-input-method-off, TeX-abbrev-mode-setup):
    Simplify conditionals containing `fboundp', `boundp' and `featurep'
    which evaluate to constant.
    
    * latex.el (LaTeX-math-initialize, LaTeX-fold-math-spec-list):
    Simplify by not using `decode-char'.  Now that emacs is unicode based,
    (decode-char 'ucs ARG) is trivial operation which just returns ARG.
    Code point in ucs is the same as emacs char.
    
    * multi-prompt (multi-prompt): Use #' to quote function names.
    (multi-prompt-next-must-match): Use
    `minibuffer-contents-no-properties' instead of
    `buffer-substring-no-properties'.

diff --git a/bib-cite.el b/bib-cite.el
index 25ca90d..465f18f 100644
--- a/bib-cite.el
+++ b/bib-cite.el
@@ -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/latex.el b/latex.el
index 1c3b213..5ce3a02 100644
--- a/latex.el
+++ b/latex.el
@@ -4006,9 +4006,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
@@ -5362,7 +5360,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))
@@ -5372,7 +5370,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))
@@ -5550,8 +5548,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
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.in b/preview.el.in
index 79dbfe2..d848431 100644
--- a/preview.el.in
+++ b/preview.el.in
@@ -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
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/kpfonts.el b/style/kpfonts.el
index 6483b2e..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))
diff --git a/tex-buf.el b/tex-buf.el
index 96fab0a..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."
@@ -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))))))
 
diff --git a/tex-fold.el b/tex-fold.el
index 963690a..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,10 +843,8 @@ 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])
diff --git a/tex.el b/tex.el
index 7a7ba9b..f596737 100644
--- a/tex.el
+++ b/tex.el
@@ -1658,15 +1658,14 @@ 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)
 (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.")
@@ -2702,8 +2701,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.
 
@@ -2716,8 +2714,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.
 
@@ -3220,15 +3217,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 ()
@@ -3782,9 +3772,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 +3800,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 +4182,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
@@ -5030,7 +5018,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"]
      "-"
@@ -5972,7 +5960,7 @@ 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)
        (deactivate-input-method)))
 
@@ -6595,8 +6583,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

commit 7ba3caa2e199be4d0af96566636e4e0b3b6c8693
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Date:   Sun Mar 28 00:53:55 2021 +0900

    Remove compatibility code for Emacs<24.3
    
    * latex.el (LaTeX-insert-left-brace):
    * tex.el (TeX-insert-dollar):
    Simplify the property `delete-selection-mode'.
    (VirTeX-common-initialization): Use " " for `comment-padding'.
    (TeX-math-input-method-off): Never use `inactivate-input-method'.

diff --git a/latex.el b/latex.el
index 5311a30..1c3b213 100644
--- a/latex.el
+++ b/latex.el
@@ -2936,30 +2936,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)
diff --git a/tex.el b/tex.el
index d68dfb4..7a7ba9b 100644
--- a/tex.el
+++ b/tex.el
@@ -3735,9 +3735,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
@@ -5976,11 +5974,7 @@ sign.  With optional ARG, insert that many dollar signs."
        (texmathp)
        (boundp '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
 
@@ -6626,14 +6620,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.

-----------------------------------------------------------------------

Summary of changes:
 bib-cite.el      |  4 +---
 context.el       |  3 ---
 font-latex.el    | 29 +++++++--------------------
 latex.el         | 54 ++++++++++++++++++++++----------------------------
 multi-prompt.el  | 17 +++++++---------
 preview.el.in    |  8 +++-----
 style/dk-bib.el  |  4 +---
 style/kpfonts.el |  4 ++--
 tex-buf.el       | 12 +++---------
 tex-fold.el      | 10 +++-------
 tex.el           | 60 +++++++++++++++++---------------------------------------
 11 files changed, 68 insertions(+), 137 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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