bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#48798: 26.3; `define-minor-mode': Message should name the current bu


From: Drew Adams
Subject: bug#48798: 26.3; `define-minor-mode': Message should name the current buffer where enabled/disabled
Date: Wed, 2 Jun 2021 19:36:22 +0000

A user can easily think s?he's in one window when another is actually
selected.  Or s?he can think that the buffer in the selected window is a
different one from what it actually is.

The confirmation/status message you get when you toggle a (local) minor
mode just tells you that the mode is enabled or disabled "in the current
buffer".  It should provide more help than that, naming the buffer.
That confirms what you expected or lets you know that you were wrong
about your expectation.

For example, when you use `C-x C-q', it's better to see "Read-Only mode
enabled in buffer `foobar'" than it is to see "Read-Only mode enabled in
current buffer".  Just that bit of information and reassurance can help.

Without bothering with a complete patch, I think this is the only code
change needed, in library `easy-mmode.el':

  (let ((local ,(if globalp "" " in current buffer")))

should be 

  (let ((local ,(if globalp
                    ""
                  '(format " in buffer `%s'" (current-buffer)))))

In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)
 of 2019-08-29
Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd
Windowing system distributor `Microsoft Corp.', version 10.0.19041
Configured using:
 `configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''






reply via email to

[Prev in Thread] Current Thread [Next in Thread]