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. e625dc05ea31846ee0aaf


From: Ikumi Keita
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. e625dc05ea31846ee0aaffde7104602bea22b581
Date: Thu, 24 Feb 2022 05:56:49 -0500 (EST)

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  e625dc05ea31846ee0aaffde7104602bea22b581 (commit)
      from  34befcc17649fd6615fd4ef8756fb78705f7fe55 (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 e625dc05ea31846ee0aaffde7104602bea22b581
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Date:   Fri Oct 22 22:28:37 2021 +0900

    Improve keymap handling
    
    * latex.el (LaTeX-mode-map):
    (LaTeX-common-initialization):
    * tex.el (VirTeX-common-initialization):
    (TeX-mode-map):
    Bind narrowing command just once.
    * latex.el (LaTeX-mode-map,LaTeX-common-initialization): Use
    `beginning-of-defun-function' and `end-of-defun-function' instead of
    overriding bindings of C-M-a and C-M-e.
    * preview.el.in (preview-mode-setup):
    (LaTeX-preview-setup):
    Bind preview tool button just once.

diff --git a/latex.el b/latex.el
index 06627c4b..27c865a4 100644
--- a/latex.el
+++ b/latex.el
@@ -6000,8 +6000,10 @@ environments."
     ;; (define-key map "\eq"     'LaTeX-fill-paragraph) ;*** Alias
     ;; This key is now used by Emacs for face settings.
     ;; (define-key map "\eg"     'LaTeX-fill-region) ;*** Alias
-    (define-key map "\e\C-e"  #'LaTeX-find-matching-end)
-    (define-key map "\e\C-a"  #'LaTeX-find-matching-begin)
+    ;; We now set `beginning-of-defun-function' and
+    ;; `end-of-defun-function' instead.
+    ;; (define-key map "\e\C-e"  #'LaTeX-find-matching-end)
+    ;; (define-key map "\e\C-a"  #'LaTeX-find-matching-begin)
 
     (define-key map "\C-c\C-q\C-p" #'LaTeX-fill-paragraph)
     (define-key map "\C-c\C-q\C-r" #'LaTeX-fill-region)
@@ -6027,6 +6029,8 @@ environments."
     (define-key map "(" #'LaTeX-insert-left-brace)
     (define-key map "{" #'LaTeX-insert-left-brace)
     (define-key map "[" #'LaTeX-insert-left-brace)
+
+    (define-key map "\C-xne" #'LaTeX-narrow-to-environment)
     map)
   "Keymap used in `LaTeX-mode'.")
 
@@ -7047,6 +7051,9 @@ function would return non-nil and `(match-string 1)' 
would return
   (set (make-local-variable 'TeX-search-files-type-alist)
        LaTeX-search-files-type-alist)
 
+  (setq-local beginning-of-defun-function #'LaTeX-find-matching-begin
+              end-of-defun-function       #'LaTeX-find-matching-end)
+
   (set (make-local-variable 'LaTeX-item-list) '(("description" . 
LaTeX-item-argument)
                                                 ("thebibliography" . 
LaTeX-item-bib)
                                                 ("array" . LaTeX-item-array)
@@ -7654,8 +7661,6 @@ function would return non-nil and `(match-string 1)' 
would return
 
   (use-local-map LaTeX-mode-map)
 
-  (define-key LaTeX-mode-map "\C-xne" #'LaTeX-narrow-to-environment)
-
   ;; Initialization of `add-log-current-defun-function':
   (set (make-local-variable 'add-log-current-defun-function)
        #'TeX-current-defun-name)
diff --git a/preview.el.in b/preview.el.in
index 9dda6582..70c97988 100644
--- a/preview.el.in
+++ b/preview.el.in
@@ -3062,14 +3062,6 @@ pp")
        #'desktop-buffer-preview-misc-data)
   (add-hook 'pre-command-hook #'preview-mark-point nil t)
   (add-hook 'post-command-hook #'preview-move-point nil t)
-  (unless preview-tb-icon
-    (setq preview-tb-icon (preview-filter-specs preview-tb-icon-specs)))
-  (when preview-tb-icon
-    (define-key LaTeX-mode-map [tool-bar preview]
-      `(menu-item "Preview at point" preview-at-point
-                  :image ,preview-tb-icon
-                  :help "Preview on/off at point"
-                  :vert-only t)))
   (when buffer-file-name
     (let* ((filename (expand-file-name buffer-file-name))
            format-cons)
@@ -3127,6 +3119,14 @@ to add the preview functionality."
         ["Report Bug" preview-report-bug]))
     (if (eq major-mode 'latex-mode)
         (preview-mode-setup))
+    (unless preview-tb-icon
+      (setq preview-tb-icon (preview-filter-specs preview-tb-icon-specs)))
+    (when preview-tb-icon
+      (define-key LaTeX-mode-map [tool-bar preview]
+        `(menu-item "Preview at point" preview-at-point
+                    :image ,preview-tb-icon
+                    :help "Preview on/off at point"
+                    :vert-only t)))
     (if (boundp 'desktop-buffer-misc)
         (preview-buffer-restore desktop-buffer-misc))))
 
diff --git a/tex.el b/tex.el
index e3f4d118..eeca1aec 100644
--- a/tex.el
+++ b/tex.el
@@ -3809,8 +3809,6 @@ The algorithm is as follows:
   ;; we enter TeX mode the first time.
   (add-hook 'write-contents-functions #'TeX-safe-auto-write nil t)
 
-  (define-key TeX-mode-map "\C-xng" #'TeX-narrow-to-group)
-
   ;; Minor modes
   (when TeX-source-correlate-mode
     (TeX-source-correlate-mode 1))
@@ -5024,6 +5022,8 @@ Brace insertion is only done if point is in a math 
construct and
 
     ;; Multifile
     (define-key map "\C-c_" #'TeX-master-file-ask)  ;*** temporary
+
+    (define-key map "\C-xng" #'TeX-narrow-to-group)
     map)
   "Keymap for common TeX and LaTeX commands.")
 

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

Summary of changes:
 latex.el      | 13 +++++++++----
 preview.el.in | 16 ++++++++--------
 tex.el        |  4 ++--
 3 files changed, 19 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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