• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/emacs-93/emacs/lisp/emacs-lisp/

Lines Matching +defs:end +defs:of

9 ;; This file is part of GNU Emacs.
12 ;; it under the terms of the GNU General Public License as published by
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;; You should have received a copy of the GNU General Public License
35 ;; Multiple strings are specified by separating each of the strings
40 ;; The default value for the separator character is the value of
42 ;; changed by modifying the value of `crm-separator'.
44 ;; Contiguous strings of non-separator-characters are referred to as
49 ;; the contents of the minibuffer are 'alice,bob,eve' and point is
54 ;; to provide completion in certain circumstances. One of the reasons
62 ;; Some of this code started out as translation from C code in
65 ;; Thanks to Richard Stallman for all of his help (many of the good
72 ;; -the author has gone through a number of test-and-fix cycles w/
85 ;; -tip: use M-f and M-b for ease of navigation among elements.
99 It should be a single character string that doesn't appear in the list of
103 ;; actual filling in of these maps occurs below via `crm-init-keymaps'
106 Analog of `minibuffer-local-completion-map'.")
110 Analog of `minibuffer-local-must-match-map' for crm.")
121 (defvar crm-left-of-element nil
122 "String to the left of the current element.")
127 (defvar crm-right-of-element nil
128 "String to the right of the current element.")
130 (defvar crm-beginning-of-element nil
131 "Buffer position representing the beginning of the current element.")
133 (defvar crm-end-of-element nil
134 "Buffer position representing the end of the current element.")
150 The value of STRING is the string to be completed.
152 The value of PREDICATE is a function to filter possible matches, or
155 The value of FLAG is used to specify the type of completion operation.
156 A value of nil specifies `try-completion'. A value of t specifies
157 `all-completions'. A value of lambda specifes a test for an exact match.
164 (setq lead (substring string 0 (match-end 0)))
165 (setq string (substring string (match-end 0))))
191 -the variables `crm-left-of-element' and `crm-right-of-element' to
192 the strings to the left and right of the current element,
195 -the variables `crm-beginning-of-element' and `crm-end-of-element' to
196 the buffer positions of the beginning and end of the current element
200 (let* ((prompt-end (minibuffer-prompt-end))
201 (minibuffer-string (buffer-substring prompt-end (point-max)))
202 (end-index (or (string-match "," minibuffer-string (- (point) prompt-end))
203 (- (point-max) prompt-end)))
204 (target-string (substring minibuffer-string 0 end-index))
216 (setq crm-beginning-of-element (match-beginning 1))
217 (setq crm-end-of-element (+ end-index prompt-end))
218 ;; string to the left of the current element
219 (setq crm-left-of-element
223 ;; string to the right of the current element
224 (setq crm-right-of-element (substring minibuffer-string end-index))
238 "Display a list of possible completions of the current minibuffer element."
259 The meanings of the return values are:
294 (delete-region (minibuffer-prompt-end) (point-max))
295 (insert crm-left-of-element completion)
298 (insert crm-right-of-element)
299 (backward-char (length crm-right-of-element))
325 If no characters can be completed, display a list of possible completions.
329 ;; take care of scrolling if necessary -- completely cribbed from minibuf.c
345 ;; reaching here means exiting the function w/ return value of nil
349 ;(crm-end-of-element nil)
356 (if (not (eq (point) crm-end-of-element))
357 (goto-char (+ 1 crm-end-of-element)))
362 (if (not (eq (point) crm-end-of-element))
363 (goto-char (+ 1 crm-end-of-element)))
369 "Determine the longest completable (left-anchored) substring of STRING.
370 The description \"left-anchored\" means the positions of the characters
371 in the substring must be the same as those of the corresponding characters
379 completable. A return value of t means that STRING itself is
381 completable proper substring of STRING. If nil is returned, STRING
385 (let* ((length-of-string (length string))
386 (index length-of-string)
387 (done (if (> length-of-string 0)
393 ;; loop through left-anchored substrings in order of descending length,
420 A return value of t means that all strings were verified. A number is
441 ;; still one more case of a match
473 "If all of the minibuffer elements are valid completions then exit.
475 to the location of mismatch and do not exit.
487 (if (eq (minibuffer-prompt-end) (point-max))
514 (buffer-substring (minibuffer-prompt-end) (point-max)))))
515 ;; check all of minibuffer
529 Two keymaps are used depending on the value of the REQUIRE-MATCH
530 argument of the function `completing-read-multiple'.
564 ;; superemulates behavior of completing_read in src/minibuf.c
573 Multiple strings are specified by separating each of the strings with
578 The default value for the separator character is the value of
580 changed by modifying the value of `crm-separator'.
582 Contiguous strings of non-separator-characters are referred to as
587 contents of the minibuffer are 'alice,bob,eve' and point is between
590 The return value of this function is a list of the read strings.
603 crm-left-of-element
604 crm-right-of-element
605 crm-beginning-of-element
606 crm-end-of-element