From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Herbert Euler" Newsgroups: gmane.emacs.help Subject: Re: Replace tool-bar print-buffer with ps-print-buffer-faces? Date: Thu, 05 Apr 2007 10:06:53 +0800 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: sea.gmane.org 1175738837 16263 80.91.229.12 (5 Apr 2007 02:07:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 5 Apr 2007 02:07:17 +0000 (UTC) To: Reiner.Steib@gmx.de, help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 05 04:07:15 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 1HZHNa-0000wD-Mp for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Apr 2007 04:07:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HZHQu-0004uQ-82 for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Apr 2007 22:10:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HZHQh-0004uK-L1 for help-gnu-emacs@gnu.org; Wed, 04 Apr 2007 22:10:27 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HZHQf-0004u6-4O for help-gnu-emacs@gnu.org; Wed, 04 Apr 2007 22:10:26 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HZHQe-0004u2-V7 for help-gnu-emacs@gnu.org; Wed, 04 Apr 2007 22:10:24 -0400 Original-Received: from bay0-omc3-s13.bay0.hotmail.com ([65.54.246.213]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HZHNK-0007uV-IL for help-gnu-emacs@gnu.org; Wed, 04 Apr 2007 22:06:58 -0400 Original-Received: from hotmail.com ([65.55.154.103]) by bay0-omc3-s13.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Wed, 4 Apr 2007 19:06:56 -0700 Original-Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 4 Apr 2007 19:06:56 -0700 Original-Received: from 65.55.154.123 by by143fd.bay143.hotmail.msn.com with HTTP; Thu, 05 Apr 2007 02:06:53 GMT X-Originating-IP: [216.145.54.158] X-Originating-Email: [herberteuler@hotmail.com] X-Sender: herberteuler@hotmail.com In-Reply-To: X-OriginalArrivalTime: 05 Apr 2007 02:06:56.0703 (UTC) FILETIME=[166D24F0:01C77727] X-detected-kernel: Windows 2000 SP4, XP SP1+ X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor 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:42435 Archived-At: >(define-key tool-bar-map > [print-buffer] > `(menu-item "Print Buffer with Faces" > ps-print-buffer-with-faces > (nil) > :enable > (menu-bar-menu-frame-live-and-visible-p) > :help "Print current buffer with faces" > :image (image :type xpm :file > ,(image-search-load-path "print.xpm"))) You forgot a comma here: there should be one before `menu-bar-menu-frame-live-and-visible-p': (define-key tool-bar-map [print-buffer] `(menu-item "Print Buffer with Faces" ps-print-buffer-with-faces (nil) :enable ,(menu-bar-menu-frame-live-and-visible-p) :help "Print current buffer with faces" :image (image :type xpm :file ,(image-search-load-path "print.xpm"))) >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) You have to provide *all* the fields in order to keep the icon. Regards, Guanpeng Xu _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/