branch: externals/auctex commit cc9c060a47f014dbada65e3c90ab74c2a234251d Author: Mosè Giordano <m...@gnu.org> Commit: Mosè Giordano <m...@gnu.org>
Fix compatibility with Emacs < 24. * tex.el (TeX-source-correlate-handle-TeX-region): Replace `file-name-base', introduced in GNU Emacs 24, with `file-name-sans-extension'+`file-name-nondirectory'. --- ChangeLog | 6 ++++++ tex.el | 3 ++- 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index c641f53..0213b41 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2015-02-06 Mos� Giordano <m...@gnu.org> + + * tex.el (TeX-source-correlate-handle-TeX-region): Replace + `file-name-base', introduced in GNU Emacs 24, with + `file-name-sans-extension'+`file-name-nondirectory'. + 2015-02-06 Tassilo Horn <t...@gnu.org> * tex.el (TeX-source-correlate-handle-TeX-region): New function. diff --git a/tex.el b/tex.el index 2a00d5b..a59d16a 100644 --- a/tex.el +++ b/tex.el @@ -1621,7 +1621,8 @@ You could use this for unusual mouse bindings.") That is, if FILE is `TeX-region', update FILE to the real tex file and LINE to (+ LINE offset-of-region). Else, return the list of arguments unchanged." - (if (string-equal TeX-region (file-name-base file)) + (if (string-equal TeX-region (file-name-sans-extension + (file-name-nondirectory file))) (with-current-buffer (or (find-buffer-visiting file) (find-file-noselect file)) (goto-char 0)