]> git.eshelyaron.com Git - emacs.git/log
emacs.git
5 years agoRemove gnus-overrides.texi
Glenn Morris [Wed, 6 Mar 2019 05:55:09 +0000 (21:55 -0800)]
Remove gnus-overrides.texi

* doc/misc/gnus-overrides.texi: Remove.
* doc/misc/auth.texi, doc/misc/emacs-mime.texi:
* doc/misc/gnus.texi, doc/misc/message.texi, doc/misc/pgg.texi:
* doc/misc/sasl.texi, doc/misc/sieve.texi:
Do not include gnus-overrides.texi.

5 years agoFix regexp issues introduced in last trunk commit.
Wilson Snyder [Wed, 6 Mar 2019 01:51:35 +0000 (20:51 -0500)]
Fix regexp issues introduced in last trunk commit.

* verilog-mode.el (verilog-coverpoint-re): Fix regexp issues introduced
in last trunk commit.

5 years agoRemove unreliable assertion in buf_bytepos_to_charpos
Eli Zaretskii [Tue, 5 Mar 2019 16:25:23 +0000 (18:25 +0200)]
Remove unreliable assertion in buf_bytepos_to_charpos

* src/marker.c (buf_bytepos_to_charpos): Remove the assertion
regarding bytepos always at the head byte of a multibyte
sequence.  For the reasons, see
http://lists.gnu.org/archive/html/emacs-devel/2019-03/msg00100.html
http://lists.gnu.org/archive/html/emacs-devel/2019-03/msg00102.html

5 years agoFix regular-expression glitches and typos. Update verilog-mode from upstream.
Wilson Snyder [Tue, 5 Mar 2019 14:46:36 +0000 (09:46 -0500)]
Fix regular-expression glitches and typos. Update verilog-mode from upstream.

* lisp/progmodes/verilog-mode.el (verilog-read-decls): Fix AUTO vectors with
double brackets, msg2839.
(verilog-read-auto-template-middle): Fix AUTO_TEMPLATE with regexp
capture group reference, but1379.  Reported by David Rogoff.

5 years agoFix interactive spec of some functions in window.el (Bug#34749)
Martin Rudalics [Tue, 5 Mar 2019 10:01:14 +0000 (11:01 +0100)]
Fix interactive spec of some functions in window.el (Bug#34749)

* lisp/window.el (delete-windows-on, quit-windows-on)
(display-buffer-other-frame): Interactively, permit existing
buffers only (Bug#34749).

5 years agoFix handling of minibuffer-only child frames (Bug#33498)
Martin Rudalics [Tue, 5 Mar 2019 09:46:19 +0000 (10:46 +0100)]
Fix handling of minibuffer-only child frames (Bug#33498)

* doc/lispref/frames.texi (Buffer Parameters): Describe how to
make a minibuffer-only child frame.
(Child Frames): Describe how minbuffer child frames are
deleted.
* src/frame.c (delete_frame): Handle deletion of minibuffer
child frames (Bug#33498).  In the course, fix reassigning of
'default-minibuffer-frame' with minibuffer-only frames.
* lisp/frame.el (frame-notice-user-settings): Handle creation of
initial minibuffer-only child frame.
(make-frame): Handle creation of frame with a minibuffer-only
child frame.

5 years agoTest an IPv4 mapped IPv6 address in Tramp
Michael Albinus [Tue, 5 Mar 2019 08:36:33 +0000 (09:36 +0100)]
Test an IPv4 mapped IPv6 address in Tramp

* test/lisp/net/tramp-tests.el (tramp-test01-file-name-syntax)
(tramp-test01-file-name-syntax-simplified)
(tramp-test01-file-name-syntax-separate): Check also an IPv4
mapped IPv6 address.

5 years agoFix regular-expression glitches and typos
Paul Eggert [Tue, 5 Mar 2019 02:00:00 +0000 (18:00 -0800)]
Fix regular-expression glitches and typos

Problems reported by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2019-03/msg00085.html
* admin/admin.el (set-version):
* lisp/allout.el (allout-latexify-one-item):
* lisp/arc-mode.el (archive-arc-rename-entry)
(archive-rar-summarize):
* lisp/calc/calc-graph.el (calc-graph-set-styles)
(calc-graph-hide):
* lisp/calc/calc-help.el (calc-describe-key):
* lisp/calc/calc-lang.el (math-compose-tex-func, eqn):
* lisp/calc/calc.el (calcDigit-key):
* lisp/cedet/ede/makefile-edit.el (makefile-macro-file-list):
* lisp/cedet/ede/speedbar.el (ede-tag-expand):
* lisp/cedet/semantic/sb.el (semantic-sb-show-extra)
(semantic-sb-expand-group):
* lisp/comint.el (comint-substitute-in-file-name):
* lisp/dired.el (dired-actual-switches):
* lisp/emacs-lisp/chart.el (chart-rmail-from):
* lisp/emacs-lisp/eieio-opt.el (eieio-sb-expand):
* lisp/emacs-lisp/eieio-speedbar.el (eieio-speedbar-object-expand):
* lisp/emacs-lisp/rx.el (rx-not, rx-atomic-p):
* lisp/emulation/viper-ex.el (viper-get-ex-token)
(viper-get-ex-pat, ex-set-read-variable):
* lisp/epg.el (epg--status-SIG_CREATED):
* lisp/erc/erc-speedbar.el (erc-speedbar-expand-user):
(erc-speedbar-expand-channel, erc-speedbar-expand-server)
* lisp/erc/erc.el (erc-is-message-ctcp-and-not-action-p)
(erc-banlist-update):
* lisp/eshell/em-dirs.el (eshell-parse-drive-letter, eshell/pwd):
* lisp/find-dired.el (find-dired):
* lisp/frame.el (frame-set-background-mode):
* lisp/generic-x.el (apache-log-generic-mode):
* lisp/gnus/gnus-art.el (gnus-button-valid-localpart-regexp):
* lisp/gnus/gnus.el (gnus-short-group-name):
* lisp/gnus/message.el (message-mailer-swallows-blank-line):
* lisp/ibuffer.el (ibuffer-fontification-alist):
* lisp/ido.el (ido-set-matches-1):
* lisp/info-xref.el (info-xref-lock-file-p):
* lisp/info.el (Info-dir-remove-duplicates)
(Info-unescape-quotes, Info-split-parameter-string)
(Info-speedbar-expand-node):
* lisp/international/mule.el (sgml-html-meta-auto-coding-function):
* lisp/isearch.el (isearch-pre-command-hook):
* lisp/language/ethio-util.el (ethio-fidel-to-tex-buffer):
* lisp/mail/rmail.el (rmail-collect-deleted):
* lisp/mh-e/mh-alias.el (mh-alias-suggest-alias):
* lisp/mh-e/mh-comp.el (mh-forward):
* lisp/mh-e/mh-search.el (mh-index-next-folder)
(mh-index-create-imenu-index):
* lisp/mh-e/mh-xface.el (mh-picon-get-image):
* lisp/minibuffer.el (completion--embedded-envvar-re):
* lisp/net/ange-ftp.el (ange-ftp-ls-parser):
* lisp/net/goto-addr.el (goto-address-mail-regexp)
(goto-address-find-address-at-point):
* lisp/net/pop3.el (pop3-read-response, pop3-user)
(pop3-pass, pop3-apop):
* lisp/net/tramp.el (tramp-ipv6-regexp)
(tramp-replace-environment-variables):
* lisp/nxml/nxml-maint.el (nxml-insert-target-repertoire-glyph-set):
* lisp/nxml/rng-uri.el (rng-uri-escape-multibyte):
* lisp/nxml/rng-xsd.el (rng-xsd-convert-any-uri):
* lisp/obsolete/pgg.el (pgg-fetch-key):
* lisp/obsolete/vip.el (vip-get-ex-token):
* lisp/org/ob-core.el (org-babel-string-read):
* lisp/org/org-agenda.el:
(org-agenda-add-entry-to-org-agenda-diary-file):
* lisp/org/org-element.el (org-element-keyword-parser):
* lisp/org/org-list.el (org-list-indent-item-generic):
* lisp/org/org-mhe.el (org-mhe-get-message-folder-from-index):
* lisp/org/org-mobile.el (org-mobile-apply):
* lisp/org/org-mouse.el (org-mouse-context-menu):
* lisp/org/org-plot.el (org-plot/gnuplot):
* lisp/org/org-protocol.el (org-protocol-flatten-greedy):
* lisp/org/org-table.el (org-table-copy-down)
(org-table-formula-make-cmp-string)
(org-table-get-stored-formulas, org-table-recalculate)
(org-table-edit-formulas):
* lisp/org/org.el (org-translate-link-from-planner)
(org-fill-line-break-nobreak-p):
* lisp/org/ox-ascii.el (org-ascii-item):
* lisp/org/ox-latex.el (org-latex-clean-invalid-line-breaks):
* lisp/org/ox.el (org-export-expand-include-keyword):
* lisp/progmodes/ada-xref.el (ada-treat-cmd-string):
* lisp/progmodes/cfengine.el (cfengine2-font-lock-keywords):
* lisp/progmodes/cperl-mode.el (cperl-to-comment-or-eol)
(cperl-find-pods-heres, cperl-fix-line-spacing)
(cperl-have-help-regexp, cperl-word-at-point-hard)
(cperl-make-regexp-x):
* lisp/progmodes/dcl-mode.el (dcl-option-value-offset):
* lisp/progmodes/etags.el (tag-implicit-name-match-p):
* lisp/progmodes/fortran.el (fortran-fill):
* lisp/progmodes/gdb-mi.el (gdb-speedbar-expand-node)
(gdb-locals-handler-custom):
* lisp/progmodes/grep.el (grep-mode-font-lock-keywords):
* lisp/progmodes/gud.el (gud-jdb-find-source-using-classpath):
* lisp/progmodes/js.el (js--continued-expression-p):
* lisp/progmodes/m4-mode.el (m4-font-lock-keywords):
* lisp/progmodes/meta-mode.el (meta-indent-level-count):
* lisp/progmodes/mixal-mode.el (mixal-font-lock-keywords):
* lisp/progmodes/opascal.el (opascal-find-unit-in-directory):
* lisp/progmodes/pascal.el (pascal-progbeg-re):
* lisp/progmodes/ruby-mode.el (ruby-expression-expansion-re)
(ruby-expr-beg, ruby-parse-partial)
(ruby-toggle-string-quotes, ruby-font-lock-keywords):
* lisp/progmodes/sql.el (sql--make-help-docstring):
* lisp/progmodes/verilog-mode.el (verilog-coverpoint-re)
(verilog-skip-forward-comment-p)
(verilog-read-sub-decls-gate)
(verilog-read-auto-template-middle):
* lisp/progmodes/vhdl-mode.el (vhdl-resolve-env-variable)
(vhdl-speedbar-expand-project, vhdl-speedbar-expand-entity)
(vhdl-speedbar-expand-architecture)
(vhdl-speedbar-expand-config, vhdl-speedbar-expand-package)
(vhdl-speedbar-dired):
* lisp/speedbar.el (speedbar-dired, speedbar-tag-file)
(speedbar-tag-expand):
* lisp/textmodes/dns-mode.el (dns-mode-font-lock-keywords):
* lisp/textmodes/flyspell.el (flyspell-debug-signal-word-checked):
* lisp/textmodes/ispell.el (ispell-process-line):
* lisp/textmodes/reftex-cite.el (reftex-end-of-bib-entry):
* lisp/textmodes/reftex-ref.el (reftex-replace-prefix-escapes):
* lisp/url/url-parse.el (url-generic-parse-url):
* lisp/url/url-util.el (url-truncate-url-for-viewing):
* lisp/vc/diff-mode.el (diff-unified->context):
* lisp/vc/vc-bzr.el (vc-bzr-error-regexp-alist):
* lisp/vc/vc-cvs.el (vc-cvs-parse-status):
* lisp/woman.el (woman0-el, woman-if-ignore)
(woman-change-fonts):
* lisp/xdg.el (xdg--substitute-home-env):
Fix regular-expression infelicities and typos.

Fix regular expression typos
Fix typos reported by Mattias Engdegård in:
that occurred in preloaded modules.
* lisp/frame.el (frame-set-background-mode):
* lisp/international/mule.el (sgml-html-meta-auto-coding-function):
* lisp/isearch.el (isearch-pre-command-hook):
* lisp/minibuffer.el (completion--embedded-envvar-re):

5 years agoFix diff-mode tests after renaming diff-font-lock-refine
Charles A. Roelli [Mon, 4 Mar 2019 18:43:25 +0000 (19:43 +0100)]
Fix diff-mode tests after renaming diff-font-lock-refine

This fixes tests broken in my last change, "Merge
diff-font-lock-refine and diff-auto-refine-mode into diff-refine" from
2019-02-24.

* test/lisp/vc/diff-mode-tests.el (diff-mode-test-font-lock):
Bind diff-refine to symbol 'font-lock' instead of binding
diff-font-lock-refine to t.
(diff-mode-test-font-lock-syntax-one-line): Bind diff-refine
to nil instead of binding diff-font-lock-refine to nil.

5 years agoAvoid assertion violations in buf_bytepos_to_charpos
Eli Zaretskii [Mon, 4 Mar 2019 17:22:23 +0000 (19:22 +0200)]
Avoid assertion violations in buf_bytepos_to_charpos

* src/marker.c (buf_bytepos_to_charpos): Disable the assertion
regarding bytepos always at the head byte of a multibyte
sequence.

5 years agoFix invocation with -rv on the command line
Eli Zaretskii [Mon, 4 Mar 2019 16:28:18 +0000 (18:28 +0200)]
Fix invocation with -rv on the command line

* lisp/frame.el (frame-set-background-mode): Avoid errors from
'face-spec-match-p' when the face was not yet realized for
FRAME.  (Bug#34725)

5 years ago* lisp/emacs-lisp/map.el: Bump version to 2.0.
Nicolas Petton [Mon, 4 Mar 2019 12:10:45 +0000 (13:10 +0100)]
* lisp/emacs-lisp/map.el: Bump version to 2.0.

5 years agoPrevent introducing invalid scroll bar width/height values (Bug#34569)
Martin Rudalics [Mon, 4 Mar 2019 09:28:56 +0000 (10:28 +0100)]
Prevent introducing invalid scroll bar width/height values (Bug#34569)

* src/frame.c (store_frame_param): Don't store invalid values
for scroll_bar_width/height.
(x_report_frame_params): Don't report invalid values for
scroll_bar_width/height.
(x_set_scroll_bar_width, x_set_scroll_bar_height): Don't set
invalid values for scroll_bar_width/height.

5 years agoFix minibuffer resizing with temporarily selected frames (Bug#34317)
Martin Rudalics [Mon, 4 Mar 2019 09:11:53 +0000 (10:11 +0100)]
Fix minibuffer resizing with temporarily selected frames (Bug#34317)

* src/keyboard.c (command_loop_1): Resize echo area exactly
only if the echo area window is the minibuffer window of the
selected frame (Bug#34317).
* src/xdisp.c (x_consider_frame_title): Inhibit redisplay also
when restoring the selected window/frame to avoid that
resize_mini_window sizes back the minibuffer window of a
temporarily selected frame (Bug#34317).

5 years ago* src/alloc.c (gcstat): Now static.
Paul Eggert [Mon, 4 Mar 2019 08:12:09 +0000 (00:12 -0800)]
* src/alloc.c (gcstat): Now static.

5 years ago* src/gfilenotify.c: Fix indenting.
Paul Eggert [Mon, 4 Mar 2019 08:04:46 +0000 (00:04 -0800)]
* src/gfilenotify.c: Fix indenting.

5 years ago* src/font.h: Fix commentary.
Paul Eggert [Mon, 4 Mar 2019 08:04:27 +0000 (00:04 -0800)]
* src/font.h: Fix commentary.

5 years agoSimplify list creation in C code
Paul Eggert [Mon, 4 Mar 2019 08:00:39 +0000 (00:00 -0800)]
Simplify list creation in C code

The main new thing here is that C code can now say
‘list (a, b, c, d, e, f)’ instead of
‘listn (CONSTYPE_HEAP, 6, a, b, c, d, e, f)’,
thus relieving callers of the responsibility of counting
arguments (plus, the code feels more like Lisp).  The old
list1 ... list5 functions remain, as they’re probably a bit
faster for small lists.
* src/alloc.c (cons_listn, pure_listn): New functions.
(listn): Omit enum argument.
All callers changed to use either new ‘list’ or ‘pure_list’ macros.
* src/charset.c (Fdefine_charset_internal):
* src/coding.c (detect_coding_system)
(Fset_terminal_coding_system_internal):
* src/frame.c (frame_size_history_add, adjust_frame_size):
* src/gtkutil.c (xg_frame_set_char_size):
* src/keyboard.c (command_loop_1):
* src/nsfns.m (frame_geometry):
* src/widget.c (set_frame_size):
* src/xfaces.c (Fcolor_distance):
* src/xfns.c (frame_geometry):
* src/xterm.c (x_set_window_size_1):
* src/xwidget.c (Fxwidget_size_request):
Prefer list1i, list2i, etc. to open-coding them.
* src/charset.c (Fset_charset_priority):
* src/nsterm.m (append2):
* src/window.c (window_list):
* src/xfaces.c (Fx_list_fonts):
Use nconc2 instead of open-coding it.
* src/eval.c (eval_sub, backtrace_frame_apply):
* src/kqueue.c (kqueue_generate_event):
* src/nsterm.m (performDragOperation:):
* src/pdumper.c (Fpdumper_stats):
* src/w32.c (init_environment):
Prefer list1, list2, etc. to open-coding them.
* src/font.c (font_list_entities):
Parenthesize to avoid expanding new ‘list’ macro.
* src/gtkutil.c (GETSETUP): Rename from MAKE_FLOAT_PAGE_SETUP
to get lines to fit.  Move outside the ‘list’ call, since it’s
now a macro.
* src/keymap.c (Fmake_keymap): Simplify.
* src/lisp.h (list, pure_list): New macros.
(list1i): New function.

5 years agoMerge diff-font-lock-refine and diff-auto-refine-mode into diff-refine
Charles A. Roelli [Sun, 24 Feb 2019 15:13:13 +0000 (16:13 +0100)]
Merge diff-font-lock-refine and diff-auto-refine-mode into diff-refine

This change was discussed in Bug#32991.

* admin/gitmerge.el (gitmerge-resolve): Bind 'diff-refine'
instead of 'diff-auto-refine-mode' to nil.
* doc/emacs/files.texi (Diff Mode): Explain 'diff-refine'
instead of 'diff-auto-refine-mode' in the documentation of
'diff-hunk-next' and 'diff-hunk-prev'.  Mention in the
documentation of 'diff-refine-hunk' that refining is already
done by default.
* etc/NEWS (Diff mode): Explain renamed 'diff-refine' variable
and mention deprecation and disabling of
'diff-auto-refine-mode'.
* lisp/vc/diff-mode.el (diff-font-lock-refine): Rename to
'diff-refine' and allow choices nil, 'font-lock' and 'navigation'.
(diff-auto-refine-mode): Disable it by default, make it
obsolete and make it set 'diff-refine' appropriately to keep
backward compatibility.
(diff-hunk-next, diff-hunk-prev): Adapt to rename of
diff-auto-refine-mode and ensure that refining only happens
when calling these commands interactively.
(diff--font-lock-refined): Adapt to rename of
diff-font-lock-refine.
* lisp/vc/smerge-mode.el (smerge-next, smerge-prev): Check
that 'diff-refine' is set instead of checking
'diff-auto-refine-mode' when deciding whether to refine a
conflict.

5 years agoCorrect some slightly incorrect regular expressions:
Alan Mackenzie [Sun, 3 Mar 2019 20:03:56 +0000 (20:03 +0000)]
Correct some slightly incorrect regular expressions:

* lisp/progmodes/cc-awk.el (c-awk-harmless-char-re)
(c-awk-harmless-line-char-re, c-awk-_-harmless-nonws-char-re): [...\\\\...]
-> [...\\...].

* lisp/progmodes/cc-engine.el (c-literal-limits): "*/" -> "\\*/".

* lisp/progmodes/cc-mode.el (c-after-change-re-mark-unbalanced-strings):
"\\\r" -> "\r".

5 years agoFix starting temacs interactively
Eli Zaretskii [Sun, 3 Mar 2019 17:02:34 +0000 (19:02 +0200)]
Fix starting temacs interactively

* src/dispnew.c (init_display_interactive): Don't call
init_faces_initial if we aren't initialized, since
tty-set-up-initial-frame-faces is not available then.  This
restores the ability to start "temacs -nw" and also avoids
bad crashes in "emacs -nw" if the pdumper file is not found.
(Bug#34707)

5 years agoFix typo in previous change
Paul Eggert [Sun, 3 Mar 2019 07:02:01 +0000 (23:02 -0800)]
Fix typo in previous change

* src/alloc.c (memory_full_cons_threshold):
Move to after definition of struct cons_block.
Problem reported by Basil L. Contovounesios in:
https://lists.gnu.org/r/emacs-devel/2019-03/msg00067.html

5 years ago* test/lisp/progmodes/python-tests.el
Glenn Morris [Sun, 3 Mar 2019 03:02:50 +0000 (19:02 -0800)]
* test/lisp/progmodes/python-tests.el
(python-syntax-after-python-backspace): Expect success.

5 years agomemory_full_cons_threshold is a constant
Paul Eggert [Sat, 2 Mar 2019 21:13:05 +0000 (13:13 -0800)]
memory_full_cons_threshold is a constant

* src/alloc.c (memory_full_cons_threshold): Now const.
(memory_full): Omit no-longer-needed initialization.

5 years agoAvoid staticvec duplicates
Paul Eggert [Sat, 2 Mar 2019 19:05:40 +0000 (11:05 -0800)]
Avoid staticvec duplicates

* src/alloc.c (staticpro) [ENABLE_CHECKING]: Check for duplicates.
* src/keyboard.c (syms_of_keyboard): Define
while-no-input-ignore-events and inhibit--record-char here ...
(syms_of_keyboard_for_pdumper): ... instead of here.
This avoids duplicates in staticvec.

5 years agoCheck by eassert that a bytepos argument isn't in the middle of a character
Alan Mackenzie [Sat, 2 Mar 2019 18:23:34 +0000 (18:23 +0000)]
Check by eassert that a bytepos argument isn't in the middle of a character

* src/marker.c (buf_bytepos_to_charpos): Add an eassert to check that the
parameter bytepos is at the beginning of a character or EOB.

5 years agoFix DND on MS-Windows with files from UNC directories
Eli Zaretskii [Sat, 2 Mar 2019 18:07:36 +0000 (20:07 +0200)]
Fix DND on MS-Windows with files from UNC directories

* lisp/dnd.el (dnd-get-local-file-uri): Always return nil on
MS-Windows, as this method cannot possibly work there: URIs
that begin with the local system's name are UNCs, where the
//SERVER part cannot be removed.  (Bug#34675)

5 years agoRevert "Add hook for all events"
Phillip Lord [Sat, 2 Mar 2019 16:52:53 +0000 (16:52 +0000)]
Revert "Add hook for all events"

This reverts commit 7b31de4d107302ed91ce7519cd778b340a9880ee.

5 years agoRevert "; Fix typos in NEWS"
Phillip Lord [Sat, 2 Mar 2019 16:51:31 +0000 (16:51 +0000)]
Revert "; Fix typos in NEWS"

This reverts commit d52bc534d799c255f24ff2a56e8bed830d8f68ca.

5 years agoRevert "; Document input-event-functions"
Phillip Lord [Sat, 2 Mar 2019 16:48:50 +0000 (16:48 +0000)]
Revert "; Document input-event-functions"

This reverts commit 27fffb2701c38090916e077d28a4a6b9e2bc09d2.

5 years agoCorrect regexp-opt return value for empty string list
Mattias Engdegård [Mon, 25 Feb 2019 14:22:02 +0000 (15:22 +0100)]
Correct regexp-opt return value for empty string list

When regexp-opt is called with an empty list of strings, return a regexp
that doesn't match anything instead of the empty string (Bug#20307).

* doc/lispref/searching.texi (Regular Expression Functions):
* etc/NEWS:
Document the new behaviour.
* lisp/emacs-lisp/regexp-opt.el (regexp-opt):
Return a never-match regexp for empty inputs.

5 years agorx: fix `or' ordering by adding argument to regexp-opt
Mattias Engdegård [Sun, 24 Feb 2019 21:12:52 +0000 (22:12 +0100)]
rx: fix `or' ordering by adding argument to regexp-opt

The rx `or' form may reorder its arguments in an unpredictable way,
contrary to user expectation, since it sometimes uses `regexp-opt'.
Add a NOREORDER option to `regexp-opt' for preventing it from
producing a reordered regexp (Bug#34641).

* doc/lispref/searching.texi (Regular Expression Functions):
* etc/NEWS (Lisp Changes in Emacs 27.1):
Describe the new regexp-opt NOREORDER argument.
* lisp/emacs-lisp/regexp-opt.el (regexp-opt): Add NOREORDER.
Make no attempt at regexp improvement if the set of strings contains
a prefix of another string.
(regexp-opt--contains-prefix): New.
* lisp/emacs-lisp/rx.el (rx-or): Call regexp-opt with NOREORDER.
* test/lisp/emacs-lisp/rx-tests.el: Test rx `or' form match order.

5 years agoFix 'end-of-visual-line' with overlay strings with newlines
Eli Zaretskii [Sat, 2 Mar 2019 10:17:47 +0000 (12:17 +0200)]
Fix 'end-of-visual-line' with overlay strings with newlines

* src/indent.c (Fvertical_motion): Get out of overlay strings
with embedded newlines even if moving within the same screen
line.  See https://github.com/emacs-lsp/lsp-mode/issues/677
for more details.
Fix test for IT_CHARPOS being at the beginning of the
accessible portion of the buffer.

5 years ago* src/syntax.c (update_syntax_table): Prefer 'else' to 'goto'
Stefan Monnier [Fri, 1 Mar 2019 21:04:11 +0000 (16:04 -0500)]
* src/syntax.c (update_syntax_table): Prefer 'else' to 'goto'

5 years ago* lisp/Makefile.in (leim): Fix void-function pinyin-convert
Stefan Monnier [Fri, 1 Mar 2019 20:57:40 +0000 (15:57 -0500)]
* lisp/Makefile.in (leim): Fix void-function pinyin-convert

5 years agoMaintain interval ->position fields correctly in update_interval
Alan Mackenzie [Fri, 1 Mar 2019 17:35:12 +0000 (17:35 +0000)]
Maintain interval ->position fields correctly in update_interval

Also fix some anomalies in the handling of byte positions in regexp-emacs.c
This fixes bug #34525.

* src/intervals.c (SET_PARENT_POSITION): New macro.
(update_interval): When moving to an interval's parent, set that parent's
->position field, to maintain the consistency of the tree.

* src/intervals.h (struct interval): Amend the comment describing when
->position is valid.

* src/pdumper.c: Update the hash associated with struct interval.

* src/regex-emacs.c: (re_match_2_internal): Only invoke POINTER_TO_OFFSET on a
known character boundary.  Only perform arithmetic on character positions, not
on byte positions.  Correct the argument to an invocation of
UPDATE_SYNTAX_TABLE_FORWARD by adding 1 to it (in case wordend:).

* src/syntax.c: (update_syntax_table): Remove the now redundant code that set
the ->position field of all parents of the interval found by update_interval.

5 years ago; Merge from origin/emacs-26
Glenn Morris [Fri, 1 Mar 2019 17:40:22 +0000 (09:40 -0800)]
; Merge from origin/emacs-26

The following commit was skipped:

5ec7ca1 (origin/emacs-26) ; Auto-commit of loaddefs files.

5 years agoMerge from origin/emacs-26
Glenn Morris [Fri, 1 Mar 2019 17:40:22 +0000 (09:40 -0800)]
Merge from origin/emacs-26

9df1365 Fix a typo in the Calc manual
f3dab02 Minor improvement in cross-references of the ELisp manual
560c84b Fix last change on 'compilation-parse-errors'

5 years ago; Merge from origin/emacs-26
Glenn Morris [Fri, 1 Mar 2019 17:40:22 +0000 (09:40 -0800)]
; Merge from origin/emacs-26

The following commit was skipped:

1dff097 Backport: js--re-search-backward-inner: Fix infloop

5 years agoMerge from origin/emacs-26
Glenn Morris [Fri, 1 Mar 2019 17:40:22 +0000 (09:40 -0800)]
Merge from origin/emacs-26

dee3cdc Minor improvement for docs of completion
c86d419 ; * src/image.c (imagemagick_load, svg_load): Fix typos in co...
6d46fa9 Disable the timerfd interface on Cygwin
3707ea4 Fix a typo in the doc string of 'regex-opt'
d9905d5 Document bash 5.0.0 misbehavior in tramp.texi (Bug#34192)

# Conflicts:
# doc/misc/tramp.texi

5 years agoSuppress GC stats when obviously not needed
Paul Eggert [Fri, 1 Mar 2019 17:01:59 +0000 (09:01 -0800)]
Suppress GC stats when obviously not needed

This should help future improvements where these stats can be
bignums that do not fit into intmax_t.
* src/alloc.c (struct gcstat, gcstat): New type and static var,
to package up GC statistics into one C object.  It replaces ...
(total_free_intervals, total_intervals, total_strings)
(total_free_strings, total_string_bytes, total_vectors)
(total_vector_slots, total_free_vector_slots): ... these
removed static vars.  All uses changed.
(garbage_collect_1): Accept a struct gcstat *, not a void *
which was not used anymore anyway.  Return a bool indicating
success, instead of a Lisp object.  All callers changed.
(garbage_collect): New function.  All C callers of
Fgarbage_collect changed to use it, since none of them use the
return value.  Now, only Lisp code uses Fgarbage_collect.
(Fgarbage_collect): No longer noinline.  Cons up the return
value here, not in garbage_collect_1.

5 years ago; Auto-commit of loaddefs files.
Glenn Morris [Fri, 1 Mar 2019 12:31:58 +0000 (07:31 -0500)]
; Auto-commit of loaddefs files.

5 years ago; Auto-commit of loaddefs files.
Glenn Morris [Fri, 1 Mar 2019 11:23:38 +0000 (06:23 -0500)]
; Auto-commit of loaddefs files.

5 years agoFix a typo in the Calc manual
Eli Zaretskii [Fri, 1 Mar 2019 10:30:47 +0000 (12:30 +0200)]
Fix a typo in the Calc manual

* doc/misc/calc.texi (Algebraic Tutorial): Fix parentheses in
@example.  (Bug#34689)

5 years agoMinor improvement in cross-references of the ELisp manual
Eli Zaretskii [Fri, 1 Mar 2019 10:25:40 +0000 (12:25 +0200)]
Minor improvement in cross-references of the ELisp manual

* doc/lispref/modes.texi (Minor Mode Conventions): Add
cross-references to related major-mode descriptions.  (Bug#34678)

5 years agoDon't signal Quit from 'while-no-input' on TTY frames
Eli Zaretskii [Fri, 1 Mar 2019 10:19:03 +0000 (12:19 +0200)]
Don't signal Quit from 'while-no-input' on TTY frames

* src/keyboard.c (read_char): Don't inject quit-char after
longjmp if while-no-input is in effect.  (Bug#34535)

5 years agoFix last change on 'compilation-parse-errors'
Tobias Bading [Mon, 25 Feb 2019 13:26:38 +0000 (14:26 +0100)]
Fix last change on 'compilation-parse-errors'

* lisp/progmodes/compile.el (compilation-parse-errors): Fix
previous change in this function.  (Bug#34479)

Copyright-paperwork-exempt: yes

5 years agoAdd 'breakpoint' to builtins for Python
Evan Moses [Thu, 21 Feb 2019 21:37:01 +0000 (13:37 -0800)]
Add 'breakpoint' to builtins for Python

* lisp/progmodes/python.el (python-font-lock-keywords-level-2)
(python-font-lock-keywords-maxiumum-decoration): Add 'breakpoint'
to the list of builtins, it's new as of Python 3.7.

Copyright-paperwork-exempt: yes

5 years agoBe more defensive regarding elements of 'load-history'
Eli Zaretskii [Fri, 1 Mar 2019 09:44:52 +0000 (11:44 +0200)]
Be more defensive regarding elements of 'load-history'

* lisp/loadhist.el (file-dependents):
* lisp/apropos.el (apropos-library):
* lisp/help-fns.el (help-fns--autoloaded-p, help--loaded-p):
* lisp/emacs-lisp/package.el (package--list-loaded-files):
Don't assume 'load-history' elements must have a string as their
'car'.  (Bug#34462)

5 years ago* src/pdumper.c: Clarify the message about updating hash values
Alan Mackenzie [Fri, 1 Mar 2019 09:25:43 +0000 (09:25 +0000)]
* src/pdumper.c: Clarify the message about updating hash values

5 years ago; * src/xfaces.c (syms_of_xfaces): Fix last change.
Eli Zaretskii [Fri, 1 Mar 2019 08:42:59 +0000 (10:42 +0200)]
; * src/xfaces.c (syms_of_xfaces): Fix last change.

5 years agoAllow control on the threshold for using 'distant-foreground'
Federico Tedin [Wed, 16 Jan 2019 01:08:15 +0000 (22:08 -0300)]
Allow control on the threshold for using 'distant-foreground'

* src/xfaces.c (NEAR_SAME_COLOR_THRESHOLD): Macro deleted.
(load_face_colors): Compare against
face_near_same_color_threshold instead of
NEAR_SAME_COLOR_THRESHOLD.
(syms_of_xfaces) <face-near-same-color-threshold>: New
variable.  (Bug#34001)

* etc/NEWS: Announce the change.

5 years ago* lisp/replace.el (flush-lines): Return the number of deleted lines.
Juri Linkov [Thu, 28 Feb 2019 21:32:39 +0000 (23:32 +0200)]
* lisp/replace.el (flush-lines): Return the number of deleted lines.

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.

5 years agoAvoid rare crashes in xbacktrace
Eli Zaretskii [Thu, 28 Feb 2019 19:16:10 +0000 (21:16 +0200)]
Avoid rare crashes in xbacktrace

* src/eval.c (backtrace_thread_p, backtrace_top): Don't
segfault in "xbacktrace" if called before the specpdl
machinery is initialized in pdumped Emacs.

5 years agoAdapt test names in tramp-archive-tests.el
Michael Albinus [Thu, 28 Feb 2019 09:34:33 +0000 (10:34 +0100)]
Adapt test names in tramp-archive-tests.el

* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test39-make-nearby-temp-file)
(tramp-archive-test42-file-system-info)
(tramp-archive-test45-auto-load)
(tramp-archive-test45-delay-load): Rename.

5 years agoUse proper read syntax for all function names in Tramp
Michael Albinus [Thu, 28 Feb 2019 09:33:05 +0000 (10:33 +0100)]
Use proper read syntax for all function names in Tramp

* lisp/net/tramp.el:
* lisp/net/tramp-adb.el:
* lisp/net/tramp-archive.el:
* lisp/net/tramp-cache.el:
* lisp/net/tramp-cmds.el:
* lisp/net/tramp-compat.el:
* lisp/net/tramp-ftp.el:
* lisp/net/tramp-gvfs.el:
* lisp/net/tramp-integration.el:
* lisp/net/tramp-rclone.el:
* lisp/net/tramp-sh.el:
* lisp/net/tramp-smb.el:
* lisp/net/tramp-sudoedit.el:
* test/lisp/net/tramp-archive-tests.el:
* test/lisp/net/tramp-tests.el: Use proper read syntax for all
function names.

5 years agoEscape HTML NUL as &#0; in eww
Paul Eggert [Wed, 27 Feb 2019 22:35:51 +0000 (14:35 -0800)]
Escape HTML NUL as &#0; in eww

* lisp/net/eww.el (eww-display-html): Escape NUL as &#0; as this
is more appropriate for HTML.

5 years ago* lisp/vc/vc-annotate.el: Better error handling (bug#34532)
Juri Linkov [Wed, 27 Feb 2019 21:18:10 +0000 (23:18 +0200)]
* lisp/vc/vc-annotate.el: Better error handling (bug#34532)

* lisp/vc/vc-annotate.el (vc-annotate-revision-previous-to-line):
Print message when prev-rev is nil.

5 years agoDirectional window swap states (bug#34656)
Juri Linkov [Wed, 27 Feb 2019 21:12:00 +0000 (23:12 +0200)]
Directional window swap states (bug#34656)

* lisp/windmove.el (windmove-swap-states-in-direction)
(windmove-swap-states-left, windmove-swap-states-up)
(windmove-swap-states-down, windmove-swap-states-right)
(windmove-swap-states-default-keybindings): New functions.

5 years ago* doc/emacs/frames.texi (Multiple Displays): Add make-frame-on-monitor.
Juri Linkov [Wed, 27 Feb 2019 20:55:41 +0000 (22:55 +0200)]
* doc/emacs/frames.texi (Multiple Displays): Add make-frame-on-monitor.

* doc/lispref/frames.texi (Multiple Terminals): Add make-frame-on-monitor.
(Bug#34516)

5 years agoImprove matching of key-val labels (bug#34629)
Arash Esbati [Sat, 23 Feb 2019 13:02:05 +0000 (14:02 +0100)]
Improve matching of key-val labels (bug#34629)

* lisp/textmodes/reftex-vars.el (reftex-label-regexps): Improve
regexp for key-val labels in order to skip over content in braces.

5 years agoReplace NUL characters when calling into libxml
Robert Pluim [Tue, 26 Feb 2019 15:37:09 +0000 (16:37 +0100)]
Replace NUL characters when calling into libxml

2019-02-27  Robert Pluim  <rpluim@gmail.com>

* lisp/net/eww.el (eww-display-html): Replace NUL characters with
"\0", as libxml can't handle embedded NULLs.  (Bug#34469)

5 years ago* lisp/emacs-lisp/pcase.el (pcase--make-docstring): Autoload
Stefan Monnier [Wed, 27 Feb 2019 16:01:15 +0000 (11:01 -0500)]
* lisp/emacs-lisp/pcase.el (pcase--make-docstring): Autoload

5 years agoAdd text properties to newlines used to unwrap long lines.
John Shahid [Tue, 26 Feb 2019 06:06:53 +0000 (01:06 -0500)]
Add text properties to newlines used to unwrap long lines.

* lisp/term.el (term-emulate-terminal): do it.

5 years agoDEFVAR_INT variables are now intmax_t
Paul Eggert [Wed, 27 Feb 2019 09:14:27 +0000 (01:14 -0800)]
DEFVAR_INT variables are now intmax_t

Formerly they were fixnums, which led to problems when dealing
with values that might not fit on 32-bit platforms, such as
string-chars-consed or floats_consed.  64-bit counters should
be good enough for these (for a while, anyway...).
While we’re at it, fix some unlikely integer overflow bugs
that have been in the code for a while.
* lib-src/make-docfile.c (write_globals):
* src/data.c (do_symval_forwarding, store_symval_forwarding):
* src/eval.c (restore_stack_limits, call_debugger):
* src/frame.h (struct frame.cost_calculation_baud_rate):
* src/keyboard.c (last_auto_save, bind_polling_period, read_char):
* src/lisp.h (struct Lisp_Intfwd.intvar):
* src/lread.c (defvar_int):
* src/pdumper.c (dump_fwd_int):
* src/thread.h (struct thread_state.m_lisp_eval_depth):
* src/undo.c (truncate_undo_list):
* src/xselect.c (wait_for_property_change)
(x_get_foreign_selection):
* src/xterm.c (x_emacs_to_x_modifiers):
DEFVAR_INT variables now have the C type intmax_t, not EMACS_INT.
* src/data.c (store_symval_forwarding):
* src/gnutls.c (Fgnutls_boot):
* src/keyboard.c (bind_polling_period):
* src/macros.c (pop_kbd_macro, Fexecute_kbd_macro):
* src/undo.c (truncate_undo_list):
Allow any integer that fits into intmax_t, instead of
requiring it to be a Lisp fixnum.
* src/dispnew.c (update_window):
* src/frame.c (x_figure_window_size):
* src/gnutls.c (init_gnutls_functions)
(emacs_gnutls_handle_error):
* src/keyboard.c (make_lisp_event):
* src/nsterm.m (ns_dumpglyphs_image):
* src/profiler.c (make_log):
* src/scroll.c (calculate_scrolling)
(calculate_direct_scrolling):
* src/termcap.c (tputs):
* src/xterm.c (x_draw_image_relief):
Avoid implementation-defined behavior on conversion of
out-of-range integers.
* src/eval.c (when_entered_debugger): Now intmax_t.
(max_ensure_room): New function, that avoids signed integer overflow.
(call_debugger, signal_or_quit): Use it.
* src/fileio.c (Fdo_auto_save):
* src/keyboard.c (make_lisp_event):
* src/term.c (calculate_costs):
* src/xdisp.c (build_desired_tool_bar_string)
(hscroll_window_tree, try_scrolling, decode_mode_spec)
(x_produce_glyphs):
Avoid signed integer overflow.
* src/lisp.h (clip_to_bounds): Generalize to intmax_t.
* src/pdumper.c (dump_emacs_reloc_immediate_emacs_int): Remove, ...
(dump_emacs_reloc_immediate_intmax_t): ... replacing with this
function.  All uses changed.
* src/profiler.c (make_log): Omit args.  All callers changed.
* src/termcap.c: Include stdlib.h, for atoi.
Include intprops.h.
* src/window.c (sanitize_next_screen_context_lines): New function.
(window_scroll_pixel_based, window_scroll_line_based):
Use it to avoid signed integer overflow.

5 years agoFix mod-test build failure
Paul Eggert [Tue, 26 Feb 2019 01:44:46 +0000 (17:44 -0800)]
Fix mod-test build failure

Problem reported by Glenn Morris in:
https://lists.gnu.org/r/emacs-devel/2019-02/msg00739.html
* test/Makefile.in (HYBRID_MALLOC, LIBEGNU_ARCHIVE):
New macros, taken from ../src/Makefile.in.
(MODULE_CFLAGS): Add -I$(srcdir)/../lib.
($(test_module)): Link $(LIBEGNU_ARCHIVE) too.

5 years ago* lisp/vc/diff-mode.el (diff-font-lock-keywords): Add more Git headers.
Juri Linkov [Mon, 25 Feb 2019 21:27:47 +0000 (23:27 +0200)]
* lisp/vc/diff-mode.el (diff-font-lock-keywords): Add more Git headers.

* lisp/gnus/mm-view.el (mm-display-inline-fontify): Set mode to
the selected major-mode, so diff-mode could be detected afterwards.

5 years ago* lisp/frame.el (make-frame-on-monitor): New command. (Bug#34516)
Juri Linkov [Mon, 25 Feb 2019 21:11:34 +0000 (23:11 +0200)]
* lisp/frame.el (make-frame-on-monitor): New command.  (Bug#34516)

(make-frame-on-display): Add completion on available display names.

5 years ago; Fixup docs for replace-{buffer,region}-contents
Tassilo Horn [Mon, 25 Feb 2019 20:07:24 +0000 (21:07 +0100)]
; Fixup docs for replace-{buffer,region}-contents

5 years ago; Delete unused variable replace-buffer-contents-max-secs
Tassilo Horn [Mon, 25 Feb 2019 19:57:25 +0000 (20:57 +0100)]
; Delete unused variable replace-buffer-contents-max-secs

This variable is a leftover of my now deleted
scratch/replace-region-contents branch and has never been used in
master.

5 years agoformat-time-string: document new '+' flag
Paul Eggert [Mon, 25 Feb 2019 19:33:51 +0000 (11:33 -0800)]
format-time-string: document new '+' flag

* doc/lispref/os.texi (Time Parsing), etc/NEWS:
* src/timefns.c (Fformat_time_string): Document the new
behavior, added for compatibility with POSIX.1-2017.

5 years agoUpdate from Gnulib
Paul Eggert [Mon, 25 Feb 2019 16:26:49 +0000 (08:26 -0800)]
Update from Gnulib

This incorporates:
2019-02-24 nstrftime: support the ‘+’ flag
2019-02-24 stat, lstat: fix conflict with relocatable-prog-wrapper
2019-02-23 nstrftime: tweak arg order
2019-02-21 nstrftime: merge glibc strftime changes
2019-02-02 vla: add commentary about VLA_ELEMS
* build-aux/config.guess, doc/misc/texinfo.tex, lib/fstatat.c:
* lib/lstat.c, lib/nstrftime.c, lib/vla.h:
Copy from Gnulib.

5 years agoBackport: js--re-search-backward-inner: Fix infloop
Dmitry Gutov [Fri, 1 Feb 2019 00:01:39 +0000 (03:01 +0300)]
Backport: js--re-search-backward-inner: Fix infloop

Fix JS indentation infloop reported in
https://github.com/mooz/js2-mode/issues/513.

* lisp/progmodes/js.el (js--re-search-backward-inner): Account for
multiline string literals.
* test/manual/indent/js.js: New test example.

(cherry picked from commit b01a4295c2f9bb58858880e4e28b05cc8396791c)

5 years agoAdapt hooks in Tramp
Michael Albinus [Mon, 25 Feb 2019 10:59:52 +0000 (11:59 +0100)]
Adapt hooks in Tramp

* lisp/net/tramp-archive.el (tramp-archive-cleanup-hash):
Remove autoload cookie.
(tramp-cleanup-all-connections-hook): Add `tramp-archive-cleanup-hash'.

* lisp/net/tramp-cmds.el (tramp-cleanup-connection-hook)
(tramp-cleanup-all-connections-hook): New hook variables.
(tramp-cleanup-connection): Set `tramp-current-connection' always
to nil.
(tramp-cleanup-connection): Do not call `tramp-recentf-cleanup'.
Run ´tramp-cleanup-connection-hook`.
(tramp-cleanup-all-connections): Do not call
`tramp-archive-cleanup-hash' and ´tramp-recentf-cleanup'.  Run
`tramp-cleanup-all-connections-hook'.

* lisp/net/tramp-ftp.el (top): Simply call `tramp-disable-ange-ftp'.

* lisp/net/tramp-integration.el (tramp-recentf-cleanup-all): New defun.
(top): Adapt `tramp-integration-unload-hook',
`tramp-cleanup-connection-hook' and
`tramp-cleanup-all-connections-hook'.

5 years ago* lisp/comint.el (comint-skip-input): Set inhibit-read-only to t
Alex Branham [Sat, 23 Feb 2019 13:35:01 +0000 (07:35 -0600)]
* lisp/comint.el (comint-skip-input): Set inhibit-read-only to t

Bug#33975

5 years agoIgnore pending_signals when checking for quits.
Philipp Stephani [Wed, 2 Jan 2019 21:04:56 +0000 (22:04 +0100)]
Ignore pending_signals when checking for quits.

pending_signals is often set if no quit is pending.  This results in
bugs in module code if the module returns but no quit is actually
pending.

As a better alternative, add a new process_input environment function
for Emacs 27.  That function processes signals (like maybe_quit).

* configure.ac: Add module snippet for Emacs 27.

* src/module-env-27.h: New file.

* src/emacs-module.h.in: Add process_input function to environment
interface.

* src/emacs-module.c (module_should_quit): Use QUITP macro to check
whether the caller should quit.
(module_process_input): New function.
(initialize_environment): Use it.

* src/eval.c: Remove obsolete comment.

* test/data/emacs-module/mod-test.c (signal_wrong_type_argument)
(signal_errno): New helper functions.
(Fmod_test_sleep_until): New test module function.

* test/src/emacs-module-tests.el (mod-test-sleep-until): New unit
test.

* doc/lispref/internals.texi (Module Misc): Document process_input.

5 years ago* lisp/term.el: Fix minor compilation issues with cl-lib and lexbind
Stefan Monnier [Sun, 24 Feb 2019 21:19:59 +0000 (16:19 -0500)]
* lisp/term.el: Fix minor compilation issues with cl-lib and lexbind

Remove left-over comment from the bulk comint->term query/replace.
(term-command-function): Rename from term-command-hook.
Give it a global default value.
(term-suppress-hard-newline): Mark it as generally obsolete.
(term-mode): Don't manually make hooks buffer-local.
(term--remove-fake-newlines): Fix assert -> cl-assert.
(term-char-mode): Use add-function.
(term-send-input): Use run-hook-with-args.
(term-dynamic-complete): Use run-hook-with-args-until-success.
(term-dynamic-simple-complete): Completion tables can be plain lists.
(serial-read-name): Simplify and fix misuse of `set`.

5 years agoAdjust line wrapping on window resize and killing text
John Shahid [Mon, 21 Jan 2019 00:08:17 +0000 (19:08 -0500)]
Adjust line wrapping on window resize and killing text

* lisp/term.el (term-mode): Advice filter-buffer-substring-function to
remove line unwrapping from killed text.
(term-reset-size): Add or remove line unwrapping depending on the new
terminal width.
(term-suppress-hard-newline): Mark obsolete.
(term-unwrap-line): Use text properties to be able to find the
newlines later.

5 years agoMake pinyin to Chinese character mapping available to elisp
Eric Abrahamsen [Wed, 30 Jan 2019 20:31:49 +0000 (12:31 -0800)]
Make pinyin to Chinese character mapping available to elisp

* leim/Makefile.in: Build the file pinyin.el from pinyin.map.
* lisp/international/titdic-cnv.el (pinyin-convert): New function that
  writes the library pinyin.el, containing a new constant
  `pinyin-character-map'.
* .gitignore: Ignore the generated pinyin.el file.

5 years agofix rmail armor decryption problems
Richard Stallman [Sun, 24 Feb 2019 18:45:34 +0000 (10:45 -0800)]
fix rmail armor decryption problems

* lisp/mail/rmail.el (rmail-epa-decrypt): Don't decrypt an armor
that was copied into the message from a message it is a reply to.
(rmail-epa-decrypt-1): Catch and ignore errors in
epa-decrypt-region.  Make armor-start and armor-end markers.

5 years agoDon't clobber epa-mail-aliases
Richard Stallman [Sun, 24 Feb 2019 16:45:41 +0000 (08:45 -0800)]
Don't clobber epa-mail-aliases

* lisp/epa-mail.el (epa-mail-default-recipients):
Copy elements of epa-mail-aliases; don't clobber them.

5 years ago* doc/lispref/text.texi (Replacing): Fix a typo in recent change.
Eli Zaretskii [Sun, 24 Feb 2019 16:03:21 +0000 (18:03 +0200)]
* doc/lispref/text.texi (Replacing): Fix a typo in recent change.

5 years agoCleanup also recentf files in Tramp
Michael Albinus [Sun, 24 Feb 2019 10:15:49 +0000 (11:15 +0100)]
Cleanup also recentf files in Tramp

* doc/misc/tramp.texi (Cleanup remote connections): Mention also
recentf cache.

* lisp/net/tramp-cmds.el (tramp-cleanup-connection)
(tramp-cleanup-all-connections): Call `tramp-recentf-cleanup'.

* lisp/net/tramp-integration.el: New package.

* lisp/net/tramp.el (tramp-rfn-eshadow-overlay)
(tramp-rfn-eshadow-setup-minibuffer)
(tramp-rfn-eshadow-update-overlay-regexp)
(tramp-rfn-eshadow-update-overlay):
(tramp-eshell-directory-change): Move to tramp-integration.el

5 years agoDon’t assume timersub and gettimeofday
Paul Eggert [Sat, 23 Feb 2019 21:47:52 +0000 (13:47 -0800)]
Don’t assume timersub and gettimeofday

POSIX does not specify timersub, and marks gettimeofday as
obsolescent.  Avoid porting problems by using timespec.h
functions instead.
* src/editfns.c: Include systime.h instead of sys/time.h.
(EXTRA_CONTEXT_FIELDS): Replace start and max_secs with
time_limit.  All uses changed.  This removes the need to call
gettimeofday or timersub.
* src/term.c (timeval_to_Time): Remove.  Replace all uses with ...
(current_Time): ... this new function, removing the need to
call gettimeofday.

5 years agoImprove replace-buffer-contents/replace-region-contents
Tassilo Horn [Sat, 23 Feb 2019 20:18:36 +0000 (21:18 +0100)]
Improve replace-buffer-contents/replace-region-contents

* src/editfns.c (Freplace_buffer_contents): Add two optional arguments
  for mitigating performance issues.
* lisp/emacs-lisp/subr-x.el (replace-region-contents): Move from
  subr.el.  Add the same two arguments as for replace-buffer-contents.
* lisp/json.el (json-pretty-print-max-secs): New variable holding the
  default MAX-SECS value json-pretty-print passes to
  replace-buffer-contents.
  (json-pretty-print): Use it.
* doc/lispref/text.texi (Replacing): Add documentation for
  replace-buffer-contents two new optional arguments.  Document
  replace-region-contents.

5 years agoMinor improvement for docs of completion
Eli Zaretskii [Sat, 23 Feb 2019 13:31:15 +0000 (15:31 +0200)]
Minor improvement for docs of completion

* doc/lispref/minibuf.texi (Completion Commands)
(Completion in Buffers, Programmed Completion): Add to text
that references completion tables a cross-reference to where
"completion table" is described.
(Programmed Completion): Fix the description of
'completion-table-dynamic'.  Add more cross-references.

5 years agoMake last Tramp change backward compatible to Emacs 24
Michael Albinus [Sat, 23 Feb 2019 10:56:37 +0000 (11:56 +0100)]
Make last Tramp change backward compatible to Emacs 24

* lisp/net/tramp-cache.el (tramp-get-file-property):
* lisp/net/tramp-sh.el (tramp-maybe-open-connection):
* lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection):
Make them backward compatible to Emacs 24.

5 years agoJump to the current error in xref with zero prefix arg
Felicián Németh [Wed, 13 Feb 2019 20:19:36 +0000 (21:19 +0100)]
Jump to the current error in xref with zero prefix arg

* xref.el (xref--next-error-function): Handle the corner case of
n == 0.  (Bug#34462)

5 years ago; * src/image.c (imagemagick_load, svg_load): Fix typos in comments.
Eli Zaretskii [Sat, 23 Feb 2019 08:35:59 +0000 (10:35 +0200)]
; * src/image.c (imagemagick_load, svg_load): Fix typos in comments.

5 years agoAvoid some double-rounding of Lisp timestamps
Paul Eggert [Sat, 23 Feb 2019 02:32:31 +0000 (18:32 -0800)]
Avoid some double-rounding of Lisp timestamps

Also, simplify some time-related Lisp timestamp code
while we’re in the neighborhood.
* lisp/battery.el (battery-linux-proc-acpi)
(battery-linux-sysfs, battery-upower, battery-bsd-apm):
* lisp/calendar/timeclock.el (timeclock-seconds-to-string)
(timeclock-log, timeclock-last-period)
(timeclock-entry-length, timeclock-entry-list-span)
(timeclock-find-discrep, timeclock-generate-report):
* lisp/cedet/ede/detect.el (ede-detect-qtest):
* lisp/completion.el (cmpl-hours-since-origin):
* lisp/ecomplete.el (ecomplete-decay-1):
* lisp/emacs-lisp/ert.el (ert--results-update-stats-display)
(ert--results-update-stats-display-maybe):
* lisp/emacs-lisp/timer-list.el (list-timers):
* lisp/emacs-lisp/timer.el (timer-until)
(timer-event-handler):
* lisp/erc/erc-backend.el (erc-server-send-ping)
(erc-server-send-queue, erc-handle-parsed-server-response)
(erc-handle-unknown-server-response):
* lisp/erc/erc-track.el (erc-buffer-visible):
* lisp/erc/erc.el (erc-lurker-cleanup, erc-lurker-p)
(erc-cmd-PING, erc-send-current-line):
* lisp/eshell/em-pred.el (eshell-pred-file-time):
* lisp/eshell/em-unix.el (eshell-show-elapsed-time):
* lisp/gnus/gnus-icalendar.el (gnus-icalendar-event:org-timestamp):
* lisp/gnus/gnus-int.el (gnus-backend-trace):
* lisp/gnus/gnus-sum.el (gnus-user-date):
* lisp/gnus/mail-source.el (mail-source-delete-crash-box):
* lisp/gnus/nnmaildir.el (nnmaildir--scan):
* lisp/ibuf-ext.el (ibuffer-mark-old-buffers):
* lisp/gnus/nnmaildir.el (nnmaildir--scan):
* lisp/mouse.el (mouse--down-1-maybe-follows-link)
(mouse--click-1-maybe-follows-link):
* lisp/mpc.el (mpc--faster-toggle):
* lisp/net/rcirc.el (rcirc-handler-ctcp-KEEPALIVE)
(rcirc-sentinel):
* lisp/net/tramp-cache.el (tramp-get-file-property):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-newer-than-file-p)
(tramp-maybe-open-connection):
* lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection):
* lisp/org/org-clock.el (org-clock-resolve):
(org-resolve-clocks, org-clock-in, org-clock-out, org-clock-sum):
* lisp/org/org-timer.el (org-timer-start)
(org-timer-pause-or-continue, org-timer-seconds):
* lisp/org/org.el (org-evaluate-time-range):
* lisp/org/ox-publish.el (org-publish-cache-ctime-of-src):
* lisp/pixel-scroll.el (pixel-scroll-in-rush-p):
* lisp/play/hanoi.el (hanoi-move-ring):
* lisp/proced.el (proced-format-time):
* lisp/progmodes/cpp.el (cpp-progress-message):
* lisp/progmodes/flymake.el (flymake--handle-report):
* lisp/progmodes/js.el (js--wait-for-matching-output):
* lisp/subr.el (progress-reporter-do-update):
* lisp/term/xterm.el (xterm--read-event-for-query):
* lisp/time.el (display-time-update, emacs-uptime):
* lisp/tooltip.el (tooltip-delay):
* lisp/url/url-cookie.el (url-cookie-parse-file-netscape):
* lisp/url/url-queue.el (url-queue-prune-old-entries):
* lisp/url/url.el (url-retrieve-synchronously):
* lisp/xt-mouse.el (xterm-mouse-event):
Avoid double-rounding of time-related values.  Simplify.
* lisp/calendar/icalendar.el (icalendar--decode-isodatetime):
When hoping for the best (unlikely), use a better decoded time.
(icalendar--convert-sexp-to-ical): Avoid unnecessary encode-time.
* lisp/calendar/timeclock.el (timeclock-when-to-leave):
* lisp/cedet/ede/detect.el (ede-detect-qtest):
* lisp/desktop.el (desktop-create-buffer):
* lisp/emacs-lisp/benchmark.el (benchmark-elapse):
* lisp/gnus/gnus-art.el (article-lapsed-string):
* lisp/gnus/gnus-group.el (gnus-group-timestamp-delta):
* lisp/gnus/nnmail.el (nnmail-expired-article-p):
* lisp/gnus/nnmaildir.el (nnmaildir-request-expire-articles):
* lisp/nxml/rng-maint.el (rng-time-function):
* lisp/org/org-clock.el (org-clock-get-clocked-time)
(org-clock-resolve, org-resolve-clocks, org-resolve-clocks-if-idle):
* lisp/org/org-habit.el (org-habit-insert-consistency-graphs):
* lisp/progmodes/vhdl-mode.el (vhdl-update-progress-info)
(vhdl-fix-case-region-1):
Use time-since instead of open-coding most of it.
* lisp/erc/erc-dcc.el (erc-dcc-get-sentinel):
* lisp/erc/erc.el (erc-string-to-emacs-time, erc-time-gt):
Now obsolete.  All uses changed.
(erc-time-diff): Accept all Lisp time values.
All uses changed.
* lisp/gnus/gnus-demon.el (gnus-demon-idle-since):
* lisp/gnus/gnus-score.el (gnus-score-headers):
* lisp/gnus/nneething.el (nneething-make-head):
* lisp/gnus/nnheader.el (nnheader-message-maybe):
* lisp/gnus/nnimap.el (nnimap-keepalive):
* lisp/image.el (image-animate-timeout):
* lisp/mail/feedmail.el (feedmail-rfc822-date):
* lisp/net/imap.el (imap-wait-for-tag):
* lisp/net/newst-backend.el (newsticker--image-get):
* lisp/net/rcirc.el (rcirc-handler-317, rcirc-handler-333):
* lisp/obsolete/xesam.el (xesam-refresh-entry):
* lisp/org/org-agenda.el (org-agenda-show-clocking-issues)
(org-agenda-check-clock-gap, org-agenda-to-appt):
* lisp/org/org-capture.el (org-capture-set-target-location):
* lisp/org/org-clock.el (org-clock-resolve-clock)
(org-clocktable-steps):
* lisp/org/org-colview.el (org-columns-edit-value)
(org-columns, org-agenda-columns):
* lisp/org/org-duration.el (org-duration-from-minutes):
* lisp/org/org-element.el (org-element-cache-sync-duration)
(org-element-cache-sync-break)
(org-element--cache-interrupt-p, org-element--cache-sync):
* lisp/org/org-habit.el (org-habit-get-faces)
* lisp/org/org-indent.el (org-indent-add-properties):
* lisp/org/org-table.el (org-table-sum):
* lisp/org/org-timer.el (org-timer-show-remaining-time)
(org-timer-set-timer):
* lisp/org/org.el (org-babel-load-file, org-today)
(org-auto-repeat-maybe, org-2ft, org-time-stamp)
(org-read-date-analyze, org-time-stamp-to-now)
(org-small-year-to-year, org-goto-calendar):
* lisp/org/ox.el (org-export-insert-default-template):
* lisp/ses.el (ses--time-check):
* lisp/type-break.el (type-break-time-warning)
(type-break-statistics, type-break-demo-boring):
* lisp/url/url-cache.el (url-cache-expired)
(url-cache-prune-cache):
* lisp/vc/vc-git.el (vc-git-stash-snapshot):
* lisp/erc/erc-match.el (erc-log-matches-come-back):
Simplify.

5 years agoRemove some timestamp format assumptions
Paul Eggert [Fri, 22 Feb 2019 21:24:16 +0000 (13:24 -0800)]
Remove some timestamp format assumptions

Don’t assume that current-time and plain encode-time return
timestamps in (HI LO US PS) format.
* lisp/gnus/gnus-art.el (article-make-date-line)
(article-lapsed-string):
* lisp/gnus/gnus-demon.el (gnus-demon-time-to-step):
* lisp/gnus/gnus-diary.el (gnus-user-format-function-d):
* lisp/gnus/nnmaildir.el (nnmaildir-request-expire-articles):
* lisp/net/pop3.el (pop3-uidl-dele):
* lisp/org/ox-publish.el (org-publish-sitemap):
* lisp/vc/vc-hg.el (vc-hg-state-fast):
Simplify and remove assumptions about timestamp format.
* lisp/gnus/gnus-art.el (article-lapsed-string):
* lisp/gnus/gnus-diary.el (gnus-user-format-function-d):
Do not worry about time-subtract returning nil; that's not possible.
* lisp/gnus/gnus-diary.el (gnus-user-format-function-d):
Avoid race due to duplicate current-time calls.
* lisp/vc/vc-hg.el (vc-hg--time-to-integer): Remove; no longer used.

5 years agowhich-function: Do not display outdated imenu information
Alex Branham [Tue, 11 Dec 2018 14:29:50 +0000 (08:29 -0600)]
which-function: Do not display outdated imenu information

* lisp/progmodes/which-func.el (which-function): Check
  `add-log-current-defun' before imenu. Update `imenu--index-alist' if
  needed. Bug#33695

5 years agoDisable the timerfd interface on Cygwin
Ken Brown [Fri, 22 Feb 2019 14:53:52 +0000 (09:53 -0500)]
Disable the timerfd interface on Cygwin

* configure.ac (emacs_cv_have_timerfd): Set to "no" on Cygwin.

5 years agoFix a typo in the doc string of 'regex-opt'
Eli Zaretskii [Fri, 22 Feb 2019 08:12:14 +0000 (10:12 +0200)]
Fix a typo in the doc string of 'regex-opt'

* lisp/emacs-lisp/regexp-opt.el (regexp-opt): Fix example in
the doc string.  (Bug#34596)

5 years ago; * etc/NEWS: Fix last change.
Eli Zaretskii [Fri, 22 Feb 2019 07:55:15 +0000 (09:55 +0200)]
; * etc/NEWS: Fix last change.

5 years agoHandle HTML 'ol' start attribute in shr.el
Nicholas Drozd [Sat, 16 Feb 2019 22:37:52 +0000 (16:37 -0600)]
Handle HTML 'ol' start attribute in shr.el

* lisp/net/shr.el (shr-tag-ol): Don't automatically assume
1-indexing for all ordered lists, use <ol> if given.

* etc/NEWS: Announce change in shr behavior.

* test/data/shr/ol.html:
* test/data/shr/ol.txt: New test data files.

5 years ago* lisp/vc/diff-mode.el: Reduce redundancy in diff-syntax-fontify code
Stefan Monnier [Thu, 21 Feb 2019 17:09:03 +0000 (12:09 -0500)]
* lisp/vc/diff-mode.el: Reduce redundancy in diff-syntax-fontify code

(diff--iterate-hunks): New function extracted from diff--font-lock-refined.
(diff--font-lock-refined, diff--font-lock-syntax): Use it.
(diff--overlay-auto-delete): Rename from diff--font-lock-refine--refresh.
(diff--font-lock-syntax--refresh): Delete.
(diff-syntax-fontify-hunk): Don't completely silence errors.
(diff-syntax-fontify-props): Remove `no-init` arg, testing if `file` is
nil instead.  Adjust all callers.
(diff-syntax-fontify-props): Remove redundant code since we don't
modify the buffer.

5 years agoDocument bash 5.0.0 misbehavior in tramp.texi (Bug#34192)
Michael Albinus [Thu, 21 Feb 2019 11:09:44 +0000 (12:09 +0100)]
Document bash 5.0.0 misbehavior in tramp.texi (Bug#34192)

* doc/misc/tramp.texi (Frequently Asked Questions): Warn about
bash 5.0.0 and HISTSIZE=0.  (Bug#34192)

5 years agoReplace 8-bit-specific case-manipulation
Mattias Engdegård [Wed, 20 Feb 2019 14:15:35 +0000 (15:15 +0100)]
Replace 8-bit-specific case-manipulation

* lisp/completion.el (cmpl-coerce-string-case):
Rewrite case-changing code written for ASCII or latin-1 but not valid
in generally today.

5 years agoCorrect implementation of `sql-set-product-feature' (Bug#30494).
Michael R. Mauger [Thu, 21 Feb 2019 03:13:51 +0000 (22:13 -0500)]
Correct implementation of `sql-set-product-feature' (Bug#30494).

* lisp.progmodes/sql.el (sql-add-product): Correct argument spec.
(sql-set-product-feature): Handle all cases as intended.
(sql-get-product-feature): Fetch varaiable value by `eval'.
* test/lisp/progmodes/sql-tests.el (sql-test-feature-value-[a-d]):
New test variables.
(sql-test-product-feature-harness): New test macro.
(sql-test-add-product, sql-test-add-existing-product)
(sql-test-set-feature, sql-test-set-indirect-feature)
(sql-test-set-existing-feature)
(sql-test-set-existing-indirect-feature)
(sql-test-set-missing-product, sql-test-get-feature)
(sql-test-get-indirect-feature, sql-test-get-missing-product)
(sql-test-get-missing-feature)
(sql-test-get-missing-indirect-feature): New ERT tests