[Top][All Lists]

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

Re: Emacs configuration

From: Jesper Harder
Subject: Re: Emacs configuration
Date: Tue, 01 Oct 2002 16:09:04 +0200
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-redhat-linux-gnu)

"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? ")

(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'?

reply via email to

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