Commit 3ca2f1bf authored by Glenn Morris's avatar Glenn Morris
Browse files

Remove -p suffix from set-face-* functions

* lisp/faces.el (set-face-inverse-video, set-face-bold, set-face-italic):
Remove -p suffix from names, for consistency with other set-face-*.
(set-face-inverse-video): Fix interactive spec.
* lisp/play/gamegrid.el (gamegrid-make-mono-tty-face):
* lisp/textmodes/table.el (table--update-cell-face):
Use set-face-inverse-video rather than now obsolete alias.

* doc/lispref/display.texi (Attribute Functions):
Update for set-face-* name changes.
parent 6ef2e5ef
2012-11-21 Glenn Morris <rgm@gnu.org>
* display.texi (Attribute Functions):
Update for set-face-* name changes.
* debugging.texi (Profiling): New section.
(Debugging): Mention profiling in the introduction.
* tips.texi (Compilation Tips): Move profiling to separate section.
......
......@@ -2425,12 +2425,12 @@ This sets the @code{:stipple} attribute of @var{face} to
This sets the @code{:font} attribute of @var{face} to @var{font}.
@end deffn
@defun set-face-bold-p face bold-p &optional frame
@defun set-face-bold face bold-p &optional frame
This sets the @code{:weight} attribute of @var{face} to @var{normal}
if @var{bold-p} is @code{nil}, and to @var{bold} otherwise.
@end defun
@defun set-face-italic-p face italic-p &optional frame
@defun set-face-italic face italic-p &optional frame
This sets the @code{:slant} attribute of @var{face} to @var{normal} if
@var{italic-p} is @code{nil}, and to @var{italic} otherwise.
@end defun
......@@ -2440,7 +2440,7 @@ This sets the @code{:underline} attribute of @var{face} to
@var{underline}.
@end defun
@defun set-face-inverse-video-p face inverse-video-p &optional frame
@defun set-face-inverse-video face inverse-video-p &optional frame
This sets the @code{:inverse-video} attribute of @var{face} to
@var{inverse-video-p}.
@end defun
......
2012-11-21 Glenn Morris <rgm@gnu.org>
* faces.el (set-face-inverse-video, set-face-bold, set-face-italic):
Remove -p suffix from names, for consistency with other set-face-*.
(set-face-inverse-video): Fix interactive spec.
* play/gamegrid.el (gamegrid-make-mono-tty-face):
* textmodes/table.el (table--update-cell-face):
Use set-face-inverse-video rather than now obsolete alias.
2012-11-21 Eli Zaretskii <eliz@gnu.org>
* simple.el (line-move): Don't call line-move-partial if
......
......@@ -862,7 +862,7 @@ Use `set-face-attribute' to ``unspecify'' underlining."
'set-face-underline "24.3")
(defun set-face-inverse-video-p (face inverse-video-p &optional frame)
(defun set-face-inverse-video (face inverse-video-p &optional frame)
"Specify whether face FACE is in inverse video.
INVERSE-VIDEO-P non-nil means FACE displays explicitly in inverse video.
INVERSE-VIDEO-P nil means FACE explicitly is not in inverse video.
......@@ -870,14 +870,13 @@ FRAME nil or not specified means change face on all frames.
Use `set-face-attribute' to ``unspecify'' the inverse video attribute."
(interactive
(let ((list (read-face-and-attribute :inverse-video)))
(list (car list) (eq (car (cdr list)) t))))
(list (car list) (if (cadr list) t))))
(set-face-attribute face frame :inverse-video inverse-video-p))
(define-obsolete-function-alias 'set-face-inverse-video-p
'set-face-inverse-video "24.4")
;; The -p suffix is a hostage to fortune. What if we want to extend
;; this to allow more than boolean options? Exactly this happened
;; to set-face-underline-p.
(defun set-face-bold-p (face bold-p &optional frame)
(defun set-face-bold (face bold-p &optional frame)
"Specify whether face FACE is bold.
BOLD-P non-nil means FACE should explicitly display bold.
BOLD-P nil means FACE should explicitly display non-bold.
......@@ -887,8 +886,10 @@ Use `set-face-attribute' or `modify-face' for finer control."
(make-face-unbold face frame)
(make-face-bold face frame)))
(define-obsolete-function-alias 'set-face-bold-p 'set-face-bold "24.4")
(defun set-face-italic-p (face italic-p &optional frame)
(defun set-face-italic (face italic-p &optional frame)
"Specify whether face FACE is italic.
ITALIC-P non-nil means FACE should explicitly display italic.
ITALIC-P nil means FACE should explicitly display non-italic.
......@@ -898,6 +899,8 @@ Use `set-face-attribute' or `modify-face' for finer control."
(make-face-unitalic face frame)
(make-face-italic face frame)))
(define-obsolete-function-alias 'set-face-italic-p 'set-face-italic "24.4")
(defalias 'set-face-background-pixmap 'set-face-stipple)
......
......@@ -175,7 +175,7 @@ static unsigned char gamegrid_bits[] = {
(defun gamegrid-make-mono-tty-face ()
(let ((face (make-face 'gamegrid-mono-tty-face)))
(set-face-inverse-video-p face t)
(set-face-inverse-video face t)
face))
(defun gamegrid-make-color-tty-face (color)
......
......@@ -5210,7 +5210,7 @@ instead of the current buffer and returns the OBJECT."
"Update cell face according to the current mode."
(if (featurep 'xemacs)
(set-face-property 'table-cell 'underline table-fixed-width-mode)
(set-face-inverse-video-p 'table-cell table-fixed-width-mode)))
(set-face-inverse-video 'table-cell table-fixed-width-mode)))
(table--update-cell-face)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment