summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-10-16 18:48:19 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2016-10-16 22:51:51 -0700
commitc06a518b5b0706509252abb03875867b10a92fc7 (patch)
tree06f34f07e642dff4b7c614b55e2fefb96f2c332a /lisp
parent032a299b0ed25f067f4133c547a822b283bc4cb8 (diff)
downloademacs-c06a518b5b0706509252abb03875867b10a92fc7.tar.gz
New face homoglyph
Suggested by Eli Zaretskii, from a feature request by Alan Mackenzie (Bug#24468). * doc/emacs/display.texi (Standard Faces, Text Display): * etc/NEWS: Document this. * etc/themes/dichromacy-theme.el, etc/themes/leuven-theme.el: * etc/themes/light-blue-theme.el, etc/themes/manoj-dark-theme.el: * etc/themes/tango-dark-theme.el, etc/themes/tango-theme.el: * etc/themes/wombat-theme.el: Customize homoglyph to be the same as escape-glyph. * lisp/cus-theme.el (custom-theme--listed-faces): Add homoglyph. * lisp/faces.el (homoglyph): New face. * lisp/startup.el (startup--setup-quote-display): Use it.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/cus-theme.el3
-rw-r--r--lisp/faces.el8
-rw-r--r--lisp/startup.el2
3 files changed, 11 insertions, 2 deletions
diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el
index 3160e23d9e0..5a20b8ef671 100644
--- a/lisp/cus-theme.el
+++ b/lisp/cus-theme.el
@@ -61,7 +61,8 @@ Do not call this mode function yourself. It is meant for internal use."
(defvar custom-theme-insert-face-marker nil)
(defvar custom-theme--listed-faces '(default cursor fixed-pitch
- variable-pitch escape-glyph minibuffer-prompt highlight region
+ variable-pitch escape-glyph homoglyph
+ minibuffer-prompt highlight region
shadow secondary-selection trailing-whitespace
font-lock-builtin-face font-lock-comment-delimiter-face
font-lock-comment-face font-lock-constant-face
diff --git a/lisp/faces.el b/lisp/faces.el
index 15090e1f94a..d6ec98b9782 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -2470,6 +2470,14 @@ If you set `term-file-prefix' to nil, this function does nothing."
:group 'basic-faces
:version "22.1")
+(defface homoglyph
+ '((((background dark)) :foreground "cyan")
+ (((type pc)) :foreground "magenta")
+ (t :foreground "brown"))
+ "Face for lookalike characters."
+ :group 'basic-faces
+ :version "25.2")
+
(defface nobreak-space
'((((class color) (min-colors 88)) :inherit escape-glyph :underline t)
(((class color) (min-colors 8)) :background "magenta")
diff --git a/lisp/startup.el b/lisp/startup.el
index d5225bdcb30..4a04f9c2d1b 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -870,7 +870,7 @@ If STYLE is nil, display appropriately for the terminal."
(if repl
(aset (or standard-display-table
(setq standard-display-table (make-display-table)))
- char (vector (make-glyph-code repl 'escape-glyph)))
+ char (vector (make-glyph-code repl 'homoglyph)))
(when standard-display-table
(aset standard-display-table char nil)))))))