emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/auctex 11af8e6 20/26: Improve has-no-display-manager pr


From: Tassilo Horn
Subject: [elpa] externals/auctex 11af8e6 20/26: Improve has-no-display-manager predicate
Date: Fri, 13 Nov 2015 17:00:39 +0000

branch: externals/auctex
commit 11af8e60b1b3f66145518be9484f3fb371ccf171
Author: Mosè Giordano <address@hidden>
Commit: Mosè Giordano <address@hidden>

    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  <address@hidden>
+
+       * 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  <address@hidden>
 
        * 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]