[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 265/299: Fix other runtime issues in XEmacs and Emacs 21.
From: |
Stefan Monnier |
Subject: |
[elpa] 265/299: Fix other runtime issues in XEmacs and Emacs 21. |
Date: |
Sun, 02 Nov 2014 03:11:53 +0000 |
monnier pushed a commit to branch externals/auctex
in repository elpa.
commit a34b0fe9aa2d3a4d6b199b6d5df11f3b01c8e18d
Author: Mosè Giordano <address@hidden>
Date: Mon Jul 14 22:16:42 2014 +0200
Fix other runtime issues in XEmacs and Emacs 21.
* tex-buf.el (TeX-next-error): Do not pass `reparse' argument to
`next-error' in XEmacs as it is not supported.
(TeX-error-overview-frame, TeX-error-overview-buffer-name): Move
before their first use in order to prevent a runtime error in
XEmacs and GNU Emacs 21. Reported by Ikumi Keita.
(TeX-parse-TeX): Manually set `item' to nil when
`TeX-error-last-visited' is negative.
(TeX-error-description-error, TeX-error-description-warning)
(TeX-error-description-tex-said): Set to nil in XEmacs and GNU
Emacs 21. Reported by Ikumi Keita.
---
ChangeLog | 13 +++++++++
tex-buf.el | 85 ++++++++++++++++++++++++++++++++++--------------------------
2 files changed, 61 insertions(+), 37 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 4aeeee5..4162bec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2014-07-14 Mos� Giordano <address@hidden>
+
+ * tex-buf.el (TeX-next-error): Do not pass `reparse' argument to
+ `next-error' in XEmacs as it is not supported.
+ (TeX-error-overview-frame, TeX-error-overview-buffer-name): Move
+ before their first use in order to prevent a runtime error in
+ XEmacs and GNU Emacs 21. Reported by Ikumi Keita.
+ (TeX-parse-TeX): Manually set `item' to nil when
+ `TeX-error-last-visited' is negative.
+ (TeX-error-description-error, TeX-error-description-warning)
+ (TeX-error-description-tex-said): Set to nil in XEmacs and GNU
+ Emacs 21. Reported by Ikumi Keita.
+
2014-07-13 Mos� Giordano <address@hidden>
* latex.el (TeX-latex-mode): Add second argument to
diff --git a/tex-buf.el b/tex-buf.el
index 1d3c605..722afed 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -292,7 +292,9 @@ 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)))
- (next-error arg reparse)
+ (if (featurep 'xemacs)
+ (next-error arg)
+ (next-error arg reparse))
;; Force reparsing when the function is called with a universal-argument.
(if (consp arg) (setq reparse t arg nil))
@@ -315,7 +317,7 @@ This works only with TeX commands and if the
(let ((parse-function (TeX-get-parse-function)))
(if (and TeX-parse-all-errors (equal parse-function 'TeX-parse-TeX))
- ;; When `TeX-parse-all-errors' and the parsing function is
+ ;; When `TeX-parse-all-errors' is non-nil and the parsing function is
;; `TeX-parse-TeX' we can move backward in the errors.
(TeX-parse-TeX (- arg) nil)
;; XXX: moving backward in the errors hasn't yet been implemented for
@@ -324,6 +326,12 @@ This works only with TeX commands and if the
;;; Command Query
+(defvar TeX-error-overview-frame nil
+ "The frame of the error overview.")
+
+(defconst TeX-error-overview-buffer-name "*TeX errors*"
+ "Name of the buffer in which to show error list.")
+
(defun TeX-command (name file &optional override-confirm)
"Run command NAME on the file returned by calling FILE.
@@ -1547,7 +1555,10 @@ already in an Emacs buffer) and the cursor is placed at
the error."
(progn
(setq max-index (length TeX-error-list)
TeX-error-last-visited (+ (or arg 1) TeX-error-last-visited)
- item (nth TeX-error-last-visited TeX-error-list))
+ 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))
(if (< TeX-error-last-visited -1)
(setq TeX-error-last-visited -1))
(cond ((or (null item)
@@ -1895,40 +1906,46 @@ warning."
:group 'TeX-output)
(defface TeX-error-description-error
- ;; This is the same as `error' face in latest GNU Emacs versions.
- '((((class color) (min-colors 88) (background light))
- :foreground "Red1" :weight bold)
- (((class color) (min-colors 88) (background dark))
- :foreground "Pink" :weight bold)
- (((class color) (min-colors 16) (background light))
- :foreground "Red1" :weight bold)
- (((class color) (min-colors 16) (background dark))
- :foreground "Pink" :weight bold)
- (((class color) (min-colors 8))
- :foreground "red" :weight bold)
- (t (:inverse-video t :weight bold)))
+ (if (< emacs-major-version 22)
+ nil
+ ;; This is the same as `error' face in latest GNU Emacs versions.
+ '((((class color) (min-colors 88) (background light))
+ :foreground "Red1" :weight bold)
+ (((class color) (min-colors 88) (background dark))
+ :foreground "Pink" :weight bold)
+ (((class color) (min-colors 16) (background light))
+ :foreground "Red1" :weight bold)
+ (((class color) (min-colors 16) (background dark))
+ :foreground "Pink" :weight bold)
+ (((class color) (min-colors 8))
+ :foreground "red" :weight bold)
+ (t (:inverse-video t :weight bold))))
"Face for \"Error\" string in error descriptions.")
(defface TeX-error-description-warning
- ;; This is the same as `warning' face in latest GNU Emacs versions.
- '((((class color) (min-colors 16)) :foreground "DarkOrange" :weight bold)
- (((class color)) :foreground "yellow" :weight bold))
+ (if (< emacs-major-version 22)
+ nil
+ ;; This is the same as `warning' face in latest GNU Emacs versions.
+ '((((class color) (min-colors 16)) :foreground "DarkOrange" :weight bold)
+ (((class color)) :foreground "yellow" :weight bold)))
"Face for \"Warning\" string in error descriptions.")
(defface TeX-error-description-tex-said
- ;; This is the same as `font-lock-function-name-face' face in latest GNU
Emacs
- ;; versions.
- '((((class color) (min-colors 88) (background light))
- :foreground "Blue1")
- (((class color) (min-colors 88) (background dark))
- :foreground "LightSkyBlue")
- (((class color) (min-colors 16) (background light))
- :foreground "Blue")
- (((class color) (min-colors 16) (background dark))
- :foreground "LightSkyBlue")
- (((class color) (min-colors 8))
- :foreground "blue" :weight bold)
- (t (:inverse-video t :weight bold)))
+ (if (< emacs-major-version 22)
+ nil
+ ;; This is the same as `font-lock-function-name-face' face in latest GNU
+ ;; Emacs versions.
+ '((((class color) (min-colors 88) (background light))
+ :foreground "Blue1")
+ (((class color) (min-colors 88) (background dark))
+ :foreground "LightSkyBlue")
+ (((class color) (min-colors 16) (background light))
+ :foreground "Blue")
+ (((class color) (min-colors 16) (background dark))
+ :foreground "LightSkyBlue")
+ (((class color) (min-colors 8))
+ :foreground "blue" :weight bold)
+ (t (:inverse-video t :weight bold))))
"Face for \"TeX said\" string in error descriptions.")
(defface TeX-error-description-help
@@ -2428,9 +2445,6 @@ error."
(defvar TeX-error-overview-orig-window nil
"Window from which the error overview has been launched.")
-(defvar TeX-error-overview-frame nil
- "The frame of the error overview.")
-
(defcustom TeX-error-overview-setup nil
"The frame setup of the error overview.
@@ -2605,9 +2619,6 @@ forward, if negative)."
(tabulated-list-init-header)
(tabulated-list-print))
-(defconst TeX-error-overview-buffer-name "*TeX errors*"
- "Name of the buffer in which to show error list.")
-
(defcustom TeX-error-overview-frame-parameters
'((name . "TeX errors")
(title . "TeX errors")
- [elpa] 255/299: Better check for mgs., (continued)
- [elpa] 255/299: Better check for mgs., Stefan Monnier, 2014/11/01
- [elpa] 258/299: Prettify file names in error overview., Stefan Monnier, 2014/11/01
- [elpa] 259/299: Update Future Development section in manual., Stefan Monnier, 2014/11/01
- [elpa] 254/299: Simplify error finding and help displaying functions., Stefan Monnier, 2014/11/01
- [elpa] 263/299: Fix remaining XEmacs compilation issues., Stefan Monnier, 2014/11/01
- [elpa] 260/299: Improve selection of the forward/inverse search method., Stefan Monnier, 2014/11/01
- [elpa] 262/299: Fix some XEmacs compilation issues., Stefan Monnier, 2014/11/01
- [elpa] 264/299: Fix some runtime issues in XEmacs., Stefan Monnier, 2014/11/01
- [elpa] 248/299: Implement TeX-previous-error., Stefan Monnier, 2014/11/01
- [elpa] 267/299: Remove .cvsignore and tests from the release tarball., Stefan Monnier, 2014/11/01
- [elpa] 265/299: Fix other runtime issues in XEmacs and Emacs 21.,
Stefan Monnier <=
- [elpa] 269/299: Fix outline promotion/demotion., Stefan Monnier, 2014/11/01
- [elpa] 261/299: Hide some entries of the Command menu when not available., Stefan Monnier, 2014/11/01
- [elpa] 256/299: Implement error overview., Stefan Monnier, 2014/11/01
- [elpa] 271/299: Keep error overview window if View command is run., Stefan Monnier, 2014/11/01
- [elpa] 275/299: Font-lock fix for verbatim environment args., Stefan Monnier, 2014/11/01
- [elpa] 274/299: Adapt mathtools.el to latest amsmath.el changes., Stefan Monnier, 2014/11/01
- [elpa] 270/299: Manage auto insertion of labels., Stefan Monnier, 2014/11/01
- [elpa] 272/299: Rename LaTeX-auto-insert-label and document its use for sections., Stefan Monnier, 2014/11/01
- [elpa] 277/299: Change Vincent's email address in ChangeLog., Stefan Monnier, 2014/11/01
- [elpa] 268/299: Add customizable option for default date format., Stefan Monnier, 2014/11/01