diff options
| author | Richard M. Stallman | 1996-08-16 05:09:09 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-08-16 05:09:09 +0000 |
| commit | e5de02385e60095947fa5f4ce7bcda0f6656de43 (patch) | |
| tree | c49fcef72abf67347cc0aee42b0c8af6f9593a70 | |
| parent | 4252d80c6c7b423db90d71388f126d2e8bcb0441 (diff) | |
| download | emacs-e5de02385e60095947fa5f4ce7bcda0f6656de43.tar.gz emacs-e5de02385e60095947fa5f4ce7bcda0f6656de43.zip | |
(modify-face): Handle stipple values
of the form (WIDTH HEIGHT DATA).
| -rw-r--r-- | lisp/faces.el | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/lisp/faces.el b/lisp/faces.el index 003262e6610..d5cb0e5a6eb 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -232,9 +232,24 @@ If called interactively, prompts for a face name and face attributes." | |||
| 232 | (background (modify-face-read-string | 232 | (background (modify-face-read-string |
| 233 | face (face-background (intern face)) | 233 | face (face-background (intern face)) |
| 234 | "background" colors)) | 234 | "background" colors)) |
| 235 | (stipple (modify-face-read-string | 235 | ;; If the stipple value is a list (WIDTH HEIGHT DATA), |
| 236 | face (face-stipple (intern face)) | 236 | ;; represent that as a string by printing it out. |
| 237 | "stipple" stipples)) | 237 | (old-stipple-string |
| 238 | (if (stringp (face-stipple (intern face))) | ||
| 239 | (face-stipple (intern face)) | ||
| 240 | (prin1-to-string (face-stipple (intern face))))) | ||
| 241 | (new-stipple-string | ||
| 242 | (modify-face-read-string | ||
| 243 | face old-stipple-string | ||
| 244 | "stipple" stipples)) | ||
| 245 | ;; Convert the stipple value text we read | ||
| 246 | ;; back to a list if it looks like one. | ||
| 247 | ;; This makes the assumption that a pixmap file name | ||
| 248 | ;; won't start with an open-paren. | ||
| 249 | (stipple | ||
| 250 | (if (string-match "^(" new-stipple-string) | ||
| 251 | (read new-stipple-string) | ||
| 252 | new-stipple-string)) | ||
| 238 | (bold-p (y-or-n-p (concat "Set face " face " bold "))) | 253 | (bold-p (y-or-n-p (concat "Set face " face " bold "))) |
| 239 | (italic-p (y-or-n-p (concat "Set face " face " italic "))) | 254 | (italic-p (y-or-n-p (concat "Set face " face " italic "))) |
| 240 | (underline-p (y-or-n-p (concat "Set face " face " underline "))) | 255 | (underline-p (y-or-n-p (concat "Set face " face " underline "))) |
| @@ -244,7 +259,7 @@ If called interactively, prompts for a face name and face attributes." | |||
| 244 | (delq nil | 259 | (delq nil |
| 245 | (list (and foreground (concat (downcase foreground) " foreground")) | 260 | (list (and foreground (concat (downcase foreground) " foreground")) |
| 246 | (and background (concat (downcase background) " background")) | 261 | (and background (concat (downcase background) " background")) |
| 247 | (and stipple (concat (downcase stipple) " stipple")) | 262 | (and stipple (concat (downcase new-stipple-string) " stipple")) |
| 248 | (and bold-p "bold") (and italic-p "italic") | 263 | (and bold-p "bold") (and italic-p "italic") |
| 249 | (and underline-p "underline"))) ", ")) | 264 | (and underline-p "underline"))) ", ")) |
| 250 | (list (intern face) foreground background stipple | 265 | (list (intern face) foreground background stipple |