summaryrefslogtreecommitdiff
path: root/lisp/replace.el
Commit message (Collapse)AuthorAgeFilesLines
...
* * lisp/replace.el (read-regexp): Rename DEFAULT-VALUE arg to DEFAULTSJuri Linkov2012-09-211-21/+25
| | | | | | | and allow accepting a list of strings prepended to a list of standard default values. Doc fix. Fixes: debbugs:12321
* * lisp/replace.el (read-regexp): Add HISTORY arg.Juri Linkov2012-09-211-4/+7
| | | | Fixes: debbugs:7567
* * lisp/replace.el (read-regexp): Don't add ": " when PROMPT alreadyJuri Linkov2012-09-211-11/+13
| | | | | | ends with a colon and space. Fixes: debbugs:12321
* * lisp/replace.el (replace-regexp-lax-whitespace): New defcustom.Juri Linkov2012-09-101-8/+16
| | | | | | | | | | | | | | | (replace-lax-whitespace, query-replace-regexp) (query-replace-regexp-eval, replace-regexp): Doc fix. (perform-replace, replace-highlight): Let-bind isearch-lax-whitespace to replace-lax-whitespace and isearch-regexp-lax-whitespace to replace-regexp-lax-whitespace. * lisp/isearch.el (isearch-query-replace): Let-bind replace-lax-whitespace to isearch-lax-whitespace and replace-regexp-lax-whitespace to isearch-regexp-lax-whitespace. Fixes: debbugs:10885
* Allow scrolling in y-or-n-p.Chong Yidong2012-09-091-4/+18
| | | | | | | | | | | | | | | | | | | | | | | * lisp/replace.el (query-replace-map): Bind four new symbols for requesting window scrolling. * lisp/subr.el (y-or-n-p): Handle the window-scrolling bindings in query-replace-map. * lisp/custom.el (custom-theme-load-confirm): Use y-or-n-p. * lisp/window.el (scroll-other-window-down): Make the arg optional. * lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Don't bind scrolling keys since they are now in query-replace-map. * doc/lispref/minibuf.texi (Yes-or-No Queries): Document recentering and scrolling in y-or-n-p. Remove gratuitous example. * doc/lispref/searching.texi (Search and Replace): Document window scrolling entries in query-replace-map. Fixes: debbugs:8948
* * lisp/replace.el (replace-lax-whitespace): New defcustom.Juri Linkov2012-09-061-1/+36
| | | | | | | | | | | | | | | | | | | (query-replace, query-replace-regexp, query-replace-regexp-eval) (replace-string, replace-regexp): Mention it in docstrings. (perform-replace, replace-highlight): Let-bind isearch-lax-whitespace and isearch-regexp-lax-whitespace according to the values of replace-lax-whitespace and regexp-flag. Don't let-bind search-whitespace-regexp. * lisp/isearch.el (isearch-query-replace): Let-bind replace-lax-whitespace instead of let-binding replace-search-function and replace-re-search-function. (isearch-lazy-highlight-search): Let-bind isearch-lax-whitespace and isearch-regexp-lax-whitespace to lazy-highlight variables. (isearch-toggle-symbol): Set isearch-regexp to nil in isearch-word mode (like in isearch-toggle-word). Fixes: debbugs:10885
* Use `isearch-search-fun' in `perform-replace' (bug#10885, bug#10887).Juri Linkov2012-09-061-25/+18
| | | | | | | | | | | | | * lisp/replace.el (replace-search-function) (replace-re-search-function): Set default values to nil. (perform-replace): Let-bind isearch-related variables based on replace-related values, call `isearch-search-fun' and let-bind the result to `search-function'. Remove code that sets `search-function' and `search-string' separately for `delimited-flag'. (replace-highlight): Add new argument `delimited-flag' and rename other arguments to the names used in `perform-replace'. Let-bind `isearch-word' to the argument `delimited-flag'.
* Add inhibit-switch-frame parameter for display-buffer, and use it in occur-edit.Chong Yidong2012-08-061-1/+3
| | | | | | | | | | | | | | * replace.el (occur-after-change-function): Avoid losing focus by using the inhibit-switch-frame display action option. * window.el (window--maybe-raise-frame): New function. (window--display-buffer): Split off from here. (display-buffer-reuse-window, display-buffer-pop-up-frame) (display-buffer-pop-up-window, display-buffer-use-some-window): Obey an inhibit-switch-frame action alist entry. (display-buffer): Update doc. Fixes: debbugs:12139
* Fix typo in docstring. Bug #12122.Bastien Guerry2012-08-021-2/+2
|
* Get rid of all the manual purecopy calls in menu-bar definitions.Stefan Monnier2012-06-271-41/+40
| | | | | | | | | | | | * lisp/loadup.el (purify-flag): Pre-grow the hash-table to reduce the memory use. * lisp/bindings.el (bindings--define-key): New function. * lisp/vc/vc-hooks.el, lisp/replace.el, lisp/menu-bar.el: * lisp/international/mule-cmds.el, lisp/emacs-lisp/lisp-mode.el: * lisp/buff-menu.el, lisp/bookmark.el: * bindings.el: Use it to purecopy define-key bindings. * src/fns.c (maybe_resize_hash_table): Output message when growing the purify-hashtable.
* Doc and lispref updates related to searchingGlenn Morris2012-03-281-2/+2
| | | | | | | | | | | | | | * doc/lispref/searching.texi (Regexp Functions, Regexp Search): (Simple Match Data, Saving Match Data, Standard Regexps): Copyedits. (Regexp Functions): Mention regexp-opt is not guaranteed. Mention regexp-opt-charset. (Regexp Search): Recommend against looking-back. (Search and Replace): Use Texinfo recommended quote convention. Add more query-replace-map items. List multi-query-replace-map items. * lisp/replace.el (query-replace-map): Doc fix. * admin/FOR-RELEASE: Related markup.
* * lisp/replace.el (replace-highlight): Set isearch-word to nil unconditionally.Juri Linkov2012-03-111-3/+3
| | | | Fixes: debbugs:10887
* * lisp/replace.el (occur-menu-map): Add menu item for `occur-edit-mode'.Juri Linkov2012-02-231-0/+3
|
* Add 2012 to FSF copyright years for Emacs filesGlenn Morris2012-01-051-1/+1
|
* Spelling fixes.Paul Eggert2011-11-261-1/+1
|
* Spelling fixes.Paul Eggert2011-11-191-1/+1
|
* Fixes for Occur Edit mode.Leo Liu2011-09-191-3/+3
| | | | | * replace.el (occur-revert-arguments): Make it permanent-local. (occur-mode): Don't call font-lock-defontify.
* * lisp/replace.el (occur-mode-map): Rebind occur-edit-mode to "e".Chong Yidong2011-09-171-35/+52
| | | | | | | | | | | | (occur-edit-mode-map): Bind C-c C-c to occur-cease-edit and C-o to occur-mode-display-occurrence. (occur-edit-mode): Add usage message. (occur-cease-edit): New command. (occur-after-change-function): Use text properties to find the position of the prefix text. (occur-engine): Set stickiness of prefix text properties. Fixes: debbugs:8463
* * replace.el (occur-mode-goto-occurrence): Don't force using other window.Chong Yidong2011-09-141-1/+1
| | | | Fixes: debbugs:9499
* Fix various uses of display-buffer and pop-to-bufferChong Yidong2011-09-101-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to avoid using special-display-* and same-window-* variables. * lisp/buff-menu.el (Buffer-menu-switch-other-window): Use second arg of display-buffer. (Buffer-menu-2-window): Use switch-to-buffer-other-window. * lisp/replace.el (occur-mode-goto-occurrence) (occur-mode-display-occurrence) Use second arg of pop-to-buffer and display-buffer. * lisp/window.el (display-buffer-alist): Add *Python*. * lisp/mail/reporter.el (reporter-submit-bug-report): Use second arg of display-buffer. * lisp/mail/sendmail.el (sendmail-user-agent-compose): Don't bind the special-display and same-window variables. (mail-other-window): Use switch-to-buffer-other-window. (mail-other-frame): USe switch-to-buffer-other-frame. * lisp/progmodes/gdb-mi.el (gdb-frame-gdb-buffer): Use display-buffer-other-frame. (gdb-display-gdb-buffer): Use pop-to-buffer. * lisp/progmodes/gud.el (gud-goto-info): Use info-other-window. * lisp/progmodes/python.el: Don't set same-window-buffer-names. * lisp/textmodes/bibtex.el (bibtex-search-entry): Use switch-to-buffer.
* * replace.el (multi-occur): MentionLars Magne Ingebrigtsen2011-07-021-1/+2
| | | | | | `multi-occur-in-matching-buffers' in the doc string. Fixes: debbugs:7566
* New major mode: Occur Edit mode.Leo Liu2011-05-281-22/+86
| | | | | | | | * lisp/replace.el (occur-menu-map, occur-edit-mode-map): New vars. (occur-mode-map): Bind occur-edit-mode. Use occur-menu-map. (occur-edit-mode): New major mode (Bug#8463). (occur-after-change-function): New function. (occur-engine): Give Occur tags a read-only property.
* lisp/*.el: Lexical-binding cleanup.Juanma Barranquero2011-04-191-10/+22
|
* * lisp/replace.el (occur-mode-map): Some fixes for menu items.Glenn Morris2011-04-071-11/+14
|
* Merge from emacs-23; up to 2010-06-03T05:41:49Z!rgm@gnu.org.Glenn Morris2011-02-271-1/+1
|\
| * Fix spelling of "precede".Glenn Morris2011-02-221-1/+1
| |
* | Move keymap initialization into declaration.Stefan Monnier2011-02-101-48/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/textmodes/enriched.el (enriched-mode-map): * lisp/textmodes/bib-mode.el (bib-mode-map): * lisp/term/lk201.el (lk201-function-map): * lisp/tar-mode.el (tar-mode-map): * lisp/replace.el (occur-mode-map): * lisp/progmodes/idlwave.el (idlwave-rinfo-mouse-map, idlwave-rinfo-map): * lisp/progmodes/idlw-help.el (idlwave-help-mode-map): * lisp/progmodes/gdb-mi.el (gdb-memory-format-menu, gdb-memory-unit-menu): * lisp/play/solitaire.el (solitaire-mode-map): * lisp/play/snake.el (snake-mode-map, snake-null-map): * lisp/play/pong.el (pong-mode-map): * lisp/play/handwrite.el (menu-bar-handwrite-map): * lisp/play/gametree.el (gametree-mode-map): * lisp/net/rcirc.el (rcirc-mode-map, rcirc-browse-url-map (rcirc-multiline-minor-mode-map, rcirc-track-minor-mode-map): * lisp/net/newst-plainview.el (newsticker-menu, newsticker-mode-map) (newsticker--url-keymap): * lisp/net/net-utils.el (nslookup-mode-map, ftp-mode-map): * lisp/menu-bar.el (menu-bar-file-menu, menu-bar-i-search-menu) (menu-bar-search-menu, menu-bar-replace-menu, menu-bar-goto-menu) (menu-bar-edit-menu, menu-bar-custom-menu) (menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu) (menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu) (menu-bar-line-wrapping-menu, menu-bar-options-menu) (menu-bar-games-menu, menu-bar-encryption-decryption-menu) (menu-bar-tools-menu, menu-bar-describe-menu) (menu-bar-search-documentation-menu, menu-bar-manuals-menu) (menu-bar-help-menu): * lisp/mail/rmailsum.el (rmail-summary-mode-map): * lisp/kmacro.el (kmacro-step-edit-map): * lisp/ibuffer.el (ibuffer-mode-groups-popup, ibuffer-mode-map) (ibuffer-mode-operate-map): * lisp/hi-lock.el (hi-lock-menu, hi-lock-map): * lisp/emulation/vip.el (vip-mode-map): * lisp/emacs-lisp/re-builder.el (reb-lisp-mode-map): * lisp/bookmark.el (bookmark-bmenu-mode-map): * lisp/help-mode.el (help-mode-map): * lisp/erc/erc-list.el (erc-list-menu-mode-map): * lisp/org/org-remember.el (org-remember-mode-map): * lisp/org/org-src.el (org-src-mode-map): Move initialization into declaration.
* | * lisp/simple.el (special-mode-map): Bind "h" to `describe-mode';Sam Steingold2011-02-011-66/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bind "z" to `kill-this-buffer'. (completion-list-mode-map): Bind "z" to `kill-this-buffer'. * lisp/apropos.el (apropos-mode-map): Inherit from `special-mode-map'. (apropos-mode): Inherit from `special-mode'. * lisp/arc-mode.el (archive-mode-map): Inherit from `special-mode-map'. * lisp/bookmark.el (bookmark-bmenu-mode): Define using `define-derived-mode' inheriting from `special-mode'. * lisp/dired.el (dired-mode-map): Inherit from `special-mode-map'. * lisp/image-mode.el (image-mode-map): Ditto. * lisp/replace.el (occur-mode): Define using `define-derived-mode' inheriting from `special-mode'. * lisp/tar-mode.el (tar-mode): Inherit from `special-mode'. * lisp/calendar/diary-lib.el (diary-fancy-display-mode): Inherit from `special-mode-map'. * lisp/emacs-lisp/ert.el (ert-simple-view-mode, ert-results-mode): Inherit from `special-mode'. * lisp/emacs-lisp/package.el (package-menu-mode-map): Copy from `special-mode-map'. (package-menu-mode): Define using `define-derived-mode' inheriting from `special-mode'. * erc/erc-list.el (erc-list-menu-mode): Inherit from `special-mode'. * lisp/net/xesam.el (xesam-mode): Inherit from `special-mode'. (xesam-mode-map): Define separately. * lisp/play/solitaire.el (solitaire-mode): Inherit from `special-mode'. * lisp/progmodes/compile.el (compilation-minor-mode-map) (compilation-mode-map): Inherit from `special-mode-map'. * lisp/vc/diff-mode.el (diff-mode-shared-map): Inherit from `special-mode-map'. * lisp/vc/log-view.el (log-view-mode-map): Add a comment.
* | Convert consecutive FSF copyright years to ranges.Glenn Morris2011-01-241-2/+1
| |
* | Nuke arch-tags.Glenn Morris2011-01-151-1/+0
| |
* | Merge from emacs-23Stefan Monnier2011-01-141-1/+1
|\|
| * Add 2011 to FSF/AIST copyright years.Glenn Morris2011-01-021-1/+1
| |
* | * lisp/replace.el: Add "collect" feature to occur.Tak Ota2010-12-031-15/+67
| | | | | | | | | | | | (occur-collect-regexp-history): New var. (occur-read-primary-args): Return a replace string for nlines, if needed. (occur): Extend the meaning of nlines.
* | Add "Package:" file headers to denote built-in packages.Chong Yidong2010-08-291-0/+1
| |
* | Merge changes from emacs-23 branchChong Yidong2010-08-081-1/+3
|\|
| * Fix query-replace-regexp incomplete highlighting (Bug#6808).Johan Bockgård2010-08-081-1/+3
| | | | | | | | | | | | | | | | | | | | * replace.el (replace-highlight): Bind isearch-forward and isearch-error, ensuring that highlighting is updated if the user switches the search direction (Bug#6808). * isearch.el (isearch-lazy-highlight-forward): New var. (isearch-lazy-highlight-new-loop, isearch-lazy-highlight-search): (isearch-lazy-highlight-update): Use it.
* | * replace.el (replace-highlight): Fix lazy-highlightingJuri Linkov2010-05-211-0/+3
| | | | | | | | for `M-s w str M-% str RET'.
* | * replace.el (occur-accumulate-lines): Move occur-engine relatedJuri Linkov2010-03-301-23/+23
| | | | | | | | | | functions `occur-accumulate-lines' and `occur-engine-add-prefix' to be located after `occur-engine'.
* | Make occur handle multi-line matches cleanly with context.Juri Linkov2010-03-301-17/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01280.html * replace.el (occur-accumulate-lines): Add optional arg `pt'. (occur-engine): Add local variables `ret', `prev-after-lines', `prev-lines'. Use more arguments for `occur-context-lines'. Set first elem of its returned list to `data', and the second elem to `prev-after-lines'. Don't print the separator line. In the end, print remaining context after-lines. (occur-context-lines): Add new arguments `begpt', `endpt', `lines', `prev-lines', `prev-after-lines'. Rewrite to combine after-lines of the previous match with before-lines of the current match and not overlap them. Return a list with two values: the output line and the list of context after-lines. * search.texi (Other Repeating Search): Remove line that `occur' can not handle multiline matches. * occur-testsuite.el (occur-tests): Add tests for context lines.
* | * replace.el (occur-accumulate-lines): Fix a bug where the firstJuri Linkov2010-03-301-4/+4
| | | | | | | | context line at the beginning of the buffer was missing.
* | Implement Occur multi-line matches.Juri Linkov2010-03-231-22/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01044.html * replace.el (occur): Doc fix. (occur-engine): Set `begpt' to the beginning of the first line. Set `endpt' to the end of the last match line. At first, count line numbers between `origpt' and `begpt'. Split out code from `out-line' variable to new let-bindings `match-prefix' and `match-str'. In `out-line' add non-numeric prefix to all non-first lines of multi-line matches. Finally, count lines between `begpt' and `endpt' and add to `lines'.
* | * replace.el (occur-engine-line): Add optional arg `keep-props'.Juri Linkov2010-03-231-3/+3
| | | | | | | | (occur-accumulate-lines, occur-engine): Add arg `keep-props'.
* | * replace.el (occur-accumulate-lines, occur-engine):Juri Linkov2010-03-231-23/+14
| | | | | | | | | | | | Use `occur-engine-line' instead of duplicate code. (occur-engine-line): New function created from duplicate code in `occur-accumulate-lines' and `occur-engine'.
* | Fix message of multi-line occur regexps and multi-buffer header lines.Juri Linkov2010-03-211-4/+23
| | | | | | | | | | | | | | | | | | | | | | http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg00457.html * replace.el (occur-1): Don't display regexp if it is longer than window-width. Use `query-replace-descr' to display regexp. (occur-engine): Don't display regexp in the buffer header for multi-buffer occur. Display a separate header line with total match count and regexp for multi-buffer occur. Use `query-replace-descr' to display regexp.
* | Use query-replace-{from,to}-history-variable in more places.Glenn Morris2010-03-171-3/+7
|/ | | | | | * replace.el (query-replace-history): Give it a doc string. (map-query-replace-regexp): Use query-replace-from-history-variable and query-replace-to-history-variable.
* Add 2010 to copyright years.Glenn Morris2010-01-131-1/+1
|
* (perform-replace): Let-bind recenter-last-op to nil.Juri Linkov2009-11-301-3/+12
| | | | | | | For def=recenter, replace `recenter' with `recenter-top-bottom' that is called with `this-command' and `last-command' let-bound to `recenter-top-bottom'. When the last `def' was not `recenter', set `recenter-last-op' to nil. (Bug#4981)
* * textmodes/ispell.el (ispell-skip-region-alist):Dan Nicolaescu2009-11-121-1/+1
| | | | | | | | | | | | | | * textmodes/css-mode.el (auto-mode-alist): * progmodes/compile.el (auto-mode-alist): * international/mule.el (ctext-non-standard-encodings-alist) (ctext-non-standard-encodings-regexp): * simple.el (shell-command-switch, text-read-only): * replace.el (occur-mode-map): * paths.el (rmail-file-name): * jka-cmpr-hook.el (jka-compr-build-file-regexp): * find-file.el (ff-special-constructs): * files.el (file-name-handler-alist): * composite.el: Purecopy strings.
* * subr.el (menu-bar-separator): New defconst.Dan Nicolaescu2009-11-111-1/+1
| | | | | | | | | | | | | * replace.el (occur-mode-map): * menu-bar.el (menu-bar-file-menu, menu-bar-search-menu) (menu-bar-edit-menu, menu-bar-goto-menu, menu-bar-edit-menu) (menu-bar-custom-menu, menu-bar-showhide-menu) (menu-bar-options-menu, menu-bar-tools-menu) (menu-bar-encryption-decryption-menu, menu-bar-describe-menu) (menu-bar-search-documentation-menu, menu-bar-manuals-menu) (menu-bar-help-menu): * ediff-hook.el (menu-bar-ediff-menu, menu-bar-ediff-merge-menu): * buff-menu.el (Buffer-menu-mode-map): Use menu-bar-separator.
* * puresize.h (BASE_PURESIZE): Increase to 1430000.Dan Nicolaescu2009-10-231-21/+21
| | | | | | | | | | | | | | | | | | | | | | * term/tty-colors.el (msdos-color-values): Remove declaration, unused. (color-name-rgb-alist, tty-standard-colors) (tty-color-mode-alist): Change to defconst. * simple.el (mark-inactive): Purecopy message. * menu-bar.el (menu-bar-make-mm-toggle, menu-bar-make-toggle): Fix macro. (global-map, yank-menu): * textmodes/ispell.el (ispell-menu-map): * net/eudc.el (eudc-tools-menu): * international/mule-cmds.el (describe-language-environment-map) (setup-language-environment-map, set-coding-system-map) (mule-menu-keymap): * vc-hooks.el (vc-menu-entry, vc-menu-map): * replace.el (occur-mode-map): * pcvs-defs.el (cvs-global-menu): Purecopy names and tooltips. * bindings.el (propertized-buffer-identification): Purecopy tooltip text.