diff options
| author | Stefan Monnier | 2000-11-22 19:47:30 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2000-11-22 19:47:30 +0000 |
| commit | 58dd38f196cb40a2fe14d2f12eff87d35bc86862 (patch) | |
| tree | c0a053d2ddce7d52c80557177235bcbd2e208c8a | |
| parent | 16cdf1417289cfe7808bc23f1ac9adce5ede93a4 (diff) | |
| download | emacs-58dd38f196cb40a2fe14d2f12eff87d35bc86862.tar.gz emacs-58dd38f196cb40a2fe14d2f12eff87d35bc86862.zip | |
(comment-line-break-function): Use the new name
indent-new-comment-line -> comment-indent-new-line.
(clone-indirect-buffer): Don't ignore NORECORD.
(next-completion): Properly handle the case where items are adjacent.
| -rw-r--r-- | lisp/simple.el | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 78f5e8044a2..3a916b843e1 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -2777,7 +2777,7 @@ Setting this variable automatically makes it local to the current buffer." | |||
| 2777 | regexp) | 2777 | regexp) |
| 2778 | :group 'fill) | 2778 | :group 'fill) |
| 2779 | 2779 | ||
| 2780 | (defvar comment-line-break-function 'indent-new-comment-line | 2780 | (defvar comment-line-break-function 'comment-indent-new-line |
| 2781 | "*Mode-specific function which line breaks and continues a comment. | 2781 | "*Mode-specific function which line breaks and continues a comment. |
| 2782 | 2782 | ||
| 2783 | This function is only called during auto-filling of a comment section. | 2783 | This function is only called during auto-filling of a comment section. |
| @@ -3527,27 +3527,29 @@ Go to the window from which completion was requested." | |||
| 3527 | "Move to the next item in the completion list. | 3527 | "Move to the next item in the completion list. |
| 3528 | With prefix argument N, move N items (negative N means move backward)." | 3528 | With prefix argument N, move N items (negative N means move backward)." |
| 3529 | (interactive "p") | 3529 | (interactive "p") |
| 3530 | (while (and (> n 0) (not (eobp))) | 3530 | (let ((beg (point-min)) (end (point-max))) |
| 3531 | (let ((prop (get-text-property (point) 'mouse-face)) | 3531 | (while (and (> n 0) (not (eobp))) |
| 3532 | (end (point-max))) | ||
| 3533 | ;; If in a completion, move to the end of it. | 3532 | ;; If in a completion, move to the end of it. |
| 3534 | (if prop | 3533 | (when (get-text-property (point) 'mouse-face) |
| 3535 | (goto-char (next-single-property-change (point) 'mouse-face nil end))) | 3534 | (goto-char (next-single-property-change (point) 'mouse-face nil end))) |
| 3536 | ;; Move to start of next one. | 3535 | ;; Move to start of next one. |
| 3537 | (goto-char (next-single-property-change (point) 'mouse-face nil end))) | 3536 | (unless (get-text-property (point) 'mouse-face) |
| 3538 | (setq n (1- n))) | 3537 | (goto-char (next-single-property-change (point) 'mouse-face nil end))) |
| 3539 | (while (and (< n 0) (not (bobp))) | 3538 | (setq n (1- n))) |
| 3540 | (let ((prop (get-text-property (1- (point)) 'mouse-face)) | 3539 | (while (and (< n 0) (not (bobp))) |
| 3541 | (end (point-min))) | 3540 | (let ((prop (get-text-property (1- (point)) 'mouse-face))) |
| 3542 | ;; If in a completion, move to the start of it. | 3541 | ;; If in a completion, move to the start of it. |
| 3543 | (if prop | 3542 | (when (and prop (eq prop (get-text-property (point) 'mouse-face))) |
| 3544 | (goto-char (previous-single-property-change | 3543 | (goto-char (previous-single-property-change |
| 3545 | (point) 'mouse-face nil end))) | 3544 | (point) 'mouse-face nil beg))) |
| 3546 | ;; Move to end of the previous completion. | 3545 | ;; Move to end of the previous completion. |
| 3547 | (goto-char (previous-single-property-change (point) 'mouse-face nil end)) | 3546 | (unless (or (bobp) (get-text-property (1- (point)) 'mouse-face)) |
| 3548 | ;; Move to the start of that one. | 3547 | (goto-char (previous-single-property-change |
| 3549 | (goto-char (previous-single-property-change (point) 'mouse-face nil end))) | 3548 | (point) 'mouse-face nil beg))) |
| 3550 | (setq n (1+ n)))) | 3549 | ;; Move to the start of that one. |
| 3550 | (goto-char (previous-single-property-change | ||
| 3551 | (point) 'mouse-face nil beg)) | ||
| 3552 | (setq n (1+ n)))))) | ||
| 3551 | 3553 | ||
| 3552 | (defun choose-completion () | 3554 | (defun choose-completion () |
| 3553 | "Choose the completion that point is in or next to." | 3555 | "Choose the completion that point is in or next to." |
| @@ -3926,7 +3928,7 @@ front of the list of recently selected ones." | |||
| 3926 | (let* ((name (generate-new-buffer-name newname)) | 3928 | (let* ((name (generate-new-buffer-name newname)) |
| 3927 | (buffer (make-indirect-buffer (current-buffer) name t))) | 3929 | (buffer (make-indirect-buffer (current-buffer) name t))) |
| 3928 | (when display-flag | 3930 | (when display-flag |
| 3929 | (pop-to-buffer buffer)) | 3931 | (pop-to-buffer buffer norecord)) |
| 3930 | buffer)) | 3932 | buffer)) |
| 3931 | 3933 | ||
| 3932 | 3934 | ||