unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Miles Bader <miles@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: zoom features
Date: Mon, 04 Jan 2010 18:29:52 +0900	[thread overview]
Message-ID: <buo1vi6z08f.fsf@dhlpc061.dev.necel.com> (raw)
In-Reply-To: 87hbr28l3y.fsf@kzsu.stanford.edu

Joseph Brenner <doom@kzsu.stanford.edu> writes:
> Are there any standard fixes for these problems kicking around?

They are not problems, they are intentional.

You apparently want a different functionality; it isn't hard to write a
"global" zoom by frobbing the height of the default face, e.g.:

   (defun increase-default-face-height (&optional steps)
     "Increase the height of the default face by STEPS steps.
   Each step multiplies the height by 1.2; a negative number of steps
   decreases the height by the same amount."
     (interactive
      (list
       (cond ((eq current-prefix-arg '-) -1)
             ((numberp current-prefix-arg) current-prefix-arg)
             ((consp current-prefix-arg) -1)
             (t 1))))
     (let ((frame (selected-frame)))
       (set-face-attribute 'default frame
                           :height (floor
                                    (* (face-attribute 'default :height frame)
                                       (expt 1.3 steps))))))

   (defun decrease-default-face-height (&optional steps)
     "Decrease the height of the default face by STEPS steps.
   Each step divides the height by 1.2; a negative number of steps
   increases the height by the same amount."
     (interactive
      (list
       (cond ((eq current-prefix-arg '-) -1)
             ((numberp current-prefix-arg) current-prefix-arg)
             ((consp current-prefix-arg) -1)
             (t 1))))
     (increase-default-face-height (- steps)))

   (global-set-key [(control =)] 'increase-default-face-height)
   (global-set-key [(control +)] 'increase-default-face-height)
   (global-set-key [(control -)] 'decrease-default-face-height)

-miles

-- 
Success, n. The one unpardonable sin against one's fellows.


  reply	other threads:[~2010-01-04  9:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-04  6:01 zoom features Joseph Brenner
2010-01-04  9:29 ` Miles Bader [this message]
2010-01-05 20:25 ` Drew Adams
2010-01-06  1:00 ` Joseph Brenner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=buo1vi6z08f.fsf@dhlpc061.dev.necel.com \
    --to=miles@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).