diff options
| author | Richard M. Stallman | 2007-12-23 18:09:10 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2007-12-23 18:09:10 +0000 |
| commit | 341a1bfb331089c1a78dfde7ed139918bb2880f0 (patch) | |
| tree | 0ec29e94f4d19a34faa0d67135483b15ab7bca46 | |
| parent | 72b7e664f44a0a9d96358c18d043c76772c32356 (diff) | |
| download | emacs-341a1bfb331089c1a78dfde7ed139918bb2880f0.tar.gz emacs-341a1bfb331089c1a78dfde7ed139918bb2880f0.zip | |
(copy-face): Create the new face explicitly if it does not exist already.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/faces.el | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e5742f97e50..f9fc2226269 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2007-12-23 Richard Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * faces.el (copy-face): Create the new face explicitly if it | ||
| 4 | does not exist already. | ||
| 5 | |||
| 1 | 2007-12-23 Andreas Schwab <schwab@suse.de> | 6 | 2007-12-23 Andreas Schwab <schwab@suse.de> |
| 2 | 7 | ||
| 3 | * files.el (switch-to-buffer-other-frame): Return the buffer | 8 | * files.el (switch-to-buffer-other-frame): Return the buffer |
diff --git a/lisp/faces.el b/lisp/faces.el index ceadb6f764f..a1b069e9ba6 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -158,13 +158,18 @@ and for each existing frame. | |||
| 158 | 158 | ||
| 159 | If the optional fourth argument NEW-FRAME is given, | 159 | If the optional fourth argument NEW-FRAME is given, |
| 160 | copy the information from face OLD-FACE on frame FRAME | 160 | copy the information from face OLD-FACE on frame FRAME |
| 161 | to NEW-FACE on frame NEW-FRAME." | 161 | to NEW-FACE on frame NEW-FRAME. In this case, FRAME may not be nil." |
| 162 | (let ((inhibit-quit t)) | 162 | (let ((inhibit-quit t)) |
| 163 | (if (null frame) | 163 | (if (null frame) |
| 164 | (progn | 164 | (progn |
| 165 | (when new-frame | ||
| 166 | (error "Copying face %s from all frames to one frame" | ||
| 167 | old-face)) | ||
| 168 | (make-empty-face new-face) | ||
| 165 | (dolist (frame (frame-list)) | 169 | (dolist (frame (frame-list)) |
| 166 | (copy-face old-face new-face frame)) | 170 | (copy-face old-face new-face frame)) |
| 167 | (copy-face old-face new-face t)) | 171 | (copy-face old-face new-face t)) |
| 172 | (make-empty-face new-face) | ||
| 168 | (internal-copy-lisp-face old-face new-face frame new-frame)) | 173 | (internal-copy-lisp-face old-face new-face frame new-frame)) |
| 169 | new-face)) | 174 | new-face)) |
| 170 | 175 | ||