[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] GNU AUCTeX branch, master, updated. bf5ac536ba17424dfbd87
From: |
Mosè Giordano |
Subject: |
[AUCTeX-diffs] GNU AUCTeX branch, master, updated. bf5ac536ba17424dfbd87effb23730b0c75d4ed1 |
Date: |
Sun, 13 Jul 2014 14:44:01 +0000 |
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 bf5ac536ba17424dfbd87effb23730b0c75d4ed1 (commit)
from 48001b9a357938e567020333af0a132a38b86e15 (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 bf5ac536ba17424dfbd87effb23730b0c75d4ed1
Author: Mosè Giordano <address@hidden>
Date: Sun Jul 13 16:42:04 2014 +0200
Fix some runtime issues in XEmacs.
* latex.el (TeX-latex-mode): Add second argument to
`local-variable-p', mandatory in XEmacs. Suggested by Ikumi
Keita.
* preview/preview.el (preview-dump-state): Ditto.
* style/biblatex.el ("biblatex"): Ditto.
* tex.el (TeX-how-many): Make the function return a number also in
XEmacs and Emacs 21. Suggested by Ikumi Keita.
diff --git a/ChangeLog b/ChangeLog
index cfcbe41..4aeeee5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2014-07-13 Mosè Giordano <address@hidden>
+
+ * latex.el (TeX-latex-mode): Add second argument to
+ `local-variable-p', mandatory in XEmacs. Suggested by Ikumi
+ Keita.
+
+ * preview/preview.el (preview-dump-state): Ditto.
+
+ * style/biblatex.el ("biblatex"): Ditto.
+
+ * tex.el (TeX-how-many): Make the function return a number also in
+ XEmacs and Emacs 21. Suggested by Ikumi Keita.
+
2014-07-12 Mosè Giordano <address@hidden>
* tex-buf.el (TeX-error-description-error): Do not use the
diff --git a/latex.el b/latex.el
index fe439e5..5ba3efb 100644
--- a/latex.el
+++ b/latex.el
@@ -5541,7 +5541,7 @@ of `LaTeX-mode-hook'."
;; button could be wrongly set.
(add-hook 'TeX-update-style-hook
(lambda ()
- (if (local-variable-p 'LaTeX-biblatex-use-Biber)
+ (if (local-variable-p 'LaTeX-biblatex-use-Biber (current-buffer))
(setq LaTeX-using-Biber LaTeX-biblatex-use-Biber))) nil t)
(TeX-run-mode-hooks 'text-mode-hook 'TeX-mode-hook 'LaTeX-mode-hook)
(TeX-set-mode-name)
diff --git a/preview/preview.el b/preview/preview.el
index 72f624d..8077af4 100644
--- a/preview/preview.el
+++ b/preview/preview.el
@@ -1,6 +1,6 @@
;;; preview.el --- embed preview LaTeX images in source buffer
-;; Copyright (C) 2001-2006, 2010, 2012 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2006, 2010-2014 Free Software Foundation, Inc.
;; Author: David Kastrup
;; Keywords: tex, wp, convenience
@@ -3554,7 +3554,7 @@ In the form of yyyy.mmdd")
(defun preview-dump-state (buffer)
(condition-case nil
(progn
- (unless (local-variable-p 'TeX-command-buffer)
+ (unless (local-variable-p 'TeX-command-buffer (current-buffer))
(setq buffer (with-current-buffer buffer (TeX-active-buffer))))
(when (bufferp buffer)
(insert "\nRun buffer contents:\n\n")
diff --git a/style/biblatex.el b/style/biblatex.el
index ff2d7d6..d5c3513 100644
--- a/style/biblatex.el
+++ b/style/biblatex.el
@@ -224,7 +224,7 @@ for citation keys."
;; the backend can be overridden by setting `LaTeX-biblatex-use-Biber' as a
;; local variable.
(setq LaTeX-using-Biber
- (if (local-variable-p 'LaTeX-biblatex-use-Biber)
+ (if (local-variable-p 'LaTeX-biblatex-use-Biber (current-buffer))
LaTeX-biblatex-use-Biber
(not (or (LaTeX-provided-package-options-member
"biblatex" "backend=bibtex")
diff --git a/tex.el b/tex.el
index db801d7..b2435e9 100644
--- a/tex.el
+++ b/tex.el
@@ -5917,12 +5917,31 @@ NAME may be a package, a command, or a document."
(defun TeX-how-many (regexp &optional rstart rend)
"Compatibily function for `how-many'.
-Supports restriction to a region where the XEmacs version doesn't."
- (save-excursion
- (save-restriction
- (narrow-to-region rstart rend)
- (goto-char (point-min))
- (how-many regexp))))
+Supports restriction to a region where the XEmacs version doesn't
+and always returns the number of matches, also in XEmacs and GNU
+Emacs 21."
+ ;; Emacs >= 22 does what we want.
+ (if (>= emacs-major-version 22)
+ (how-many regexp rstart rend)
+ ;; XEmacs and GNU Emacs 21 don't return the number of matches but only
print
+ ;; it.
+ (let ((string
+ (if (featurep 'xemacs)
+ ;; XEmacs doesn't even support restriction to a region.
+ (save-excursion
+ (save-restriction
+ (when (and (integer-or-marker-p rstart)
+ (integer-or-marker-p rend))
+ (narrow-to-region rstart rend)
+ (goto-char (point-min)))
+ (how-many regexp)))
+ (how-many regexp rstart rend))))
+ ;; Hide the message printed by `how-many'.
+ (message "")
+ ;; Select the number of occurrences and convert it to a number.
+ (if (string-match "\\([0-9]+\\).*" string)
+ (string-to-number (replace-match "\\1" nil nil string))
+ 0))))
(provide 'tex)
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 13 +++++++++++++
latex.el | 2 +-
preview/preview.el | 4 ++--
style/biblatex.el | 2 +-
tex.el | 31 +++++++++++++++++++++++++------
5 files changed, 42 insertions(+), 10 deletions(-)
hooks/post-receive
--
GNU AUCTeX
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [AUCTeX-diffs] GNU AUCTeX branch, master, updated. bf5ac536ba17424dfbd87effb23730b0c75d4ed1,
Mosè Giordano <=