* bug#24780: 26.0.50; describe-mode lexical-binding
@ 2016-10-24 9:13 Andreas Röhler
[not found] ` <mailman.2389.1564232406.2688.bug-gnu-emacs@gnu.org>
2019-07-27 12:58 ` Lars Ingebrigtsen
0 siblings, 2 replies; 12+ messages in thread
From: Andreas Röhler @ 2016-10-24 9:13 UTC (permalink / raw)
To: 24780
Hi,
consider it useful if `describe-mode' reports value of var
`lexical-binding'.
Even displaying it in mode-line might be an option.
Thanks,
Andreas
In GNU Emacs 26.0.50.1 (i686-pc-linux-gnu, GTK+ Version 3.14.5)
of 2016-10-11
Repository revision: 8b4aebf4559522d19193cc19cc8a255e764a8676
Windowing system distributor 'The X.Org Foundation', version 11.0.11604000
System Description: Debian GNU/Linux 8.6 (jessie)
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list...
a=a-value b=new-b-value c=c-value d=new-d-value
Type C-x 1 to delete the help window, C-M-v to scroll help.
Page has 34 lines (0 + 34)
user-error: No previous help buffer
e is undefined
x is undefined
Mark set
Mark saved where search started
Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS NOTIFY ACL GNUTLS
LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11
Important settings:
value of $LANG: de_DE.utf8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
Major mode: Emacs-Lisp
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message subr-x puny seq byte-opt gv
bytecomp byte-compile cconv dired dired-loaddefs format-spec rfc822 mml
mml-sec password-cache epa derived epg epg-config gnus-util rmail
rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils misearch multi-isearch cl-extra help-fns
radix-tree help-mode easymenu cl-loaddefs pcase cl-lib time-date
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev
obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face
macroexp files text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
dbusbind inotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)
Memory information:
((conses 8 171502 10130)
(symbols 24 38666 0)
(miscs 20 111 202)
(strings 16 54056 5227)
(string-bytes 1 888586)
(vectors 8 13890)
(vector-slots 4 477450 6294)
(floats 8 188 36)
(intervals 28 630 24)
(buffers 520 14)
(heap 1024 19082 955))
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#24780: 26.0.50; describe-mode lexical-binding
[not found] ` <mailman.2389.1564232406.2688.bug-gnu-emacs@gnu.org>
@ 2019-07-27 12:19 ` Alan Mackenzie
2020-08-12 1:06 ` Stefan Kangas
0 siblings, 1 reply; 12+ messages in thread
From: Alan Mackenzie @ 2019-07-27 12:19 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 24780
Hello, Lars.
In article <mailman.2389.1564232406.2688.bug-gnu-emacs@gnu.org> you wrote:
> Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
>> consider it useful if `describe-mode' reports value of var
>> `lexical-binding'.
> Hm... That command describes the mode, and whether the current .el file
> uses lexical binding or not isn't really tied to the mode, so I think
> that sounds a bit confusing. The user may believe that we're talking
> about whether the mode uses lexical binding or not.
>> Even displaying it in mode-line might be an option.
> That does sound more useful -- I often find jumping back to the start of
> the buffer to check.
> `emacs-lisp-mode' could display that somewhere in the mode line, I
> guess? But where? Perhaps among the U:**- thing at the start? Or in
> the mode stuff?
> So instead of
> (Emacs-Lisp)
> we'd get
> (Emacs-Lisp Lexical)
> when we have lexical binding in the current buffer? Does anybody have
> an opinion here?
Yes. "Lexical" is too long, considering its relative lack of
importance. Space on the mode line is precious, particularly when
running Follow Mode. Also, "Lexical" isn't really a minor mode, so
shouldn't look like one.
How about, instead,
(Emacs-Lisp/L)
or
(Emacs-Lisp/D)
? Even that is going to be a nuisance to some people, so it really
needs a user option to turn it off.
> --
> (domestic pets only, the antidote for overdose, milk.)
> bloggy blog: http://lars.ingebrigtsen.no
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#24780: 26.0.50; describe-mode lexical-binding
2016-10-24 9:13 bug#24780: 26.0.50; describe-mode lexical-binding Andreas Röhler
[not found] ` <mailman.2389.1564232406.2688.bug-gnu-emacs@gnu.org>
@ 2019-07-27 12:58 ` Lars Ingebrigtsen
2019-07-27 13:10 ` Noam Postavsky
1 sibling, 1 reply; 12+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-27 12:58 UTC (permalink / raw)
To: Andreas Röhler; +Cc: 24780
Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
> consider it useful if `describe-mode' reports value of var
> `lexical-binding'.
Hm... That command describes the mode, and whether the current .el file
uses lexical binding or not isn't really tied to the mode, so I think
that sounds a bit confusing. The user may believe that we're talking
about whether the mode uses lexical binding or not.
> Even displaying it in mode-line might be an option.
That does sound more useful -- I often find jumping back to the start of
the buffer to check.
`emacs-lisp-mode' could display that somewhere in the mode line, I
guess? But where? Perhaps among the U:**- thing at the start? Or in
the mode stuff?
So instead of
(Emacs-Lisp)
we'd get
(Emacs-Lisp Lexical)
when we have lexical binding in the current buffer? Does anybody have
an opinion here?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#24780: 26.0.50; describe-mode lexical-binding
2019-07-27 12:58 ` Lars Ingebrigtsen
@ 2019-07-27 13:10 ` Noam Postavsky
2019-07-27 16:42 ` Lars Ingebrigtsen
2019-07-27 17:12 ` Drew Adams
0 siblings, 2 replies; 12+ messages in thread
From: Noam Postavsky @ 2019-07-27 13:10 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 24780
Lars Ingebrigtsen <larsi@gnus.org> writes:
>> Even displaying it in mode-line might be an option.
>
> That does sound more useful -- I often find jumping back to the start of
> the buffer to check.
> (Emacs-Lisp Lexical)
>
> when we have lexical binding in the current buffer? Does anybody have
> an opinion here?
IMO it's not worth spending space on the mode line for this. Yeah,
sometimes I want to check, and M-< followed by C-u C-SPC to go back
works fine for that.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#24780: 26.0.50; describe-mode lexical-binding
2019-07-27 13:10 ` Noam Postavsky
@ 2019-07-27 16:42 ` Lars Ingebrigtsen
2019-07-27 17:12 ` Drew Adams
1 sibling, 0 replies; 12+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-27 16:42 UTC (permalink / raw)
To: Noam Postavsky; +Cc: 24780
Noam Postavsky <npostavs@gmail.com> writes:
> IMO it's not worth spending space on the mode line for this. Yeah,
> sometimes I want to check, and M-< followed by C-u C-SPC to go back
> works fine for that.
OK, there doesn't seem to be much enthusiasm for putting this in our
precious mode line real estate, and I concur.
But I had another look at `describe-mode', and contrary to what I
believed, it does include stuff that's not directly mode-related. In
particular:
;; Narrowing is not a minor mode, but its indicator is part of
;; mode-line-modes.
(when (buffer-narrowed-p)
(push '(narrow-to-region "Narrow" " Narrow") minor-modes))
So perhaps it'd be an idea to do the same with `lexical-binding'?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#24780: 26.0.50; describe-mode lexical-binding
2019-07-27 13:10 ` Noam Postavsky
2019-07-27 16:42 ` Lars Ingebrigtsen
@ 2019-07-27 17:12 ` Drew Adams
1 sibling, 0 replies; 12+ messages in thread
From: Drew Adams @ 2019-07-27 17:12 UTC (permalink / raw)
To: Noam Postavsky, Lars Ingebrigtsen; +Cc: 24780
> >> Even displaying it in mode-line might be an option.
> >
> > That does sound more useful -- I often find jumping back to the start
> > of the buffer to check.
>
> > (Emacs-Lisp Lexical)
> >
> > when we have lexical binding in the current buffer? Does anybody
> > have an opinion here?
>
> IMO it's not worth spending space on the mode line for this. Yeah,
> sometimes I want to check, and M-< followed by C-u C-SPC to go back
> works fine for that.
+10. YAGNI.
Emacs itself should avoid adding more stuff to the
mode line. It should be conservative about that.
In addition to `M-< C-u C-SPC', it's trivial and
quick to do `C-h v lex TAB'.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#24780: 26.0.50; describe-mode lexical-binding
2019-07-27 12:19 ` Alan Mackenzie
@ 2020-08-12 1:06 ` Stefan Kangas
2020-08-12 10:52 ` Lars Ingebrigtsen
0 siblings, 1 reply; 12+ messages in thread
From: Stefan Kangas @ 2020-08-12 1:06 UTC (permalink / raw)
To: Alan Mackenzie; +Cc: Lars Ingebrigtsen, 24780
Alan Mackenzie <acm@muc.de> writes:
>> Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
>
>>> consider it useful if `describe-mode' reports value of var
>>> `lexical-binding'.
[...]
>>> Even displaying it in mode-line might be an option.
>
>> That does sound more useful -- I often find jumping back to the start of
>> the buffer to check.
>
>> `emacs-lisp-mode' could display that somewhere in the mode line, I
>> guess? But where? Perhaps among the U:**- thing at the start? Or in
>> the mode stuff?
>
>> So instead of
>
>> (Emacs-Lisp)
>
>> we'd get
>
>> (Emacs-Lisp Lexical)
>
>> when we have lexical binding in the current buffer? Does anybody have
>> an opinion here?
>
> Yes. "Lexical" is too long, considering its relative lack of
> importance. Space on the mode line is precious, particularly when
> running Follow Mode. Also, "Lexical" isn't really a minor mode, so
> shouldn't look like one.
>
> How about, instead,
>
> (Emacs-Lisp/L)
>
> or
>
> (Emacs-Lisp/D)
How about:
(Emacs-Lisp)
And:
(Emacs-Lisp/D)
This would indicate the legacy nature of dynamic binding, and gently
nudge users to move to lexical-binding.
> ? Even that is going to be a nuisance to some people, so it really
> needs a user option to turn it off.
I wouldn't add a user option. The correct way to get rid of the "/D",
if it bothers you, would then be to convert the code to
lexical-binding.
Best regards,
Stefan Kangas
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#24780: 26.0.50; describe-mode lexical-binding
2020-08-12 1:06 ` Stefan Kangas
@ 2020-08-12 10:52 ` Lars Ingebrigtsen
2020-08-12 10:56 ` Lars Ingebrigtsen
0 siblings, 1 reply; 12+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-12 10:52 UTC (permalink / raw)
To: Stefan Kangas; +Cc: Alan Mackenzie, 24780
Stefan Kangas <stefan@marxist.se> writes:
> How about:
>
> (Emacs-Lisp)
>
> And:
>
> (Emacs-Lisp/D)
>
> This would indicate the legacy nature of dynamic binding, and gently
> nudge users to move to lexical-binding.
That's a very good idea, I think.
>> ? Even that is going to be a nuisance to some people, so it really
>> needs a user option to turn it off.
>
> I wouldn't add a user option. The correct way to get rid of the "/D",
> if it bothers you, would then be to convert the code to
> lexical-binding.
Heh heh. Nice.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#24780: 26.0.50; describe-mode lexical-binding
2020-08-12 10:52 ` Lars Ingebrigtsen
@ 2020-08-12 10:56 ` Lars Ingebrigtsen
2020-08-12 13:10 ` Stefan Kangas
0 siblings, 1 reply; 12+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-12 10:56 UTC (permalink / raw)
To: Stefan Kangas; +Cc: Alan Mackenzie, 24780
Lars Ingebrigtsen <larsi@gnus.org> writes:
>> This would indicate the legacy nature of dynamic binding, and gently
>> nudge users to move to lexical-binding.
>
> That's a very good idea, I think.
Heh. I should look at the mode line more -- it currently says "Elisp/l"
and "Elisp/d" with a ugly orange on the "/d", so I guess somebody
already fixed this without us noticing?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#24780: 26.0.50; describe-mode lexical-binding
2020-08-12 10:56 ` Lars Ingebrigtsen
@ 2020-08-12 13:10 ` Stefan Kangas
2020-08-12 13:14 ` Lars Ingebrigtsen
0 siblings, 1 reply; 12+ messages in thread
From: Stefan Kangas @ 2020-08-12 13:10 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Alan Mackenzie, Stefan Monnier, 24780
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>>> This would indicate the legacy nature of dynamic binding, and gently
>>> nudge users to move to lexical-binding.
>>
>> That's a very good idea, I think.
>
> Heh. I should look at the mode line more -- it currently says "Elisp/l"
> and "Elisp/d" with a ugly orange on the "/d", so I guess somebody
> already fixed this without us noticing?
I missed that due to diminish, which changes it to "el" for me in both
cases. But you are correct now that I'm trying emacs -Q.
This was added in:
commit 620f672518b1c009a028ebdb0fd1d4a0aabfa1d0
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Date: Tue Mar 3 11:34:49 2020 -0500
* lisp/progmodes/elisp-mode.el (elisp-enable-lexical-binding): New command
(emacs-lisp-mode): Indicate lex/dyn binding mode in the mode line.
(elisp--dynlex-modeline-map): New var.
We could of course still change it to "Elisp" for the "Elisp/l" case.
Or we could just close this bug.
Best regards,
Stefan Kangas
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#24780: 26.0.50; describe-mode lexical-binding
2020-08-12 13:10 ` Stefan Kangas
@ 2020-08-12 13:14 ` Lars Ingebrigtsen
2020-08-12 14:03 ` Stefan Kangas
0 siblings, 1 reply; 12+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-12 13:14 UTC (permalink / raw)
To: Stefan Kangas; +Cc: Alan Mackenzie, Stefan Monnier, 24780
Stefan Kangas <stefan@marxist.se> writes:
> We could of course still change it to "Elisp" for the "Elisp/l" case.
> Or we could just close this bug.
I think "Elisp/l" is fine (for the time being; we can remove the "/l" in
some years).
So I've already closed the bug. :-)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#24780: 26.0.50; describe-mode lexical-binding
2020-08-12 13:14 ` Lars Ingebrigtsen
@ 2020-08-12 14:03 ` Stefan Kangas
0 siblings, 0 replies; 12+ messages in thread
From: Stefan Kangas @ 2020-08-12 14:03 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Alan Mackenzie, Stefan Monnier, 24780
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Stefan Kangas <stefan@marxist.se> writes:
>
>> We could of course still change it to "Elisp" for the "Elisp/l" case.
>> Or we could just close this bug.
>
> I think "Elisp/l" is fine (for the time being; we can remove the "/l" in
> some years).
>
> So I've already closed the bug. :-)
Sounds good, thanks.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2020-08-12 14:03 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-24 9:13 bug#24780: 26.0.50; describe-mode lexical-binding Andreas Röhler
[not found] ` <mailman.2389.1564232406.2688.bug-gnu-emacs@gnu.org>
2019-07-27 12:19 ` Alan Mackenzie
2020-08-12 1:06 ` Stefan Kangas
2020-08-12 10:52 ` Lars Ingebrigtsen
2020-08-12 10:56 ` Lars Ingebrigtsen
2020-08-12 13:10 ` Stefan Kangas
2020-08-12 13:14 ` Lars Ingebrigtsen
2020-08-12 14:03 ` Stefan Kangas
2019-07-27 12:58 ` Lars Ingebrigtsen
2019-07-27 13:10 ` Noam Postavsky
2019-07-27 16:42 ` Lars Ingebrigtsen
2019-07-27 17:12 ` Drew Adams
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.