0a3731feef Make memq etc. examples more like they were
ed25282b82 Document effect of 'search-upper-case' on replacement comm...
5a5d8a8ec0 * lisp/desktop.el (desktop-save): Doc fix. (Bug#41007)
* doc/emacs/search.texi (Replacement and Lax Matches): Document
the role of 'search-upper-case' in replacement commands.
(Lax Search): Document the value 'not-yanks' of
'search-upper-case' where the variable itself is documented.
* lisp/replace.el (query-replace-regexp, query-replace): Mention
'search-upper-case' and its effect in doc strings. (Bug#40940)
30c4f35 (origin/emacs-26) query-replace-regexp undo: Update next-repl...
c596be0 Amend the menu caption for page "Display Property" in the Eli...
13b9510 Add description of chinese-sisheng
* lisp/replace.el (perform-replace):
Rename the local binding to not shadow next-replacement.
Update next-replacement after undo (Bug#37287).
* test/lisp/replace-tests.el (query-replace-undo-bug37287): Add test.
(query-replace-undo-bug37073): Tweak this test.
Ensure that non-regexp strings used with `looking-at' are quoted.
* lisp/replace.el (perform-replace): Quote regexp (Bug#37073).
* test/lisp/replace-tests.el (replace-tests-perform-replace-regexp-flag):
New variable.
(replace-tests-with-undo): Use it.
(query-replace-undo-bug37073): Add tests.
* lisp/replace.el (perform-replace): Don't wrap replace-highlight
in save-match-data. Use `(nth 0 real-match-data)' instead of
`(match-beginning 0)' after replace-highlight. (Bug#36328)
* lisp/term/tty-colors.el (tty-color-canonicalize):
Replace string-match with string-match-p.
Thanks to Jayden Navarro <jayden@yugabyte.com> and Alan Mackenzie <acm@muc.de>
Restore lines saying "Maintainer: emacs-devel@gnu.org" when there is
no special maintainer for a file. Although this wasn't documented
it was common practice and removing the lines didn't have consensus.
* lisp/replace.el (perform-replace): Use
display-buffer-overriding-action with inhibit-same-window to prevent
the help buffer from being displayed in the main window. (Bug#34972)
Author: Michał Krzywkowski <k.michal@zoho.com>
Copyright-paperwork-exempt: yes
* lisp/international/mule-cmds.el (ngettext): New function.
https://lists.gnu.org/archive/html/emacs-devel/2019-03/msg00586.html
* lisp/replace.el (flush-lines, how-many, occur-1, occur-engine)
(perform-replace): Use ngettext.
* lisp/progmodes/grep.el (grep-exit-message): Use ngettext.
(grep-mode-font-lock-keywords): Match both singular and plural form
of "matches".
When called interactively, also print the number. (Bug#34520)
* doc/emacs/search.texi (Other Repeating Search): Update
flush-lines that prints the number of deleted lines.
* lisp/vc/diff-mode.el (diff-font-lock-keywords): Use diff-header face
for git index lines (like already used for bzr index lines).
Use diff-file-header face for binary file headers.
(diff-find-source-location): Use expand-file-name for vc-find-revision.
(diff--font-lock-prettify): Use diff-indicator-* faces for
left-fringe indicators.
(diff-syntax-fontify-props): Optimize to not use text-property-not-all
for font-lock-ensure.
* lisp/replace.el (occur-engine-line): Simplify to use font-lock-ensure
without text-property-not-all.
; Not to be merged to master
* lisp/replace.el (occur-engine): Avoid inserting the current line if
orig-line is nil. This happens, for example, when reverting an occur
buffer with `list-matching-lines-jump-to-current-line' set to t.
(Bug#33476)
(occur-mode, occur-1): Use it.
(occur--region-start, occur--region-end, occur--region-start-line)
(occur--orig-line): Remove vars.
(occur-engine): Fix left over use of occur--region-start-line.
Put the region info in the "list of buffers" used for multi-occur.
(occur--parse-occur-buffer): Remove.
(occur): Pass the region to occur-1 as an overlay.
(occur-1): 'bufs' is now a list of buffers or overlays.
(occur-engine): 'buffers' is now a list of buffers or overlays.
* lisp/replace.el (occur-revert-function): Use the value of
occur-revert-function from the correct buffer. (Bug#32987)
* test/lisp/replace-tests.el (replace-occur-revert-bug32543)
(replace-occur-revert-bug32987): New tests.
Suggested by Stefan Monnier here:
https://lists.gnu.org/archive/html/emacs-devel/2018-09/msg00783.html
* lisp/replace.el (occur--parse-occur-buffer): Since point is at the
beginning of the buffer, use `point'.
(occur-revert-function): Prefer `pcase-let' and `point-min'.
Check whether `region-start' or `region-end' are non-nil.
Store the region and orig line into the *Occur* header line.
Retrieve this information in `occur-revert-function'.
* lisp/replace.el (occur--parse-occur-buffer): New defun.
(occur-revert-function): Use it.
(occur-engine): Store region and original position as text properties
into the *Occur* header line.
* lisp/replace.el (occur-engine): Add sensible default values for
(occur--orig-line and nlines.
* lisp/replace.el (perform-replace): Update the replacement string
after the user edit it (Fix Bug#31538).
* test/lisp/replace-tests.el (query-replace-undo-bug31538): New test.
Backport: (cherry picked from commits
ea133e04f4
and
7dcfdf5b14)
If the user query and replaces 'foo' with 'BAR', then
undo must comeback to 'foo', not to 'FOO' (Bug#31073).
* lisp/replace.el (perform-replace): Bind nocasify to non-nil
value during undo/undo-all actions.
* test/lisp/replace-tests.el (query-replace-undo-bug31073): Add test.
(cherry picked from commit 32dc0cb1b5)
* lisp/replace.el (perform-replace): Update the replacement string
after the user edit it (Fix Bug#31538).
* test/lisp/replace-tests.el (replace-tests-clauses): New function.
(replace-tests-bind-read-string): New variable.
(replace-tests-with-undo): Macro to create boilerplate code.
(query-replace-undo-bug31073): Use it.
(query-replace-undo-bug31538): New test.
* lisp/isearch.el (isearch--momentary-message): Propertize message
suffix with minibuffer-prompt face.
(isearch--describe-regexp-mode): Do not omit description in case
of error in default non-literal search.
(isearch-message-prefix): Display “case-sensitive” in case of error.
(isearch-message-suffix): Propertize message suffix with
minibuffer-prompt face.
(isearch-search-fun-default): Remove unused error handling.
* lisp/vc/add-log.el (change-log-next-buffer): Better handle
errors during wrapping.
* lisp/isearch.el (isearch-update-ring): Call isearch-string-propertize.
Delete duplicates with possibly different text properties.
(isearch-string-propertize)
(isearch-update-from-string-properties): New functions.
(with-isearch-suspended, isearch-ring-adjust1):
Call isearch-update-from-string-properties.
(isearch-edit-string): Let-bind minibuffer-allow-text-properties to t.
(isearch-query-replace): Use propertized isearch-string.
(isearch--lax-regexp-function-p): Simplify.
* lisp/replace.el (query-replace-descr): Rewrite to keep text properties
non-destructively in the replacement string.
(query-replace--split-string): Don't remove text properties
by substring-no-properties.
(query-replace-read-args): Try to get isearch-regexp-function
from text-properties.
(perform-replace): Display parameters in the replacement message.
* lisp/desktop.el (desktop--v2s): Check if text properties are unreadable.
(Bug#30786)
https://lists.gnu.org/archive/html/emacs-devel/2018-04/msg00207.html
* lisp/simple.el (next-error-buffer): New buffer-local variable
instead of making buffer-local next-error-last-buffer. (Bug#20489)
(next-error-found-function): New defcustom.
(next-error-buffer-on-selected-frame): Use t for avoid-current arg
of next-error-buffer-p.
(next-error-find-buffer): Add second rule for using the current
next-error-buffer if it's not visited by other navigation.
(next-error, next-error-internal): Call next-error-found.
(next-error-found): New function with body extracted mostly from
next-error.
* lisp/vc/add-log.el (change-log-goto-source-internal): New function
with body from change-log-goto-source.
(change-log-goto-source): Call change-log-goto-source-internal and
next-error-found.
(change-log-next-error): Call change-log-goto-source-internal
instead of change-log-goto-source.
(change-log-mode): Don't set next-error-last-buffer. (Bug#28864)
* lisp/vc/diff-mode.el (diff-goto-source): Call next-error-found.
* lisp/progmodes/xref.el (xref-goto-xref): Call next-error-found.
* lisp/replace.el (occur-mode-goto-occurrence)
(occur-mode-goto-occurrence-other-window)
(occur-mode-display-occurrence): Call next-error-found.
(occur-next-error): Remove unnecessary with-current-buffer.
(Bug#27362, bug#30646)
If the user query and replaces 'foo' with 'BAR', then
undo must comeback to 'foo', not to 'FOO' (Bug#31073).
* lisp/replace.el (perform-replace): Bind nocasify to non-nil
value during undo/undo-all actions.
* test/lisp/replace-tests.el (query-replace-undo-bug31073): Add test.
* lisp/isearch.el (isearch-occur): Use region-bounds as region arg of occur.
(isearch-query-replace): Use use-region-p.
* lisp/replace.el (occur--region-start-line): Rename from
occur--matches-threshold.
(occur): Use complete lines when region is active for line-oriented occur.
(occur-engine): Count lines either from occur--region-start-line or 1.
* lisp/replace.el (occur--orig-line-str): Remove.
(occur): Remove occur--orig-line-str.
(occur-engine): Use add-face-text-property to add the face
list-matching-lines-current-line-face to the current line.
Use previous-single-property-change to find occur--final-pos.
(occur-context-lines): New args orig-line and multi-occur-p.
Find the current line in context lines and add face to it.
(Bug#30281)
63b04c11d5 Fix copyright years by hand
5c7dd8a783 Update copyright year to 2018
220a9ecba1 Merge from Gnulib
312c565566 Don't add empty keyboard macro to macro ring (Bug#24992)
39ca289a7a Allow customization of decoding of "man" command
f8240815ea * etc/NEWS: Add security consideration note on passphrase ...
0c78822c70 Fix subtle problem with scroll-down when scroll-margin is ...
acd289c5a4 Fix problems with indexing in User manual
b240c7846b * lisp/help.el (describe-key): Only (copy-sequence elt) wh...
e879a5444a * src/buffer.c (Frestore_buffer_modified_p): Fix bug#29846
81b1028b63 Improve documentation of 'inhibit-modification-hooks' and ...
7175496d7a Fix doc string of 'enable-recursive-minibuffers'
5b38406491 Fix documentation of delsel and of killing text
# Conflicts:
# etc/NEWS
# etc/refcards/ru-refcard.tex