diff options
| author | Richard M. Stallman | 2006-01-26 17:56:54 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2006-01-26 17:56:54 +0000 |
| commit | 1fffd65f50adc8a19421606124851ea314977ae0 (patch) | |
| tree | 3b61466d95a2f274aa6c0cd05cb704f0b1dcdc84 | |
| parent | 5effb4d80fc9627633c71b372f602b9de3295980 (diff) | |
| download | emacs-1fffd65f50adc8a19421606124851ea314977ae0.tar.gz emacs-1fffd65f50adc8a19421606124851ea314977ae0.zip | |
(move-beginning-of-line): Take account of fields.
(clone-indirect-buffer-other-window): Take args like
clone-indirect-buffer, and work like it.
| -rw-r--r-- | lisp/simple.el | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index db040afcae9..647a57cbe6b 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -3733,19 +3733,22 @@ If point reaches the beginning or end of buffer, it stops there. | |||
| 3733 | To ignore intangibility, bind `inhibit-point-motion-hooks' to t." | 3733 | To ignore intangibility, bind `inhibit-point-motion-hooks' to t." |
| 3734 | (interactive "p") | 3734 | (interactive "p") |
| 3735 | (or arg (setq arg 1)) | 3735 | (or arg (setq arg 1)) |
| 3736 | (if (/= arg 1) | ||
| 3737 | (line-move (1- arg) t)) | ||
| 3738 | 3736 | ||
| 3739 | ;; Move to beginning-of-line, ignoring fields and invisibles. | ||
| 3740 | (skip-chars-backward "^\n") | ||
| 3741 | (while (and (not (bobp)) (line-move-invisible-p (1- (point)))) | ||
| 3742 | (goto-char (previous-char-property-change (1- (point)))) | ||
| 3743 | (skip-chars-backward "^\n")) | ||
| 3744 | |||
| 3745 | (let ((orig (point))) | 3737 | (let ((orig (point))) |
| 3746 | (vertical-motion 0) | 3738 | |
| 3747 | (if (/= orig (point)) | 3739 | ;; Move by lines, if ARG is not 1 (the default). |
| 3748 | (goto-char (constrain-to-field (point) orig (/= arg 1) t nil))))) | 3740 | (if (/= arg 1) |
| 3741 | (line-move (1- arg) t)) | ||
| 3742 | |||
| 3743 | ;; Move to beginning-of-line, ignoring fields and invisibles. | ||
| 3744 | (skip-chars-backward "^\n") | ||
| 3745 | (while (and (not (bobp)) (line-move-invisible-p (1- (point)))) | ||
| 3746 | (goto-char (previous-char-property-change (1- (point)))) | ||
| 3747 | (skip-chars-backward "^\n")) | ||
| 3748 | |||
| 3749 | ;; Take care of fields. | ||
| 3750 | (goto-char (constrain-to-field (point) orig | ||
| 3751 | (/= arg 1) t nil)))) | ||
| 3749 | 3752 | ||
| 3750 | 3753 | ||
| 3751 | ;;; Many people have said they rarely use this feature, and often type | 3754 | ;;; Many people have said they rarely use this feature, and often type |
| @@ -5286,11 +5289,8 @@ front of the list of recently selected ones." | |||
| 5286 | buffer)) | 5289 | buffer)) |
| 5287 | 5290 | ||
| 5288 | 5291 | ||
| 5289 | (defun clone-indirect-buffer-other-window (buffer &optional norecord) | 5292 | (defun clone-indirect-buffer-other-window (newname display-flag &optional norecord) |
| 5290 | "Create an indirect buffer that is a twin copy of BUFFER. | 5293 | "Like `clone-indirect-buffer' but display in another window." |
| 5291 | Select the new buffer in another window. | ||
| 5292 | Optional second arg NORECORD non-nil means do not put this buffer at | ||
| 5293 | the front of the list of recently selected ones." | ||
| 5294 | (interactive | 5294 | (interactive |
| 5295 | (progn | 5295 | (progn |
| 5296 | (if (get major-mode 'no-clone-indirect) | 5296 | (if (get major-mode 'no-clone-indirect) |
| @@ -5299,8 +5299,7 @@ the front of the list of recently selected ones." | |||
| 5299 | (read-buffer "Name of indirect buffer: " (current-buffer))) | 5299 | (read-buffer "Name of indirect buffer: " (current-buffer))) |
| 5300 | t))) | 5300 | t))) |
| 5301 | (let ((pop-up-windows t)) | 5301 | (let ((pop-up-windows t)) |
| 5302 | (set-buffer buffer) | 5302 | (clone-indirect-buffer newname display-flag norecord))) |
| 5303 | (clone-indirect-buffer nil t norecord))) | ||
| 5304 | 5303 | ||
| 5305 | 5304 | ||
| 5306 | ;;; Handling of Backspace and Delete keys. | 5305 | ;;; Handling of Backspace and Delete keys. |