Article View: gnu.emacs.bug
Article #87787print-level != nil messes up various commands
From: boris
Date: Thu, 01 Sep 1994 18:49
Date: Thu, 01 Sep 1994 18:49
111 lines
4489 bytes
4489 bytes
In GNU Emacs 19.25.95.2 (sparc-sun-sunos4.1.3, X toolkit) of Thu Sep 1 1994 on mink.cs.rochester.edu
If you try to use repeat-complex-command with print-level set to a
relatively low number, the abbreviated commands cannot be executed.
Example:
emacs -q
ESC ESC SPC (setq print-level 1)
C-x ESC ESC RET
attempts to execute (eval-expression ...), which fails.
Here's a patch & change log entry, though I don't know if it is a good one.
[And after trying this patch, I find that having print-level set
screws up byte-compiling too. I'm just going to turn it off.]
Bng (ChangeLog & patch follows .sig)
--
Boris Goldowsky The only way you'll end up in a corner
Is by walking in too straight of a li
boris@cs.rochester.edu --Claudia Schmidt n
57 Glasgow Street, Rochester, NY 14608 e
Thu Sep 1 14:16:58 1994 Boris Goldowsky <boris@cs.rochester.edu>
* simple.el (repeat-complex-command, next-history-element,
previous-matching-history-element): Override print-level when
offering command lines to edit.
*** /scratch/boris/emacs-19.25.95/lisp/simple.el.orig Fri Aug 26 17:54:48 1994
--- /scratch/boris/emacs-19.25.95/lisp/simple.el Thu Sep 1 14:28:30 1994
***************
*** 423,431 ****
(if elt
(progn
(setq newcmd
! (read-from-minibuffer
! "Redo: " (prin1-to-string elt) read-expression-map t
! (cons 'command-history arg)))
;; If command was added to command-history as a string,
;; get rid of that. We want only evallable expressions there.
--- 423,432 ----
(if elt
(progn
(setq newcmd
! (let ((print-level nil))
! (read-from-minibuffer
! "Redo: " (prin1-to-string elt) read-expression-map t
! (cons 'command-history arg))))
;; If command was added to command-history as a string,
;; get rid of that. We want only evallable expressions there.
***************
*** 512,518 ****
"No earlier matching history item")))
(if (string-match regexp
(if minibuffer-history-sexp-flag
! (prin1-to-string (nth (1- pos) history))
(nth (1- pos) history)))
(setq n (+ n (if (< n 0) 1 -1)))))
(setq minibuffer-history-position pos)
--- 513,520 ----
"No earlier matching history item")))
(if (string-match regexp
(if minibuffer-history-sexp-flag
! (let ((print-level nil))
! (prin1-to-string (nth (1- pos) history)))
(nth (1- pos) history)))
(setq n (+ n (if (< n 0) 1 -1)))))
(setq minibuffer-history-position pos)
***************
*** 519,525 ****
(erase-buffer)
(let ((elt (nth (1- pos) history)))
(insert (if minibuffer-history-sexp-flag
! (prin1-to-string elt)
elt)))
(goto-char (point-min)))
(if (or (eq (car (car command-history)) 'previous-matching-history-element)
--- 521,528 ----
(erase-buffer)
(let ((elt (nth (1- pos) history)))
(insert (if minibuffer-history-sexp-flag
! (let ((print-level nil))
! (prin1-to-string elt))
elt)))
(goto-char (point-min)))
(if (or (eq (car (car command-history)) 'previous-matching-history-element)
***************
*** 562,568 ****
(symbol-value minibuffer-history-variable))))
(insert
(if minibuffer-history-sexp-flag
! (prin1-to-string elt)
elt)))
(goto-char (point-min)))))
--- 565,572 ----
(symbol-value minibuffer-history-variable))))
(insert
(if minibuffer-history-sexp-flag
! (let ((print-level nil))
! (prin1-to-string elt))
elt)))
(goto-char (point-min)))))
Technical Details
Message-ID:
<199409011844.OAA18546@mink.cs.rochester.edu>Path:
arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!uunet!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!math.ohio-state.edu!cis.ohio-state.edu!cs.rochester.edu!borisShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,45734d9301209092,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1994-09-01 14:45:00 PST Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!uunet!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!math.ohio-state.edu!cis.ohio-state.edu!cs.rochester.edu!boris From: boris@cs.rochester.edu Newsgroups: gnu.emacs.bug Subject: print-level != nil messes up various commands Date: 1 Sep 1994 14:49:54 -0400 Organization: GNUs Not Usenet Lines: 111 Sender: daemon@cis.ohio-state.edu Approved: bug-gnu-emacs@prep.ai.mit.edu Distribution: gnu Message-ID: <199409011844.OAA18546@mink.cs.rochester.edu>