* doc/emacs/display.texi (Highlight Interactively):
* etc/NEWS: Document the change.
* lisp/hi-lock.el (hi-lock-face-buffer, hi-lock-set-pattern): Use
the prefix argument to highlight only the corresponding sub-expression
of the regexp (Bug#32365).
Copyright-paperwork-exempt: yes
Add a paragraph to minor mode's docstring documenting the mode's ARG
usage if the supplied docstring doesn't already contain the word "ARG".
* easy-mmode.el (easy-mmode--arg-docstring): New const.
(easy-mmode--arg-docstring): New function.
(define-minor-mode): Use them.
Remove argument documentation from all minor modes.
Most of this change is to boilerplate commentary such as license URLs.
This change was prompted by ftp://ftp.gnu.org's going-away party,
planned for November. Change these FTP URLs to https://ftp.gnu.org
instead. Make similar changes for URLs to other organizations moving
away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and
fsf.org when this works, as this will further help defend against
man-in-the-middle attacks (for this part I omitted the MS-DOS and
MS-Windows sources and the test tarballs to keep the workload down).
HTTPS is not fully working to lists.gnu.org so I left those URLs alone
for now.
If font-lock-mode is disabled in the current buffer, and
there are no matches for REGEXP, then keep FACE available
for a next search.
* lisp/hi-lock.el (hi-lock-set-pattern): Add FACE into
hi-lock--unused-faces if font-lock-mode is disabled and
there are no matches.
* test/lisp/hi-lock-tests.el (hi-lock-test-set-pattern): Add test.
* lisp/hi-lock.el (hi-lock-set-pattern): If REGEXP is already
highlighted, then push FACE into hi-lock--unused-faces (Bug#26666).
* test/lisp/hi-lock-tests.el (hi-lock-bug26666): Add test.
Problem reported by Artur Malabarba in:
http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01513.html
Most of these fixes are to documentation; many involve fixing
longstanding quoting glitches that are independent of the
recent substitute-command-keys changes. The changes to code are:
* lisp/cedet/mode-local.el (mode-local-augment-function-help)
(describe-mode-local-overload):
Substitute docstrings before displaying them.
* lisp/emacs-lisp/cl-macs.el (cl--transform-lambda):
Quote the generated docstring for later substitution.
Mostly these fixes prevent the transliteration of apostrophes
that should stay apostrophes. Also, prefer curved quotes in
Bahá’í proper names, as that’s the preferred Bahá’í style and
these names are chock-full of non-ASCII characters anyway.
* lisp/emacs-lisp/eieio-core.el (eieio-defclass-autoload)
(eieio-defclass-internal):
* lisp/emacs-lisp/eieio.el (defclass):
* lisp/hi-lock.el (hi-lock-mode):
Don’t transliterate Lisp apostrophes when generating a
doc string or diagnostic.
* lisp/international/mule-diag.el (list-coding-systems-1):
* lisp/international/ogonek.el (ogonek-jak, ogonek-how):
* lisp/mail/sendmail.el (sendmail-query-user-about-smtp):
* lisp/vc/ediff-mult.el (ediff-redraw-registry-buffer):
* lisp/vc/ediff-ptch.el (ediff-fixup-patch-map):
Substitute quotes before putting them in the help buffer.
Fixes: debbugs:18960
* lisp/eshell/em-hist.el (eshell-hist-parse-word-designator):
Return args joined with " ".
* lisp/eshell/em-pred.el (eshell-parse-modifiers): Correct docstring.
(eshell-hist-parse-modifier): Pass mod a list instead of a string.
(read-regexp-suggestions): New function.
(read-regexp): Use `read-regexp-defaults-function' to get default values.
Use `read-regexp-suggestions'. Add non-empty default to history
for empty input.
(occur-read-regexp-defaults-function): Remove function.
(occur-read-primary-args): Use `regexp-history-last' instead of
`occur-read-regexp-defaults-function'.
* lisp/hi-lock.el (hi-lock-read-regexp-defaults-function): Remove function.
(hi-lock-line-face-buffer, hi-lock-face-buffer)
(hi-lock-face-phrase-buffer): Use `regexp-history-last' instead of
`hi-lock-read-regexp-defaults-function'. Doc fix.
(hi-lock-face-symbol-at-point): Replace `find-tag-default-as-regexp'
with `find-tag-default-as-symbol-regexp'. Doc fix.
(hi-lock-read-regexp-defaults): Remove function.
(hi-lock-regexp-okay): Add check for null.
* lisp/progmodes/grep.el (grep-read-regexp): Use `grep-tag-default' for
the arg DEFAULTS. Move formatting of the prompt to `read-regexp'.
* lisp/subr.el (find-tag-default-as-symbol-regexp): New function.
(find-tag-default-as-regexp): Move symbol regexp formatting to
`find-tag-default-as-symbol-regexp'.
Fixes: debbugs:14405
to add the face property to matches and titles.
* lisp/hi-lock.el (hi-green): Use lighter color "light green" closer to
the palette of other hi-lock colors.
(hi-lock-set-pattern): Prepend hi-lock face to the existing face.
Fixes: debbugs:14645
* doc/emacs/display.texi (Highlight Interactively): Add global keybindings
with the key prefix `M-s h'. Document old command `highlight-phrase'.
Document new command `highlight-symbol-at-point'.
* lisp/bindings.el (search-map): Bind `highlight-symbol-at-point' to
`M-s h .'.
* lisp/hi-lock.el (highlight-symbol-at-point): New alias for the new
command `hi-lock-face-symbol-at-point'.
(hi-lock-face-symbol-at-point): New command.
(hi-lock-map): Bind `highlight-symbol-at-point' to `C-x w .'.
(hi-lock-menu): Add `highlight-symbol-at-point'.
(hi-lock-mode): Doc fix.
* lisp/isearch.el (isearch-forward-symbol-at-point): New command.
(search-map): Bind `isearch-forward-symbol-at-point' to `M-s .'.
(isearch-highlight-regexp): Add a regexp which matches
words/symbols for word/symbol mode.
* lisp/subr.el (find-tag-default-bounds): New function with the body
mostly moved from `find-tag-default'.
(find-tag-default): Move most code to `find-tag-default-bounds',
call it and apply `buffer-substring-no-properties' afterwards.
Fixes: debbugs:14427
(hi-lock-keyword->face): New function. Use it wherever we used
cadadadr instead.
(hi-lock--regexps-at-point): Ignore faces that can't come from hi-lock.
(hi-lock--last-face): Remove var.
(hi-lock--unused-faces): New var to replace it.
(hi-lock-read-face-name): Use/maintain it.
(hi-lock-unface-buffer): Maintain it. Fix error for the C-u case.
(hi-lock-set-pattern): Ignore new rule if it has the same regexp even
if it has another face.
Fixes: debbugs:11095
point, still provide some default.
(hi-lock--regexps-at-point): Don't enforce a "hi-lock-" prefix on face
names, since we don't use it right now. Actually return the list.
(hi-lock-file-patterns, hi-lock-interactive-patterns): Use defvar-local.
(hi-lock--auto-select-face-defaults): Remove.
(hi-lock-string-serialize-serial): Remove.
(hi-lock--hashcons-hash): Rename from hi-lock-string-serialize-hash;
make weak.
(hi-lock--hashcons): Rename from hi-lock-string-serialize, return an
equal string.
(hi-lock-set-pattern): Adjust accordingly.
(hi-lock--regexps-at-point): Simplify accordingly.
(hi-lock--auto-select-face-defaults): Remove.
(hi-lock--last-face): New var to replace it.
(hi-lock-read-face-name): Rewrite.
(hi-lock-unface-buffer): Arrange for the face to be the next default.
Fixes: debbugs:11095
(hi-lock-auto-select-face-defaults): New buffer local variable.
(hi-lock-read-face-name): Honor `hi-lock-auto-select-face'.
(hi-lock-unface-buffer): Prompt user with useful defaults.
With prefix arg, unhighlight all hi-lock patterns in buffer.
Fixes: debbugs:11095
* hi-lock.el (hi-lock-mode): Do not unilaterally enable font lock.
(hi-lock-set-pattern): When deciding whether to use font lock or
overlays, look at font-lock-mode instead of font-lock-fontified.
(hi-lock-mode, hi-lock-line-face-buffer, hi-lock-unface-buffer)
(hi-lock-face-buffer, hi-lock-face-phrase-buffer): Doc fix.
Fixes: debbugs:12168