all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Miles Bader <miles@gnu.org>
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: finger-pointer curser as default for mouse-face text
Date: Tue, 2 Nov 2004 16:51:35 -0500	[thread overview]
Message-ID: <20041102215135.GA20505@fencepost> (raw)
In-Reply-To: <sh654o86ot.fsf@tux.gnu.franken.de>

On Tue, Nov 02, 2004 at 07:08:34PM +0100, Karl Eichwalder wrote:
> > It is interesting to find a user who often specifies faces.
> > Can you tell us the circumstances where you do that?
> 
> >From time to time it is necessary to increase the font size: When I want
> to demonstrate something to somebody watching my screen, or when I want
> to check some accented or foreign characters more closely.

Something like the following elisp code might be more useful for this.  It
implements the C-+ and C-- (that's control-minus :-) bindings many modern GUI
programs use to grow/shrink the default face.

The main problem with these commands -- and so why I haven't pursued adding
them to the official sources[*] -- is that they don't interact well with a
default face which has been set using customize-face (because the Emacs
face-customization machinery sucks).  However the traditional font-setting
menu _also_ doesn't work if you've customized the `default' face, so I'm
assuming you haven't done that... :-)

[*] Perhaps the benefits of these commands outweigh their drawbacks however
and they _should_ be added to CVS; after all the traditional "set font" menu
has the same problem.  Of course the real solution is to overhaul the
face-setting mechanism to not have the horrible looping problems it has.

-Miles


;;; default-grow.el

(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)


-- 
"Unless there are slaves to do the ugly, horrible, uninteresting work, culture
and contemplation become almost impossible. Human slavery is wrong, insecure,
and demoralizing.  On mechanical slavery, on the slavery of the machine, the
future of the world depends." -Oscar Wilde, "The Soul of Man Under Socialism"

  reply	other threads:[~2004-11-02 21:51 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <DNEMKBNJBGPAOPIJOOICAEKKCAAA.drew.adams@oracle.com>
2004-10-19  9:04 ` finger-pointer curser as default for mouse-face text Kim F. Storm
2004-10-19 15:31   ` Lennart Borgman
2004-10-19 16:12   ` Drew Adams
2004-10-21 13:56   ` Richard Stallman
2004-10-21 14:47     ` Kim F. Storm
2004-10-21 16:03       ` Lennart Borgman
2004-10-23  4:48       ` Richard Stallman
2004-10-24 12:42         ` Kim F. Storm
2004-10-24 12:59           ` Lennart Borgman
2004-10-24 19:40             ` Kim F. Storm
2004-10-24 20:06               ` Lennart Borgman
2004-10-25 13:13             ` Richard Stallman
2004-10-24 13:10           ` David Kastrup
2004-10-24 19:59             ` Kim F. Storm
2004-10-26  9:04               ` Richard Stallman
2004-10-26 17:05                 ` Lennart Borgman
2004-10-24 22:31           ` Stefan
2004-10-25  7:22             ` David Kastrup
2004-10-25 11:47               ` Stefan
2004-10-25 12:51                 ` David Kastrup
2004-10-25 13:50                   ` Stefan Monnier
2004-10-25 14:52                     ` Ralf Angeli
2004-10-25 15:08                       ` Stefan Monnier
2004-10-25 15:18                         ` David Kastrup
2004-10-25 15:35                           ` Stefan Monnier
2004-10-26  9:00                             ` Kim F. Storm
2004-10-26  9:25                               ` David Kastrup
2004-10-26 12:23                                 ` Kim F. Storm
2004-10-26 18:55                                   ` Drew Adams
2004-10-26 21:06                                     ` David Kastrup
2004-10-26 21:54                                     ` Kim F. Storm
2004-10-27  2:15                                       ` Luc Teirlinck
2004-10-27 12:52                                         ` Kim F. Storm
2004-10-27 13:02                                           ` Luc Teirlinck
2004-10-27 13:16                                           ` David Kastrup
2004-10-27 14:51                                             ` feature freeze (was: finger-pointer curser as default for mouse-face text) Reiner Steib
2004-10-27 15:15                                               ` Kim F. Storm
2004-10-27 15:15                                               ` feature freeze David Kastrup
2004-10-27 17:29                                           ` finger-pointer curser as default for mouse-face text Drew Adams
2004-10-28 14:05                                             ` Kim F. Storm
2004-10-27 17:35                                       ` Richard Stallman
2004-11-01 14:40                                         ` Karl Eichwalder
2004-11-01 15:44                                           ` Stefan
2004-11-02 14:08                                           ` Richard Stallman
2004-11-02 18:08                                             ` Karl Eichwalder
2004-11-02 21:51                                               ` Miles Bader [this message]
2004-11-02 23:41                                                 ` Drew Adams
2004-11-02 23:53                                                   ` Stefan
2004-11-03  1:27                                                     ` incrementor-decrementor commands and bindings (was: finger-pointer curser as default for mouse-face text) Drew Adams
2004-11-03  7:51                                                       ` incrementor-decrementor commands and bindings (was: finger-pointercurser " Stephan Stahl
2004-11-03 15:26                                                         ` Drew Adams
2004-11-04  9:51                                                           ` Richard Stallman
2004-11-03  1:34                                                     ` finger-pointer curser as default for mouse-face text Miles Bader
2004-11-03  9:31                                                       ` Kim F. Storm
2004-11-03  9:26                                                     ` Kim F. Storm
2004-11-03 10:20                                                       ` David Kastrup
2004-11-03 17:04                                                 ` Richard Stallman
2004-11-03  9:11                                               ` Kim F. Storm
2004-11-03 17:03                                               ` Richard Stallman
2004-10-27 17:34                                   ` Richard Stallman
2004-10-27 10:49                               ` Richard Stallman
2004-10-27 12:24                                 ` Kim F. Storm
2004-10-27 13:03                                   ` Stefan Monnier
2004-10-27 13:18                                   ` David Kastrup
2004-10-28  2:27                                 ` Miles Bader
2004-10-27  7:22                             ` Kai Grossjohann
2004-10-27  7:35                               ` David Kastrup
2004-10-27 12:32                                 ` Kim F. Storm
2004-10-28  6:24                                 ` Richard Stallman
2004-10-27 10:47                             ` Richard Stallman
2004-10-26  9:05               ` Richard Stallman
2004-10-25  8:31             ` Kim F. Storm
2004-10-25 10:01               ` David Kastrup
2004-10-25 12:32                 ` Kim F. Storm
2004-10-26  9:05               ` Richard Stallman
2004-10-25 13:13           ` Richard Stallman
2004-10-21 14:09   ` David Kastrup
2004-10-21 14:42     ` Kim F. Storm
2004-10-21 15:21       ` David Kastrup
2004-10-21 19:55         ` Kim F. Storm
2004-10-21 20:09           ` Drew Adams
2004-10-21 21:45             ` Stefan Monnier
2004-10-21 22:09               ` David Kastrup
2004-10-22  9:10                 ` Kim F. Storm
2004-10-22 12:45                   ` David Kastrup
2004-10-22 15:03                     ` Kim F. Storm
2004-10-22 15:56                       ` David Kastrup
2004-10-17 19:27 Drew Adams
2004-10-18 11:19 ` Kim F. Storm
2004-10-18 13:59 ` Richard Stallman
2004-12-07 13:16 ` Per Abrahamsen

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

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

  git send-email \
    --in-reply-to=20041102215135.GA20505@fencepost \
    --to=miles@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rms@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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.