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

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

bug#22456: 24.5; Have \\[...] handle mouse commands differently


From: Drew Adams
Subject: bug#22456: 24.5; Have \\[...] handle mouse commands differently
Date: Sun, 24 Jan 2016 08:14:19 -0800 (PST)

Enhancement request:

If a command that can only be bound to a mouse event is mentioned in a
doc string, and if that command is not bound currently, the mention is
inappropriate (unhelpful).

(defun foo (event)
  "..."
  (interactive "e")
  (message "foo"))

(defun bar ()
  "... mouse command \\[foo] is ..."
  (interactive)
  (message "bar"))

C-h f bar

  bar is an interactive Lisp function.

  (bar)

  ... mouse command `M-x foo' is ...

This is quite wrong: `foo' *cannot* be invoked using `M-x'.

The request is for Emacs to do something better for this case.  It
should just write "... mouse command `foo' is ...", for example, leaving
off the "M-x " part.

Maybe these are some possible approaches (?):

* Check the `interactive' spec for "e" or an argument that is
  `mouse-event-p'.

* Allow for "mouse command" in a doc string to indicate that the command
  name that follows it is to be considered a mouse command.


In either case, if a command is indicated to be a mouse command, render
its use within "\\[...]" without the prefix "M-x ".


In GNU Emacs 24.5.1 (i686-pc-mingw32)
 of 2015-04-11 on LEG570
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/usr --host=i686-pc-mingw32'





reply via email to

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