From 4d265b4d767984d643db79cd17ec74785b20dc2a Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 22 Jan 2011 12:10:17 -0800 Subject: [PATCH] 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) --- doc/lispref/ChangeLog | 6 ++++-- doc/lispref/display.texi | 9 +++------ lisp/ChangeLog | 4 ++++ lisp/button.el | 18 +++++++++++------- 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 + + * display.texi (Making Buttons): Mention limitation of text buttons. + 2011-01-08 Chong Yidong * 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 . - -;;; 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 d5c689e8fcc..e8d56288944 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-01-22 Glenn Morris + + * button.el (make-text-button): Doc fix. (See bug#7881) + 2011-01-22 Chong Yidong * 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 ;; 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 -- 2.11.4.GIT