]> git.eshelyaron.com Git - emacs.git/log
emacs.git
5 years agoMerge from origin/emacs-26
Glenn Morris [Fri, 7 Jun 2019 14:50:48 +0000 (07:50 -0700)]
Merge from origin/emacs-26

2860285 Allow macros autoloaded as functions during bytecomp (Bug#36022)

5 years agoFix failures of term-tests on MS-Widows
Eli Zaretskii [Fri, 7 Jun 2019 09:01:11 +0000 (12:01 +0300)]
Fix failures of term-tests on MS-Widows

* test/lisp/term-tests.el (term-simple-lines)
(term-carriage-return, term-line-wrap, term-cursor-movement)
(term-scrolling-region, term-set-directory)
(term-line-wrapping-then-motion, term-to-margin): Skip tests
on MS-Windows and MS-DOS.

5 years agoConsider line spacing and font height when deriving proc window size
John Shahid [Sat, 27 Apr 2019 16:21:38 +0000 (12:21 -0400)]
Consider line spacing and font height when deriving proc window size

* lisp/window.el (window-adjust-process-window-size): Use
  window-screen-lines instead of window-body-height.
* lisp/term.el (term-mode): Use window-screen-lines to set the initial
  window height.

5 years agoFix image_set_crop yet again
YAMAMOTO Mitsuharu [Fri, 7 Jun 2019 08:43:39 +0000 (17:43 +0900)]
Fix image_set_crop yet again

* src/image.c (image_set_crop) [HAVE_NATIVE_TRANSFORMS]: Don't call
compute_image_size, as it is already called from image_set_size.
(image_set_size, image_set_crop) [HAVE_NATIVE_TRANSFORMS]: Use harmless
matrix transformation code also for USE_CAIRO and HAVE_NTGUI cases,
though image_set_transform is not yet implemented on them.

5 years agoAvoid compiler warning in copy-file-range.c on MS-Windows
Eli Zaretskii [Fri, 7 Jun 2019 08:15:51 +0000 (11:15 +0300)]
Avoid compiler warning in copy-file-range.c on MS-Windows

* nt/mingw-cfg.site (gl_cv_func_copy_file_range): Set to "yes",
to avoid compiling lib/copy-file-range.c on MS-Windows.

5 years agoFix recently-introduced image_set_crop typo
Paul Eggert [Fri, 7 Jun 2019 07:33:47 +0000 (00:33 -0700)]
Fix recently-introduced image_set_crop typo

* src/image.c (image_set_crop) [!HAVE_NATIVE_TRANSFORMS]:
Don’t call compute_image_size, as it does not exist and its
result is not needed.

5 years agoUse copy_file_range to copy files
Paul Eggert [Fri, 7 Jun 2019 04:18:11 +0000 (21:18 -0700)]
Use copy_file_range to copy files

The copy_file_range syscall (introduced in Linux kernel
version 4.5) can copy files more efficiently via server-side
copy etc.
* admin/merge-gnulib (GNULIB_MODULES): Add copy-file-range.
* lib/copy-file-range.c, m4/copy-file-range.m4:
New files, copied from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* src/fileio.c (Fcopy_file): Try copy_file_range first,
falling back on read+write only if copy_file_range failed or
if the input is empty and so could be a /proc file.

5 years agoUpdate from Gnulib
Paul Eggert [Thu, 6 Jun 2019 15:56:03 +0000 (08:56 -0700)]
Update from Gnulib

This incorporates:
2019-06-04 copy-file-range: new module
2019-05-28 binaty-io: O_BINARY on consoles no longer fails
* doc/misc/texinfo.tex, lib/binary-io.c, lib/binary-io.h:
* lib/unistd.in.h, m4/unistd_h.m4: Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.

5 years agoAdd "pin" to password-word-equivalents (Bug#35523)
Noam Postavsky [Sat, 4 May 2019 17:20:42 +0000 (13:20 -0400)]
Add "pin" to password-word-equivalents (Bug#35523)

* lisp/international/mule-conf.el (password-word-equivalents): Add "pin".
* test/lisp/comint-tests.el (comint-testsuite-password-strings): Add
test case.

5 years agoFix overflow issues in image rotation
Paul Eggert [Thu, 6 Jun 2019 15:09:58 +0000 (08:09 -0700)]
Fix overflow issues in image rotation

Also, do some refactoring to simplify code.
* src/dispextern.h (INIT_MATRIX, COPY_MATRIX, MULT_MATRICES): Remove.
* src/image.c (matrix3x3): New type, replacing all uses of 3x3 double.
(matrix3x3_copy, matrix3x3_mult): New functions, replacing
COPY_MATRIX, MULT_MATRICES.  Replace INIT_MATRIX by C initializers.
(image_set_rotation): Use Fmod to avoid undefined behavior on
double-to-int conversion and to reduce bignum rotations correctly.
(image_set_crop): Finish up previous correction, by not re-setting
width and height if compute_image_size has set them.
Prefer shifting right by 1 to dividing by 2 if either will do.

5 years agoFix redisplay glitches with RTL composed text
Eli Zaretskii [Thu, 6 Jun 2019 14:12:57 +0000 (17:12 +0300)]
Fix redisplay glitches with RTL composed text

* src/xdisp.c (init_to_row_end): Fail if the first visible
position on the line following ROW is bidi-reordered and could
be composed.  (Bug#35811)

5 years agolisp/gnus/message.el (message--send-mail-maybe-partially): Extract
Oleh Krehel [Thu, 6 Jun 2019 14:08:48 +0000 (16:08 +0200)]
lisp/gnus/message.el (message--send-mail-maybe-partially): Extract

5 years agolisp/gnus/message.el (message--check-continuation-headers): Extract
Oleh Krehel [Thu, 6 Jun 2019 14:01:10 +0000 (16:01 +0200)]
lisp/gnus/message.el (message--check-continuation-headers): Extract

5 years agolisp/gnus/message.el (message--fold-long-headers): Add docstring
Oleh Krehel [Thu, 6 Jun 2019 13:50:46 +0000 (15:50 +0200)]
lisp/gnus/message.el (message--fold-long-headers): Add docstring

5 years agoRestore height and with from that were accidentally removed
Mark A. Hershberger [Thu, 6 Jun 2019 13:07:36 +0000 (09:07 -0400)]
Restore height and with from that were accidentally removed

See 610fb73ab6d7a22b722f523d6ebc4aa8fa1db7c9
USE_CARIO needs these.

5 years agoCheck rcirc-server for auto authentication (Bug#10162)
Steve Scott [Mon, 3 Jun 2019 00:55:34 +0000 (21:55 -0300)]
Check rcirc-server for auto authentication (Bug#10162)

Since the hostname returned by irc.freenode.net can be something other
than irc.freenode.net, e.g. niven.freenode.net, the entries for
rcirc-authinfo and rcirc-server-alist will not match.
* lisp/net/rcirc.el (rcirc-handler-001): Check rcirc-server (the
hostname connected to) instead of rcirc-server-name (the hostname
returned), this corresponds with what rcirc-authenticate does.
Moreover, if rcirc-auto-authenticate-flag is set, check the
corresponding rcirc-authinfo, regardless of whether the
rcirc-authenticate-before-join must happen.

Copyright-paperwork-exempt: yes

5 years agoKeep nxml prolog updated via syntax-propertize
Noam Postavsky [Wed, 5 Jun 2019 23:24:58 +0000 (19:24 -0400)]
Keep nxml prolog updated via syntax-propertize

Instead of using after-change-functions.  Also, stop consulting
nxml-prolog-regions during syntax-propertize.  It turns out the
problems fixed by using prolog information are actually due to using
the wrong syntax table during propertizing.  This was fixed in
2019-06-04 "* lisp/emacs-lisp/syntax.el: Use syntax-ppss-table for
syntax-propertize." so consulting the prolog data is no longer needed.
* lisp/nxml/nxml-rap.el (nxml-maybe-rescan-prolog): Remove.
* lisp/nxml/nxml-mode.el (nxml-mode): Stop using it.
(nxml-syntax-propertize): Don't use nxml-prolog-regions, just call
nxml-scan-prolog if needed before delegating to
sgml-syntax-propertize.
* test/lisp/nxml/nxml-mode-tests.el (nxml-mode-edit-prolog): New test.

5 years agoAdd native image rotation and cropping
Alan Third [Wed, 5 Jun 2019 20:51:33 +0000 (21:51 +0100)]
Add native image rotation and cropping

* lisp/image.el (image--get-imagemagick-and-warn): Only fallback to
ImageMagick if native transforms aren't available.
* src/dispextern.h (INIT_MATRIX, COPY_MATRIX, MULT_MATRICES): New
macros for matrix manipulation.
(HAVE_NATIVE_SCALING, HAVE_NATIVE_TRANSFORMS): Rename and change all
relevant locations.
* src/image.c (x_set_image_rotation):
(x_set_transform): New functions.
(x_set_image_size): Use transform matrix for resizing under X and NS.
(x_set_image_crop): New function.
(lookup_image): Use the new transform functions.
(Fimage_scaling_p, Fimage_transforms_p): Rename and update all
callers.
* src/nsimage.m (ns_load_image): Remove rotation code.
(ns_image_set_transform): New function.
([EmacsImage dealloc]): Release the saved transform.
([EmacsImage rotate:]): Remove unneeded method.
([EmacsImage setTransform:]): New method.
* src/nsterm.h (EmacsImage): Add transform property and update method
definitions.
* src/nsterm.m (ns_dumpglyphs_image): Use the transform to draw the
image correctly.
* src/xterm.c (x_composite_image): Use PictOpSrc as we don't care
about alpha values here.
* doc/lispref/display.texi (Image Descriptors): Add :rotation.
(ImageMagick Images): Remove :rotation.

5 years agoNo longer add debug symbols to release build
Phillip Lord [Thu, 25 Apr 2019 14:26:26 +0000 (15:26 +0100)]
No longer add debug symbols to release build

* admin/nt/dist-build/build-zips.sh: Remove -g3 from release build and
  install with install-strip

5 years ago* lisp/wid-edit.el (widget-choose): Use display-buffer-in-direction
Juri Linkov [Wed, 5 Jun 2019 20:57:07 +0000 (23:57 +0300)]
* lisp/wid-edit.el (widget-choose): Use display-buffer-in-direction

to display buffer in bottom direction with fit-window-to-buffer.

* lisp/proced.el (proced-with-processes-buffer): Idem.  (Bug#35592)

5 years ago* doc/misc/tramp.texi (Obtaining Tramp): Explain version scheme.
Michael Albinus [Wed, 5 Jun 2019 14:23:03 +0000 (16:23 +0200)]
* doc/misc/tramp.texi (Obtaining Tramp): Explain version scheme.

(Traces and Profiles): Add `tramp-verbose' to @vindex.

5 years ago; Add test for Bug#36092
Noam Postavsky [Wed, 5 Jun 2019 01:08:26 +0000 (21:08 -0400)]
; Add test for Bug#36092

* test/lisp/nxml/nxml-mode-tests.el (nxml-mode->-after-quote): New
test.

5 years agoDo not use syntax-ppss-table in syntax-propertize when nil (Bug#36095)
Dario Gjorgjevski [Wed, 5 Jun 2019 09:07:49 +0000 (11:07 +0200)]
Do not use syntax-ppss-table in syntax-propertize when nil (Bug#36095)

* lisp/emacs-lisp/syntax.el (syntax-propertize): Use (syntax-table)
instead of syntax-ppss-table when the latter is nil.

5 years ago* lisp/emacs-lisp/syntax.el: Use syntax-ppss-table for syntax-propertize.
Stefan Monnier [Wed, 5 Jun 2019 01:48:06 +0000 (21:48 -0400)]
* lisp/emacs-lisp/syntax.el: Use syntax-ppss-table for syntax-propertize.

`syntax-ppss` uses `syntax-ppss-table` while parsing the buffer as well
as when it calls `syntax-propertize`, but `syntax-propertize` can also
be called directly rather than via `syntax-ppss` so it needs to explicitly
use `syntax-ppss-table` as well in order to avoid using sometimes one
table and sometimes another.

(syntax-ppss-table): Move before new use.
(syntax-propertize): Use it.

5 years agoRemove retired maintainers from comments
Paul Eggert [Tue, 4 Jun 2019 19:42:17 +0000 (12:42 -0700)]
Remove retired maintainers from comments

* lisp/international/quail.el, lisp/language/ind-util.el:
* lisp/language/indian.el, lisp/mail/smtpmail.el, lisp/mwheel.el:
* lisp/obsolete/longlines.el, lisp/progmodes/idlw-complete-structtag.el:
* lisp/progmodes/idlw-help.el, lisp/progmodes/idlw-shell.el:
* lisp/progmodes/idlw-toolbar.el, lisp/progmodes/idlwave.el:
* lisp/progmodes/simula.el, lisp/ps-print.el, lisp/ps-samp.el:
Remove Maintainer: lines for maintainers who have retired.

5 years ago* lisp/emacs-lisp/thunk.el (thunk-delay): Fix memory leak
Stefan Monnier [Tue, 4 Jun 2019 16:55:53 +0000 (12:55 -0400)]
* lisp/emacs-lisp/thunk.el (thunk-delay): Fix memory leak

Get rid of references to the free variables of `body` once the thunk has
been forced (bug#30626).

5 years ago* sgml-mode.el (sgml-syntax-propertize-rules): More verbose comments
Stefan Monnier [Tue, 4 Jun 2019 16:26:52 +0000 (12:26 -0400)]
* sgml-mode.el (sgml-syntax-propertize-rules): More verbose comments

5 years agoSpecify the matching chars for JSX open/close parenthesis
Jackson Ray Hamilton [Tue, 4 Jun 2019 15:37:36 +0000 (08:37 -0700)]
Specify the matching chars for JSX open/close parenthesis

* lisp/progmodes/js.el (js-jsx--syntax-propertize-tag): Indicate the
matching parenthesis character (since JSX’s < and > aren’t typical
parenthesis) for the sake of packages like rainbow-delimiters which
need that information.

5 years agoRevert "Add extra text property to fix issue with js2-mode integration"
Jackson Ray Hamilton [Tue, 4 Jun 2019 15:23:11 +0000 (08:23 -0700)]
Revert "Add extra text property to fix issue with js2-mode integration"

This reverts commit 382a508ed21e4f12ace9f8871818e25235e8f05e.

We ended up deciding against using this in js2-mode.  Instead,
js2-mode may eventually use js-mode’s syntax-propertize-function to
set syntax-table text properties.

5 years agoUpdate lispref spellfile
Paul Eggert [Tue, 4 Jun 2019 15:31:07 +0000 (08:31 -0700)]
Update lispref spellfile

* doc/lispref/spellfile: Omit words no longer in the manual.
How is this spellfile used?  Does anybody use it any more?

5 years agoAdjust comments/debug to match C bignum code
Paul Eggert [Tue, 4 Jun 2019 15:29:37 +0000 (08:29 -0700)]
Adjust comments/debug to match C bignum code

* doc/lispintro/emacs-lisp-intro.texi (Digression into C):
Adjust to match current C code.
* lisp/emacs-lisp/ert.el (ert--force-message-log-buffer-truncation):
Simplify.
* src/.gdbinit (Lisp_Object_Printer.to_string): Return
a string that says "make_fixnum", not "make_number".

5 years agoAlways allow at least double-precision bignums
Paul Eggert [Tue, 4 Jun 2019 15:13:20 +0000 (08:13 -0700)]
Always allow at least double-precision bignums

Without this fix, Emacs can get into a tight loop reporting
a range error when calculating timestamps.
* doc/lispref/numbers.texi (Integer Basics):
* src/alloc.c (syms_of_alloc): Document this.
* src/bignum.c (make_bignum_bits): Always allow bignums
of at least twice the width of (u)intmax_t.

5 years ago* lisp/gnus/message.el (message-send-mail): Tweak last commit
Stefan Monnier [Tue, 4 Jun 2019 13:18:01 +0000 (09:18 -0400)]
* lisp/gnus/message.el (message-send-mail): Tweak last commit

5 years agoKeep nxml-prolog-end up to date (Bug#18871)
Noam Postavsky [Sat, 18 May 2019 18:54:36 +0000 (14:54 -0400)]
Keep nxml-prolog-end up to date (Bug#18871)

The change on 2016-01-16 "lisp/nxml: Use syntax-tables for comments"
removed the update of nxml-prolog-end, although it already failed to
work correctly after 2013-10-07 "* lisp/nxml/nxml-mode.el: Use
lexical-binding and syntax-propertize."
* lisp/nxml/nxml-rap.el: New function.
* lisp/nxml/nxml-mode.el (nxml-mode): Add it to
after-change-functions.

5 years agoDon't sgml-syntax-propertize-inside XML prolog (Bug#32823)
Noam Postavsky [Sat, 18 May 2019 18:37:51 +0000 (14:37 -0400)]
Don't sgml-syntax-propertize-inside XML prolog (Bug#32823)

* lisp/nxml/nxml-mode.el (nxml-syntax-propertize): New function.
(nxml-mode): Use it as the syntax-propertize-function.
* test/lisp/nxml/nxml-mode-tests.el (nxml-mode-doctype-and-quote-syntax)
(nxml-mode-prolog-comment): New tests.

5 years agoDon't fontify text outside of SGML/XML tags (Bug#33887)
Noam Postavsky [Sun, 26 May 2019 21:41:22 +0000 (17:41 -0400)]
Don't fontify text outside of SGML/XML tags (Bug#33887)

* lisp/textmodes/sgml-mode.el (sgml-font-lock-syntactic-face): New
function.
(sgml-mode):
* lisp/nxml/nxml-mode.el (nxml-mode): Use it as
font-lock-syntactic-face-function value.

5 years agoFix some SGML syntax edge cases (Bug#33887)
Noam Postavsky [Sun, 26 May 2019 15:07:14 +0000 (11:07 -0400)]
Fix some SGML syntax edge cases (Bug#33887)

* lisp/textmodes/sgml-mode.el (sgml-syntax-propertize-rules): Handle
single and double quotes symmetrically.  Don't skip quoted comment
enders.
* test/lisp/textmodes/sgml-mode-tests.el (sgml-tests--quotes-syntax):
Add more test cases.
(sgml-mode-quote-in-long-text): New test.

5 years agoStronger check for Tramp method
Michael Albinus [Tue, 4 Jun 2019 10:51:45 +0000 (12:51 +0200)]
Stronger check for Tramp method

* lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
* lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-maybe-open-connection):
Use `tramp-get-connection-name'.

* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link):
* lisp/net/tramp-smb.el (tramp-smb-handle-make-symbolic-link):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-make-symbolic-link):
Don't check remote TARGET.

* lisp/net/tramp.el (tramp-dissect-file-name): Check for proper method.
(tramp-file-name-for-operation): Take only 2nd argument into
account for file name handler.
(tramp-file-name-handler): Suppress checks for `file-remote-p'.

* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test02-file-name-dissect): Suppress check for wrong
method.

* test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case):
Dump *all* Tramp buffers.
(tramp-test02-file-name-dissect)
(tramp-test02-file-name-dissect-simplified)
(tramp-test02-file-name-dissect-separate): Check also wrong method.
(tramp-test03-file-name-defaults): Check, that the respective
Tramp package is loaded.
(tramp-test04-substitute-in-file-name)
(tramp-test05-expand-file-name)
(tramp-test06-directory-file-name, tramp-test44-auto-load):
Suppress check for wrong method.
(tramp-test30-make-process): Remove instrumentation code.
(tramp-test31-interrupt-process, tramp-test36-vc-registered):
Guarantee that connection is established prior starting process.

5 years ago* src/xterm.c (x_scroll_run) [USE_CAIRO]: Dirty only destination rectangle.
YAMAMOTO Mitsuharu [Tue, 4 Jun 2019 07:19:54 +0000 (16:19 +0900)]
* src/xterm.c (x_scroll_run) [USE_CAIRO]: Dirty only destination rectangle.

5 years ago* src/image.c (cr_create_cr_surface_from_image): Add const to variable `key'.
YAMAMOTO Mitsuharu [Tue, 4 Jun 2019 07:15:35 +0000 (16:15 +0900)]
* src/image.c (cr_create_cr_surface_from_image): Add const to variable `key'.

5 years agoLet untarring (and hence package installation) go faster (Bug#35909)
Noam Postavsky [Sat, 25 May 2019 23:44:41 +0000 (19:44 -0400)]
Let untarring (and hence package installation) go faster (Bug#35909)

* lisp/subr.el (progress-reporter-update)
(progress-reporter-force-update, progress-reporter-do-update): Accept
new optional argument, SUFFIX.
* doc/lispref/display.texi (Progress): Document it.
* etc/NEWS: Announce it.
* lisp/tar-mode.el (tar-untar-buffer): Use a progress reporter instead
of calling message.  Suppress message from write-region.  Let-bind
write-region-inhibit-fsync to t.

5 years agoUser-friendly display of error messages at the end of minibuffer
Juri Linkov [Mon, 3 Jun 2019 20:27:19 +0000 (23:27 +0300)]
User-friendly display of error messages at the end of minibuffer

* lisp/simple.el (minibuffer-setup-hook): Add minibuffer-error-initialize.
(minibuffer-error-initialize, minibuffer-error-function): New functions.
(Bug#34939)

5 years ago* lisp/char-fold.el (char-fold-make-table): New function
Juri Linkov [Mon, 3 Jun 2019 20:18:31 +0000 (23:18 +0300)]
* lisp/char-fold.el (char-fold-make-table): New function

with body extracted from INITVALUE of defconst (bug#35689).
Bind search-spaces-regexp to nil (bug#35802).

* test/lisp/char-fold-tests.el: Relocate helpers to file beginning.
(char-fold--test-bug-35802): New test.

5 years ago* lisp/gnus/gnus-async.el: Use lexical-binding
Stefan Monnier [Mon, 3 Jun 2019 17:44:23 +0000 (13:44 -0400)]
* lisp/gnus/gnus-async.el: Use lexical-binding

Remove redundant :group args.
(gnus-async-post-fetch-function): Make it always be a function.
(gnus-make-async-article-function, gnus-async-prefetch-headers):
Use a closure rather than `(lambda ...)

5 years agolisp/gnus/message.el (message-send-mail): Don't wrongly assert on Unicode msg
Oleh Krehel [Mon, 3 Jun 2019 13:48:09 +0000 (15:48 +0200)]
lisp/gnus/message.el (message-send-mail): Don't wrongly assert on Unicode msg

Using this setting:

    (setq message-send-mail-function 'message-send-mail-with-sendmail)
    (setq sendmail-program "msmtp")

the message seding is handled by an external program, so no Unicode
encoding is performed in Emacs. Thus Emacs must not assert that the
Unicode encoding was performed.

5 years ago* help-fns.el (help-fns--first-release): Do not fail if no release is found.
Juanma Barranquero [Mon, 3 Jun 2019 00:13:57 +0000 (02:13 +0200)]
* help-fns.el (help-fns--first-release): Do not fail if no release is found.

5 years ago* gnus-(sum|async).el: Eliminate assumptions about gnus-data format
Stefan Monnier [Sun, 2 Jun 2019 23:21:45 +0000 (19:21 -0400)]
* gnus-(sum|async).el: Eliminate assumptions about gnus-data format

* lisp/gnus/gnus-async.el (gnus-async-with-semaphore): Use `declare`.
(gnus-async-prefetch-next): Don't assume gnus-data-number == car.

* lisp/gnus/gnus-sum.el (gnus-data-find-in): New function.
(gnus-data-find, gnus-data-find-list): Use it.
(gnus-summary-article-subject): Make it a function.
(gnus--dummy-data-list): New const.
(gnus-update-summary-mark-positions): Use it.

5 years ago* gnus.el: Fix cycle in eager macroexpansion
Stefan Monnier [Sun, 2 Jun 2019 17:04:13 +0000 (13:04 -0400)]
* gnus.el: Fix cycle in eager macroexpansion

* lisp/gnus/gnus-sum.el (gnus-data): Use cl-defstruct.
(gnus-data-set-pos, gnus-data-set-header, gnus-data-set-mark)
(gnus-data-set-number): Delete macros; use `setf` instead.
(gnus-data-unread-p, gnus-data-read-p, gnus-data-pseudo-p, gnus-data-find)
(gnus-summary-skip-intangible, gnus-summary-article-number):
Redefine as inlinable functions rather than macros.

* lisp/gnus/gnus.el: Adjust autoloads for the macros turned functions.

5 years ago* lisp/help-fns.el: Make hyperlink for the "first release" info
Stefan Monnier [Sun, 2 Jun 2019 15:52:41 +0000 (11:52 -0400)]
* lisp/help-fns.el: Make hyperlink for the "first release" info

* lisp/help-fns.el (help-fns--first-release): Return a "button".
(help-fns--mention-first-release): Preserve the string's text-properties.

* lisp/help-mode.el (help-news): New button type.

5 years agoChange default offset of CC Mode syntactic symbol inlambda to 0
Alan Mackenzie [Sun, 2 Jun 2019 14:05:33 +0000 (14:05 +0000)]
Change default offset of CC Mode syntactic symbol inlambda to 0

It's previous default was c-lineup-inexpr-block.  This change is mainly to
prevent excessive indentation of the innards of C++ lambda functions.

* lisp/progmodes/cc-vars.el (c-offsets-alist): Amend the offset for inlambda
to 0.

* doc/misc/cc-mode.texi (FAQ): Amend the answer to the question about this
matter.

5 years agoSkip some flymake tests on hydra.nixos.org
Glenn Morris [Sun, 2 Jun 2019 02:37:35 +0000 (19:37 -0700)]
Skip some flymake tests on hydra.nixos.org

* test/lisp/progmodes/flymake-tests.el (perl-backend)
(included-c-header-files, recurrent-backend):
Skip on hydra.nixos due to frequent intermittent failures.  (Bug#32764)

5 years agoUse lexical-binding in morse.el and studly.el and add tests
Stefan Kangas [Sun, 2 Jun 2019 01:51:06 +0000 (18:51 -0700)]
Use lexical-binding in morse.el and studly.el and add tests

* lisp/play/morse.el: Use lexical-binding.
* lisp/play/studly.el: Use lexical-binding.
* test/lisp/play/morse-tests.el: New file.
* test/lisp/play/studly-tests.el: New file.

5 years agoUse lexical-binding in paragraphs.el and add tests
Stefan Kangas [Sun, 2 Jun 2019 01:47:14 +0000 (18:47 -0700)]
Use lexical-binding in paragraphs.el and add tests

* lisp/textmodes/paragraphs.el: Use lexical-binding.
(repunctuate-sentences): Make it work non-interactively.
* test/lisp/textmodes/paragraphs-tests.el: New file.

5 years agoFix .gitignore spec for personal customizations
Paul Eggert [Sun, 2 Jun 2019 01:33:55 +0000 (18:33 -0700)]
Fix .gitignore spec for personal customizations

Problem reported by Mauro Aranda (Bug#35945).
* .gitignore: Replace .dir-locals?.el with .dir-locals-2.el.

5 years agoTune cl-assoc
Paul Eggert [Sun, 2 Jun 2019 01:12:31 +0000 (18:12 -0700)]
Tune cl-assoc

* lisp/emacs-lisp/cl-seq.el (cl-assoc): Use assq for fixnums.

5 years agoFix `cl-member' and `cl-assoc' for bignums
Mattias Engdegård [Sun, 2 Jun 2019 00:57:51 +0000 (17:57 -0700)]
Fix `cl-member' and `cl-assoc' for bignums

* lisp/emacs-lisp/cl-seq.el (cl-member, cl-assoc): Work with bignums.
* test/lisp/emacs-lisp/cl-seq-tests.el (cl-seq-bignum-eql): New.

5 years ago; Add NEWS entry for previous change
Noam Postavsky [Mon, 27 May 2019 00:30:09 +0000 (20:30 -0400)]
; Add NEWS entry for previous change

5 years agoMake rcirc PART and QUIT reasons customizable (Bug#12857)
Daniel Ralston [Thu, 13 Dec 2012 15:05:08 +0000 (07:05 -0800)]
Make rcirc PART and QUIT reasons customizable (Bug#12857)

* rcirc.el: (rcirc-default-part-reason, rcirc-default-quit-reason):
New customizable vars.
(rcirc-cmd-quit, rcirc-cmd-part): Consult them.

Copyright-paperwork-exempt: yes

5 years agoHandle argument to rcirc /part properly (Bug#11157)
Noam Postavsky [Mon, 27 May 2019 00:17:38 +0000 (20:17 -0400)]
Handle argument to rcirc /part properly (Bug#11157)

* lisp/net/rcirc.el (part): Split out channel name and part reason.
* doc/misc/rcirc.texi (rcirc commands): Clarify that channel name may
be provided to /part.

5 years ago* lisp/net/rcirc.el: Remove redundant :group usage
Noam Postavsky [Thu, 16 May 2019 11:19:45 +0000 (07:19 -0400)]
* lisp/net/rcirc.el: Remove redundant :group usage

... and empty Todo comment section.

5 years agoAllow macros autoloaded as functions during bytecomp (Bug#36022)
Noam Postavsky [Fri, 31 May 2019 12:24:56 +0000 (08:24 -0400)]
Allow macros autoloaded as functions during bytecomp (Bug#36022)

* lisp/emacs-lisp/bytecomp.el (byte-compile-callargs-warn): Don't pass
symbols which don't have a known definition to
byte-compile--function-signature, it fails to compile code which
previously compiled successfully (for example, gnus.el until
2019-06-01 "* lisp/gnus/gnus.el: Mark autoloaded macros as such" which
autoloads some macros as if they were functions).

5 years ago; Fix stray merge conflict
Glenn Morris [Sat, 1 Jun 2019 21:00:43 +0000 (14:00 -0700)]
; Fix stray merge conflict

5 years agoDebug and disentangle the literal cacheing in CC Mode
Alan Mackenzie [Sat, 1 Jun 2019 20:15:13 +0000 (20:15 +0000)]
Debug and disentangle the literal cacheing in CC Mode

(Final Commit)

* lisp/progmodes/cc-engine.el (c-semi-trim-near-cache): Correct a comparison
with the wrong ...-limit variable.
(c-semi-pp-to-literal): Remove a wrong setting of c-lit-pos-cache-limit.
(c-full-get-near-cache-entry): Eliminate extravagant and unneeded coding.
(c-state-cache-init, c-record-parse-state-state): No longer manipulate
c-lit-pos-cache, which is no longer regarded as part of c-parse-state.

* lisp/progmodes/cc-mode.el (c-basic-common-init): Call
c-truncate-lit-pos-cache to initialize the literal cache.

5 years ago* lisp/progmodes/cc-engine.el: Permute certain literal cacheing functions
Alan Mackenzie [Sat, 1 Jun 2019 20:08:27 +0000 (20:08 +0000)]
* lisp/progmodes/cc-engine.el: Permute certain literal cacheing functions

5 years agoTidy up the literal cacheing in CC Mode, optimizing c-full-pp-to-literal
Alan Mackenzie [Sat, 1 Jun 2019 19:56:07 +0000 (19:56 +0000)]
Tidy up the literal cacheing in CC Mode, optimizing c-full-pp-to-literal

(Intermediate commit)

* lisp/progmodes/cc-engine.el, lisp/progmodes/cc-fonts.el
* lisp/progmodes/cc-mode.el : Rename:
c-state-semi-nonlit-pos-cache -> c-lit-pos-cache,
c-state-semi-nonlit-pos-cache-limit -> c-lit-pos-cache-limit,
c-state-semi-nonlit-near-cache -> c-semi-lit-near-cache,
c-truncate-semi-nonlit-pos-cache -> c-truncate-lit-pos-cache,
c-state-semi-trim-near-cache -> c-semi-trim-near-cache,
c-state-semi-get-near-cache-entry -> c-semi-get-near-cache-entry,
c-state-semi-put-near-cache-entry -> c-semi-put-near-cache-entry,
c-state-semi-pp-to-literal -> c-semi-pp-to-literal,
c-state-full-pp-to-literal -> c-full-pp-to-literal,
c-state-semi-trim-cache -> c-trim-lit-pos-cache.

* lisp/progmodes/cc-engine.el (c-semi-near-cache-limit): New variable.
(c-truncate-lit-pos-cache): This now truncates the cache variables for all
three lit- sub-caches.
(c-semi-put-near-cache-entry): Increase c-semi-near-cache-limit to the
position of the new entry.
(c-full-near-cache-limit, c-full-lit-near-cache): New variables.
(c-full-trim-near-cache, c-full-get-near-cache-entry)
(c-full-put-near-cache-entry): New functions.
(c-full-pp-to-literal): Amend to use the new functions, and to optimize the
use of the available caches, similarly to c-semi-pp-to-literal.

5 years ago; Unmaintain
Glenn Morris [Sat, 1 Jun 2019 19:11:55 +0000 (12:11 -0700)]
; Unmaintain

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

008b263 (origin/emacs-26, emacs-26) * lisp/gnus/gnus.el: Mark autoloa...
daf32f1 Speed up redisplay of HELLO
d8a6d82 Improve documentation of 'safe-local-variable' property

# Conflicts:
# etc/HELLO

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:

b3df372 * lisp/emacs-lisp/package.el: Obey buffer-file-coding-system ...

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 ago* lisp/gnus/gnus.el: Mark autoloaded macros as such.
Glenn Morris [Sat, 1 Jun 2019 18:33:25 +0000 (11:33 -0700)]
* lisp/gnus/gnus.el: Mark autoloaded macros as such.

This avoids a build failure.

5 years agoSpeed up redisplay of HELLO
Eli Zaretskii [Sat, 1 Jun 2019 15:52:11 +0000 (18:52 +0300)]
Speed up redisplay of HELLO

* etc/HELLO: Set 'inhibit-compacting-font-caches' non-nil
locally.  (Bug#36032)

* lisp/files.el: Add 'inhibit-compacting-font-caches' to the
list of built-in variables for which we set up
'safe-local-variable' properties.

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 agoImprove documentation of 'safe-local-variable' property
Eli Zaretskii [Sat, 1 Jun 2019 07:28:30 +0000 (10:28 +0300)]
Improve documentation of 'safe-local-variable' property

* doc/lispref/variables.texi (File Local Variables): Document
how to define 'safe-local-variable' properties for built-in
variables.

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 ago* lisp/emacs-lisp/package.el: Obey buffer-file-coding-system (bug#35739)
Stefan Monnier [Fri, 31 May 2019 04:54:05 +0000 (00:54 -0400)]
* lisp/emacs-lisp/package.el: Obey buffer-file-coding-system (bug#35739)

`url-insert-file-contents` saves in buffer-file-coding-system
the coding-system used to decode the contents.  Preserve this
as the contents is moved from buffer to string to buffer, and use
it when saving the contents to file, so as to try and better preserve
the original byte sequence.

(package--buffer-string, package--cs): New functions.
(package--check-signature): Encode `string` if a coding-system
was specified in buffer-file-coding-system.
(package--download-one-archive, package-install-from-archive):
Obey and preserve the buffer-file-coding-system if specified.

Do not merge.

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.