1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-02-08 20:58:58 +00:00

Remove last vestiges of obsolete font-lock-face-attributes

* lisp/ps-print.el (ps-font-lock-face-attributes): Remove function.
(ps-build-reference-face-lists):
No longer call ps-font-lock-face-attributes.
* lisp/font-lock.el (font-lock-face-attributes):
Remove stale declaration.
This commit is contained in:
Glenn Morris 2018-02-27 15:38:47 -05:00
parent f8df49c3a9
commit 49408d7418
2 changed files with 1 additions and 50 deletions

View File

@ -631,10 +631,7 @@ Major/minor modes can set this variable if they know which option applies.")
(declare (indent 0) (debug t))
`(let ((inhibit-point-motion-hooks t))
(with-silent-modifications
,@body)))
;;
;; Shut up the byte compiler.
(defvar font-lock-face-attributes)) ; Obsolete but respected if set.
,@body))))
(defvar-local font-lock-set-defaults nil) ; Whether we have set up defaults.

View File

@ -4138,48 +4138,6 @@ If EXTENSION is any other symbol, it is ignored."
0))))
face-bit))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Adapted from font-lock: (obsolete stuff)
;; Originally face attributes were specified via `font-lock-face-attributes'.
;; Users then changed the default face attributes by setting that variable.
;; However, we try and be back-compatible and respect its value if set except
;; for faces where M-x customize has been used to save changes for the face.
(defun ps-font-lock-face-attributes ()
(and (boundp 'font-lock-mode) (symbol-value 'font-lock-mode)
(boundp 'font-lock-face-attributes)
(let ((face-attributes (symbol-value 'font-lock-face-attributes)))
(while face-attributes
(let* ((face-attribute
(car (prog1 face-attributes
(setq face-attributes (cdr face-attributes)))))
(face (car face-attribute)))
;; Rustle up a `defface' SPEC from a
;; `font-lock-face-attributes' entry.
(unless (get face 'saved-face)
(let ((foreground (nth 1 face-attribute))
(background (nth 2 face-attribute))
(bold-p (nth 3 face-attribute))
(italic-p (nth 4 face-attribute))
(underline-p (nth 5 face-attribute))
face-spec)
(when foreground
(setq face-spec (cons ':foreground
(cons foreground face-spec))))
(when background
(setq face-spec (cons ':background
(cons background face-spec))))
(when bold-p
(setq face-spec (append '(:weight bold) face-spec)))
(when italic-p
(setq face-spec (append '(:slant italic) face-spec)))
(when underline-p
(setq face-spec (append '(:underline t) face-spec)))
(custom-declare-face face (list (list t face-spec)) nil)
)))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Internal functions and variables
@ -6350,10 +6308,6 @@ If FACE is not a valid face name, use default face."
(defun ps-build-reference-face-lists ()
;; Ensure that face database is updated with faces on
;; `font-lock-face-attributes' (obsolete stuff)
(ps-font-lock-face-attributes)
;; Now, rebuild reference face lists
(setq ps-print-face-alist nil)
(if ps-auto-font-detect
(mapc 'ps-map-face (face-list))