]> git.eshelyaron.com Git - emacs.git/log
emacs.git
5 years agoScore flex-style completions according to match tightness scratch/new-flex-completion-style
João Távora [Tue, 12 Feb 2019 21:55:34 +0000 (21:55 +0000)]
Score flex-style completions according to match tightness

The new completion style needs to score completion matches so that we
can use it later on when sorting the completions.  This is because, in
the flex style, "foo" can now match "foobar", "frodo" and
"barfromsober" but we probably want "foobar" to appear at the top of
the completion list.

This change makes the new flex completion style add sort-order hints
under the completion string's `completion-style-sort-order' property.

* lisp/minibuffer.el (completion-pcm--hilit-commonality): Propertize
completion with 'completion-pcm-commonality-score.
(completion-flx-all-completions): Propertize completion with
completion-style-sort-order and completion-style-annotation.

5 years agoAdd a new 'flex' completion style
João Távora [Tue, 12 Feb 2019 21:48:24 +0000 (21:48 +0000)]
Add a new 'flex' completion style

* lisp/minibuffer.el (completion-styles-alist): Add flex.
(completion-substring--all-completions): Accept
transform-pattern-fn arg.
(completion-flex-all-completions, completion-flex-try-completion)
(completion-flex--make-flex-pattern): New functions.

5 years ago* admin/notes/hydra: Small updates.
Glenn Morris [Tue, 12 Feb 2019 18:57:34 +0000 (13:57 -0500)]
* admin/notes/hydra: Small updates.

5 years agoAdd missing categories L, R, . and SPC to rx
Mattias Engdegård [Mon, 11 Feb 2019 20:50:56 +0000 (21:50 +0100)]
Add missing categories L, R, . and SPC to rx

* lisp/emacs-lisp/rx.el (rx-categories):
Add missing categories L, R, . and SPC.  (Bug#34436)

5 years agoSimplify url-digest-auth-make-cnonce
Paul Eggert [Mon, 11 Feb 2019 08:08:03 +0000 (00:08 -0800)]
Simplify url-digest-auth-make-cnonce

* lisp/url/url-auth.el (url-digest-auth-make-cnonce):
Simplify by using encode-time instead of round-tripping
through a format-time-string and ‘read’.

5 years agoDon’t assume CURRENT_TIME_LIST
Paul Eggert [Mon, 11 Feb 2019 07:46:24 +0000 (23:46 -0800)]
Don’t assume CURRENT_TIME_LIST

Use timestamp accessors instead of delving into a timestamp
format that is planned to change in a future version.
* lisp/find-lisp.el (find-lisp-format-time):
* lisp/gnus/gnus-group.el (gnus-group-set-timestamp):
* lisp/gnus/gnus-icalendar.el (gnus-icalendar-show-org-agenda):
Use encode-time instead of delving into timestamp format.
* lisp/gnus/gnus-group.el (gnus-group-timestamp-delta):
Use float-time instead of delving into timestamp format.
* lisp/gnus/nnmaildir.el (nnmaildir-request-accept-article):
Use format-time-string instead of delving into timestamp format.
* lisp/gnus/nnmaildir.el (nnmaildir-request-expire-articles):
Use time-less-p instead of delving into timestamp format.
* lisp/ido.el (ido-wash-history, ido-file-name-all-completions):
Use time-equal-p instead of delving into timestamp format.
* lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times):
Use format-time-string to generate POSIX ‘test -t’ format instead
of timestamp-format-dependent code along with shell arithmetic
that can’t possibly do the right thing on a POSIX platform.

5 years agoSimplify use of encode-time
Paul Eggert [Mon, 11 Feb 2019 04:25:22 +0000 (20:25 -0800)]
Simplify use of encode-time

Most uses of (apply #'encode-time foo) can now be replaced
with (encode-time foo).  Make similar simplifications.
* lisp/calendar/time-date.el (date-to-time):
* lisp/calendar/timeclock.el (timeclock-when-to-leave)
(timeclock-day-base, timeclock-generate-report):
* lisp/emacs-lisp/timer.el (timer-set-idle-time):
* lisp/eshell/esh-util.el (eshell-parse-ange-ls):
* lisp/gnus/gnus-art.el (article-make-date-line):
* lisp/gnus/gnus-delay.el (gnus-delay-article)
(gnus-delay-send-queue):
* lisp/gnus/gnus-icalendar.el (gnus-icalendar-event--decode-datefield):
* lisp/gnus/gnus-logic.el (gnus-advanced-date):
* lisp/gnus/message.el (message-make-expires-date):
* lisp/gnus/nndiary.el (nndiary-compute-reminders):
* lisp/mail/ietf-drums.el (ietf-drums-parse-date):
* lisp/net/tramp-adb.el (tramp-adb-ls-output-time-less-p):
* lisp/org/org-agenda.el (org-agenda-get-timestamps)
(org-agenda-get-progress, org-agenda-show-clocking-issues):
* lisp/org/org-capture.el (org-capture-set-target-location):
* lisp/org/org-clock.el (org-clock-get-sum-start, org-clock-sum)
(org-clocktable-steps):
* lisp/org/org-colview.el (org-colview-construct-allowed-dates)
* lisp/org/org-macro.el (org-macro--vc-modified-time):
* lisp/org/org-table.el (org-table-eval-formula):
* lisp/org/org.el (org-current-time, org-store-link)
(org-time-today, org-read-date, org-read-date-display)
(org-display-custom-time, org-time-string-to-time)
(org-timestamp-change, org-timestamp--to-internal-time):
* lisp/url/url-dav.el (url-dav-process-date-property):
* lisp/vc/vc-cvs.el (vc-cvs-annotate-current-time)
(vc-cvs-parse-entry):
Simplify use of encode-time.
* lisp/org/org-clock.el (org-clock-get-clocked-time):
(org-clock-resolve, org-resolve-clocks, org_clock_out)
(org-clock-update-time-maybe):
Avoid some rounding problems with encode-time and float-time.
* lisp/org/org-clock.el (org-clock-in, org-clock-update-time-maybe):
* lisp/org/org-colview.el (org-columns--age-to-minutes):
* lisp/org/org.el (org-get-scheduled-time, org-get-deadline-time)
(org-add-planning-info, org-2ft, org-time-string-to-absolute)
(org-closest-date):
Use org-time-string-to-time instead of doing it by hand with
encode-time.
* lisp/org/org.el (org-current-time): Simplify rounding.
(org-read-date): Avoid extra trip through encode-time.

5 years agoFix doc string treatment of integer overflow
Paul Eggert [Mon, 11 Feb 2019 07:47:43 +0000 (23:47 -0800)]
Fix doc string treatment of integer overflow

* lisp/calendar/cal-dst.el (calendar-dst-find-startend):
Fix doc string.

5 years agoPrefer encode-time to its alias
Paul Eggert [Mon, 11 Feb 2019 07:47:43 +0000 (23:47 -0800)]
Prefer encode-time to its alias

* lisp/calendar/icalendar.el, lisp/calendar/timeclock.el:
* lisp/emacs-lisp/timer.el, lisp/gnus/gnus-delay.el:
* lisp/gnus/gnus-sum.el, lisp/gnus/nndiary.el:
* lisp/gnus/nnrss.el, lisp/net/newst-backend.el:
* lisp/net/rcirc.el, lisp/obsolete/xesam.el:
* lisp/org/org-agenda.el, lisp/org/org-clock.el:
* lisp/org/org-element.el, lisp/org/org-timer.el:
* lisp/org/org.el, lisp/progmodes/flymake.el:
* lisp/url/url-cache.el, lisp/url/url-cookie.el:
Use encode-time instead of its alias seconds-to-time.

5 years ago* test/lisp/emacs-lisp/package-tests.el: Allow extra extras
Stefan Monnier [Sun, 10 Feb 2019 23:12:05 +0000 (18:12 -0500)]
* test/lisp/emacs-lisp/package-tests.el: Allow extra extras

(package-test--compatible-p): New function.
(package-test-desc-from-buffer, package-test-install-single): Use it.
(package-x-test-upload-buffer, package-x-test-upload-new-version):
Don't burp in presence of extra extras.

5 years agoDocument that [:cntrl:] does not match DEL (Bug#34391)
Mattias Engdegård [Sun, 10 Feb 2019 09:39:00 +0000 (10:39 +0100)]
Document that [:cntrl:] does not match DEL (Bug#34391)

* doc/lispref/searching.texi (Character Classes):
* lisp/emacs-lisp/rx.el (rx):
Document that [:cntrl:] excludes DEL.
* test/src/regex-emacs-tests.el (regex-tests-PTESTS-whitelist):
Swap misplaced comments and fix wrong code for DEL.

5 years agoProperly remove stale Flymake diagnostics on :region reports
João Távora [Sun, 10 Feb 2019 21:38:46 +0000 (21:38 +0000)]
Properly remove stale Flymake diagnostics on :region reports

Among other bugs fixed, modifying a list structure while iterating it
is a no-no.  This would again cause duplicate diagnostics.  See
https://github.com/joaotavora/eglot/issues/223 for an example.

* lisp/progmodes/flymake.el (Version): Bump to 1.0.5
(flymake--handle-report): Use cl-loop.

5 years agoUnbreak the Cygw32 build
Eli Zaretskii [Sun, 10 Feb 2019 15:10:04 +0000 (17:10 +0200)]
Unbreak the Cygw32 build

* src/emacs.c (main) [HAVE_NTGUI]: Remove code that is only
for WINDOWSNT or condition it on WINDOWSNT.  (Bug#34409)

5 years agoCleanup stale diagnostics on Flymake restart
João Távora [Sun, 10 Feb 2019 12:05:52 +0000 (12:05 +0000)]
Cleanup stale diagnostics on Flymake restart

Not doing so would cause duplicate diagnostics.  See
https://github.com/joaotavora/eglot/issues/223 for an example.

* lisp/progmodes/flymake.el (Version): 1.0.4
(flymake-mode): Cleanup overlays before starting Flymake.

5 years ago* lisp/ecomplete.el (ecomplete-add-item): Simplify.
Paul Eggert [Sun, 10 Feb 2019 03:28:27 +0000 (19:28 -0800)]
* lisp/ecomplete.el (ecomplete-add-item): Simplify.

5 years agoDon’t assume CURRENT_TIME_LIST
Paul Eggert [Sun, 10 Feb 2019 03:22:53 +0000 (19:22 -0800)]
Don’t assume CURRENT_TIME_LIST

* lisp/gnus/gnus-delay.el (gnus-delay-send-queue):
* lisp/gnus/nnmail.el (nnmail-activate):
* lisp/mh-e/mh-alias.el (mh-alias-tstamp):
* lisp/net/newst-backend.el (newsticker--cache-item-compare-by-time):
Use time-less-p instead of assuming timestamp format.

5 years agoFix byte compile warnings in checkdoc.el
Alex Branham [Sat, 2 Feb 2019 15:45:11 +0000 (09:45 -0600)]
Fix byte compile warnings in checkdoc.el

* lisp/emacs-lisp/checkdoc.el (checkdoc-file-comments-engine): Fix
  byte compile warnings by requiring lisp-mnt top-level, remove XEmacs
  compatibility code.

Bug#34290

5 years agoImpl. json-pretty-print with replace-region-contents + minimization
Tassilo Horn [Fri, 8 Feb 2019 19:39:00 +0000 (20:39 +0100)]
Impl. json-pretty-print with replace-region-contents + minimization

* lisp/json.el (json-pretty-print): Use the new
  replace-region-contents.  Add prefix arg for minimzation.
(json-pretty-print-buffer): Add prefix arg for minimzation.
(json-pretty-print-buffer-ordered): Add prefix arg for minimzation.
(json-pretty-print-ordered): Add prefix arg for minimzation.

5 years agoAdd new function replace-buffer-contents
Tassilo Horn [Fri, 8 Feb 2019 19:36:00 +0000 (20:36 +0100)]
Add new function replace-buffer-contents

* src/editfns.c (Freplace_buffer_contents): Use lower value of
  too_expensive and enable heuristic.
* lisp/subr.el (replace-region-contents): New convenient wrapper
  function around replace-buffer-contents.

5 years ago* lisp/emacs-lisp/package.el: Improve generated foo-pkg.el
Stefan Monnier [Fri, 8 Feb 2019 19:16:31 +0000 (14:16 -0500)]
* lisp/emacs-lisp/package.el: Improve generated foo-pkg.el

(package-generate-description-file): Make first line more informative.
(package-buffer-info): Include keywords, to more closely match
elpa.git's archive--metadata.

5 years agoMerge from origin/emacs-26
Glenn Morris [Fri, 8 Feb 2019 17:20:40 +0000 (09:20 -0800)]
Merge from origin/emacs-26

0cd7b52 (origin/emacs-26) Minor improvements to do strings in callproc.c
b8c7017 Improve documentation of 'date-to-time' and 'parse-time-string'
46095a7 Fix downloading of URLs that end in a slash
3b60a0a * doc/misc/eww.texi (Basics): Fix eww keybindings.  (Bug#34291)
8e22025 Fix process-thread docstring
459b669 Fix failures of vc-find-revision with non-ASCII file names
e9ff190 * doc/lispref/tips.texi (Documentation Tips): Fix quotes.  (B...
3e49a08 ; * src/coding.h (struct coding_system): Fix a typo in a comm...
b657286 Add documentation for tabulated-list functions in the elisp m...
6e0f67b Fix URL in ucs-normalize.el
ce3ae1f * etc/PROBLEMS: Amend entry for profiler bug #34235 to mentio...

# Conflicts:
# doc/lispref/os.texi

5 years ago; Merge from origin/emacs-26
Glenn Morris [Fri, 8 Feb 2019 17:18:08 +0000 (09:18 -0800)]
; Merge from origin/emacs-26

The following commit was skipped:

b51ac45 * make-dist: Remove references to src/stamp-h.in.

5 years agoMerge from origin/emacs-26
Glenn Morris [Fri, 8 Feb 2019 17:18:08 +0000 (09:18 -0800)]
Merge from origin/emacs-26

9d87ba1 * etc/PROBLEMS: Mention profiler-report bug (Bug#34235).

5 years agoMinor improvements to do strings in callproc.c
Eli Zaretskii [Fri, 8 Feb 2019 08:46:00 +0000 (10:46 +0200)]
Minor improvements to do strings in callproc.c

* src/callproc.c (Fcall_process, Fcall_process_region): Minor
fixes to doc strings.  Suggested by Nicholas Drozd
<nicholasdrozd@gmail.com>.  (Bug#34274)

5 years agoImprove documentation of 'date-to-time' and 'parse-time-string'
Eli Zaretskii [Fri, 8 Feb 2019 08:33:13 +0000 (10:33 +0200)]
Improve documentation of 'date-to-time' and 'parse-time-string'

* doc/lispref/os.texi (Time Parsing): Document
'parse-time-string', and refer to it for the description of
the argument of 'date-to-time'.

* lisp/calendar/time-date.el (date-to-time): Refer in the doc
string to 'parse-time-string' for more information about the
format of the DATE argument.  (Bug#34303)

5 years agoUnify three font info structures
Robert Pluim [Sat, 26 Jan 2019 11:31:02 +0000 (12:31 +0100)]
Unify three font info structures

* src/ftfont.h (struct font_info): New type, unifies similar types
from ftcrfont.c, ftfont.c and xftfont.c
* src/xftfont.c (struct xftfont_info): Remove, replace with struct
font_info.  Adjust all uses.
* src/ftcrfont.c (struct ftcrfont_info): Likewise.
* src/ftfont.c (struct ftfont_info): Likewise.

5 years agoMinor fixes for last change
Eli Zaretskii [Fri, 8 Feb 2019 07:53:32 +0000 (09:53 +0200)]
Minor fixes for last change

* etc/NEWS: Announce the change in EWW download behavior.

* lisp/net/eww.el (eww-download): Doc fix.  (Bug#34291)

5 years agoDownload of URL in EWW falls back on current URL
Nick Drozd [Sat, 2 Feb 2019 18:35:02 +0000 (12:35 -0600)]
Download of URL in EWW falls back on current URL

* lisp/net/eww.el (eww-download): If there's no URL at point,
download the current URL instead.  Previous behavior was to
signal an error if there was no URL at point.  (Bug#34291)
* doc/misc/eww.texi (Basics): Update documentation.

5 years agoFix downloading of URLs that end in a slash
Nick Drozd [Sat, 2 Feb 2019 18:50:03 +0000 (12:50 -0600)]
Fix downloading of URLs that end in a slash

* lisp/net/eww.el (eww-download-callback): Fix download URL
file name.  Previously this wasn't handling download URLs
correctly, resulting in all downloaded pages being named
"!", "!(1)", etc.  (Bug#34291)

5 years ago* doc/misc/eww.texi (Basics): Fix eww keybindings. (Bug#34291)
Nick Drozd [Sat, 2 Feb 2019 18:31:44 +0000 (12:31 -0600)]
* doc/misc/eww.texi (Basics): Fix eww keybindings.  (Bug#34291)

5 years agoFix process-thread docstring
Robert Pluim [Fri, 8 Feb 2019 07:22:34 +0000 (08:22 +0100)]
Fix process-thread docstring

* src/process.c (Fprocess_thread): Correct docstring.

5 years agoFix failures of vc-find-revision with non-ASCII file names
Eli Zaretskii [Fri, 8 Feb 2019 06:59:23 +0000 (08:59 +0200)]
Fix failures of vc-find-revision with non-ASCII file names

* lisp/vc/vc.el (vc-find-revision): Instead of binding
coding-system-for-write, make the buffer-file-coding-system of
the temporary buffer be no-conversion.  This avoids the
unwanted side effect of not encoding the command-line
arguments of the VCS commands invoked by the backend.
(Bug#34350)

5 years ago* doc/lispref/tips.texi (Documentation Tips): Fix quotes. (Bug#34372)
Eli Zaretskii [Thu, 7 Feb 2019 17:49:57 +0000 (19:49 +0200)]
* doc/lispref/tips.texi (Documentation Tips): Fix quotes.  (Bug#34372)

5 years agoMinor fix for unexec builds.
Eli Zaretskii [Thu, 7 Feb 2019 15:32:47 +0000 (17:32 +0200)]
Minor fix for unexec builds.

* src/emacs.c (main): Fix assertions and logic for pdump
loading in builds that can both unexec and pdump.

5 years ago; Simplify last change.
Eli Zaretskii [Thu, 7 Feb 2019 15:27:18 +0000 (17:27 +0200)]
; Simplify last change.

5 years agoAvoid segfaults on MS-Windows in enexec'ed Emacs
Eli Zaretskii [Thu, 7 Feb 2019 15:23:57 +0000 (17:23 +0200)]
Avoid segfaults on MS-Windows in enexec'ed Emacs

* src/emacs.c (main) [WINDOWSNT]: Fix logic of using dynamic
heap in unexec case.  (Bug#34277)

5 years agoAvoid unnecessary consing in project--files-in-directory
Dmitry Gutov [Thu, 7 Feb 2019 11:22:47 +0000 (14:22 +0300)]
Avoid unnecessary consing in project--files-in-directory

* lisp/progmodes/project.el (project--remote-file-names): New function.
(project--files-in-directory): Use it.

5 years agoAdd vc-hg-revert-switches
Ian Dunn [Thu, 7 Feb 2019 09:26:04 +0000 (12:26 +0300)]
Add vc-hg-revert-switches

* lisp/vc/vc-hg.el (vc-hg-revert-switches): New option.
(vc-hg-revert): Use it.

5 years agoRename multifile.el to fileloop.el
Dmitry Gutov [Thu, 7 Feb 2019 09:20:09 +0000 (12:20 +0300)]
Rename multifile.el to fileloop.el

* lisp/multifile.el: Rename to fileloop.el as discussed in
https://lists.gnu.org/archive/html/emacs-devel/2018-12/msg00475.html.
Update symbol prefixes and all callers

5 years ago; project-ignores: Add some TODOs
Dmitry Gutov [Wed, 6 Feb 2019 09:25:09 +0000 (12:25 +0300)]
; project-ignores: Add some TODOs

5 years agoRevert "Fix typo in add-hook doc string"
Aurelien Aptel [Thu, 7 Feb 2019 08:57:15 +0000 (09:57 +0100)]
Revert "Fix typo in add-hook doc string"

This reverts commit 7fd2ad755e7fa599697648ac4c971e834de75bf3.

5 years agoMake window choice in xref commands configurable
Juri Linkov [Mon, 4 Feb 2019 22:52:25 +0000 (22:52 +0000)]
Make window choice in xref commands configurable

Previously, it wasn't easy to tell xref.el commands like
xref-find-definitions or xref-find-definitions-other-window how to
choose a window for the *xref* buffer or how to find windows for
displaying the results after choosing a candidate.  This patch makes
that task easier, but keeps the current behaviour intact.

Co-authored-by: João Távora <joaotavora@gmail.com>
* lisp/progmodes/xref.el (xref--show-pos-in-buf): Simplify.

5 years agoAdd dwim function for inserting @ref variants
Robert Pluim [Tue, 5 Feb 2019 19:38:39 +0000 (20:38 +0100)]
Add dwim function for inserting @ref variants

* lisp/textmodes/texinfo.el (texinfo-insert-dwim-@ref): New function.
Insert @ref variant based on surrounding context.
(texinfo-mode-map): Add binding for texinfo-insert-dwim-@ref.

* etc/NEWS: Describe new texinfo dwim reference functionality.

5 years ago; * src/coding.h (struct coding_system): Fix a typo in a comment.
Eli Zaretskii [Wed, 6 Feb 2019 16:51:02 +0000 (18:51 +0200)]
; * src/coding.h (struct coding_system): Fix a typo in a comment.

5 years agoFix typo in add-hook doc string
Aurelien Aptel [Wed, 6 Feb 2019 16:44:51 +0000 (17:44 +0100)]
Fix typo in add-hook doc string

* lisp/subr.el (add-hook): fix typo in doc string.

5 years agoUnbreak interactive invocation of temacs on MS-Windows
Eli Zaretskii [Wed, 6 Feb 2019 15:56:44 +0000 (17:56 +0200)]
Unbreak interactive invocation of temacs on MS-Windows

* src/emacs.c (main) [WINDOWSNT]: Allow to invoke temacs
interactively without the --temacs= option.

5 years agoPrevent segfaults when running inside docker
Eli Zaretskii [Wed, 6 Feb 2019 15:31:26 +0000 (17:31 +0200)]
Prevent segfaults when running inside docker

* src/coding.c (syms_of_coding): New symbol Qus_ascii.
(reset_coding_after_pdumper_load): Call
set-safe-terminal-system-internal to set up
safe_terminal_coding after restoring from pdump file.
Reported by Philippe Vaucher <philippe.vaucher@gmail.com>.

5 years agoFix Bug#34196
Michael Albinus [Wed, 6 Feb 2019 08:07:39 +0000 (09:07 +0100)]
Fix Bug#34196

* lisp/autorevert.el (auto-revert-buffers): Handle buffers with a
remote default-directory only, when they are connected.  (Bug#34196)

* lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-maybe-open-connection):
Set "connected" property.

* lisp/net/tramp.el (tramp-process-actions): Revert change from
2019-02-04.  Bug#34196 will be solved in autorevert.el.

5 years agoAdd documentation for tabulated-list functions in the elisp manual
Alex Branham [Sat, 2 Feb 2019 15:59:21 +0000 (09:59 -0600)]
Add documentation for tabulated-list functions in the elisp manual

* doc/lispref/modes.texi: Add documentation for
  'tabulated-list-delete-entry', 'tabulated-list-get-id',
  'tabulated-list-get-entry', 'tabulated-list-header-overlay-p',
  'tabulated-list-put-tag', and 'tabulated-list-set-col'.

Bug#21074

5 years agoFix network stream tests
Robert Pluim [Tue, 5 Feb 2019 12:47:27 +0000 (13:47 +0100)]
Fix network stream tests

* test/lisp/net/network-stream-tests.el
(make-ipv6-tcp-server-with-unspecified-port): Skip if IPv6 is not available.
(make-ipv6-tcp-server-with-specified-port): Likewise.
(echo-server-with-local-ipv6): Likewise.

5 years ago* make-dist: Prefer a temporary manifest file.
Glenn Morris [Tue, 5 Feb 2019 03:50:44 +0000 (19:50 -0800)]
* make-dist: Prefer a temporary manifest file.

This prevents the manifest cluttering up the build tree,
and possibly getting stale if --no-update is used.

5 years agoAvoid segfaults due to image cache being cleared during redisplay
Eli Zaretskii [Mon, 4 Feb 2019 17:42:33 +0000 (19:42 +0200)]
Avoid segfaults due to image cache being cleared during redisplay

* src/xdisp.c (redisplay_internal): Set the
inhibit_clear_image_cache flag of a frame while its windows
are being redisplayed, and reset the flag after the call top
update_frame returns.
* src/image.c (clear_image_cache): Do nothing if the frame's
inhibit_clear_image_cache flag is set.  (Bug#34256)
* src/frame.h (struct frame): New flag inhibit_clear_image_cache.

5 years agoDon't map imaps to 993 anymore except on old Windows versions
Robert Pluim [Sun, 27 Jan 2019 15:13:46 +0000 (16:13 +0100)]
Don't map imaps to 993 anymore except on old Windows versions

'open-network-stream' will do the imaps service lookup itself, and
using 993 forced the user to use the numeric value in .authinfo for
certificate lookups.

* lisp/gnus/nnimap.el (nnimap-map-port): Only do mapping for Windows
XP or earlier.
* etc/NEWS: Describe imaps mapping change.

5 years agoSupport (locale-info 'paper) on MS-Windows
Eli Zaretskii [Mon, 4 Feb 2019 16:05:59 +0000 (18:05 +0200)]
Support (locale-info 'paper) on MS-Windows

* src/w32proc.c (LOCALE_IPAPERSIZE): Define if undefined.
(nl_langinfo): Support _NL_PAPER_WIDTH and _NL_PAPER_HEIGHT
like glibc does.
* src/fns.c (Flocale_info): Update the doc string.

* nt/inc/langinfo.h: Add _NL_PAPER_WIDTH and _NL_PAPER_HEIGHT
to the enumeration.
(_NL_PAPER_WIDTH, _NL_PAPER_HEIGHT): Define namesake macros.
* nt/mingw-cfg.site (emacs_cv_langinfo__nl_paper_width): Set
to 'yes'.

* doc/lispref/nonascii.texi (Locales): Update the
documentation of 'locale-info' for the argument of 'paper'.

* etc/NEWS: Update the locale-info entry.

5 years agoAllow doc-view to open password-protected PDF files (bug#33684)
Federico Tedin [Sun, 3 Feb 2019 16:48:31 +0000 (13:48 -0300)]
Allow doc-view to open password-protected PDF files (bug#33684)

* lisp/doc-view.el (doc-view-ghostscript-options): Removed "-sDEVICE"
option.
(doc-view-ghostscript-device): New customizable variable, passed as
"-sDEVICE" option to GhostScript.
(doc-view-pdf-password-protected-ghostscript-p): New function.
(doc-view-pdf->png-converter-ghostscript): Can now open
password-protected PDF files.
(doc-view-pdfdraw-program-subcommand): New function.
(doc-view-pdf-password-protected-pdfdraw-p): New function.
(doc-view-pdf->png-converter-mupdf): Can now open password-protected
PDF files.
* etc/NEWS: Mention new doc-view-mode feature.

5 years agoFix Bug#34196
Michael Albinus [Mon, 4 Feb 2019 15:03:43 +0000 (16:03 +0100)]
Fix Bug#34196

* lisp/net/tramp.el (tramp-process-actions): Disable `global-auto-revert-mode'
temporarily.  (Bug#34196)

5 years agoImprove Tramp host name completion
Michael Albinus [Mon, 4 Feb 2019 15:02:46 +0000 (16:02 +0100)]
Improve Tramp host name completion

* lisp/net/tramp-rclone.el (tramp-default-host-alist): Add empty host.

* lisp/net/tramp.el (tramp-parse-auth-sources): Require :port.

5 years agoUse IPv6 localhost when family is 'ipv6
Robert Pluim [Thu, 31 Jan 2019 13:20:32 +0000 (14:20 +0100)]
Use IPv6 localhost when family is 'ipv6

This fixes Bug#34193

* src/process.c (Fmake_network_process): Explicitly use ::1 when
using IPv6 with 'local.  Update docstring.

* test/lisp/net/network-stream-tests.el
(make-ipv6-tcp-server-with-unspecified-port):
(make-ipv6-tcp-server-with-specified-port): Test creating ipv6
local server.
(make-server): Add optional family argument, default ipv4
(echo-server-with-local-ipv4): Test connecting to 'local ipv4
(echo-server-with-local-ipv6): Test connecting to 'local ipv6

* doc/lispref/processes.texi (Network Processes): Describe
behavior when using 'local.

* etc/NEWS: Document new 'make-network-process' behavior when
connecting to 'local with ipv6.

5 years ago* lisp/tar-mode.el (tar-extract): Call tar--try-jka-compr (bug#34251)
Juri Linkov [Sun, 3 Feb 2019 21:00:29 +0000 (23:00 +0200)]
* lisp/tar-mode.el (tar-extract): Call tar--try-jka-compr (bug#34251)

* lisp/tar-mode.el (tar--try-jka-compr): New function copied from
archive-try-jka-compr.

* lisp/arc-mode.el (archive-try-jka-compr): Set buffer-multibyte to t
instead of let-binding coding-system-for-read to 'no-conversion.

* test/data/decompress/tg.tar.gz:
* test/data/decompress/zg.zip: New fixtures.

* test/lisp/arc-mode-tests.el (arc-mode-test-zip-extract-gz):
* test/lisp/tar-mode-tests.el (tar-mode-test-tar-extract-gz): New tests.

* test/lisp/vc/diff-mode-tests.el (diff-mode-test-font-lock)
(diff-mode-test-font-lock-syntax-one-line): Skip unless shell and
diff executables are found.

5 years agoFix URL in ucs-normalize.el
Jean-Christophe Helary [Sun, 3 Feb 2019 15:23:36 +0000 (00:23 +0900)]
Fix URL in ucs-normalize.el

* lisp/international/ucs-normalize.el: Fix URL of the HFS
normalization reference.  (Bug#34300)

5 years ago* etc/PROBLEMS: Amend entry for profiler bug #34235 to mention kernel 4.14.97
Alan Mackenzie [Sun, 3 Feb 2019 11:38:19 +0000 (11:38 +0000)]
* etc/PROBLEMS: Amend entry for profiler bug #34235 to mention kernel 4.14.97

5 years agoWork on accept-process-output in Tramp
Michael Albinus [Sun, 3 Feb 2019 10:07:36 +0000 (11:07 +0100)]
Work on accept-process-output in Tramp

* lisp/net/tramp.el (tramp-accept-process-output): Rework timer
handling.
(tramp-call-process): Adapt VEC if nil.
(tramp-interrupt-process): Use `tramp-accept-process-output'.
(tramp-process-lines): New defun.
* lisp/net/tramp-adb.el (tramp-adb-parse-device-names):
* lisp/net/tramp-rclone.el (tramp-rclone-parse-device-names): Use it.

* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch):
Use timeout 0 in `tramp-accept-process-output'.

* test/lisp/net/tramp-tests.el (tramp--test-timeout-handler): Move up.
(tramp-test29-start-file-process, tramp-test30-make-process)
(tramp-test32-shell-command)
(tramp--test-shell-command-to-string-asynchronously): Use it.
(tramp-test35-remote-path): Suppress warning.
(tramp--test-asynchronous-requests-timeout): New defconst.
(tramp-test43-asynchronous-requests): Skip if not the only test.
Use `tramp--test-asynchronous-requests-timeout'.
Remove instrumentation.  Use `start-process-shell-command' for
watchdog.  Add timeout in timer function.  Print status messages.
Remove file operations from sentinel.  Suppress timers in
`accept-process-output'.

5 years agoSupport (locale-info 'paper) on GNU platforms
Paul Eggert [Sat, 2 Feb 2019 21:23:04 +0000 (13:23 -0800)]
Support (locale-info 'paper) on GNU platforms

* configure.ac (HAVE_LANGINFO__NL_PAPER_WIDTH): New macro.
* src/fns.c (Flocale_info) [HAVE_LANGINFO__NL_PAPER_WIDTH]:
Get paper width and height from locale.

5 years ago* test/lisp/vc/diff-mode-tests.el (diff-mode-test-font-lock): New test.
Juri Linkov [Sat, 2 Feb 2019 21:23:16 +0000 (23:23 +0200)]
* test/lisp/vc/diff-mode-tests.el (diff-mode-test-font-lock): New test.

(diff-mode-test-font-lock-syntax-one-line): New test for one line.

* test/data/vc/diff-mode/hello_world.c:
* test/data/vc/diff-mode/hello_world_1.c:
* test/data/vc/diff-mode/hello_emacs.c:
* test/data/vc/diff-mode/hello_emacs_1.c: New fixtures.

* lisp/vc/diff-mode.el (diff-syntax-fontify): Move remove-overlays
from diff-syntax-fontify-hunk.  (Bug#33567)
(diff-syntax-fontify-hunk): Remove VISIT arg from insert-file-contents.

5 years agoUpdate from Gnulib
Paul Eggert [Sat, 2 Feb 2019 21:13:45 +0000 (13:13 -0800)]
Update from Gnulib

This incorporates:
2019-02-02 dtoastr, ftoastr, ldtoastr: port to c-strtod changes
2019-02-01 c-strtod, c-strtold: use the bug fixes
2019-01-30 strtold: New module
* doc/misc/texinfo.tex, lib/ftoastr.c, lib/regexec.c, lib/stdlib.in.h:
* m4/stdlib_h.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* m4/c-strtod.m4: Remove.

5 years agoFix unlikely user-full-name integer overflow
Paul Eggert [Sat, 2 Feb 2019 18:23:48 +0000 (10:23 -0800)]
Fix unlikely user-full-name integer overflow

* src/editfns.c (Fuser_full_name):
Don’t assume uid fits into fixnum.

5 years agoPrevent segfault in bootstrap-emacs on MinGW
Eli Zaretskii [Sat, 2 Feb 2019 15:12:13 +0000 (17:12 +0200)]
Prevent segfault in bootstrap-emacs on MinGW

* src/emacs.c (main) [WINDOWSNT]: Fix logic of determining by
argv[0] whether to use the static heap.  (Bug#34277)

5 years agoFix Bug#34221
Felicián Németh [Sat, 2 Feb 2019 12:22:53 +0000 (13:22 +0100)]
Fix Bug#34221

* lisp/progmodes/project.el (project--files-in-directory):
Support remote files.  (Bug#34221)

5 years agoFix window splitting behavior of 'display-buffer-at-bottom'
Martin Rudalics [Sat, 2 Feb 2019 09:16:45 +0000 (10:16 +0100)]
Fix window splitting behavior of 'display-buffer-at-bottom'

* lisp/window.el (display-buffer-at-bottom): Never split an
arbitrary bottom window.  Try to split the frame's main
window instead (Bug#33870).

5 years agoFix bugs caused by running window change functions during redisplay
Martin Rudalics [Sat, 2 Feb 2019 08:43:34 +0000 (09:43 +0100)]
Fix bugs caused by running window change functions during redisplay

* src/xdisp.c (redisplay_internal): Run window change
functions before updating the display so changes induced by
these functions can get caught by redisplay (Bug#34138).
* src/window.c (run_window_change_functions): Bind
Qinhibit_redisplay to avoid that the minibuffer window gets
resized while running window change functions (Bug#34179,
Bug#34260).

5 years ago* make-dist: Remove references to src/stamp-h.in.
Glenn Morris [Sat, 2 Feb 2019 02:03:16 +0000 (18:03 -0800)]
* make-dist: Remove references to src/stamp-h.in.

This file was removed two years ago in 2f89350.
No need to merge to master.

5 years ago* .gitignore: Add MANIFEST.
Glenn Morris [Sat, 2 Feb 2019 01:59:15 +0000 (17:59 -0800)]
* .gitignore: Add MANIFEST.

5 years ago* etc/PROBLEMS: Mention profiler-report bug (Bug#34235).
Paul Eggert [Sat, 2 Feb 2019 01:58:05 +0000 (17:58 -0800)]
* etc/PROBLEMS: Mention profiler-report bug (Bug#34235).

5 years ago* make-dist: Avoid "Bad fd number" error with dash.
Glenn Morris [Sat, 2 Feb 2019 01:56:25 +0000 (17:56 -0800)]
* make-dist: Avoid "Bad fd number" error with dash.

5 years ago* make-dist: Remove references to src/stamp-h.in.
Glenn Morris [Sat, 2 Feb 2019 01:50:59 +0000 (17:50 -0800)]
* make-dist: Remove references to src/stamp-h.in.

This file was removed two years ago in 2f89350.

5 years ago* make-dist: Fix --no-update with no pre-existing MANIFEST.
Glenn Morris [Sat, 2 Feb 2019 01:36:32 +0000 (17:36 -0800)]
* make-dist: Fix --no-update with no pre-existing MANIFEST.

5 years agoRestore SETFATTR substitution
Paul Eggert [Sat, 2 Feb 2019 01:07:13 +0000 (17:07 -0800)]
Restore SETFATTR substitution

* configure.ac (SETFATTR): Restore the AC_SUBST of this
that was inadvertently removed when pdumper support was added.
Need for ./configure --with-dumping=unexec on Fedora 29.

5 years agoMake make-dist more automatic
Paul Eggert [Fri, 1 Feb 2019 23:17:48 +0000 (15:17 -0800)]
Make make-dist more automatic

Simplify make-dist maintenance by having it generate its
list of files more automatically.  Put the list of distributed
files into a file MANIFEST that can be used in the unusual
situations when you’re making a distribution without having
access to a Git repository.
* make-dist (top_level_ChangeLog): Now nonempty if the
distribution tarball will contain a ChangeLog, instead of
being nonempty when a ChangeLog is requested, Git is present
and a readable ChangeLog exists.  The new interpretation makes
the script a bit easier to follow.
(possibly_non_vc_files, info_files, mkdir_verbose)
(file_to_skip, MANIFEST_subdir_sed, tempsubdirs):
New variables.
(MANIFEST): Update and use this file, which now records what
files are distributed.
(top_level, subdir, files, file): Remove.

5 years ago* configure.ac (emacs_config_features): Add pdumper and unexec.
Glenn Morris [Fri, 1 Feb 2019 21:44:47 +0000 (16:44 -0500)]
* configure.ac (emacs_config_features): Add pdumper and unexec.

5 years agoRename CANNOT_DUMP to HAVE_UNEXEC
Paul Eggert [Fri, 1 Feb 2019 21:03:18 +0000 (13:03 -0800)]
Rename CANNOT_DUMP to HAVE_UNEXEC

* configure.ac (CANNOT_DUMP): Remove.  All uses removed,
or changed to the negative of with_unexec.
(HAVE_UNEXEC): New macro.  All uses of CANNOT_DUMP changed
to the negative of this macro.

5 years agoOmit some linker hacks if not doing unexec
Paul Eggert [Fri, 1 Feb 2019 20:05:28 +0000 (12:05 -0800)]
Omit some linker hacks if not doing unexec

* configure.ac (LDFLAGS, LD_SWITCH_SYSTEM_TEMACS):
Omit some funky linker flags if not supporting unexec.

Use macOS linker hacks only if needed
* configure.ac: On darwin, link with -fno-pie and -headerpad
only if configuring with unexec.

5 years agoStop using macOS -prebind option
Paul Eggert [Fri, 1 Feb 2019 16:45:20 +0000 (08:45 -0800)]
Stop using macOS -prebind option

* configure.ac (LD_SWITCH_SYSTEM_TEMACS): Remove -prebind,
which has been obsolete and ineffective since Mac OS X 10.4 (2005),
which was never necessary for correct operation, and which now
generates annoying warnings.  Problem reported by Robert Pluim in:
https://lists.gnu.org/r/emacs-devel/2019-01/msg00761.html

5 years agoMerge from origin/emacs-26
Paul Eggert [Fri, 1 Feb 2019 16:40:53 +0000 (08:40 -0800)]
Merge from origin/emacs-26

6c6b540711 Correct the docs of inserting kmacro counter
32555daf4c * doc/misc/calc.texi (Algebraic Tutorial): Fix a typo.  (B...

5 years ago; Merge from origin/emacs-26
Paul Eggert [Fri, 1 Feb 2019 16:40:53 +0000 (08:40 -0800)]
; Merge from origin/emacs-26

The following commit was skipped:

af525f44d5 ; Auto-commit of loaddefs files.

5 years agoMerge from origin/emacs-26
Paul Eggert [Fri, 1 Feb 2019 16:40:52 +0000 (08:40 -0800)]
Merge from origin/emacs-26

7ba8f80398 Avoid errors in 'rmail-get-new-mail'
9c8412a0b8 Fix process-contact bug with TCP connections

# Conflicts:
# src/process.c

5 years agoCorrect the docs of inserting kmacro counter
Eli Zaretskii [Fri, 1 Feb 2019 15:34:23 +0000 (17:34 +0200)]
Correct the docs of inserting kmacro counter

* doc/emacs/kmacro.texi (Keyboard Macro Counter): Correct the
description of the affect "C-u" has on inserting the macro
counter.  Define "previous counter value".

* lisp/kmacro.el (kmacro-insert-counter)
(kmacro-start-macro-or-insert-counter): Fix the doc strings
regarding the effect of "C-u".  (Bug#34263)

5 years ago* doc/misc/calc.texi (Algebraic Tutorial): Fix a typo. (Bug#34273)
Nicholas Drozd [Fri, 1 Feb 2019 14:06:50 +0000 (08:06 -0600)]
* doc/misc/calc.texi (Algebraic Tutorial): Fix a typo.  (Bug#34273)

5 years ago; Auto-commit of loaddefs files.
Glenn Morris [Fri, 1 Feb 2019 12:33:38 +0000 (07:33 -0500)]
; Auto-commit of loaddefs files.

5 years ago; Auto-commit of loaddefs files.
Glenn Morris [Fri, 1 Feb 2019 11:24:20 +0000 (06:24 -0500)]
; Auto-commit of loaddefs files.

5 years agoMake the rx operators \? and \?? behave correctly
Mattias Engdegård [Wed, 16 Jan 2019 13:57:12 +0000 (14:57 +0100)]
Make the rx operators \? and \?? behave correctly

* lisp/emacs-lisp/rx.el (rx-kleene):
Treat \? and \?? like ? and ?? (Bug#34100).
* test/lisp/emacs-lisp/rx-tests.el: Add tests for all repetition operators.

5 years agoAvoid errors in 'rmail-get-new-mail'
Eli Zaretskii [Fri, 1 Feb 2019 09:16:13 +0000 (11:16 +0200)]
Avoid errors in 'rmail-get-new-mail'

* lisp/mail/rmail.el (rmail-insert-inbox-text): Don't assume
the Rmail protocol is always a string when calling
'rmail-remote-proto-p'.  (Bug#34252)

5 years agojs--re-search-backward-inner: Fix infloop
Dmitry Gutov [Fri, 1 Feb 2019 00:01:39 +0000 (03:01 +0300)]
js--re-search-backward-inner: Fix infloop

Fix JS indentation infloop reported in
https://github.com/mooz/js2-mode/issues/513.

* lisp/progmodes/js.el (js--re-search-backward-inner): Account for
multiline string literals.
* test/manual/indent/js.js: New test example.

5 years agoPrefer static to extern where either will do
Paul Eggert [Thu, 31 Jan 2019 23:31:41 +0000 (15:31 -0800)]
Prefer static to extern where either will do

* src/charset.c (charset_table_size):
* src/pdumper.c (dump_private):
* src/sysdep.c (init_sigsegv):
* src/window.c (old_selected_window):
Now static.
* src/charset.c (charset_table_size):
Now int, since the value always fits in int.
* src/gtkutil.c (xg_gtk_initialized): Now present only if
HAVE_XWIDGETS, to make it clearer that this is an xwidgets
hack.  All uses changed.
* src/lread.c (ndefsubr): Remove; unused.
* src/pdumper.h: Use usual GNU indenting style for functions,
since my static-vs-extern checking hack relies on it.
(dump_public): Always declare; simpler and doesn’t hurt.
(pdumper_handle_page_fault): Remove unused decl.

5 years agoWiden modiff counts to avoid wraparound
Paul Eggert [Thu, 31 Jan 2019 18:29:50 +0000 (10:29 -0800)]
Widen modiff counts to avoid wraparound

Widen modification counts to at least 64 bits, to make
wraparound practically impossible.
* doc/lispref/buffers.texi (Buffer Modification):
Don’t say the modification-count can wrap around.
* src/buffer.c (Frestore_buffer_modified_p, Fbuffer_swap_text)
(modify_overlay):
* src/insdel.c (insert_1_both, insert_from_string_1)
(insert_from_gap, insert_from_buffer_1)
(adjust_after_replace, replace_range, replace_range_2)
(del_range_2, modify_text):
* src/textprop.c (modify_text_properties):
Use modiff_incr instead of incrementing directly.
(Fbuffer_modified_tick, Fbuffer_chars_modified_tick):
Don’t assume modification counts fit into fixnums.
* src/buffer.h (struct buffer_text, struct buffer):
* src/cmds.c (internal_self_insert):
* src/fileio.c (Finsert_file_contents):
* src/indent.c (last_known_column_modified):
* src/keyboard.c (command_loop_1):
* src/marker.c (cached_modiff):
* src/syntax.c (find_start_modiff, parse_sexp_propertize)
(find_defun_start):
* src/window.h (struct window):
Use modiff_count for modification counts.
* src/editfns.c (Fsubst_char_in_region):
Copy instead of incrementing modification counts,
since integer overflow checking is not needed here.
* src/lisp.h (modiff_count): New type.
(modiff_incr, modiff_to_integer): New inline functions.
* src/pdumper.c (dump_buffer): Update hash.

5 years agoMinor pdumper simplification
Paul Eggert [Thu, 31 Jan 2019 15:30:32 +0000 (07:30 -0800)]
Minor pdumper simplification

* src/pdumper.c (dump_roots, pdumper_load): Simplify initialization.
(dump_bitset_init, pdumper_load): Omit unnecessary assignments.
(dump_bitset_destroy): Remove; never called.  All callers removed.
(dump_do_dump_relocation, pdumper_load): Add FIXME comment.
(pdumper_load): Simplify by assuming C99.  Remove unused local.

5 years agoFix process-contact bug with TCP connections
Paul Eggert [Wed, 30 Jan 2019 23:11:17 +0000 (15:11 -0800)]
Fix process-contact bug with TCP connections

This fixes a regression from Emacs 25.3 (Bug#34134).
* src/process.c (server_accept_connection):
Set host correctly, fixing a bug introduced in
2017-09-16T21:29:18Z!eggert@cs.ucla.edu
when working around a GCC bug.

5 years agoMerge from origin/emacs-26
Glenn Morris [Wed, 30 Jan 2019 17:12:15 +0000 (09:12 -0800)]
Merge from origin/emacs-26

b94d767 (origin/emacs-26) Minor copyedits in last manual change
73508e6 Improve documentation of face numbers
bf235ce * doc/emacs/custom.texi (Authentication): Refer to the "Help ...
ceccb3c New node Authentication in the Emacs manual
9078f34 Fix a loop in c-fl-decl-start.  This fixes bug #34186.
a177fe7 Fix LaTeX output of month and day from cal-tex.el
90177d7 Avoid elisp crash for OpenPGP User IDs with no e-mail address
68e55a0 image-mode: Do not use default scaling (bug#33990)
b6c762a create-image: Expand documentation (bug#33990)
928d342 Improve documentation of 'isearch-filter-predicate'
9034dd6 Fix cursor column positioning on Grep hits

# Conflicts:
# doc/emacs/custom.texi

5 years agoFix problem in filenotify-tests
Michael Albinus [Wed, 30 Jan 2019 14:30:04 +0000 (15:30 +0100)]
Fix problem in filenotify-tests

* lisp/net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch):
Adapt `accept-process-output' argument.

* test/lisp/filenotify-tests.el (file-notify--deftest-remote):
Remove :unstable tag.

5 years ago* lisp/net/tramp-rclone.el (tramp-rclone-mounted-p): Fix thinko.
Michael Albinus [Wed, 30 Jan 2019 14:29:29 +0000 (15:29 +0100)]
* lisp/net/tramp-rclone.el (tramp-rclone-mounted-p): Fix thinko.

5 years ago; Fix previous commit
Michael Albinus [Wed, 30 Jan 2019 09:51:48 +0000 (10:51 +0100)]
; Fix previous commit