unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#12174: 24.1.50; C-h f and non-symbol remap targets
@ 2012-08-10 21:55 Christopher Schmidt
  2012-08-14 18:12 ` Christopher Schmidt
  0 siblings, 1 reply; 7+ messages in thread
From: Christopher Schmidt @ 2012-08-10 21:55 UTC (permalink / raw)
  To: 12174

[-- Attachment #1: Type: text/plain, Size: 335 bytes --]

    (global-set-key [remap write-file] (lambda () (interactive) 'rms))
    C-h f write-file RET

This yields in an error because help-fns--key-bindings expects
(command-remapping 'write-file) to be a symbol.

Here is a patch that abbreviates non-symbol remap targets with "??".
This is consistent with what describe-bindings displays.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: help-fns--key-bindings.diff --]
[-- Type: text/x-diff, Size: 891 bytes --]

=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog	2012-08-10 21:03:10 +0000
+++ lisp/ChangeLog	2012-08-10 21:53:48 +0000
@@ -1,3 +1,8 @@
+2012-08-10  Christopher Schmidt  <christopher@ch.ristopher.com>
+
+	* help-fns.el (help-fns--key-bindings): Abbreviate non-symbol
+	remap targets with ?? (Bug#).
+
 2012-08-10  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* emacs-lisp/rx.el (rx-constituents): Don't define as constant.

=== modified file 'lisp/help-fns.el'
--- lisp/help-fns.el	2012-08-06 21:05:48 +0000
+++ lisp/help-fns.el	2012-08-10 21:28:18 +0000
@@ -398,7 +398,7 @@
                   (push key non-modified-keys)))
             (when remapped
               (princ "Its keys are remapped to `")
-              (princ (symbol-name remapped))
+              (princ (if (symbolp remapped) (symbol-name remapped) "??"))
               (princ "'.\n"))
 
             (when keys


[-- Attachment #3: Type: text/plain, Size: 21 bytes --]


        Christopher

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

* bug#12174: 24.1.50; C-h f and non-symbol remap targets
  2012-08-10 21:55 bug#12174: 24.1.50; C-h f and non-symbol remap targets Christopher Schmidt
@ 2012-08-14 18:12 ` Christopher Schmidt
  2012-08-15  2:38   ` Stefan Monnier
  0 siblings, 1 reply; 7+ messages in thread
From: Christopher Schmidt @ 2012-08-14 18:12 UTC (permalink / raw)
  To: 12174

[-- Attachment #1: Type: text/plain, Size: 242 bytes --]

Christopher Schmidt <christopher@ch.ristopher.com> writes:
> Here is a patch that abbreviates non-symbol remap targets with "??".
> This is consistent with what describe-bindings displays.

A sobering thought - ?? does not need to be quoted.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: help-fns--key-bindings-2.diff --]
[-- Type: text/x-diff, Size: 1108 bytes --]

=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog	2012-08-14 12:38:11 +0000
+++ lisp/ChangeLog	2012-08-14 13:46:05 +0000
@@ -1,3 +1,8 @@
+2012-08-14  Christopher Schmidt  <christopher@ch.ristopher.com>
+
+	* help-fns.el (help-fns--key-bindings): Abbreviate non-symbol
+	remap targets with ?? (Bug#12174).
+
 2012-08-14  Dmitry Gutov  <dgutov@yandex.ru>
 
 	* progmodes/ruby-mode.el: Improve percent literals (bug#6286).

=== modified file 'lisp/help-fns.el'
--- lisp/help-fns.el	2012-08-06 21:05:48 +0000
+++ lisp/help-fns.el	2012-08-14 13:44:48 +0000
@@ -397,9 +397,11 @@
               (if (member (event-modifiers (aref key 0)) '(nil (shift)))
                   (push key non-modified-keys)))
             (when remapped
-              (princ "Its keys are remapped to `")
-              (princ (symbol-name remapped))
-              (princ "'.\n"))
+              (princ "Its keys are remapped to ")
+              (princ (if (symbolp remapped)
+			 (concat "`" (symbol-name remapped) "'")
+		       "??"))
+              (princ ".\n"))
 
             (when keys
               (princ (if remapped


[-- Attachment #3: Type: text/plain, Size: 66 bytes --]


Please commit and/or close this bug report.

        Christopher

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

* bug#12174: 24.1.50; C-h f and non-symbol remap targets
  2012-08-14 18:12 ` Christopher Schmidt
@ 2012-08-15  2:38   ` Stefan Monnier
  2012-08-15  8:33     ` Christopher Schmidt
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2012-08-15  2:38 UTC (permalink / raw)
  To: 12174

>> Here is a patch that abbreviates non-symbol remap targets with "??".
>> This is consistent with what describe-bindings displays.
> A sobering thought - ?? does not need to be quoted.

Actually, ?? is a bad choice, since it seems to imply that Emacs doesn't
even know what it's remapped to, whereas Emacs does know very well, it
just doesn't want to print it out in full because it would be ugly and
too verbose.
So I suggest we replace "??" with something like "an anonymous command".


        Stefan





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

* bug#12174: 24.1.50; C-h f and non-symbol remap targets
  2012-08-15  2:38   ` Stefan Monnier
@ 2012-08-15  8:33     ` Christopher Schmidt
  2012-08-22  7:02       ` Glenn Morris
  0 siblings, 1 reply; 7+ messages in thread
From: Christopher Schmidt @ 2012-08-15  8:33 UTC (permalink / raw)
  To: 12174

[-- Attachment #1: Type: text/plain, Size: 362 bytes --]

Stefan Monnier <monnier@iro.umontreal.ca> writes:
> Actually, ?? is a bad choice, since it seems to imply that Emacs
> doesn't even know what it's remapped to, whereas Emacs does know very
> well, it just doesn't want to print it out in full because it would be
> ugly and too verbose.  So I suggest we replace "??" with something
> like "an anonymous command".

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: help-fns--key-bindings-3.diff --]
[-- Type: text/x-diff, Size: 1100 bytes --]

=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog	2012-08-15 07:58:34 +0000
+++ lisp/ChangeLog	2012-08-15 08:26:41 +0000
@@ -1,3 +1,8 @@
+2012-08-15  Christopher Schmidt  <christopher@ch.ristopher.com>
+
+	* help-fns.el (help-fns--key-bindings): Abbreviate non-symbol
+	remap targets (Bug#12174).
+
 2012-08-15  Chong Yidong  <cyd@gnu.org>
 
 	* frame.el (set-frame-font): Accept font objects.

=== modified file 'lisp/help-fns.el'
--- lisp/help-fns.el	2012-08-06 21:05:48 +0000
+++ lisp/help-fns.el	2012-08-15 08:27:33 +0000
@@ -397,9 +397,11 @@
               (if (member (event-modifiers (aref key 0)) '(nil (shift)))
                   (push key non-modified-keys)))
             (when remapped
-              (princ "Its keys are remapped to `")
-              (princ (symbol-name remapped))
-              (princ "'.\n"))
+              (princ "Its keys are remapped to ")
+              (princ (if (symbolp remapped)
+			 (concat "`" (symbol-name remapped) "'")
+		       "an anonymous command"))
+              (princ ".\n"))
 
             (when keys
               (princ (if remapped


[-- Attachment #3: Type: text/plain, Size: 21 bytes --]


        Christopher

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

* bug#12174: 24.1.50; C-h f and non-symbol remap targets
  2012-08-15  8:33     ` Christopher Schmidt
@ 2012-08-22  7:02       ` Glenn Morris
  2012-08-22  7:21         ` Dani Moncayo
  0 siblings, 1 reply; 7+ messages in thread
From: Glenn Morris @ 2012-08-22  7:02 UTC (permalink / raw)
  To: 12174-done

Version: 24.3

Thanks; applied to trunk.





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

* bug#12174: 24.1.50; C-h f and non-symbol remap targets
  2012-08-22  7:02       ` Glenn Morris
@ 2012-08-22  7:21         ` Dani Moncayo
  2012-08-22  7:24           ` Glenn Morris
  0 siblings, 1 reply; 7+ messages in thread
From: Dani Moncayo @ 2012-08-22  7:21 UTC (permalink / raw)
  To: 12174, rgm

On Wed, Aug 22, 2012 at 9:02 AM, Glenn Morris <rgm@gnu.org> wrote:
> Version: 24.3

One question: If some other severe bug arises upon the (not yet)
released Emacs 24.2, so that a 24.3 release becomes necessary (from
the emacs-24 branch), then the above tag will be incorrect, won't it?

It seems that the current versioning pattern has this problem.  We
don't know beforehand the version under which the current trunk code
will be released.

So, what about switching to a different pattern which doesn't have this problem?

For example: Name the next trunk's branch as "emacs-24.3", and every
release made from that branch would be labeled "emacs 24.3.x".

This way, we would know for sure that the trunk code would be released
as version "24.4" (or "25.1" -- what the maintainer's decide).

-- 
Dani Moncayo





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

* bug#12174: 24.1.50; C-h f and non-symbol remap targets
  2012-08-22  7:21         ` Dani Moncayo
@ 2012-08-22  7:24           ` Glenn Morris
  0 siblings, 0 replies; 7+ messages in thread
From: Glenn Morris @ 2012-08-22  7:24 UTC (permalink / raw)
  To: Dani Moncayo; +Cc: 12174

Dani Moncayo wrote:

> On Wed, Aug 22, 2012 at 9:02 AM, Glenn Morris <rgm@gnu.org> wrote:
>> Version: 24.3
>
> One question: If some other severe bug arises upon the (not yet)
> released Emacs 24.2, so that a 24.3 release becomes necessary (from
> the emacs-24 branch), then the above tag will be incorrect, won't it?

Yes, it's a (minor) problem. I suggest discussing it on emacs-devel
rather than here though.





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

end of thread, other threads:[~2012-08-22  7:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-10 21:55 bug#12174: 24.1.50; C-h f and non-symbol remap targets Christopher Schmidt
2012-08-14 18:12 ` Christopher Schmidt
2012-08-15  2:38   ` Stefan Monnier
2012-08-15  8:33     ` Christopher Schmidt
2012-08-22  7:02       ` Glenn Morris
2012-08-22  7:21         ` Dani Moncayo
2012-08-22  7:24           ` Glenn Morris

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