GNU bug report logs - #30078
27.0.50; Use lexical-binding for M-:

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Date: Thu, 11 Jan 2018 16:38:01 UTC

Severity: wishlist

Found in version 27.0.50

Fixed in version 27.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 30078 <at> debbugs.gnu.org
Subject: bug#30078: 27.0.50; Use lexical-binding for M-:
Date: Fri, 12 Jan 2018 18:23:34 +0100
Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:

>  (defun command-line-1 (args-left)
>    "A subroutine of `command-line'."
>    (display-startup-echo-area-message)
> @@ -2485,7 +2491,7 @@ command-line-1
>      (when (eq initial-buffer-choice t)
>        ;; When `initial-buffer-choice' equals t make sure that *scratch*
>        ;; exists.
> -      (get-buffer-create "*scratch*"))
> +      (startup--get-buffer-create-scratch))
>  
>      ;; If *scratch* exists and is empty, insert initial-scratch-message.
>      ;; Do this before switching to *scratch* below to handle bug#9605.

Don't you also want to change this occurrence in `command-line'?

#+begin_src emacs-lisp
  ;; If *scratch* exists and init file didn't change its mode, initialize it.
  (if (get-buffer "*scratch*")
      (with-current-buffer "*scratch*"
	(if (eq major-mode 'fundamental-mode)
	    (funcall initial-major-mode))))
#+end_src

So far, lexical-binding in *scratch* is nil with emacs -Q with your
patch.

Maybe also check that evaluating the expression `lexical-binding'
returns a result that is consistent with the evaluation behavior.  In
particular, evaluating lexical-binding in M-x ielm RET still gives nil -
that's confusing.


Michael. 




This bug report was last modified 6 years and 24 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.