emacs-devel
[Top][All Lists]
Advanced

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

Patch to function make-text-button in lisp/button.el


From: Francis Litterio
Subject: Patch to function make-text-button in lisp/button.el
Date: Sat, 26 Feb 2005 19:21:28 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt)

In lisp/button.el, function make-button sets the type of the button to a
default value if the user doesn't supply a :type property, but function
make-text-button does not.

This patch makes function make-text-button set the type of the button if
the user does not supply a :type property.
--
Francis Litterio
franl <at> world . std . com


--- button.el   13 Oct 2004 14:52:52 -0400      1.14
+++ button.el   26 Feb 2005 19:17:48 -0500      
@@ -315,6 +315,9 @@
             (error "Button `category' property may not be set directly")))
       ;; Add the property.
       (put-text-property beg end prop val)))
+  ;; If the user didn't specify a type, use the default.
+  (unless (get-text-property beg 'category)
+    (put-text-property beg end 'category 'default-button))
   ;; Return something that can be used to get at the button.
   beg)
 





reply via email to

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