]> code.delx.au - gnu-emacs/blobdiff - lisp/button.el
Switch to recommended form of GPLv3 permissions notice.
[gnu-emacs] / lisp / button.el
index 85180a923563ba5ec30647b195441c6104e07361..5d20ae7900a6f0da52a561f0194173acd03639f1 100644 (file)
@@ -1,7 +1,7 @@
 ;;; button.el --- clickable buttons
 ;;
 ;; Copyright (C) 2001, 2002, 2003, 2004, 2005,
-;;   2006, 2007 Free Software Foundation, Inc.
+;;   2006, 2007, 2008 Free Software Foundation, Inc.
 ;;
 ;; Author: Miles Bader <miles@gnu.org>
 ;; Keywords: extensions
   "Default face used for buttons."
   :group 'basic-faces)
 
-;;;###autoload
 (defvar button-map
   (let ((map (make-sparse-keymap)))
-    (define-key map "\r" 'push-button)
+    ;; The following definition needs to avoid using escape sequences that
+    ;; might get converted to ^M when building loaddefs.el
+    (define-key map [(control ?m)] 'push-button)
     (define-key map [mouse-2] 'push-button)
     map)
   "Keymap used by buttons.")
 
-;;;###autoload
 (defvar button-buffer-map
   (let ((map (make-sparse-keymap)))
     (define-key map [?\t] 'forward-button)
@@ -114,9 +114,8 @@ Buttons inherit them by setting their `category' property to that symbol."
   (or (get type 'button-category-symbol)
       (error "Unknown button type `%s'" type)))
 
-;;;###autoload
 (defun define-button-type (name &rest properties)
-  "Define a `button type' called NAME.
+  "Define a `button type' called NAME (a symbol).
 The remaining arguments form a sequence of PROPERTY VALUE pairs,
 specifying properties to use as defaults for buttons with this type
 \(a button's type may be set by giving it a `type' property when
@@ -245,7 +244,6 @@ the normal action is used instead."
 \f
 ;; Creating overlay buttons
 
-;;;###autoload
 (defun make-button (beg end &rest properties)
   "Make a button from BEG to END in the current buffer.
 The remaining arguments form a sequence of PROPERTY VALUE pairs,
@@ -267,7 +265,6 @@ Also see `make-text-button', `insert-button'."
     ;; OVERLAY is the button, so return it
     overlay))
 
-;;;###autoload
 (defun insert-button (label &rest properties)
   "Insert a button with the label LABEL.
 The remaining arguments form a sequence of PROPERTY VALUE pairs,
@@ -285,7 +282,6 @@ Also see `insert-text-button', `make-button'."
 \f
 ;; Creating text-property buttons
 
-;;;###autoload
 (defun make-text-button (beg end &rest properties)
   "Make a button from BEG to END in the current buffer.
 The remaining arguments form a sequence of PROPERTY VALUE pairs,
@@ -324,7 +320,6 @@ Also see `insert-text-button'."
   ;; Return something that can be used to get at the button.
   beg)
 
-;;;###autoload
 (defun insert-text-button (label &rest properties)
   "Insert a button with the label LABEL.
 The remaining arguments form a sequence of PROPERTY VALUE pairs,