unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#21201: 25.0.50; (buffer-modified-p) errors inside cl-letf
@ 2015-08-06 19:47 Artur Malabarba
  2015-08-06 20:07 ` Nicolas Richard
  0 siblings, 1 reply; 6+ messages in thread
From: Artur Malabarba @ 2015-08-06 19:47 UTC (permalink / raw)
  To: 21201

From emacs -Q, run the following:

(cl-letf (((buffer-modified-p)))
  (insert "ookok"))

You'll get an error from trying to set a nil buffer.

Using `(buffer-modified-p (current-buffer))' instead works.

Backtrace:
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  set-buffer(nil)
  (save-current-buffer (set-buffer nil) (set-buffer-modified-p old))
  (unwind-protect (insert "ookok") (save-current-buffer (set-buffer
nil) (set-buffer-modified-p old)))
  (let* ((old (buffer-modified-p))) (unwind-protect (insert "ookok")
(save-current-buffer (set-buffer nil) (set-buffer-modified-p old))))
  eval((let* ((old (buffer-modified-p))) (unwind-protect (insert
"ookok") (save-current-buffer (set-buffer nil) (set-buffer-modified-p
old)))) nil)
  elisp--eval-last-sexp(nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-08-28  0:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-06 19:47 bug#21201: 25.0.50; (buffer-modified-p) errors inside cl-letf Artur Malabarba
2015-08-06 20:07 ` Nicolas Richard
2015-08-06 21:44   ` Artur Malabarba
2015-08-06 22:50     ` Nicolas Richard
2018-07-17 12:16       ` Noam Postavsky
2018-08-28  0:01         ` Noam Postavsky

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