gnu-emacs-sources
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

toggle-variable-pitch


From: Thien-Thi Nguyen
Subject: toggle-variable-pitch
Date: Thu, 19 Sep 2013 07:30:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Greetings earthlings,

Here is a command that toggles ‘variable-pitch’ face:

(defun toggle-variable-pitch ()
  "Toggle use of face `variable-pitch'.
This works by frobbing `face-remapping-alist'."
  (interactive)
  (let ((spec '(default variable-pitch)))
    (set (make-local-variable 'face-remapping-alist)
         (if (member spec face-remapping-alist)
             (delete spec face-remapping-alist)
           (cons spec face-remapping-alist)))))

I use it w/ emacs-w3m (v.cool, recommended), added to ‘w3m-mode-hook’
for typical (carefree) surfing, and invoked explicitly for:

 http://clhs.lisp.se/Issues/iss229_w.htm

and RFCs, etc.  If something like this already exists, please tell me.

-- 
Thien-Thi Nguyen
   GPG key: 4C807502
   (if you're human and you know it)
      read my lisp: (responsep (questions 'technical)
                               (not (via 'mailing-list)))
                     => nil

Attachment: pgphs9Vnbzdqw.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]