Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
05fbc4a9
Commit
05fbc4a9
authored
Jun 23, 2009
by
Miles Bader
Browse files
Add `text-scale-set' function
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1607
parent
e65f32c1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
4 deletions
+28
-4
doc/emacs/ChangeLog
doc/emacs/ChangeLog
+1
-0
doc/emacs/display.texi
doc/emacs/display.texi
+6
-0
lisp/ChangeLog
lisp/ChangeLog
+4
-0
lisp/face-remap.el
lisp/face-remap.el
+17
-4
No files found.
doc/emacs/ChangeLog
View file @
05fbc4a9
2009-06-23 Miles Bader <miles@gnu.org>
* display.texi (Scrolling): Document `recenter-redisplay'
(Temporary Face Changes): Document `text-scale-set'.
2009-06-21 Chong Yidong <cyd@stupidchicken.com>
...
...
doc/emacs/display.texi
View file @
05fbc4a9
...
...
@@ -509,6 +509,12 @@ default face, just like @kbd{C-x C-+} and @kbd{C-x C--} respectively.
You may find it convenient to bind to these commands, rather than
@code{text-scale-adjust}.
@cindex set buffer face height
@findex 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
...
...
lisp/ChangeLog
View file @
05fbc4a9
2009-06-23 Miles Bader <miles@gnu.org>
* face-remap.el (text-scale-set): New function.
2009-06-23 Glenn Morris <rgm@gnu.org>
* pcmpl-rpm.el (pcomplete/rpm): Doc fix.
...
...
lisp/face-remap.el
View file @
05fbc4a9
...
...
@@ -211,10 +211,10 @@ The amount of scaling is determined by the variable
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
))
...
...
@@ -229,6 +229,19 @@ be used to interactively modify the variable
text-scale-mode-amount
))))
(
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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment