]> git.eshelyaron.com Git - emacs.git/log
emacs.git
5 years ago* test/lisp/mail/rmail-tests.el (rmail-autoload): Fix its doc.
Charles A. Roelli [Wed, 27 Mar 2019 19:48:16 +0000 (20:48 +0100)]
* test/lisp/mail/rmail-tests.el (rmail-autoload): Fix its doc.

5 years agoTune css-mode regexp
Paul Eggert [Wed, 27 Mar 2019 18:43:18 +0000 (11:43 -0700)]
Tune css-mode regexp

* lisp/textmodes/css-mode.el (css--font-lock-keywords):
Omit unnecessary \(?: \) in regexp.  Suggested by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2019-03/msg01042.html

5 years agoImprove documentation of 'alist-get' (Bug#34708)
Michael Heerdegen [Tue, 12 Mar 2019 14:13:55 +0000 (15:13 +0100)]
Improve documentation of 'alist-get' (Bug#34708)

* lisp/subr.el (alist-get): Enhance part of docstring explaining usage
in place expressions.

5 years agoUse regexp-opt-charset to improve regexp tweaks
Paul Eggert [Wed, 27 Mar 2019 18:36:13 +0000 (11:36 -0700)]
Use regexp-opt-charset to improve regexp tweaks

* lisp/emacs-lisp/regexp-opt.el (regexp-opt):
Reword confusing sentence in doc string.
* lisp/erc/erc.el (erc-lurker-maybe-trim):
* lisp/mail/footnote.el (footnote-hebrew-numeric-regex):
Improve by using regexp-opt-charset.

5 years agoAttempt to fix crashes under GDB on Windows 10
Eli Zaretskii [Wed, 27 Mar 2019 18:34:22 +0000 (20:34 +0200)]
Attempt to fix crashes under GDB on Windows 10

* src/pdumper.c (dump_discard_mem)
[VM_SUPPORTED == VM_MS_WINDOWS]: Don't pass NULL pointer as
last argument to VirtualProtect.  Reported by Martin Rudalics
<rudalics@gmx.at>.

5 years agoMinor xml.el tweaks
Paul Eggert [Wed, 27 Mar 2019 17:01:21 +0000 (10:01 -0700)]
Minor xml.el tweaks

* lisp/xml.el (xml-name-start-char-re, xml-name-char-re):
No need to call concat.
(xml-name-char-re): Use \u escapes rather than chars inline,
so that the code matches the comments better and is easier
to audit.

5 years agoUse connection-local setting for tramp-remote-path
Michael Albinus [Wed, 27 Mar 2019 15:28:08 +0000 (16:28 +0100)]
Use connection-local setting for tramp-remote-path

* doc/misc/tramp.texi (Remote programs): Mention connection-local
settings for `tramp-remote-path'.

* lisp/net/tramp-sh.el (tramp-get-remote-path): Expand connection-local
variables.

5 years agoAvoid recently obsolete seq-contains in css-mode
Basil L. Contovounesios [Wed, 27 Mar 2019 13:56:22 +0000 (13:56 +0000)]
Avoid recently obsolete seq-contains in css-mode

* lisp/textmodes/css-mode.el (css--join-nested-selectors): Replace
recently obsolete seq-contains with new predicate seq-contains-p.

5 years ago* lisp/xml.el (xml-name-char-re): Remove superfluous `-' in regexp.
Mattias Engdegård [Wed, 27 Mar 2019 12:34:13 +0000 (13:34 +0100)]
* lisp/xml.el (xml-name-char-re): Remove superfluous `-' in regexp.

5 years agoImprove C++ raw string fontification.
Alan Mackenzie [Wed, 27 Mar 2019 11:50:53 +0000 (11:50 +0000)]
Improve C++ raw string fontification.

Integrate the handling of raw string and ordinary string fontification.

* lisp/progmodes/cc-defs.el (c-font-lock-flush)
(c-search-forward-char-property-without-value-on-char): new macros.
(c-point): In the 'eoll arm, check for eobp.
(c-search-forward-char-property-with-value-on-char): Handle the &optional
limit argument being nil.
(c-clear-char-property-with-value-on-char-function)
(c-clear-char-property-with-value-on-char): Return the position of the first
cleared property.

* lisp/progmodes/cc-engine.el (c-find-decl-prefix-search): Don't spuriously
recognize the change of face at a ) as the start of a string (a
"pseudo match").
(c-old-beg-rs c-old-end-rs): New variables.
(c-raw-string-pos): Analyze raw string delimiters more carefully.
(c-raw-string-in-end-delim): New function.
(c-depropertize-raw-string): Largely rewritten.
(c-before-change-check-raw-strings): New functionality: only remove the
syntax-table text properties from raw strings whose delimiters are about to
change.
(c-propertize-raw-string-id): New function.
(c-after-change-re-mark-raw-strings): Remove, incorporating functionality into
other functions.
(c-propertize-raw-string-opener): Largely rewritten.
(c-after-change-re-mark-raw-strings): Removed.
(c-after-change-unmark-raw-strings, c-after-change-unmark-raw-strings): New
functions.

* lisp/progmodes/cc-fonts.el (c-font-lock-raw-strings): Largely rewritten.

* lisp/progmodes/cc-langs.el (c-before-font-lock-functions): Replace
c-after-change-re-mark-unbalanced-strings by
c-after-change-mark-abnormal-strings in the t, c+objc, c++ and java sections.
Add c-after-change-unmark-raw-strings and remove
c-after-change-re-mark-raw-strings from the c++ section.

* lisp/progmodes/cc-mode.el (c-old-BEG c-old-END): Remove.
(c-old-END-literality): New variable.
(c-depropertize-CPP): Remove syntax-table properties from raw strings within
macros.
(c-before-change-check-unbalanced-strings): Call
c-truncate-semi-nonlit-pos-cache to preserve the integrity of the cache.
(c-before-change-check-unbalanced-strings): Call
c-truncate-semi-nonlit-pos-cache, largely rewritten.
(c-after-change-re-mark-unbalanced-strings): Renamed to
c-after-change-mark-abnormal-strings.  Call c-maybe-re-mark-raw-string.

5 years ago* lisp/calc/calc-forms.el (calc-hms-notation): Fix interactive
Andreas Schwab [Wed, 27 Mar 2019 09:29:49 +0000 (10:29 +0100)]
* lisp/calc/calc-forms.el (calc-hms-notation): Fix interactive
prompt.

5 years ago* lisp/emacs-lisp/map.el (map-inplace): Fix the message of the error.
Nicolas Petton [Wed, 27 Mar 2019 09:22:33 +0000 (10:22 +0100)]
* lisp/emacs-lisp/map.el (map-inplace): Fix the message of the error.

5 years agoSupport native image resizing on cairo
YAMAMOTO Mitsuharu [Wed, 27 Mar 2019 02:04:46 +0000 (11:04 +0900)]
Support native image resizing on cairo

* src/xterm.c (x_cr_draw_image): Add arguments image_width and
image_height and support scaling.  All callers changed.
* src/image.c (Fimage_scaling_p): Return t when USE_CAIRO.
(x_set_image_size) [USE_CAIRO]: Record the scaled dimensions
in the image struct.
* src/dispextern.h (HAVE_NATIVE_SCALING): Define when
USE_CAIRO as well.

* etc/NEWS: Update the announcement of native image scaling.

5 years agoFix cairo image drawing with box
YAMAMOTO Mitsuharu [Wed, 27 Mar 2019 00:49:22 +0000 (09:49 +0900)]
Fix cairo image drawing with box

* src/xterm.c (x_cr_draw_image): Don't call cr_clip for non-mask case.
(x_draw_image_foreground) [USE_CAIRO]: Draw image here ...
(x_draw_image_glyph_string) [USE_CAIRO]: ... instead of here.
(x_draw_image_foreground, x_draw_image_foreground_1)
(x_draw_image_glyph_string) [USE_CAIRO]: Ifdef away unused code path.

5 years ago2019-03-26 regex cleanup
Paul Eggert [Wed, 27 Mar 2019 02:06:36 +0000 (19:06 -0700)]
2019-03-26 regex cleanup

Problems reported by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2019-03/msg01028.html
* lisp/align.el (align-rules-list):
* lisp/speedbar.el (speedbar-check-read-only, speedbar-check-vc):
* lisp/vc/diff-mode.el (diff-add-change-log-entries-other-window):
* lisp/woman.el (woman-parse-numeric-arg):
Put "-" at end of character alternatives, since a range was not intended.
* lisp/erc/erc.el (font-lock):
* lisp/mail/footnote.el (cl-seq):
Avoid duplicate character alternatives by using cl-seq API.
* lisp/mail/footnote.el (footnote--current-regexp):
* lisp/textmodes/css-mode.el (css--font-lock-keywords):
Avoid repetition of repetition.
* lisp/net/webjump.el (webjump-url-encode):
Add ~ to character alternatives, and rewrite confusing range.
* lisp/progmodes/verilog-mode.el (verilog-compiler-directives)
(verilog-assignment-operator-re):
Remove duplicate.
* lisp/progmodes/verilog-mode.el (verilog-preprocessor-re):
* lisp/textmodes/css-mode.el (css--font-lock-keywords):
Don’t escape a char that doesn’t need it.
* lisp/textmodes/picture.el (picture-tab-chars): In docstring,
do not say regexp characters will be quoted; merely say in
another way that the syntax is that of character alternatives.
(picture-set-tab-stops, picture-tab-search): Don’t attempt
to regexp-quote picture-tab-chars.
(picture-tab-search): Quote \ in picture-tab-chars for
skip-chars-backwards, which treats \ differently than
regexp character alternatives do.

5 years ago* easy-mmode.el: simplify via custom-current-group
Stefan Monnier [Tue, 26 Mar 2019 15:45:07 +0000 (11:45 -0400)]
* easy-mmode.el: simplify via custom-current-group

* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Don't try and guess a default :group, defcustom does it better anyway.

5 years agoUse cairo image surface instead of pattern for fringe bitmap
YAMAMOTO Mitsuharu [Tue, 26 Mar 2019 09:58:35 +0000 (18:58 +0900)]
Use cairo image surface instead of pattern for fringe bitmap

* src/xterm.c (fringe_bmp, x_cr_define_fringe_bitmap)
(x_cr_destroy_fringe_bitmap, x_cr_draw_image) [USE_CAIRO]:
Change type of fringe bitmap.

5 years agoFix cairo scrolling for left scroll bars case
YAMAMOTO Mitsuharu [Tue, 26 Mar 2019 07:39:07 +0000 (16:39 +0900)]
Fix cairo scrolling for left scroll bars case

* src/xterm.c (x_scroll_run) [USE_CAIRO]: Fix scrolling by unusing
WINDOW_LEFT_EDGE_X.  (Bug#31288)

5 years agoSupport tool bar icon image on GTK+ >= 3.10 with cairo
YAMAMOTO Mitsuharu [Tue, 26 Mar 2019 05:50:10 +0000 (14:50 +0900)]
Support tool bar icon image on GTK+ >= 3.10 with cairo

* src/gtkutil.c (xg_get_image_for_pixmap) [USE_CAIRO]: Use cairo image
surface for GtkImage source.
(xg_tool_item_stale_p, update_frame_tool_bar) [USE_CAIRO]: Use cairo
image surface instead of pixmap for data associated with tool bar item.

5 years agoSimplify cairo image surface creation and destruction
YAMAMOTO Mitsuharu [Tue, 26 Mar 2019 05:42:10 +0000 (14:42 +0900)]
Simplify cairo image surface creation and destruction

* src/dispextern.h (struct image) [USE_CAIRO]: Remove member cr_data2.
* src/image.c (set_cairo_image_surface): New function split from
original create_cairo_image_surface.  Call cairo_surface_mark_dirty.
(create_cairo_image_surface): Just create image surface and return it.
(x_clear_image): Don't free cr_data2.
(xpm_load, pbm_load, png_load_body, jpeg_load_body, tiff_load)
(gif_load, imagemagick_load_image, svg_load_image) [USE_CAIRO]: Use
new create_cairo_image_surface and cairo_image_surface_get_data
instead of xmalloc.  Use set_cairo_image_surface instead of old
create_cairo_image_surface.
(pbm_load) [USE_CAIRO]: Call cairo_surface_destroy for surface instead
of xfree for data.
(gif_load) [USE_CAIRO]: Multiply y-coordinate value by width instead
of subimg_width.

5 years ago; * etc/NEWS: Fix Tabulated List mode nesting.
Basil L. Contovounesios [Tue, 26 Mar 2019 01:46:06 +0000 (01:46 +0000)]
; * etc/NEWS: Fix Tabulated List mode nesting.

5 years agoPort recent ngettext stub to non-glibc
Paul Eggert [Mon, 25 Mar 2019 22:20:20 +0000 (15:20 -0700)]
Port recent ngettext stub to non-glibc

* src/editfns.c: Don’t try to call glibc ngettext;
we’re not ready for that yet.
(Fngettext): Do not restrict integer arguments to fixnums.
Improve doc string a bit.

5 years agoUpdate from Gnulib.
Paul Eggert [Mon, 25 Mar 2019 21:53:56 +0000 (14:53 -0700)]
Update from Gnulib.

This incorporates:
2019-03-23 Support cross-compilation to musl libc
2019-03-23 noreturn: In C++ mode with clang, use _Noreturn as fallback
2019-03-22 _Noreturn: beware of C's _Noreturn in C++ pre C++11
2019-03-19 Help making signal handlers more reliable
2019-03-18 _Noreturn: clang and MSVC do support [[noreturn]] in C++11
2019-03-17 _Noreturn: GCC 4.7 does not support [[noreturn]] in C++11
2019-03-14 all: Update URLs to msdn.microsoft.com
* doc/misc/texinfo.tex, lib/_Noreturn.h, lib/gettimeofday.c:
* lib/mktime.c, lib/regcomp.c, lib/regexec.c, lib/stat-time.h:
* lib/utimens.c, m4/fdopendir.m4, m4/getgroups.m4:
* m4/gettimeofday.m4, m4/gnulib-common.m4, m4/putenv.m4, m4/utimes.m4:
Update from gnulib.

5 years ago* lisp/vc/vc.el (vc-diff-mergebase, vc-log-mergebase): New commands.
Juri Linkov [Mon, 25 Mar 2019 21:45:31 +0000 (23:45 +0200)]
* lisp/vc/vc.el (vc-diff-mergebase, vc-log-mergebase): New commands.

* lisp/vc/vc-git.el (vc-git-mergebase): New function.
(vc-git-print-log): Interpret string value of arg LIMIT as an end-revision.

* lisp/vc/vc-hooks.el (vc-prefix-map): Bind 'vc-log-mergebase' to
'C-x v M L', and 'vc-diff-mergebase' to 'C-x v M D'.  (Bug#33950)

5 years agoFix alignment bug with pure bignums
Paul Eggert [Mon, 25 Mar 2019 21:31:31 +0000 (14:31 -0700)]
Fix alignment bug with pure bignums

Problem found on 32-bit sparc, which has stricter alignment
checking than x86-64.
* src/alloc.c (pure_alloc): When TYPE is negative it now specifies
the negation of the required alignment of the result.
(make_pure_bignum): Specify bignum limb alignment.

5 years ago* lisp/international/mule-cmds.el (ngettext): Move to editfns.c.
Juri Linkov [Mon, 25 Mar 2019 21:32:09 +0000 (23:32 +0200)]
* lisp/international/mule-cmds.el (ngettext): Move to editfns.c.

* src/editfns.c (Fngettext): Move from mule-cmds.el and use
gettext's ngettext when available.

5 years agoFix text property bug in gnus-group-list-active
Eric Abrahamsen [Mon, 25 Mar 2019 20:27:07 +0000 (13:27 -0700)]
Fix text property bug in gnus-group-list-active

* lisp/gnus/gnus-group.el (gnus-group-list-active): The property value
  should be the group name, not the value of gethash. Ie, it should be
  the key, not the value.

5 years agoDon't save Gnus' dummy.group to the .newsrc.eld file
Eric Abrahamsen [Mon, 25 Mar 2019 20:26:10 +0000 (13:26 -0700)]
Don't save Gnus' dummy.group to the .newsrc.eld file

* lisp/gnus/gnus-start.el (gnus-gnus-to-quick-newsrc-format): Remove
  the "dummy.group" element.

5 years agoHandle multiple possible types for Gnus group names
Eric Abrahamsen [Mon, 25 Mar 2019 20:25:12 +0000 (13:25 -0700)]
Handle multiple possible types for Gnus group names

* lisp/gnus/gnus-start.el (gnus-active-to-gnus-format): Numbers,
  symbols, and strings.

5 years agoFix a dns-mode reentrancy bug
Paul Eggert [Mon, 25 Mar 2019 18:29:07 +0000 (11:29 -0700)]
Fix a dns-mode reentrancy bug

* lisp/textmodes/dns-mode.el (dns-mode-ipv6-to-nibbles):
Don’t assume kill-new does no matching.

5 years agoFix non_local_exit_get signature in Elisp manual
Basil L. Contovounesios [Mon, 25 Mar 2019 17:42:32 +0000 (17:42 +0000)]
Fix non_local_exit_get signature in Elisp manual

* doc/lispref/internals.texi (Module Nonlocal): Fix typo in return
type of non_local_exit_get.

5 years agoExplain messages with patches in CONTRIBUTE
Michael Albinus [Mon, 25 Mar 2019 17:53:07 +0000 (18:53 +0100)]
Explain messages with patches in CONTRIBUTE

* CONTRIBUTE: A message shall contain the string "[PATCH]" in the
subject if there's a patch in the message.

5 years agoSupport ./configure --with-gif=ifavailable etc.
Paul Eggert [Mon, 25 Mar 2019 17:46:04 +0000 (10:46 -0700)]
Support ./configure --with-gif=ifavailable etc.

Suggested by Stefan Monnier in:
https://lists.gnu.org/r/emacs-devel/2019-03/msg00789.html
* INSTALL, etc/NEWS: Document this.
* configure.ac: Implement this.

5 years ago* lisp/vc/diff-mode.el: Better handle empty lines in context diffs
Stefan Monnier [Mon, 25 Mar 2019 17:20:17 +0000 (13:20 -0400)]
* lisp/vc/diff-mode.el: Better handle empty lines in context diffs

(diff-end-of-hunk): Obey diff-valid-unified-empty-line for context style.
(diff--refine-hunk): Don't look further than the end.

5 years agoFix some integer issues in regex-emacs
Paul Eggert [Mon, 25 Mar 2019 15:47:57 +0000 (08:47 -0700)]
Fix some integer issues in regex-emacs

Also, remove some duplicate comments related to thread.h.
* src/regex-emacs.h (struct re_registers):
* src/regex-emacs.c (SIGN_EXTEND_CHAR): Remove.
(TALLOC, RETALLOC): Remove.  All uses replaced by usual
allocators, which check for integer overflow.
(extract_number): Redo without using ‘unsigned’.
(CHARSET_RANGE_TABLE_EXISTS_P): Clearly return a boolean.
(print_fastmap, print_partial_compiled_pattern, CHECK_INFINITE_LOOP)
(regex_compile, analyze_first, bcmp_translate, mutually_exclusive_p)
(re_match_2_internal):
Use bool for booleans.
(print_fastmap, regex_compile, execute_charset):
Prefer int to unsigned where either will do.
(print_double_string): Prefer ptrdiff_t to ssize_t, since the
latter can in theory be narrower than the former.  Use fwrite
instead of repeated putchar.
(emacs_re_max_failures, fail_stack_type, compile_stack_type)
(re_wctype_parse, regex_compile, re_search, re_search_2)
(re_match_2, re_match_2_internal, re_compile_pattern):
Prefer ptrdiff_t to size_t where either will do.
(union fail_stack_elt, PUSH_FAILURE_REG, POP_FAILURE_REG_OR_COUNT):
Make the integer an intptr_t, not long.
(GET_BUFFER_SPACE, EXTEND_BUFFER, regex_compile):
Use xpalloc to simplify allocation.
(regex_compile): Check for integer overflow when calculating
register numbers.
* src/regex-emacs.c (re_set_registers, re_match_2_internal):
* src/regex-emacs.h (struct re_registers, struct re_pattern_buffer):
* src/search.c (Freplace_match):
Prefer ptrdiff_t to unsigned where either will do.
* src/regex-emacs.h (struct re_pattern_buffer):
Prefer bool_bf to unsigned where either will do.

5 years ago* src/regex-emacs.c (regex_compile): Fix comments.
Paul Eggert [Mon, 25 Mar 2019 15:47:57 +0000 (08:47 -0700)]
* src/regex-emacs.c (regex_compile): Fix comments.

5 years agoAvoid occasional confusion of Flymake C/C++ backend
João Távora [Mon, 25 Mar 2019 14:50:20 +0000 (14:50 +0000)]
Avoid occasional confusion of Flymake C/C++ backend

The regexp would sometimes match non-errors and create a diagnostic
with nil severity, which would have consequences for the Flymake
engine (these should eventually be addressed, too).

* lisp/progmodes/flymake-cc.el (flymake-cc--make-diagnostics):
Tighten regexp.

5 years agoMake bundled Flymake C backend work for C++, too
João Távora [Mon, 25 Mar 2019 14:38:25 +0000 (14:38 +0000)]
Make bundled Flymake C backend work for C++, too

* lisp/progmodes/flymake-cc.el (flymake-cc-use-special-make-target):
Pass -x flag according to major-mode.

5 years agoi18n: Add function ngettext for pluralization.
Juri Linkov [Sun, 24 Mar 2019 21:55:07 +0000 (23:55 +0200)]
i18n: Add function ngettext for pluralization.

* lisp/international/mule-cmds.el (ngettext): New function.
https://lists.gnu.org/archive/html/emacs-devel/2019-03/msg00586.html

* lisp/replace.el (flush-lines, how-many, occur-1, occur-engine)
(perform-replace): Use ngettext.

* lisp/progmodes/grep.el (grep-exit-message): Use ngettext.
(grep-mode-font-lock-keywords): Match both singular and plural form
of "matches".

5 years ago* lisp/progmodes/xref.el (xref--show-xrefs): Push mark. (Bug#34908)
Juri Linkov [Sun, 24 Mar 2019 21:19:55 +0000 (23:19 +0200)]
* lisp/progmodes/xref.el (xref--show-xrefs): Push mark.  (Bug#34908)

5 years agoFix Gnus duplicate article unsuppression
Basil L. Contovounesios [Sun, 24 Mar 2019 14:12:58 +0000 (14:12 +0000)]
Fix Gnus duplicate article unsuppression

* lisp/gnus/gnus-sum.el (gnus-summary-mode-group): Declare before
first use to silence byte-compiler.
(gnus-summary-select-article): Simplify boolean expression.
(gnus-summary-move-article): Do not try to unsuppress article when
duplicate suppression is disabled. (bug#34973, bug#34974)

5 years ago* src/lisp.h (primary_thread): Remove unused decl.
Paul Eggert [Sun, 24 Mar 2019 15:25:51 +0000 (08:25 -0700)]
* src/lisp.h (primary_thread): Remove unused decl.

5 years agoBind `enable-local-variables' in `hack-connection-local-variables'
Michael Albinus [Sun, 24 Mar 2019 13:24:31 +0000 (14:24 +0100)]
Bind `enable-local-variables' in `hack-connection-local-variables'

* lisp/files-x.el (hack-connection-local-variables):
Bind `enable-local-variables', instead of re-declaring
`safe-local-variable-p'.

5 years ago* src/Makefile.in ($(AM_V_GEN)POSIXLY_CORRECT): Use AM_V_GEN.
Eli Zaretskii [Sat, 23 Mar 2019 09:47:49 +0000 (11:47 +0200)]
* src/Makefile.in ($(AM_V_GEN)POSIXLY_CORRECT): Use AM_V_GEN.

5 years agoFix Bug#34943
Michael Albinus [Sat, 23 Mar 2019 08:55:04 +0000 (09:55 +0100)]
Fix Bug#34943

* lisp/files-x.el (cl-lib): Require when compiling.
(hack-connection-local-variables): Regard connection-local
variables as safe.  (Bug#34943)

* lisp/shell.el (shell): Use `with-connection-local-variables' for
the whole code block.  (Bug#34943)

* lisp/net/tramp-adb.el (tramp-connection-local-safe-shell-file-names):
Do not set values.

* lisp/net/tramp-integration.el
(tramp-connection-local-safe-shell-file-names): Remove.
(shell-file-name, shell-command-switch): Do not add safe-local-variable
property.

* lisp/net/tramp.el (tramp-handle-shell-command): Use proper
buffer name.

* test/lisp/net/tramp-tests.el (tramp-test34-explicit-shell-file-name):
Tag it :unstable.

5 years agoAvoid compiler warning in w32proc.c
Eli Zaretskii [Sat, 23 Mar 2019 08:31:06 +0000 (10:31 +0200)]
Avoid compiler warning in w32proc.c

* src/w32proc.c (w32_executable_type): Avoid compiler warnings
about potential NULL pointer dereferencing.

5 years ago* lisp/progmodes/sql.el Bug#25424
Michael R. Mauger [Sat, 23 Mar 2019 02:28:01 +0000 (22:28 -0400)]
* lisp/progmodes/sql.el Bug#25424
(sql-end-of-statement): default terminator as semicolon.

5 years agoFix bug in delete-indentation when region is inactive
Stephen Leake [Fri, 22 Mar 2019 23:14:50 +0000 (16:14 -0700)]
Fix bug in delete-indentation when region is inactive

* test/lisp/simple-tests.el: Add tests for delete-indentation.
(simple-delete-indentation-no-region): Works with no region.
(simple-delete-indentation-inactive-region): Was broken with inactive
region; now fixed.

* lisp/simple.el (delete-indentation): Check (use-region-p) before using BEG.

5 years agoChange Gnus hash tables into real hash tables
Eric Abrahamsen [Thu, 26 Apr 2018 23:26:27 +0000 (16:26 -0700)]
Change Gnus hash tables into real hash tables

Gnus has used obarrays as makeshift hash tables for groups: group
names are coerced to unibyte and interned in custom obarrays, and
their symbol-value set to whatever value needs to be stored. This
patch replaces those obarrays with actual hash tables.

* lisp/gnus/gnus-util.el (gnus-intern-safe, gnus-create-hash-size):
  Remove functions.
  (gnus-make-hashtable): Change to return a real hash table.
  (gnus-text-property-search): Utility similar to `text-property-any',
  but compares on `equal'. Needed because the 'gnus-group text
  property is now a string.
* lisp/gnus/gnus.el (gnus-gethash, gnus-gethash-safe, gnus-sethash):
  Remove macros.
  (gnus-group-list): New variable holding all group names as an
  ordered list. Used because `gnus-newsrc-hashtb' used to preserve
  `gnus-newsrc-alist' ordering, but now doesn't.
* lisp/gnus/nnmaildir.el (nnmaildir--servers): Change from obarray to
  alist.
  (nnmaildir--up2-1): Remove function.
* lisp/thingatpt.el (thing-at-point-newsgroup-p): This was making use
  of Gnus obarrays, replace with a cond that can handle many different
  possibilities.
* lisp/gnus/gnus-bcklg.el (gnus-backlog-articles): Remove
  gnus-backlog-hashtb, which wasn't doing anything. Just keep a list
  of ident strings in gnus-backlog-articles.
  (gnus-backlog-setup): Delete unnecessary function.
  (gnus-backlog-enter-article, gnus-backlog-remove-oldest-article,
  gnus-backlog-remove-article, gnus-backlog-request-article): Alter
  calls accordingly.
* lisp/gnus/gnus-dup.el (gnus-duplicate-list-max-length): Rename from
  `gnus-duplicate-list-length', for accuracy.
* lisp/gnus/gnus-start.el (gnus-active-to-gnus-format,
  gnus-groups-to-gnus-format, gnus-newsrc-to-gnus-format): Read group
  names as strings.
  (gnus-gnus-to-quick-newsrc-format): Write `gnus-newsrc-alist' using
  the ordering in `gnus-group-list'.
* lisp/gnus/gnus-agent.el:
* lisp/gnus/gnus-async.el:
* lisp/gnus/gnus-cache.el:
* lisp/gnus/gnus-group.el:
* lisp/gnus/gnus-score.el:
* lisp/gnus/gnus-sum.el:
* lisp/gnus/gnus-topic.el:
* lisp/gnus/message.el:
* lisp/gnus/mml.el:
* lisp/gnus/nnagent.el:
* lisp/gnus/nnbabyl.el:
* lisp/gnus/nnvirtual.el:
* lisp/gnus/nnweb.el: In all files, change obarrays to hash-tables,
  and swap `gnus-sethash' for `puthash', `gnus-gethash' for `gethash',
  `mapatoms' for `maphash', etc.
* test/lisp/gnus/gnus-test-headers.el (gnus-headers-make-dependency-table,
  gnus-headers-loop-dependencies): New tests to make sure we're
  building `gnus-newsgroup-dependencies' correctly.

5 years agoFix Bug#24394, Bug#34172
Michael Albinus [Fri, 22 Mar 2019 13:38:06 +0000 (14:38 +0100)]
Fix Bug#24394, Bug#34172

* lisp/subr.el (process-file-shell-command):
Use `with-connection-local-variables'.  Do not set "/bin/sh" for
remote buffers, trust settings of `shell-file-name'.

* lisp/net/tramp-adb.el (tramp-methods) <adb>:
* lisp/net/tramp-smb.el (tramp-methods) <smb>:
Remove `tramp-remote-shell' and `tramp-remote-shell-args'.

* lisp/net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch)
(tramp-maybe-open-connection): Use proper read syntax for function
names.

* lisp/net/tramp.el (tramp-handle-shell-command): Do not use shell
file names from `tramp-methods'.
Respect `async-shell-command-buffer'.  (Bug#24394, Bug#34172)
Use `start-file-process-shell-command' and `process-file-shell-command'.

* test/lisp/net/tramp-tests.el (tramp-test32-shell-command):
Let it run partly for tramp-adb.

5 years agoFix the error message when modifying maps in-place (Bug#34941)
Nicolas Petton [Fri, 22 Mar 2019 09:06:42 +0000 (10:06 +0100)]
Fix the error message when modifying maps in-place (Bug#34941)

* lisp/emacs-lisp/map.el (map-not-inplace): Fix the message of the
error.
(map-put!): When signaling map-no-inplace error, output the map that
cannot be updated inplace.

5 years agoMinor fixes for the last change
Eli Zaretskii [Fri, 22 Mar 2019 08:59:11 +0000 (11:59 +0300)]
Minor fixes for the last change

* lisp/simple.el (delete-indentation):
* doc/emacs/indent.texi (Indentation Commands):
* etc/NEWS: Fix last change.  (Bug#34796)

5 years agoIf the region is active, join all the lines it spans
Łukasz Stelmach [Fri, 15 Mar 2019 21:06:16 +0000 (22:06 +0100)]
If the region is active, join all the lines it spans

* lisp/simple.el (delete-indentation): Join lines in the active region.
(Bug#34796)

* doc/misc/org.texi: Describe the arguments of delete-indentation.

* etc/NEWS: Mention region support in delete-indentation.

5 years agoRevert "Revert "Revert "Rely on conservative stack scanning to find "emacs_value...
Eli Zaretskii [Fri, 22 Mar 2019 08:02:46 +0000 (11:02 +0300)]
Revert "Revert "Revert "Rely on conservative stack scanning to find "emacs_value"s"""

This reverts commit 093d3e78d21d3d6c718997368ef4b31f9884401c,
which reverted ee7ad83f20903208404a84b58b7a478b62924570,
which reverted 3eb93c07f7a60ac9ce8a16f10c3afd5a3a31243a.

5 years agoCorrectly handle packages without description in describe-package
Federico Tedin [Wed, 13 Mar 2019 00:34:31 +0000 (21:34 -0300)]
Correctly handle packages without description in describe-package

* lisp/emacs-lisp/package.el (describe-package-1): Do not call insert
  if package description is nil (Bug#34147).

5 years agoMake edebug-eval-expression support code completion
Federico Tedin [Tue, 12 Mar 2019 23:06:49 +0000 (20:06 -0300)]
Make edebug-eval-expression support code completion

* lisp/emacs-lisp/edebug.el (edebug-eval-expression): Use
  read--expression instead of read-from-minibuffer. (Bug#34065)

5 years agoFix misuses of NULL when talking about the NUL character
Stefan Monnier [Fri, 22 Mar 2019 03:55:28 +0000 (23:55 -0400)]
Fix misuses of NULL when talking about the NUL character

* lisp/subr.el (inhibit-null-byte-detection): Make it an obsolete alias.

* src/coding.c (setup_coding_system): Use new name.
(detect_coding): Rename null_byte_found => nul_byte_found.
(detect_coding_system): Use new name.
Rename null_byte_found => nul_byte_found.
(Fdefine_coding_system_internal): Use new name.
(syms_of_coding): Rename inhibit-null-byte-detection to
inhibit-nul-byte-detection.
* src/w16select.c (get_clipboard_data): null_char => nul_char.
* src/json.c (check_string_without_embedded_nuls): Rename from
check_string_without_embedded_nulls.
(Fjson_parse_string): Adjust accordingly.
* src/coding.h (enum define_coding_undecided_arg_index)
(enum coding_attr_index): ...null_byte... => ...nul_byte....
* lisp/info.el (info-insert-file-contents, Info-insert-dir):
* lisp/international/mule.el (define-coding-system):
* lisp/vc/vc-git.el (vc-git--call):
* doc/lispref/nonascii.texi (Lisp and Coding Systems): Use the new name.

5 years ago; Eval overlooked lambda in recent Eshell changes
Basil L. Contovounesios [Thu, 21 Mar 2019 21:50:12 +0000 (21:50 +0000)]
; Eval overlooked lambda in recent Eshell changes

* lisp/eshell/em-dirs.el (eshell-dirs-initialize): Reveal lambda
overlooked in 2019-03-20T12:51:31-04:00!monnier@iro.umontreal.ca.

5 years ago* etc/NEWS: Document seq-contains-p.
Nicolas Petton [Thu, 21 Mar 2019 20:10:15 +0000 (21:10 +0100)]
* etc/NEWS: Document seq-contains-p.

5 years ago* lisp/emacs-lisp/seq.el (seq-difference): Inverse a conditional for clarity.
Nicolas Petton [Thu, 21 Mar 2019 20:07:55 +0000 (21:07 +0100)]
* lisp/emacs-lisp/seq.el (seq-difference): Inverse a conditional for clarity.

5 years agoNew seq-contains-p predicate (Bug#34852)
Nicolas Petton [Wed, 20 Mar 2019 20:44:01 +0000 (21:44 +0100)]
New seq-contains-p predicate (Bug#34852)

* lisp/emacs-lisp/seq.el (seq-contains-p): New predicate function.  It
is a replacement for seq-contains which cannot be used as a predicate
when a sequence contains nil values as it returns the element found.
(seq-contains): Make obsolete.

* test/lisp/emacs-lisp/seq-tests.el (test-seq-contains-p):
(test-seq-intersection-with-nil, test-seq-set-equal-p-with-nil,
test-difference-with-nil): Add regression tests.

* doc/lispref/sequences.texi (Sequence Functions): Document
seq-contains-p.

5 years agoRevert "Revert "Rely on conservative stack scanning to find "emacs_value"s""
Eli Zaretskii [Thu, 21 Mar 2019 19:29:52 +0000 (21:29 +0200)]
Revert "Revert "Rely on conservative stack scanning to find "emacs_value"s""

This reverts commit ee7ad83f20903208404a84b58b7a478b62924570.

There was no consensus on reverting
3eb93c07f7a60ac9ce8a16f10c3afd5a3a31243a, so doing that will have to
wait until the discussion ends.

5 years agoRevert "Rely on conservative stack scanning to find "emacs_value"s"
Philipp Stephani [Fri, 21 Sep 2018 17:28:08 +0000 (19:28 +0200)]
Revert "Rely on conservative stack scanning to find "emacs_value"s"

This reverts commit 3eb93c07f7a60ac9ce8a16f10c3afd5a3a31243a.

There was no consensus for that commit, see
https://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00150.html.
Also, reverting this commit should fix Bug#31238.

5 years agoAvoid duplicate entries in process-environment after re-dumping
Eli Zaretskii [Thu, 21 Mar 2019 15:55:16 +0000 (17:55 +0200)]
Avoid duplicate entries in process-environment after re-dumping

* src/pdumper.c (Fdump_emacs_portable): Reset
process-environment to nil.  (Bug#34936)

5 years ago* doc: Recommend putting '-' as last char in Emacs charset regexps
Stefan Monnier [Thu, 21 Mar 2019 12:27:39 +0000 (08:27 -0400)]
* doc: Recommend putting '-' as last char in Emacs charset regexps

* doc/lispref/searching.texi (Regexp Special):
* doc/emacs/search.texi (Regexps): Recommend - as last char in [...].

5 years agoMerge from origin/emacs-26
Glenn Morris [Wed, 20 Mar 2019 20:47:07 +0000 (13:47 -0700)]
Merge from origin/emacs-26

24b6e6e (origin/emacs-26) * etc/AUTHORS: Update.
2f22a17 * ; ChangeLog.3 update
0f523de Improve indexing of the user manual
bd5795e Fix url-copy-file arglist
eaa188a ; * admin/notes/bugtracker: Minor additions and updates.
5ed05fb Fix downloading updates for packages with non-ASCII descriptions
e9f2d1f * etc/NEWS: Remove temporary markers.
24fc133 * doc/misc/cc-mode.texi (Config Basics): in @itemize, @asis -...
0f325d1 Don't clobber 'comint-input-autoexpand' in 'read-shell-command'
bc75589 Document restrictions when setting window margins, fringes or...
cc4cebf More improvements for 'read-buffer's doc string
d026d9a * lisp/progmodes/cc-defs.el: Update c-version to 5.33.2 for E...
5dbf08b * src/minibuf.c (Fread_buffer): Minor doc fixes.  (Bug#34749)

# Conflicts:
# etc/NEWS
# lisp/url/url-handlers.el

5 years agoEshell: Mostly cosmetic changes to be more explicit about dynbind
Stefan Monnier [Wed, 20 Mar 2019 16:51:31 +0000 (12:51 -0400)]
Eshell: Mostly cosmetic changes to be more explicit about dynbind

* lisp/eshell/em-dirs.el (eshell-dirs-initialize): Reveal the lambdas.
(eshell-expand-multiple-dots): Fix ^+$ => \`+\' in the regexp.

* lisp/eshell/esh-cmd.el (eshell-this-command-hook): Declare as
dynamically scoped.
(eshell-trap-errors): Use `mapc funcall` since this can't have
global/local settings like a true hook.
(eshell-do-eval): Split the `let` case from the rest so we can use
`cl-progv` rather than `eval` for it.
(eshell/which): Use `fboundp` test instead of ugly
gymnastics to try and hide the function call from the compiler.

* lisp/eshell/esh-var.el (eshell-variable-aliases-list): Reveal the lambdas.
(eshell-parse-variable-ref): Use backquotes.

5 years ago* etc/AUTHORS: Update.
Nicolas Petton [Wed, 20 Mar 2019 16:36:29 +0000 (17:36 +0100)]
* etc/AUTHORS: Update.

5 years ago* ; ChangeLog.3 update
Nicolas Petton [Wed, 20 Mar 2019 16:35:43 +0000 (17:35 +0100)]
* ; ChangeLog.3 update

5 years ago* lisp/pcomplete.el: Improve heuristic to rely less on c-t-subvert.
Stefan Monnier [Wed, 20 Mar 2019 16:30:53 +0000 (12:30 -0400)]
* lisp/pcomplete.el: Improve heuristic to rely less on c-t-subvert.

(pcomplete-completions-at-point): Try and take \ escapes into account
when guessing the beginning of the text we're completing.

5 years agoFix pcomplete typo in recent regex typo fix
Paul Eggert [Wed, 20 Mar 2019 16:23:05 +0000 (09:23 -0700)]
Fix pcomplete typo in recent regex typo fix

Problem reported by Stefan Monnier in:
https://lists.gnu.org/r/emacs-devel/2019-03/msg00682.html
* lisp/pcomplete.el (pcomplete-parse-comint-arguments):
Restore the trailing backslash (but two of them this time).

5 years ago* test/lisp/minibuffer-tests.el (completion-table-subvert-test): New test
Stefan Monnier [Wed, 20 Mar 2019 14:52:30 +0000 (10:52 -0400)]
* test/lisp/minibuffer-tests.el (completion-table-subvert-test): New test

5 years ago* lisp/minibuffer.el (completion-table-subvert): Fix typo from rev 5697ca55cb
Stefan Monnier [Wed, 20 Mar 2019 13:58:28 +0000 (09:58 -0400)]
* lisp/minibuffer.el (completion-table-subvert): Fix typo from rev 5697ca55cb

5 years agoRepair eshell-query-kill-processes
Mattias Engdegård [Wed, 20 Mar 2019 09:37:36 +0000 (10:37 +0100)]
Repair eshell-query-kill-processes

* lisp/eshell/esh-proc.el (eshell-query-kill-processes):
Remove invalid `format-message' call; `eshell-round-robin-kill' wants
just the format string.

5 years agoImprove indexing of the user manual
Eli Zaretskii [Wed, 20 Mar 2019 09:29:04 +0000 (11:29 +0200)]
Improve indexing of the user manual

* doc/emacs/search.texi (Word Search): Improve indexing of
"M-s M-w".

5 years agoFix defining keyboard macros in CUA mode
Eli Zaretskii [Wed, 20 Mar 2019 09:21:54 +0000 (11:21 +0200)]
Fix defining keyboard macros in CUA mode

* lisp/emulation/cua-base.el (cua--prefix-override-replay):
Push the key to replace wrapped in '(no-record . KEY)', so
that it doesn't get recorded more than once.  (Bug#34901)

* src/keyboard.c (read_char): Handle the '(no-record . KEY)'
event by substituting KEY for it.
(syms_of_keyboard) <no-record>: New DEFSYM.
<unread-command-events>: Update the doc string.

* doc/lispref/commands.texi (Event Input Misc): Document the
'(no-record . EVENT)' form.

5 years ago* lisp/eshell/em-cmpl.el: Use completion-at-point i.s.o pcomplete
Stefan Monnier [Wed, 20 Mar 2019 03:41:20 +0000 (23:41 -0400)]
* lisp/eshell/em-cmpl.el: Use completion-at-point i.s.o pcomplete

(eshell-cmpl-initialize): Refrain from binding to the `tab` key,
which prevents the tab -> TAB remapping.
Use completion-at-point and completion-help-at-point.
(eshell-complete-commands-list): Use `fboundp` test instead of ugly
gymnastics to try and hide the function call from the compiler.
(eshell-pcomplete): Make it an alias of completion-at-point.

* doc/misc/eshell.texi (Completion): Change wording to reflect
different default behavior.

5 years agoMore minor regex cleanup
Paul Eggert [Wed, 20 Mar 2019 01:45:17 +0000 (18:45 -0700)]
More minor regex cleanup

Problems reported by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2019-03/msg00643.html
plus a few others that I noticed.
* lisp/auth-source-pass.el (auth-source-pass--parse-data):
* lisp/org/org-datetree.el (org-datetree--find-create):
* lisp/org/org-pcomplete.el (org-thing-at-point):
* lisp/progmodes/js.el (js--end-of-do-while-loop-p):
* lisp/textmodes/sgml-mode.el:
(sgml-electric-tag-pair-before-change-function):
* lisp/textmodes/texnfo-upd.el (texinfo-menu-copy-old-description):
* lisp/url/url-http.el (url-http-parse-response):
Fix regular expression and similar syntax.

5 years ago* lisp/vc/vc.el (vc-diff-build-argument-list-internal): Add arg fileset.
Juri Linkov [Tue, 19 Mar 2019 21:52:33 +0000 (23:52 +0200)]
* lisp/vc/vc.el (vc-diff-build-argument-list-internal): Add arg fileset.

(vc-root-version-diff): Set vc-diff-build-argument-list-internal's
optional arg 'fileset' to the root directory.  (Bug#34532)

5 years ago* lisp/frame.el (frame-monitor-attributes): Fall back to the last monitor
Juri Linkov [Tue, 19 Mar 2019 21:43:18 +0000 (23:43 +0200)]
* lisp/frame.el (frame-monitor-attributes): Fall back to the last monitor

when frames monitor attributes is still uninitialized.  (Bug#34680)

5 years ago* lisp/frame.el (make-frame-on-monitor): Don't set height and width.
Juri Linkov [Tue, 19 Mar 2019 21:32:48 +0000 (23:32 +0200)]
* lisp/frame.el (make-frame-on-monitor): Don't set height and width.

Don't use x-parse-geometry.  Delete nil from completions (Bug#34516)

5 years agoUse ‘const’ to clarify GC marking
Paul Eggert [Tue, 19 Mar 2019 19:37:13 +0000 (12:37 -0700)]
Use ‘const’ to clarify GC marking

Add ‘const’ to make the GC marking code a bit clearer.
This can also help the compiler in some cases, I think because
GCC can now determine more often that the value of a static C
variable can be cached when its address is now converted to
‘Lisp Object const *’ before escaping.
* src/alloc.c (staticvec, mark_maybe_objects, mark_memory)
(mark_stack, staticpro, mark_object_root_visitor)
(garbage_collect_1):
* src/pdumper.c (dump_ptr_referrer, dump_emacs_reloc_to_lv)
(dump_emacs_reloc_to_emacs_ptr_raw, dump_root_visitor):
* src/lisp.h (vcopy, struct gc_root_visitor):
* src/sysdep.c (stack_overflow):
* src/thread.c (mark_one_thread):
* src/thread.h (struct thread_state):
Use pointer-to-const instead of plain pointer in some
GC-related places where either will do.

5 years agoDisallow reversed char ranges in `rx'
Mattias Engdegård [Tue, 12 Mar 2019 13:39:47 +0000 (14:39 +0100)]
Disallow reversed char ranges in `rx'

(any "a-Z0-9") generated "[0-9]", and (any (?9 . ?0)) generated "[9-0]".
Reversed ranges are either mistakes or abuse.  Neither should be allowed.

etc/NEWS: Explain the change.
lisp/emacs-lisp/rx.el (rx): Document.
(rx-check-any-string, rx-check-any): Add error checks for reversed ranges.
test/lisp/emacs-lisp/rx-tests.el (rx-char-any-range-bad): New test.

5 years agoFix url-copy-file arglist
Basil L. Contovounesios [Tue, 19 Mar 2019 16:00:18 +0000 (16:00 +0000)]
Fix url-copy-file arglist

* lisp/url/url-handlers.el: Silence byte-compiler.
(url-copy-file): Add 6th argument following change to copy-file in
2012-12-16T19:22:27+01:00!romain@orebokech.com. (bug#4410)

5 years ago; * admin/notes/bugtracker: Minor additions and updates.
Eli Zaretskii [Tue, 19 Mar 2019 12:26:14 +0000 (14:26 +0200)]
; * admin/notes/bugtracker: Minor additions and updates.

5 years agoFix downloading updates for packages with non-ASCII descriptions
Eli Zaretskii [Tue, 19 Mar 2019 11:16:50 +0000 (13:16 +0200)]
Fix downloading updates for packages with non-ASCII descriptions

* lisp/emacs-lisp/package.el (package--download-one-archive):
Make sure archive contents are written using UTF-8 encoding.
(Bug#34909)
(list-packages): Set buffer's encoding to UTF-8.

5 years agoRemove buggy regexp use in comint-output-filter
Paul Eggert [Tue, 19 Mar 2019 00:44:21 +0000 (17:44 -0700)]
Remove buggy regexp use in comint-output-filter

This reverts commit 2012-07-02T16:18:02!monnier@iro.umontreal.ca
which perhaps could be rethought and recommitted, and perhaps
it’s no longer needed now that comint-use-prompt-regexp
is almost always nil.
* lisp/comint.el (comint-output-filter): Don’t try to skip
repeated prompts, since comint-prompt-regexp typically begins
with "^" and the resulting "^^" in the regular expression does
not have the desired effect.  Noted by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2019-03/msg00380.html

5 years agoFix more regular expression typos
Paul Eggert [Tue, 19 Mar 2019 00:02:01 +0000 (17:02 -0700)]
Fix more regular expression typos

Problem reported by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2019-03/msg00548.html
except that I didn’t address the issues involving Hebrew,
or involving comint-prompt-regexp.
* lisp/align.el (align-rules-list, align-exclude-rules-list):
* lisp/auth-source-pass.el (auth-source-pass--parse-secret)
(auth-source-pass--parse-data):
* lisp/cedet/data-debug.el (data-debug-next)
(data-debug-prev, data-debug-expand-or-contract):
* lisp/comint.el (comint-within-quotes):
* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
* lisp/emulation/viper-ex.el (ex-cmd-complete):
* lisp/gnus/gnus-cite.el (gnus-message-search-citation-line):
* lisp/gnus/nnir.el (nnir-imap-end-of-input):
* lisp/mail/mail-extr.el (mail-extr-all-letters):
* lisp/minibuffer.el (minibuffer-maybe-quote-filename):
* lisp/nxml/rng-nxml.el (rng-complete-tag)
(rng-complete-end-tag, rng-complete-attribute-name):
* lisp/obsolete/vip.el (vip-get-ex-token, vip-get-ex-pat):
* lisp/org/org-pcomplete.el (org-thing-at-point):
* lisp/org/org.el (org-set-tags)
(org-increase-number-at-point)
(org-fill-line-break-nobreak-p):
* lisp/pcomplete.el (pcomplete-parse-comint-arguments):
* lisp/progmodes/ada-mode.el (ada-compile-goto-error):
* lisp/progmodes/cperl-mode.el (cperl-highlight-charclass)
(cperl-find-pods-heres, cperl-not-bad-style-regexp)
(cperl-regext-to-level-start):
* lisp/progmodes/ebnf-yac.el (ebnf-yac-skip-spaces):
* lisp/progmodes/flymake-proc.el (flymake-proc-master-tex-init):
* lisp/progmodes/flymake.el (flymake-diag-region):
* lisp/progmodes/fortran.el (fortran-current-line-indentation):
* lisp/progmodes/idlw-complete-structtag.el:
(idlwave-complete-structure-tag):
* lisp/progmodes/idlwave.el (idlwave-complete-sysvar-or-tag):
* lisp/progmodes/prolog.el (prolog-pred-end)
(prolog-clause-info):
* lisp/progmodes/ruby-mode.el (ruby-forward-sexp)
(ruby-backward-sexp):
* lisp/progmodes/verilog-mode.el (verilog-repair-open-comma):
* lisp/term.el (term-within-quotes):
* lisp/textmodes/bib-mode.el (bib-capitalize-title-stop-words):
* lisp/textmodes/refbib.el (r2b-capitalize-title-stop-words):
* lisp/textmodes/reftex-parse.el (reftex-nth-arg):
* lisp/textmodes/rst.el (rst-svn-rev):
* lisp/url/url-http.el (url-http-parse-response):
* test/lisp/progmodes/f90-tests.el (f90-test-bug3730):
Fix regular expression typos.

5 years ago* etc/NEWS: Remove temporary markers.
Nicolas Petton [Mon, 18 Mar 2019 21:49:50 +0000 (22:49 +0100)]
* etc/NEWS: Remove temporary markers.

5 years ago* src/fileio.c: Don't convert \r to \n just because of C-x $
Stefan Monnier [Mon, 18 Mar 2019 18:57:10 +0000 (14:57 -0400)]
* src/fileio.c: Don't convert \r to \n just because of C-x $

(choose_write_coding_system): Setup the \r to \n conversion only if
selective-display is t.

5 years ago* lisp/locate.el (locate-mode): Setup invisibility for Dired commands
Stefan Monnier [Mon, 18 Mar 2019 18:25:49 +0000 (14:25 -0400)]
* lisp/locate.el (locate-mode): Setup invisibility for Dired commands

Also, use lexical-binding.

5 years agoEbrowse: Use invisibility-spec instead of selective-display
Stefan Monnier [Mon, 18 Mar 2019 12:09:42 +0000 (08:09 -0400)]
Ebrowse: Use invisibility-spec instead of selective-display

* lisp/progmodes/ebrowse.el: Use lexical-binding.
(ebrowse-tree-mode): Set invisibility-spec instead of selective-display.
(ebrowse--hidden-p, ebrowse--hide, ebrowse--unhide): New functions.
(ebrowse-expand-all, ebrowse-unhide-base-classes, ebrowse-hide-line)
(ebrowse-mouse-1-in-tree-buffer): Use them.
(ebrowse-output): Remove macro, use with-silent-modifications instead.
(ebrowse-save-selective): Remove macro, not needed any more.
(ebrowse-trim-string, ebrowse-read, ebrowse-collapse-fn):
No need to pay attention to \r.
(ebrowse-files-list): Use push.
(ebrowse-view/find-file-and-search-pattern): Use add-hook here...
(ebrowse-find-pattern): ...and remove-hook here.
(ebrowse-view/find-position): Use add/remove-hook.

5 years agoDired: Use invisibility-spec instead of selective-display
Stefan Monnier [Sun, 17 Mar 2019 17:35:20 +0000 (13:35 -0400)]
Dired: Use invisibility-spec instead of selective-display

* lisp/dired.el (dired-subdir-regexp): No need to pay attention to \r.
(dired-remember-hidden): Use pcase-dolist and dired--hidden-p.
(dired-mode): Set invisibility-spec instead of selective-display.
(dired--hidden-p, dired--hide, dired--unhide, dired--find-hidden-pos):
New functions.
(dired-move-to-end-of-filename): Use dired--hidden-p.
(dired-next-subdir): No need to pay attention to \r.
(dired-fun-in-all-buffers): Use push.

* lisp/dired-aux.el (dired-unhide-subdir, dired-hide-subdir, dired-hide-all):
Use the new functions and with-silent-modifications.
(dired-add-entry): Use dired--hidden-p.
(dired-goto-subdir): No need to pay attention to \r.
(dired-hide-check): Remove.
(dired-subdir-hidden-p): Use dired--hidden-p.
(dired-do-find-regexp): Use file-name-as-directory.

5 years ago* doc/lispref/display.texi (Selective Display): Declare it deprecated
Stefan Monnier [Sun, 17 Mar 2019 16:16:59 +0000 (12:16 -0400)]
* doc/lispref/display.texi (Selective Display): Declare it deprecated

5 years agoFix 'define-charset' after dumping with pdumper
Eli Zaretskii [Sun, 17 Mar 2019 15:49:37 +0000 (17:49 +0200)]
Fix 'define-charset' after dumping with pdumper

* src/charset.h:
* src/charset.c (charset_table_used): Now static.
(charset_table_size): Now extern.
* src/pdumper.c (dump_charset_table): Dump the entire
charset_table, not just its used slots.  (Bug#34826)

5 years ago* lisp/subr.el (combine-change-calls-1): Don't combine syntax-ppss flushes
Stefan Monnier [Sun, 17 Mar 2019 00:11:45 +0000 (20:11 -0400)]
* lisp/subr.el (combine-change-calls-1): Don't combine syntax-ppss flushes

5 years agoDefine macros to abstract support for external menu/tool-bars
Alexander Gramiak [Sat, 16 Mar 2019 17:46:39 +0000 (11:46 -0600)]
Define macros to abstract support for external menu/tool-bars

* src/lisp.h (HAVE_EXT_MENU_BAR)
(HAVE_EXT_TOOL_BAR): Define.

*src/dispnew.c:
*src/frame.c:
*src/frame.h:
*src/keyboard.c:
*src/menu.c:
*src/menu.h:
*src/window.c:
*src/window.h:
*src/xdisp.c:
*src/xfns: Use the new macros.

5 years agoFix regexp typo in vc-git--program-version
Paul Eggert [Sat, 16 Mar 2019 18:38:36 +0000 (11:38 -0700)]
Fix regexp typo in vc-git--program-version

* lisp/vc/vc-git.el (vc-git--program-version):
Require a period after ".windows", instead of allowing any char.

5 years agoFix some ineffective backslashes in string literals
Mattias Engdegård [Sat, 16 Mar 2019 18:36:38 +0000 (11:36 -0700)]
Fix some ineffective backslashes in string literals

Deal with lone backslashes that have no effect in string literals,
but indicate that something is amiss.

* lisp/auth-source-pass.el (auth-source-pass-entries):
* lisp/textmodes/artist.el (artist-figlet-get-font-list-windows):
* lisp/org/ob-abc.el (org-babel-expand-body:abc, org-babel-execute:abc):
* lisp/org/ob-forth.el (org-babel-forth-session-execute):
* lisp/vc/vc-git.el (vc-git--program-version):
Add backslash in regexp for correctness.

* lisp/gnus/nnmail.el (nnmail-split-abbrev-alist):
Replace `\||' with `\\|' to follow the obvious regexp intent.

* lisp/org/org-list.el (org-plain-list-ordered-item-terminator):
Add backslash in doc comment so that it appears as intended.

* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1, c-end-of-decl-1):
* lisp/progmodes/f90.el (f90-font-lock-keywords-2):
* lisp/progmodes/etags.el (etags-tags-completion-table):
* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize):
* test/lisp/emacs-lisp/cl-print-tests.el (cl-print-tests-1):
Remove superfluous backslashes from regexp.

* test/lisp/emacs-lisp/rx-tests.el (rx-char-any):
Remove superfluous backslash from doc comment.

5 years agoImprove locale and language environment setting at startup
Eli Zaretskii [Sat, 16 Mar 2019 11:59:03 +0000 (13:59 +0200)]
Improve locale and language environment setting at startup

* lisp/international/mule-cmds.el (locale-language-names): Add
more locales and their language environments.
(set-locale-environment): Use w32-multibyte-code-page, if
non-zero, as locale-coding-system.  (Bug#34684)

* src/w32fns.c (globals_of_w32fns) <w32-multibyte-code-page>:
New variable.

* etc/NEWS: Mention w32-multibyte-code-page.