]> git.eshelyaron.com Git - emacs.git/log
emacs.git
5 years agoMake `next-error' output fewer messages about locus
Stephen Leake [Thu, 11 Apr 2019 20:58:36 +0000 (13:58 -0700)]
Make `next-error' output fewer messages about locus

* lisp/simple.el (next-error-verbosity): New user variable.
(next-error, next-error-internal): Use it to control only outputting
locus message if locus changed.

5 years agoRestore process-environment after portable dumping
Eli Zaretskii [Wed, 3 Apr 2019 17:30:23 +0000 (20:30 +0300)]
Restore process-environment after portable dumping

* src/pdumper.c (struct dump_context): New member
old_process_environment.
(Fdump_emacs_portable): Record the original value of
process-environment.
(dump_unwind_cleanup): Restore the original values of
process-environment and post-gc-hook.

5 years agoFix bug in gud-gdb-marker-filter: first marker does not start with \n
Stephen Leake [Wed, 3 Apr 2019 17:25:45 +0000 (10:25 -0700)]
Fix bug in gud-gdb-marker-filter: first marker does not start with \n

5 years agoAvoid using obsolete indent-relative-maybe
Basil L. Contovounesios [Mon, 1 Apr 2019 23:56:04 +0000 (00:56 +0100)]
Avoid using obsolete indent-relative-maybe

* lisp/electric.el (electric-indent-functions-without-reindent):
* lisp/indent.el (indent-according-to-mode): Check for
indent-relative-first-indent-point in addition to its obsolete alias
indent-relative-maybe.
* lisp/obsolete/vi.el (vi-com-map): Use
indent-relative-first-indent-point in place of its obsolete alias
indent-relative-maybe.

5 years ago* lisp/progmodes/compile.el: Use non-nil values for *-function
Stefan Monnier [Wed, 3 Apr 2019 15:24:12 +0000 (11:24 -0400)]
* lisp/progmodes/compile.el: Use non-nil values for *-function

(compilation-parse-errors-filename-function,compilation-exit-message-function)
(compilation-process-setup-function, compilation-buffer-name-function):
Give them non-nil default values.
(compilation-buffer-name): Restructure slightly.
(compilation--default-buffer-name): New function, extracted from it.
Use `name-of-mode` instead of `mode-command` to check if the current
buffer is already in the appropriate mode.

5 years ago* lisp/progmodes/compile.el: Allow 'line' functions in error-regexp-alist
Stefan Monnier [Wed, 3 Apr 2019 14:58:36 +0000 (10:58 -0400)]
* lisp/progmodes/compile.el: Allow 'line' functions in error-regexp-alist

(compilation-error-properties): Allow 'line' and 'end-line' to be functions,
like 'col' and 'end-col'.
(compilation-error-regexp-alist): Document this.
(compilation-parse-errors): Drop support for old undocumented feature
where 'line' was a function of 2 arguments.
(compilation--compat-error-properties): Delete function.

5 years ago; Copyright years and license copyedits
Glenn Morris [Wed, 3 Apr 2019 04:40:56 +0000 (21:40 -0700)]
; Copyright years and license copyedits

5 years agoAllow partial decompression (Bug#33133)
Noam Postavsky [Sat, 27 Oct 2018 21:45:00 +0000 (17:45 -0400)]
Allow partial decompression (Bug#33133)

* src/decompress.c (Fzlib_decompress_region): Add optional
ALLOW-PARTIAL parameter.
* lisp/url/url-http.el (url-handle-content-transfer-encoding): Use it.
* doc/lispref/text.texi (Decompression): Document it.
* etc/NEWS: Announce it.

5 years ago* lisp/gnus/gnus-dup.el: Use lexical-binding
Basil L. Contovounesios [Mon, 25 Mar 2019 20:14:40 +0000 (20:14 +0000)]
* lisp/gnus/gnus-dup.el: Use lexical-binding

(gnus-dup-list-dirty): Add docstring.
(gnus-dup-open): Allocate gnus-dup-hashtb more conservatively now
that it is no longer an obarray.
(gnus-dup-enter-articles): Fix off-by-one error.
(gnus-dup-suppress-articles): DRY.

For discussion, see thread starting at:
https://lists.gnu.org/archive/html/emacs-devel/2019-03/msg00974.html

5 years agoFix verilog-mode vmm statements and AUTOINPUTREG ignores.
Wilson Snyder [Wed, 3 Apr 2019 00:05:16 +0000 (20:05 -0400)]
Fix verilog-mode vmm statements and AUTOINPUTREG ignores.

* lisp/progmodes/verilog-mode.el (verilog-vmm-statement-re):
Fix vmm statement regexps. Reported by Mattias Engdegard.
(verilog-auto-reg-input)
(verilog-auto-reg-input-assigned-ignore-regexp): For AUTOINPUTREG,
allow ignoring assignments with new
`verilog-auto-reg-input-assigned-ignore-regexp' variable, bug1401.
Reported by David Rogoff.

5 years agoImprove regexp advice again, and unchain ranges
Paul Eggert [Tue, 2 Apr 2019 22:00:59 +0000 (15:00 -0700)]
Improve regexp advice again, and unchain ranges

* doc/lispref/searching.texi (Regexp Special):
Mention char classes earlier, in a more-logical place.
Advise sticking to ASCII letters and digits in ranges.
Reword negative advice to make it clearer that it’s negative.
* lisp/files.el (make-auto-save-file-name):
* lisp/gnus/message.el (message-mailer-swallows-blank-line):
* lisp/gnus/nndoc.el (nndoc-lanl-gov-announce-type-p)
(nndoc-generate-lanl-gov-head):
* lisp/org/org-eshell.el (org-eshell-open):
* lisp/org/org.el (org-deadline-time-hour-regexp)
(org-scheduled-time-hour-regexp):
* lisp/progmodes/bat-mode.el (bat-font-lock-keywords):
* lisp/progmodes/bug-reference.el (bug-reference-bug-regexp):
* lisp/textmodes/less-css-mode.el (less-css-font-lock-keywords):
* lisp/vc/vc-cvs.el (vc-cvs-valid-symbolic-tag-name-p):
* lisp/vc/vc-svn.el (vc-svn-valid-symbolic-tag-name-p):
Avoid attempts to chain ranges, as this can be confusing.
For example, instead of [0-9-_.], use [0-9_.-].

5 years agoFix documentation of last change
Eli Zaretskii [Tue, 2 Apr 2019 17:08:08 +0000 (20:08 +0300)]
Fix documentation of last change

* doc/misc/cl.texi (Structures): Document :noinline.

* etc/NEWS: Mark the entry for :noinline as documented.

5 years ago* lisp/emacs-lisp/cl-macs.el: Don't always inline struct functions
Stefan Monnier [Tue, 2 Apr 2019 16:24:52 +0000 (12:24 -0400)]
* lisp/emacs-lisp/cl-macs.el: Don't always inline struct functions

(cl--struct-inline): New var.
(cl-defstruct): Obey it along with a new :noinline keyword argument.

5 years ago* lisp/subr.el (prog2): Define as a macro
Stefan Monnier [Tue, 2 Apr 2019 13:51:20 +0000 (09:51 -0400)]
* lisp/subr.el (prog2): Define as a macro

* src/eval.c (Fprog2): Delete function.
(syms_of_eval): Don't register it.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
* lisp/emacs-lisp/generator.el (cps--transform-1): Remove `prog2` case.

* lisp/emacs-lisp/bytecomp.el (prog2): Remove handlers.
(byte-compile-prog2): Delete.

* lisp/emacs-lisp/lisp-mode.el (prog2): Remove property.

5 years agoSuppress timers in tramp-send-string
Michael Albinus [Tue, 2 Apr 2019 13:17:17 +0000 (15:17 +0200)]
Suppress timers in tramp-send-string

* lisp/net/tramp.el (tramp-send-string): Suppress timers.  Use
`with-local-quit'.

5 years agoGive example for configuration in tramp.texi
Michael Albinus [Tue, 2 Apr 2019 08:48:39 +0000 (10:48 +0200)]
Give example for configuration in tramp.texi

* doc/misc/tramp.texi (Configuration): Explain how to call Tramp
configuration functions in the init file.

5 years agoMore regexp advice and clarifications
Paul Eggert [Tue, 2 Apr 2019 07:17:37 +0000 (00:17 -0700)]
More regexp advice and clarifications

* doc/lispref/searching.texi (Regexp Special): Simplify style
advice for order of ], ^, and - in character alternatives.
Stick with saying that it’s not a good idea to put ‘-’ after a
range.  Remove the special case about raw 8-bit bytes and
unibyte characters, as this documentation is confusing and
seems to be incorrect in some cases.  Say that z-a is the
preferred style for reversed ranges, since it’s clearer and is
typically what’s used in practice.  Mention some bad styles:
duplicates in character alternatives, ranges that denote <=3
characters, and ‘-’ as the first character.

5 years agoMerge from origin/emacs-26
Paul Eggert [Tue, 2 Apr 2019 06:43:57 +0000 (23:43 -0700)]
Merge from origin/emacs-26

0924b27bca Say which regexp ranges should be avoided

# Conflicts:
# doc/lispref/searching.texi

5 years ago; Merge from origin/emacs-26
Paul Eggert [Tue, 2 Apr 2019 06:40:21 +0000 (23:40 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

297a141ca3 ; * lisp/ldefs-boot.el: Update.

5 years agoRefactor Gnus group name extraction in group completing read
Eric Abrahamsen [Sun, 31 Mar 2019 16:18:43 +0000 (09:18 -0700)]
Refactor Gnus group name extraction in group completing read

* lisp/gnus/gnus-group.el (gnus-group-completing-read): Only do the
  unibyte check once; make sure it applies to hash table keys as
  well.

5 years agoMake struct Lisp_Objfwd etc. objects read-only
Paul Eggert [Mon, 1 Apr 2019 18:54:23 +0000 (11:54 -0700)]
Make struct Lisp_Objfwd etc. objects read-only

Initialize these objects statically, and make them constants.
This is a bit safer and more efficient.
* src/data.c (XBOOLFWD, XKBOARD_OBJFWD, XFIXNUMFWD, XOBJFWD):
* src/lisp.h (XBUFFER_OBJFWD):
Return a pointer-to-const instead of an unrestricted pointer.
(lispfwd): fwdptr is now a pointer-to-const instead of an
unrestricted pointer.  All uses changed.
(SET_SYMBOL_FWD): Accept pointer-to-const instead of an
unrestricted pointer.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Initialize static structures statically
instead of dynamically, and make them const.
* src/lread.c (defvar_int, defvar_bool, defvar_lisp_nopro)
(defvar_lisp, defvar_kboard): Accept pointer-to-const instead
of an unrestricted pointer; it’s now the caller’s
responsibility to initialize the pointed-to storage.  No need
for a separate address argument any more.  All callers
changed.

5 years agoFix union Lisp_Fwd * alignment bug
Paul Eggert [Mon, 1 Apr 2019 18:54:23 +0000 (11:54 -0700)]
Fix union Lisp_Fwd * alignment bug

It's not portable to cast (e.g.) struct Lisp_Objfwd * to union
Lisp_Fwd * and then back again, because the compiler can then assume
that the pointer is aligned for union Lisp_Fwd * when accessing
the struct Lisp_Objfwd * components, and this assumption might
be incorrect becase we don't force that alignment.
* src/lisp.h (lispfwd): New type, replacing ...
(union Lisp_Fwd): ... this type, which was removed.
All uses changed.
(SET_SYMBOL_FWD): 2nd arg is now void *, not lispfwd.
All uses changed (casts no longer needed; they were
not portable anyway).

5 years ago* lisp/subr.el (setq-default): Define as a macro
Stefan Monnier [Mon, 1 Apr 2019 16:35:10 +0000 (12:35 -0400)]
* lisp/subr.el (setq-default): Define as a macro

* lisp/emacs-lisp/bytecomp.el (byte-compile-setq-default): Delete.
(byte-compile-set-default): Inline the part that it used.

* lisp/emacs-lisp/edebug.el (setq-default): Remove the debug spec.

* src/data.c (Fsetq_default): Delete.
(syms_of_data): Don't register.

5 years agoFix a typo in xterm.c and w32term.c
Eli Zaretskii [Mon, 1 Apr 2019 14:39:30 +0000 (17:39 +0300)]
Fix a typo in xterm.c and w32term.c

* src/xterm.c (x_window_to_scroll_bar):
* src/w32term.c (x_window_to_scroll_bar): Fix a typo.

5 years ago; Auto-commit of loaddefs files.
Glenn Morris [Mon, 1 Apr 2019 11:37:57 +0000 (07:37 -0400)]
; Auto-commit of loaddefs files.

5 years agoUse update-game-score more often with Tetris
Paul Eggert [Mon, 1 Apr 2019 03:00:30 +0000 (20:00 -0700)]
Use update-game-score more often with Tetris

* lisp/play/gamegrid.el (gamegrid-add-score-with-update-game-score):
Go back to previous way of deciding whether to invoke
update-game-score, except do not try to invoke it if file-modes
fails on it (Bug#35056).

5 years agoDo not set indent-line-function in text-mode
Basil L. Contovounesios [Mon, 25 Mar 2019 23:10:59 +0000 (23:10 +0000)]
Do not set indent-line-function in text-mode

* lisp/textmodes/text-mode.el (text-mode): Do not reset
indent-line-function to its global default value of indent-relative.
* doc/lispref/modes.texi (Example Major Modes):
* etc/NEWS: Document change accordingly.

5 years agoDo not set indent-line-function in text-mode
Basil L. Contovounesios [Sun, 31 Mar 2019 18:39:54 +0000 (19:39 +0100)]
Do not set indent-line-function in text-mode

For discussion, see thread starting at:
https://lists.gnu.org/archive/html/emacs-devel/2019-03/msg01012.html
* lisp/textmodes/text-mode.el (text-mode): Do not reset
indent-line-function to its global default value of indent-relative.
* doc/lispref/modes.texi (Example Major Modes):
* etc/NEWS: Document change accordingly.

5 years agoUse lexical-binding in text-mode.el
Basil L. Contovounesios [Mon, 18 Mar 2019 23:45:55 +0000 (23:45 +0000)]
Use lexical-binding in text-mode.el

* lisp/textmodes/text-mode.el: Use lexical-binding.
(text-mode, paragraph-indent-minor-mode, text-mode-hook-identify):
Use setq-local.
(toggle-text-mode-auto-fill): Quote function symbols as such.
(center-line): Minor simplification.
* doc/lispref/modes.texi (Example Major Modes): Update code example
for these changes to text-mode.

5 years agoUse the correct filename for dump file in NS
Alan Third [Sun, 31 Mar 2019 17:14:31 +0000 (18:14 +0100)]
Use the correct filename for dump file in NS

* nextstep/Makefile.in (all):
(${ns_appbindir}/Emacs.pdmp):
(links): Use mixed case 'Emacs.pdmp' to match the executable name.

5 years agoFix recently extended delete-indentation behavior
Basil L. Contovounesios [Wed, 27 Mar 2019 15:13:25 +0000 (15:13 +0000)]
Fix recently extended delete-indentation behavior

* doc/lispref/text.texi (User-Level Deletion): Document new optional
arguments of delete-indentation.

* lisp/simple.el (delete-indentation): Do not barf if called
interactively when region is inactive. (bug#35021)
Do not skip blank lines. (bug#35036)
Consistently deactivate mark even when no text was changed.
Handle active region spanning a single line.

* test/lisp/simple-tests.el (simple-test--buffer-substrings):
New convenience function.
(simple-test--dummy-buffer, simple-test--transpositions): Use it.
(simple-delete-indentation-no-region)
(simple-delete-indentation-inactive-region): Update commentary.
Call delete-indentation interactively when testing for behavior with
inactive region and region is not explicitly defined.
(simple-delete-indentation-blank-line)
(simple-delete-indentation-boundaries)
(simple-delete-indentation-region)
(simple-delete-indentation-prefix): New tests.

5 years agoCheck gnus-newsgroup-dependencies is hash table in gnus-id-to-thread
Eric Abrahamsen [Sun, 31 Mar 2019 15:36:56 +0000 (08:36 -0700)]
Check gnus-newsgroup-dependencies is hash table in gnus-id-to-thread

* lisp/gnus/gnus-sum.el (gnus-id-to-thread): If dependencies haven't
  been initialized yet, don't blow up. Mimicks previous (non hasht
  table) behavior.

5 years agoFix typo in regexp-opt example code
Mattias Engdegård [Sun, 31 Mar 2019 13:53:52 +0000 (15:53 +0200)]
Fix typo in regexp-opt example code

* doc/lispref/searching.texi (Regexp Functions):
Fix typo in example code (Bug#34596).

5 years agoAllow a CC Mode derived mode to have strings delimited by single quotes.
Alan Mackenzie [Sat, 30 Mar 2019 13:19:47 +0000 (13:19 +0000)]
Allow a CC Mode derived mode to have strings delimited by single quotes.

Also fix the bug where the delimiters of '\033', etc. got the error face.

* lisp/progmodes/cc-langs.el (c-single-quotes-quote-strings): Enhance the docr
string.
(c-string-delims): Change doc string to doc comment.

* listp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings): In
searches and comparisons, take account of the string delimiters possibly
being '.  Fix argument in call of c-before-change-check-unbalanced-strings.
(c-parse-quotes-before-change, c-parse-quotes-after-change): Bind
case-fold-search to nil.  Analyze escape constructs inside character constants
more accurately, in particular accepting as valid more than one character
after /[0-7], /x, /u, and /U.  Amend calculations to account for this extra
length.

5 years agoFix a thinko in a recent commit
Eli Zaretskii [Sat, 30 Mar 2019 11:27:11 +0000 (14:27 +0300)]
Fix a thinko in a recent commit

* src/buffer.c (Fkill_buffer): Fix last change.  (Bug#31138)
Reported by Mattias Engdegård <mattiase@acm.org>.

5 years agoRelease regexp before signalling overflow error
Mattias Engdegård [Tue, 19 Mar 2019 12:47:13 +0000 (13:47 +0100)]
Release regexp before signalling overflow error

* src/search.c (looking_at_1, search_buffer_re): Unfreeze the regexp
buffer before signalling a matcher overflow, since the error
processing may require quite some regexp use as well (Bug#34910).

5 years agoFix spurious regexp reentrancy error
Mattias Engdegård [Tue, 19 Mar 2019 12:06:20 +0000 (13:06 +0100)]
Fix spurious regexp reentrancy error

* src/search.c (compile_pattern): Don't give up if the last regexp
cache entry is busy.  Instead, use the last (least recently used)
non-busy entry, and only signal a reentrancy error if there is no free
entry at all (Bug#34910).

5 years agoDon't run buffer-related hooks in " *code conversion work*" buffers
Eli Zaretskii [Sat, 30 Mar 2019 09:01:58 +0000 (12:01 +0300)]
Don't run buffer-related hooks in " *code conversion work*" buffers

Note: portions of this change were mistakenly pushed as part
of an unrelated commit a35a1f6a9.

* src/buffer.c (Fget_buffer_create): Set inhibit_buffer_hooks
non-zero for temporary buffers created by coding.c.  Don't run
buffer-list-update-hook for such buffers.
(Frename_buffer, Fkill_buffer, record_buffer)
(Fbury_buffer_internal): Don't run hooks for buffers whose
inhibit_buffer_hooks flag is set.
* src/buffer.h (struct buffer): New member
inhibit_buffer_hooks.
* src/pdumper.c (dump_buffer): Dump the new field.  Update the
hash value in HASH_buffer_XXX.
* src/coding.c (make_conversion_work_buffer): Function deleted;
code moved to code_conversion_save.
(code_conversion_save): Insert code from
make_conversion_work_buffer, but arrange for unwind-protecting
the current buffer before switching to the work buffer.  This
avoids leaving reused_workbuf_in_use set if user presses C-g
during encoding/decoding.
(Vcode_conversion_workbuf_name): Now external variable.
* src/coding.h (Vcode_conversion_reused_workbuf): Declare.

5 years agoExtend comment about scope of tramp-test05-expand-file-name-relative
Michael Albinus [Fri, 29 Mar 2019 16:22:25 +0000 (17:22 +0100)]
Extend comment about scope of tramp-test05-expand-file-name-relative

5 years agoGnus: Automatically render text/calendar in a human-friendly way
Stefan Monnier [Fri, 29 Mar 2019 12:46:29 +0000 (08:46 -0400)]
Gnus: Automatically render text/calendar in a human-friendly way

* lisp/gnus/mm-decode.el (mm-inline-media-tests): Add text/calendar entry.
Use (fboundp 'device-sound-enabled-p) rather than fishing for features.
(mm-automatic-display): Add text/calendar entry.

* lisp/gnus/gnus-icalendar.el: Use lexical-binding.
Remove redundant :group args.
(gnus-icalendar-mm-inline): Add autoload cookie.

5 years agoFix (again) regexp bug in CC Mode.
Alan Mackenzie [Fri, 29 Mar 2019 10:34:51 +0000 (10:34 +0000)]
Fix (again) regexp bug in CC Mode.

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

5 years agoUse memql instead of memq in pcase
Mattias Engdegård [Tue, 12 Mar 2019 12:19:35 +0000 (13:19 +0100)]
Use memql instead of memq in pcase

* lisp/emacs-lisp/pcase.el (pcase--u1):
Use memql instead of memq to work with bignums (Bug#34781).
* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-member): Test the above.

5 years agoInitiate gnus-active-hashtb before making ephemeral group
Eric Abrahamsen [Thu, 28 Mar 2019 22:39:53 +0000 (15:39 -0700)]
Initiate gnus-active-hashtb before making ephemeral group

* lisp/gnus/gnus-group.el (gnus-group-read-ephemeral-group): Needs to
  be a hash table, not nil.

5 years agoFix display of sliced images on MS-Windows
Eli Zaretskii [Thu, 28 Mar 2019 16:00:06 +0000 (18:00 +0200)]
Fix display of sliced images on MS-Windows

* src/w32term.c (x_draw_image_foreground): Fix detection of
scaled images for sliced images.  Scale the original width of
a slice and its coordinates of origin as well.

5 years ago* lisp/net/tramp.el (tramp-accept-process-output): Use `push'.
Michael Albinus [Thu, 28 Mar 2019 10:43:09 +0000 (11:43 +0100)]
* lisp/net/tramp.el (tramp-accept-process-output): Use `push'.

5 years agoSimpler way to export HAVE_X_WINDOWS to GDB
Paul Eggert [Thu, 28 Mar 2019 04:51:39 +0000 (21:51 -0700)]
Simpler way to export HAVE_X_WINDOWS to GDB

* src/.gdbinit: Simplify by removing dependency on globals
implementation.  This is useful for a future performance
improvement that I have in mind.
* src/alloc.c (enum defined_HAVE_X_WINDOWS, defined_HAVE_X_WINDOWS):
New enum and constant.
(gdb_make_enums_visible) [__GNUC__]: Use it, to make
defined_HAVE_X_WINDOWS visible to GDB.

5 years agoTweak re_registers allocation
Paul Eggert [Thu, 28 Mar 2019 04:03:10 +0000 (21:03 -0700)]
Tweak re_registers allocation

* src/regex-emacs.c (re_match_2_internal):
No need to allocate one extra trailing search register;
Emacs does not use it.  Avoid quadratic behavior on
reallocation.

5 years agoNo need for m_search_regs_saved in thread.h
Paul Eggert [Thu, 28 Mar 2019 04:01:04 +0000 (21:01 -0700)]
No need for m_search_regs_saved in thread.h

* src/search.c (save_search_regs, restore_search_regs):
Don’t use m_search_regs_saved; it’s equivalent to
saved_search_regs.num_regs != 0.
* src/thread.h (struct thread_state): Remove m_search_regs_saved.

5 years agoFix search_regs memory leak when thread destroyed
Paul Eggert [Thu, 28 Mar 2019 03:58:34 +0000 (20:58 -0700)]
Fix search_regs memory leak when thread destroyed

* src/thread.c (free_search_regs): New function.
(finalize_one_thread): Use it.

5 years ago* lisp/frame.el (make-frame-on-monitor): Add default value. (Bug#34516)
Juri Linkov [Wed, 27 Mar 2019 21:46:39 +0000 (23:46 +0200)]
* lisp/frame.el (make-frame-on-monitor): Add default value.  (Bug#34516)

5 years ago* lisp/net/tramp.el (tramp-accept-process-output): Let progress reporter run.
Michael Albinus [Wed, 27 Mar 2019 21:28:03 +0000 (22:28 +0100)]
* lisp/net/tramp.el (tramp-accept-process-output): Let progress reporter run.

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.