]> git.eshelyaron.com Git - emacs.git/commitdiff
New face homoglyph
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 17 Oct 2016 01:48:19 +0000 (18:48 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 17 Oct 2016 05:51:51 +0000 (22:51 -0700)
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.

12 files changed:
doc/emacs/display.texi
etc/NEWS
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
lisp/cus-theme.el
lisp/faces.el
lisp/startup.el

index 738d72d046a8df63ca66dc809017529536271ce5..492dfc6afd55a8b0b18dfc8d4eb9984a283795a0 100644 (file)
@@ -657,6 +657,10 @@ Whitespace}).
 @item escape-glyph
 The face for displaying control characters and escape sequences
 (@pxref{Text Display}).
+@item homoglyph
+The face for displaying lookalike characters, i.e., characters that
+look like but are not the characters being represented
+(@pxref{Text Display}).
 @item nobreak-space
 The face for displaying no-break space characters (@pxref{Text
 Display}).
@@ -1520,12 +1524,12 @@ for details.
 
 @cindex curly quotes
 @cindex curved quotes
-@cindex escape-glyph face
+@cindex homoglyph face
   If the curved quotes @samp{‘}, @samp{’}, @samp{“}, and @samp{”} are
 known to look just like @acronym{ASCII} characters, they are shown
-with the @code{escape-glyph} face.  Curved quotes that cannot be
+with the @code{homoglyph} face.  Curved quotes that cannot be
 displayed are shown as their @acronym{ASCII} approximations @samp{`},
-@samp{'}, and @samp{"} with the @code{escape-glyph} face.
+@samp{'}, and @samp{"} with the @code{homoglyph} face.
 
 @node Cursor Display
 @section Displaying the Cursor
index 14450a6bbe5470346062773f6fbca98636b04062..45d4e5056476750feb81c8253ec84eb3f0f40579 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -115,6 +115,10 @@ to control whether to suggest shorter 'M-x' commands or not.
 ** Non-breaking hyphens are now displayed with the 'nobreak-hyphen'
 face instead of the 'escape-glyph' face.
 
++++
+** Approximations to quotes are now displayed with the new 'homoglyph'
+face instead of the 'escape-glyph' face.
+
 ---
 ** 'C-x h' ('mark-whole-buffer') will now avoid marking the prompt
 part of minibuffers.
index f8fae70c51bcae45e46f446dab5874aa3066a3d2..1e7c5099938a40a7a692aad73f9e457ca798a9c9 100644 (file)
@@ -60,6 +60,7 @@ Ansi-Color faces are included.")
    ;; Escape and prompt faces
    `(minibuffer-prompt ((,class (:weight bold :foreground ,blue))))
    `(escape-glyph ((,class (:foreground ,vermillion))))
+   `(homoglyph ((,class (:foreground ,vermillion))))
    `(error ((,class (:weight bold :slant italic
                             :foreground ,vermillion))))
    `(warning ((,class (:foreground ,orange))))
index 75635eb076dcc4a3321a58ab066c513f48ca73c1..19d5561e748c1ac7789ae28e103d0814055e96ae 100644 (file)
@@ -119,6 +119,7 @@ Semantic, and Ansi-Color faces are included -- and much more...")
    `(minibuffer-prompt ((,class (:weight bold :foreground "black" :background "gold"))))
    `(minibuffer-noticeable-prompt ((,class (:weight bold :foreground "black" :background "gold"))))
    `(escape-glyph ((,class (:foreground "#008ED1"))))
+   `(homoglyph ((,class (:foreground "#008ED1"))))
    `(error ((,class (:foreground "red"))))
    `(warning ((,class (:weight bold :foreground "orange"))))
    `(success ((,class (:foreground "green"))))
index 8c80a6658d0d95ac9058330e954bfdb8b5aef744..a2ed71ae64158c0ff1ab22f0d3623f38f262fe9e 100644 (file)
@@ -48,6 +48,7 @@
    `(mode-line-inactive ((,class (:inherit mode-line :background "LightGray" :foreground "grey20" :box (:line-width -1 :color "grey75") :weight light))))
    ;; Escape and prompt faces
    `(escape-glyph ((,class (:background "gold" :foreground "blue" :box (:line-width 1 :color "blue" :style released-button)))))
+   `(homoglyph ((,class (:background "gold" :foreground "blue" :box (:line-width 1 :color "blue" :style released-button)))))
    ;; Font lock faces
    `(font-lock-builtin-face ((,class (:foreground "#b35caf"))))
    `(font-lock-constant-face ((,class (:foreground "#00006DE06DE0"))))
index b5120209d4d654046851189282c9634ab41accd9..549d11b0bb2f532a35a962a4e24ca2c4c8866f78 100644 (file)
@@ -482,6 +482,7 @@ jarring angry fruit salad look to reduce eye fatigue.")
  '(epa-validity-medium ((t (:italic t :foreground "PaleTurquoise" :slant italic))))
 
  '(escape-glyph ((t (:foreground "cyan"))))
+ '(homoglyph ((t (:foreground "cyan"))))
 
  '(eshell-ls-archive-face ((t (:bold t :foreground "IndianRed"))))
  '(eshell-ls-backup-face ((t (:foreground "Grey"))))
index 9ef0276a894f5f3e91b489efff27c3836482809c..407c79badf923a93bea9c1bda1fb16656825f08f 100644 (file)
@@ -78,6 +78,7 @@ Semantic, and Ansi-Color faces are included.")
    ;; Escape and prompt faces
    `(minibuffer-prompt ((,class (:foreground ,cham-0))))
    `(escape-glyph ((,class (:foreground ,butter-3))))
+   `(homoglyph ((,class (:foreground ,butter-3))))
    `(error ((,class (:foreground ,red-0))))
    `(warning ((,class (:foreground ,orange-1))))
    `(success ((,class (:foreground ,cham-1))))
index cda546b8f1262bb6e0e68ae04b68fdcaeed005eb..a2d7c849c54b93963baf0cd50c0bee556545022c 100644 (file)
@@ -66,6 +66,7 @@ Semantic, and Ansi-Color faces are included.")
    ;; Escape and prompt faces
    `(minibuffer-prompt ((,class (:weight bold :foreground ,blue-3))))
    `(escape-glyph ((,class (:foreground ,red-3))))
+   `(homoglyph ((,class (:foreground ,red-3))))
    `(error ((,class (:foreground ,red-3))))
    `(warning ((,class (:foreground ,orange-3))))
    `(success ((,class (:foreground ,cham-3))))
index 08ae12f2b13b37786b5523b654d6c7a1e7ad2de0..6768cce08aed8193253ddb724811398bfff2243a 100644 (file)
@@ -46,6 +46,7 @@ are included.")
    ;; Escape and prompt faces
    `(minibuffer-prompt ((,class (:foreground "#e5786d"))))
    `(escape-glyph ((,class (:foreground "#ddaa6f" :weight bold))))
+   `(homoglyph ((,class (:foreground "#ddaa6f" :weight bold))))
    ;; Font lock faces
    `(font-lock-builtin-face ((,class (:foreground "#e5786d"))))
    `(font-lock-comment-face ((,class (:foreground "#99968b"))))
index 3160e23d9e08a39ca30640dfb7510d22de790c1e..5a20b8ef671d1c7450eb3faca782d515ac91c88e 100644 (file)
@@ -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
index 15090e1f94a6adadc12e90e408d186b92aa3936e..d6ec98b9782b269fbf33b87bd4e38237ebb02f8d 100644 (file)
@@ -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")
index d5225bdcb304f827ea1788fdf8612cfa8f468816..4a04f9c2d1bbb7c165a75d92c958f72f69be9f19 100644 (file)
@@ -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)))))))