diff options
| author | Glenn Morris | 2018-02-27 15:38:47 -0500 |
|---|---|---|
| committer | Glenn Morris | 2018-02-27 15:38:47 -0500 |
| commit | 49408d74180da4f682c5aa2d584ea417e27baacd (patch) | |
| tree | 3f9f319fe0b8d09cd9be72c5157f79f806f00303 | |
| parent | f8df49c3a9522780a04facad1fc11fef3508716b (diff) | |
| download | emacs-49408d74180da4f682c5aa2d584ea417e27baacd.tar.gz emacs-49408d74180da4f682c5aa2d584ea417e27baacd.zip | |
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.
| -rw-r--r-- | lisp/font-lock.el | 5 | ||||
| -rw-r--r-- | lisp/ps-print.el | 46 |
2 files changed, 1 insertions, 50 deletions
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 29d3bc58646..0ed94bd0e8b 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.") | |||
| 631 | (declare (indent 0) (debug t)) | 631 | (declare (indent 0) (debug t)) |
| 632 | `(let ((inhibit-point-motion-hooks t)) | 632 | `(let ((inhibit-point-motion-hooks t)) |
| 633 | (with-silent-modifications | 633 | (with-silent-modifications |
| 634 | ,@body))) | 634 | ,@body)))) |
| 635 | ;; | ||
| 636 | ;; Shut up the byte compiler. | ||
| 637 | (defvar font-lock-face-attributes)) ; Obsolete but respected if set. | ||
| 638 | 635 | ||
| 639 | (defvar-local font-lock-set-defaults nil) ; Whether we have set up defaults. | 636 | (defvar-local font-lock-set-defaults nil) ; Whether we have set up defaults. |
| 640 | 637 | ||
diff --git a/lisp/ps-print.el b/lisp/ps-print.el index 59b37dd0acf..28f93f4e203 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el | |||
| @@ -4140,48 +4140,6 @@ If EXTENSION is any other symbol, it is ignored." | |||
| 4140 | 4140 | ||
| 4141 | 4141 | ||
| 4142 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 4142 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 4143 | ;; Adapted from font-lock: (obsolete stuff) | ||
| 4144 | ;; Originally face attributes were specified via `font-lock-face-attributes'. | ||
| 4145 | ;; Users then changed the default face attributes by setting that variable. | ||
| 4146 | ;; However, we try and be back-compatible and respect its value if set except | ||
| 4147 | ;; for faces where M-x customize has been used to save changes for the face. | ||
| 4148 | |||
| 4149 | |||
| 4150 | (defun ps-font-lock-face-attributes () | ||
| 4151 | (and (boundp 'font-lock-mode) (symbol-value 'font-lock-mode) | ||
| 4152 | (boundp 'font-lock-face-attributes) | ||
| 4153 | (let ((face-attributes (symbol-value 'font-lock-face-attributes))) | ||
| 4154 | (while face-attributes | ||
| 4155 | (let* ((face-attribute | ||
| 4156 | (car (prog1 face-attributes | ||
| 4157 | (setq face-attributes (cdr face-attributes))))) | ||
| 4158 | (face (car face-attribute))) | ||
| 4159 | ;; Rustle up a `defface' SPEC from a | ||
| 4160 | ;; `font-lock-face-attributes' entry. | ||
| 4161 | (unless (get face 'saved-face) | ||
| 4162 | (let ((foreground (nth 1 face-attribute)) | ||
| 4163 | (background (nth 2 face-attribute)) | ||
| 4164 | (bold-p (nth 3 face-attribute)) | ||
| 4165 | (italic-p (nth 4 face-attribute)) | ||
| 4166 | (underline-p (nth 5 face-attribute)) | ||
| 4167 | face-spec) | ||
| 4168 | (when foreground | ||
| 4169 | (setq face-spec (cons ':foreground | ||
| 4170 | (cons foreground face-spec)))) | ||
| 4171 | (when background | ||
| 4172 | (setq face-spec (cons ':background | ||
| 4173 | (cons background face-spec)))) | ||
| 4174 | (when bold-p | ||
| 4175 | (setq face-spec (append '(:weight bold) face-spec))) | ||
| 4176 | (when italic-p | ||
| 4177 | (setq face-spec (append '(:slant italic) face-spec))) | ||
| 4178 | (when underline-p | ||
| 4179 | (setq face-spec (append '(:underline t) face-spec))) | ||
| 4180 | (custom-declare-face face (list (list t face-spec)) nil) | ||
| 4181 | ))))))) | ||
| 4182 | |||
| 4183 | |||
| 4184 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 4185 | ;; Internal functions and variables | 4143 | ;; Internal functions and variables |
| 4186 | 4144 | ||
| 4187 | 4145 | ||
| @@ -6350,10 +6308,6 @@ If FACE is not a valid face name, use default face." | |||
| 6350 | 6308 | ||
| 6351 | 6309 | ||
| 6352 | (defun ps-build-reference-face-lists () | 6310 | (defun ps-build-reference-face-lists () |
| 6353 | ;; Ensure that face database is updated with faces on | ||
| 6354 | ;; `font-lock-face-attributes' (obsolete stuff) | ||
| 6355 | (ps-font-lock-face-attributes) | ||
| 6356 | ;; Now, rebuild reference face lists | ||
| 6357 | (setq ps-print-face-alist nil) | 6311 | (setq ps-print-face-alist nil) |
| 6358 | (if ps-auto-font-detect | 6312 | (if ps-auto-font-detect |
| 6359 | (mapc 'ps-map-face (face-list)) | 6313 | (mapc 'ps-map-face (face-list)) |