]> git.eshelyaron.com Git - emacs.git/log
emacs.git
6 years ago* lisp/image-mode.el (image-toggle-display-image): Avoid string-make-unibyte
Stefan Monnier [Tue, 16 Oct 2018 02:31:54 +0000 (22:31 -0400)]
* lisp/image-mode.el (image-toggle-display-image): Avoid string-make-unibyte

6 years ago* lisp/progmodes/octave.el: Register on auto-mode-alist
Stefan Monnier [Tue, 16 Oct 2018 01:24:14 +0000 (21:24 -0400)]
* lisp/progmodes/octave.el: Register on auto-mode-alist

(octave-maybe-mode): New function.

6 years ago* etc/NEWS.18: Tweak header to be more like the others
Stefan Monnier [Tue, 16 Oct 2018 00:16:28 +0000 (20:16 -0400)]
* etc/NEWS.18: Tweak header to be more like the others

6 years ago* lisp/image-mode.el (image--imagemagick-wanted-p): Check for file extension.
Juri Linkov [Mon, 15 Oct 2018 22:30:56 +0000 (01:30 +0300)]
* lisp/image-mode.el (image--imagemagick-wanted-p): Check for file extension.

(Bug#32994)
(image-toggle-display-text): Let-bind create-lockfiles to nil
like in image-toggle-display-image.

6 years ago* lisp/textmodes/tex-mode.el (tex-uptodate-p): Recognize [N.N] pages
Stefan Monnier [Mon, 15 Oct 2018 20:30:52 +0000 (16:30 -0400)]
* lisp/textmodes/tex-mode.el (tex-uptodate-p): Recognize [N.N] pages

6 years agoIn follow mode, prevent the cursor resting on a partially displayed line
Alan Mackenzie [Mon, 15 Oct 2018 19:48:25 +0000 (19:48 +0000)]
In follow mode, prevent the cursor resting on a partially displayed line

This fixes bug #32848

* lisp/follow.el (follow-adjust-window): If point ends up in a partially
displayed line in a left hand or middle window, move it one line forward, to
prevent unwanted scrolling should make-cursor-line-fully-visible be non-nil.

6 years agoUpdate lib/regex from glibc via Gnulib
Paul Eggert [Mon, 15 Oct 2018 05:55:37 +0000 (00:55 -0500)]
Update lib/regex from glibc via Gnulib

This syncs recent refactorings from glibc, and incorporates:
2018-10-15 libc-config: merge from glibc
2018-10-15 regex: depend on libc-config
* .gitignore: Do not ignore m4/_*.m4.
* lib/cdefs.h: New file, copied from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/libc-config.h, m4/__inline.m4: New files, copied from Gnulib.
* lib/regcomp.c, lib/regex.c, lib/regex_internal.c:
* lib/regex_internal.h, lib/regexec.c:
Copy from glibc via Gnulib.

6 years agoUpdate from Gnulib
Paul Eggert [Mon, 15 Oct 2018 03:10:48 +0000 (22:10 -0500)]
Update from Gnulib

This is minor refactoring that should not affect Emacs builds.
It incorporates:
2018-10-12 Make better use of Autoconf
* m4/environ.m4, m4/fsusage.m4, m4/manywarnings.m4, m4/socklen.m4:
Copy from Gnulib.

6 years agoAdd ~44 edebug specs to CC Mode.
Alan Mackenzie [Mon, 15 Oct 2018 00:45:24 +0000 (00:45 +0000)]
Add ~44 edebug specs to CC Mode.

* lisp/progmodes/cc-cmds.el, lisp/progmodes/cc-defs.el
lisp/progmodes/cc-engine.el, lisp/progmodes/cc-fonts.el
lisp/progmodes/cc-langs.el: Add lots of edebug specs.

* lisp/progmodes/cc-engine.el (c-state-maybe-marker): Tidy up so as to
evaluate an argument only once at runtime.

6 years ago* src/buffer.c (Fmove_overlay): Don't call Fdelete_overlay
Stefan Monnier [Sun, 14 Oct 2018 20:44:21 +0000 (16:44 -0400)]
* src/buffer.c (Fmove_overlay): Don't call Fdelete_overlay

... because the data structure is not in a consistent state.

* test/src/buffer-tests.el (overlay-evaporation-after-killed-buffer):
New test.

6 years agoFix lisp_eval_depth in unwind-protect cleanup
Paul Eggert [Sun, 14 Oct 2018 16:51:32 +0000 (09:51 -0700)]
Fix lisp_eval_depth in unwind-protect cleanup

Problem reported by Paul Pogonyshev (Bug#33034).
* src/lisp.h (union specbinding): New member unwind.eval_depth.
* src/eval.c (record_unwind_protect, set_unwind_protect): Set it.
(do_one_unbind): Use it.

6 years agoFix sieve-mode font lock
OGAWA Hirofumi [Sat, 29 Sep 2018 23:31:25 +0000 (08:31 +0900)]
Fix sieve-mode font lock

* lisp/net/sieve-mode.el (sieve-font-lock-keywords): Fix the
definition of font-lock faces.  (Bug#32881)

6 years agoFix sieve-upload when sieve-buffer is nil
OGAWA Hirofumi [Sun, 30 Sep 2018 08:40:35 +0000 (17:40 +0900)]
Fix sieve-upload when sieve-buffer is nil

* lisp/net/sieve.el (sieve-upload): Don't rely on sieve-buffer being
non-nil.  (Bug#32880)

Copyright-paperwork-exempt: yes

6 years agoImprove 'json-insert' so it doesn't cons a string from JSON
Eli Zaretskii [Sat, 13 Oct 2018 07:13:10 +0000 (10:13 +0300)]
Improve 'json-insert' so it doesn't cons a string from JSON

* src/json.c (struct json_buffer_and_size): New member
inserted_bytes.
(json_insert): Instead of creating a string and inserting it
into the current buffer, copy the unibyte text into the gap.
(struct json_insert_data): New member inserted_bytes.
(json_insert_callback): Update commentary.  Pass the
inserted_bytes value to json_insert and on its return copy the
updated value back into DATA.
(Fjson_insert): Decode the unibyte text inserted into the gap.
Call before-change-functions and after-change-functions only
once, before and after processing the insertion of the entire
JSON representation.

* test/src/json-tests.el (json-insert/throw): Adapt to the
modified implementation of json-insert: it no longer calls the
modification hooks once for each inserted chunk of JSON
representation.

6 years agoMerge from origin/emacs-26
Glenn Morris [Fri, 12 Oct 2018 17:31:22 +0000 (10:31 -0700)]
Merge from origin/emacs-26

643df63 (origin/emacs-26) Avoid byte-compiler warning in em-rebind.el
d0eca49 ; * doc/emacs/mark.texi (Disabled Transient Mark): Fix last c...
af80b10 Improve indexing of 'C-SPC C-SPC'
89a7301 ; * doc/lispref/internals.texi (Writing Dynamic Modules): Fix...
a108eaa Fix bug with precious entries in Gnus registry
ce8b458 Document in the ELisp manual how to write loadable modules
a7ebc6b dired-do-shell-command: Notify users after abort the command

# Conflicts:
# lisp/registry.el

6 years ago; Merge from origin/emacs-26
Glenn Morris [Fri, 12 Oct 2018 17:28:40 +0000 (10:28 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

0d2bf76 Adapt Tramp version.  Do not merge with master

6 years agoMerge from origin/emacs-26
Glenn Morris [Fri, 12 Oct 2018 17:28:40 +0000 (10:28 -0700)]
Merge from origin/emacs-26

6e54762 Fix Apple Script permissions error
19f705c Fix typo in 'timerp' documentation

6 years ago* test/lisp/net/tramp-tests.el (tramp--test-timeout-handler):
Michael Albinus [Fri, 12 Oct 2018 11:42:34 +0000 (13:42 +0200)]
* test/lisp/net/tramp-tests.el (tramp--test-timeout-handler):

Add docstring.  Remove `interactive' call.

6 years ago* lisp/net/trampver.el (customize-package-emacs-version-alist):
Michael Albinus [Fri, 12 Oct 2018 11:42:07 +0000 (13:42 +0200)]
* lisp/net/trampver.el (customize-package-emacs-version-alist):

Adapt Tramp version integrated in Emacs 26.2.

6 years agoFix error in Tramp loading, uncovered by tramp-test43-*
Michael Albinus [Fri, 12 Oct 2018 11:41:12 +0000 (13:41 +0200)]
Fix error in Tramp loading, uncovered by tramp-test43-*

* lisp/net/tramp-archive.el (tramp-archive-autoload-file-name-handler):
New defalias.
(tramp-register-archive-file-name-handler): Use it.

* lisp/net/tramp.el (tramp-file-name-for-operation): Change it for
`expand-file-name'.
(tramp-file-name-handler): Unset `file-name-handler-alist' when
autoloading a Tramp file name handler.
(tramp-autoload-file-name-handler): Always unload Tramp file name
handlers.
(tramp-register-file-name-handlers)
(tramp-unload-file-name-handlers): Simplify.

6 years agoRework empty abbrev table omitting
Allen Li [Sat, 29 Sep 2018 22:19:04 +0000 (15:19 -0700)]
Rework empty abbrev table omitting

There were two problems with the original implementation:

1. It changed the behavior of insert-abbrev-table-description when
READABLE is nil to sometimes insert one Emacs Lisp expression and
sometimes insert nothing.
2. It broke the tests.

This commit reworks this so that insert-abbrev-table-description
always inserts an expressions even if no abbrevs need to be saved and
making only write-abbrev-file check that a table has any abbrevs to
save before calling insert-abbrev-table-description.  This duplicates
the work of filtering the table for savable abbrevs, but the benefit
of keeping the API is worth it.

* doc/lispref/abbrevs.texi (Abbrev Tables): Update documentation.
* lisp/abbrev.el (write-abbrev-file): Skip tables without user abbrevs
(insert-abbrev-table-description): Always insert the define
expression.
(abbrev--table-symbols): New function.
* test/lisp/abbrev-tests.el (abbrev--table-symbols-test):
Add test for abbrev--table-symbols.

6 years agoAvoid byte-compiler warning in em-rebind.el
Alex Branham [Fri, 5 Oct 2018 14:07:13 +0000 (09:07 -0500)]
Avoid byte-compiler warning in em-rebind.el

* lisp/eshell/em-rebind.el (eshell-delete-backward-char): Use
'delete-char' instead of delete-backward-char.  (Bug#32945)

6 years ago; * doc/emacs/mark.texi (Disabled Transient Mark): Fix last change.
Eli Zaretskii [Fri, 12 Oct 2018 08:33:31 +0000 (11:33 +0300)]
; * doc/emacs/mark.texi (Disabled Transient Mark): Fix last change.

6 years agoImprove indexing of 'C-SPC C-SPC'
Eli Zaretskii [Fri, 12 Oct 2018 08:31:09 +0000 (11:31 +0300)]
Improve indexing of 'C-SPC C-SPC'

* doc/emacs/mark.texi (Disabled Transient Mark): Fix
indexing.  (Bug#32959)

6 years ago; * doc/lispref/internals.texi (Writing Dynamic Modules): Fix a typo.
Eli Zaretskii [Thu, 11 Oct 2018 18:48:10 +0000 (21:48 +0300)]
; * doc/lispref/internals.texi (Writing Dynamic Modules): Fix a typo.

6 years agoFix bug with precious entries in Gnus registry
Eric Abrahamsen [Thu, 11 Oct 2018 18:20:29 +0000 (11:20 -0700)]
Fix bug with precious entries in Gnus registry

* lisp/registry.el (registry-collect-prune-candidates): This `cdr' was
  an error: it meant that the last key in the precious list, would be
  considered a nil. Since the precious list only contains the symbol
  'mark by default, marks were never considered precious.
* doc/misc/gnus.texi (Store arbitrary data): Fix typo: "marks" should
  be "mark".

6 years agoDocument in the ELisp manual how to write loadable modules
Eli Zaretskii [Thu, 11 Oct 2018 17:53:05 +0000 (20:53 +0300)]
Document in the ELisp manual how to write loadable modules

* doc/lispref/internals.texi (Writing Dynamic Modules)
(Module Initialization, Module Functions, Module Values)
(Module Misc, Module Nonlocal): New nodes.
* doc/lispref/loading.texi (Dynamic Modules): Add
cross-reference to the new node.
* doc/lispref/internals.texi (GNU Emacs Internals):
* doc/lispref/elisp.texi (Top): Update menus for the new nodes.

6 years agodired-do-shell-command: Notify users after abort the command
Tino Calancha [Thu, 11 Oct 2018 08:23:30 +0000 (17:23 +0900)]
dired-do-shell-command: Notify users after abort the command

* lisp/dired-aux.el (dired-do-shell-command):  Notify users that
the command have aborted when they answer 'n' to the prompt (Bug#32969).

6 years agoAdapt Tramp version. Do not merge with master
Michael Albinus [Thu, 11 Oct 2018 07:39:12 +0000 (09:39 +0200)]
Adapt Tramp version.  Do not merge with master

* lisp/net/trampver.el: Change version to "2.3.5.26.2".
(customize-package-emacs-version-alist): Add Tramp version
integrated in Emacs 26.2.

6 years agoFix mishandling of symbols that look like numbers
Paul Eggert [Thu, 11 Oct 2018 06:17:18 +0000 (23:17 -0700)]
Fix mishandling of symbols that look like numbers

* src/bignum.c (make_neg_biguint): New function.
* src/lread.c (read1): Do not mishandle an unquoted symbol
with name equal to something like "1\0x", i.e., a string
of numeric form followed by a NUL byte.
Formerly these symbols were misread as numbers.
(string_to_number): Change last argument from an integer flag
to a pointer to the length.  This lets the caller figure out
how much of the prefix was used.  All callers changed.
Add a fast path if the integer (sans sign) fits in uintmax_t.
Update comments and simplify now that bignums are present.
* src/print.c (print_object): Fix quoting of symbols that look
like numbers, by relying on string_to_number for the tricky
cases rather than trying to redo its logic, incorrectly.  For
example, (read (prin1-to-string '\1e+NaN)) formerly returned
"1e+NaN", which was wrong: a backslash is needed in the output
to prevent it from being read as a NaN.  Escape NO_BREAK_SPACE
too, since lread.c treats it like SPACE.
* test/src/print-tests.el (print-read-roundtrip):
Add tests illustrating the abovementioned bugs.

6 years agoFix Apple Script permissions error
Alan Third [Sun, 7 Oct 2018 15:15:17 +0000 (16:15 +0100)]
Fix Apple Script permissions error

* nextstep/templates/Info.plist.in: Add NSAppleEventsUsageDescription
message to enable AppleEvents usage.

6 years ago* lisp/auth-source.el: Minor simplification
Stefan Monnier [Wed, 10 Oct 2018 13:45:09 +0000 (09:45 -0400)]
* lisp/auth-source.el: Minor simplification

Remove redundant :group args.
(auth-source-backend-parse): Use run-hook-with-args-until-success.

6 years ago* lisp/emacs-lisp/lisp-mnt.el: Use lexical-binding
Stefan Monnier [Wed, 10 Oct 2018 13:20:19 +0000 (09:20 -0400)]
* lisp/emacs-lisp/lisp-mnt.el: Use lexical-binding

Remove redundant :group

6 years agoFix typo in 'timerp' documentation
Mauro Aranda [Tue, 9 Oct 2018 21:20:53 +0000 (18:20 -0300)]
Fix typo in 'timerp' documentation

* doc/lispref/os.texi (Timers): Fix typo in 'timerp' documentation.
(Bug#32999)

Copyright-paperwork-exempt: yes

6 years agoMerge from origin/emacs-26
Glenn Morris [Tue, 9 Oct 2018 20:12:56 +0000 (13:12 -0700)]
Merge from origin/emacs-26

4cf1eb8 (origin/emacs-26) ; * src/data.c (Fkeywordp): Remove inaccura...
3f1470d * doc/emacs/mark.texi (Mark): Index "(de)activating the mark".

6 years ago; Merge from origin/emacs-26
Glenn Morris [Tue, 9 Oct 2018 20:12:56 +0000 (13:12 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

940ae15 Fix overflow lockup with frames > 255 lines

6 years agoMerge from origin/emacs-26
Glenn Morris [Tue, 9 Oct 2018 20:12:56 +0000 (13:12 -0700)]
Merge from origin/emacs-26

14c032d Avoid assertion violations in nonsensical calls to 'signal'
b99192f * lisp/simple.el (transient-mark-mode): Correct documentation...
7e42294 Update the locale and language database
8c53d9f Fix a typo in a doc string.
79bda3b Make nneething allow CRLF-encoded files (bug#32940)

6 years ago; Merge from origin/emacs-26
Glenn Morris [Tue, 9 Oct 2018 20:12:56 +0000 (13:12 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

2cae1cf Further fix to eieio-persistent

6 years agoMerge from origin/emacs-26
Glenn Morris [Tue, 9 Oct 2018 20:12:55 +0000 (13:12 -0700)]
Merge from origin/emacs-26

86d2169 Avoid ridiculously high stack limit requests on macOS
ac3622c Improve documentation of 'read-hide-char'

# Conflicts:
# src/emacs.c

6 years ago* lisp/vc/vc.el (vc-retrieve-tag-hook): Remove autoload cookie.
Charles A. Roelli [Tue, 9 Oct 2018 18:24:45 +0000 (20:24 +0200)]
* lisp/vc/vc.el (vc-retrieve-tag-hook): Remove autoload cookie.

See https://lists.gnu.org/r/emacs-devel/2018-10/msg00108.html.

6 years agoPort --enable-gcc-warnings to recent clang
Paul Eggert [Tue, 9 Oct 2018 18:16:00 +0000 (11:16 -0700)]
Port --enable-gcc-warnings to recent clang

* configure.ac: Disable -Wnull-pointer-arithmetic if clang (Bug#32924).

6 years agoFix malfunctioning cursor display on 32-bit Gtk
Paul Eggert [Tue, 9 Oct 2018 16:47:28 +0000 (09:47 -0700)]
Fix malfunctioning cursor display on 32-bit Gtk

This bug on 32-bit platforms was caused by the timespec_hz
definition going haywire because the C expression
FIXNUM_OVERFLOW_P (MOST_POSITIVE_FIXNUM) did not work in #if.
Eventually the numeric problem showed up as a malfunctioning
cursor (Bug#32992).  Fix the problem with MOST_POSITIVE_FIXNUM.
By the way, make_fixnum should check for integer overflow when
debugging; this would have made it easier to track this bug down.
But one fix at a time.
* src/lisp.h (INTTYPEBITS): Now a macro, so usable in #if.
(MOST_POSITIVE_FIXNUM): Mention it’s used in #if.

6 years ago* lisp/replace.el (occur--garbage-collect-revert-args): New function
Stefan Monnier [Tue, 9 Oct 2018 15:57:22 +0000 (11:57 -0400)]
* lisp/replace.el (occur--garbage-collect-revert-args): New function

(occur-mode, occur-1): Use it.
(occur--region-start, occur--region-end, occur--region-start-line)
(occur--orig-line): Remove vars.
(occur-engine): Fix left over use of occur--region-start-line.

6 years agoRevert part of last commit
Eli Zaretskii [Tue, 9 Oct 2018 14:55:15 +0000 (17:55 +0300)]
Revert part of last commit

* lisp/replace.el (occur-revert-function): Revert last change,
as it's no longer needed.  (Bug#32987)

6 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Tue, 9 Oct 2018 14:49:59 +0000 (17:49 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

6 years ago* lisp/replace.el: Rework implementation of the occur region
Stefan Monnier [Tue, 9 Oct 2018 14:47:13 +0000 (10:47 -0400)]
* lisp/replace.el: Rework implementation of the occur region

Put the region info in the "list of buffers" used for multi-occur.

(occur--parse-occur-buffer): Remove.
(occur): Pass the region to occur-1 as an overlay.
(occur-1): 'bufs' is now a list of buffers or overlays.
(occur-engine): 'buffers' is now a list of buffers or overlays.

6 years agoUnbreak 'revert-buffer' in Occur buffers
Eli Zaretskii [Tue, 9 Oct 2018 14:46:31 +0000 (17:46 +0300)]
Unbreak 'revert-buffer' in Occur buffers

* lisp/replace.el (occur-revert-function): Use the value of
occur-revert-function from the correct buffer.  (Bug#32987)

* test/lisp/replace-tests.el (replace-occur-revert-bug32543)
(replace-occur-revert-bug32987): New tests.

6 years ago* lisp/calendar/timeclock.el: Use lexical-binding
Stefan Monnier [Tue, 9 Oct 2018 02:33:22 +0000 (22:33 -0400)]
* lisp/calendar/timeclock.el: Use lexical-binding

Require cl-lib.  Remove redundant :group args.
(timeclock-status-string): Avoid 'setq'.
(timeclock-ask-for-project, timeclock-ask-for-reason):
Completionu tables can be simple lists of strings.
(timeclock-read-moment): Doesn't deserve to be defsubst (most of the
others don't either, admittedly).
(timeclock-entry): New type.
(timeclock-entry-begin, timeclock-entry-end, timeclock-entry-project)
(timeclock-entry-comment): Define via 'cl-defstruct'.
(timeclock-entry-list-projects, timeclock-day-list-projects):
Avoid add-to-list on lexical vars.
(timeclock-day-list): Use 'push'.
(timeclock-log-data): Use 'pcase'.
(timeclock-mean): Simplify.
(timeclock-generate-report): Use dotimes.

6 years agoUpdate from Gnulib
Paul Eggert [Tue, 9 Oct 2018 01:21:47 +0000 (18:21 -0700)]
Update from Gnulib

This incorporates:
2018-10-05 explicit_bzero: make it possible to namespace
2018-10-04 fcntl: make it possible to namespace
2018-10-01 mkostemp, mkostemps: fix C++ compilation on Mac OS X
2018-09-19 maint: mktime.c now shared with glibc
2018-09-18 file-has-acl: fix test failure on Cygwin 2.9
2018-09-18 gettime: nanotime never existed
* admin/merge-gnulib (AVOIDED_MODULES): Add mkdir.
* doc/misc/texinfo.tex, lib/acl-internal.c, lib/acl-internal.h:
* lib/acl_entries.c, lib/explicit_bzero.c, lib/fcntl.c:
* lib/get-permissions.c, lib/gettime.c, lib/mktime.c:
* lib/set-permissions.c, lib/stdlib.in.h, m4/acl.m4, m4/gettime.m4:
Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.

6 years ago* lisp/net/ntlm.el: Use lexical-binding
Stefan Monnier [Tue, 9 Oct 2018 00:59:59 +0000 (20:59 -0400)]
* lisp/net/ntlm.el: Use lexical-binding

(ntlm-string-as-unibyte): Remove.
(ntlm-build-auth-response): Use encode-coding-string instead.
(ntlm-build-auth-request, ntlm-build-auth-response, ntlm-ascii2unicode)
(ntlm-smb-owf-encrypt, ntlm-smb-hash, ntlm-smb-dohash, ntlm-md4hash):
Use fewer setq more Lisp-style.

6 years ago; * src/data.c (Fkeywordp): Remove inaccurate commentary. (Bug#32979)
Eli Zaretskii [Mon, 8 Oct 2018 20:14:59 +0000 (23:14 +0300)]
; * src/data.c (Fkeywordp): Remove inaccurate commentary.  (Bug#32979)

6 years agoNew hook 'vc-retrieve-tag-hook' (Bug#32754)
Charles A. Roelli [Mon, 8 Oct 2018 19:49:41 +0000 (21:49 +0200)]
New hook 'vc-retrieve-tag-hook' (Bug#32754)

* etc/NEWS: Mention the new variable.

* lisp/vc/vc.el (vc-retrieve-tag-hook): New hook.
(vc-retrieve-tag): Run the new hook and update its
documentation string.

6 years ago* doc/emacs/mark.texi (Mark): Index "(de)activating the mark".
Charles A. Roelli [Mon, 8 Oct 2018 17:21:41 +0000 (19:21 +0200)]
* doc/emacs/mark.texi (Mark): Index "(de)activating the mark".

(Bug#32956)

6 years agoFix overflow lockup with frames > 255 lines
Scott Corley [Mon, 8 Oct 2018 06:21:40 +0000 (23:21 -0700)]
Fix overflow lockup with frames > 255 lines

Backport from master.
* src/scroll.c (struct matrix_elt): Change unsigned char fields to
int to handle frames with more than 255 lines (Bug#32951).
Copyright-paperwork-exempt: yes

6 years agoFix MinGW compilation problem in timefns.c
Eli Zaretskii [Sun, 7 Oct 2018 17:51:11 +0000 (20:51 +0300)]
Fix MinGW compilation problem in timefns.c

* src/timefns.c (lisp_to_timespec): Fix a mismatch between
time_t and timespec.tv_sec data types.

6 years agoAvoid assertion violations in nonsensical calls to 'signal'
Eli Zaretskii [Sun, 7 Oct 2018 14:45:12 +0000 (17:45 +0300)]
Avoid assertion violations in nonsensical calls to 'signal'

* src/eval.c (Fsignal): If both arguments are nil, replace the
first one with 'error', to avoid assertion violations further
down the line.  (Bug#32961)

6 years ago* src/scroll.c (calculate_scrolling): Remove casts.
Paul Eggert [Sun, 7 Oct 2018 07:10:29 +0000 (00:10 -0700)]
* src/scroll.c (calculate_scrolling): Remove casts.

6 years agoFix overflow lockup with frames > 255 lines
Scott Corley [Sun, 7 Oct 2018 07:10:29 +0000 (00:10 -0700)]
Fix overflow lockup with frames > 255 lines

* src/scroll.c (struct matrix_elt): Change unsigned char fields to
int to handle frames with more than 255 lines (Bug#32951).
Copyright-paperwork-exempt: yes

6 years agoImprovements on (TICKS . HZ)
Paul Eggert [Wed, 3 Oct 2018 16:10:01 +0000 (09:10 -0700)]
Improvements on (TICKS . HZ)

This patch is in response to Eli's review (Bug#32902#10).
* src/systime.c: Doc strings of affected functions now refer
to format-time-string instead of to Lisp manual, and
format-time-string's doc string covers time values.
* test/src/systime-tests.el (format-time-string-with-zone):
Check decode-time too.
(decode-then-encode-time, time-arith-tests): New tests.

6 years agoNew (TICKS . HZ) timestamp format
Paul Eggert [Wed, 3 Oct 2018 16:10:01 +0000 (09:10 -0700)]
New (TICKS . HZ) timestamp format

This follows on a suggestion by Stefan Monnier in:
https://lists.gnu.org/r/emacs-devel/2018-08/msg00991.html
(Bug#32902).
* doc/lispref/buffers.texi (Modification Time):
* doc/lispref/os.texi (Processor Run Time, Time Calculations)
* doc/lispref/processes.texi (System Processes):
* doc/lispref/text.texi (Undo):
Let the "Time of Day" section cover timestamp format details.
* doc/lispref/os.texi (Time of Day):
Say that timestamp internal format should not be assumed.
Document new (ticks . hz) format.  Omit mention of seconds-to-time
since it is now just an alias for encode-time.
(Time Conversion): Document encode-time extension.
* etc/NEWS: Mention changes.
* lisp/calendar/cal-dst.el (calendar-system-time-basis): Now const.
* lisp/calendar/cal-dst.el (calendar-absolute-from-time)
(calendar-time-from-absolute)
(calendar-next-time-zone-transition):
* lisp/emacs-lisp/timer.el (timer-next-integral-multiple-of-time):
Simplify by using bignums, (TICKS . HZ), and new encode-time.
* lisp/emacs-lisp/timer.el (timer-next-integral-multiple-of-time):
Simplify by using bignums and new encode-time.
* lisp/calendar/parse-time.el (parse-iso8601-time-string):
Handle DST more accurately, by using new encode-time.
* lisp/calendar/time-date.el (seconds-to-time):
* lisp/calendar/timeclock.el (timeclock-seconds-to-time):
Now just an alias for encode-time.
* lisp/calendar/time-date.el (days-to-time):
* lisp/emacs-lisp/timer.el (timer--time-setter):
* lisp/net/ntlm.el (ntlm-compute-timestamp):
* lisp/obsolete/vc-arch.el (vc-arch-add-tagline):
* lisp/org/org-id.el (org-id-uuid, org-id-time-to-b36):
* lisp/tar-mode (tar-octal-time):
Don't assume timestamps default to list form.
* lisp/tar-mode.el (tar-parse-octal-long-integer):
Now an obsolete alias for tar-parse-octal-integer.
* src/keyboard.c (decode_timer): Adjust to changes to
time decoding functions elsewhere.
* src/timefns.c: Include bignum.h, limits.h.
(FASTER_TIMEFNS): New macro.
(WARN_OBSOLETE_TIMESTAMPS, CURRENT_TIME_LIST)
(timespec_hz, trillion, ztrillion):
New constants.
(make_timeval): Use TIME_T_MAX instead of its definiens.
(check_time_validity, time_add, time_subtract):
Remove.  All uses removed.
(disassemble_lisp_time): Remove; old code now folded into
decode_lisp_time.  All callers changed.
(invalid_hz, s_ns_to_double, ticks_hz_list4, mpz_set_time)
(timespec_mpz, timespec_ticks, time_hz_ticks)
(lisp_time_hz_ticks, lisp_time_seconds)
(time_form_stamp, lisp_time_form_stamp, decode_ticks_hz)
(decode_lisp_time, mpz_time, list4_to_timespec):
New functions.
(decode_float_time, decode_time_components, lisp_to_timespec):
Adjust to new struct lisp_time, which does not lose
information like the old one did.
(enum timeform): New enum.
(decode_time_components): New arg FORM.  All callers changed.
RESULT and DRESULT are now mutually exclusive; no callers need
to change because of this.
(decode_time_components, lisp_time_struct)
(lisp_seconds_argument, time_arith, make_lisp_time, Ffloat_time)
(Fencode_time):
Add support for (TICKS . HZ) form.
(DECODE_SECS_ONLY): New constant.
(lisp_time_struct): 2nd arg is now enum timeform, not int.
All callers changed.
(check_tm_member): Support bignums.m
(Fencode_time): Add new two-arg functionality.
* src/systime.h (struct lisp_time): Now ticks+hz rather than
hi+lo+us+ps, since ticks+hz does not lose info.
* test/src/systime-tests.el (time-equal-p-nil-nil):
New test.

6 years agoExport converting mpz to [u]intmax
Paul Eggert [Wed, 3 Oct 2018 16:10:01 +0000 (09:10 -0700)]
Export converting mpz to [u]intmax

This refactoring will help improve timestamp handling later
(Bug#32902).
* src/bignum.c (mpz_set_uintmax): Move to bignum.h,
and make inline.
(mpz_set_uintmax_slow): Now extern.
(mpz_to_intmax, mpz_to_uintmax): New functions, with
implementation taken from the old bignum_to_intmax
and bignum_to_uintmax.
(bignum_to_intmax, bignum_to_uintmax): Use them.

6 years agoCoalesce duplicate make_lisp_timeval etc.
Paul Eggert [Wed, 3 Oct 2018 16:10:00 +0000 (09:10 -0700)]
Coalesce duplicate make_lisp_timeval etc.

* src/sysdep.c (timeval_to_timespec, make_lisp_timeval):
Coalesce duplicate definitions (Bug#32902).

6 years agoMove timestamp-related stuff to timefns.c
Paul Eggert [Wed, 3 Oct 2018 16:10:00 +0000 (09:10 -0700)]
Move timestamp-related stuff to timefns.c

This does not change behavior; it’s just long-overdue
refactoring (Bug#32902).
* src/emacs.c (main): Call init_timefns, syms_of_timefns.
* src/timefns.c: New file, containing timestamp-related stuff
from editfns.c and sysdep.c.
* src/Makefile.in (base_obj): Add timefns.o.
* src/editfns.c: Simplify by moving a big chunk to timefns.c.
Do not include systime.h, sys/resource.h, sys/param.h,
strftime.h, coding.h.
(HAVE_TZALLOC_BUG, TM_YEAR_BASE, HAVE_TM_GMTOFF, tzeqlen)
(local_tz, utc_tz, emacs_localtime_rz, emacs_mktime_z)
(invalid_time_zone_specification, xtzfree, tzlookup)
(TIME_T_MIN, TIME_T_MAX, time_overflow, invalid_time)
(check_time_validity, hi_time, lo_time, Fcurrent_time)
(time_add, time_subtract, time_arith, Ftime_add)
(Ftime_subtract, Ftime_less_p, Fget_internal_run_time)
(make_lisp_time, disassemble_lisp_time, decode_float_time)
(lisp_to_timespec, lisp_time_struct, lisp_time_argument)
(lisp_seconds_argument, Ffloat_time, emacs_nmemftime)
(Fformat_time_string, format_time_string, Fdecode_time)
(check_tm_member, Fencode_time, Fcurrent_time_string)
(tm_gmtoff, Fcurrent_time_zone, Fset_time_zone_rule)
(emacs_getenv_TZ, emacs_setenv_TZ): Move to timefns.c.
* src/emacs.c (main): Adjust to initialization changes.
* src/sysdep.c: Include <sys/resource.h> if it's present.
Regularize includes a bit.
(Fget_internal_run_time): Move here from editfns.c.
(init_timefns, syms_of_timefns): New functions.
* src/w32.h (w32_get_internal_run_time): Move decl here
so that it need not be cloned.
* test/src/editfns-tests.el:
* test/src/editfns-tests.el (format-time-string-with-zone)
(format-time-string-with-outlandish-zone)
(editfns-tests--have-leap-seconds)
(format-time-string-with-bignum-on-32-bit):
Move to ...
* test/src/timefns-tests.el: ... this new file.

6 years ago* lisp/simple.el (transient-mark-mode): Correct documentation. (Bug#32956)
Charles A. Roelli [Sat, 6 Oct 2018 19:24:32 +0000 (21:24 +0200)]
* lisp/simple.el (transient-mark-mode): Correct documentation.  (Bug#32956)

6 years agoUpdate the locale and language database
Eli Zaretskii [Sat, 6 Oct 2018 09:38:36 +0000 (12:38 +0300)]
Update the locale and language database

* lisp/international/mule-cmds.el (locale-language-names):
Update the list of supported locales.  Use existing language
names where available.

6 years agoFix a typo in a doc string.
Eli Zaretskii [Fri, 5 Oct 2018 13:51:17 +0000 (16:51 +0300)]
Fix a typo in a doc string.

* lisp/window.el (display-buffer-alist): Fix a typo in a doc string.
Reported by Michael Heerdegen <michael_heerdegen@web.de>.

6 years agoMake nneething allow CRLF-encoded files (bug#32940)
Katsumi Yamaoka [Fri, 5 Oct 2018 00:22:20 +0000 (00:22 +0000)]
Make nneething allow CRLF-encoded files (bug#32940)

* lisp/gnus/nneething.el (nneething-request-article):
Bind coding system to raw-text instead of binary when reading a file,
that may be CRLF-encoded (bug#32940).

6 years agoFurther fix to eieio-persistent
Eric Abrahamsen [Sun, 8 Apr 2018 23:49:20 +0000 (16:49 -0700)]
Further fix to eieio-persistent

* lisp/emacs-lisp/eieio-base.el (eieio-persistent-validate/fix-slot-value):
  Make handling of hash tables and vectors recursive. This is
  necessary because the write process, in `eieio-override-prin1' is
  also recursive. With any luck, this will be the last fix of its
  kind. If that's true, cherry-pick to Emacs 26.2 later on.

6 years agoAvoid ridiculously high stack limit requests on macOS
Eli Zaretskii [Thu, 4 Oct 2018 16:13:17 +0000 (19:13 +0300)]
Avoid ridiculously high stack limit requests on macOS

* src/emacs.c (main): Avoid wraparound in subtraction of
rlim_t values, in case rlim_t is an unsigned type.  (Bug#32338)

6 years agoSome reaarangements in tramp*.texi
Michael Albinus [Thu, 4 Oct 2018 07:46:14 +0000 (09:46 +0200)]
Some reaarangements in tramp*.texi

* doc/misc/trampver.texi (trampfn): Change check for definition of macro.
(tramp-bug-report-address): New variable.

* doc/misc/tramp.texi (Top, Bug Reports): Use it.

6 years agoFix emacs_re_safe_alloca calculation
Paul Eggert [Wed, 3 Oct 2018 22:55:43 +0000 (15:55 -0700)]
Fix emacs_re_safe_alloca calculation

Problem and draft fix noted by Eli Zaretskii in:
https://lists.gnu.org/r/emacs-devel/2018-10/msg00022.html
* src/emacs.c (main): Fix arithmetic used in calculation
of emacs_re_safe_alloca.

6 years ago* Makefile.in (uninstall): Remove some stray icon files.
Glenn Morris [Wed, 3 Oct 2018 21:08:28 +0000 (17:08 -0400)]
* Makefile.in (uninstall): Remove some stray icon files.

6 years agoTweak Makefile emacs-module.h handling
Glenn Morris [Wed, 3 Oct 2018 20:47:01 +0000 (16:47 -0400)]
Tweak Makefile emacs-module.h handling

* Makefile.in (install-arch-indep, uninstall): Respect DESTDIR.
Handle whitespace.  Remove non-portable mkdir argument.

6 years agoInstall emacs-module.h (Bug#31929)
Philipp Stephani [Thu, 20 Sep 2018 12:03:29 +0000 (14:03 +0200)]
Install emacs-module.h (Bug#31929)

* Makefile.in (includedir): New variable.
(install-arch-indep): Install emacs-module.h.
(uninstall): Uninstall emacs-module.h.

6 years agoImprove documentation of 'read-hide-char'
Charles A. Roelli [Wed, 3 Oct 2018 17:59:34 +0000 (19:59 +0200)]
Improve documentation of 'read-hide-char'

* src/minibuf.c (syms_of_minibuf) <Vread_hide_char>: Clarify
documentation and mention where else the variable is used.
* doc/lispref/minibuf.texi (Reading a Password): Add an index
entry for 'read-hide-char'.

6 years ago* doc/misc/trampver.texi (trampfn): Call `unmacro' prior defining
Michael Albinus [Wed, 3 Oct 2018 17:34:02 +0000 (19:34 +0200)]
* doc/misc/trampver.texi (trampfn): Call `unmacro' prior defining

* doc/misc/trampver.texi (trampfn): Call `unmacro' prior
defining.  trampver.texi is included several times; it raises an
error otherwise.

6 years ago; Merge from origin/emacs-26
Glenn Morris [Wed, 3 Oct 2018 16:25:27 +0000 (09:25 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

99f45ee (origin/emacs-26) In follow mode, prevent the cursor resting ...

6 years agoMerge from origin/emacs-26
Glenn Morris [Wed, 3 Oct 2018 16:25:26 +0000 (09:25 -0700)]
Merge from origin/emacs-26

ea77c65 Revert "Temporary workaround for bug #32848 for branch emacs-26"
2c8ea46 Revert "* etc/NEWS: Note setting make-cursor-line-fully-visib...
f8df6f2 * etc/NEWS: Note setting make-cursor-line-fully-visible to ni...
cdca208 Fix note about interactive advice (Bug#32905)
508c40e Comple fix for Bug#32550

6 years ago; Merge from origin/emacs-26
Glenn Morris [Wed, 3 Oct 2018 16:25:26 +0000 (09:25 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

35b56a2 ; Auto-commit of loaddefs files.

6 years agoMerge from origin/emacs-26
Glenn Morris [Wed, 3 Oct 2018 16:25:26 +0000 (09:25 -0700)]
Merge from origin/emacs-26

9c028d6 * lisp/savehist.el (savehist-mode): Doc fix.  (Bug#32889)
3a2b5a7 ; * lisp/bindings.el (bindings--define-key): Doc fix.  (Bug#3...
6a7a869 Org manual: Rewrite the Org Mobile section

# Conflicts:
# lisp/savehist.el

6 years ago; Merge from origin/emacs-26
Glenn Morris [Wed, 3 Oct 2018 16:23:16 +0000 (09:23 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

6650751 Temporary workaround for bug #32848 for branch emacs-26

6 years agoMerge from origin/emacs-26
Glenn Morris [Wed, 3 Oct 2018 16:23:16 +0000 (09:23 -0700)]
Merge from origin/emacs-26

7296b6f Improve cl-do, cl-do* docstrings
d416109 Avoid returning early in 'while-no-input' due to subprocesses
e8a4d94 Cleanup when opening a new terminal fails. (Bug#32794)

# Conflicts:
# etc/NEWS

6 years agoIn follow mode, prevent the cursor resting on a partially displayed line
Alan Mackenzie [Wed, 3 Oct 2018 15:57:15 +0000 (15:57 +0000)]
In follow mode, prevent the cursor resting on a partially displayed line

Don't merge to master.  This fixes bug #32848

* lisp/follow.el (follow-adjust-window): If point ends up in a partially
displayed line in a left hand or middle window, move it one line
forward, to
prevent unwanted scrolling should make-cursor-line-fully-visible be
non-nil.

6 years agoRevert "Temporary workaround for bug #32848 for branch emacs-26"
Alan Mackenzie [Wed, 3 Oct 2018 12:08:59 +0000 (12:08 +0000)]
Revert "Temporary workaround for bug #32848 for branch emacs-26"

This reverts commit 6650751ce73413d05599df07a9c5bc70744260f3.

6 years agoRevert "* etc/NEWS: Note setting make-cursor-line-fully-visible to nil in follow...
Alan Mackenzie [Wed, 3 Oct 2018 12:08:27 +0000 (12:08 +0000)]
Revert "* etc/NEWS: Note setting make-cursor-line-fully-visible to nil in follow-mode"

This reverts commit f3c8f4bde2de2b9d42c44f5e44f34c427bebdc58.

6 years ago* etc/NEWS: Note setting make-cursor-line-fully-visible to nil in follow-mode
Alan Mackenzie [Sun, 30 Sep 2018 15:58:40 +0000 (15:58 +0000)]
* etc/NEWS: Note setting make-cursor-line-fully-visible to nil in follow-mode

Also re-insert the "temporary note" explaining --- and +++.

6 years agoPut follow-mode's engine on pre-redisplay-hook instead of post-command-hook
Alan Mackenzie [Wed, 3 Oct 2018 10:45:59 +0000 (10:45 +0000)]
Put follow-mode's engine on pre-redisplay-hook instead of post-command-hook

This fixes bug #32874.

* lisp/follow.el (follow-mode): Put follow-pre-redisplay-function onto
pre-redisplay-function instead of putting follow-post-command-hook onto
post-command-hook.  Amend the removal operation analogously.
(follow-pre-redisplay-function): New function.

6 years agoFix note about interactive advice (Bug#32905)
Noam Postavsky [Tue, 2 Oct 2018 23:56:43 +0000 (19:56 -0400)]
Fix note about interactive advice (Bug#32905)

* doc/lispref/functions.texi (Core Advising Primitives): Add missing
':', and finish the sentence fragment.

6 years ago* lisp/emacs-lisp/autoload.el (autoload-ignored-definitions): New var
Stefan Monnier [Tue, 2 Oct 2018 16:37:04 +0000 (12:37 -0400)]
* lisp/emacs-lisp/autoload.el (autoload-ignored-definitions): New var

(autoload-generate-file-autoloads): Use it.

6 years agoRearrangements in tramp*.texi
Michael Albinus [Tue, 2 Oct 2018 14:51:51 +0000 (16:51 +0200)]
Rearrangements in tramp*.texi

* doc/misc/trampver.texi (trampfn): New macro, taken from tramp.texi.

* doc/misc/tramp.texi (trampfn): Moved to trampver.texi.
(Top): Add sections `System Requirement' and `Basic Installation'.

6 years ago* lisp/vc/vc.el (vc-checkin): Simplify 'run-hook' call.
Charles A. Roelli [Mon, 1 Oct 2018 19:41:11 +0000 (21:41 +0200)]
* lisp/vc/vc.el (vc-checkin): Simplify 'run-hook' call.

6 years agoUse `float-time' in tramp-sh.el where needed
Michael Albinus [Mon, 1 Oct 2018 12:34:35 +0000 (14:34 +0200)]
Use `float-time' in tramp-sh.el where needed

* lisp/net/tramp-sh.el (tramp-sh-handle-verify-visited-file-modtime):
Use `float-time'.

6 years agoMinor edits in tramp.texi
Michael Albinus [Mon, 1 Oct 2018 12:33:51 +0000 (14:33 +0200)]
Minor edits in tramp.texi

* doc/misc/tramp.texi (Password handling): Say "user option".
(Remote shell setup): Say "environment variable".
(External packages): Add `non-essential' to variable index.

6 years agoComple fix for Bug#32550
Michael Albinus [Mon, 1 Oct 2018 12:17:27 +0000 (14:17 +0200)]
Comple fix for Bug#32550

* lisp/net/tramp.el (tramp-rfn-eshadow-update-overlay):
Use `save-excursion'.  This completes the fix of Bug#32550.

6 years ago; Auto-commit of loaddefs files.
Glenn Morris [Mon, 1 Oct 2018 11:23:39 +0000 (07:23 -0400)]
; Auto-commit of loaddefs files.

6 years ago; Auto-commit of loaddefs files.
Glenn Morris [Mon, 1 Oct 2018 10:23:16 +0000 (06:23 -0400)]
; Auto-commit of loaddefs files.

6 years ago* lisp/savehist.el (savehist-mode): Doc fix. (Bug#32889)
Eli Zaretskii [Mon, 1 Oct 2018 07:45:33 +0000 (10:45 +0300)]
* lisp/savehist.el (savehist-mode): Doc fix.  (Bug#32889)

6 years ago; * lisp/bindings.el (bindings--define-key): Doc fix. (Bug#32885)
Eli Zaretskii [Mon, 1 Oct 2018 07:19:27 +0000 (10:19 +0300)]
; * lisp/bindings.el (bindings--define-key): Doc fix.  (Bug#32885)

6 years agoAutomate support for `sql-indent' ELPA package
Michael R. Mauger [Mon, 1 Oct 2018 04:12:51 +0000 (00:12 -0400)]
Automate support for `sql-indent' ELPA package

* progmodes/lisp/sql.el (sql-use-indent-support): New variable.
(sql-is-indent-available): New function.
(sql-indent-enable): Use above.
(sql-mode-hook, sql-interactive-mode-hook): Add `sql-indent-enable'.

6 years ago* doc/emacs/help.texi (Misc Help): Document 'info-other-window'.
Charles A. Roelli [Sun, 30 Sep 2018 15:05:29 +0000 (17:05 +0200)]
* doc/emacs/help.texi (Misc Help): Document 'info-other-window'.