[Top][All Lists]

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

Re: Splash screen on tty

From: Håkan Granath
Subject: Re: Splash screen on tty
Date: Fri, 2 Nov 2001 21:09:39 +0100 (MET)

On Fri, 2 Nov 2001, Eli Zaretskii wrote:

> Could you please provide a compete recipe to reproduce this problem?
> I understand this requires some customizations in .emacs; if so,
> please provide a minimal .emacs file required to reproduce the
> problem.

Oops.  I guess I was messing too much with the scratch buffer in
my (too large) .emacs file.  For reference I include a minimal
file which gives the problem, but I guess it is not very relevant.

Sorry for wasting your time.


PS. I got this code from some newsgroup, I don't know who originally wrote
it. It is really nice though. DS

(global-font-lock-mode t)
;; If the *scratch* buffer is killed, recreate it automatically
  (set-buffer (get-buffer-create "*scratch*"))
  (make-local-variable 'kill-buffer-query-functions)
  (add-hook 'kill-buffer-query-functions 'kill-scratch-buffer))
(defun kill-scratch-buffer ()
  ;; Kill the current (*scratch*) buffer
  (remove-hook 'kill-buffer-query-functions 'kill-scratch-buffer)
  (kill-buffer (current-buffer))
  ;; Make a brand new *scratch* buffer
  (set-buffer (get-buffer-create "*scratch*"))
  (make-local-variable 'kill-buffer-query-functions)
  (add-hook 'kill-buffer-query-functions 'kill-scratch-buffer)
  ;; Since we killed it, don't let caller do that.
(find-file "~/.emacs")
(switch-to-buffer "*scratch*")

reply via email to

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