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

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

Re: Replace tool-bar print-buffer with ps-print-buffer-faces?


From: Kevin Rodgers
Subject: Re: Replace tool-bar print-buffer with ps-print-buffer-faces?
Date: Tue, 03 Apr 2007 20:53:06 -0600
User-agent: Thunderbird 1.5.0.10 (Macintosh/20070221)

Reiner Steib wrote:
Hi,

I wonder what's the best way to _replace_ `print-buffer' in the tool
bar [1] with with `ps-print-buffer-faces'?

Frobbing `tool-bar-map' should work[2] but it's there a cleaner and
more simple way?

(define-key tool-bar-map
  (where-is-internal 'print-buffer tool-bar-map 'non-ascii)
  'ps-print-buffer)

Bye, Reiner.

[1]
,----[ `<f1> k <tool-bar> <print-buffer>' ]
| <tool-bar> <print-buffer> runs the command print-buffer
|   which is an interactive autoloaded Lisp function in `lpr'.
| It is bound to <menu-bar> <file> <print-buffer>.
| (print-buffer)
`----

[2]
ELISP> (assoc 'print-buffer tool-bar-map)
(print-buffer menu-item "Print Buffer" print-buffer
              (nil)
              :enable
              (menu-bar-menu-frame-live-and-visible-p)
              :help "Print current buffer with page headings" :image
              (image :type xpm :file "[...]/etc/images/print.xpm"))

==> (setcdr (assoc 'print-buffer tool-bar-map) [new entry])

--
Kevin Rodgers
Denver, Colorado, USA





reply via email to

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