Skip to content

Commit

Permalink
Remove some face aliases obsoleted in 22.1
Browse files Browse the repository at this point in the history
* lisp/faces.el (modeline-inactive, modeline-highlight, modeline-buffer-id):
* lisp/hilit-chg.el (highlight-changes-face, highlight-changes-delete-face):
* lisp/info.el (Info-title-1-face, Info-title-2-face, Info-title-3-face,
Info-title-4-face, info-menu-5):
* lisp/obsolete/old-whitespace.el (whitespace-highlight-face):
* lisp/paren.el (show-paren-match-face, show-paren-mismatch-face):
* lisp/progmodes/make-mode.el (makefile-space-face):
* lisp/textmodes/texinfo.el (texinfo-heading-face): Remove.
(texinfo-font-lock-keywords): Use texinfo-heading face.
* lisp/vc/add-log.el (change-log-date-face, change-log-name-face,
change-log-email-face, change-log-file-face, change-log-list-face,
change-log-conditionals-face, change-log-function-face,
change-log-acknowledgement-face):
* lisp/vc/diff-mode.el (diff-header-face, diff-file-header-face,
diff-index-face, diff-hunk-header-face, diff-removed-face, diff-added-face,
diff-changed-face, diff-function-face, diff-context-face,
diff-nonexistent-face): Remove.
(diff-use-changed-face, diff-font-lock-keywords): Use non-obsolete face
symbols.
(diff-hunk-file-names): Fix comment.
(diff-refine-change): Remove.
(diff-refine-removed, diff-refine-added, diff-refine-hunk): Use
non-obsolete face.
* lisp/vc/log-view.el (log-view-file-face, log-view-message-face): Remove.
(log-view-font-lock-keywords): Use non-obsolete face names.
* lisp/vc/pcvs-info.el (cvs-header-face, cvs-filename-face, cvs-unknown-face,
cvs-handled-face, cvs-need-action-face, cvs-marked-face, cvs-msg-face):
* lisp/wid-edit.el (widget-documentation-face, widget-button-face,
widget-field-face, widget-single-line-field-face, widget-inactive-face,
widget-button-pressed-face):
* lisp/woman.el (woman-italic-face, woman-bold-face, woman-unknown-face,
woman-addition-face): Remove.
  • Loading branch information
holomorph committed Jun 23, 2016
1 parent 037f82a commit c430f7e
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 109 deletions.
3 changes: 0 additions & 3 deletions lisp/faces.el
Original file line number Diff line number Diff line change
Expand Up @@ -2518,7 +2518,6 @@ If you set `term-file-prefix' to nil, this function does nothing."
:version "22.1"
:group 'mode-line-faces
:group 'basic-faces)
(define-obsolete-face-alias 'modeline-inactive 'mode-line-inactive "22.1")

(defface mode-line-highlight
'((((class color) (min-colors 88))
Expand All @@ -2529,7 +2528,6 @@ If you set `term-file-prefix' to nil, this function does nothing."
:version "22.1"
:group 'mode-line-faces
:group 'basic-faces)
(define-obsolete-face-alias 'modeline-highlight 'mode-line-highlight "22.1")

(defface mode-line-emphasis
'((t (:weight bold)))
Expand All @@ -2545,7 +2543,6 @@ Use the face `mode-line-highlight' for features that can be selected."
:version "22.1"
:group 'mode-line-faces
:group 'basic-faces)
(define-obsolete-face-alias 'modeline-buffer-id 'mode-line-buffer-id "22.1")

(defface header-line
'((default
Expand Down
5 changes: 0 additions & 5 deletions lisp/hilit-chg.el
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,6 @@
(t (:inverse-video t)))
"Face used for highlighting changes."
:group 'highlight-changes)
(define-obsolete-face-alias 'highlight-changes-face
'highlight-changes "22.1")

;; This looks pretty ugly, actually. Maybe the underline should be removed.
(defface highlight-changes-delete
Expand All @@ -204,9 +202,6 @@
(t (:inverse-video t)))
"Face used for highlighting deletions."
:group 'highlight-changes)
(define-obsolete-face-alias 'highlight-changes-delete-face
'highlight-changes-delete "22.1")


;; A (not very good) default list of colors to rotate through.
(define-obsolete-variable-alias 'highlight-changes-colours
Expand Down
5 changes: 0 additions & 5 deletions lisp/info.el
Original file line number Diff line number Diff line change
Expand Up @@ -81,28 +81,24 @@ The Lisp code is executed when the node is selected.")
(t :height 1.2 :inherit info-title-2))
"Face for info titles at level 1."
:group 'info)
(define-obsolete-face-alias 'Info-title-1-face 'info-title-1 "22.1")

(defface info-title-2
'((((type tty pc) (class color)) :foreground "lightblue" :weight bold)
(t :height 1.2 :inherit info-title-3))
"Face for info titles at level 2."
:group 'info)
(define-obsolete-face-alias 'Info-title-2-face 'info-title-2 "22.1")

(defface info-title-3
'((((type tty pc) (class color)) :weight bold)
(t :height 1.2 :inherit info-title-4))
"Face for info titles at level 3."
:group 'info)
(define-obsolete-face-alias 'Info-title-3-face 'info-title-3 "22.1")

(defface info-title-4
'((((type tty pc) (class color)) :weight bold)
(t :weight bold :inherit variable-pitch))
"Face for info titles at level 4."
:group 'info)
(define-obsolete-face-alias 'Info-title-4-face 'info-title-4 "22.1")

(defface info-menu-header
'((((type tty pc))
Expand All @@ -119,7 +115,6 @@ The Lisp code is executed when the node is selected.")
(t :underline t))
"Face for every third `*' in an Info menu."
:group 'info)
(define-obsolete-face-alias 'info-menu-5 'info-menu-star "22.1")

(defface info-xref
'((t :inherit link))
Expand Down
2 changes: 0 additions & 2 deletions lisp/obsolete/old-whitespace.el
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,6 @@ To disable timer scans, set this to zero."
(:background "white")))
"Face used for highlighting the bogus whitespaces that exist in the buffer."
:group 'whitespace)
(define-obsolete-face-alias 'whitespace-highlight-face
'whitespace-highlight "22.1")

(if (not (assoc 'whitespace-mode minor-mode-alist))
(setq minor-mode-alist (cons '(whitespace-mode whitespace-mode-line)
Expand Down
5 changes: 0 additions & 5 deletions lisp/paren.el
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@ whitespace there."
:type 'boolean
:version "25.1")

(define-obsolete-face-alias 'show-paren-match-face 'show-paren-match "22.1")

(define-obsolete-face-alias 'show-paren-mismatch-face
'show-paren-mismatch "22.1")

(defcustom show-paren-highlight-openparen t
"Non-nil turns on openparen highlighting when matching forward.
When nil, and point stands just before an open paren, the paren
Expand Down
1 change: 0 additions & 1 deletion lisp/progmodes/make-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@
(t (:reverse-video t)))
"Face to use for highlighting leading spaces in Font-Lock mode."
:group 'makefile)
(define-obsolete-face-alias 'makefile-space-face 'makefile-space "22.1")

(defface makefile-targets
;; This needs to go along both with foreground and background colors (i.e. shell)
Expand Down
5 changes: 2 additions & 3 deletions lisp/textmodes/texinfo.el
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,6 @@ Subexpression 1 is what goes into the corresponding `@end' statement.")
'((t (:inherit font-lock-function-name-face)))
"Face used for section headings in `texinfo-mode'."
:group 'texinfo)
(define-obsolete-face-alias 'texinfo-heading-face 'texinfo-heading "22.1")
(defvar texinfo-heading-face 'texinfo-heading)

(defvar texinfo-font-lock-keywords
`(;; All but the first had an OVERRIDE of t.
Expand Down Expand Up @@ -380,7 +378,8 @@ Subexpression 1 is what goes into the corresponding `@end' statement.")
;; (,texinfo-environment-regexp
;; 1 (texinfo-clone-environment (match-beginning 1) (match-end 1)) keep)
(,(concat "^@" (regexp-opt (mapcar 'car texinfo-section-list) t)
".*\n") 0 texinfo-heading-face t))
".*\n")
0 texinfo-heading t))
"Additional expressions to highlight in Texinfo mode.")

(defun texinfo-clone-environment (start end)
Expand Down
11 changes: 0 additions & 11 deletions lisp/vc/add-log.el
Original file line number Diff line number Diff line change
Expand Up @@ -184,51 +184,42 @@ a case simply use the directory containing the changed file."
"Face used to highlight dates in date lines."
:version "21.1"
:group 'change-log)
(define-obsolete-face-alias 'change-log-date-face 'change-log-date "22.1")

(defface change-log-name
'((t (:inherit font-lock-constant-face)))
"Face for highlighting author names."
:version "21.1"
:group 'change-log)
(define-obsolete-face-alias 'change-log-name-face 'change-log-name "22.1")

(defface change-log-email
'((t (:inherit font-lock-variable-name-face)))
"Face for highlighting author email addresses."
:version "21.1"
:group 'change-log)
(define-obsolete-face-alias 'change-log-email-face 'change-log-email "22.1")

(defface change-log-file
'((t (:inherit font-lock-function-name-face)))
"Face for highlighting file names."
:version "21.1"
:group 'change-log)
(define-obsolete-face-alias 'change-log-file-face 'change-log-file "22.1")

(defface change-log-list
'((t (:inherit font-lock-keyword-face)))
"Face for highlighting parenthesized lists of functions or variables."
:version "21.1"
:group 'change-log)
(define-obsolete-face-alias 'change-log-list-face 'change-log-list "22.1")

(defface change-log-conditionals
'((t (:inherit font-lock-variable-name-face)))
"Face for highlighting conditionals of the form `[...]'."
:version "21.1"
:group 'change-log)
(define-obsolete-face-alias 'change-log-conditionals-face
'change-log-conditionals "22.1")

(defface change-log-function
'((t (:inherit font-lock-variable-name-face)))
"Face for highlighting items of the form `<....>'."
:version "21.1"
:group 'change-log)
(define-obsolete-face-alias 'change-log-function-face
'change-log-function "22.1")

(defface change-log-acknowledgment
'((t (:inherit font-lock-comment-face)))
Expand All @@ -237,8 +228,6 @@ a case simply use the directory containing the changed file."
:group 'change-log)
(define-obsolete-face-alias 'change-log-acknowledgement
'change-log-acknowledgment "24.3")
(define-obsolete-face-alias 'change-log-acknowledgement-face
'change-log-acknowledgment "22.1")

(defconst change-log-file-names-re "^\\( +\\|\t\\)\\* \\([^ ,:([\n]+\\)")
(defconst change-log-start-entry-re "^\\sw.........[0-9:+ ]*")
Expand Down
71 changes: 25 additions & 46 deletions lisp/vc/diff-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,6 @@ well."
(t :weight bold))
"`diff-mode' face inherited by hunk and index header faces."
:group 'diff-mode)
(define-obsolete-face-alias 'diff-header-face 'diff-header "22.1")
(defvar diff-header-face 'diff-header)

(defface diff-file-header
'((((class color) (min-colors 88) (background light))
Expand All @@ -256,22 +254,16 @@ well."
(t :weight bold)) ; :height 1.3
"`diff-mode' face used to highlight file header lines."
:group 'diff-mode)
(define-obsolete-face-alias 'diff-file-header-face 'diff-file-header "22.1")
(defvar diff-file-header-face 'diff-file-header)

(defface diff-index
'((t :inherit diff-file-header))
"`diff-mode' face used to highlight index header lines."
:group 'diff-mode)
(define-obsolete-face-alias 'diff-index-face 'diff-index "22.1")
(defvar diff-index-face 'diff-index)

(defface diff-hunk-header
'((t :inherit diff-header))
"`diff-mode' face used to highlight hunk header lines."
:group 'diff-mode)
(define-obsolete-face-alias 'diff-hunk-header-face 'diff-hunk-header "22.1")
(defvar diff-hunk-header-face 'diff-hunk-header)

(defface diff-removed
'((default
Expand All @@ -284,8 +276,6 @@ well."
:foreground "red"))
"`diff-mode' face used to highlight removed lines."
:group 'diff-mode)
(define-obsolete-face-alias 'diff-removed-face 'diff-removed "22.1")
(defvar diff-removed-face 'diff-removed)

(defface diff-added
'((default
Expand All @@ -298,16 +288,12 @@ well."
:foreground "green"))
"`diff-mode' face used to highlight added lines."
:group 'diff-mode)
(define-obsolete-face-alias 'diff-added-face 'diff-added "22.1")
(defvar diff-added-face 'diff-added)

(defface diff-changed
'((t nil))
"`diff-mode' face used to highlight changed lines."
:version "25.1"
:group 'diff-mode)
(define-obsolete-face-alias 'diff-changed-face 'diff-changed "22.1")
(defvar diff-changed-face 'diff-changed)

(defface diff-indicator-removed
'((t :inherit diff-removed))
Expand All @@ -334,8 +320,6 @@ well."
'((t :inherit diff-header))
"`diff-mode' face used to highlight function names produced by \"diff -p\"."
:group 'diff-mode)
(define-obsolete-face-alias 'diff-function-face 'diff-function "22.1")
(defvar diff-function-face 'diff-function)

(defface diff-context
'((((class color grayscale) (min-colors 88) (background light))
Expand All @@ -345,15 +329,11 @@ well."
"`diff-mode' face used to highlight context and other side-information."
:version "25.1"
:group 'diff-mode)
(define-obsolete-face-alias 'diff-context-face 'diff-context "22.1")
(defvar diff-context-face 'diff-context)

(defface diff-nonexistent
'((t :inherit diff-file-header))
"`diff-mode' face used to highlight nonexistent files in recursive diffs."
:group 'diff-mode)
(define-obsolete-face-alias 'diff-nonexistent-face 'diff-nonexistent "22.1")
(defvar diff-nonexistent-face 'diff-nonexistent)

(defconst diff-yank-handler '(diff-yank-function))
(defun diff-yank-function (text)
Expand Down Expand Up @@ -382,57 +362,57 @@ well."
(defconst diff-context-mid-hunk-header-re
"--- \\([0-9]+\\)\\(?:,\\([0-9]+\\)\\)? ----$")

(defvar diff-use-changed-face (and (face-differs-from-default-p diff-changed-face)
(not (face-equal diff-changed-face diff-added-face))
(not (face-equal diff-changed-face diff-removed-face)))
(defvar diff-use-changed-face (and (face-differs-from-default-p 'diff-changed)
(not (face-equal 'diff-changed 'diff-added))
(not (face-equal 'diff-changed 'diff-removed)))
"If non-nil, use the face `diff-changed' for changed lines in context diffs.
Otherwise, use the face `diff-removed' for removed lines,
and the face `diff-added' for added lines.")

(defvar diff-font-lock-keywords
`((,(concat "\\(" diff-hunk-header-re-unified "\\)\\(.*\\)$")
(1 diff-hunk-header-face) (6 diff-function-face))
(1 diff-hunk-header) (6 diff-function))
("^\\(\\*\\{15\\}\\)\\(.*\\)$" ;context
(1 diff-hunk-header-face) (2 diff-function-face))
("^\\*\\*\\* .+ \\*\\*\\*\\*". diff-hunk-header-face) ;context
(,diff-context-mid-hunk-header-re . diff-hunk-header-face) ;context
("^[0-9,]+[acd][0-9,]+$" . diff-hunk-header-face) ;normal
("^---$" . diff-hunk-header-face) ;normal
(1 diff-hunk-header) (2 diff-function))
("^\\*\\*\\* .+ \\*\\*\\*\\*". diff-hunk-header) ;context
(,diff-context-mid-hunk-header-re . diff-hunk-header) ;context
("^[0-9,]+[acd][0-9,]+$" . diff-hunk-header) ;normal
("^---$" . diff-hunk-header) ;normal
;; For file headers, accept files with spaces, but be careful to rule
;; out false-positives when matching hunk headers.
("^\\(---\\|\\+\\+\\+\\|\\*\\*\\*\\) \\([^\t\n]+?\\)\\(?:\t.*\\| \\(\\*\\*\\*\\*\\|----\\)\\)?\n"
(0 diff-header-face)
(2 (if (not (match-end 3)) diff-file-header-face) prepend))
(0 diff-header)
(2 (if (not (match-end 3)) diff-file-header) prepend))
("^\\([-<]\\)\\(.*\n\\)"
(1 diff-indicator-removed-face) (2 diff-removed-face))
(1 diff-indicator-removed-face) (2 diff-removed))
("^\\([+>]\\)\\(.*\n\\)"
(1 diff-indicator-added-face) (2 diff-added-face))
(1 diff-indicator-added-face) (2 diff-added))
("^\\(!\\)\\(.*\n\\)"
(1 (if diff-use-changed-face
diff-indicator-changed-face
;; Otherwise, search for `diff-context-mid-hunk-header-re' and
;; if the line of context diff is above, use `diff-removed-face';
;; if below, use `diff-added-face'.
;; if the line of context diff is above, use `diff-removed';
;; if below, use `diff-added'.
(save-match-data
(let ((limit (save-excursion (diff-beginning-of-hunk))))
(if (save-excursion (re-search-backward diff-context-mid-hunk-header-re limit t))
diff-indicator-added-face
diff-indicator-removed-face)))))
(2 (if diff-use-changed-face
diff-changed-face
diff-changed
;; Otherwise, use the same method as above.
(save-match-data
(let ((limit (save-excursion (diff-beginning-of-hunk))))
(if (save-excursion (re-search-backward diff-context-mid-hunk-header-re limit t))
diff-added-face
diff-removed-face))))))
diff-added
diff-removed))))))
("^\\(?:Index\\|revno\\): \\(.+\\).*\n"
(0 diff-header-face) (1 diff-index-face prepend))
("^Only in .*\n" . diff-nonexistent-face)
(0 diff-header) (1 diff-index prepend))
("^Only in .*\n" . diff-nonexistent)
("^\\(#\\)\\(.*\\)"
(1 font-lock-comment-delimiter-face)
(2 font-lock-comment-face))
("^[^-=+*!<>#].*\n" (0 diff-context-face))))
("^[^-=+*!<>#].*\n" (0 diff-context))))

(defconst diff-font-lock-defaults
'(diff-font-lock-keywords t nil nil nil (font-lock-multiline . nil)))
Expand Down Expand Up @@ -820,7 +800,7 @@ If the OLD prefix arg is passed, tell the file NAME of the old file."
(error (point-min)))))
(header-files
;; handle filenames with spaces;
;; cf. diff-font-lock-keywords / diff-file-header-face
;; cf. diff-font-lock-keywords / diff-file-header
(if (looking-at "[-*][-*][-*] \\([^\t\n]+\\).*\n[-+][-+][-+] \\([^\t\n]+\\)")
(list (if old (match-string 1) (match-string 2))
(if old (match-string 2) (match-string 1)))
Expand Down Expand Up @@ -1936,11 +1916,10 @@ For use in `add-log-current-defun-function'."
(t :inverse-video t))
"Face used for char-based changes shown by `diff-refine-hunk'."
:group 'diff-mode)
(define-obsolete-face-alias 'diff-refine-change 'diff-refine-changed "24.5")

(defface diff-refine-removed
'((default
:inherit diff-refine-change)
:inherit diff-refine-changed)
(((class color) (min-colors 88) (background light))
:background "#ffbbbb")
(((class color) (min-colors 88) (background dark))
Expand All @@ -1951,7 +1930,7 @@ For use in `add-log-current-defun-function'."

(defface diff-refine-added
'((default
:inherit diff-refine-change)
:inherit diff-refine-changed)
(((class color) (min-colors 88) (background light))
:background "#aaffaa")
(((class color) (min-colors 88) (background dark))
Expand Down Expand Up @@ -1984,7 +1963,7 @@ For use in `add-log-current-defun-function'."
(let* ((start (point))
(style (diff-hunk-style)) ;Skips the hunk header as well.
(beg (point))
(props-c '((diff-mode . fine) (face diff-refine-change)))
(props-c '((diff-mode . fine) (face diff-refine-changed)))
(props-r '((diff-mode . fine) (face diff-refine-removed)))
(props-a '((diff-mode . fine) (face diff-refine-added)))
;; Be careful to go back to `start' so diff-end-of-hunk gets
Expand Down
Loading

0 comments on commit c430f7e

Please sign in to comment.