diff options
| author | Glenn Morris | 2018-02-08 13:32:35 -0500 |
|---|---|---|
| committer | Glenn Morris | 2018-02-08 13:32:35 -0500 |
| commit | d34dbc0b69b288ee5e969208ab05b00a3fcc7638 (patch) | |
| tree | c59cc566453a15f244911bbcb4ef9561d8541bc4 | |
| parent | a710f8aa61ca73054109dc4f926d1ac6aabdd849 (diff) | |
| download | emacs-d34dbc0b69b288ee5e969208ab05b00a3fcc7638.tar.gz emacs-d34dbc0b69b288ee5e969208ab05b00a3fcc7638.zip | |
Remove unused duplicate of minibuffer-completion-contents
* src/minibuf.c (Fminibuffer_completion_contents): Remove.
Unused since introduction of minubuffer.el 2008-04-09.
(syms_of_minibuf): Remove Sminibuffer_completion_contents.
* lisp/minibuffer.el (minibuffer-completion-contents): Doc tweak.
| -rw-r--r-- | lisp/minibuffer.el | 3 | ||||
| -rw-r--r-- | src/minibuf.c | 14 |
2 files changed, 2 insertions, 15 deletions
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 4d14b2641f3..ef0d40790c5 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -729,7 +729,8 @@ If ARGS are provided, then pass MESSAGE through `format-message'." | |||
| 729 | 729 | ||
| 730 | (defun minibuffer-completion-contents () | 730 | (defun minibuffer-completion-contents () |
| 731 | "Return the user input in a minibuffer before point as a string. | 731 | "Return the user input in a minibuffer before point as a string. |
| 732 | In Emacs-22, that was what completion commands operated on." | 732 | In Emacs 22, that was what completion commands operated on. |
| 733 | If the current buffer is not a minibuffer, return everything before point." | ||
| 733 | (declare (obsolete nil "24.4")) | 734 | (declare (obsolete nil "24.4")) |
| 734 | (buffer-substring (minibuffer-prompt-end) (point))) | 735 | (buffer-substring (minibuffer-prompt-end) (point))) |
| 735 | 736 | ||
diff --git a/src/minibuf.c b/src/minibuf.c index cbb0898a9ab..95e62ceddab 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -325,19 +325,6 @@ If the current buffer is not a minibuffer, return its entire contents. */) | |||
| 325 | return make_buffer_string (prompt_end, ZV, 0); | 325 | return make_buffer_string (prompt_end, ZV, 0); |
| 326 | } | 326 | } |
| 327 | 327 | ||
| 328 | DEFUN ("minibuffer-completion-contents", Fminibuffer_completion_contents, | ||
| 329 | Sminibuffer_completion_contents, 0, 0, 0, | ||
| 330 | doc: /* Return the user input in a minibuffer before point as a string. | ||
| 331 | That is what completion commands operate on. | ||
| 332 | If the current buffer is not a minibuffer, return its entire contents. */) | ||
| 333 | (void) | ||
| 334 | { | ||
| 335 | ptrdiff_t prompt_end = XINT (Fminibuffer_prompt_end ()); | ||
| 336 | if (PT < prompt_end) | ||
| 337 | error ("Cannot do completion in the prompt"); | ||
| 338 | return make_buffer_string (prompt_end, PT, 1); | ||
| 339 | } | ||
| 340 | |||
| 341 | 328 | ||
| 342 | /* Read from the minibuffer using keymap MAP and initial contents INITIAL, | 329 | /* Read from the minibuffer using keymap MAP and initial contents INITIAL, |
| 343 | putting point minus BACKUP_N bytes from the end of INITIAL, | 330 | putting point minus BACKUP_N bytes from the end of INITIAL, |
| @@ -2127,7 +2114,6 @@ characters. This variable should never be set globally. */); | |||
| 2127 | defsubr (&Sminibuffer_prompt_end); | 2114 | defsubr (&Sminibuffer_prompt_end); |
| 2128 | defsubr (&Sminibuffer_contents); | 2115 | defsubr (&Sminibuffer_contents); |
| 2129 | defsubr (&Sminibuffer_contents_no_properties); | 2116 | defsubr (&Sminibuffer_contents_no_properties); |
| 2130 | defsubr (&Sminibuffer_completion_contents); | ||
| 2131 | 2117 | ||
| 2132 | defsubr (&Stry_completion); | 2118 | defsubr (&Stry_completion); |
| 2133 | defsubr (&Sall_completions); | 2119 | defsubr (&Sall_completions); |