unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Thien-Thi Nguyen <ttn@glug.org>
Subject: Re: beginner el form
Date: Sat, 30 Apr 2005 08:22:52 +0200	[thread overview]
Message-ID: <7ebr7weqbn.fsf@ada2.unipv.it> (raw)
In-Reply-To: v0xzmvhz55r.fsf@fsui03.fnal.gov

Alan Wehmann <wehmann@fnal.gov> writes:

> You should have a *scratch* buffer automatically present.
> That is in the proper mode.

another way is to explictly create one:

C-x b hack RET
M-x lisp-interaction-mode RET

for example, below is some code that bundles this approach
in a convenient (and sometimes cathartic ;-) command.

thi

______________________________________
;;; give-me-a-scratch-buffer-now.el
;;;
;;; Rel:v-1-51
;;;
;;; Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998,2004 Thien-Thi Nguyen
;;; This file is part of ttn's personal elisp library, released under GNU
;;; GPL with ABSOLUTELY NO WARRANTY.  See the file COPYING for details.

;;; Description: Find *scratch* buffer; put it in lisp-interaction-mode.
;;; Prefix arg guarantees new buffer.

;;;###autoload
(defun give-me-a-scratch-buffer-now (want-new)
  "Bring up *scratch* or younger siblings if prefixed."
  (interactive "P")

  (switch-to-buffer
   (if want-new
       (generate-new-buffer "*scratch*")
     "*scratch*"))
  (lisp-interaction-mode))

(provide 'give-me-a-scratch-buffer-now)

;;; give-me-a-scratch-buffer-now.el ends here

  reply	other threads:[~2005-04-30  6:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-04 14:00 beginner el form Adam
2005-04-03 22:23 ` Johan Bockgård
2005-04-04  4:49 ` B.T. Raven
2005-04-04  6:13 ` Steinar Børmer
2005-04-04 21:54 ` Adam
2005-04-04  8:04   ` Thien-Thi Nguyen
2005-04-04 12:35     ` Albert Reiner
2005-04-05 12:10       ` Adam
2005-04-29 20:42 ` Alan Wehmann
2005-04-30  6:22   ` Thien-Thi Nguyen [this message]
2005-05-01  0:47     ` Adam
2005-04-30 10:57       ` Thien-Thi Nguyen
2005-05-01  3:39         ` Joe Corneli
     [not found]         ` <mailman.1.1114919653.2819.help-gnu-emacs@gnu.org>
2005-05-02  2:18           ` Adam
2005-05-01 10:37             ` Tim X
2005-05-01 15:50             ` Thien-Thi Nguyen
2005-05-03 11:09             ` Phillip Lord
2005-05-05  0:13               ` Adam
2005-05-04 10:14                 ` Phillip Lord
2005-05-01  2:42       ` Tim X

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7ebr7weqbn.fsf@ada2.unipv.it \
    --to=ttn@glug.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).