[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 49408d7: Remove last vestiges of obsolete font-lock
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] master 49408d7: Remove last vestiges of obsolete font-lock-face-attributes |
Date: |
Tue, 27 Feb 2018 15:38:52 -0500 (EST) |
branch: master
commit 49408d74180da4f682c5aa2d584ea417e27baacd
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>
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.
---
lisp/font-lock.el | 5 +----
lisp/ps-print.el | 46 ----------------------------------------------
2 files changed, 1 insertion(+), 50 deletions(-)
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 29d3bc5..0ed94bd 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -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.
diff --git a/lisp/ps-print.el b/lisp/ps-print.el
index 59b37dd..28f93f4 100644
--- a/lisp/ps-print.el
+++ b/lisp/ps-print.el
@@ -4140,48 +4140,6 @@ If EXTENSION is any other symbol, it is ignored."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; 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))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 49408d7: Remove last vestiges of obsolete font-lock-face-attributes,
Glenn Morris <=