From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jesper Harder Newsgroups: gmane.emacs.help Subject: Re: Emacs configuration Date: Tue, 01 Oct 2002 16:09:04 +0200 Organization: http://purl.org/harder/ Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1033482422 13717 127.0.0.1 (1 Oct 2002 14:27:02 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 1 Oct 2002 14:27:02 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17wNzI-0003Ym-00 for ; Tue, 01 Oct 2002 16:27:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17wNzX-0006UV-00; Tue, 01 Oct 2002 10:27:15 -0400 Original-Path: shelby.stanford.edu!nntp.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!news.tele.dk!not-for-mail Original-Newsgroups: gnu.emacs.help X-Face: ^RrvqCr7c,P$zTR:QED"@h9+BTm-"fjZJJ-3=OU7.)i/K]<.J88}s>'Z_$r; List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:2136 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2136 "arthur.chereau" writes: >> You can change the command from `print-buffer' to `ps-print-buffer' >> like this: > >> (setf (nth 3 (assoc 'print-buffer tool-bar-map)) 'ps-print-buffer) > > Unfortunately I get the following error when I try this: Symbol's > function definition is void: setf Right, setf is defined in cl, try this: (require 'cl) (setf (nth 3 (assoc 'print-buffer tool-bar-map)) 'a2ps-buffer) > In fact I would like to keep the print-buffer and ps-print-buffer > commands, but to attach a2ps-buffer to the printer icon. Yep, that's what it does. >> > - How is it possible to force emacs to confirm when killing the >> > *scratch* buffer ? > > Unfortunately this doesn't work either. When I just call $ emacs then > type in and C-x C-c, emacs dies without prompting to save the buffer. Try this instead: (defun jh-setup-scratch () (with-current-buffer "*scratch*" (setq buffer-offer-save t) (make-local-variable 'kill-buffer-query-functions) (setq kill-buffer-query-functions (list (lambda () (if (buffer-modified-p) (y-or-n-p "Really kill buffer? ") t)))))) (add-hook 'emacs-startup-hook 'jh-setup-scratch) > I tried to put some variants of > (setq user-init-file ".emacs.d/.emacs") > in site-start.el, but it didn't work, maybe for the same reason the > previous setq had no effect. I think that should be (setq user-init-file "/path/to/home/.emacs.d/.emacs") What do you see when you do `C-h v user-init-file'?