[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 4dfb98c 01/43: Remove XEmacs compatibility code
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 4dfb98c 01/43: Remove XEmacs compatibility code in tex-buf.el |
Date: |
Tue, 20 Mar 2018 11:34:05 -0400 (EDT) |
branch: externals/auctex
commit 4dfb98c5213d809648eabea51f76434a5bee8217
Author: Mosè Giordano <address@hidden>
Commit: Mosè Giordano <address@hidden>
Remove XEmacs compatibility code in tex-buf.el
* tex-buf.el (TeX-record-buffer): Always define this option.
(TeX-recenter-output-buffer):
(TeX-previous-error):
(TeX-parse-TeX): Remove code for compatibility with XEmacs.
(TeX-parse-error): Fix a bug in the regexp.
(TeX-error-overview): Remove check for Emacs version. Now this works in all
supported versions.
---
tex-buf.el | 159 +++++++++++++++++++++++++++----------------------------------
1 file changed, 70 insertions(+), 89 deletions(-)
diff --git a/tex-buf.el b/tex-buf.el
index f458651..a32eb2a 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -202,16 +202,12 @@ depend on it being positive instead of the entry in
`TeX-command-list'."
(TeX-command-region-end (point-max)))
(TeX-command-region override-confirm)))
-(unless (featurep 'xemacs)
- ;; This variable is not defined in XEmacs because XEmacs' version of
- ;; `pop-to-buffer' doesn't support the optional NORECORD argument. In
- ;; XEmacs, the third arg is ON-FRAME (Emacs: NORECORD).
- (defcustom TeX-record-buffer nil
- "Whether to record buffer names of generated TeX buffers.
+(defcustom TeX-record-buffer nil
+ "Whether to record buffer names of generated TeX buffers.
When non-nil, these buffers are put at the front of the list of
recently selected ones."
- :group 'TeX-command
- :type 'boolean))
+ :group 'TeX-command
+ :type 'boolean)
(defun TeX-pop-to-buffer (buffer &optional other-window norecord)
"Compatibility wrapper for `pop-to-buffer'.
@@ -230,14 +226,8 @@ This uses the function `display-buffer' as a subroutine;
see the documentation
of `display-buffer' for additional customization information.
Optional third arg NORECORD non-nil means do not put this buffer
-at the front of the list of recently selected ones.
-
-NORECORD is ignored in XEmacs."
- ;; Make sure not to use third arg in XEmacs. In XEmacs, the third arg is
- ;; ON-FRAME (Emacs: NORECORD), so we set it to nil.
- (pop-to-buffer buffer other-window (and norecord
- (boundp 'TeX-record-buffer)
- TeX-record-buffer)))
+at the front of the list of recently selected ones."
+ (pop-to-buffer buffer other-window (and norecord TeX-record-buffer)))
(defun TeX-recenter-output-buffer (line)
"Redisplay buffer of TeX job output so that most recent output can be seen.
@@ -319,9 +309,7 @@ message buffer and start at the first error."
(if (or (null (TeX-active-buffer))
(eq 'compilation-mode (with-current-buffer TeX-command-buffer
major-mode)))
- (if (featurep 'xemacs)
- (next-error arg)
- (next-error arg reparse))
+ (next-error arg reparse)
;; Force reparsing when the function is called with a universal-argument.
(if (consp arg) (setq reparse t arg nil))
@@ -2380,10 +2368,7 @@ already in an Emacs buffer) and the cursor is placed at
the error."
(if (> arg 0)
(1+ TeX-error-last-visited)
(1- TeX-error-last-visited))
- item (if (natnump TeX-error-last-visited)
- (nth TeX-error-last-visited TeX-error-list)
- ;; XEmacs doesn't support `nth' with a negative
index.
- nil))
+ item (nth TeX-error-last-visited TeX-error-list))
;; Increase or decrease `arg' only if the warning isn't to be
;; skipped.
(unless (TeX-error-list-skip-warning-p (nth 0 item) (nth 10 item))
@@ -2547,10 +2532,8 @@ Return non-nil if an error or warning is found."
;; Polish `file' string
(setq file
(let ((string file))
- ;; Trim whitespaces at the front. XXX: XEmacs doesn't
- ;; support character classes in regexps, like "[:space:]".
(setq string
- (if (string-match "\\'[ \t\n\r]*" string)
+ (if (string-match "\\`[ \t\n\r]+" string)
(replace-match "" t t string)
string))
;; Sometimes `file' is something like
@@ -3690,70 +3673,68 @@ forward, if negative)."
"Show an overview of the errors occurred in the last TeX run."
(interactive)
;; Check requirements before start.
- (if (fboundp 'tabulated-list-mode)
- (if (setq TeX-error-overview-active-buffer (TeX-active-buffer))
- ;; `TeX-error-overview-list-entries' is going to be used only as value
- ;; of `tabulated-list-entries' in `TeX-error-overview-mode'. In
- ;; principle, we don't need `TeX-error-overview-list-entries', but
- ;; `tabulated-list-entries' is buffer-local and we need the list of
- ;; entries before creating the error overview buffer in order to
- ;; decide whether we need to show anything.
- (if (setq TeX-error-overview-list-entries
- (TeX-error-overview-make-entries
- (TeX-master-directory)))
- (progn
- (setq TeX-error-overview-orig-window (selected-window)
- TeX-error-overview-orig-frame
- (window-frame TeX-error-overview-orig-window))
- ;; Create the error overview buffer. This is
- ;; automatically killed before running TeX commands, so if
- ;; exists it is up-to-date and doesn't need to be
- ;; re-created.
- (unless (get-buffer TeX-error-overview-buffer-name)
- (with-current-buffer
- (get-buffer-create TeX-error-overview-buffer-name)
- (TeX-error-overview-mode)))
- ;; Move point to the line associated to the last visited
- ;; error.
- (with-current-buffer TeX-error-overview-buffer-name
- (goto-char (point-min))
- (forward-line (with-current-buffer
- TeX-error-overview-active-buffer
- TeX-error-last-visited))
- ;; Create a new frame for the error overview or display the
- ;; buffer in the same frame, depending on the setup.
- (if (TeX-error-overview-setup)
- (if (frame-live-p TeX-error-overview-frame)
- ;; Do not create a duplicate frame if there is
- ;; already one, just select it.
- (select-frame-set-input-focus
- TeX-error-overview-frame)
- ;; Create a new frame and store its name.
- (select-frame
- (setq TeX-error-overview-frame
- (make-frame
- TeX-error-overview-frame-parameters)))
- (set-window-buffer (selected-window)
- TeX-error-overview-buffer-name)
- (set-window-dedicated-p (selected-window) t))
- (TeX-pop-to-buffer TeX-error-overview-buffer-name))))
- (error (concat "No error or warning to show"
- ;; Suggest to display warnings and bad boxes with the
- ;; appropriate key-bindings if there are such
- ;; messages in the output buffer. Rationale of the
- ;; test: `TeX-error-overview-list-entries' is nil,
- ;; but if `TeX-error-list' is not nil it means that
- ;; there are hidden warnings/bad boxes.
- (when (TeX-process-get-variable (TeX-active-master)
- 'TeX-error-list)
- (format ". Type `%s' and `%s' to display \
+ (if (setq TeX-error-overview-active-buffer (TeX-active-buffer))
+ ;; `TeX-error-overview-list-entries' is going to be used only as value
+ ;; of `tabulated-list-entries' in `TeX-error-overview-mode'. In
+ ;; principle, we don't need `TeX-error-overview-list-entries', but
+ ;; `tabulated-list-entries' is buffer-local and we need the list of
+ ;; entries before creating the error overview buffer in order to
+ ;; decide whether we need to show anything.
+ (if (setq TeX-error-overview-list-entries
+ (TeX-error-overview-make-entries
+ (TeX-master-directory)))
+ (progn
+ (setq TeX-error-overview-orig-window (selected-window)
+ TeX-error-overview-orig-frame
+ (window-frame TeX-error-overview-orig-window))
+ ;; Create the error overview buffer. This is
+ ;; automatically killed before running TeX commands, so if
+ ;; exists it is up-to-date and doesn't need to be
+ ;; re-created.
+ (unless (get-buffer TeX-error-overview-buffer-name)
+ (with-current-buffer
+ (get-buffer-create TeX-error-overview-buffer-name)
+ (TeX-error-overview-mode)))
+ ;; Move point to the line associated to the last visited
+ ;; error.
+ (with-current-buffer TeX-error-overview-buffer-name
+ (goto-char (point-min))
+ (forward-line (with-current-buffer
+ TeX-error-overview-active-buffer
+ TeX-error-last-visited))
+ ;; Create a new frame for the error overview or display the
+ ;; buffer in the same frame, depending on the setup.
+ (if (TeX-error-overview-setup)
+ (if (frame-live-p TeX-error-overview-frame)
+ ;; Do not create a duplicate frame if there is
+ ;; already one, just select it.
+ (select-frame-set-input-focus
+ TeX-error-overview-frame)
+ ;; Create a new frame and store its name.
+ (select-frame
+ (setq TeX-error-overview-frame
+ (make-frame
+ TeX-error-overview-frame-parameters)))
+ (set-window-buffer (selected-window)
+ TeX-error-overview-buffer-name)
+ (set-window-dedicated-p (selected-window) t))
+ (TeX-pop-to-buffer TeX-error-overview-buffer-name))))
+ (error (concat "No error or warning to show"
+ ;; Suggest to display warnings and bad boxes with the
+ ;; appropriate key-bindings if there are such
+ ;; messages in the output buffer. Rationale of the
+ ;; test: `TeX-error-overview-list-entries' is nil,
+ ;; but if `TeX-error-list' is not nil it means that
+ ;; there are hidden warnings/bad boxes.
+ (when (TeX-process-get-variable (TeX-active-master)
+ 'TeX-error-list)
+ (format ". Type `%s' and `%s' to display \
warnings and bad boxes"
- (substitute-command-keys
-
"\\<TeX-mode-map>\\[TeX-toggle-debug-warnings]")
- (substitute-command-keys
-
"\\<TeX-mode-map>\\[TeX-toggle-debug-bad-boxes]"))))))
- (error "No process for this document"))
- (error "Error overview is available only in Emacs 24 or later")))
+ (substitute-command-keys
+
"\\<TeX-mode-map>\\[TeX-toggle-debug-warnings]")
+ (substitute-command-keys
+
"\\<TeX-mode-map>\\[TeX-toggle-debug-bad-boxes]"))))))
+ (error "No process for this document")))
;;; Output mode
- [elpa] externals/auctex 8779f2d 33/43: * style/babel.el (LaTeX-babel-active-languages): Use `cl-pushnew'., (continued)
- [elpa] externals/auctex 8779f2d 33/43: * style/babel.el (LaTeX-babel-active-languages): Use `cl-pushnew'., Tassilo Horn, 2018/03/20
- [elpa] externals/auctex c1f04df 41/43: * style/amsmath.el ("amsmath"): Correct \cfrac spec., Tassilo Horn, 2018/03/20
- [elpa] externals/auctex 430025d 20/43: Remove compatibility code for XEmacs in toolbar-x.el, Tassilo Horn, 2018/03/20
- [elpa] externals/auctex b292942 28/43: Remove some obsolete functions, Tassilo Horn, 2018/03/20
- [elpa] externals/auctex ba79584 32/43: Replace cl with cl-lib in other files, Tassilo Horn, 2018/03/20
- [elpa] externals/auctex 3d08a92 22/43: Restore some code erroneously removed from font-latex.el, Tassilo Horn, 2018/03/20
- [elpa] externals/auctex e769c3c 25/43: Make sure `process-environment' is recovered after temporal setenv, Tassilo Horn, 2018/03/20
- [elpa] externals/auctex 3e57fbe 26/43: ; * texmathp.el: Update comment header., Tassilo Horn, 2018/03/20
- [elpa] externals/auctex 06f704f 31/43: Explicitly require Emacs 24, Tassilo Horn, 2018/03/20
- [elpa] externals/auctex bd21b34 17/43: Remove code for compatibility with very old emacsens in bib-cite.el, Tassilo Horn, 2018/03/20
- [elpa] externals/auctex 4dfb98c 01/43: Remove XEmacs compatibility code in tex-buf.el,
Tassilo Horn <=
- [elpa] externals/auctex 73cd17c 11/43: Add fontification for some core macros, Tassilo Horn, 2018/03/20
- [elpa] externals/auctex 688fae2 37/43: Remove cl from AUCTeX, Tassilo Horn, 2018/03/20
- [elpa] externals/auctex 4106f92 24/43: Add fontification for some core macros, Tassilo Horn, 2018/03/20
- [elpa] externals/auctex 8d2e9db 38/43: Add new function `TeX-arg-verb-delim-or-brace', Tassilo Horn, 2018/03/20
- [elpa] externals/auctex 2d35adf 12/43: Update style/bidi.el to package version 31.7, Tassilo Horn, 2018/03/20
- [elpa] externals/auctex ed54fb1 36/43: Refine how we setup flymake backend function, Tassilo Horn, 2018/03/20
- [elpa] externals/auctex fad256b 34/43: * Makefile.in (AUCSRC): Add new file latex-flymake.el., Tassilo Horn, 2018/03/20
- [elpa] externals/auctex 085a310 29/43: Replace cl with cl-lib, Tassilo Horn, 2018/03/20
- [elpa] externals/auctex 0011b68 43/43: Merge from master, Tassilo Horn, 2018/03/20
- [elpa] externals/auctex d563566 42/43: Merge branch 'master' into externals/auctex, Tassilo Horn, 2018/03/20