From 90d0833f24be04e4b36aabda8cae1681ae768258 Mon Sep 17 00:00:00 2001 From: Mark Oteiza Date: Thu, 23 Jun 2016 18:48:12 -0400 Subject: [PATCH] Remove some more face aliases obsoleted in 22.1 * lisp/eshell/em-ls.el (eshell-ls-directory-face, eshell-ls-symlink-face, eshell-ls-executable-face, eshell-ls-readonly-face, eshell-ls-unreadable-face, eshell-ls-special-face, eshell-ls-missing-face, eshell-ls-archive-face, eshell-ls-backup-face, eshell-ls-product-face, eshell-ls-clutter-face): Remove. * lisp/isearch.el (isearch-lazy-highlight-face, lazy-highlight-face): Remove. (isearch-lazy-highlight-update): Use face symbol. * lisp/net/sieve-mode.el (sieve-control-commands-face, sieve-action-commands-face, sieve-test-commands-face, sieve-tagged-arguments-face): Remove. (sieve-font-lock-keywords): Use non-obsolete faces. * lisp/progmodes/sh-script.el (sh-heredoc-face): Remove. (sh-get-indent-info, sh-prev-line): Use face symbol. * lisp/textmodes/tex-mode.el (tex-font-lock-keywords-1): Use non-obsolete face. (tex-math-face, tex-verbatim-face): Remove. (tex-font-lock-syntactic-face-function): Use face symbols. --- lisp/eshell/em-ls.el | 14 -------------- lisp/isearch.el | 8 ++------ lisp/net/sieve-mode.el | 32 ++++---------------------------- lisp/progmodes/sh-script.el | 9 +++------ lisp/textmodes/tex-mode.el | 12 ++++-------- 5 files changed, 13 insertions(+), 62 deletions(-) diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el index cf6609ff729..8616dd2479b 100644 --- a/lisp/eshell/em-ls.el +++ b/lisp/eshell/em-ls.el @@ -101,46 +101,36 @@ faster and conserves more memory." (((class color) (background dark)) (:foreground "SkyBlue" :weight bold)) (t (:weight bold))) "The face used for highlighting directories.") -(define-obsolete-face-alias 'eshell-ls-directory-face - 'eshell-ls-directory "22.1") (defface eshell-ls-symlink '((((class color) (background light)) (:foreground "Dark Cyan" :weight bold)) (((class color) (background dark)) (:foreground "Cyan" :weight bold))) "The face used for highlighting symbolic links.") -(define-obsolete-face-alias 'eshell-ls-symlink-face 'eshell-ls-symlink "22.1") (defface eshell-ls-executable '((((class color) (background light)) (:foreground "ForestGreen" :weight bold)) (((class color) (background dark)) (:foreground "Green" :weight bold))) "The face used for highlighting executables (not directories, though).") -(define-obsolete-face-alias 'eshell-ls-executable-face - 'eshell-ls-executable "22.1") (defface eshell-ls-readonly '((((class color) (background light)) (:foreground "Brown")) (((class color) (background dark)) (:foreground "Pink"))) "The face used for highlighting read-only files.") -(define-obsolete-face-alias 'eshell-ls-readonly-face 'eshell-ls-readonly "22.1") (defface eshell-ls-unreadable '((((class color) (background light)) (:foreground "Grey30")) (((class color) (background dark)) (:foreground "DarkGrey"))) "The face used for highlighting unreadable files.") -(define-obsolete-face-alias 'eshell-ls-unreadable-face - 'eshell-ls-unreadable "22.1") (defface eshell-ls-special '((((class color) (background light)) (:foreground "Magenta" :weight bold)) (((class color) (background dark)) (:foreground "Magenta" :weight bold))) "The face used for highlighting non-regular files.") -(define-obsolete-face-alias 'eshell-ls-special-face 'eshell-ls-special "22.1") (defface eshell-ls-missing '((((class color) (background light)) (:foreground "Red" :weight bold)) (((class color) (background dark)) (:foreground "Red" :weight bold))) "The face used for highlighting non-existent file names.") -(define-obsolete-face-alias 'eshell-ls-missing-face 'eshell-ls-missing "22.1") (defcustom eshell-ls-archive-regexp (concat "\\.\\(t\\(a[rz]\\|gz\\)\\|arj\\|lzh\\|" @@ -155,7 +145,6 @@ files." '((((class color) (background light)) (:foreground "Orchid" :weight bold)) (((class color) (background dark)) (:foreground "Orchid" :weight bold))) "The face used for highlighting archived and compressed file names.") -(define-obsolete-face-alias 'eshell-ls-archive-face 'eshell-ls-archive "22.1") (defcustom eshell-ls-backup-regexp "\\(\\`\\.?#\\|\\(\\.bak\\|~\\)\\'\\)" @@ -166,7 +155,6 @@ files." '((((class color) (background light)) (:foreground "OrangeRed")) (((class color) (background dark)) (:foreground "LightSalmon"))) "The face used for highlighting backup file names.") -(define-obsolete-face-alias 'eshell-ls-backup-face 'eshell-ls-backup "22.1") (defcustom eshell-ls-product-regexp "\\.\\(elc\\|o\\(bj\\)?\\|a\\|lib\\|res\\)\\'" @@ -179,7 +167,6 @@ ought to be recreatable if they are deleted." '((((class color) (background light)) (:foreground "OrangeRed")) (((class color) (background dark)) (:foreground "LightSalmon"))) "The face used for highlighting files that are build products.") -(define-obsolete-face-alias 'eshell-ls-product-face 'eshell-ls-product "22.1") (defcustom eshell-ls-clutter-regexp "\\(^texput\\.log\\|^core\\)\\'" @@ -192,7 +179,6 @@ really need to stick around for very long." '((((class color) (background light)) (:foreground "OrangeRed" :weight bold)) (((class color) (background dark)) (:foreground "OrangeRed" :weight bold))) "The face used for highlighting junk file names.") -(define-obsolete-face-alias 'eshell-ls-clutter-face 'eshell-ls-clutter "22.1") (defsubst eshell-ls-filetype-p (attrs type) "Test whether ATTRS specifies a directory." diff --git a/lisp/isearch.el b/lisp/isearch.el index eabf05b0b17..721f2fc3181 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -354,11 +354,7 @@ A value of nil means highlight all matches." "Face for lazy highlighting of matches other than the current one." :group 'lazy-highlight :group 'basic-faces) -(define-obsolete-face-alias 'isearch-lazy-highlight-face 'lazy-highlight "22.1") -(define-obsolete-variable-alias 'isearch-lazy-highlight-face - 'lazy-highlight-face - "22.1") -(defvar lazy-highlight-face 'lazy-highlight) + ;; Define isearch help map. @@ -3259,7 +3255,7 @@ Attempt to do the search exactly the way the pending Isearch would." ;; 1000 is higher than ediff's 100+, ;; but lower than isearch main overlay's 1001 (overlay-put ov 'priority 1000) - (overlay-put ov 'face lazy-highlight-face))) + (overlay-put ov 'face 'lazy-highlight))) ;(overlay-put ov 'window (selected-window)))) ;; Remember the current position of point for ;; the next call of `isearch-lazy-highlight-update' diff --git a/lisp/net/sieve-mode.el b/lisp/net/sieve-mode.el index 77ab44f02db..6aa1b207ee2 100644 --- a/lisp/net/sieve-mode.el +++ b/lisp/net/sieve-mode.el @@ -61,9 +61,6 @@ ;; Font-lock -(defvar sieve-control-commands-face 'sieve-control-commands - "Face name used for Sieve Control Commands.") - (defface sieve-control-commands '((((type tty) (class color)) (:foreground "blue" :weight light)) (((class grayscale) (background light)) (:foreground "LightGray" :bold t)) @@ -72,12 +69,6 @@ (((class color) (background dark)) (:foreground "LightSteelBlue")) (t (:bold t))) "Face used for Sieve Control Commands.") -;; backward-compatibility alias -(put 'sieve-control-commands-face 'face-alias 'sieve-control-commands) -(put 'sieve-control-commands-face 'obsolete-face "22.1") - -(defvar sieve-action-commands-face 'sieve-action-commands - "Face name used for Sieve Action Commands.") (defface sieve-action-commands '((((type tty) (class color)) (:foreground "blue" :weight bold)) @@ -85,12 +76,6 @@ (((class color) (background dark)) (:foreground "LightSkyBlue")) (t (:inverse-video t :bold t))) "Face used for Sieve Action Commands.") -;; backward-compatibility alias -(put 'sieve-action-commands-face 'face-alias 'sieve-action-commands) -(put 'sieve-action-commands-face 'obsolete-face "22.1") - -(defvar sieve-test-commands-face 'sieve-test-commands - "Face name used for Sieve Test Commands.") (defface sieve-test-commands '((((type tty) (class color)) (:foreground "magenta")) @@ -102,12 +87,6 @@ (((class color) (background dark)) (:foreground "Aquamarine")) (t (:bold t :underline t))) "Face used for Sieve Test Commands.") -;; backward-compatibility alias -(put 'sieve-test-commands-face 'face-alias 'sieve-test-commands) -(put 'sieve-test-commands-face 'obsolete-face "22.1") - -(defvar sieve-tagged-arguments-face 'sieve-tagged-arguments - "Face name used for Sieve Tagged Arguments.") (defface sieve-tagged-arguments '((((type tty) (class color)) (:foreground "cyan" :weight bold)) @@ -117,9 +96,6 @@ (((class color) (background dark)) (:foreground "Cyan")) (t (:bold t))) "Face used for Sieve Tagged Arguments.") -;; backward-compatibility alias -(put 'sieve-tagged-arguments-face 'face-alias 'sieve-tagged-arguments) -(put 'sieve-tagged-arguments-face 'obsolete-face "22.1") (defconst sieve-font-lock-keywords @@ -128,19 +104,19 @@ ;; control commands (cons (regexp-opt '("require" "if" "else" "elsif" "stop") 'words) - 'sieve-control-commands-face) + 'sieve-control-commands) ;; action commands (cons (regexp-opt '("fileinto" "redirect" "reject" "keep" "discard") 'words) - 'sieve-action-commands-face) + 'sieve-action-commands) ;; test commands (cons (regexp-opt '("address" "allof" "anyof" "exists" "false" "true" "header" "not" "size" "envelope" "body") 'words) - 'sieve-test-commands-face) + 'sieve-test-commands) (cons "\\Sw+:\\sw+" - 'sieve-tagged-arguments-face)))) + 'sieve-tagged-arguments)))) ;; Syntax table diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 4fe47f026b6..10e56d0ddf9 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -925,8 +925,6 @@ See `sh-feature'.") (:weight bold))) "Face to show quoted execs like \\=`blabla\\=`." :group 'sh-indentation) -(define-obsolete-face-alias 'sh-heredoc-face 'sh-heredoc "22.1") -(defvar sh-heredoc-face 'sh-heredoc) (defface sh-escaped-newline '((t :inherit font-lock-string-face)) "Face used for (non-escaped) backslash at end of a line in Shell-script mode." @@ -1207,7 +1205,7 @@ subshells can nest." (if q (if (characterp q) (if (eq q ?\`) 'sh-quoted-exec font-lock-string-face) - sh-heredoc-face) + 'sh-heredoc) font-lock-comment-face))) (defgroup sh-indentation nil @@ -2902,7 +2900,7 @@ STRING This is ignored for the purposes of calculating ;;(This function never returns just t.) (cond ((or (nth 3 (syntax-ppss (point))) - (eq (get-text-property (point) 'face) sh-heredoc-face)) + (eq (get-text-property (point) 'face) 'sh-heredoc)) ;; String continuation -- don't indent (setq result t) (setq have-result t)) @@ -3108,8 +3106,7 @@ we go to the end of the previous line and do not check for continuations." (forward-comment (- (point-max))) (unless end (beginning-of-line)) (when (and (not (bobp)) - (equal (get-text-property (1- (point)) 'face) - sh-heredoc-face)) + (eq (get-text-property (1- (point)) 'face) 'sh-heredoc)) (let ((p1 (previous-single-property-change (1- (point)) 'face))) (when p1 (goto-char p1) diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index b38b147b3e5..bc5e5163fba 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -505,7 +505,7 @@ An alternative value is \" . \", if you use a font with a narrow period." (funcall inbraces-re (concat "{" (funcall inbraces-re "{[^}]*}") "*}")) "*}\\)+\\$?\\$") - (0 tex-math-face)) + (0 tex-math)) ;; Heading args. (,(concat slash headings "\\*?" opt arg) ;; If ARG ends up matching too much (if the {} don't match, e.g.) @@ -800,15 +800,11 @@ Not smaller than the value set by `tex-suscript-height-minimum'." '((t :inherit font-lock-string-face)) "Face used to highlight TeX math expressions." :group 'tex) -(define-obsolete-face-alias 'tex-math-face 'tex-math "22.1") -(defvar tex-math-face 'tex-math) (defface tex-verbatim '((t :inherit fixed-pitch-serif)) "Face used to highlight TeX verbatim environments." :group 'tex) -(define-obsolete-face-alias 'tex-verbatim-face 'tex-verbatim "22.1") -(defvar tex-verbatim-face 'tex-verbatim) (defun tex-font-lock-verb (start delim) "Place syntax table properties on the \\verb construct. @@ -836,10 +832,10 @@ START is the position of the \\ and DELIM is the delimiter char." (let ((char (nth 3 state))) (cond ((not char) - (if (eq 2 (nth 7 state)) tex-verbatim-face font-lock-comment-face)) - ((eq char ?$) tex-math-face) + (if (eq 2 (nth 7 state)) 'tex-verbatim font-lock-comment-face)) + ((eq char ?$) 'tex-math) ;; A \verb element. - (t tex-verbatim-face)))) + (t 'tex-verbatim)))) (defun tex-define-common-keys (keymap) -- 2.39.2