Skip to content

Commit

Permalink
check text arg of egg-text
Browse files Browse the repository at this point in the history
  • Loading branch information
bogolisk committed Jan 15, 2009
1 parent 0ec30fd commit cae27b1
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions egg.el
Expand Up @@ -424,10 +424,14 @@ desirable way to invoke gnu patch command."
;;;========================================================
(defmacro egg-text (text face)
"Format TEXT with face FACE at compile-time or run-time."
(if (stringp text)
(propertize text 'face (if (symbolp face) face
(nth 1 face)))
`(propertize ,text 'face ,face)))
(cond ((stringp text)
(propertize text 'face (if (symbolp face) face
(nth 1 face))))
((null text)
`(propertize "<internal-bug>" 'face ,face))
(t `(propertize ,text 'face ,face))))

;;(cl-macroexpand '(egg-text blah 'egg-text-3))

(defmacro egg-prop (text &rest prop)
"Propertize TEXT with properties list PROP at compile-time or run-time."
Expand Down

0 comments on commit cae27b1

Please sign in to comment.