]> git.eshelyaron.com Git - emacs.git/log
emacs.git
5 years agoMerge from origin/emacs-26
Glenn Morris [Sat, 1 Jun 2019 19:04:42 +0000 (12:04 -0700)]
Merge from origin/emacs-26

134edc1 Warn about wrong number of args for subrs (Bug#35767)
5f01af6 Use plain symbols for eieio type descriptors (Bug#29220)
4b24b01 Pacify GCC 9 -Wredundant-decls

5 years ago; Merge from origin/emacs-26
Glenn Morris [Sat, 1 Jun 2019 19:04:42 +0000 (12:04 -0700)]
; Merge from origin/emacs-26

The following commits were skipped:

7871c3d Pacify librsvg 2.45.1 and later
d93f4bd Simplify xd_signature to pacify GCC 9

5 years agoMerge from origin/emacs-26
Glenn Morris [Sat, 1 Jun 2019 19:04:42 +0000 (12:04 -0700)]
Merge from origin/emacs-26

b2e44b4 Pacify GCC when compiling unexelf.c on Fedora 30

5 years ago; Merge from origin/emacs-26
Glenn Morris [Sat, 1 Jun 2019 19:04:42 +0000 (12:04 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

fa9e575 Suppress GCC 9 “no longer supported” messages

5 years agoMerge from origin/emacs-26
Glenn Morris [Sat, 1 Jun 2019 19:04:41 +0000 (12:04 -0700)]
Merge from origin/emacs-26

1b2f83b Fix docstring of bookmark-get-bookmark

5 years ago; Merge from origin/emacs-26
Glenn Morris [Sat, 1 Jun 2019 19:04:41 +0000 (12:04 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

c4d4dcf Avoid infloop in read-multiple-choice (Bug#32257)

5 years agoMerge from origin/emacs-26
Glenn Morris [Sat, 1 Jun 2019 19:04:41 +0000 (12:04 -0700)]
Merge from origin/emacs-26

2168165 ; * doc/lispref/nonascii.texi (Explicit Encoding): Fix typo.
8f18d12 Improve documentation of decoding into a unibyte buffer
7681a57 Remove redundants "See" before @xref or @pxref (Bug#35793)
9bee762 ; * src/coding.c: Improve commentary.  (Bug#34765)
e61349c Fix customization type of recentf-max-saved-items

# Conflicts:
# src/coding.c

5 years ago; Auto-commit of loaddefs files.
Glenn Morris [Sat, 1 Jun 2019 18:57:55 +0000 (11:57 -0700)]
; Auto-commit of loaddefs files.

5 years agoUse lexical-binding in page.el and add tests
Simen Heggestøyl [Sat, 1 Jun 2019 13:30:49 +0000 (15:30 +0200)]
Use lexical-binding in page.el and add tests

* lisp/textmodes/page.el: Use lexical-binding.
(forward-page): Replace `(if x nil y)' with `(unless x y)'.

* test/lisp/textmodes/page-tests.el: New file with tests for page.el.

5 years agoUse lexical-binding in timezone.el and add tests
Stefan Kangas [Sat, 1 Jun 2019 08:40:57 +0000 (01:40 -0700)]
Use lexical-binding in timezone.el and add tests

* lisp/timezone.el: Use lexical-binding.
* test/lisp/timezone-tests.el: New file.

5 years agoUse lexical-binding in autoinsert.el and add tests
Simen Heggestøyl [Fri, 31 May 2019 17:06:37 +0000 (19:06 +0200)]
Use lexical-binding in autoinsert.el and add tests

* lisp/autoinsert.el: Use lexical-binding.
Remove redundant :group args.
(auto-insert): Simplify.

* test/lisp/autoinsert-tests.el: New file with tests for
autoinsert.el.

5 years agoUnbreak MinGW64 build with pthreads.h installed
Eli Zaretskii [Fri, 31 May 2019 09:13:56 +0000 (12:13 +0300)]
Unbreak MinGW64 build with pthreads.h installed

* nt/mingw-cfg.site (gl_cv_func_pthread_sigmask_macro): Set to
"no", to avoid compiling Gnulib's pthread_sigmask.c.
Reported by Richard Copley <rcopley@gmail.com>.

5 years agoWarn about wrong number of args for subrs (Bug#35767)
Noam Postavsky [Tue, 28 May 2019 00:36:41 +0000 (20:36 -0400)]
Warn about wrong number of args for subrs (Bug#35767)

* lisp/emacs-lisp/bytecomp.el (byte-compile-callargs-warn): Don't
assume byte-compile-fdefinition will return non-nil.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-warn-wrong-args)
(bytecomp-warn-wrong-args-subr): New tests.

5 years agoUse plain symbols for eieio type descriptors (Bug#29220)
Noam Postavsky [Mon, 27 May 2019 23:05:56 +0000 (19:05 -0400)]
Use plain symbols for eieio type descriptors (Bug#29220)

Since Emacs 26, eieio objects use a class record (with circular
references) as the type descriptor of the object record.  This causes
problems when reading back an object from a string, because the class
record is not `eq' to the canonical one (which means that read objects
don't satisfy the foo-p predicate).
* lisp/emacs-lisp/eieio.el (make-instance): As a (partial) fix, set
the record's type descriptor to a plain symbol for the type descriptor
when eieio-backward-compatibility is non-nil (the default).
* lisp/emacs-lisp/eieio-core.el (eieio--object-class): Call
eieio--class-object on the type tag when eieio-backward-compatibility
is non-nil.
(eieio-object-p): Use eieio--object-class instead of
eieio--object-class-tag.
* test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el
(eieio-test-persist-hash-and-vector)
(eieio-test-persist-interior-lists): Make into functions.
(eieio-persist-hash-and-vector-backward-compatibility)
(eieio-persist-hash-and-vector-no-backward-compatibility)
(eieio-test-persist-interior-lists-backward-compatibility)
(eieio-test-persist-interior-lists-no-backward-compatibility): New
tests which call them, eieio-backward-compatibility let-bound.

5 years agoPacify librsvg 2.45.1 and later
Paul Eggert [Thu, 30 May 2019 22:06:39 +0000 (15:06 -0700)]
Pacify librsvg 2.45.1 and later

* src/image.c (svg_load_image): Pacify librsvg 2.45.1 and later,
and add a FIXME comment about the deprecated librsvg functions.
Backport from master.

5 years agoPacify GCC when compiling unexelf.c on Fedora 30
Paul Eggert [Thu, 30 May 2019 22:06:39 +0000 (15:06 -0700)]
Pacify GCC when compiling unexelf.c on Fedora 30

* src/unexelf.c (unexec): Pacify GCC 9.

5 years agoSuppress GCC 9 “no longer supported” messages
Paul Eggert [Thu, 30 May 2019 22:06:39 +0000 (15:06 -0700)]
Suppress GCC 9 “no longer supported” messages

* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Remove -Wchkp.
This suppresses a boatload of warnings of the form
“gcc: warning: switch ‘-Wchkp’ is no longer supported”.
when using GCC 9.  Do not merge to master.

5 years agoPacify GCC 9 -Wredundant-decls
Paul Eggert [Thu, 30 May 2019 22:06:39 +0000 (15:06 -0700)]
Pacify GCC 9 -Wredundant-decls

* src/gmalloc.c (_fraghead) [!HYBRID_MALLOC]:
Make it static in this case, too.  This avoids having both
‘extern struct list _fraghead[];’ and
‘static struct list _fraghead[BLOCKLOG];’, which
GCC 9 complains about.

5 years agoSimplify xd_signature to pacify GCC 9
Paul Eggert [Thu, 30 May 2019 22:06:39 +0000 (15:06 -0700)]
Simplify xd_signature to pacify GCC 9

* src/dbusbind.c (xd_signature): Use simpler way to set up
the subsignature.  This also pacifies GCC 9 on Fedora 30 x86-64.
Backport from master.

5 years agoImprove eq1/memql performance
Paul Eggert [Thu, 30 May 2019 21:57:21 +0000 (14:57 -0700)]
Improve eq1/memql performance

* src/fns.c (Fmemql, Feql): Inline to tweak performance.

5 years agoFix `memql' for bignums
Mattias Engdegård [Thu, 30 May 2019 21:34:45 +0000 (14:34 -0700)]
Fix `memql' for bignums

* src/fns.c (Fmemql): Make `memql' work for bignums.
* test/src/fns-tests.el (test-bignum-eql): Also test `memql'.

5 years agoOptimize one of CC Mode's syntax caches for long comments and strings.
Alan Mackenzie [Thu, 30 May 2019 19:37:25 +0000 (19:37 +0000)]
Optimize one of CC Mode's syntax caches for long comments and strings.

* lisp/progmoes/cc-langs.el (c-block-comment-awkward-chars): New lang
constant and variable.

* lisp/progmodes/cc-engine.el (c-state-semi-nonlit-pos-cache): Enhance the
doc comment.
(c-state-semi-get-near-cache-entry, c-state-semi-pp-to-literal): Reuse entry
if the sought position is in a literal, and lies between the literal start and
the entry's position.
(c-cache-to-parse-ps-state, c-parse-ps-state-below): Amend such that instead
of cacheing a state for a position after a backslash or first character of a
2-character comment delimiter, this is done for the previous character
position.

5 years agoFix a void-function error
Dmitry Gutov [Thu, 30 May 2019 17:29:29 +0000 (20:29 +0300)]
Fix a void-function error

* lisp/dired-aux.el (dired-do-find-regexp):
Require 'xref' (bug#35352).

5 years agoRename xref-refresh-results to xref-revert-buffer
Dmitry Gutov [Thu, 30 May 2019 17:09:35 +0000 (20:09 +0300)]
Rename xref-refresh-results to xref-revert-buffer

* lisp/progmodes/xref.el (xref-revert-buffer): Rename from
'xref-refresh-results' (https://debbugs.gnu.org/35737#40).

5 years agoNew command ruby-find-library-file
Dmitry Gutov [Thu, 30 May 2019 16:41:16 +0000 (19:41 +0300)]
New command ruby-find-library-file

* lisp/progmodes/ruby-mode.el (ruby-find-library-file):
New command.
(ruby-mode-map): Add binding for it.

5 years ago; Remove unused piece of code and update a docstring
Dmitry Gutov [Mon, 27 May 2019 22:09:17 +0000 (01:09 +0300)]
; Remove unused piece of code and update a docstring

5 years agoFix docstring of bookmark-get-bookmark
Stefan Kangas [Sun, 26 May 2019 10:04:56 +0000 (12:04 +0200)]
Fix docstring of bookmark-get-bookmark

* lisp/bookmark.el (bookmark-get-bookmark): Document optional
argument NOERROR. (bug#20148)

5 years agoAdd stipple support on cairo
YAMAMOTO Mitsuharu [Thu, 30 May 2019 08:16:41 +0000 (17:16 +0900)]
Add stipple support on cairo

* src/xterm.h (struct x_bitmap_record) [USE_CAIRO]: Remove unused member img.
Add member stipple.
(x_bitmap_stipple) [USE_CAIRO]: Add extern.

* src/image.c (x_bitmap_stipple) [HAVE_X_WINDOWS && USE_CAIRO]: New function.
(image_create_bitmap_from_data, image_create_bitmap_from_file)
(x_create_bitmap_from_xpm_data) [HAVE_X_WINDOWS && USE_CAIRO]: Initialize
stipple member of struct x_bitmap_record.
(free_bitmap_record) [HAVE_X_WINDOWS && USE_CAIRO]: Destroy stipple member.

* src/xterm.c (x_fill_rectangle) [USE_CAIRO]: Inspect gc and draw stipple if
necessary.  Use x_bitmap_stipple.

5 years agoSimplify Gnus buffer liveness checking and killing
Basil L. Contovounesios [Sun, 5 May 2019 00:28:57 +0000 (01:28 +0100)]
Simplify Gnus buffer liveness checking and killing

* lisp/gnus/gnus-agent.el (gnus-agent-synchronize-group-flags):
Fix indentation.
* lisp/gnus/gnus-util.el (gnus-buffer-exists-p): Define as obsolete
alias of gnus-buffer-live-p.
(gnus-buffer-live-p): If the given argument is or names a live
buffer, return the corresponding buffer object instead of a boolean.
* lisp/gnus/gnus-win.el (gnus-delete-windows-in-gnusey-frames)
(gnus-remove-some-windows): Simplify.
* lisp/gnus/gnus.el (gnus-prune-buffers): Redefine as alias of
gnus-buffers.
(gnus-kill-buffer, gnus-buffers, gnus-group-find-parameter):
* lisp/gnus/gnus-art.el (gnus-kill-sticky-article-buffers)
(gnus-request-article-this-buffer):
* lisp/gnus/gnus-bcklg.el (gnus-backlog-shutdown):
* lisp/gnus/gnus-cus.el (gnus-group-customize)
(gnus-agent-customize-category):
* lisp/gnus/gnus-draft.el (gnus-draft-edit-message):
* lisp/gnus/gnus-group.el (gnus-group-set-mode-line)
(gnus--abort-on-unsaved-message-buffers, gnus-group-compact-group):
* lisp/gnus/gnus-msg.el (gnus-inews-add-send-actions)
(gnus-summary-supersede-article, gnus-copy-article-buffer):
* lisp/gnus/gnus-score.el (gnus-score-edit-current-scores)
(gnus-score-edit-file):
* lisp/gnus/gnus-spec.el (gnus-update-format-specifications):
* lisp/gnus/gnus-srvr.el (gnus-server-compact-server):
* lisp/gnus/gnus-start.el (gnus-clear-system, gnus-dribble-enter)
(gnus-dribble-save, gnus-dribble-clear, gnus-save-newsrc-file):
* lisp/gnus/gnus-sum.el (gnus-summary-setup-buffer)
(gnus-update-summary-mark-positions, gnus-summary-exit)
(gnus-deaden-summary, gnus-kill-or-deaden-summary)
(gnus-summary-next-group):
* lisp/gnus/gnus-win.el (gnus-configure-frame):
* lisp/gnus/mail-source.el (mail-source-movemail):
* lisp/gnus/message.el (message-with-reply-buffer)
(message-with-reply, message-send-and-exit)
(message-send-mail-with-sendmail, message-pop-to-buffer)
(message-do-send-housekeeping, message-forward-make-body-plain)
(message-forward-make-body-mml):
* lisp/gnus/mm-decode.el (mm-display-external, mm-remove-part):
* lisp/gnus/nnbabyl.el (nnbabyl-server-opened)
(nnbabyl-possibly-change-newsgroup, nnbabyl-read-mbox)
(nnbabyl-check-mbox):
* lisp/gnus/nndiary.el (nndiary-save-nov):
* lisp/gnus/nndoc.el (nndoc-close-group)
(nndoc-possibly-change-buffer):
* lisp/gnus/nnfolder.el (nnfolder-close-group, nnfolder-save-nov):
* lisp/gnus/nnimap.el (nnimap-make-process-buffer, nnimap-keepalive)
(nnimap-find-connection):
* lisp/gnus/nnmail.el (nnmail-cache-open, nnmail-cache-close):
* lisp/gnus/nnmbox.el (nnmbox-close-server, nnmbox-server-opened)
(nnmbox-possibly-change-newsgroup, nnmbox-read-mbox):
* lisp/gnus/nnml.el (nnml-save-incremental-nov, nnml-open-nov)
(nnml-save-nov):
* lisp/gnus/nnoo.el (nnoo-server-opened):
* lisp/gnus/nntp.el (nntp-kill-buffer, nntp-make-process-buffer)
(nntp-open-connection, nntp-async-trigger):
* lisp/net/mairix.el (mairix-gnus-fetch-field): Simplify buffer
liveness checking and killing, replacing buffer-name with
buffer-live-p and gnus-buffer-exists-p with gnus-buffer-live-p or
equivalent where applicable.

5 years agoFix breakage of native image scaling on XRENDER by previous change
YAMAMOTO Mitsuharu [Thu, 30 May 2019 01:05:27 +0000 (10:05 +0900)]
Fix breakage of native image scaling on XRENDER by previous change

* src/image.c (image_create_x_image_and_pixmap_1) [HAVE_XRENDER]: Get depth if
it is unspecified.

5 years agoUpdate from Gnulib
Paul Eggert [Wed, 29 May 2019 23:33:51 +0000 (16:33 -0700)]
Update from Gnulib

This incorporates:
2019-05-24 flexmember: update comments
2019-05-18 pthread_sigmask: fix --enable-threads=windows compilation
2019-05-14 close-stream, closein, closeout: simplify
2019-05-09 verify: remove verify_true
2019-05-09 verify: support C2X and C++17 static_assert
* build-aux/config.guess, build-aux/config.sub:
* doc/misc/texinfo.tex, lib/flexmember.h, lib/verify.h:
* m4/flexmember.m4, m4/pthread_sigmask.m4:
Copy from Gnulib
* m4/gnulib-comp.m4: Regenerate.

2019-05-26  Paul Eggert  <eggert@cs.ucla.edu>

Update author/maintainer info
This mostly updates email addresses and fixes spellings of
author and maintainer names.

5 years ago* lisp/subr.el (add-hook): Turn `append` into `depth` (bug#35508)
Stefan Monnier [Wed, 29 May 2019 19:56:14 +0000 (15:56 -0400)]
* lisp/subr.el (add-hook): Turn `append` into `depth` (bug#35508)

Make it possible to control the relative ordering of functions on hooks by
specifying `depth` in the same was as was possible with `add-function`.

* lisp/electric.el (electric--sort-post-self-insertion-hook):
Delete function.
(electric-indent-mode, electric-layout-mode, electric-quote-mode):
* lisp/elec-pair.el (electric-pair-mode): Use new `depth` arg instead of
electric--sort-post-self-insertion-hook.

* lisp/emacs-lisp/syntax.el (syntax-propertize, syntax-ppss):
Use new `depth` arg to make sure noone accidentally gets added
after syntax-ppss-flush-cache.

* doc/lispref/modes.texi (Setting Hooks): Document new `depth` arg.

* test/lisp/subr-tests.el (subr-tests-add-hook-depth): New test.

5 years agoUse lexical-binding in makesum.el and add tests
Simen Heggestøyl [Wed, 29 May 2019 18:29:28 +0000 (20:29 +0200)]
Use lexical-binding in makesum.el and add tests

* lisp/makesum.el: Use lexical-binding.
(make-command-summary): Replace `if..progn' with `when'.
(double-column): Add docstring and apply trivial simplifications.

* test/lisp/makesum-tests.el: New file with tests for makesum.el.

5 years agoSimplify gnus-or and gnus-and
Basil L. Contovounesios [Wed, 29 May 2019 14:53:31 +0000 (15:53 +0100)]
Simplify gnus-or and gnus-and

* lisp/gnus/gnus-art.el: Make implicit seq.el dependency explicit.
(gnus-treat-predicate): Use seq-some in place of mapcar + gnus-or
and evaluate lambda predicate.
* lisp/gnus/gnus-util.el (gnus-or, gnus-and): Simplify.

5 years agoRework cairo image support to improve consistency (Bug#35871)
YAMAMOTO Mitsuharu [Wed, 29 May 2019 08:58:04 +0000 (17:58 +0900)]
Rework cairo image support to improve consistency (Bug#35871)

* src/dispextern.h (Emacs_Pix_Container) [USE_CAIRO]: New struct.  Also used
as aliases of Emacs_Pixmap and Emacs_Pix_Context.
(x_kill_gs_process) [USE_CAIRO]: #ifdef out extern.
(RGB_PIXEL_COLOR) [USE_CAIRO]: Define as unsigned long.

* src/image.c: Include stdint.h.  On cairo, remove existing image support
code, use non-X11-specific code for XBM/XPM, and remove POSTSCRIPT support.
(PUT_PIXEL): New macro.  Use it instead of XPutPixel when not specific to X11.
(GET_PIXEL, NO_PIXMAP, PIX_MASK_RETAIN, PIX_MASK_DRAW)
(RGB_TO_ULONG, ARGB_TO_ULONG, RED_FROM_ULONG)
(GREEN_FROM_ULONG, BLUE_FROM_ULONG, RED16_FROM_ULONG)
(GREEN16_FROM_ULONG, BLUE16_FROM_ULONG) [USE_CAIRO]: New macros.
(image_create_pix_container, image_pix_container_put_pixel)
(image_pix_context_get_pixel, image_pix_container_create_from_bitmap_data)
(cr_create_cr_surface_from_image) [USE_CAIRO]: New functions.
(image_create_x_image_and_pixmap_1, image_destroy_x_image)
(image_check_image_size): Extract X11-specific code from here ...
(x_create_x_image_and_pixmap, x_destroy_x_image)
(x_check_image_size) [HAVE_X_WINDOWS]: ... to here.
(x_create_bitmap_mask) [HAVE_X_WINDOWS]: Use them.  Inline specialized version
of four_corners_best.
(prepare_image_for_display, image_clear_image_1, image_destroy_x_image)
(gui_put_x_image, image_put_x_image, image_get_x_image, image_unget_x_image)
(Create_Pixmap_From_Bitmap_Data, lookup_rgb_color)
(image_to_emacs_colors) [USE_CAIRO]: Add cairo support.
(image_background, png_load_body) [USE_CAIRO]: Use image_alloc_image_color for
img->background.
(image_sync_to_pixmaps) [USE_CAIRO]: #ifdef out function.
(Create_Pixmap_From_Bitmap_Data) [HAVE_X_WINDOWS]: Move image_check_image_size
call from here ...
(xbm_load_image): ... to here.
(xpm_load_image):
(image_build_heuristic_mask, pbm_load, gif_load) [USE_CAIRO]: Use
lookup_rgb_color for argument of PUT_PIXEL.
(image_pixmap_draw_cross) [HAVE_X_WINDOWS || USE_CAIRO]: New function.
(image_disable_image) [HAVE_X_WINDOWS || USE_CAIRO]: Use it.
(CrossForeground) [!HAVE_NTGUI && !HAVE_NS]: New macro.
(image_disable_image) [!HAVE_NTGUI && !HAVE_NS]: Use it.

* src/xterm.c (handle_one_xevent) <ClientMessage> [USE_CAIRO]: #ifdef out
x_kill_gs_process call.
(x_free_pixmap) [USE_CAIRO]: Free Emacs_Pix_Container and data it contains.

5 years agoImprove previous change for tool bar image support on GTK+2 with cairo
YAMAMOTO Mitsuharu [Wed, 29 May 2019 01:43:01 +0000 (10:43 +0900)]
Improve previous change for tool bar image support on GTK+2 with cairo

* src/gtkutil.c (xg_get_pixbuf_from_surface) [USE_CAIRO && !HAVE_GTK3]: Remove
unused argument f.  All callers changed.  Handle general alpha value.

5 years ago* mule-cmds.el (encoded-string-description): Require unibyte string as input
Stefan Monnier [Wed, 29 May 2019 00:59:35 +0000 (20:59 -0400)]
* mule-cmds.el (encoded-string-description): Require unibyte string as input

5 years ago* lisp/international/mule-cmds.el (encode-coding-char): Fix ASCII case
Stefan Monnier [Tue, 28 May 2019 23:33:20 +0000 (19:33 -0400)]
* lisp/international/mule-cmds.el (encode-coding-char): Fix ASCII case

Don't bother with string-as-multibyte since `string` already returns
multibyte when needed.  Don't forget to encode when the string is
ASCII, e.g. for ebcdic case and to make sure we always return
a unibyte string.

* test/lisp/international/mule-tests.el (mule-cmds-tests--encode-ebcdic):
New test.

5 years ago* doc/misc/cl.texi (Macro Bindings): Add a detail
Michael Heerdegen [Thu, 23 May 2019 01:33:04 +0000 (03:33 +0200)]
* doc/misc/cl.texi (Macro Bindings): Add a detail

Say that calls of 'cl-macrolet' bound macros are expanded in the
global environment.

5 years ago* lisp/gnus/gnus-art.el: Use mail-header-p
Stefan Monnier [Tue, 28 May 2019 19:10:42 +0000 (15:10 -0400)]
* lisp/gnus/gnus-art.el: Use mail-header-p

(gnus-summary-save-in-pipe, gnus-article-prepare)
(gnus-request-article-this-buffer): Use mail-header-p instead of vectorp.
(gnus-request-article-this-buffer): Use insert-buffer-substring since
it doesn't behave like string-make-multibyte any more.

5 years agoFix handling of -xrm on MS-Windows broken by recent commits
Eli Zaretskii [Tue, 28 May 2019 16:58:27 +0000 (19:58 +0300)]
Fix handling of -xrm on MS-Windows broken by recent commits

* src/w32reg.c (w32_get_string_resource): The argument V_RDB
is a 'char **', not a 'char *'.  This fixes -xrm handling on
MS-Windows, broken by conversion of x_get_string_resource to
terminal-specific hook.

5 years ago* lisp/frameset.el: Stop using obsolete registerv objects
Stefan Monnier [Tue, 28 May 2019 13:05:25 +0000 (09:05 -0400)]
* lisp/frameset.el: Stop using obsolete registerv objects

(frameset-register): New type.
(register-val-jump-to): Define on this new type, replacing
frameset--jump-to-register.
(register-val-describe): Define on this new type, replacing
frameset--print-register.
(frameset-to-register): Use new frameset-make-register.
(frameset--reuse-frame): η-reduce.

5 years agoCleanup of TODO to prefer report-emacs-bug
Stefan Kangas [Sun, 26 May 2019 16:08:01 +0000 (18:08 +0200)]
Cleanup of TODO to prefer report-emacs-bug

* etc/TODO: Remove already completed removal of `report-calc-bug'.
* lisp/calc/calc.el: Remove any mention of `report-calc-bug'.
* lisp/epg-config.el: Redefine `epg-bug-report-address' as obsolete
variable alias for `report-emacs-bug-address'.
* lisp/expand.el: Remove any mention of `expand-submit-report'.
* lisp/obsolete/fast-lock.el: Remove commented out code for
`fast-lock-submit-bug-report'.

5 years agoSupport tool bar icon image also on GTK+2 with cairo
YAMAMOTO Mitsuharu [Tue, 28 May 2019 08:31:57 +0000 (17:31 +0900)]
Support tool bar icon image also on GTK+2 with cairo

* src/gtkutil.c (xg_get_pixbuf_from_surface) [USE_CAIRO && !HAVE_GTK3]: New
function.
(xg_get_image_for_pixmap) [USE_CAIRO && !HAVE_GTK3]: Use it.
(xg_tool_item_stale_p, update_frame_tool_bar) [USE_CAIRO && !HAVE_GTK3]: Use
cairo code also on GTK+2.

5 years ago* test/lisp/autorevert-tests.el: Give on on remote hydra.nixos tests.
Glenn Morris [Tue, 28 May 2019 00:20:12 +0000 (17:20 -0700)]
* test/lisp/autorevert-tests.el: Give on on remote hydra.nixos tests.

(auto-revert--test-enabled-remote): Disable on hydra.nixos.

5 years ago* test/lisp/autorevert-tests.el: Try to fix remote hydra.nixos tests.
Glenn Morris [Mon, 27 May 2019 21:08:07 +0000 (14:08 -0700)]
* test/lisp/autorevert-tests.el: Try to fix remote hydra.nixos tests.

5 years agoRemap `complete-symbol' in CSS mode
Simen Heggestøyl [Mon, 27 May 2019 19:12:53 +0000 (21:12 +0200)]
Remap `complete-symbol' in CSS mode

* lisp/textmodes/css-mode.el (css-mode-map): Remap `complete-symbol'
to `completion-at-point'.
(css-mode): Update docstring to produce the right key binding.

5 years agoCorrectly eliminate duplicate cases in switch compilation
Mattias Engdegård [Fri, 17 May 2019 09:25:06 +0000 (11:25 +0200)]
Correctly eliminate duplicate cases in switch compilation

Fix code mistakes that prevented the correct elimination of duplicated
cases when compiling a `cond' form to a switch bytecode, as in

  (cond ((eq x 'a) 1)
        ((eq x 'b) 2)
        ((eq x 'a) 3)   ; should be elided
        ((eq x 'c) 4))

Sometimes, this caused the bytecode to use the wrong branch (bug#35770).

* lisp/emacs-lisp/bytecomp.el (byte-compile-cond-vars): Return obj2 eval'ed.
(byte-compile-cond-jump-table-info):
Discard redundant condition.  Use `obj2' as evaluated.
Discard duplicated cases instead of failing the table generation.
* test/lisp/emacs-lisp/bytecomp-tests.el (toplevel): Require subr-x.
(byte-opt-testsuite-arith-data, bytecomp-test--switch-duplicates): Test.

5 years agoAnother attempt to fix Bug#35769
Michael Albinus [Mon, 27 May 2019 07:21:37 +0000 (09:21 +0200)]
Another attempt to fix Bug#35769

* lisp/net/tramp.el (tramp-call-process, tramp-call-process-region)
(tramp-process-lines): Suppress `process-environment' entries
dedicated for remote processes.  (Bug#35769)

5 years ago; Fix read-multiple-choice test
Noam Postavsky [Mon, 27 May 2019 01:55:00 +0000 (21:55 -0400)]
; Fix read-multiple-choice test

* test/lisp/emacs-lisp/rmc-tests.el (test-read-multiple-choice):
Rebind read-event, read-multiple-choice uses that since 2019-05-26
"Avoid infloop in read-multiple-choice (Bug#32257)".

5 years agoAdd a menu bar menu for CSS mode
Simen Heggestøyl [Sun, 26 May 2019 19:37:05 +0000 (21:37 +0200)]
Add a menu bar menu for CSS mode

* lisp/textmodes/css-mode.el (css-mode-map): Add menu bar menu.

5 years ago* lisp/net/tramp-sh.el (tramp-maybe-open-connection): Revert fix for Bug#35769
Michael Albinus [Sun, 26 May 2019 19:37:34 +0000 (21:37 +0200)]
* lisp/net/tramp-sh.el (tramp-maybe-open-connection): Revert fix for Bug#35769

5 years ago; * INSTALL.REPO: Start by telling how to clone the repository.
Eli Zaretskii [Sun, 26 May 2019 16:32:46 +0000 (19:32 +0300)]
; * INSTALL.REPO: Start by telling how to clone the repository.

5 years agoAvoid infloop in read-multiple-choice (Bug#32257)
Noam Postavsky [Wed, 22 May 2019 00:33:09 +0000 (20:33 -0400)]
Avoid infloop in read-multiple-choice (Bug#32257)

* lisp/emacs-lisp/rmc.el (read-multiple-choice): When `read-char'
signals an error "Non-character input-event", call `read-event' to
take the non-character event out of the queue.  Don't merge to master,
we just use `read-event' directly there, rather than this solution
which relies a particular error message.

5 years ago; * doc/lispref/nonascii.texi (Explicit Encoding): Fix typo.
Noam Postavsky [Sun, 26 May 2019 12:46:15 +0000 (08:46 -0400)]
; * doc/lispref/nonascii.texi (Explicit Encoding): Fix typo.

5 years agoAvoid infloop in read-multiple-choice (Bug#32257)
Noam Postavsky [Wed, 22 May 2019 00:38:00 +0000 (20:38 -0400)]
Avoid infloop in read-multiple-choice (Bug#32257)

* lisp/emacs-lisp/rmc.el (read-multiple-choice): Use `read-event'
which won't get stuck (return the same event over and over again) for
non-character events, unlike `read-char'.

5 years agoTweak recent additions in tabify-tests.el
Basil L. Contovounesios [Sun, 26 May 2019 10:23:03 +0000 (11:23 +0100)]
Tweak recent additions in tabify-tests.el

* test/lisp/tabify-tests.el (tabify-tests--test-changes): Rename
third argument to avoid "lexical argument shadows dynamic variable"
warnings.  Use mapconcat in place of mapcar+concat.
(tabify-tests-untabify, tabify-tests-tabify): Quote function symbols
as such.

5 years agoUse lexical-binding in paren.el and add tests
Simen Heggestøyl [Sun, 26 May 2019 09:11:23 +0000 (11:11 +0200)]
Use lexical-binding in paren.el and add tests

* lisp/paren.el: Use lexical-binding.
(show-paren--default): Use imperative form in doc-string.

* test/lisp/paren-tests.el: New file with tests for paren.el.

5 years agoUpdate author/maintainer info
Paul Eggert [Sun, 26 May 2019 07:58:28 +0000 (00:58 -0700)]
Update author/maintainer info

Update email addresses and fix spellings of some author and
maintainer names.

5 years agoRemove Maintainer: when it duplicates Author:
Paul Eggert [Sun, 26 May 2019 07:58:27 +0000 (00:58 -0700)]
Remove Maintainer: when it duplicates Author:

The convention is that a file with Author: but not Maintainer:
means the author is a maintainer, which makes it confusing
when a file lists the same person as author and maintainer.
Avoid the confusion by removing the duplicate Maintainer: line.

5 years agoUse lexical-binding in tabify.el and add tests
Stefan Kangas [Sun, 26 May 2019 01:33:39 +0000 (18:33 -0700)]
Use lexical-binding in tabify.el and add tests

* lisp/tabify.el: Use lexical-binding.
* test/lisp/tabify-tests.el: New file.

5 years ago* CONTRIBUTE: Split git configuration from fetch-and-build
Paul Eggert [Sun, 26 May 2019 01:29:16 +0000 (18:29 -0700)]
* CONTRIBUTE: Split git configuration from fetch-and-build

5 years ago; Minor docstring change
Dmitry Gutov [Sat, 25 May 2019 22:48:27 +0000 (01:48 +0300)]
; Minor docstring change

5 years agoDocument ‘Maintainer: emacs-devel@gnu.org’
Paul Eggert [Sat, 25 May 2019 21:23:56 +0000 (14:23 -0700)]
Document ‘Maintainer: emacs-devel@gnu.org’

* doc/lispref/tips.texi (Library Headers): Document that the
Maintainer: line now says ‘emacs-devel@gnu.org’ rather than ‘FSF’.

5 years agoGo back to "Maintainer: emacs-devel@gnu.org"
Paul Eggert [Sat, 25 May 2019 20:43:06 +0000 (13:43 -0700)]
Go back to "Maintainer: emacs-devel@gnu.org"

Restore lines saying "Maintainer: emacs-devel@gnu.org" when there is
no special maintainer for a file.  Although this wasn't documented
it was common practice and removing the lines didn't have consensus.

5 years ago; etc/NEWS: Consolidate the Xref entries
Dmitry Gutov [Sat, 25 May 2019 21:21:33 +0000 (00:21 +0300)]
; etc/NEWS: Consolidate the Xref entries

5 years ago; xref--create-fetcher: Add some further clarification
Dmitry Gutov [Sat, 25 May 2019 21:18:12 +0000 (00:18 +0300)]
; xref--create-fetcher: Add some further clarification

5 years agoExpand some xref documentation
Dmitry Gutov [Sat, 25 May 2019 21:14:10 +0000 (00:14 +0300)]
Expand some xref documentation

* lisp/progmodes/xref.el (xref-show-xrefs-function)
(xref-show-definitions-function, xref--create-fetcher):
Add or extend the docstring.

5 years agoImprove documentation of decoding into a unibyte buffer
Eli Zaretskii [Sat, 25 May 2019 19:10:00 +0000 (22:10 +0300)]
Improve documentation of decoding into a unibyte buffer

* doc/lispref/nonascii.texi (Explicit Encoding): Document what
happens when DESTINATION of decoding is a unibyte buffer.

* src/coding.c (Fdecode_coding_region)
(Fdecode_coding_string): Document what happens if DESTINATION
is a unibyte buffer.

5 years agoImplement and document XDG-style startup files under ~/.config.
Eric S. Raymond [Sat, 25 May 2019 17:22:44 +0000 (13:22 -0400)]
Implement and document XDG-style startup files under ~/.config.

* lisp/startup.el (command-line): Allow XDG-style as well as old
 style init paths.
* doc/startup.texi: Document the above change.

5 years agoRemove redundants "See" before @xref or @pxref (Bug#35793)
Mauro Aranda [Sat, 18 May 2019 20:35:04 +0000 (17:35 -0300)]
Remove redundants "See" before @xref or @pxref (Bug#35793)

* doc/misc/gnus.texi (Group Parameters): Remove redundant "See" before
cross reference, add comma after it.

5 years agoRemove redundants "See" before @xref or @pxref (Bug#35793)
Mauro Aranda [Sat, 18 May 2019 20:35:04 +0000 (17:35 -0300)]
Remove redundants "See" before @xref or @pxref (Bug#35793)

* doc/lispref/control.texi (Control Structures):
* doc/lispref/modes.texi (Search-based Fontification):
* doc/misc/cc-mode.texi (Filling and Line Breaking Commands)
(Auto-newline Insertion, Other Special Indentations):
* doc/misc/dbus.texi (Errors and Events):
* doc/misc/dired-x.texi (Find File At Point):
* doc/misc/eudc.texi (Display of Query Results, Inline Query Expansion):
* doc/misc/gnus-faq.texi (FAQ 3-11):
* doc/misc/gnus.texi (Group Parameters, Posting Styles)
(Spam Package Introduction):
* doc/misc/org.texi (LaTeX fragments, Previewing LaTeX fragments):
* doc/misc/reftex.texi (Commands):
Remove redundant "See" before cross references.
* doc/lispref/functions.texi (Function Safety): Redundant "see" is in
ignored text, but remove it anyway.
* doc/lispref/positions.texi (Skipping Characters): Remove redundant
"See" before cross references.  Change @xref to @pxref, which is
more suitable when at the end of a sentence.

Most of the redundants "See" found by Noam Postavsky.

5 years ago* doc/misc/tramp.texi (Obtaining Tramp): Tramp is available via GNU ELPA.
Michael Albinus [Sat, 25 May 2019 11:24:47 +0000 (13:24 +0200)]
* doc/misc/tramp.texi (Obtaining Tramp): Tramp is available via GNU ELPA.

5 years ago; Add NEWS entries for recent Xref changes
Dmitry Gutov [Fri, 24 May 2019 21:40:34 +0000 (00:40 +0300)]
; Add NEWS entries for recent Xref changes

5 years agoRename xref--revert-xref-buffer to xref-refresh-results
Dmitry Gutov [Fri, 24 May 2019 21:15:46 +0000 (00:15 +0300)]
Rename xref--revert-xref-buffer to xref-refresh-results

* lisp/progmodes/xref.el (xref-refresh-results):
Rename from xref--revert-xref-buffer (bug#35702).

5 years agoSupport reverting in xref-find-definitions results as well
Dmitry Gutov [Fri, 24 May 2019 21:11:41 +0000 (00:11 +0300)]
Support reverting in xref-find-definitions results as well

* lisp/progmodes/xref.el (xref--show-xref-buffer): Expect the
first argument to always be a function (bug#35702).  Handle a
FETCHED-XREFS entry in ALIST.
(xref--show-defs-buffer): Update accordingly.
(xref--create-fetcher): Extract from xref--find-xrefs.
(xref--find-definitions): Use it.

5 years ago* lisp/emacs-lisp/package.el (package-install-from-archive): Fix last change
Stefan Monnier [Fri, 24 May 2019 16:26:14 +0000 (12:26 -0400)]
* lisp/emacs-lisp/package.el (package-install-from-archive): Fix last change

Don't place the unibyte content of of the downloaded file into
a multibyte buffer.

5 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Fri, 24 May 2019 13:36:15 +0000 (15:36 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

5 years agoFix Bug#35769
Michael Albinus [Fri, 24 May 2019 13:36:02 +0000 (15:36 +0200)]
Fix Bug#35769

* lisp/net/tramp-adb.el (tramp-adb-connection-local-default-profile):
* lisp/net/tramp-integration.el (tramp-connection-local-default-profile):
Do not set it on w32 systems.  (Bug#35769)

5 years agoAdd "Enter Auth" prompt handling for OpenVPN (Bug#35724)
Matthew Bauer [Mon, 13 May 2019 22:39:32 +0000 (18:39 -0400)]
Add "Enter Auth" prompt handling for OpenVPN (Bug#35724)

* lisp/comint.el (comint-password-prompt-regexp): Allow "Enter Auth"
at the beginning.

5 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Dmitry Gutov [Fri, 24 May 2019 01:53:39 +0000 (04:53 +0300)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

5 years agoSupport "reverting" Xref buffers (bug#35702)
Dmitry Gutov [Fri, 24 May 2019 01:50:44 +0000 (04:50 +0300)]
Support "reverting" Xref buffers (bug#35702)

* lisp/progmodes/xref.el (xref--fetcher): New variable.
(xref--xref-buffer-mode-map): Add binding for 'g'.
(xref--revert-xref-buffer): New command.
(xref--show-xref-buffer): Accept a function as the first argument.
(xref--show-xrefs): Same.
(xref--find-xrefs): Pass the above a fetcher function.

* lisp/progmodes/project.el (project-find-regexp)
(project-or-external-find-regexp): Same.

* lisp/dired-aux.el (dired-do-find-regexp): Same.

5 years agoUndo use of Emacs_Pixmap over Pixmap for x_kill_gs_process
YAMAMOTO Mitsuharu [Fri, 24 May 2019 00:52:56 +0000 (09:52 +0900)]
Undo use of Emacs_Pixmap over Pixmap for x_kill_gs_process

* src/dispextern.h (x_kill_gs_process):
* src/image.c (x_kill_gs_process): Undo use of Emacs_Pixmap over Pixmap.
* src/dispextern.h (x_kill_gs_process): Move extern inside HAVE_X_WINDOWS.

5 years agoImprove documentation of the 'function' special form
Michael Heerdegen [Sat, 27 Apr 2019 07:40:10 +0000 (09:40 +0200)]
Improve documentation of the 'function' special form

Point out that 'function' quoting is beneficial also for symbols.

* src/eval.c (function): Enhance docstring.
* doc/lispref/functions.texi (Anonymous Functions): Improve
documentation.

5 years ago* lisp/emacs-lisp/cl-macs.el (cl-callf): Tweak in docstring
Michael Heerdegen [Thu, 23 May 2019 22:50:20 +0000 (00:50 +0200)]
* lisp/emacs-lisp/cl-macs.el (cl-callf): Tweak in docstring

Say that lambdas are also allowed as FUNC argument.

5 years ago; * src/coding.c: Improve commentary. (Bug#34765)
Eli Zaretskii [Thu, 23 May 2019 14:36:06 +0000 (17:36 +0300)]
; * src/coding.c: Improve commentary.  (Bug#34765)

5 years agoAvoid backslash-newline-newline in source code
Paul Eggert [Thu, 23 May 2019 06:58:55 +0000 (23:58 -0700)]
Avoid backslash-newline-newline in source code

* etc/refcards/Makefile (PDF_FRENCH):
* lib-src/etags.c (LOOP_ON_INPUT_LINES):
* lisp/dabbrev.el (dabbrev-check-other-buffers):
* lisp/org/org-id.el (org-id-link-to-org-use-id):
* lisp/org/org.el (org-support-shift-select, org-file-apps):
* src/alloc.c (CHECK_ALLOCATED_AND_LIVE)
(CHECK_ALLOCATED_AND_LIVE_SYMBOL):
* src/frame.h (FRAME_PIXEL_WIDTH_TO_TEXT_COLS):
* src/regex-emacs.c (PREFETCH_NOLIMIT):
* src/window.h (WINDOW_BUFFER):
Remove backslash-newline that immediately precedes another
newline, as this is not the usual style and is confusing.

5 years agoUnbreak display of characters on MS-Windows
Eli Zaretskii [Thu, 23 May 2019 05:26:32 +0000 (08:26 +0300)]
Unbreak display of characters on MS-Windows

* src/w32font.c (w32font_draw): Convert the glyph_string's
char2b array to 16-bit WCHAR data that ExtTextOutW needs.

5 years ago* lisp/cedet/srecode/insert.el: Use lexical-binding
Stefan Monnier [Thu, 23 May 2019 03:29:17 +0000 (23:29 -0400)]
* lisp/cedet/srecode/insert.el: Use lexical-binding

(srecode-insert-method): No need for lexical-let any more.

5 years ago* lisp/allout.el, lisp/allout-widgets.el: Use cl-lib and pcase
Stefan Monnier [Thu, 23 May 2019 03:21:47 +0000 (23:21 -0400)]
* lisp/allout.el, lisp/allout-widgets.el: Use cl-lib and pcase

5 years agoMake Cairo build obey hint-style font setting (Bug#35781)
YAMAMOTO Mitsuharu [Thu, 23 May 2019 01:30:59 +0000 (10:30 +0900)]
Make Cairo build obey hint-style font setting (Bug#35781)

* src/ftfont.h (ftfont_open2): Remove extern.
(ftfont_fix_match, ftfont_add_rendering_parameters)
(ftfont_entity_pattern): Add externs.
(struct font_info): Remove member bitmap_strike_index.
(struct font_info) [USE_CAIRO]: Remove member ft_size_draw.  All uses removed.
Add member bitmap_position_unit.

* src/xftfont.c (xftfont_fix_match, xftfont_add_rendering_parameters): Move
functions from here ...
* src/ftfont.c (ftfont_fix_match, ftfont_add_rendering_parameters): ... to
here.  All uses changed.
* src/xftfont.c (xftfont_open): Extract FcPattern creation from font entity
from here ...
* src/ftfont.c (ftfont_entity_pattern): ... to here.
* src/xftfont.c (syms_of_xftfont): Move DEFSYMs for Fontconfig's rendering
parameters from here ...
* src/ftfont.c (syms_of_ftfont): ... to here.

* src/ftfont.c (ftfont_open, ftfont_open2): Undo introduction of
bitmap_strike_index.  Merge functions into ftfont_open.

* src/ftcrfont.c (ftcrfont_open): Align code with xftfont_open rather than
ftfont_open.
(ftcrfont_close): Likewise.
(ftcrfont_has_char, ftcrfont_encode_char):
(ftcrfont_otf_capability) [HAVE_LIBOTF]:
(ftcrfont_variation_glyphs) [HAVE_OTF_GET_VARIATION_GLYPHS]: New functions.
(ftcrfont_driver): Register them.
(ftcrfont_get_bitmap, ftcrfont_anchor_point):
(ftcrfont_shape) [HAVE_M17N_FLT && HAVE_LIBOTF]: Use bitmap_position_unit
instead of bitmap_strike_index to screen bitmap fonts.
(ftcrfont_get_bitmap, ftcrfont_anchor_point):
(ftcrfont_otf_capability) [HAVE_LIBOTF]:
(ftcrfont_shape) [HAVE_M17N_FLT && HAVE_LIBOTF]:
(ftcrfont_variation_glyphs) [HAVE_OTF_GET_VARIATION_GLYPHS]: Temporarily
assign ftcrfont_info->ft_size and call corresponding ftfont functions.
(ftcrfont_draw): Don't flush cairo surface when exporting.

5 years agoFix url-copy-file argument handling
Basil L. Contovounesios [Thu, 16 May 2019 15:29:49 +0000 (16:29 +0100)]
Fix url-copy-file argument handling

For discussion, see the following thread:
https://lists.gnu.org/archive/html/emacs-devel/2019-05/msg00500.html
* lisp/url/url-handlers.el: Update autoloaded docstrings.
Quote function symbols as such.
(url-handler-regexp): Make grouping construct shy.
(url-file-handler, url-insert-buffer-contents)
(url-handlers-create-wrapper, url-handlers-set-buffer-mode):
Simplify.
(url-file-handler-identity): Clarify calling convention.
(file-name-absolute-p, url-file-local-copy): Mark ignored arguments
as such.
(url-handler-directory-file-name): Prefer string comparison over
regexp match where either will do.
(url-copy-file): Handle integer as third argument as per copy-file.

5 years agoFix customization type of recentf-max-saved-items
Dario Gjorgjevski [Fri, 17 May 2019 09:46:54 +0000 (11:46 +0200)]
Fix customization type of recentf-max-saved-items

Change the customization type of recentf-max-saved-items to include
nil, as it is an allowed value (Bug#35771).
* lisp/recentf.el (recentf-max-saved-items): Change the customization
type in the defcustom.

5 years ago* lisp/textmodes/sgml-mode.el: Fix lone `>` in sgml text
Stefan Monnier [Wed, 22 May 2019 22:36:37 +0000 (18:36 -0400)]
* lisp/textmodes/sgml-mode.el: Fix lone `>` in sgml text

(sgml--syntax-propertize-ppss):New variable and function.
(sgml-syntax-propertize-rules): Use it.
Don't ignore quotes not followed by a matching quote or a '>' or '<'.
(sgml-syntax-propertize): Set up sgml--syntax-propertize-ppss.

* test/lisp/textmodes/sgml-mode-tests.el (sgml-tests--quotes-syntax):
Add test for lone '>'.

5 years agoMake xref-find-definitions more customizable
Dmitry Gutov [Wed, 22 May 2019 22:30:50 +0000 (01:30 +0300)]
Make xref-find-definitions more customizable

* lisp/progmodes/xref.el (xref--show-defs-buffer): New function.
Move a bit of logic from xref--show-defs to make it more
customizable.
(xref--push-markers): New function, extracted from
xref--show-xrefs.
(xref-show-definitions-function): Set to the new function.

5 years agoSeparate xref-find-definitions' behavior from other commands
Dmitry Gutov [Wed, 22 May 2019 22:16:41 +0000 (01:16 +0300)]
Separate xref-find-definitions' behavior from other commands

* lisp/progmodes/xref.el (xref-show-definitions-function):
New variable.
(xref--show-defs): Split off from xref--show-xrefs.
(xref--find-definitions): Use it.
(xref--not-found-error): New function.
(xref--show-xrefs): Simplify.  Show the list buffer even when
there is just one item in the list.  Remove the last argument.

* lisp/dired-aux.el (dired-do-find-regexp): Update accordingly.

5 years agoRemove fixnum restriction on some display vars
Paul Eggert [Wed, 22 May 2019 20:25:47 +0000 (13:25 -0700)]
Remove fixnum restriction on some display vars

This is a minor patch to remove some fixnum restrictions.
Many more such patches are needed, but one thing at a time.
* doc/emacs/custom.texi (Examining): Update fill-column example.
* src/buffer.c (fill-column, left-margin, tab-width)
(buffer-saved-size, left-margin-width, right-margin-width)
(left-fringe-width, right-fringe-width, scroll-bar-width)
(scroll-bar-height, buffer-display-count):
Allow any integer; do not restrict to fixnums.
* src/character.h (SANE_TAB_WIDTH): Do not assume tab_width
is a nonnegative fixnum.
(sanitize_tab_width): Take a Lisp_Object integer, not an
EMACS_INT.  Only use changed.
* src/data.c (store_symval_forwarding): Remove unnecessary
SYMBOLP since the predicate (e.g., Qintegerp) is always a
symbol (leave the test in as an eassert).  Avoid assignments
inside if-conditions.
* src/fileio.c (Fdo_auto_save): Do not assume
buffer-saved-size is a fixnum.  Avoid undefined behavior
on EMACS_INT overflow by multiplying a fixnum by at most 4,
not by at most 13.
* src/window.c (set_window_buffer): When buffer-display-count
is too large for a fixnum, make it a bignum.
* src/xdisp.c (FILL_COLUMN_INDICATOR_NEEDED): Remove macro, ...
(fill_column_indicator_column): ... replacing with this new function.
All uses changed.  The function is a bit pickier, to prevent
problems with non-character fixnums and columns out of range
for int, and to remove the assumption that integers are in
fixnum range.
(append_space_for_newline, extend_face_to_end_of_line):
Avoid undefined behavior with signed integer overflow.
Simplify.

5 years agoMerge from origin/emacs-26
Glenn Morris [Wed, 22 May 2019 17:18:51 +0000 (10:18 -0700)]
Merge from origin/emacs-26

b0da915 (origin/emacs-26, emacs-26) Fix a typo in ELisp manual
400907b Add option to disable help completion autoloading (Bug#28607)
122ba16 Don't segfault on force-window-update of deleted window
015b12e Fix typo in ELisp manual
eadf044 Remove repeated function call in picture.el
1228a90 ; Fix mm-destroy-parts docstring typo
6cfd68d Fix Hideshow key binding typo in Emacs manual

5 years ago; Merge from origin/emacs-26
Glenn Morris [Wed, 22 May 2019 17:18:51 +0000 (10:18 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

7ce4b35 Backport: Fix name of gnus-summary-sort-by-mark(s)

5 years agoMerge from origin/emacs-26
Glenn Morris [Wed, 22 May 2019 17:18:51 +0000 (10:18 -0700)]
Merge from origin/emacs-26

5d24af8 Remove from docs references to obsolete MULE variables
2bdc419 Do potentially destructive operations in prepare-commit-msg

# Conflicts:
# src/search.c