[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] [elpa] externals/auctex e625dc05ea 01/60: Improve keymap
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] [elpa] externals/auctex e625dc05ea 01/60: Improve keymap handling |
Date: |
Fri, 8 Apr 2022 11:52:45 -0400 (EDT) |
branch: externals/auctex
commit e625dc05ea31846ee0aaffde7104602bea22b581
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Commit: Ikumi Keita <ikumi@ikumi.que.jp>
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.
---
latex.el | 13 +++++++++----
preview.el.in | 16 ++++++++--------
tex.el | 4 ++--
3 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/latex.el b/latex.el
index 06627c4bdb..27c865a420 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 9dda6582aa..70c9798830 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 e3f4d118e7..eeca1aecae 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.")
- [AUCTeX-diffs] [elpa] externals/auctex updated (8ff369bd92 -> 03ed9004cd), Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 90b1803b02 10/60: Use DEFAULT argument in latex.el where appropriate, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex e625dc05ea 01/60: Improve keymap handling,
Tassilo Horn <=
- [AUCTeX-diffs] [elpa] externals/auctex 0847db39c9 03/60: Improve file query in style/ltxtable.el, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 7119e9b58c 14/60: ; Fix tests relying on font-lock has put syntax properties already, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 3e95554c27 19/60: Reduce code duplication in style/sidecap.el, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 163dcb75bd 02/60: Fix label insertion at env. insertion with active region (bug#28382), Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex f464242eab 29/60: Enable indent by square bracket, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex f686fbca6d 16/60: Add new test, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex e37c7a8b39 31/60: Revise documentation about simultaneous process, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 844e758a47 07/60: Improve indent in tabular-like environments, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 0e0551126d 17/60: * doc/changes.texi: Document switch from initial input to default., Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex ab3bfaf103 13/60: Don't use obsolete font-lock-syntactic-keywords, Tassilo Horn, 2022/04/08