Extract `ruby-syntax-propertize-expansions'.
(ruby-syntax-propertize-expansions): Only change syntax on
certain string delimiters, to punctuation. This way the common
functions like forward-word and thing-at-point still work.
(ruby-match-expression-expansion): Improve readability.
(ruby-block-contains-point): New function.
(ruby-add-log-current-method): Handle several edge cases.
* test/automated/ruby-mode-tests.el
Rename one interpolation test; add three more.
(ruby-with-temp-buffer): New macro, use it where appropriate.
(ruby-add-log-current-method-examples): Use "_" for target point.
Add four tests for ruby-add-log-current-method.
Extract `ruby-syntax-propertize-expansions'.
(ruby-syntax-propertize-expansions): Only change syntax on
certain string delimiters, to punctuation. This way the common
functions like forward-word and thing-at-point still work.
* test/automated/ruby-mode-tests.el
Rename one interpolation test; add three more.
(edebug-unload-function): Make sure that unload-feature finishes even when
aborting an ongoing edebug session. Also, do not worry about edebug-mode,
unload-feature takes care of it.
(toggle-frame-maximized): Toggle frame maximization according to
`frame-maximization-style', bound to <f11>.
(cycle-frame-maximized): Cycle between all maximization styles and
non-maximized frame, bound to shift-<f11>.
(eieio-override-prin1): Don't quote kewords and booleans.
(object-write) <eieio-default-superclass>: Don't put closing parens
on new line, avoid needless empty lines, align values that are objects
with the slot keyword (instead of beginning on the same line).
(eieio-list-prin1): Align value with slot keyword; increase
eieio-print-depth before printing members of the list.
Fixes: debbugs:13115
formats.
* lisp/calc/calc-forms.el (math-parse-iso-date): New function.
(math-parse-date): Use `math-parse-iso-date' when appropriate.
(math-parse-iso-date-validate): Add extra error checking.
(calc-date-notation): Add ability to access new date formats.
(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
lisp/makefile.w32-in (WINS_BASIC1, WINS_BASIC2, WINS_BASIC3)
(WINS_BASIC4): New variables, subdivide subdirectories into 4
parts.
(WINS_BASIC): Define as concatenation of the above.
(compile): Subdivide into 4 separate and independent jobs that can
be run in parallel.
(compile0-CMD, compile0-SH): New targets for compiling
COMPILE_FIRST files, which are prerequisites for the rest of the
byte-compilation.
(compile1-CMD, compile2-CMD, compile3-CMD, compile4-CMD): New
targets for parallel compilation with cmd.exe.
(compile1-SH, compile2-SH, compile3-SH, compile4-SH): Ditto for
compiling under a Unixy shell.
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.
* mail/rmail.el (rmail-mime-decoded): New permanent local.
(rmail-show-message-1): Set rmail-mime-decoded when appropriate.
* mail/rmailedit.el (rmail-cease-edit): Respect rmail-mbox-format
and rmail-mime-decoded.
Fixes: debbugs:9841
* lisp/emacs-lisp/cl-macs.el (cl--pop2, cl--optimize-safety)
(cl--optimize-speed, cl--not-toplevel, cl--parse-loop-clause)
(cl--expand-do-loop, cl--proclaim-history, cl--declare-stack)
(cl--do-proclaim, cl--proclaims-deferred): Rename from the "cl-" prefix.
(cl-progv): Don't rely on dynamic scoping to find the body.
* lisp/emacs-lisp/cl-lib.el (cl--optimize-speed, cl--optimize-safety)
(cl--proclaims-deferred): Rename from the "cl-" prefix.
(cl-declaim): Use backquotes.
* lisp/emacs-lisp/cl-extra.el (cl-make-random-state, cl-random-state-p):
Use "cl--" prefix for the object's tag.
(ses--advice-copy-region-as-kill, ses--advice-yank): New functions.
(copy-region-as-kill, yank): Use advice-add.
(ses-unload-function): Use advice-remove.
(button-map): Add bindings for header-line and mode-line use.
(button-get, button-put, button-label): `button' may now be a string.
(button-activate): Don't make it a defsubst.
(button--area-button-p, button--area-button-string): New functions.
(make-text-button): Fix the return value when `beg' was a string.
(push-button): Handle the mode-line case.
Fixes: debbugs:12817
(sql-signum): Remove. Use `cl-signum' instead.
(sql-read-passwd): Remove; use read-passwd instread.
(sql-get-login-ext): Use read-string.
(sql-get-login): Use dolist and pcase.
(sql--completion-table): Rename from sql-try-completion.
Use complete-with-action.
(sql-mode): Don't change abbrev-all-caps globally.
(sql-connect): Don't rely on dynamic scoping for `new-name'.
(sql-postgres-completion-object): Initialize vars in their `let'.
(sql-comint-sybase, sql-comint-sqlite, sql-comint-mysql)
(sql-comint-solid, sql-comint-ms, sql-comint-postgres)
(sql-comint-interbase): Use a single append, without setq.
(sql-comint-linter): Same, and unwind-protect the LINTER_MBX var.
(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
gnus-art.el (article-unsplit-urls)
gnus-bookmark.el (gnus-bookmark-bmenu-list)
gnus-registry.el (gnus-registry-get-article-marks)
message.el (message-goto-body): Use it.
(message-called-interactively-p): Remove.
spam-stat.el (spam-stat-called-interactively-p): New macro.
(spam-stat-score-buffer): Use it.
spam.el: Silence the warnings against BBDB functions when compiling.
gnus-score.el (gnus-score-decode-text-parts):
Use append+mapcar instead of the cl function mapcan.
gnus/gmm-utils.el (gmm-flet): Remove.
gnus/gnus-sync.el (gnus-sync-lesync-call): Avoid overriding json-alist-p.
gnus/message.el (message-read-from-minibuffer): Avoid overriding mail-abbrev-in-expansion-header-p.
mail/mailabbrev.el (mail-abbrev-expand-wrapper): Work in minibuffer so as to enable message-read-from-minibuffer to expand mail aliases.
(rcirc-condition-filter): New function.
(rcirc-browse-url, rcirc-markup-urls): Use only URLs before point
and exclude consecutive duplicate URLs.
Fixes: debbugs:6082
* ffap.el (ffap-url-regexp): Don't require matching at front of string.
(ffap-url-p): If only a substring matches, return that.
(ffap-url-at-point): Use the return value of ffap-url-p.
(ffap-read-file-or-url, ffap-read-file-or-url-internal)
(find-file-at-point, dired-at-point, dired-at-point-prompter)
(ffap-guess-file-name-at-point): Likewise.
(ffap-replace-file-component): Fix typo.
Fixes: debbugs:4952
* lisp/info.el (info-display-manual): Add existing Info buffers, whose
files may not be in Info-directory-list, to the completion.
(info--manual-names): New helper function.
(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
(ispell-internal-change-dictionary):
Improve ispell process restart checks by using expanded values for ispell
personal dictionary and for related restart check.
(ispell-start-process):
* Remove apparently redundant code that seems better handled from
(ispell-internal-change-dictionary)
* No longer need to expand ispell personal dictionary, it is already
expanded.
Fixes: debbugs:13019
textmodes/ispell.el (ispell-init-process, ispell-start-process):
Make sure ispell personal dictionary name is expanded after initial
`default-directory' value (Bug#13019).
(math-date-to-iso-dt, math-parse-iso-date-validate)
(math-iso-dt-to-date): New functions.
(math-fd-iso-dt, math-fd-isoyear, math-fd-isoweek)
(math-fd-isoweekday): New variables.
(calc-date-notation, math-parse-standard-date, math-format-date)
(math-format-date-part): Add support for more formatting codes.
* textmodes/css-mode.el (css-current-defun-name): New function.
(css-mode): Use it.
* textmodes/sgml-mode.el (html-current-defun-name): New function.
(html-mode): Use it.
Suggested by Jari Aalto.
* lisp/emacs-lisp/lisp-mode.el (lisp-current-defun-name): New.
(lisp-mode-variables): Use it.
* lisp/progmodes/cc-mode.el (c-common-init):
* lisp/progmodes/cperl-mode.el (cperl-mode): Set a value for
add-log-current-defun-function.
* lisp/progmodes/m4-mode.el (m4-current-defun-name): New function.
(m4-mode): Use it.
* lisp/progmodes/perl-mode.el (perl-current-defun-name): New.
(perl-mode): Use it.
* lisp/progmodes/scheme.el (scheme-mode-variables, dsssl-mode): Use
lisp-current-defun-name.
* lisp/textmodes/tex-mode.el (tex-current-defun-name): New.
(tex-common-initialization): Use it.
* lisp/textmodes/texinfo.el (texinfo-current-defun-name): New.
(texinfo-mode): Use it.
* lisp/vc/add-log.el (add-log-current-defun-function): Doc fix.
(add-log-current-defun): Move mode-specific code to other files.
(add-log-lisp-like-modes, add-log-c-like-modes)
(add-log-tex-like-modes): Variables deleted.
Fixes: debbugs:2224
* shell.el (shell-apply-ansi-color, shell-reapply-ansi-color): New functions.
(shell-mode): Use them to reapply ansi colorization if Shell mode is re-enabled.
* erc.el (erc-last-input-time): New variable.
(erc-accidental-paste-threshold-seconds): New option to avoid
sending accidentally-pasted text to the server.
(erc-send-current-line): Use it.
Also,
* erc.el (erc-lurker-cleanup, erc-lurker-p): Use float-time.
Fixes: debbugs:11592
(icomplete-show-key-bindings): Remove custom var.
(icomplete-get-keys): Remove function.
(icomplete-forward-completions, icomplete-backward-completions):
New commands.
(icomplete-minibuffer-map): New var.
(icomplete-minibuffer-setup): Use it.
(icomplete-exhibit): Don't delay if the list of completions is known.
(icomplete-separator): New custom.
(icomplete-completions): Use it.
* lisp/minibuffer.el (completion-all-sorted-completions): Delete duplicates.
(minibuffer-force-complete-and-exit): New command.
(minibuffer--complete-and-exit): New function extracted from
minibuffer-complete-and-exit.
(minibuffer-complete-and-exit): Use it.
* lisp/vc/vc-dir.el (vc-dir-mode): Autoload it (for desktop restore).
Set buffer-local value of desktop-save-buffer.
(vc-dir-desktop-buffer-misc-data, vc-dir-restore-desktop-buffer):
New functions.
(desktop-buffer-mode-handlers): Add vc-dir-mode entry.
* lisp/desktop.el (desktop-save-buffer-p): Treat vc-dir like dired.
* progmodes/python.el:
(python-nav-beginning-of-defun): Fix forward movement when
statement(s) separates point from defun.
(python-imenu-prev-index-position): New function.
* textmodes/reftex.el (reftex-section-pre-regexp, reftex-section-post-regexp, reftex-section-info-function): New variable. (reftex-compile-variables): Use variables reftex-section-pre-regexp, reftex-section-post-regexp, and reftex-section-info-function in order to be compatible with Texinfo integration.
* textmodes/reftex-toc.el (reftex-toc-promote-action): use reftex-section-pre-regexp variable in order to be compatible with Texinfo integration.
* lisp/faces.el (face-spec-set): Change the third arg to specify
whether this function is being called via defface, customize, or a
third party. Set the appropriate symbol properties. Clear the
override spec if setting via Custom. Initialize face if necessary.
(face-spec-recalc): Allow theme faces to completely replace the
defface spec, in the same way as custom faces (Bug#8454).
* lisp/cus-edit.el (custom-face-set, custom-face-mark-to-save)
(custom-face-reset-saved, custom-face-mark-to-reset-standard):
Simplify by using the new arg to face-spec-set.
* lisp/cus-face.el (custom-declare-face): Move face initialization to
face-spec-set.
(custom-theme-set-faces): Don't initialize the face name here, as
that is now done in face-spec-set.
* lisp/emacs-lisp/lisp-mode.el (eval-defun-1): When evaluating defface,
reset face-override-spec too, and use custom-declare-face.
Fixes: debbugs:4988
(mh-make-obsolete-variable): New macros to fix XEmacs compiler
warnings.
* mh-letter.el (mh-yank-hooks): Use new mh-make-obsolete-variable
macro.
* mh-e.el (mh-kill-folder-suppress-prompt-hooks): Use new
mh-define-obsolete-variable-alias macro.
* mh-compat.el (mh-cl-flet): New alias for cl-flet on Emacs 24 and
flet elsewhere.
* mh-thread.el (mh-thread-set-tables): Replace flet with new alias
mh-cl-flet.
* mh-show.el (mh-gnus-article-highlight-citation): Replace flet with
new alias mh-cl-flet.
* mh-mime.el (mh-display-with-external-viewer, mh-mime-display)
(mh-press-button, mh-push-button, mh-display-emphasis): Replace flet
with new alias mh-cl-flet.
* mh-e.el (mh-invisible-header-fields-internal): Remove trailing
whitespace.
default values for missing headers in the draft.
(mh-regexp-in-field-syntax-table, mh-fcc-syntax-table)
(mh-addr-syntax-table, mh-regexp-in-field-p): Use a syntax table
so we'll properly parse non-address fields.
(mh-components-to-list, mh-extract-header-field): New functions to
read components file.
(mh-find-components, mh-send-sub): Move code to locate components
file into a new function.
(mh-insert-auto-fields, mh-modify-header-field): New syntax for
calling mh-regexp-in-field-p.
(closes SF #1708292)
* mouse.el (mouse-drag-line): Even if the line is not draggable,
keep reading until we get the up-event anyway, in order to process
the up-event for mouse-1-click-follows-link.
Fixes: debbugs:12971
* lisp/custom.el (custom-theme-set-variables): Use a topological sort
for ordering by custom dependencies.
(custom--sort-vars, custom--sort-vars-1): New functions.
Fixes: debbugs:12952
Check for `use-region-p' if `interactive' is non-nil.
(dired-unmark, dired-flag-file-deletion): Add optional arg
`interactive'. Call `dired-mark' with the arg `interactive'.
Fixes: debbugs:10624
Patch by Christopher Schmidt <christopher@ch.ristopher.com>.
(wdired-finish-edit): Add marks for new file names to
`wdired-old-marks'. Restore marks using `dired-mark-remembered'
after `revert-buffer'.
(wdired-do-renames): Remove calls to `dired-remove-file',
`dired-add-file', `dired-add-entry'.
Fixes: debbugs:11795
This is easier to follow, lines up better in the menu, and lets us
coalesce regions that switch at the same time. Give country
names, not "Vatican", as that's better for non-expert users. Use
names that are stable between the date of switch and now, e.g.,
Bohemia and Moravia (which existed then and now) and not
Czechoslovakia (which didn't exist then and doesn't exist now).
What is now the U.S. mostly did not switch at the same time as
Britain, so omit the U.S. Correct spelling of "Britain".
Catholic Switzerland was too much of a mess, so omit it.
Gregorian-Julian switch.
(Customizing Calc): Mention the variable `calc-gregorian-switch'.
* calc/calc.el (calc-gregorian-switch): Refresh the Calc buffer
after the variable is changed.
* lisp/faces.el (face-underline-p, face-inverse-video-p, face-bold-p)
(face-italic-p): Add optional argument "inherit".
* doc/lispref/display.texi (Attribute Functions):
Add new "inherit" argument for face-bold-p etc.
Move description of this argument to a common section, like "frame".
* lisp/faces.el (set-face-inverse-video, set-face-bold, set-face-italic):
Remove -p suffix from names, for consistency with other set-face-*.
(set-face-inverse-video): Fix interactive spec.
* lisp/play/gamegrid.el (gamegrid-make-mono-tty-face):
* lisp/textmodes/table.el (table--update-cell-face):
Use set-face-inverse-video rather than now obsolete alias.
* doc/lispref/display.texi (Attribute Functions):
Update for set-face-* name changes.