(Man-reverse-face): Remove variables.
(Man-overstrike, Man-underline, Man-reverse): New faces.
(Man-fontify-manpage): Use them instead of the variables.
(Man-cleanup-manpage): Comment change.
(Man-ansi-color-map): New variable.
(Man-fontify-manpage): Use it.
Call ansi-color-apply-on-region to replace ad hoc code.
Fixes: debbugs:12147
* lisp/ansi-color.el (ansi-colors): Doc fix.
(ansi-color-context, ansi-color-context-region): Doc fix.
(ansi-color--find-face): New function.
(ansi-color-apply, ansi-color-apply-on-region): Use it.
Rename the local variable `face' to `codes' since it is now a list of
ansi codes. Doc fix.
(ansi-color-get-face): Remove.
(ansi-color-parse-sequence): New function, derived from
ansi-color-get-face.
(ansi-color-apply-sequence): Use it. Rewrite, and support ansi
codes 22-27.
Fixes: debbugs:12146
lisp/tooltip.el (tooltip-identifier-from-point): Don't treat tokens
inside comments and strings as identifiers.
lisp/progmodes/gud.el (gud-tooltip-print-command): Quote the
expression to evaluate. This allows to evaluate expressions with
embedded whitespace.
(gud-tooltip-tips): Add a blank before the newline in the
message-box text, for the benefit of message-box emulation on
MS-Windows.
lisp/progmodes/gdb-mi.el (gdb-tooltip-print): Don't ignore error
messages from GDB, pop them up in a tooltip to give feedback to
user.
(gdb-tooltip-print-1): Quote the expression to evaluate. This
allows to evaluate expressions with embedded whitespace.
(gdb-inferior-io--init-proc): Don't send "-inferior-tty" command
if the TTY name is nil or empty (which happens when communicating
with the inferior via pipes, e.g. on MS-Windows).
(gdb-internals): If GDB sends a "&\n" empty debugging message,
don't send that to the GUD buffer.
doc/emacs/building.texi (Debugger Operation): Correct and improve
documentation of the GUD Tooltip mode.
(ruby-syntax-propertize-function): Use it to recognize regexps.
Don't look at the text after regexp, just use the whitelist.
* test/indent/ruby.rb: Rearrange examples, add new ones.
Fixes: debbugs:6286
(ruby-percent-literal-beg-re): New constant.
(ruby-syntax-general-delimiters-goto-beg): Rename to
`ruby-syntax-enclosing-percent-literal', improve literal type check.
(ruby-syntax-propertize-general-delimiters): Rename to
`ruby-syntax-propertize-percent-literal', it's a shorter and more
popular term. Adjust comments everywhere.
(ruby-syntax-propertize-percent-literal): Only propertize when not
inside a simple string or comment. When the literal is unclosed,
leave the text after it unpropertized.
Fixes: debbugs:6286
* 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
* progmodes/python.el
(python-shell-completion--do-completion-at-point)
(python-shell-completion--get-completions): Remove
functions.
(python-shell-completion-complete-at-point): New function.
(python-completion-complete-at-point): Use it.
Prefer pcase-let over destructuring-bind.
* lisp/vc/diff-mode.el (diff-remove-trailing-whitespace): Same.
Also, remove whitespace as we go, rather than after accumulating the
various places.
initial value.
(math-put-default-units): Add options to put composite units and unit
systems in default units table.
(calc-convert-units): Send composite units to `math-put-default-units'
when appropriate.
* lisp/progmodes/ruby-mode.el (ruby-mode-map): Remove deprecated
binding (use `M-;' instead).
(ruby-expr-beg, ruby-parse-partial): ?, _, and : are symbol
constituents, ! is not (but kinda should be).
(ruby-singleton-class-p): New function.
(ruby-expr-beg, ruby-in-here-doc-p)
(ruby-syntax-propertize-heredoc): Use it.
(ruby-syntax-propertize-function): Adjust for changes in
`ruby-syntax-propertize-heredoc'.
* test/automated/ruby-mode-tests.el (ruby-should-indent)
(ruby-assert-state): New functions.
Add new tests.
Fixes: debbugs:12169
* lisp/progmodes/python.el (python-shell-get-process-name): Don't mess
with same-window-buffer-names.
* lisp/eshell/eshell.el (eshell-add-to-window-buffer-names)
(eshell-remove-from-window-buffer-names): Make obsolete.
(eshell-buffer-name, eshell-unload-hook): Don't use them.
(eshell): Just use pop-to-buffer-same-window instead.
* lisp/bindings.el: Bind M-= back to count-words-region.
* lisp/simple.el (count-words-region): Accept a prefix arg for acting
on the entire buffer.
(count-words--buffer-message): New helper function.
* lisp/subr.el (eventp): `nil' is not an event, and eventp is not hot.
(event-start, event-end): Use posn-at-point to return a more
informative posn.
(posnp): New function.
* lisp/mouse.el (popup-menu-normalize-position): Use it.
(popup-menu): Use `popup-menu-normalize-position' to normalize
the form for POSITION argument.
* lisp/term/x-win.el (x-menu-bar-open):
Use the value returend from (posn-at-point) as position
passed to `popup-menu'.