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. 686366eebe9668b702b9f


From: Ikumi Keita
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 686366eebe9668b702b9f1db9859b45e0f2b4ba7
Date: Thu, 27 Jun 2019 10:23:12 -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  686366eebe9668b702b9f1db9859b45e0f2b4ba7 (commit)
      from  0a9407cceea625c587eac8958d9921751c03ccf9 (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 686366eebe9668b702b9f1db9859b45e0f2b4ba7
Author: Ikumi Keita <address@hidden>
Date:   Thu Jun 27 23:20:31 2019 +0900

    ; Add Emacs 24 compatibility to the previous commit
    
    * latex.el (LaTeX-insert-left-brace): Don't add lambda function as
    `delete-selection' property for Emacs < 24.3.

diff --git a/latex.el b/latex.el
index 760c42a..17a4462 100644
--- a/latex.el
+++ b/latex.el
@@ -2834,24 +2834,30 @@ 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
-     (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))))))
+     ;; 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)))))))
 
 (defun LaTeX-insert-corresponding-right-macro-and-brace
   (lmacro lbrace &optional optional prompt)

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

Summary of changes:
 latex.el | 42 ++++++++++++++++++++++++------------------
 1 file changed, 24 insertions(+), 18 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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