diff options
Diffstat (limited to 'lisp/simple.el')
| -rw-r--r-- | lisp/simple.el | 40 |
1 files changed, 3 insertions, 37 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index fa6e154004b..eedbff2d087 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -6122,8 +6122,6 @@ Does not set point. Does nothing if mark ring is empty." | |||
| 6122 | (pop mark-ring)) | 6122 | (pop mark-ring)) |
| 6123 | (deactivate-mark)) | 6123 | (deactivate-mark)) |
| 6124 | 6124 | ||
| 6125 | (define-obsolete-function-alias | ||
| 6126 | 'exchange-dot-and-mark 'exchange-point-and-mark "23.3") | ||
| 6127 | (defun exchange-point-and-mark (&optional arg) | 6125 | (defun exchange-point-and-mark (&optional arg) |
| 6128 | "Put the mark where point is now, and point where the mark is now. | 6126 | "Put the mark where point is now, and point where the mark is now. |
| 6129 | This command works even when the mark is not active, | 6127 | This command works even when the mark is not active, |
| @@ -8409,18 +8407,6 @@ Called with three arguments (BEG END TEXT), it should replace the text | |||
| 8409 | between BEG and END with TEXT. Expected to be set buffer-locally | 8407 | between BEG and END with TEXT. Expected to be set buffer-locally |
| 8410 | in the *Completions* buffer.") | 8408 | in the *Completions* buffer.") |
| 8411 | 8409 | ||
| 8412 | (defvar completion-base-size nil | ||
| 8413 | "Number of chars before point not involved in completion. | ||
| 8414 | This is a local variable in the completion list buffer. | ||
| 8415 | It refers to the chars in the minibuffer if completing in the | ||
| 8416 | minibuffer, or in `completion-reference-buffer' otherwise. | ||
| 8417 | Only characters in the field at point are included. | ||
| 8418 | |||
| 8419 | If nil, Emacs determines which part of the tail end of the | ||
| 8420 | buffer's text is involved in completion by comparing the text | ||
| 8421 | directly.") | ||
| 8422 | (make-obsolete-variable 'completion-base-size 'completion-base-position "23.2") | ||
| 8423 | |||
| 8424 | (defun delete-completion-window () | 8410 | (defun delete-completion-window () |
| 8425 | "Delete the completion list window. | 8411 | "Delete the completion list window. |
| 8426 | Go to the window from which completion was requested." | 8412 | Go to the window from which completion was requested." |
| @@ -8474,7 +8460,6 @@ If EVENT, use EVENT's position to determine the starting position." | |||
| 8474 | (run-hooks 'mouse-leave-buffer-hook) | 8460 | (run-hooks 'mouse-leave-buffer-hook) |
| 8475 | (with-current-buffer (window-buffer (posn-window (event-start event))) | 8461 | (with-current-buffer (window-buffer (posn-window (event-start event))) |
| 8476 | (let ((buffer completion-reference-buffer) | 8462 | (let ((buffer completion-reference-buffer) |
| 8477 | (base-size completion-base-size) | ||
| 8478 | (base-position completion-base-position) | 8463 | (base-position completion-base-position) |
| 8479 | (insert-function completion-list-insert-choice-function) | 8464 | (insert-function completion-list-insert-choice-function) |
| 8480 | (choice | 8465 | (choice |
| @@ -8501,10 +8486,6 @@ If EVENT, use EVENT's position to determine the starting position." | |||
| 8501 | (choose-completion-string | 8486 | (choose-completion-string |
| 8502 | choice buffer | 8487 | choice buffer |
| 8503 | (or base-position | 8488 | (or base-position |
| 8504 | (when base-size | ||
| 8505 | ;; Someone's using old completion code that doesn't know | ||
| 8506 | ;; about base-position yet. | ||
| 8507 | (list (+ base-size (field-beginning)))) | ||
| 8508 | ;; If all else fails, just guess. | 8489 | ;; If all else fails, just guess. |
| 8509 | (list (choose-completion-guess-base-position choice))) | 8490 | (list (choose-completion-guess-base-position choice))) |
| 8510 | insert-function))))) | 8491 | insert-function))))) |
| @@ -8532,10 +8513,6 @@ If EVENT, use EVENT's position to determine the starting position." | |||
| 8532 | (forward-char 1)) | 8513 | (forward-char 1)) |
| 8533 | (point)))) | 8514 | (point)))) |
| 8534 | 8515 | ||
| 8535 | (defun choose-completion-delete-max-match (string) | ||
| 8536 | (declare (obsolete choose-completion-guess-base-position "23.2")) | ||
| 8537 | (delete-region (choose-completion-guess-base-position string) (point))) | ||
| 8538 | |||
| 8539 | (defvar choose-completion-string-functions nil | 8516 | (defvar choose-completion-string-functions nil |
| 8540 | "Functions that may override the normal insertion of a completion choice. | 8517 | "Functions that may override the normal insertion of a completion choice. |
| 8541 | These functions are called in order with three arguments: | 8518 | These functions are called in order with three arguments: |
| @@ -8564,13 +8541,6 @@ back on `completion-list-insert-choice-function' when nil." | |||
| 8564 | ;; unless it is reading a file name and CHOICE is a directory, | 8541 | ;; unless it is reading a file name and CHOICE is a directory, |
| 8565 | ;; or completion-no-auto-exit is non-nil. | 8542 | ;; or completion-no-auto-exit is non-nil. |
| 8566 | 8543 | ||
| 8567 | ;; Some older code may call us passing `base-size' instead of | ||
| 8568 | ;; `base-position'. It's difficult to make any use of `base-size', | ||
| 8569 | ;; so we just ignore it. | ||
| 8570 | (unless (consp base-position) | ||
| 8571 | (message "Obsolete `base-size' passed to choose-completion-string") | ||
| 8572 | (setq base-position nil)) | ||
| 8573 | |||
| 8574 | (let* ((buffer (or buffer completion-reference-buffer)) | 8544 | (let* ((buffer (or buffer completion-reference-buffer)) |
| 8575 | (mini-p (minibufferp buffer))) | 8545 | (mini-p (minibufferp buffer))) |
| 8576 | ;; If BUFFER is a minibuffer, barf unless it's the currently | 8546 | ;; If BUFFER is a minibuffer, barf unless it's the currently |
| @@ -8626,8 +8596,7 @@ Type \\<completion-list-mode-map>\\[choose-completion] in the completion list\ | |||
| 8626 | to select the completion near point. | 8596 | to select the completion near point. |
| 8627 | Or click to select one with the mouse. | 8597 | Or click to select one with the mouse. |
| 8628 | 8598 | ||
| 8629 | \\{completion-list-mode-map}" | 8599 | \\{completion-list-mode-map}") |
| 8630 | (set (make-local-variable 'completion-base-size) nil)) | ||
| 8631 | 8600 | ||
| 8632 | (defun completion-list-mode-finish () | 8601 | (defun completion-list-mode-finish () |
| 8633 | "Finish setup of the completions buffer. | 8602 | "Finish setup of the completions buffer. |
| @@ -8664,14 +8633,11 @@ Called from `temp-buffer-show-hook'." | |||
| 8664 | (if minibuffer-completing-file-name | 8633 | (if minibuffer-completing-file-name |
| 8665 | (file-name-as-directory | 8634 | (file-name-as-directory |
| 8666 | (expand-file-name | 8635 | (expand-file-name |
| 8667 | (buffer-substring (minibuffer-prompt-end) | 8636 | (buffer-substring (minibuffer-prompt-end) (point))))))) |
| 8668 | (- (point) (or completion-base-size 0)))))))) | ||
| 8669 | (with-current-buffer standard-output | 8637 | (with-current-buffer standard-output |
| 8670 | (let ((base-size completion-base-size) ;Read before killing localvars. | 8638 | (let ((base-position completion-base-position) |
| 8671 | (base-position completion-base-position) | ||
| 8672 | (insert-fun completion-list-insert-choice-function)) | 8639 | (insert-fun completion-list-insert-choice-function)) |
| 8673 | (completion-list-mode) | 8640 | (completion-list-mode) |
| 8674 | (set (make-local-variable 'completion-base-size) base-size) | ||
| 8675 | (set (make-local-variable 'completion-base-position) base-position) | 8641 | (set (make-local-variable 'completion-base-position) base-position) |
| 8676 | (set (make-local-variable 'completion-list-insert-choice-function) | 8642 | (set (make-local-variable 'completion-list-insert-choice-function) |
| 8677 | insert-fun)) | 8643 | insert-fun)) |