branch: externals/auctex commit 11af8e60b1b3f66145518be9484f3fb371ccf171 Author: Mosè Giordano <m...@gnu.org> Commit: Mosè Giordano <m...@gnu.org>
Improve has-no-display-manager predicate * tex.el (TeX-view-predicate-list-bultin): For `has-no-display-manager' predicate, use the current test only for old Emacsen, otherwise employ `display-graphic-p'. Suggested by Santiago Saavedra. --- ChangeLog | 7 +++++++ tex.el | 6 +++++- 2 files changed, 12 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8d03381..74a45c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2015-11-12 Mos� Giordano <m...@gnu.org> + + * tex.el (TeX-view-predicate-list-bultin): For + `has-no-display-manager' predicate, use the current test only for + old Emacsen, otherwise employ `display-graphic-p'. Suggested by + Santiago Saavedra. + 2015-11-11 Mos� Giordano <m...@gnu.org> * tests/latex/latex-test.el (LaTeX-math-indent) diff --git a/tex.el b/tex.el index f4ecfec..ce0c344 100644 --- a/tex.el +++ b/tex.el @@ -1117,7 +1117,11 @@ all the regular expressions must match for the element to apply." (output-html (string-match "html" (TeX-output-extension))) (has-no-display-manager - (not (or window-system (getenv "DISPLAY")))) + ;; Compatibility for Emacs <= 22: older Emacsen don't have FRAME argument + ;; to `getenv', later versions have the `display-graphic-p' function. + (not (if (< emacs-major-version 23) + (or window-system (getenv "DISPLAY")) + (display-graphic-p)))) (style-pstricks (TeX-match-style "^pstricks$\\|^pst-\\|^psfrag$")) (engine-omega