From: Richard M. Stallman Date: Fri, 16 Aug 1996 05:09:09 +0000 (+0000) Subject: (modify-face): Handle stipple values X-Git-Tag: emacs-20.1~4073 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e5de02385e60095947fa5f4ce7bcda0f6656de43;p=emacs.git (modify-face): Handle stipple values of the form (WIDTH HEIGHT DATA). --- 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." (background (modify-face-read-string face (face-background (intern face)) "background" colors)) - (stipple (modify-face-read-string - face (face-stipple (intern face)) - "stipple" stipples)) + ;; If the stipple value is a list (WIDTH HEIGHT DATA), + ;; represent that as a string by printing it out. + (old-stipple-string + (if (stringp (face-stipple (intern face))) + (face-stipple (intern face)) + (prin1-to-string (face-stipple (intern face))))) + (new-stipple-string + (modify-face-read-string + face old-stipple-string + "stipple" stipples)) + ;; Convert the stipple value text we read + ;; back to a list if it looks like one. + ;; This makes the assumption that a pixmap file name + ;; won't start with an open-paren. + (stipple + (if (string-match "^(" new-stipple-string) + (read new-stipple-string) + new-stipple-string)) (bold-p (y-or-n-p (concat "Set face " face " bold "))) (italic-p (y-or-n-p (concat "Set face " face " italic "))) (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." (delq nil (list (and foreground (concat (downcase foreground) " foreground")) (and background (concat (downcase background) " background")) - (and stipple (concat (downcase stipple) " stipple")) + (and stipple (concat (downcase new-stipple-string) " stipple")) (and bold-p "bold") (and italic-p "italic") (and underline-p "underline"))) ", ")) (list (intern face) foreground background stipple