diff options
| author | Juanma Barranquero | 2009-01-21 11:03:25 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2009-01-21 11:03:25 +0000 |
| commit | 24c7b4608a8c069da6959bbcb5f6e566963a17fb (patch) | |
| tree | 724efc98aa81677dc9730e44cb3e53c6042f840e | |
| parent | 2603d79b46799df9508b7ebdd046ae2084172da0 (diff) | |
| download | emacs-24c7b4608a8c069da6959bbcb5f6e566963a17fb.tar.gz emacs-24c7b4608a8c069da6959bbcb5f6e566963a17fb.zip | |
* term.el (term-previous-matching-input, term-next-matching-input)
(term-previous-matching-input-from-input)
(term-next-matching-input-from-input, term-backward-matching-input)
(term-forward-matching-input): Change argument name to match docstring.
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/term.el | 28 |
2 files changed, 21 insertions, 14 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1d12e361c6d..ec911f3d817 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2009-01-21 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * term.el (term-previous-matching-input, term-next-matching-input) | ||
| 4 | (term-previous-matching-input-from-input) | ||
| 5 | (term-next-matching-input-from-input, term-backward-matching-input) | ||
| 6 | (term-forward-matching-input): Change argument name to match docstring. | ||
| 7 | |||
| 1 | 2009-01-21 Glenn Morris <rgm@gnu.org> | 8 | 2009-01-21 Glenn Morris <rgm@gnu.org> |
| 2 | 9 | ||
| 3 | * emacs-lisp/authors.el (authors-aliases): Remove some "ignore" entries | 10 | * emacs-lisp/authors.el (authors-aliases): Remove some "ignore" entries |
diff --git a/lisp/term.el b/lisp/term.el index 14884246c6c..76fa6fb6a7d 100644 --- a/lisp/term.el +++ b/lisp/term.el | |||
| @@ -1708,14 +1708,14 @@ Moves relative to START, or `term-input-ring-index'." | |||
| 1708 | (when (string-match regexp (ring-ref term-input-ring n)) | 1708 | (when (string-match regexp (ring-ref term-input-ring n)) |
| 1709 | n))) | 1709 | n))) |
| 1710 | 1710 | ||
| 1711 | (defun term-previous-matching-input (regexp arg) | 1711 | (defun term-previous-matching-input (regexp n) |
| 1712 | "Search backwards through input history for match for REGEXP. | 1712 | "Search backwards through input history for match for REGEXP. |
| 1713 | \(Previous history elements are earlier commands.) | 1713 | \(Previous history elements are earlier commands.) |
| 1714 | With prefix argument N, search for Nth previous match. | 1714 | With prefix argument N, search for Nth previous match. |
| 1715 | If N is negative, find the next or Nth next match." | 1715 | If N is negative, find the next or Nth next match." |
| 1716 | (interactive (term-regexp-arg "Previous input matching (regexp): ")) | 1716 | (interactive (term-regexp-arg "Previous input matching (regexp): ")) |
| 1717 | (setq arg (term-search-arg arg)) | 1717 | (setq n (term-search-arg n)) |
| 1718 | (let ((pos (term-previous-matching-input-string-position regexp arg))) | 1718 | (let ((pos (term-previous-matching-input-string-position regexp n))) |
| 1719 | ;; Has a match been found? | 1719 | ;; Has a match been found? |
| 1720 | (if (null pos) | 1720 | (if (null pos) |
| 1721 | (error "Not found") | 1721 | (error "Not found") |
| @@ -1726,15 +1726,15 @@ If N is negative, find the next or Nth next match." | |||
| 1726 | (process-mark (get-buffer-process (current-buffer))) (point)) | 1726 | (process-mark (get-buffer-process (current-buffer))) (point)) |
| 1727 | (insert (ring-ref term-input-ring pos))))) | 1727 | (insert (ring-ref term-input-ring pos))))) |
| 1728 | 1728 | ||
| 1729 | (defun term-next-matching-input (regexp arg) | 1729 | (defun term-next-matching-input (regexp n) |
| 1730 | "Search forwards through input history for match for REGEXP. | 1730 | "Search forwards through input history for match for REGEXP. |
| 1731 | \(Later history elements are more recent commands.) | 1731 | \(Later history elements are more recent commands.) |
| 1732 | With prefix argument N, search for Nth following match. | 1732 | With prefix argument N, search for Nth following match. |
| 1733 | If N is negative, find the previous or Nth previous match." | 1733 | If N is negative, find the previous or Nth previous match." |
| 1734 | (interactive (term-regexp-arg "Next input matching (regexp): ")) | 1734 | (interactive (term-regexp-arg "Next input matching (regexp): ")) |
| 1735 | (term-previous-matching-input regexp (- arg))) | 1735 | (term-previous-matching-input regexp (- n))) |
| 1736 | 1736 | ||
| 1737 | (defun term-previous-matching-input-from-input (arg) | 1737 | (defun term-previous-matching-input-from-input (n) |
| 1738 | "Search backwards through input history for match for current input. | 1738 | "Search backwards through input history for match for current input. |
| 1739 | \(Previous history elements are earlier commands.) | 1739 | \(Previous history elements are earlier commands.) |
| 1740 | With prefix argument N, search for Nth previous match. | 1740 | With prefix argument N, search for Nth previous match. |
| @@ -1750,15 +1750,15 @@ If N is negative, search forwards for the -Nth following match." | |||
| 1750 | term-input-ring-index nil)) | 1750 | term-input-ring-index nil)) |
| 1751 | (term-previous-matching-input | 1751 | (term-previous-matching-input |
| 1752 | (concat "^" (regexp-quote term-matching-input-from-input-string)) | 1752 | (concat "^" (regexp-quote term-matching-input-from-input-string)) |
| 1753 | arg)) | 1753 | n)) |
| 1754 | 1754 | ||
| 1755 | (defun term-next-matching-input-from-input (arg) | 1755 | (defun term-next-matching-input-from-input (n) |
| 1756 | "Search forwards through input history for match for current input. | 1756 | "Search forwards through input history for match for current input. |
| 1757 | \(Following history elements are more recent commands.) | 1757 | \(Following history elements are more recent commands.) |
| 1758 | With prefix argument N, search for Nth following match. | 1758 | With prefix argument N, search for Nth following match. |
| 1759 | If N is negative, search backwards for the -Nth previous match." | 1759 | If N is negative, search backwards for the -Nth previous match." |
| 1760 | (interactive "p") | 1760 | (interactive "p") |
| 1761 | (term-previous-matching-input-from-input (- arg))) | 1761 | (term-previous-matching-input-from-input (- n))) |
| 1762 | 1762 | ||
| 1763 | 1763 | ||
| 1764 | (defun term-replace-by-expanded-history (&optional silent) | 1764 | (defun term-replace-by-expanded-history (&optional silent) |
| @@ -2312,15 +2312,15 @@ buffer." | |||
| 2312 | (interactive) | 2312 | (interactive) |
| 2313 | (process-send-eof)) | 2313 | (process-send-eof)) |
| 2314 | 2314 | ||
| 2315 | (defun term-backward-matching-input (regexp arg) | 2315 | (defun term-backward-matching-input (regexp n) |
| 2316 | "Search backward through buffer for match for REGEXP. | 2316 | "Search backward through buffer for match for REGEXP. |
| 2317 | Matches are searched for on lines that match `term-prompt-regexp'. | 2317 | Matches are searched for on lines that match `term-prompt-regexp'. |
| 2318 | With prefix argument N, search for Nth previous match. | 2318 | With prefix argument N, search for Nth previous match. |
| 2319 | If N is negative, find the next or Nth next match." | 2319 | If N is negative, find the next or Nth next match." |
| 2320 | (interactive (term-regexp-arg "Backward input matching (regexp): ")) | 2320 | (interactive (term-regexp-arg "Backward input matching (regexp): ")) |
| 2321 | (let* ((re (concat term-prompt-regexp ".*" regexp)) | 2321 | (let* ((re (concat term-prompt-regexp ".*" regexp)) |
| 2322 | (pos (save-excursion (end-of-line (if (> arg 0) 0 1)) | 2322 | (pos (save-excursion (end-of-line (if (> n 0) 0 1)) |
| 2323 | (when (re-search-backward re nil t arg) | 2323 | (when (re-search-backward re nil t n) |
| 2324 | (point))))) | 2324 | (point))))) |
| 2325 | (if (null pos) | 2325 | (if (null pos) |
| 2326 | (progn (message "Not found") | 2326 | (progn (message "Not found") |
| @@ -2328,13 +2328,13 @@ If N is negative, find the next or Nth next match." | |||
| 2328 | (goto-char pos) | 2328 | (goto-char pos) |
| 2329 | (term-bol nil)))) | 2329 | (term-bol nil)))) |
| 2330 | 2330 | ||
| 2331 | (defun term-forward-matching-input (regexp arg) | 2331 | (defun term-forward-matching-input (regexp n) |
| 2332 | "Search forward through buffer for match for REGEXP. | 2332 | "Search forward through buffer for match for REGEXP. |
| 2333 | Matches are searched for on lines that match `term-prompt-regexp'. | 2333 | Matches are searched for on lines that match `term-prompt-regexp'. |
| 2334 | With prefix argument N, search for Nth following match. | 2334 | With prefix argument N, search for Nth following match. |
| 2335 | If N is negative, find the previous or Nth previous match." | 2335 | If N is negative, find the previous or Nth previous match." |
| 2336 | (interactive (term-regexp-arg "Forward input matching (regexp): ")) | 2336 | (interactive (term-regexp-arg "Forward input matching (regexp): ")) |
| 2337 | (term-backward-matching-input regexp (- arg))) | 2337 | (term-backward-matching-input regexp (- n))) |
| 2338 | 2338 | ||
| 2339 | 2339 | ||
| 2340 | (defun term-next-prompt (n) | 2340 | (defun term-next-prompt (n) |