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

face-spec window-system definition for tty's



There are faces that seem to be using a deprecated version of the face
spec definition. At this point, it doesn't seem to cause trouble, but it
might be prudent to patch before it does.

The face spec can include a list of conditions for when to apply a face
based upon its DISPLAY characteristics. One of those conditions is the
DISPLAY 'type', meaning whether it is a character-only tty or one form
of (window-system). I don't know the emacs history for the list of valid
options, but the current (v25.2) documentation says that tty's should be
listed as `nil', not tty.

As an aside, the reason I came across this was that I use emacs-w3m in a
tty and have become annoyed that face w3m-italic was displaying as
underlined, as opposed to maybe bold. Anyone else share that annoyance
at the default? For me, the fix was to add to my personal
`my-w3m-mode-hook' function the line:

 #+BEGIN_SRC emacs-lisp
 (face-spec-set 'w3m-italic '((((type nil)) (:underline nil :bold t))))
 #+END_SRC

-- 
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0
Index: w3m.el
===================================================================
RCS file: /storage/cvsroot/emacs-w3m/w3m.el,v
retrieving revision 1.1682
diff -u -r1.1682 w3m.el
--- w3m.el	10 Aug 2017 07:01:23 -0000	1.1682
+++ w3m.el	11 Aug 2017 06:41:55 -0000
@@ -1021,7 +1021,7 @@
 ;; backward-compatibility alias
 (put 'w3m-bold-face 'face-alias 'w3m-bold)

-(defface w3m-italic '((((type tty)) (:underline t))
+(defface w3m-italic '((((type nil)) (:underline t))
 		      (t (:italic t)))
   "Face used for displaying italic text.
 By default it will be a underline face on a non-window system."
Index: w3m-lnum.el
===================================================================
RCS file: /storage/cvsroot/emacs-w3m/w3m-lnum.el,v
retrieving revision 1.49
diff -u -r1.49 w3m-lnum.el
--- w3m-lnum.el	29 May 2017 02:40:18 -0000	1.49
+++ w3m-lnum.el	11 Aug 2017 06:41:55 -0000
@@ -58,7 +58,7 @@
   :group 'w3m-face)

 (defface w3m-lnum-minibuffer-prompt
-  '((((class color) (background light) (type tty))
+  '((((class color) (background light) (type nil))
      (:foreground "blue"))
     (((class color) (background dark)) (:foreground "cyan"))
     (t (:foreground "medium blue")))
@@ -66,9 +66,9 @@
   :group 'w3m-face)

 (defface w3m-lnum-match
-  '((((class color) (background light) (type tty))
+  '((((class color) (background light) (type nil))
      (:background "yellow" :foreground "black"))
-    (((class color) (background dark) (type tty))
+    (((class color) (background dark) (type nil))
      (:background "blue" :foreground "white"))
     (((class color) (background light)) (:background "yellow1"))
     (((class color) (background dark)) (:background "RoyalBlue3"))
Index: w3m-session.el
===================================================================
RCS file: /storage/cvsroot/emacs-w3m/w3m-session.el,v
retrieving revision 1.37
diff -u -r1.37 w3m-session.el
--- w3m-session.el	8 Aug 2017 05:57:55 -0000	1.37
+++ w3m-session.el	11 Aug 2017 06:41:56 -0000
@@ -132,9 +132,9 @@
 		(const :format "Never load the crashed sessions automatically." nil)))

 (defface w3m-session-select
-  `((((class color) (background light) (type tty))
+  `((((class color) (background light) (type nil))
      (:foreground "black"))
-    (((class color) (background dark) (type tty))
+    (((class color) (background dark) (type nil))
      (:foreground "cyan"))
     (((class color) (background light))
      (:foreground "dark blue"))
@@ -147,9 +147,9 @@
 (put 'w3m-session-select-face 'face-alias 'w3m-session-select)

 (defface w3m-session-selected
-  `((((class color) (background light) (type tty))
+  `((((class color) (background light) (type nil))
      (:foreground "blue" :bold t :underline t))
-    (((class color) (background dark) (type tty))
+    (((class color) (background dark) (type nil))
      (:foreground "cyan" :bold t :underline t))
     (((class color) (background light))
      (:foreground "dark blue" :bold t :underline t))
Index: ChangeLog
===================================================================
RCS file: /storage/cvsroot/emacs-w3m/ChangeLog,v
retrieving revision 1.3612
diff -u -r1.3612 ChangeLog
--- ChangeLog	10 Aug 2017 07:01:23 -0000	1.3612
+++ ChangeLog	11 Aug 2017 06:42:16 -0000
@@ -1,3 +1,12 @@
+2017-08-11    Boruch Baum  <boruch_baum@xxxxxxx>
+
+	* w3m.el (w3m-italic):
+	* w3m-lnum.el (w3m-lnum-minibuffer-prompt, w3m-lnum-match):
+	* w3m-session.el (w3m-session-select, w3m-session-selected): Update
+	"face spec" DISPLAY form "type" to be `nil` for character-only
+	terminals.
+
+
 2017-08-10  Katsumi Yamaoka  <yamaoka@xxxxxxx>

 	* w3m.el (w3m-retrieve-and-render): Do onload redirection.