unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* ielm-prompt read-only and customizable
@ 2002-02-18  9:55 Juanma Barranquero
  0 siblings, 0 replies; only message in thread
From: Juanma Barranquero @ 2002-02-18  9:55 UTC (permalink / raw)


This patch makes ielm-prompt be read-only, which seems like a sensible
thing to do (other prompts, like eshell's, are already read-only).

It also makes it customizable, so the read-only status of the prompt can
be automatically enforced.


                                                           /L/e/k/t/u



2002-02-18  Juanma Barranquero  <lektu@terra.es>

	* ielm.el (ielm-prompt): Allow customization; make it read-only.



Index: ielm.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ielm.el,v
retrieving revision 1.22
diff -u -r1.22 ielm.el
--- ielm.el	10 Oct 2000 17:27:38 -0000	1.22
+++ ielm.el	18 Feb 2002 09:51:38 -0000
@@ -70,8 +70,12 @@
   :type 'boolean
   :group 'ielm)
 
-(defvar ielm-prompt "ELISP> "
-  "Prompt used in IELM.")
+(defcustom ielm-prompt "ELISP> "
+  "Prompt used in IELM."
+  :type 'string
+  :group 'ielm
+  :get #'(lambda (symbol) (substring-no-properties (symbol-value symbol)))
+  :set #'(lambda (symbol value) (set symbol (propertize value 'read-only t 'rear-nonsticky t))))
 
 (defcustom ielm-dynamic-return t
   "*Controls whether \\<ielm-map>\\[ielm-return] has intelligent behaviour in IELM.


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-02-18  9:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-18  9:55 ielm-prompt read-only and customizable Juanma Barranquero

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).