]> git.eshelyaron.com Git - emacs.git/log
emacs.git
5 years agoFix warning in electric-tests.el (Bug#36570)
Stefan Kangas [Wed, 10 Jul 2019 01:50:48 +0000 (03:50 +0200)]
Fix warning in electric-tests.el (Bug#36570)

* test/lisp/electric-tests.el (plainer-c-mode): Remove duplicate
definition.

5 years agoSimplify math-get-calendar-tzinfo
Paul Eggert [Wed, 10 Jul 2019 06:18:13 +0000 (23:18 -0700)]
Simplify math-get-calendar-tzinfo

* lisp/calc/calc-forms.el (calendar-current-time-zone-cache):
Remove defvar.
(math-get-calendar-tzinfo): Simplify and do not reach
into caldst’s cache.

5 years agoFix documentation of cl-member
Lars Ingebrigtsen [Tue, 9 Jul 2019 23:39:33 +0000 (01:39 +0200)]
Fix documentation of cl-member

* doc/misc/cl.texi (Lists as Sets): cl-member with no :test is not
equal to memq (because it uses eql) (bug#33655).

5 years agoauth-source does not support "host" in .netrc files
Lars Ingebrigtsen [Tue, 9 Jul 2019 23:18:39 +0000 (01:18 +0200)]
auth-source does not support "host" in .netrc files

* doc/misc/auth.texi (Help for users): Remove mention of "host" in
.netrc files, because it's not supported (bug#33826).

5 years agoWhite-space fix in fortune-compile
Lars Ingebrigtsen [Tue, 9 Jul 2019 22:53:39 +0000 (00:53 +0200)]
White-space fix in fortune-compile

* lisp/play/fortune.el (fortune-compile): Reindent function.

5 years agoSearch exec-path for fortune strfile program
Benjamin Ragheb [Tue, 9 Jul 2019 22:31:10 +0000 (00:31 +0200)]
Search exec-path for fortune strfile program

* lisp/play/fortune.el (fortune-compile): Search exec-path for
strfile program (bug#33984).

Copyright-paperwork-exempt: yes

5 years agoRemove json-pretty-print-max-secs introduced earlier this year
Lars Ingebrigtsen [Tue, 9 Jul 2019 22:09:24 +0000 (00:09 +0200)]
Remove json-pretty-print-max-secs introduced earlier this year

* lisp/json.el (json-pretty-print-max-secs): Remove the variable
as it's no longer used.

5 years agoFix timezone east of GMT in Calv
Lars Ingebrigtsen [Tue, 9 Jul 2019 22:04:55 +0000 (00:04 +0200)]
Fix timezone east of GMT in Calv

* lisp/calc/calc-forms.el (math-calendar-tzinfo): Make timezone
calculation work east of Greenwich.  Fix proposed by David O'Shea
(bug#34075).

5 years ago* src/fileio.c: Fix bug#36431
Stefan Monnier [Tue, 9 Jul 2019 21:04:07 +0000 (17:04 -0400)]
* src/fileio.c: Fix bug#36431

(decide_coding_unwind): Re-introduce.  Move text back to the gap.
Return the new `inserted` via the unwind_data.
(Finsert_file_contents): Use it.
Make sure `inserted` is always 0 when we jump straight to `notfound`.
Don't insert the text in the buffer until we know it's properly decoded
for the byteness of the buffer.

* test/src/fileio-tests.el (fileio-tests--insert-file-interrupt):
Allow insert-file-contents to return an empty buffer in case of
non-local exit in set-auto-coding-function.

5 years agoDefend fingerprint against even-smarter LTO
Paul Eggert [Tue, 9 Jul 2019 20:55:16 +0000 (13:55 -0700)]
Defend fingerprint against even-smarter LTO

* src/pdumper.c (Fdump_emacs_portable, pdumper_load):
Don’t cast volatile to non-volatile pointer, as that does not in
general suffice to prevent a compiler from optimizing away memcmp
and/or memcpy calls.  Instead, copy the fingerprint by hand.

5 years agoRevert "Turn off bytecode jumptables to avoid Bug#36447"
Stefan Monnier [Tue, 9 Jul 2019 20:16:37 +0000 (16:16 -0400)]
Revert "Turn off bytecode jumptables to avoid Bug#36447"

This reverts commit 122198d2f1aaf0b74c102874cc9b04ae4789f54f.
Should not be needed any more thanks to Pip Cet's patch to hash_table_rehash.

5 years agoDon't alter shared structure in dumped purecopied hash tables.
Pip Cet [Wed, 3 Jul 2019 11:48:22 +0000 (11:48 +0000)]
Don't alter shared structure in dumped purecopied hash tables.

* src/fns.c (hash_table_rehash): Make sure we're operating on
fresh copies of ->next, ->index, ->hash.

5 years agoMerge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs into trunk
Stefan Monnier [Tue, 9 Jul 2019 20:13:25 +0000 (16:13 -0400)]
Merge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs into trunk

5 years agoDo not alter match data in Fcapitalize etc.
Paul Eggert [Tue, 9 Jul 2019 20:10:27 +0000 (13:10 -0700)]
Do not alter match data in Fcapitalize etc.

Without this patch, (capitalize "x") can alter the match data,
which is not what users expect.  Problem found by running
morse-tests-unnato-region in a stripped-down Emacs.
Perhaps ‘load’ should also save and restore the match data?
That would be a simpler fix, though arguably incompatible.
* src/lread.c (save_match_data_load): New function.
* src/chartab.c (uniprop_table):
* src/doc.c (reread_doc_file):
* src/eval.c (Fautoload_do_load):
* src/fns.c (Frequire): Use it.

5 years agoPort image-type-from-file-header-test to non-SVG Emacs
Paul Eggert [Tue, 9 Jul 2019 20:02:51 +0000 (13:02 -0700)]
Port image-type-from-file-header-test to non-SVG Emacs

Problem reported privately by Michael Albinus.
* test/lisp/image-tests.el (image-type-from-file-header-test):
Don’t assume svg is a supported image type.

5 years agoMake fingerprint handling compatible with LTO
Andreas Schwab [Tue, 9 Jul 2019 19:12:14 +0000 (21:12 +0200)]
Make fingerprint handling compatible with LTO

Tell the compiler that the fingerprint variable is modified unpredictably.

* lib/fingerprint.h (fingerprint): Remove const.
* lib/fingerprint.c (fingerprint): Likewise.
* src/pdumper.c (Fdump_emacs_portable): Cast fingerprint variable.
(pdumper_load): Likewise.
* lib-src/make-fingerprint.c (main): Likewise.

5 years agoFix pretty-printing of multiple JSON objects
Lars Ingebrigtsen [Tue, 9 Jul 2019 19:32:41 +0000 (21:32 +0200)]
Fix pretty-printing of multiple JSON objects

* lisp/json.el (json-pretty-print-max-secs): Make obsolete.
(json-pretty-print): Pretty-print all JSON objects in the region
instead of just the first one (and then deleting all other
objects) (bug#34160).

5 years agoRevert "Fix pretty-printing of multiple JSON objects"
Lars Ingebrigtsen [Tue, 9 Jul 2019 19:23:18 +0000 (21:23 +0200)]
Revert "Fix pretty-printing of multiple JSON objects"

This reverts commit 48daf77a9d963c05ee198b3ab108c7f0b3686da6.

This apparently led to build errors.

5 years agoFix pretty-printing of multiple JSON objects
Lars Ingebrigtsen [Tue, 9 Jul 2019 18:40:23 +0000 (20:40 +0200)]
Fix pretty-printing of multiple JSON objects

* lisp/json.el (json-pretty-print-max-secs): Make obsolete.
(json-pretty-print): Pretty-print all JSON objects in the region
instead of just the first one (and then deleting all other
objects) (bug#34160).

5 years ago* lisp/simple.el (shell-command): Raise a user-error instead of an error.
Michael Albinus [Tue, 9 Jul 2019 18:48:35 +0000 (20:48 +0200)]
* lisp/simple.el (shell-command): Raise a user-error instead of an error.

5 years ago; * lisp/json.el (json-encode): Doc fix.
Eli Zaretskii [Tue, 9 Jul 2019 18:41:26 +0000 (21:41 +0300)]
; * lisp/json.el (json-encode): Doc fix.

5 years agoClarify json-read and json-encode parameters and return values
Lars Ingebrigtsen [Tue, 9 Jul 2019 17:41:06 +0000 (19:41 +0200)]
Clarify json-read and json-encode parameters and return values

* lisp/json.el (json-read): Try to clarify what's returned (bug#34242).
(json-encode): Refer to `json-read' about what the input is and
say what error is signalled.

5 years agoFix alternative-email-as-from with empty To headers in Message
Lars Ingebrigtsen [Tue, 9 Jul 2019 17:19:56 +0000 (19:19 +0200)]
Fix alternative-email-as-from with empty To headers in Message

* lisp/gnus/message.el (message-use-alternative-email-as-from):
Don't add a "," at the start of the address if the To header
doesn't exist (bug#34293).

5 years agoMake gnus-read-ephemeral-emacs-bug-group autoloadable
Lars Ingebrigtsen [Tue, 9 Jul 2019 16:52:54 +0000 (18:52 +0200)]
Make gnus-read-ephemeral-emacs-bug-group autoloadable

* lisp/gnus/gnus-group.el (gnus-read-ephemeral-emacs-bug-group):
Add an autoload cookie, because the command can be used from
without Gnus.

5 years agoCheckdoc would bug out on empty files
Lars Ingebrigtsen [Tue, 9 Jul 2019 16:24:26 +0000 (18:24 +0200)]
Checkdoc would bug out on empty files

* lisp/emacs-lisp/checkdoc.el (checkdoc--next-docstring): Don't
bug out on malformed Emacs Lisp (bug#34760).
(checkdoc-file-comments-engine): Don't bug out on empty buffers.

5 years agoClarify warning about unknown articles in Gnus
Lars Ingebrigtsen [Tue, 9 Jul 2019 16:11:27 +0000 (18:11 +0200)]
Clarify warning about unknown articles in Gnus

* lisp/gnus/gnus-sum.el (gnus-summary-mark-article-as-unread)
(gnus-mark-article-as-unread): Clarify warning (bug#34990).

5 years agoDon't try to save articles in Gnus that have disappeared
Lars Ingebrigtsen [Tue, 9 Jul 2019 15:30:22 +0000 (17:30 +0200)]
Don't try to save articles in Gnus that have disappeared

* lisp/gnus/gnus-sum.el (gnus-summary-save-article): Stop trying
to save articles if the articles have disappeared (bug#35188).

5 years agoRename font_driver member close -> close_font
Mattias Engdegård [Tue, 9 Jul 2019 16:18:44 +0000 (18:18 +0200)]
Rename font_driver member close -> close_font

* src/alloc.c (cleanup_vector):
* src/xftfont.c (xftfont_driver):
* src/xfont.c (xfont_driver):
* src/nsfont.m (nsfont_driver):
* src/macfont.m (macfont_driver):
* src/ftxfont.c (ftxfont_driver):
* src/ftfont.c (ftfont_driver):
* src/ftcrfont.c (ftcrfont_driver):
* src/font.h (struct font_driver):
* src/font.c (font_clear_cache, font_close_object):
Rename `close' member to `close_font', to avoid clash with preprocessor
define of `close' in nt/inc/ms-w32.h and for consistency with `open_font'.

5 years agoMention `call-process-region' in the `call-process' doc string
Lars Ingebrigtsen [Tue, 9 Jul 2019 15:59:37 +0000 (17:59 +0200)]
Mention `call-process-region' in the `call-process' doc string

* src/callproc.c (Fcall_process): Mention `call-process-region'
(bug#35187).

5 years agoRename font_driver member open -> open_font
Mattias Engdegård [Tue, 9 Jul 2019 14:44:24 +0000 (16:44 +0200)]
Rename font_driver member open -> open_font

* src/xftfont.c (xftfont_driver):
* src/xfont.c (xfont_driver):
* src/nsfont.m (nsfont_driver):
* src/macfont.m (macfont_driver):
* src/ftxfont.c (ftxfont_driver):
* src/ftfont.c (ftfont_driver):
* src/ftcrfont.c (ftcrfont_driver):
* src/font.h (struct font_driver):
* src/font.c (font_open_entity):
Rename `open' member to `open_font', to avoid clash with preprocessor
define of `open' in lib/fcntl.h and nt/inc/ms-w32.h.  Remove earlier
#undef hack.

5 years agoAdd a really simple nadvice example
Lars Ingebrigtsen [Tue, 9 Jul 2019 15:13:38 +0000 (17:13 +0200)]
Add a really simple nadvice example

* doc/lispref/functions.texi (Advising Functions): Add a really
trivial and simple example (bug#35250).

5 years agoMake two variables for extended command suggestions mention each other
Lars Ingebrigtsen [Tue, 9 Jul 2019 14:43:02 +0000 (16:43 +0200)]
Make two variables for extended command suggestions mention each other

* lisp/simple.el (suggest-key-bindings):
(extended-command-suggest-shorter): Mention each other, because
they are vaguely related (bug#35309).

5 years agoMake the manual say what undo-auto-amalgamate does
Lars Ingebrigtsen [Tue, 9 Jul 2019 14:28:57 +0000 (16:28 +0200)]
Make the manual say what undo-auto-amalgamate does

* doc/lispref/text.texi (Undo): Say what undo-auto-amalgamate does
in addition to describing what amalgamation is (bug#35344).

5 years agoUnbreak the MS-Windows build
Eli Zaretskii [Tue, 9 Jul 2019 15:04:29 +0000 (18:04 +0300)]
Unbreak the MS-Windows build

* src/font.c (open): Don't undef on WINDOWSNT, as ms-w32.h
redirects it to sys_open.

5 years ago.har files are JSON files
Lars Ingebrigtsen [Tue, 9 Jul 2019 14:34:20 +0000 (16:34 +0200)]
.har files are JSON files

* lisp/files.el (auto-mode-alist): Map .har files to
javascript-mode (bug#35407).

5 years agoFix for lisp tagbody indentation
Ryan Brown [Tue, 9 Jul 2019 13:51:50 +0000 (15:51 +0200)]
Fix for lisp tagbody indentation

* lisp/emacs-lisp/cl-indent.el (lisp-indent-259): Indent PROG
better (bug#36552).

5 years agoAdd more quote-end characters to sentence-end-base
Lars Ingebrigtsen [Tue, 9 Jul 2019 13:38:19 +0000 (15:38 +0200)]
Add more quote-end characters to sentence-end-base

* lisp/textmodes/paragraphs.el (sentence-end-base): Add › and »
(bug#36359).

5 years ago* lisp/progmodes/verilog-mode.el: Update Version:
Stefan Monnier [Tue, 9 Jul 2019 13:30:49 +0000 (09:30 -0400)]
* lisp/progmodes/verilog-mode.el: Update Version:

5 years agoMerge branch 'emacs-26' into trunk
Stefan Monnier [Tue, 9 Jul 2019 13:29:16 +0000 (09:29 -0400)]
Merge branch 'emacs-26' into trunk

5 years ago* lisp/progmodes/verilog-mode.el: One more ELPA Version:
Stefan Monnier [Tue, 9 Jul 2019 13:27:07 +0000 (09:27 -0400)]
* lisp/progmodes/verilog-mode.el: One more ELPA Version:

5 years agoRepair macOS build
Mattias Engdegård [Tue, 9 Jul 2019 11:38:10 +0000 (13:38 +0200)]
Repair macOS build

Avoid macro redefinition of `open' in lib/fcntl.h to break use of it as
a struct member in src/font.c.

* src/font.c: #undef open

5 years agoConditionalize result of a bytecomp test
Glenn Morris [Tue, 9 Jul 2019 10:25:13 +0000 (03:25 -0700)]
Conditionalize result of a bytecomp test

* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-test--switch-duplicates):
Apparently the result depends on byte-compile-cond-use-jump-table.

5 years agoMake delimit-columns-region say what it does
Lars Ingebrigtsen [Tue, 9 Jul 2019 02:50:37 +0000 (04:50 +0200)]
Make delimit-columns-region say what it does

* lisp/delim-col.el (delimit-columns-region): Make the doc string
say a bit more about what it does (bug#35651).
(delimit-columns-rectangle): Refer to the first function.

5 years agoAllow using @@ in @uref in texinfo
Katsumi Yamaoka [Tue, 9 Jul 2019 02:01:26 +0000 (04:01 +0200)]
Allow using @@ in @uref in texinfo

* lisp/textmodes/texinfmt.el (texinfo-format-uref): Allow using @@
in @uref (bug#36186) to allow things like
@uref{mailto:foo@@example.com}.

5 years agoTweak compilation face in the wheatgrass theme
Lars Ingebrigtsen [Tue, 9 Jul 2019 01:56:02 +0000 (03:56 +0200)]
Tweak compilation face in the wheatgrass theme

* etc/themes/wheatgrass-theme.el: The compilation info was too
light to be readable (bug#36203).

5 years agoDon't set url-mime-charset-string from set-language-environment
Lars Ingebrigtsen [Tue, 9 Jul 2019 01:44:06 +0000 (03:44 +0200)]
Don't set url-mime-charset-string from set-language-environment

* lisp/url/url-vars.el (url-set-mime-charset-string): Make
obsolete and don't add to set-language-environment-hook
(bug#36268).  If you loaded url-vars before calling
set-language-environment, you would suddenly get an unusable long
url-mime-charset-string.

5 years agoRemove compat code in url-mime-charset-string
Lars Ingebrigtsen [Tue, 9 Jul 2019 01:34:15 +0000 (03:34 +0200)]
Remove compat code in url-mime-charset-string

* lisp/url/url-vars.el (url-mime-charset-string): Remove compat code.

5 years agoTweak messaging in re-builder
Lars Ingebrigtsen [Tue, 9 Jul 2019 01:25:42 +0000 (03:25 +0200)]
Tweak messaging in re-builder

* lisp/emacs-lisp/re-builder.el (reb-copy): Say what we copied to
the kill ring.

5 years agoMention {la,}tex-run-command in the TeX Print info node
Lars Ingebrigtsen [Mon, 8 Jul 2019 23:27:33 +0000 (01:27 +0200)]
Mention {la,}tex-run-command in the TeX Print info node

* doc/emacs/text.texi (TeX Print): Mention {la,}tex-run-command,
too.  Suggested by Sebastian Urban (bug#36400).

5 years agoAvoid some unnecessary stdio.h includes
Paul Eggert [Tue, 9 Jul 2019 00:50:39 +0000 (17:50 -0700)]
Avoid some unnecessary stdio.h includes

* src/atimer.c, src/callproc.c, src/coding.c, src/dired.c, src/eval.c:
* src/fringe.c, src/ftcrfont.c, src/ftfont.c, src/ftxfont.c:
* src/gfilenotify.c, src/indent.c, src/kqueue.c, src/menu.c:
* src/scroll.c, src/terminal.c, src/unexcoff.c, src/window.c:
* src/xfont.c, src/xftfont.c:
Do not include stdio.h since it is unused.

5 years agoUse fewer locks when accessing stdio
Paul Eggert [Tue, 9 Jul 2019 00:50:39 +0000 (17:50 -0700)]
Use fewer locks when accessing stdio

* src/alloc.c, src/bidi.c, src/emacs-module.c, src/pdumper.c:
* src/regex-emacs.c, src/unexhp9k800.c, src/unexmacosx.c:
* src/widget.c, src/xdisp.c, src/xselect.c, src/xterm.c:
Include sysstdio.h instead of stdio.h, to avoid locking
stdio streams in many cases.
* src/alloc.c (test_setjmp):
* src/bidi.c (bidi_dump_cached_states):
* src/cm.c (calccost):
* src/dispnew.c (init_display_interactive):
* src/emacs.c (main):
* src/image.c (convert_mono_to_color_image):
* src/minibuf.c (read_minibuf_noninteractive):
* src/nsfont.m (ns_descriptor_to_entity)
(ns_dump_glyphstring):
* src/nsterm.h (NSTRACE_MSG_NO_DASHES):
* src/nsterm.m (ns_mouse_position)
(sendEvent:, keyDown:, performDragOperation:):
* src/pdumper.c (dump_fingerprint, print_paths_to_root_1):
* src/print.c (debug_print):
* src/regex-emacs.c (debug_putchar, print_fastmap)
(print_partial_compiled_pattern, print_compiled_pattern)
(print_double_string, regex_compile):
* src/term.c (vfatal):
* src/unexhp9k800.c (read_header):
* src/unexmacosx.c (unexec_error):
* src/widget.c (EmacsFrameInitialize):
* src/xdisp.c (message_to_stderr, vmessage, dump_glyph_row)
(Fdump_glyph_matrix, Fdump_frame_glyph_matrix, dump_glyph_string):
* src/xfaces.c (Fdump_colors, Fdump_face):
* src/xselect.c (x_clipboard_manager_error_2):
* src/xterm.c (x_initialize):
* src/xwidget.c (WEBKIT_FN_INIT):
Prefer unlocked calls like fputs to locked calls like fprintf.
* src/charset.c (read_hex):
* src/cm.c (cmputc, cmcheckmagic):
* src/dispnew.c (update_frame, update_frame_with_menu)
(update_frame_1, Fsend_string_to_terminal, Fding)
(bitch_at_user):
* src/emacs.c (main, Fdump_emacs):
* src/emacs-module.c (module_abort):
* src/fileio.c (Fdo_auto_save):
* src/image.c (slurp_file)
(png_read_from_file, png_load_body, our_stdio_fill_input_buffer):
* src/keyboard.c (record_char, kbd_buffer_get_event)
(handle_interrupt):
* src/lread.c (readbyte_from_stdio, read1):
* src/minibuf.c (read_minibuf_noninteractive):
* src/print.c (printchar_to_stream, strout)
(Fredirect_debugging_output):
* src/sysdep.c (reset_sys_modes, close_output_streams)
(procfs_ttyname, procfs_get_total_memory):
* src/term.c (tty_ring_bell, tty_send_additional_strings)
(tty_set_terminal_modes, tty_reset_terminal_modes)
(tty_update_end, tty_clear_end_of_line, tty_write_glyphs)
(tty_write_glyphs_with_face, tty_insert_glyphs)
(tty_menu_activate):
* src/xfaces.c (Fx_load_color_file):
Simplify by using ordinary calls like putc to explicitly-unlocked
calls like putc_unlocked, since the ordinary calls are now
unlocked anyway.
* src/emacs.c (main, Fdump_emacs):
* src/pdumper.c (Fdump_emacs_portable):
Coalesce adjacent printfs.
* src/nsterm.h: Include sysstdio.h as this file’s macros rely on it.
* src/regex-emacs.c (print_compiled_pattern):
Omit redundant fflush.
* src/sysstdio.h: Include unlocked-io.h.
(clearerr_unlocked, feof_unlocked, ferror_unlocked)
(fflush_unlocked, fgets_unlocked, fputc_unlocked)
(fputs_unlocked, fread_unlocked, fwrite_unlocked)
(getc_unlocked, getchar_unlocked, putc_unlocked)
(putchar_unlocked): Remove these macros; now done by unlocked-io.h.
* src/xwidget.c: Include sysstdio.h.

5 years agoTidy up sieve.el text formatting
Basil L. Contovounesios [Mon, 8 Jul 2019 20:05:14 +0000 (21:05 +0100)]
Tidy up sieve.el text formatting

* lisp/net/sieve.el (sieve-edit-script, sieve-upload): Do not pass
arbitrary string as first argument to 'message' (bug#25764).
(sieve-help): Split long string across multiple lines.
(sieve-refresh-scriptlist): Use ngettext.  Fix grammar.

5 years agoDelegate to rectangle version in delim-col when appropriate
Stefan Kangas [Mon, 8 Jul 2019 22:50:41 +0000 (00:50 +0200)]
Delegate to rectangle version in delim-col when appropriate

* lisp/delim-col.el (delimit-columns-region): Delegate to
`delimit-columns-rectangle' when called with a rectangular
region (bug#36453).

5 years agoFix minor typo in org-capture-templates
Ismail S [Mon, 8 Jul 2019 20:56:55 +0000 (22:56 +0200)]
Fix minor typo in org-capture-templates

* lisp/org/org-capture.el (org-capture-templates): Fix typo in doc
string (bug#36491).

Copyright-paperwork-exempt: yes

5 years agoEnsure that expand-file-name returns an absolute file name
Ken Brown [Mon, 8 Jul 2019 22:37:33 +0000 (18:37 -0400)]
Ensure that expand-file-name returns an absolute file name

* src/fileio.c (Fexpand_file_name): Don't directly use the current
buffer's default-directory if it is relative.  Instead replace it
by its expansion relative to invocation-directory.  (Bug#36502)
* test/src/fileio-tests.el
(fileio-tests--relative-default-directory): New test.

5 years agoTurn off bytecode jumptables to avoid Bug#36447
Noam Postavsky [Mon, 8 Jul 2019 22:06:21 +0000 (18:06 -0400)]
Turn off bytecode jumptables to avoid Bug#36447

* lisp/emacs-lisp/bytecomp.el (byte-compile-cond-use-jump-table): Set
to nil.  We can turn this back on again when Bug#36447 is solved and
we handle dumped hash tables correctly.

5 years agoRemove mention of :group in define-minor-mode info
Lars Ingebrigtsen [Mon, 8 Jul 2019 20:32:36 +0000 (22:32 +0200)]
Remove mention of :group in define-minor-mode info

* doc/lispref/modes.texi (Defining Minor Modes): The :group stuff
in the example and documentation isn't correct since this is not a
global mode and `hunger-mode' therefore isn't customizable
(bug#36501).

5 years agoImprovements to sieve script usability
Eric Abrahamsen [Mon, 8 Jul 2019 17:53:07 +0000 (10:53 -0700)]
Improvements to sieve script usability

* lisp/net/sieve-mode.el (sieve-mode-menu): Add
  `sieve-upload-and-kill' to the mode menu.

* lisp/net/sieve.el (sieve-manage-mode-menu): Add `sieve-manage-quit'
  to the mode menu.
  (sieve-help): Mention quitting in mode help.
  (sieve-manage-mode): Directly derive from special-mode.
  (sieve-edit-script): Start off with unmodified buffer.
  (sieve-upload): Set buffer unmodified after successful upload.

Changes are aimed at 1) increasing discoverability of commands and 2)
using buffer modification to help users understand what's happening.

5 years agoMake sure gnus-group-set-info sets both the hashtable and alist
Eric Abrahamsen [Sun, 7 Jul 2019 23:25:14 +0000 (16:25 -0700)]
Make sure gnus-group-set-info sets both the hashtable and alist

* lisp/gnus/gnus-group.el (gnus-group-set-info): Apparently this
  method of updating the group info will only apply to the
  gnus-newsrc-hashtb, not gnus-newsrc-alist. Do the alist explicitly.

5 years ago* doc/misc/tramp.texi (Remote processes): Fix a typo.
Michael Albinus [Mon, 8 Jul 2019 14:46:29 +0000 (16:46 +0200)]
* doc/misc/tramp.texi (Remote processes): Fix a typo.

5 years agoFix coding error in c-forward-decl-or-cast-1. This fixes bug #36492.
Alan Mackenzie [Mon, 8 Jul 2019 12:43:18 +0000 (12:43 +0000)]
Fix coding error in c-forward-decl-or-cast-1.  This fixes bug #36492.

* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): While testing for,
e.g., foo(), check we've found the ( before trying to go to its position.

5 years agoAllow chown/chgrp for remote directories on w32
Michael Albinus [Mon, 8 Jul 2019 12:03:17 +0000 (14:03 +0200)]
Allow chown/chgrp for remote directories on w32

* lisp/dired-aux.el (dired-do-chgrp, dired-do-chown):
Allow them for remote directories, even when run on w32.  See
<https://emacs.stackexchange.com/questions/51477/chown-with-dired-over-tramp-from-windows-machine>.

5 years agoFix bug #36474, such that CC Mode quotes work properly in electric-pair-mode
Alan Mackenzie [Mon, 8 Jul 2019 09:24:29 +0000 (09:24 +0000)]
Fix bug #36474, such that CC Mode quotes work properly in electric-pair-mode

Also finishes the fix for bug #36423.

* lisp/progmodes/cc-mode.el (c-initialize-cc-mode): Add an `eval-after-load'
to set electric-pair-inhibit-predicate for existing CC Mode buffers when
elec-pair.elc gets loaded.
(c-basic-common-init): Set electric-pair-inhibit-predicate when a CC Mode mode
gets initialized.
(c-electric-pair-inhibit-predicate): New function.

5 years ago* src/xselect.c: Fix comment.
Paul Eggert [Mon, 8 Jul 2019 06:22:11 +0000 (23:22 -0700)]
* src/xselect.c: Fix comment.

5 years ago* src/dispnew.c (init_display_interactive): Fix comment to match code.
Paul Eggert [Mon, 8 Jul 2019 02:56:31 +0000 (19:56 -0700)]
* src/dispnew.c (init_display_interactive): Fix comment to match code.

5 years ago* lisp/vc/vc-dir.el (vc-dir-view-file): New command for consistency with dired
Juri Linkov [Sun, 7 Jul 2019 22:54:29 +0000 (01:54 +0300)]
* lisp/vc/vc-dir.el (vc-dir-view-file): New command for consistency with dired

* lisp/vc/vc-git.el (vc-git-log-incoming, vc-git-log-outgoing):
Remove interactive spec from non-command functions.  (Bug#12492)

5 years agoHandle scroll-error-top-bottom in follow.el and view.el (bug#21893)
Juri Linkov [Sun, 7 Jul 2019 22:35:35 +0000 (01:35 +0300)]
Handle scroll-error-top-bottom in follow.el and view.el (bug#21893)

* lisp/follow.el (follow-scroll-up-arg, follow-scroll-up-window):
Use scroll-up-command instead of scroll-up.
(follow-scroll-down-arg, follow-scroll-down-window):
Use scroll-down-command instead of scroll-down.
(follow-scroll-up, follow-scroll-down): Handle scroll-error-top-bottom.

* lisp/view.el (view-scroll-lines): Use scroll-down-command
instead of scroll-down and scroll-up-command instead of scroll-up.
(view-really-at-end): Handle scroll-error-top-bottom.

5 years ago* lisp/replace.el (perform-replace): Move save-match-data here
Juri Linkov [Sun, 7 Jul 2019 22:18:07 +0000 (01:18 +0300)]
* lisp/replace.el (perform-replace): Move save-match-data here

from replace-highlight for isearch-lazy-highlight-new-loop (bug#36328).

5 years agoAvoid makeinfo error "@code expected braces"
Glenn Morris [Sun, 7 Jul 2019 21:22:23 +0000 (14:22 -0700)]
Avoid makeinfo error "@code expected braces"

* doc/lispref/searching.texi (Rx Constructs): Fix for makeinfo 4.13.

5 years agoFix typo in previous patch
Paul Eggert [Sun, 7 Jul 2019 19:38:19 +0000 (12:38 -0700)]
Fix typo in previous patch

* src/editfns.c (styled_format): Fix stray ‘pMd’.

5 years agoRemove printmax_t etc.
Paul Eggert [Sun, 7 Jul 2019 19:29:27 +0000 (12:29 -0700)]
Remove printmax_t etc.

printmax_t etc. were needed only for platforms that lacked
support for printing intmax_t.  These platforms are now so
obsolete that they are no longer practical porting targets.
* src/image.c (gs_load): Fix unlikely buffer overrun
discovered while making these changes.  It was introduced in
2011-07-17T00:34:43!eggert@cs.ucla.edu.
* src/lisp.h (printmax_t, uprintmax_t, pMd, pMu, pMx):
Remove.  All uses replaced by their standard counterparts
intmax_t, uintmax_t, PRIdMAX, PRIuMAX, PRIxMAX.

5 years agoHandle 'abbr' and 'acronym' tags in shr.el
Nick Drozd [Sat, 6 Jul 2019 12:02:37 +0000 (14:02 +0200)]
Handle 'abbr' and 'acronym' tags in shr.el

* lisp/net/shr.el (shr-tag-abbr, shr-tag-acronym): New functions
handling 'abbr' and 'acronym' tags, respectively.
* etc/NEWS: Announce change in shr behavior (bug#36475).

5 years agoShorter `rx' doc string (bug#36496)
Mattias Engdegård [Sat, 6 Jul 2019 11:22:15 +0000 (13:22 +0200)]
Shorter `rx' doc string (bug#36496)

* lisp/emacs-lisp/rx.el (rx): Replace long description with a condensed
summary of the rx syntax, with reference to the manual section.

5 years agoDescribe the rx notation in the elisp manual (bug#36496)
Mattias Engdegård [Thu, 4 Jul 2019 11:01:52 +0000 (13:01 +0200)]
Describe the rx notation in the elisp manual (bug#36496)

The additions are excluded from the print version to avoid making it
thicker.

* doc/lispref/elisp.texi (Top): New menu entry.
* doc/lispref/searching.texi (Regular Expressions): New menu entry.
(Regexp Example): Add rx form of the example.
(Rx Notation, Rx Constructs, Rx Functions): New nodes.
* doc/lispref/control.texi (pcase Macro): Describe the rx pattern.

5 years agoDon’t ignore stderr failure when ADDRESS_SANITIZER
Paul Eggert [Sun, 7 Jul 2019 00:41:52 +0000 (17:41 -0700)]
Don’t ignore stderr failure when ADDRESS_SANITIZER

* src/emacs.c (close_output_streams): Move from here ...
* src/sysdep.c: ... to here, where it really belongs anyway.
When ADDRESS_SANITIZER, fflush stderr and check for ferror,
to catch stderr output errors even in this case.

5 years ago* lisp/emacs-lisp/nadvice.el: Make it a package separate from `emacs`.
Stefan Monnier [Sat, 6 Jul 2019 22:42:02 +0000 (18:42 -0400)]
* lisp/emacs-lisp/nadvice.el: Make it a package separate from `emacs`.

* lisp/finder.el (finder-compile-keywords): Grab version from
package--builtin-versions when available.

5 years agoMerge from origin/emacs-26
Glenn Morris [Sat, 6 Jul 2019 19:52:12 +0000 (12:52 -0700)]
Merge from origin/emacs-26

1e6d8e0 (origin/emacs-26) ; * doc/emacs/killing.texi (Secondary Selec...
e2344a7 * lisp/svg.el, lisp/progmodes/ada-mode.el: Fix bug#36360.
ff738ab Minor copyedit of "Font Lock" in user manual
faf99dc Improve description of image descriptors
21351cc ; * src/lread.c (Fread): Make the comment wording more accurate.
d176090 Improve documentation of secondary selections
8910fe1 * src/fns.c (Fmapconcat): Doc fix.  (Bug#36418)

# Conflicts:
# lisp/svg.el

5 years ago; Merge from origin/emacs-26
Glenn Morris [Sat, 6 Jul 2019 19:51:30 +0000 (12:51 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

f0db687 Avoid crash inside CFCharacterSetIsLongCharacterMember (Bug#3...

5 years agoMerge from origin/emacs-26
Glenn Morris [Sat, 6 Jul 2019 19:51:30 +0000 (12:51 -0700)]
Merge from origin/emacs-26

e97c043 Fix python.el docstring (Bug#36458)
e660801 ; Add thing-at-point-looking-at test (Bug#35708)
f5b4846 ; Fix typo, insure -> ensure in ChangeLogs
cb8fb59 * lisp/hi-lock.el (hi-lock-line-face-buffer): Doc fix.  (Bug3...

5 years ago; Merge from origin/emacs-26
Glenn Morris [Sat, 6 Jul 2019 19:51:30 +0000 (12:51 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

dc5ed2c (emacs-26) ; Auto-commit of loaddefs files.

5 years agoMerge from origin/emacs-26
Glenn Morris [Sat, 6 Jul 2019 19:51:30 +0000 (12:51 -0700)]
Merge from origin/emacs-26

316f5a3 Fix typo in doc string of file-exists-p (bug#36408)
bfc7c6e * test/lisp/url/url-file-tests.el (url-file): Fix for POSIX f...
13b95e1 Fix typo in windows.texi
8b775c3 Clarify & update (elisp) Writing Emacs Primitives
7648c12 Clarify a subtle issue in the Internals chapter of lispref

5 years ago* lisp/dom.el (dom-texts): Simplify (Bug#36441).
Xu Chunyang [Sun, 30 Jun 2019 04:30:22 +0000 (12:30 +0800)]
* lisp/dom.el (dom-texts): Simplify (Bug#36441).

5 years agoUse buffer's name for help-mode bookmarks (Bug#24573)
Noam Postavsky [Sat, 28 Oct 2017 19:48:17 +0000 (15:48 -0400)]
Use buffer's name for help-mode bookmarks (Bug#24573)

* lisp/help-mode.el (help-bookmark-make-record): Replace buffer
objects with their names in help-args, otherwise the bookmark won't be
readable from the bookmark save file.

5 years agoAdd commentary about #$ in autoload files
Noam Postavsky [Sat, 6 Jul 2019 02:26:13 +0000 (22:26 -0400)]
Add commentary about #$ in autoload files

* lisp/emacs-lisp/autoload.el (autoload-rubric): Add commentary about
`#$' trick.

5 years ago; * doc/emacs/killing.texi (Secondary Selection): Fix last change.
Eli Zaretskii [Sat, 6 Jul 2019 18:33:45 +0000 (21:33 +0300)]
; * doc/emacs/killing.texi (Secondary Selection): Fix last change.

5 years agoFix indentation of default clocking definitions.
Wilson Snyder [Sat, 6 Jul 2019 17:33:59 +0000 (13:33 -0400)]
Fix indentation of default clocking definitions.

* verilog-mode.el (verilog-default-clocking-re): Fix indentation of default
clocking definitions, Verilog-Mode bug1457. Reported by Paul Donahue.

5 years agoBackout replacing manually crafted hex regexes with [:xdigit:].
Wilson Snyder [Sat, 6 Jul 2019 17:27:13 +0000 (13:27 -0400)]
Backout replacing manually crafted hex regexes with [:xdigit:].

* lisp/progmodes/verilog-mode.el (verilog-delay-re):
(verilog-type-font-keywords, verilog-read-always-signals-recurse):
(verilog-is-number): Backout replacing manually crafted hex regexes with
[:xdigit:] (Bug#36167).  This repairs Verilog-mode regressions;
Verilog-mode maintains back-compatibility with Emacsen before this syntax
was supported.

5 years agoUpdate current buffer when changing text properties
Pip Cet [Sat, 6 Jul 2019 15:21:04 +0000 (15:21 +0000)]
Update current buffer when changing text properties

* src/textprop.c (add_text_properties_1, set_text_properties)
(set_text_properties_1, Fremove_text_properties): Switch buffer if
necessary.  (Bug#36190)

* doc/lispref/text.texi (Examining Properties): Document performance
FIXME.

5 years ago* lisp/svg.el, lisp/progmodes/ada-mode.el: Fix bug#36360.
Stefan Monnier [Sat, 6 Jul 2019 16:16:24 +0000 (12:16 -0400)]
* lisp/svg.el, lisp/progmodes/ada-mode.el: Fix bug#36360.

Tell package.el their version number, for better behavior w.r.t the
versions available in GNU ELPA

5 years agoUpdate from Gnulib
Paul Eggert [Sat, 6 Jul 2019 15:54:24 +0000 (08:54 -0700)]
Update from Gnulib

This incorporates:
2019-07-06 thread, lock, cond, tls: Remove support for Pth threads
2019-07-02 verify: document ‘assume’ better
2019-06-30 Include <stdlib.h> when needed
2019-06-30 inet_ntop, inet_pton: Avoid conflict with native Windows
* build-aux/config.sub, lib/faccessat.c, lib/fcntl.c, lib/fstatat.c:
* lib/readlinkat.c, lib/verify.h, m4/pthread_sigmask.m4:
* m4/sys_socket_h.m4: Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.

5 years agoFix [[:xdigit:]] glitch on Solaris
Paul Eggert [Sat, 6 Jul 2019 14:48:15 +0000 (07:48 -0700)]
Fix [[:xdigit:]] glitch on Solaris

* admin/charsets/mapconv: Revert this [[:xdigit:]] change.
Solaris 10 ‘sed’ does not support [[:xdigit:]].

5 years agoTweak point movement in view-echo-area-messages
Drew Adams [Sat, 6 Jul 2019 14:47:08 +0000 (16:47 +0200)]
Tweak point movement in view-echo-area-messages

* lisp/help.el (view-echo-area-messages): Move the point to the
end of the *Messages* buffer even if it's already displayed
(bug#36343).

5 years agoRemove outdated comment in uniquify.el
Stefan Kangas [Sat, 6 Jul 2019 14:37:09 +0000 (16:37 +0200)]
Remove outdated comment in uniquify.el

* lisp/uniquify.el: Remove outdated comment regarding some ancient
version of uniquify.el (bug#36384).

5 years agoImprove an error message in bookmark.el
Stefan Kangas [Sat, 6 Jul 2019 14:35:52 +0000 (16:35 +0200)]
Improve an error message in bookmark.el

* lisp/bookmark.el (bookmark-alist-from-buffer): Improve error
message (bug#36391).

5 years agoImprove Gnus ephemeral bug group browsing
Basil L. Contovounesios [Sat, 6 Jul 2019 14:34:10 +0000 (16:34 +0200)]
Improve Gnus ephemeral bug group browsing

* doc/misc/gnus.texi (Foreign Groups): Update description of
gnus-read-ephemeral-emacs-bug-group for multiple bug
IDs (bug#11961).

* lisp/gnus/gnus-group.el (gnus-bug-group-download-format-alist):
Use HTTPS for Debian's bug tracker.
(gnus-group--read-bug-ids): New function for reading multiple bug
IDs in the minibuffer.  Improves on previous brittle approach of
word-at-point -> read-string -> string-to-number by a) defaulting to
the more accurate bug-reference-bug-regexp or number-at-point
without using the intrusive INITIAL-INPUT argument, and b) not
attempting to parse bug IDs.
(gnus-read-ephemeral-bug-group): Use it.  Extend docstring and
commentary.  Fix handling of multiple bug IDs as either numbers or
strings.  Hoist some string consing out of inner loop.  Delete
temporary file even on error.  Throw more informative error when
url-insert-file-contents successfully returns an error (bug#36433).
(gnus-read-ephemeral-debian-bug-group): Use gnus-group--read-bug-ids
and fix docstring for multiple bug IDs.  Accept optional WINDOW-CONF
like other ephemeral bug group commands.
(gnus-read-ephemeral-emacs-bug-group): Use gnus-group--read-bug-ids
and fix string/numeric ID conversions.  Try loading debbugs-gnu
before testing for debbugs-gnu-summary-mode (bug#36433).

5 years agoAdd tests for text-property-search to check prop-match-value
Stefan Kangas [Sat, 6 Jul 2019 14:27:05 +0000 (16:27 +0200)]
Add tests for text-property-search to check prop-match-value

* test/lisp/emacs-lisp/text-property-search-tests.el
(with-match-test): New macro.
(text-property-search-forward-prop-match-match-face-nil-nil)
(text-property-search-forward-prop-match-match-face-bold-t)
(text-property-search-forward-prop-match-match-face-bold-nil)
(text-property-search-backward-prop-match-match-face-nil-nil)
(text-property-search-backward-prop-match-match-face-italic-t)
(text-property-search-backward-prop-match-match-face-italic-nil):
Add test cases to also verify the value of prop-match-value
(bug#36486).

5 years agoMinor copyedit of "Font Lock" in user manual
Eli Zaretskii [Sat, 6 Jul 2019 14:25:46 +0000 (17:25 +0300)]
Minor copyedit of "Font Lock" in user manual

* doc/emacs/display.texi (Font Lock): Make the wording about
"enabling Font Lock" crystal clear.  (Bug#36529)

5 years agoImprove description of image descriptors
Eli Zaretskii [Sat, 6 Jul 2019 12:32:20 +0000 (15:32 +0300)]
Improve description of image descriptors

* doc/lispref/display.texi (Image Descriptors): More accurate
description of where image files are looked up.  (Bug#36523)

5 years agoImprove the default value of 'doc-view-ghostscript-program'
Eli Zaretskii [Sat, 6 Jul 2019 11:49:23 +0000 (14:49 +0300)]
Improve the default value of 'doc-view-ghostscript-program'

* lisp/doc-view.el (doc-view-ghostscript-program): Make the
default value dependent on the underlying OS.  (Bug#36357)

5 years agoMake "M-x pdb" use "[:graph:]" to match file names
Stefan Kangas [Sun, 30 Jun 2019 17:17:52 +0000 (19:17 +0200)]
Make "M-x pdb" use "[:graph:]" to match file names

* lisp/progmodes/gud.el (gud-pdb-marker-regexp): Use "[:graph:]" to
match file name in prompt.  (Bug#34489)