Mercurial > emacs
comparison lisp/simple.el @ 100623:5a144164af93
(completion-all-completions-with-base-size): Remove.
(completion-all-completions): Don't set it.
(completion-table-with-context, completion--file-name-table):
Don't add base-size in last cdr.
(completion-hilit-commonality): Add argument `base-size'.
(display-completion-list, completion-emacs21-all-completions)
(completion-emacs22-all-completions, completion-basic-all-completions):
Provide it.
(completion-pcm--all-completions): Don't need to remove the base-size
in last-cdr any more.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sun, 21 Dec 2008 05:20:06 +0000 |
parents | 2962a5a4e423 |
children | 0186716f4b63 |
comparison
equal
deleted
inserted
replaced
100622:c236484e9c94 | 100623:5a144164af93 |
---|---|
3585 A value of nil means \\[set-mark-command]'s behavior does not change | 3585 A value of nil means \\[set-mark-command]'s behavior does not change |
3586 after C-u \\[set-mark-command]." | 3586 after C-u \\[set-mark-command]." |
3587 :type 'boolean | 3587 :type 'boolean |
3588 :group 'editing-basics) | 3588 :group 'editing-basics) |
3589 | 3589 |
3590 (defcustom set-mark-default-inactive nil | |
3591 "If non-nil, setting the mark does not activate it. | |
3592 This causes \\[set-mark-command] and \\[exchange-point-and-mark] to | |
3593 behave the same whether or not `transient-mark-mode' is enabled.") | |
3594 | |
3590 (defun set-mark-command (arg) | 3595 (defun set-mark-command (arg) |
3591 "Set the mark where point is, or jump to the mark. | 3596 "Set the mark where point is, or jump to the mark. |
3592 Setting the mark also alters the region, which is the text | 3597 Setting the mark also alters the region, which is the text |
3593 between point and mark; this is the closest equivalent in | 3598 between point and mark; this is the closest equivalent in |
3594 Emacs to what some editors call the \"selection\". | 3599 Emacs to what some editors call the \"selection\". |
3646 (deactivate-mark) | 3651 (deactivate-mark) |
3647 (message "Mark deactivated")) | 3652 (message "Mark deactivated")) |
3648 (activate-mark) | 3653 (activate-mark) |
3649 (message "Mark activated"))) | 3654 (message "Mark activated"))) |
3650 (t | 3655 (t |
3651 (push-mark-command nil)))) | 3656 (push-mark-command nil) |
3657 (if set-mark-default-inactive (deactivate-mark))))) | |
3652 | 3658 |
3653 (defun push-mark (&optional location nomsg activate) | 3659 (defun push-mark (&optional location nomsg activate) |
3654 "Set mark at LOCATION (point, by default) and push old mark on mark ring. | 3660 "Set mark at LOCATION (point, by default) and push old mark on mark ring. |
3655 If the last global mark pushed was not in the current buffer, | 3661 If the last global mark pushed was not in the current buffer, |
3656 also push LOCATION on the global mark ring. | 3662 also push LOCATION on the global mark ring. |
3709 (if (null omark) | 3715 (if (null omark) |
3710 (error "No mark set in this buffer")) | 3716 (error "No mark set in this buffer")) |
3711 (deactivate-mark) | 3717 (deactivate-mark) |
3712 (set-mark (point)) | 3718 (set-mark (point)) |
3713 (goto-char omark) | 3719 (goto-char omark) |
3720 (if set-mark-default-inactive (deactivate-mark)) | |
3714 (cond (temp-highlight | 3721 (cond (temp-highlight |
3715 (setq transient-mark-mode (cons 'only transient-mark-mode))) | 3722 (setq transient-mark-mode (cons 'only transient-mark-mode))) |
3716 ((or (and arg (region-active-p)) ; (xor arg (not (region-active-p))) | 3723 ((or (and arg (region-active-p)) ; (xor arg (not (region-active-p))) |
3717 (not (or arg (region-active-p)))) | 3724 (not (or arg (region-active-p)))) |
3718 (deactivate-mark)) | 3725 (deactivate-mark)) |
5785 (let ((base-size completion-base-size)) ;Read before killing localvars. | 5792 (let ((base-size completion-base-size)) ;Read before killing localvars. |
5786 (completion-list-mode) | 5793 (completion-list-mode) |
5787 (set (make-local-variable 'completion-base-size) base-size)) | 5794 (set (make-local-variable 'completion-base-size) base-size)) |
5788 (set (make-local-variable 'completion-reference-buffer) mainbuf) | 5795 (set (make-local-variable 'completion-reference-buffer) mainbuf) |
5789 (unless completion-base-size | 5796 (unless completion-base-size |
5790 ;; This may be needed for old completion packages which don't use | 5797 ;; This shouldn't be needed any more, but further analysis is needed |
5791 ;; completion-all-completions-with-base-size yet. | 5798 ;; to make sure it's the case. |
5792 (setq completion-base-size | 5799 (setq completion-base-size |
5793 (cond | 5800 (cond |
5794 (minibuffer-completing-file-name | 5801 (minibuffer-completing-file-name |
5795 ;; For file name completion, use the number of chars before | 5802 ;; For file name completion, use the number of chars before |
5796 ;; the start of the file name component at point. | 5803 ;; the start of the file name component at point. |