mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-06 03:40:56 -08:00
Rename button-buttonize to buttonize
* lisp/help.el (help--describe-command): * lisp/emacs-lisp/memory-report.el (memory-report--buffers): * lisp/button.el (button-buttonize): * doc/lispref/display.texi (Making Buttons): Rename button-buttonize to just buttonize and adjust callers.
This commit is contained in:
parent
51929066d5
commit
1c3e45396e
4 changed files with 7 additions and 6 deletions
|
|
@ -7067,7 +7067,7 @@ This inserts a button with the label @var{label} at point, using text
|
||||||
properties.
|
properties.
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
@defun button-buttonize string callback &optional data
|
@defun buttonize string callback &optional data
|
||||||
Sometimes it's more convenient to make a string into a button without
|
Sometimes it's more convenient to make a string into a button without
|
||||||
inserting it into a buffer immediately, for instance when creating
|
inserting it into a buffer immediately, for instance when creating
|
||||||
data structures that may then, later, be inserted into a buffer. This
|
data structures that may then, later, be inserted into a buffer. This
|
||||||
|
|
|
||||||
|
|
@ -616,7 +616,9 @@ button at point is the button to describe."
|
||||||
(button--describe props)
|
(button--describe props)
|
||||||
t)))
|
t)))
|
||||||
|
|
||||||
(defun button-buttonize (string callback &optional data)
|
(define-obsolete-function-alias 'button-buttonize #'buttonize "29.1")
|
||||||
|
|
||||||
|
(defun buttonize (string callback &optional data)
|
||||||
"Make STRING into a button and return it.
|
"Make STRING into a button and return it.
|
||||||
When clicked, CALLBACK will be called with the DATA as the
|
When clicked, CALLBACK will be called with the DATA as the
|
||||||
function argument. If DATA isn't present (or is nil), the button
|
function argument. If DATA isn't present (or is nil), the button
|
||||||
|
|
|
||||||
|
|
@ -283,7 +283,7 @@ by counted more than once."
|
||||||
buffers)
|
buffers)
|
||||||
do (insert (memory-report--format size)
|
do (insert (memory-report--format size)
|
||||||
" "
|
" "
|
||||||
(button-buttonize
|
(buttonize
|
||||||
(buffer-name buffer)
|
(buffer-name buffer)
|
||||||
#'memory-report--buffer-details buffer)
|
#'memory-report--buffer-details buffer)
|
||||||
"\n"))
|
"\n"))
|
||||||
|
|
|
||||||
|
|
@ -1339,12 +1339,11 @@ Return nil if the key sequence is too long."
|
||||||
((keymapp definition)
|
((keymapp definition)
|
||||||
(insert "Prefix Command\n"))
|
(insert "Prefix Command\n"))
|
||||||
((byte-code-function-p definition)
|
((byte-code-function-p definition)
|
||||||
(insert "[%s]\n"
|
(insert "[%s]\n" (buttonize "byte-code" #'disassemble definition)))
|
||||||
(button-buttonize "byte-code" #'disassemble definition)))
|
|
||||||
((and (consp definition)
|
((and (consp definition)
|
||||||
(memq (car definition) '(closure lambda)))
|
(memq (car definition) '(closure lambda)))
|
||||||
(insert (format "[%s]\n"
|
(insert (format "[%s]\n"
|
||||||
(button-buttonize
|
(buttonize
|
||||||
(symbol-name (car definition))
|
(symbol-name (car definition))
|
||||||
(lambda (_)
|
(lambda (_)
|
||||||
(pp-display-expression
|
(pp-display-expression
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue