comparison lisp/simple.el @ 90127:30ad2795fdab

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-28 Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 180-191) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 39-44) - Merge from emacs--cvs-trunk--0 - Update from CVS
author Miles Bader <miles@gnu.org>
date Sat, 19 Mar 2005 02:42:17 +0000
parents 8395880305fe 2edb492f66d9
children 13796b0653c7
comparison
equal deleted inserted replaced
90126:8ee106ee2dc8 90127:30ad2795fdab
3534 boundaries bind `inhibit-field-text-motion' to t." 3534 boundaries bind `inhibit-field-text-motion' to t."
3535 (interactive "p") 3535 (interactive "p")
3536 (or arg (setq arg 1)) 3536 (or arg (setq arg 1))
3537 (if (/= arg 1) 3537 (if (/= arg 1)
3538 (line-move (1- arg) t)) 3538 (line-move (1- arg) t))
3539 (let (done pos) 3539 (beginning-of-line 1)
3540 (while (not done) 3540 (let ((orig (point)))
3541 (beginning-of-line 1) 3541 (vertical-motion 0)
3542 ;; (not bolp) means that it stopped at a field boundary. 3542 (if (/= orig (point))
3543 (if (or (bobp) (not (bolp))) 3543 (goto-char (constrain-to-field (point) orig (/= arg 1) t nil)))))
3544 (setq done t)
3545 (sit-for 0)
3546 (if (and (consp (setq pos (pos-visible-in-window-p (point) nil t)))
3547 (= (car pos) 0))
3548 (setq done t)
3549 (backward-char 1))))))
3550 3544
3551 3545
3552 ;;; Many people have said they rarely use this feature, and often type 3546 ;;; Many people have said they rarely use this feature, and often type
3553 ;;; it by accident. Maybe it shouldn't even be on a key. 3547 ;;; it by accident. Maybe it shouldn't even be on a key.
3554 (put 'set-goal-column 'disabled t) 3548 (put 'set-goal-column 'disabled t)
3931 3925
3932 (defvar normal-auto-fill-function 'do-auto-fill 3926 (defvar normal-auto-fill-function 'do-auto-fill
3933 "The function to use for `auto-fill-function' if Auto Fill mode is turned on. 3927 "The function to use for `auto-fill-function' if Auto Fill mode is turned on.
3934 Some major modes set this.") 3928 Some major modes set this.")
3935 3929
3930 (put 'auto-fill-function :minor-mode-function 'auto-fill-mode)
3936 ;; FIXME: turn into a proper minor mode. 3931 ;; FIXME: turn into a proper minor mode.
3937 ;; Add a global minor mode version of it. 3932 ;; Add a global minor mode version of it.
3938 (defun auto-fill-mode (&optional arg) 3933 (defun auto-fill-mode (&optional arg)
3939 "Toggle Auto Fill mode. 3934 "Toggle Auto Fill mode.
3940 With arg, turn Auto Fill mode on if and only if arg is positive. 3935 With arg, turn Auto Fill mode on if and only if arg is positive.
5067 ;;; Handling of Backspace and Delete keys. 5062 ;;; Handling of Backspace and Delete keys.
5068 5063
5069 (defcustom normal-erase-is-backspace 5064 (defcustom normal-erase-is-backspace
5070 (and (not noninteractive) 5065 (and (not noninteractive)
5071 (or (memq system-type '(ms-dos windows-nt)) 5066 (or (memq system-type '(ms-dos windows-nt))
5067 (eq window-system 'mac)
5072 (and (memq window-system '(x)) 5068 (and (memq window-system '(x))
5073 (fboundp 'x-backspace-delete-keys-p) 5069 (fboundp 'x-backspace-delete-keys-p)
5074 (x-backspace-delete-keys-p)) 5070 (x-backspace-delete-keys-p))
5075 ;; If the terminal Emacs is running on has erase char 5071 ;; If the terminal Emacs is running on has erase char
5076 ;; set to ^H, use the Backspace key for deleting 5072 ;; set to ^H, use the Backspace key for deleting