Mercurial > emacs
comparison lisp/simple.el @ 862:46630543d659
*** empty log message ***
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 24 Jul 1992 06:09:27 +0000 |
parents | 5f325fbc093d |
children | fe5f6b7c9727 |
comparison
equal
deleted
inserted
replaced
861:345296f94a1e | 862:46630543d659 |
---|---|
351 (eval command))) | 351 (eval command))) |
352 | 352 |
353 ;; (defvar repeat-complex-command nil) | 353 ;; (defvar repeat-complex-command nil) |
354 | 354 |
355 (defvar minibuffer-history nil) | 355 (defvar minibuffer-history nil) |
356 (defvar minibuffer-history-variable 'minibuffer-history) | 356 (defvar minibuffer-history-sexp-flag nil) |
357 (defvar minibuffer-history-position nil) | 357 (setq minibuffer-history-variable 'minibuffer-history) |
358 (setq minibuffer-history-position nil) | |
358 | 359 |
359 (define-key minibuffer-local-map "\en" 'next-history-element) | 360 (define-key minibuffer-local-map "\en" 'next-history-element) |
360 (define-key minibuffer-local-ns-map "\en" 'next-history-element) | 361 (define-key minibuffer-local-ns-map "\en" 'next-history-element) |
361 (define-key minibuffer-local-ns-map "\en" 'next-history-element) | 362 (define-key minibuffer-local-ns-map "\en" 'next-history-element) |
362 (define-key minibuffer-local-completion-map "\en" 'next-history-element) | 363 (define-key minibuffer-local-completion-map "\en" 'next-history-element) |
378 If the command has been changed or is not the most recent previous command | 379 If the command has been changed or is not the most recent previous command |
379 it is added to the front of the command history. | 380 it is added to the front of the command history. |
380 Whilst editing the command, the following commands are available: | 381 Whilst editing the command, the following commands are available: |
381 \\{repeat-complex-command-map}" | 382 \\{repeat-complex-command-map}" |
382 (interactive "p") | 383 (interactive "p") |
383 (let ((elt (nth (1- repeat-complex-command-arg) command-history)) | 384 (let ((elt (nth (1- arg) command-history)) |
384 (minibuffer-history-position arg) | 385 (minibuffer-history-position arg) |
386 (minibuffer-history-sexp-flag t) | |
385 (repeat-complex-command-flag t) | 387 (repeat-complex-command-flag t) |
386 newcmd) | 388 newcmd) |
387 (if elt | 389 (if elt |
388 (let ((minibuffer-history-variable ' command-history)) | 390 (let ((minibuffer-history-variable ' command-history)) |
389 (setq newcmd (read-from-minibuffer "Redo: " | 391 (setq newcmd (read-from-minibuffer "Redo: " |
406 (error (if (= minibuffer-history-position 1) | 408 (error (if (= minibuffer-history-position 1) |
407 "No following item in minibuffer history" | 409 "No following item in minibuffer history" |
408 "No preceding item in minibuffer history")) | 410 "No preceding item in minibuffer history")) |
409 (erase-buffer) | 411 (erase-buffer) |
410 (setq minibuffer-history-position narg) | 412 (setq minibuffer-history-position narg) |
411 (insert (prin1-to-string (nth (1- minibuffer-history-position) | 413 (let ((elt (nth (1- minibuffer-history-position) |
412 (symbol-value minibuffer-history-variable)))) | 414 (symbol-value minibuffer-history-variable)))) |
415 (insert | |
416 (if minibuffer-history-sexp-flag | |
417 (prin1-to-string elt) | |
418 elt)))) | |
413 (goto-char (point-min))))) | 419 (goto-char (point-min))))) |
414 | 420 |
415 (defun previous-history-element (n) | 421 (defun previous-history-element (n) |
416 "Inserts the previous element of `command-history' into the minibuffer." | 422 "Inserts the previous element of `command-history' into the minibuffer." |
417 (interactive "p") | 423 (interactive "p") |