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

Lines Matching +defs:eval +defs:minibuffer

33 (eval-when-compile
843 (list (read-from-minibuffer (format (if default "Goto line%s (%s): "
848 'minibuffer-history
1010 (set-keymap-parent m minibuffer-local-map)
1015 (defvar minibuffer-completing-symbol nil
1016 "Non-nil means completing a Lisp symbol in the minibuffer.")
1018 (defcustom eval-expression-print-level 4
1019 "Value for `print-level' while printing value in `eval-expression'.
1025 (defcustom eval-expression-print-length 12
1026 "Value for `print-length' while printing value in `eval-expression'.
1032 (defcustom eval-expression-debug-on-error t
1033 "If non-nil set `debug-on-error' to t in `eval-expression'.
1039 (defun eval-expression-print-format (value)
1045 (or (not (memq this-command '(eval-last-sexp eval-print-last-sexp)))
1050 (memq this-command '(eval-last-sexp eval-print-last-sexp)))
1056 ;; We define this, rather than making `eval' interactive,
1057 ;; for the sake of completion of names like eval-region, eval-buffer.
1058 (defun eval-expression (eval-expression-arg
1059 &optional eval-expression-insert-value)
1066 If `eval-expression-debug-on-error' is non-nil, which is the default,
1069 (list (let ((minibuffer-completing-symbol t))
1070 (read-from-minibuffer "Eval: "
1075 (if (null eval-expression-debug-on-error)
1076 (setq values (cons (eval eval-expression-arg) values))
1081 (setq values (cons (eval eval-expression-arg) values))
1088 (let ((print-length eval-expression-print-length)
1089 (print-level eval-expression-print-level))
1090 (if eval-expression-insert-value
1096 (let ((str (eval-expression-print-format (car values))))
1099 (defun edit-and-eval-command (prompt command)
1100 "Prompting with PROMPT, let user edit COMMAND and eval result.
1102 the minibuffer, then read and evaluate the result."
1105 (minibuffer-history-sexp-flag (1+ (minibuffer-depth))))
1107 (read-from-minibuffer prompt
1120 (eval command)))
1124 A complex command is one which used the minibuffer.
1125 The command is placed in the minibuffer as a Lisp form for editing.
1129 You can use the minibuffer history commands \\<minibuffer-local-map>\\[next-history-element] and \\[previous-history-element]
1138 (minibuffer-history-position arg)
1139 (minibuffer-history-sexp-flag (1+ (minibuffer-depth))))
1141 (read-from-minibuffer
1155 (eval newcmd))
1161 (defvar minibuffer-history nil
1162 "Default minibuffer history list.
1163 This is used for all minibuffer input
1165 (defvar minibuffer-history-sexp-flag nil
1167 If the value of this variable equals current minibuffer depth,
1170 recursive uses of the minibuffer.)")
1171 (setq minibuffer-history-variable 'minibuffer-history)
1172 (setq minibuffer-history-position nil) ;; Defvar is in C code.
1173 (defvar minibuffer-history-search-history nil)
1175 (defvar minibuffer-text-before-history nil
1176 "Text that was in this minibuffer before any history commands.
1178 in this use of the minibuffer.")
1180 (add-hook 'minibuffer-setup-hook 'minibuffer-history-initialize)
1182 (defun minibuffer-history-initialize ()
1183 (setq minibuffer-text-before-history nil))
1185 (defun minibuffer-avoid-prompt (new old)
1186 "A point-motion hook for the minibuffer, that moves point out of the prompt."
1189 (defcustom minibuffer-history-case-insensitive-variables nil
1195 :group 'minibuffer)
1205 See also `minibuffer-history-case-insensitive-variables'."
1208 (regexp (read-from-minibuffer "Previous element matching (regexp): "
1210 minibuffer-local-map
1212 'minibuffer-history-search-history
1213 (car minibuffer-history-search-history))))
1216 (if minibuffer-history-search-history
1217 (car minibuffer-history-search-history)
1222 (if (and (zerop minibuffer-history-position)
1223 (null minibuffer-text-before-history))
1224 (setq minibuffer-text-before-history
1225 (minibuffer-contents-no-properties)))
1226 (let ((history (symbol-value minibuffer-history-variable))
1230 (if (memq minibuffer-history-variable
1231 minibuffer-history-case-insensitive-variables)
1239 (pos minibuffer-history-position))
1248 (if (eq minibuffer-history-sexp-flag (minibuffer-depth))
1260 (setq minibuffer-history-position pos)
1262 (delete-minibuffer-contents)
1264 (goto-char (+ (minibuffer-prompt-end) match-offset))))
1279 (regexp (read-from-minibuffer "Next element matching (regexp): "
1281 minibuffer-local-map
1283 'minibuffer-history-search-history
1284 (car minibuffer-history-search-history))))
1287 (if minibuffer-history-search-history
1288 (car minibuffer-history-search-history)
1294 (defvar minibuffer-temporary-goal-position nil)
1297 "Puts next element of the minibuffer history in the minibuffer.
1301 (let ((narg (- minibuffer-history-position n))
1302 (minimum (if minibuffer-default -1 0))
1303 elt minibuffer-returned-to-present)
1304 (if (and (zerop minibuffer-history-position)
1305 (null minibuffer-text-before-history))
1306 (setq minibuffer-text-before-history
1307 (minibuffer-contents-no-properties)))
1309 (if minibuffer-default
1312 (if (> narg (length (symbol-value minibuffer-history-variable)))
1316 (let ((prompt-end (minibuffer-prompt-end)))
1317 (set (make-local-variable 'minibuffer-temporary-goal-position)
1322 (delete-minibuffer-contents)
1323 (setq minibuffer-history-position narg)
1325 (setq elt minibuffer-default))
1327 (setq elt (or minibuffer-text-before-history ""))
1328 (setq minibuffer-returned-to-present t)
1329 (setq minibuffer-text-before-history nil))
1330 (t (setq elt (nth (1- minibuffer-history-position)
1331 (symbol-value minibuffer-history-variable)))))
1333 (if (and (eq minibuffer-history-sexp-flag (minibuffer-depth))
1334 (not minibuffer-returned-to-present))
1338 (goto-char (or minibuffer-temporary-goal-position (point-max))))))
1341 "Puts previous element of the minibuffer history in the minibuffer.
1347 "Get next history element which completes the minibuffer before the point.
1348 The contents of the minibuffer after the point are deleted, and replaced
1354 "^" (regexp-quote (buffer-substring (minibuffer-prompt-end) (point))))
1363 Get previous history element which completes the minibuffer before the point.
1364 The contents of the minibuffer after the point are deleted, and replaced
1370 (defun minibuffer-prompt-width ()
1371 "Return the display width of the minibuffer prompt.
1372 Return 0 if current buffer is not a minibuffer."
1375 (1- (minibuffer-prompt-end)))
1441 (or (eq (selected-window) (minibuffer-window))
1819 (interactive (list (read-from-minibuffer "Shell command: "
1944 (count-screen-lines nil nil nil (minibuffer-window)))))
2037 ;; relocates them while we are in the minibuffer.
2038 (setq string (read-from-minibuffer "Shell command on region: "
3310 (or nomsg executing-kbd-macro (> (minibuffer-depth) 0)
4511 (narrow-to-region (max (minibuffer-prompt-end)
4604 \(such as cancelling a prefix argument, minibuffer or region) do not apply.")
4610 can get out of the minibuffer or other recursive edit,
4615 ((> (minibuffer-depth) 0)
4808 (minibuffer-help-form '(describe-variable var))
4882 "Non-nil means `choose-completion-string' should never exit the minibuffer.
4887 "Number of chars at beginning of minibuffer not involved in completion.
4969 (minibuffer-prompt-end)))
4989 MINI-P - non-nil iff BUFFER is a minibuffer, and
4995 the minibuffer; no further functions will be called.
5006 ;; If BUFFER is the minibuffer, exit the minibuffer
5012 ;; If BUFFER is a minibuffer, barf unless it's the currently
5013 ;; active minibuffer.
5015 (or (not (active-minibuffer-window))
5017 (window-buffer (active-minibuffer-window))))))
5027 (minibuffer-prompt-end)
5037 ;; If completing for the minibuffer, exit it with this choice.
5039 (equal buffer (window-buffer (minibuffer-window)))
5040 minibuffer-completion-table
5042 ;; is a directory, don't exit the minibuffer.
5043 (if (and (eq minibuffer-completion-table 'read-file-name-internal)
5045 (let ((mini (active-minibuffer-window)))
5047 (when minibuffer-auto-raise
5049 (exit-minibuffer)))))))
5116 is needed as a hint. (The minibuffer is a special case. The content
5117 of the minibuffer before point is always the common substring.)")
5123 (mbuf-contents (minibuffer-completion-contents))
5125 ;; When reading a file name in the minibuffer,
5126 ;; set default-directory in the minibuffer
5128 (if minibuffer-completing-file-name
5137 ((and (symbolp minibuffer-completion-table)
5138 (get minibuffer-completion-table 'completion-base-size-function))
5140 ;; completion-common-substring or minibuffer-completion-contents.
5142 (funcall (get minibuffer-completion-table
5144 (minibuffer-completing-file-name
5150 (- (point) (minibuffer-prompt-end)))))
5151 (minibuffer-completing-symbol nil)
5152 ;; Otherwise, in minibuffer, the base size is 0.
5191 (define-key minibuffer-local-completion-map [prior] 'switch-to-completions)
5192 (define-key minibuffer-local-completion-map "\M-v" 'switch-to-completions)
5199 (minibuffer-completion-help))
5360 minibuffer.
5431 from the minibuffer when invoked with a prefix arg. If NEWNAME is nil
5620 ;(defun minibuffer-prompt-modification (start end)
5624 ;(defun minibuffer-prompt-insertion (start end)
5634 ;(setq minibuffer-prompt-properties
5635 ; (list 'modification-hooks '(minibuffer-prompt-modification)
5636 ; 'insert-in-front-hooks '(minibuffer-prompt-insertion)))