summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2011-01-22 12:10:17 -0800
committerGlenn Morris <rgm@gnu.org>2011-01-22 12:10:17 -0800
commita9607714e6221288886197b3b169ae5f5c687861 (patch)
tree02ae3c964715d00032cdcc06f75a5db896d4b1a1
parentbf7c353fede0fef3ee070e04548a273fff16b50a (diff)
downloademacs-a9607714e6221288886197b3b169ae5f5c687861.tar.gz
Doc fix for make-text-button.
* doc/lispref/display.texi (Making Buttons): Mention limitation of text buttons. * lisp/button.el (make-text-button): Doc fix. (See bug#7881)
-rw-r--r--doc/lispref/ChangeLog6
-rw-r--r--doc/lispref/display.texi9
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/button.el18
4 files changed, 22 insertions, 15 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index e1180124c05..f81a3069f80 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,7 @@
+2011-01-22 Glenn Morris <rgm@gnu.org>
+
+ * display.texi (Making Buttons): Mention limitation of text buttons.
+
2011-01-08 Chong Yidong <cyd@stupidchicken.com>
* files.texi (Directory Names): Move directory-abbrev-alist doc to
@@ -8681,5 +8685,3 @@
You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-
-;;; arch-tag: 985ae0ce-df29-475b-b3f8-4bbcbf6f7fda
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 7caa3571aeb..0a9fa30c599 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -4962,8 +4962,9 @@ and returns it.
button actually part of the text instead of being a property of the
buffer. Buttons using text properties do not create markers into the
buffer, which is important for speed when you use extremely large
-numbers of buttons. Both functions return the position of the start
-of the new button:
+numbers of buttons. (However, if there is an existing face text
+property at the site of the button, the button face may not be visible.)
+Both functions return the position of the start of the new button:
@defun make-text-button beg end &rest properties
This makes a button from @var{beg} to @var{end} in the current buffer, using
@@ -5904,7 +5905,3 @@ This hook is used for internal purposes: setting up communication with
the window system, and creating the initial window. Users should not
interfere with it.
@end defvar
-
-@ignore
- arch-tag: ffdf5714-7ecf-415b-9023-fbc6b409c2c6
-@end ignore
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9f0d1f0d096..b07de89a460 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2011-01-22 Glenn Morris <rgm@gnu.org>
+
+ * button.el (make-text-button): Doc fix. (See bug#7881)
+
2011-01-22 Chong Yidong <cyd@stupidchicken.com>
* simple.el (line-move-visual): Doc fix (Bug#7594).
diff --git a/lisp/button.el b/lisp/button.el
index ef7161213fd..4881d9f8741 100644
--- a/lisp/button.el
+++ b/lisp/button.el
@@ -1,7 +1,7 @@
;;; button.el --- clickable buttons
;;
-;; Copyright (C) 2001, 2002, 2003, 2004, 2005,
-;; 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
+;; 2010, 2011 Free Software Foundation, Inc.
;;
;; Author: Miles Bader <miles@gnu.org>
;; Keywords: extensions
@@ -37,7 +37,9 @@
;; the button is represented by a marker or buffer-position pointing
;; somewhere in the button. In the latter case, no markers into the
;; buffer are retained, which is important for speed if there are are
-;; extremely large numbers of buttons.
+;; extremely large numbers of buttons. Note however that if there is
+;; an existing face text-property at the site of the button, the
+;; button face may not be visible. Using overlays avoids this.
;;
;; Using `define-button-type' to define default properties for buttons
;; is not necessary, but it is is encouraged, since doing so makes the
@@ -289,9 +291,12 @@ button-type from which to inherit other properties; see
`define-button-type'.
This function is like `make-button', except that the button is actually
-part of the text instead of being a property of the buffer. Creating
-large numbers of buttons can also be somewhat faster using
-`make-text-button'.
+part of the text instead of being a property of the buffer. That is,
+this function uses text properties, the other uses overlays.
+Creating large numbers of buttons can also be somewhat faster
+using `make-text-button'. Note, however, that if there is an existing
+face property at the site of the button, the button face may not be visible.
+You may want to use `make-button' in that case.
BEG can also be a string, in which case it is made into a button.
@@ -476,5 +481,4 @@ Returns the button found."
(provide 'button)
-;; arch-tag: 5f2c7627-413b-4097-b282-630f89d9c5e9
;;; button.el ends here