From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.help Subject: Re: Replace tool-bar print-buffer with ps-print-buffer-faces? Date: Wed, 04 Apr 2007 20:24:08 +0200 Message-ID: References: Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1175711895 27924 80.91.229.12 (4 Apr 2007 18:38:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 4 Apr 2007 18:38:15 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 04 20:38:07 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HZAMt-0001t4-C5 for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Apr 2007 20:38:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HZAQA-00005V-KW for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Apr 2007 14:41:26 -0400 Original-Newsgroups: gnu.emacs.help X-Face: P05mdcZT&lL[-s2=mw~RsllZ0zZAb?vdE}.s List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:42428 Archived-At: On Wed, Apr 04 2007, Kevin Rodgers wrote: > 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) When I eval this, the print button just disappears: 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 "[prefix]/share/emacs/22.0.97/etc/images/print.xpm")) ELISP> (define-key tool-bar-map (where-is-internal 'print-buffer tool-bar-map 'non-ascii) 'ps-print-buffer) ps-print-buffer ELISP> (assoc 'print-buffer tool-bar-map) (print-buffer . ps-print-buffer) Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/