[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs lisp/face-remap.el lisp/ChangeLog doc/ema...
From: |
Miles Bader |
Subject: |
[Emacs-diffs] emacs lisp/face-remap.el lisp/ChangeLog doc/ema... |
Date: |
Tue, 23 Jun 2009 08:28:02 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Miles Bader <miles> 09/06/23 08:28:02
Modified files:
lisp : face-remap.el ChangeLog
doc/emacs : ChangeLog display.texi
Log message:
Add `text-scale-set' function
Revision: address@hidden/emacs--devo--0--patch-1607
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/face-remap.el?cvsroot=emacs&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.15727&r2=1.15728
http://cvs.savannah.gnu.org/viewcvs/emacs/doc/emacs/ChangeLog?cvsroot=emacs&r1=1.334&r2=1.335
http://cvs.savannah.gnu.org/viewcvs/emacs/doc/emacs/display.texi?cvsroot=emacs&r1=1.18&r2=1.19
Patches:
Index: lisp/face-remap.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/face-remap.el,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- lisp/face-remap.el 5 Jan 2009 03:19:07 -0000 1.15
+++ lisp/face-remap.el 23 Jun 2009 08:27:58 -0000 1.16
@@ -211,10 +211,10 @@
face size by the value of the variable `text-scale-mode-step'
\(a negative amount shrinks the text).
-The `text-scale-increase' and `text-scale-decrease' functions may
-be used to interactively modify the variable
-`text-scale-mode-amount' (they also enable or disable
-`text-scale-mode' as necessary)."
+The `text-scale-increase', `text-scale-decrease', and
+`text-scale-set' functions may be used to interactively modify
+the variable `text-scale-mode-amount' (they also enable or
+disable `text-scale-mode' as necessary)."
:lighter (" " text-scale-mode-lighter)
(when text-scale-mode-remapping
(face-remap-remove-relative text-scale-mode-remapping))
@@ -230,6 +230,19 @@
(force-window-update (current-buffer)))
;;;###autoload
+(defun text-scale-set (level)
+ "Set the scale factor of the default face in the current buffer to LEVEL.
+If LEVEL is non-zero, `text-scale-mode' is enabled, otherwise it is disabled.
+
+LEVEL is a number of steps, with 0 representing the default size.
+Each step scales the height of the default face by the variable
+`text-scale-mode-step' (a negative number decreases the height by
+the same amount)."
+ (interactive "p")
+ (setq text-scale-mode-amount level)
+ (text-scale-mode (if (zerop text-scale-mode-amount) -1 1)))
+
+;;;###autoload
(defun text-scale-increase (inc)
"Increase the height of the default face in the current buffer by INC steps.
If the new height is other than the default, `text-scale-mode' is enabled.
Index: lisp/ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.15727
retrieving revision 1.15728
diff -u -b -r1.15727 -r1.15728
--- lisp/ChangeLog 23 Jun 2009 07:43:17 -0000 1.15727
+++ lisp/ChangeLog 23 Jun 2009 08:27:58 -0000 1.15728
@@ -1,3 +1,7 @@
+2009-06-23 Miles Bader <address@hidden>
+
+ * face-remap.el (text-scale-set): New function.
+
2009-06-23 Glenn Morris <address@hidden>
* pcmpl-rpm.el (pcomplete/rpm): Doc fix.
Index: doc/emacs/ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/doc/emacs/ChangeLog,v
retrieving revision 1.334
retrieving revision 1.335
diff -u -b -r1.334 -r1.335
--- doc/emacs/ChangeLog 23 Jun 2009 07:07:51 -0000 1.334
+++ doc/emacs/ChangeLog 23 Jun 2009 08:28:01 -0000 1.335
@@ -1,6 +1,7 @@
2009-06-23 Miles Bader <address@hidden>
* display.texi (Scrolling): Document `recenter-redisplay'
+ (Temporary Face Changes): Document `text-scale-set'.
2009-06-21 Chong Yidong <address@hidden>
Index: doc/emacs/display.texi
===================================================================
RCS file: /cvsroot/emacs/emacs/doc/emacs/display.texi,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- doc/emacs/display.texi 23 Jun 2009 07:07:52 -0000 1.18
+++ doc/emacs/display.texi 23 Jun 2009 08:28:01 -0000 1.19
@@ -509,6 +509,12 @@
You may find it convenient to bind to these commands, rather than
@code{text-scale-adjust}.
address@hidden set buffer face height
address@hidden text-scale-set
+The command @code{text-scale-set} sets the height of the default face
+in the current buffer to an absolute level specified by its prefix
+argument.
+
@findex text-scale-mode
The above commands automatically enable or disable the minor mode
@code{text-scale-mode}, depending on whether the current font scaling
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs lisp/face-remap.el lisp/ChangeLog doc/ema...,
Miles Bader <=