From: Juanma Barranquero <lektu@mi.madritel.es>
Subject: Re: IELM prompt
Date: Sun, 25 Apr 2004 02:40:18 +0200 [thread overview]
Message-ID: <20040425021531.5172.LEKTU@mi.madritel.es> (raw)
In-Reply-To: <200404242351.i3ONphr17120@raven.dms.auburn.edu>
Related to the read-onliness of the IELM prompt:
M-x ielm =>
* Welcome to IELM *** Type (describe-mode) for help.
ELISP>
C-c C-c =>
Process ielm interrupt
M-x ielm =>
*** Welcome to IELM *** Type (describe-mode) for help.
with no prompt, and a message: "Text is read-only".
A way to fix it is with the attached patch, which:
- wraps the insertion of the header on a
(let ((inhibit-read-only t))
...)
- adds a call to (goto-char (point-max)) at the end of `ielm',
because, as it stands, `inferior-emacs-lisp-mode' can not change the
point when invoked from inside the *ielm* buffer (as happens while
restarting the ielm process).
Personally, I think it'd be better to just do
(when (= (point-min) (point-max))
;; Add a silly header
(insert ielm-header)
...)
and *not* insert the header when restarting the process, just when the
*ielm* buffer is created the first time around.
Opinions?
/L/e/k/t/u
Index: ielm.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ielm.el,v
retrieving revision 1.38
diff -u -2 -r1.38 ielm.el
--- ielm.el 24 Apr 2004 22:56:34 -0000 1.38
+++ ielm.el 25 Apr 2004 00:32:15 -0000
@@ -519,7 +519,9 @@
(ielm-set-pm (point-max))
(unless comint-use-prompt-regexp-instead-of-fields
- (add-text-properties
- (point-min) (point-max)
- '(rear-nonsticky t field output inhibit-line-move-field-capture t)))
+ (let ((inhibit-read-only t))
+ (add-text-properties
+ (point-min) (point-max)
+ '(rear-nonsticky t field output inhibit-line-move-field-capture t))))
+
(comint-output-filter (ielm-process) ielm-prompt)
(set-marker comint-last-input-start (ielm-pm))
@@ -551,5 +553,6 @@
(set-buffer (get-buffer-create "*ielm*"))
(inferior-emacs-lisp-mode)))
- (pop-to-buffer "*ielm*"))
+ (pop-to-buffer "*ielm*")
+ (goto-char (point-max)))
(provide 'ielm)
next prev parent reply other threads:[~2004-04-25 0:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-23 2:09 IELM prompt Luc Teirlinck
2004-04-23 2:19 ` Luc Teirlinck
2004-04-23 3:14 ` Luc Teirlinck
2004-04-23 11:22 ` Juanma Barranquero
2004-04-23 22:59 ` Luc Teirlinck
2004-04-24 23:31 ` Juanma Barranquero
2004-04-24 23:51 ` Luc Teirlinck
2004-04-25 0:40 ` Juanma Barranquero [this message]
2004-04-25 1:27 ` Luc Teirlinck
2004-04-25 16:34 ` Juanma Barranquero
2004-04-25 19:35 ` Luc Teirlinck
2004-04-25 20:05 ` Juanma Barranquero
2004-04-24 14:27 ` Richard Stallman
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040425021531.5172.LEKTU@mi.madritel.es \
--to=lektu@mi.madritel.es \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.