emacs-diffs
[Top][All Lists]
Advanced

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

master 1c3e453: Rename button-buttonize to buttonize


From: Lars Ingebrigtsen
Subject: master 1c3e453: Rename button-buttonize to buttonize
Date: Thu, 4 Nov 2021 13:14:35 -0400 (EDT)

branch: master
commit 1c3e45396e07b6ec7246c2d5763c187092a55264
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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.
---
 doc/lispref/display.texi         | 2 +-
 lisp/button.el                   | 4 +++-
 lisp/emacs-lisp/memory-report.el | 2 +-
 lisp/help.el                     | 5 ++---
 4 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index f88f65f..aacbcaf 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -7067,7 +7067,7 @@ This inserts a button with the label @var{label} at 
point, using text
 properties.
 @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
 inserting it into a buffer immediately, for instance when creating
 data structures that may then, later, be inserted into a buffer.  This
diff --git a/lisp/button.el b/lisp/button.el
index acf7646..b790104 100644
--- a/lisp/button.el
+++ b/lisp/button.el
@@ -616,7 +616,9 @@ button at point is the button to describe."
       (button--describe props)
       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.
 When clicked, CALLBACK will be called with the DATA as the
 function argument.  If DATA isn't present (or is nil), the button
diff --git a/lisp/emacs-lisp/memory-report.el b/lisp/emacs-lisp/memory-report.el
index cda2dee..450cdaa 100644
--- a/lisp/emacs-lisp/memory-report.el
+++ b/lisp/emacs-lisp/memory-report.el
@@ -283,7 +283,7 @@ by counted more than once."
                                                       buffers)
                      do (insert (memory-report--format size)
                                 "  "
-                                (button-buttonize
+                                (buttonize
                                  (buffer-name buffer)
                                  #'memory-report--buffer-details buffer)
                                 "\n"))
diff --git a/lisp/help.el b/lisp/help.el
index f6041c2..d10ea1c 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -1339,12 +1339,11 @@ Return nil if the key sequence is too long."
         ((keymapp definition)
          (insert "Prefix Command\n"))
         ((byte-code-function-p definition)
-         (insert "[%s]\n"
-                 (button-buttonize "byte-code" #'disassemble definition)))
+         (insert "[%s]\n" (buttonize "byte-code" #'disassemble definition)))
         ((and (consp definition)
               (memq (car definition) '(closure lambda)))
          (insert (format "[%s]\n"
-                         (button-buttonize
+                         (buttonize
                           (symbol-name (car definition))
                           (lambda (_)
                             (pp-display-expression



reply via email to

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