aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2007-12-23 18:09:10 +0000
committerRichard M. Stallman2007-12-23 18:09:10 +0000
commit341a1bfb331089c1a78dfde7ed139918bb2880f0 (patch)
tree0ec29e94f4d19a34faa0d67135483b15ab7bca46
parent72b7e664f44a0a9d96358c18d043c76772c32356 (diff)
downloademacs-341a1bfb331089c1a78dfde7ed139918bb2880f0.tar.gz
emacs-341a1bfb331089c1a78dfde7ed139918bb2880f0.zip
(copy-face): Create the new face explicitly if it does not exist already.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/faces.el7
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 @@
12007-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
12007-12-23 Andreas Schwab <schwab@suse.de> 62007-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
159If the optional fourth argument NEW-FRAME is given, 159If the optional fourth argument NEW-FRAME is given,
160copy the information from face OLD-FACE on frame FRAME 160copy the information from face OLD-FACE on frame FRAME
161to NEW-FACE on frame NEW-FRAME." 161to 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