changeset 32853:3410d8818561

(widget-beginning-of-line, widget-end-of-line): Replace with aliases of the normal emacs b-o-l/e-o-l functions. (widget-field-keymap, widget-text-keymap): Don't bind C-a/C-e.
author Miles Bader <miles@gnu.org>
date Wed, 25 Oct 2000 05:37:15 +0000
parents cb10361cc039
children 25f4a6923e96
files lisp/wid-edit.el
diffstat 1 files changed, 12 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/wid-edit.el	Wed Oct 25 05:21:54 2000 +0000
+++ b/lisp/wid-edit.el	Wed Oct 25 05:37:15 2000 +0000
@@ -785,8 +785,10 @@
     (define-key map "\C-k" 'widget-kill-line)
     (define-key map "\M-\t" 'widget-complete)
     (define-key map "\C-m" 'widget-field-activate)
-    (define-key map "\C-a" 'widget-beginning-of-line)
-    (define-key map "\C-e" 'widget-end-of-line)
+    ;; Since the widget code uses a `field' property to identify fields,
+    ;; ordinary beginning-of-line/end-of-line do the right thing.
+    ;;  (define-key map "\C-a" 'widget-beginning-of-line)
+    ;;  (define-key map "\C-e" 'widget-end-of-line)
     (set-keymap-parent map global-map)
     map)
   "Keymap used inside an editable field.")
@@ -795,8 +797,10 @@
   (let ((map (copy-keymap widget-keymap)))
     (define-key map [menu-bar] nil)
     (define-key map [tool-bar] nil)
-    (define-key map "\C-a" 'widget-beginning-of-line)
-    (define-key map "\C-e" 'widget-end-of-line)
+    ;; Since the widget code uses a `field' property to identify fields,
+    ;; ordinary beginning-of-line/end-of-line do the right thing.
+    ;;  (define-key map "\C-a" 'widget-beginning-of-line)
+    ;;  (define-key map "\C-e" 'widget-end-of-line)
     (set-keymap-parent map global-map)
     map)
   "Keymap used inside a text field.")
@@ -974,23 +978,10 @@
   (run-hooks 'widget-backward-hook)
   (widget-move (- arg)))
 
-(defun widget-beginning-of-line ()
-  "Go to beginning of field or beginning of line, whichever is first."
-  (interactive)
-  (let* ((field (widget-field-find (point)))
-	 (start (and field (widget-field-start field))))
-    (goto-char (if start
-                   (max start (line-beginning-position))
-                 (line-beginning-position)))))
-
-(defun widget-end-of-line ()
-  "Go to end of field or end of line, whichever is first."
-  (interactive)
-  (let* ((field (widget-field-find (point)))
-	 (end (and field (widget-field-end field))))
-    (goto-char (if end
-                   (min end (line-end-position))
-                 (line-end-position)))))
+;; Since the widget code uses a `field' property to identify fields,
+;; ordinary beginning-of-line/end-of-line do the right thing.
+(defalias 'widget-beginning-of-line 'beginning-of-line)
+(defalias 'widget-end-of-line 'end-of-line)
 
 (defun widget-kill-line ()
   "Kill to end of field or end of line, whichever is first."