]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years ago; Nit fix in comment
AndreaCorallo [Wed, 26 Feb 2020 21:36:48 +0000 (21:36 +0000)]
; Nit fix in comment

4 years agoAdd system-configuration in the compilation output path
AndreaCorallo [Thu, 6 Feb 2020 20:23:14 +0000 (20:23 +0000)]
Add system-configuration in the compilation output path

4 years agoChange parameter name into comp--compile-ctxt-to-file
AndreaCorallo [Thu, 6 Feb 2020 20:41:52 +0000 (20:41 +0000)]
Change parameter name into comp--compile-ctxt-to-file

4 years ago* Reorganize passes
Andrea Corallo [Sat, 29 Feb 2020 17:38:50 +0000 (17:38 +0000)]
* Reorganize passes

- Make propagate responsible for keeping SSA up to date.

- Run propagate-alloc as very last before final not to risk bothering
  with mvar array allocation during previous tranformations.

- Fix SSA if TCO modify the CFG.

4 years ago* Allow for multiple SSA runs
Andrea Corallo [Sat, 29 Feb 2020 17:14:43 +0000 (17:14 +0000)]
* Allow for multiple SSA runs

Add function ssa-status as `comp-func' slot and have `comp-clean-ssa'
to run when necessary.

4 years agoRemove relocation index form LIMPLE setimm
AndreaCorallo [Sun, 1 Mar 2020 14:42:41 +0000 (14:42 +0000)]
Remove relocation index form LIMPLE setimm

Given that every object identify a relocation class simplify setimm too.

4 years agoOptimize relocation classes for object duplication
Andrea Corallo [Sat, 29 Feb 2020 15:53:42 +0000 (15:53 +0000)]
Optimize relocation classes for object duplication

Merge duplicated  objects during final. Precendece is:
1 d-default
2 d-impure
3 d-ephemeral

Now every object identify uniquely a relocation class.  Because of
this there's no need to keep the reloc class into m-var.

4 years ago* Rename comp-emit-set-const -> comp-emit-setimm
Andrea Corallo [Sat, 29 Feb 2020 14:12:21 +0000 (14:12 +0000)]
* Rename comp-emit-set-const -> comp-emit-setimm

4 years ago* Reduce stack depth while marking native compiled subrs
Andrea Corallo [Sat, 29 Feb 2020 11:05:46 +0000 (11:05 +0000)]
* Reduce stack depth while marking native compiled subrs

4 years agoMerge remote-tracking branch 'savannah/master' into HEAD
Andrea Corallo [Sun, 1 Mar 2020 19:21:38 +0000 (19:21 +0000)]
Merge remote-tracking branch 'savannah/master' into HEAD

4 years ago; Auto-commit of loaddefs files.
Glenn Morris [Sun, 1 Mar 2020 18:04:27 +0000 (10:04 -0800)]
; Auto-commit of loaddefs files.

4 years ago* lisp/progmodes/cperl-mode.el: Clarify comment.
Stefan Kangas [Sun, 1 Mar 2020 00:56:42 +0000 (01:56 +0100)]
* lisp/progmodes/cperl-mode.el: Clarify comment.

4 years agoRemove more XEmacs compat code from viper
Stefan Kangas [Sun, 1 Mar 2020 00:42:36 +0000 (01:42 +0100)]
Remove more XEmacs compat code from viper

* lisp/emulation/viper-mous.el (viper-multiclick-timeout)
(viper-current-click-count, viper-last-click-event-timestamp)
(viper-mouse-click-insert-word)
(viper-mouse-click-search-word): Remove XEmacs compat code.
(viper-event-click-count): Redefine as obsolete function alias
for 'event-click-count'.
* lisp/emulation/viper-util.el (viper-check-version): Declare
obsolete.

4 years agoMake 'load-dangerous-libraries' obsolete (Bug#37819)
Stefan Kangas [Sun, 1 Mar 2020 00:19:23 +0000 (01:19 +0100)]
Make 'load-dangerous-libraries' obsolete (Bug#37819)

When 'load-dangerous-libraries' was t, Emacs allowed loading .elc
files compiled by XEmacs.  This patch removes the support for that use
case, and declares the variable obsolete.

* lisp/subr.el (load-dangerous-libraries): Declare obsolete.
* src/lread.c (Fload): Ignore its value, and thereby refuse to load
files byte compiled by XEmacs.
(syms_of_lread): Update doc string of 'bytecomp-version-regexp' to not
refer to it.
* doc/emacs/building.texi (Lisp Libraries): Remove its documentation.

4 years agoFix XEmacs-specific clause in definition of pascal-outline-map.
Noah Friedman [Sat, 29 Feb 2020 22:50:51 +0000 (14:50 -0800)]
Fix XEmacs-specific clause in definition of pascal-outline-map.

* lisp/progmodes/pascal.el (pascal-outline-map): Call set-keymap-name
on map, not pascal-outline-map, as the latter is not yet defined.

4 years agoUnbreak build with CHECK_STRUCTS
Philipp Stephani [Sat, 29 Feb 2020 20:12:18 +0000 (21:12 +0100)]
Unbreak build with CHECK_STRUCTS

* src/pdumper.c (dump_object): Fix hash for Lisp_Type after commit
202c3319a28c029d6971dccea92f92425c5e8067.

4 years agoPort timestamp tests to odd timezones, (TICKS . HZ)
Paul Eggert [Fri, 28 Feb 2020 07:16:44 +0000 (23:16 -0800)]
Port timestamp tests to odd timezones, (TICKS . HZ)

* test/src/timefns-tests.el:
(format-time-string-padding-minimal-deletes-unneeded-zeros)
(format-time-string-padding-minimal-retains-needed-zeros)
(format-time-string-padding-spaces)
(format-time-string-padding-zeros-adds-on-insignificant-side):
Don't assume local time can represent 2000-02-15 00:00:00,
as there might be a DST jump over midnight.
Work even when timestamps are of (TICKS . HZ) form.
Simplify by avoiding need to call time-add.

4 years agoRevert "Signal an error for the regexp "[:alnum:]""
Mattias Engdegård [Thu, 27 Feb 2020 17:29:56 +0000 (18:29 +0100)]
Revert "Signal an error for the regexp "[:alnum:]""

This reverts commit 8d5e8cddab732ac90e9ae930c63f7830f9dab24f.

4 years agoRevert "Don't complain about the regexp "[:-:]""
Mattias Engdegård [Thu, 27 Feb 2020 17:29:43 +0000 (18:29 +0100)]
Revert "Don't complain about the regexp "[:-:]""

This reverts commit 3766bf728a43933083f4525970bcf9fdace3838d.

4 years ago* src/nsterm.m ([EmacsView toolbarClicked:]): Fix last change
Robert Pluim [Thu, 27 Feb 2020 17:32:50 +0000 (12:32 -0500)]
* src/nsterm.m ([EmacsView toolbarClicked:]): Fix last change

4 years ago* src/gtkutil.c, src/nsterm.m: Fix bug#39808
Stefan Monnier [Thu, 27 Feb 2020 16:18:28 +0000 (11:18 -0500)]
* src/gtkutil.c, src/nsterm.m: Fix bug#39808

Complete 3b4bd4be1d where I apparently failed to grep properly and
missed two more places where the dummy events were generated.

* src/nsterm.m ([EmacsView toolbarClicked:]):
* src/gtkutil.c (xg_tool_bar_callback): Don't emit dummy "prefix" events.

4 years ago* lisp/emacs-lisp/eldoc.el (eldoc-documentation-function): No nil value
Stefan Monnier [Thu, 27 Feb 2020 03:47:32 +0000 (22:47 -0500)]
* lisp/emacs-lisp/eldoc.el (eldoc-documentation-function): No nil value

(eldoc--supported-p): Move after the vars it uses.  Simplify.
(eldoc-print-current-symbol-info): Revert to previous code which
assumed a non-nil value of eldoc-documentation-function.

4 years agonnmail-cache-close should not use nofollow
Paul Eggert [Thu, 27 Feb 2020 01:10:21 +0000 (17:10 -0800)]
nnmail-cache-close should not use nofollow

nnmail-cache-close did not work when ~/.nnmail-cache was a symlink
to some other directory.  Reported by Michael Albinus (Bug#39793).
* lisp/gnus/nnbabyl.el (nnbabyl-create-mbox):
* lisp/gnus/nndiary.el (nndiary-generate-nov-file):
* lisp/gnus/nnfolder.el (nnfolder-possibly-change-group):
* lisp/gnus/nnmbox.el (nnmbox-create-mbox):
* lisp/gnus/nnml.el (nnml-generate-nov-file):
Pass ‘excl’ to nnmail-write-region when creating a file, for safety.
* lisp/gnus/nnmail.el (nnmail-write-region):
Add optional MUSTBENEW arg, to stay consistent with write-region.
Past ‘nofollow’ to set-file-modes only when MUSTBENEW is ‘excl’.

4 years agoDon't complain about the regexp "[:-:]"
Mattias Engdegård [Wed, 26 Feb 2020 21:59:22 +0000 (22:59 +0100)]
Don't complain about the regexp "[:-:]"

Suggested by Clément Pit-Claudel.

* src/regex-emacs.c (regex_compile):
* test/src/regex-emacs-tests.el (regexp-invalid): Tolerate ranges.

4 years agoSignal an error for the regexp "[:alnum:]"
Mattias Engdegård [Wed, 26 Feb 2020 13:46:01 +0000 (14:46 +0100)]
Signal an error for the regexp "[:alnum:]"

Omitting the extra brackets is a common mistake; see discussion at
https://lists.gnu.org/archive/html/emacs-devel/2020-02/msg00215.html

* src/regex-emacs.c (reg_errcode_t, re_error_msgid): Add REG_ECLASSBR.
(regex_compile): Check for the mistake.
* test/src/regex-emacs-tests.el (regexp-invalid): Test.
* etc/NEWS: Announce.

4 years agoFinish Tramp's implementation of 'nofollow
Michael Albinus [Wed, 26 Feb 2020 17:43:11 +0000 (18:43 +0100)]
Finish Tramp's implementation of 'nofollow

* lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy):
Do not use 'nofollow.
(tramp-adb-handle-set-file-modes):
* lisp/net/tramp-smb.el (tramp-smb-handle-set-file-modes):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-modes):
* lisp/net/tramp-sh.el (tramp-sh-handle-set-file-modes):
Handle FLAG properly.
(tramp-get-remote-chmod-h): Adapt implementation.

* test/lisp/net/tramp-tests.el (tramp-get-remote-chmod-h): Declare.
(tramp--test-ignore-make-symbolic-link-error): Revert last change.
(tramp-test20-file-modes): Adapt test.

4 years ago* ; Add a TODO for a future optimization
AndreaCorallo [Tue, 25 Feb 2020 22:41:59 +0000 (22:41 +0000)]
* ; Add a TODO for a future optimization

4 years agoStore optimize qualities into .eln files
AndreaCorallo [Tue, 25 Feb 2020 22:37:20 +0000 (22:37 +0000)]
Store optimize qualities into .eln files

For now just comp-speed and comp-debug are stored.

4 years agoRename d-base allocation classe into d-default
AndreaCorallo [Tue, 25 Feb 2020 21:39:59 +0000 (21:39 +0000)]
Rename d-base allocation classe into d-default

4 years agoAdd ephemeral relocation data class
AndreaCorallo [Tue, 25 Feb 2020 22:35:02 +0000 (22:35 +0000)]
Add ephemeral relocation data class

Add a new class of relocated objects that is in use just during load
process.  This in order to avoid having to maintain them in the heap
and traverse them at every GC.

4 years ago* Two grammar fixes into async hooks doc
Andrea Corallo [Mon, 24 Feb 2020 09:32:51 +0000 (09:32 +0000)]
* Two grammar fixes into async hooks doc

4 years agoMerge remote-tracking branch 'savannah/master' into HEAD
Andrea Corallo [Wed, 26 Feb 2020 10:39:15 +0000 (10:39 +0000)]
Merge remote-tracking branch 'savannah/master' into HEAD

4 years agoShow friendly message after package install
Ryan Olson [Sun, 23 Feb 2020 15:15:10 +0000 (08:15 -0700)]
Show friendly message after package install

* lisp/emacs-lisp/package.el (package-install): Once we know the
package has successfully been installed using the `package-install`
command, instead of relying on the compile "Done" message, give a
message that tells the user that the package has been
installed.  (Bug#21857)

Copyright-paperwork-exempt: yes

4 years agoExpose ElDoc functions in a hook (Bug#28257)
Mark Oteiza [Tue, 25 Feb 2020 22:53:04 +0000 (17:53 -0500)]
Expose ElDoc functions in a hook (Bug#28257)

* lisp/emacs-lisp/eldoc.el: Update commentary.
(eldoc--eval-expression-setup): Use new hook.
(eldoc--supported-p): Accomodate new hook.
(eldoc-documentation-functions): New hook.
(eldoc-documentation-default, eldoc-documentation-compose): New
functions.
(eldoc-documentation-function): Use 'eldoc-documentation-default' as new
default value.  Update documentation and custom attributes.
(eldoc-print-current-symbol-info): Accomodate possible null value for
'eldoc-documentation-function'.
* etc/NEWS: Mention them.
* doc/emacs/programs.texi (Emacs Lisp Documentation Lookup): Mention
new hook and changes to 'eldoc-documentation-function'.
* lisp/hexl.el (hexl-mode, hexl-revert-buffer-function):
* lisp/ielm.el (inferior-emacs-lisp-mode):
* lisp/progmodes/cfengine.el (cfengine3-mode):
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode):
* lisp/progmodes/octave.el (octave-mode):
* lisp/progmodes/python.el (python-mode): Use new hook.

4 years agoGenerate 'substring' byte op (bug#39709)
Mattias Engdegård [Fri, 21 Feb 2020 11:16:20 +0000 (12:16 +0100)]
Generate 'substring' byte op (bug#39709)

The 'substring' byte op was not emitted, apparently by mistake.  Fix.
Suggested by Mark Oteiza <mvoteiza@udel.edu>.

* lisp/emacs-lisp/bytecomp.el (byte-defop-compiler): Add '1-3' clause.
(byte-compile-one-to-three-args): New.
* lisp/emacs-lisp/byte-opt.el (byte-compile-side-effect-free-ops):
Add 'byte-substring'.
* test/lisp/emacs-lisp/bytecomp-tests.el
(byte-opt-testsuite-arith-data): Test 'substring'.

4 years agoFinish implementation of {set-}file-modes FLAG arg in Tramp
Michael Albinus [Tue, 25 Feb 2020 12:25:57 +0000 (13:25 +0100)]
Finish implementation of {set-}file-modes FLAG arg in Tramp

* lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy): Do not use
'nofollow for temporary files.  Use `tramp-compat-set-file-modes'.
(tramp-adb-handle-write-region): Do not use 'nofollow for
temporary files.
(tramp-adb-handle-set-file-modes): Implement FLAG.

* lisp/net/tramp-compat.el (tramp-compat-file-modes)
(tramp-compat-set-file-modes): New defaliases.

* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-modes):
Make explicit check (eq flag 'nofollow).

* lisp/net/tramp-sh.el (tramp-sh-handle-set-file-modes): Implement FLAG.
(tramp-do-copy-or-rename-file-directly)
(tramp-sh-handle-file-local-copy, tramp-sh-handle-write-region):
Do not use 'nofollow for temporary files.
(tramp-get-remote-chmod-h): New defun.

* lisp/net/tramp-smb.el (tramp-smb-handle-set-file-modes):
Implement FLAG.

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-modes):
Implement FLAG.
(tramp-sudoedit-handle-write-region): Use `tramp-compat-set-file-modes'.

* lisp/net/tramp.el (tramp-default-file-modes): Optional argument FLAG.
(tramp-handle-file-modes): Use `file-truename' instead of
`file-chase-links'.  The latter function does not work for remote
file names.
(tramp-handle-write-region): Call `tramp-default-file-modes' with
'nofollow if needed.  Do not use 'nofollow for temporary files.

* test/lisp/net/tramp-tests.el
(tramp--test-ignore-make-symbolic-link-error): Check also for
"Cannot chmod .* with nofollow flag" error.
(tramp-test20-file-modes): Extend test.
(tramp--test-emacs28-p): New defun.

4 years agoFix mistake in regexp cleanup
Mattias Engdegård [Tue, 25 Feb 2020 10:57:21 +0000 (11:57 +0100)]
Fix mistake in regexp cleanup

This error was introduced in 770f76f050.

* lisp/org/org.el (org-ts-regexp-inactive): Match up to the first ']'.

4 years ago; * etc/NEWS: Improve wording of a recently-added entry.
Eli Zaretskii [Tue, 25 Feb 2020 05:42:49 +0000 (07:42 +0200)]
; * etc/NEWS: Improve wording of a recently-added entry.

4 years agoUpdate from Gnulib
Paul Eggert [Tue, 25 Feb 2020 01:55:00 +0000 (17:55 -0800)]
Update from Gnulib

This incorporates:
2020-02-24 getloadavg: don't use /usr/local when cross-compiling on AIX
2020-02-24 fcntl: add witness of gnulib override
* lib/fcntl.in.h, m4/getloadavg.m4: Copy from Gnulib.

4 years ago* lisp/textmodes/nroff-mode.el (nroff-mode-map): Remove key 'M-s' (bug#39706)
Juri Linkov [Tue, 25 Feb 2020 00:38:33 +0000 (02:38 +0200)]
* lisp/textmodes/nroff-mode.el (nroff-mode-map): Remove key 'M-s' (bug#39706)

4 years ago* lisp/comint.el (comint-redirect-setup): Guard mode-line-process (bug#39705)
Juri Linkov [Tue, 25 Feb 2020 00:22:29 +0000 (02:22 +0200)]
* lisp/comint.el (comint-redirect-setup): Guard mode-line-process (bug#39705)

4 years agoAdapt the MS-Windows build to 'nofollow' changes
Eli Zaretskii [Mon, 24 Feb 2020 16:16:51 +0000 (18:16 +0200)]
Adapt the MS-Windows build to 'nofollow' changes

* nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_fchmodat)
(OMIT_GNULIB_MODULE_lchmod): Set to true to omit building these
modules on MS-Windows.
* nt/mingw-cfg.site (ac_cv_func_fchmodat)
(gl_cv_func_fchmodat_works, ac_cv_func_lchmod): Disable tests on
MS-Windows.

* src/w32.c (chmod_worker, lchmod, fchmodat): New functions.
(sys_chmod): Move most of the code to chmod_worker.
* src/w32.h (fchmodat, lchmod): Add prototypes.

4 years agoAdd 'nofollow' flag to set-file-modes etc.
Paul Eggert [Mon, 24 Feb 2020 00:19:42 +0000 (16:19 -0800)]
Add 'nofollow' flag to set-file-modes etc.

This avoids some race conditions (Bug#39683).  E.g., if some other
program changes a file to a symlink between the time Emacs creates
the file and the time it changes the file’s permissions, using the
new flag prevents Emacs from inadvertently changing the
permissions of a victim in some completely unrelated directory.
* admin/merge-gnulib (GNULIB_MODULES): Add fchmodat.
* doc/lispref/files.texi (Testing Accessibility, Changing Files):
* doc/lispref/os.texi (File Notifications):
* etc/NEWS:
Adjust documentation accordingly.
* lib/chmodat.c, lib/fchmodat.c, lib/lchmod.c, m4/fchmodat.m4:
* m4/lchmod.m4: New files, copied from Gnulib.
* lib/gnulib.mk.in: Regenerate.
* lisp/dired-aux.el (dired-do-chmod):
* lisp/doc-view.el (doc-view-make-safe-dir):
* lisp/emacs-lisp/autoload.el (autoload--save-buffer):
* lisp/emacs-lisp/bytecomp.el (byte-compile-file):
* lisp/eshell/em-pred.el (eshell-pred-file-mode):
* lisp/files.el (backup-buffer-copy, copy-directory):
* lisp/gnus/mail-source.el (mail-source-movemail):
* lisp/gnus/mm-decode.el (mm-display-external):
* lisp/gnus/nnmail.el (nnmail-write-region):
* lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy)
(tramp-adb-handle-write-region):
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-directly):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-write-region):
* lisp/net/tramp.el (tramp-handle-write-region)
(tramp-make-tramp-temp-file):
* lisp/server.el (server-ensure-safe-dir):
* lisp/url/url-util.el (url-make-private-file):
When getting or setting file modes, avoid following symbolic links
when the file is not supposed to be a symbolic link.
* lisp/doc-view.el (doc-view-make-safe-dir):
Omit no-longer-needed separate symlink test.
* lisp/gnus/gnus-util.el (gnus-set-file-modes):
* lisp/net/tramp.el (tramp-handle-file-modes):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-modes):
* src/fileio.c (symlink_nofollow_flag): New function.
(Ffile_modes, Fset_file_modes):
Support an optional FLAG arg.  All C callers changed.
* lisp/net/ange-ftp.el (ange-ftp-set-file-modes):
* lisp/net/tramp-adb.el (tramp-adb-handle-set-file-modes):
* lisp/net/tramp-sh.el (tramp-sh-handle-set-file-modes):
* lisp/net/tramp-smb.el (tramp-smb-handle-set-file-modes):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-modes):
Accept an optional FLAG arg that is currently ignored,
and add a FIXME comment for it.
* m4/gnulib-comp.m4: Regenerate.

4 years agoUpdate from Gnulib
Paul Eggert [Mon, 24 Feb 2020 00:14:24 +0000 (16:14 -0800)]
Update from Gnulib

This incorporates:
2020-02-23 use 'restrict'
* lib/careadlinkat.h, lib/md5.h, lib/sha1.h, lib/sha256.h:
* lib/sha512.h, lib/strftime.h, lib/string.in.h, m4/nstrftime.m4:
Copy from Gnulib.
* m4/gnulib-comp.m4: Regenerate.

4 years agoAdd `verilog-auto-inst-template-required'.
Wilson Snyder [Sun, 23 Feb 2020 22:18:08 +0000 (17:18 -0500)]
Add `verilog-auto-inst-template-required'.

* lisp/progmodes/verilog-mode.el (verilog-auto-inst-template-required)
(verilog-auto-inst): Add `verilog-auto-inst-template-required' to only
insert AUTOINST ports inside an AUTO_TEMPLATE, msg3170. Reported by Ted
Huang, Brian Magnuson.

4 years ago* Add two hooks for async native compilation
Andrea Corallo [Sun, 23 Feb 2020 14:49:46 +0000 (14:49 +0000)]
* Add two hooks for async native compilation

4 years agoMake build process robust against interruptions
Andrea Corallo [Sun, 23 Feb 2020 14:06:59 +0000 (14:06 +0000)]
Make build process robust against interruptions

During boo-strap we produce both the .eln and the .elc together.
Because the make target is the later this has to be produced as last
to be resilient to build interruptions.

4 years agoMerge from origin/emacs-27
Glenn Morris [Sun, 23 Feb 2020 15:50:33 +0000 (07:50 -0800)]
Merge from origin/emacs-27

ba7004b2a7 (origin/emacs-27) Shorten some ppss struct field names
693749c60f Java Mode: Fix fontification of variable decl inside `for'
884b68ca2c CC Mode: Fontify foo in "const auto foo :" correctly

# Conflicts:
# etc/NEWS

4 years ago; Merge from origin/emacs-27
Glenn Morris [Sun, 23 Feb 2020 15:50:29 +0000 (07:50 -0800)]
; Merge from origin/emacs-27

The following commit was skipped:

aff8bca77c * lisp/replace.el (occur-engine-line): Revert part of fb16...

4 years agoMerge from origin/emacs-27
Glenn Morris [Sun, 23 Feb 2020 15:50:28 +0000 (07:50 -0800)]
Merge from origin/emacs-27

dd5756436c Move more logic to vc-ignore from vc-default-ignore
2aed279be1 Warn about the likes of "[:alnum:]" in regexps
0273f261a7 Don't write absolute filenames and duplicate strings to CV...
d7c22338d2 Fix cursor-sensor--detect when current buf != selected win...
2e39fc83bb * doc/emacs/sending.texi (Mail Sending): Fix index entries.
b410f902d5 Document 'message-send-mail-function' in the Emacs manual
ac0546612d Fix reference to 'message-send-and-exit' in Emacs manual
cd6a9b8f65 Skip shell prompt on current line in Eshell even if it's p...

4 years agoShorten some ppss struct field names
Noam Postavsky [Sun, 23 Feb 2020 13:26:35 +0000 (08:26 -0500)]
Shorten some ppss struct field names

* lisp/emacs-lisp/syntax.el (ppss): Capitalize docstrings.
(ppss-comment-depth): Renamed from ppss-comment-nesting.
(ppss-quoted-p): Renamed from ppss-after-quote-p.
(ppss-min-depth): Renamed from ppss-minimum-paren-depth.
(ppss-open-parens): Renamed from ppss-open-paren-positions.
* etc/NEWS: Announce the ppss-* accessors.

4 years agoMerge remote-tracking branch 'savannah/master' into HEAD
Andrea Corallo [Sun, 23 Feb 2020 13:42:45 +0000 (13:42 +0000)]
Merge remote-tracking branch 'savannah/master' into HEAD

4 years agoJava Mode: Fix fontification of variable decl inside `for'
Alan Mackenzie [Sun, 23 Feb 2020 12:41:20 +0000 (12:41 +0000)]
Java Mode: Fix fontification of variable decl inside `for'

* lisp/progmodes/cc-engine.el (c-forward-declarator): In place of a test for
C++ Mode, test for either C++ Mode or Java Mode.

4 years agoCC Mode: Fontify foo in "const auto foo :" correctly
Alan Mackenzie [Sun, 23 Feb 2020 11:00:28 +0000 (11:00 +0000)]
CC Mode: Fontify foo in "const auto foo :" correctly

* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): While attempting to
find a declaration's identifier, recast the latest found id. as that
identifier when there is no other type identifier and the result of the most
recent c-forward-type call is 'maybe or 'found.  In the latter case, remove
the id. from the found types list, too.

4 years agoUpdate from Gnulib
Paul Eggert [Sun, 23 Feb 2020 09:24:21 +0000 (01:24 -0800)]
Update from Gnulib

This incorporates:
2020-02-22 fchmodat, lchmod: simplify
2020-02-22 lchmod: fix link error on Solaris 10
2020-02-22 use 'restrict' in all POSIX function declarations
2020-02-22 chmodat, chownat: new modules
* lib/gnulib.mk.in: Regenerate.
* lib/inttypes.in.h, lib/openat.h, lib/signal.in.h:
* lib/stdio.in.h, lib/stdlib.in.h, lib/string.in.h:
* lib/sys_stat.in.h, lib/time.in.h, lib/unistd.in.h, m4/inttypes.m4:
* m4/signal_h.m4, m4/stdio_h.m4, m4/stdlib_h.m4, m4/string_h.m4:
* m4/sys_socket_h.m4, m4/sys_stat_h.m4, m4/time_h.m4:
* m4/unistd_h.m4: Copy from Gnulib.

4 years ago* lisp/font-lock.el (font-lock-ensure): Use font-lock-specified-p (bug#39597)
Juri Linkov [Sun, 23 Feb 2020 00:36:54 +0000 (02:36 +0200)]
* lisp/font-lock.el (font-lock-ensure): Use font-lock-specified-p (bug#39597)

4 years ago* lisp/replace.el (occur-engine-line): Revert part of fb16313025 (bug#39597)
Juri Linkov [Sun, 23 Feb 2020 00:34:45 +0000 (02:34 +0200)]
* lisp/replace.el (occur-engine-line): Revert part of fb16313025 (bug#39597)

; Do not merge to master.

4 years agoMove more logic to vc-ignore from vc-default-ignore
Dmitry Gutov [Sat, 22 Feb 2020 23:51:38 +0000 (01:51 +0200)]
Move more logic to vc-ignore from vc-default-ignore

* lisp/vc/vc-dir.el (vc-dir-ignore):
Pass relative file names to vc-ignore.

* lisp/vc/vc.el (vc-ignore): Move the responsibility of
constructing the ignore pattern (right now, most often a relative
file name) using a file name received from the user, here.
(vc-default-ignore): ...from here (bug#37189, see discussion).
Also clarify the docstring.

4 years agoUpdate from Gnulib
Paul Eggert [Sat, 22 Feb 2020 18:33:14 +0000 (10:33 -0800)]
Update from Gnulib

This incorporates:
2020-02-21 largefile: remove _DARWIN_USE_64_BIT_INODE
2020-02-21 Add ‘extern "C"’ to count-one-bits.h etc.
* lib/count-leading-zeros.h, lib/count-one-bits.h:
* lib/count-trailing-zeros.h, m4/largefile.m4: Copy from Gnulib.

4 years agoRestore runtime check for invalid tag
Paul Eggert [Sat, 22 Feb 2020 16:04:16 +0000 (08:04 -0800)]
Restore runtime check for invalid tag

* src/data.c (wrong_type_argument): Restore check that the
object’s tag is valid, since invalid tags exist again.
* src/lisp.h (Lisp_Type_Unused0): New constant.

4 years agoFix `comp-tests-free-fun'
Andrea Corallo [Sat, 22 Feb 2020 10:31:00 +0000 (10:31 +0000)]
Fix `comp-tests-free-fun'

Address the case were comp-tests.el is byte-compiled.

4 years agoWarn about the likes of "[:alnum:]" in regexps
Eli Zaretskii [Sat, 22 Feb 2020 09:07:42 +0000 (11:07 +0200)]
Warn about the likes of "[:alnum:]" in regexps

* doc/lispref/searching.texi (Char Classes): Warn about erroneous
usage of named character classes.  Suggested by Stephen Leake
<stephen_leake@stephe-leake.org>.

4 years agoDon't write absolute filenames and duplicate strings to CVS ignore files
Wolfgang Scherer [Fri, 21 Feb 2020 20:28:11 +0000 (21:28 +0100)]
Don't write absolute filenames and duplicate strings to CVS ignore files

* lisp/vc/vc-cvs.el (vc-cvs-ignore): Expand filename correctly
and pass on only the basename as the pattern.
(vc-cvs-append-to-ignore) Do not write duplicate strings to
.cvsignore.  New optional parameter SORT to more explicitly
control sorting of the ignore entries.  (Bug#37215)
* lisp/vc/pcvs.el (cvs-mode-ignore): Call 'vc-cvs-append-to-ignore'
with SORT argument.

4 years ago; * test/lisp/emacs-lisp/regexp-opt-tests.el: Fix last change
Mattias Engdegård [Fri, 21 Feb 2020 19:34:40 +0000 (20:34 +0100)]
; * test/lisp/emacs-lisp/regexp-opt-tests.el: Fix last change

4 years agoTest 'comp-eq' should not assume any string hashing policy
Andrea Corallo [Fri, 21 Feb 2020 18:59:46 +0000 (18:59 +0000)]
Test 'comp-eq' should not assume any string hashing policy

4 years agoEmit 'top_level_run' objects as impure
AndreaCorallo [Fri, 21 Feb 2020 14:28:05 +0000 (14:28 +0000)]
Emit 'top_level_run' objects as impure

4 years ago* src/keyboard.c: Copy last tool-bar change to tab-bar.
Stefan Monnier [Fri, 21 Feb 2020 15:50:08 +0000 (10:50 -0500)]
* src/keyboard.c: Copy last tool-bar change to tab-bar.

(make_lispy_event) <TAB_BAR_EVENT>: Make event with proper location info.

* src/xdisp.c (handle_tab_bar_click, tty_handle_tab_bar_click): Don't
emit dummy "prefix" event.

4 years agoVerify '--with-nativecomp' has also '--with-dumping=pdumper'
Andrea Corallo [Fri, 21 Feb 2020 09:24:32 +0000 (10:24 +0100)]
Verify '--with-nativecomp' has also '--with-dumping=pdumper'

4 years agoReorder m-var slots
AndreaCorallo [Thu, 20 Feb 2020 09:14:57 +0000 (09:14 +0000)]
Reorder m-var slots

4 years agoMerge remote-tracking branch 'savannah/master' into HEAD
Andrea Corallo [Fri, 21 Feb 2020 15:25:01 +0000 (15:25 +0000)]
Merge remote-tracking branch 'savannah/master' into HEAD

4 years ago* src/keyboard.c (make_lispy_event): Generate proper tool-bar events.
Stefan Monnier [Fri, 21 Feb 2020 15:13:21 +0000 (10:13 -0500)]
* src/keyboard.c (make_lispy_event): Generate proper tool-bar events.

Generate events which carry the location info.

* src/xdisp.c (handle_tool_bar_click): Don't emit dummy "prefix" events.

4 years ago; * lisp/tempo.el (tempo-add-tag): Punctuation fixes in comments.
Eli Zaretskii [Fri, 21 Feb 2020 09:18:04 +0000 (11:18 +0200)]
; * lisp/tempo.el (tempo-add-tag): Punctuation fixes in comments.

4 years agoAllow tempo-define-template to reassign tags to new templates
Federico Tedin [Mon, 17 Feb 2020 21:24:40 +0000 (22:24 +0100)]
Allow tempo-define-template to reassign tags to new templates

* lisp/tempo.el (tempo-define-template): Update documentation string
to mention that existing tags can be reassigned new templates.
(tempo-add-tag): Allow reassigning tags to new templates.
Additionally, invalidate tag collections in all buffers if the global
tags list is being modified.
(tempo-invalidate-collection): Allow invalidating tag collections in
all buffers at the same time.
* test/lisp/tempo-tests.el (tempo-define-tag-globally-test): Add a
test to check that new templates plus tags can be defined from any
buffer and then immediately used in other buffers.
(tempo-overwrite-tag-test): Add a test to check that tags can be
reassigned templates.
* etc/NEWS: Announce changes in tempo.el.

(Bug#39555)

4 years agoFix cursor-sensor--detect when current buf != selected window's buf
Federico Tedin [Mon, 17 Feb 2020 20:58:43 +0000 (21:58 +0100)]
Fix cursor-sensor--detect when current buf != selected window's buf

* lisp/emacs-lisp/cursor-sensor.el (cursor-sensor--detect): Avoid
trying to read text properties from position taken from another
buffer.  (Bug#38740)

4 years ago* doc/emacs/sending.texi (Mail Sending): Fix index entries.
Eli Zaretskii [Fri, 21 Feb 2020 09:03:08 +0000 (11:03 +0200)]
* doc/emacs/sending.texi (Mail Sending): Fix index entries.

4 years agoDocument 'message-send-mail-function' in the Emacs manual
Allen Li [Mon, 17 Feb 2020 07:55:43 +0000 (23:55 -0800)]
Document 'message-send-mail-function' in the Emacs manual

Most of the manual here addresses Message mode, yet talks about
'send-mail-function' which is used for Mail mode.
Fixing this completely requires more involved work, but for now at
least document the difference here.

* doc/emacs/sending.texi (Mail Sending): Mention
'message-send-mail-function'.  (Bug#39639)

4 years agoFix reference to 'message-send-and-exit' in Emacs manual
Allen Li [Mon, 17 Feb 2020 07:45:05 +0000 (23:45 -0800)]
Fix reference to 'message-send-and-exit' in Emacs manual

Most of the manual here addresses Message mode, and C-c C-c directly
above cites the Message mode command, not the Mail mode command.

* doc/emacs/sending.texi (Mail Sending): Fix reference.  (Bug#39639)

4 years agoSkip shell prompt on current line in Eshell even if it's protected
Steven Allen [Sat, 15 Feb 2020 23:13:59 +0000 (15:13 -0800)]
Skip shell prompt on current line in Eshell even if it's protected

When the eshell prompt is protected (e.g., with rear non-sticky,
inhibited movements, etc.), 'beginning-of-line' won't move to the
actual beginning of the line and therefore won't skip over the
prompt.
* lisp/eshell/em-prompt.el (eshell-previous-prompt): Use
'forward-line' to go to the beginning of the line, even if it's
protected.  (Bug#39627)

4 years agoLess bad permutation generator in regexp-opt test
Mattias Engdegård [Mon, 17 Feb 2020 19:55:09 +0000 (20:55 +0100)]
Less bad permutation generator in regexp-opt test

* test/lisp/emacs-lisp/regexp-opt-tests.el
(regexp-opt-test--permutation, regexp-opt-test--factorial): Remove.
(regexp-opt-test--permutations): Rewrite.

4 years agoMerge from origin/emacs-27
Glenn Morris [Thu, 20 Feb 2020 15:50:30 +0000 (07:50 -0800)]
Merge from origin/emacs-27

9f08524748 (origin/emacs-27) Fix broken regexps
1d10885763 ; spelling and comment fix
614203bc80 ; make change-history-commit
28399e585e * Makefile.in (PREFERRED_BRANCH): Now emacs-27.
62afbc513a Fix bug when visiting euc-jp-encoded directories
a2c4eeeecd Clarify when fixnums are used.
4e5ac4b0c6 Reorder discussion of integer basics
f765aad28b Make OMake support slightly less expensive (bug#39595)
39410cfc5a Speed up 'msft' and 'watcom' compilation error regexps
96a269d045 Speed up 'maven' compilation error message regexp
efc9d4fe3e Amend c-backward-sws better to handle multiline block comm...

4 years agoRemove subsumed repetitions in regexps
Mattias Engdegård [Thu, 20 Feb 2020 14:45:44 +0000 (15:45 +0100)]
Remove subsumed repetitions in regexps

Make regexps smaller and faster by removing terms that are superfluous
by virtue of standing next to another term that matches more.  See
https://lists.gnu.org/archive/html/emacs-devel/2020-01/msg00949.html
for details.

* lisp/bs.el (bs--make-header-match-string):
* lisp/gnus/deuglify.el (gnus-outlook-repair-attribution-block):
* lisp/gnus/message.el (message-subject-trailing-was-ask-regexp)
(message-subject-trailing-was-regexp):
* lisp/informat.el (Info-validate):
* lisp/net/browse-url.el (browse-url-button-regexp):
* lisp/net/rcirc.el (rcirc-url-regexp):
* lisp/org/ob-core.el (org-babel-remove-result):
* lisp/org/ob-fortran.el (org-babel-fortran-ensure-main-wrap):
* lisp/org/org-capture.el (org-capture-set-target-location):
* lisp/org/org-table.el (org-table-expand-lhs-ranges):
* lisp/org/org.el (org-maybe-keyword-time-regexp, org-ts-regexp)
(org-ts-regexp-inactive, org-ts-regexp-both):
* lisp/play/gametree.el (gametree-hack-file-layout):
* lisp/progmodes/cc-mode.el (c-Java-defun-prompt-regexp):
* lisp/progmodes/idlw-shell.el (idlwave-shell-halting-error):
* lisp/progmodes/ruby-mode.el (ruby-mode-set-encoding):
* lisp/progmodes/verilog-mode.el (verilog-error-font-lock-keywords)
(verilog-verilint-off, verilog-case-indent-level)
(verilog-within-translate-off, verilog-start-translate-off)
(verilog-back-to-start-translate-off, verilog-end-translate-off)
(verilog-expand-dirnames):
* lisp/term.el (term-control-seq-regexp):
* lisp/textmodes/reftex-vars.el (featurep):
* lisp/url/url-gw.el (url-open-telnet):
* lisp/vc/ediff-ptch.el (ediff-context-diff-label-regexp):
* lisp/vc/pcvs-parse.el (cvs-parse-status):
* test/src/regex-emacs-tests.el (regex-tests-PCRE):
Remove subsumed repetitions.
* lisp/progmodes/sh-script.el (sh-syntax-propertize-function):
Simplify repetition of a repetition.

4 years agoAdd and remove backslashes in regexps
Mattias Engdegård [Mon, 17 Feb 2020 17:26:47 +0000 (18:26 +0100)]
Add and remove backslashes in regexps

These irregularities were found by relint; see
https://lists.gnu.org/archive/html/emacs-devel/2020-01/msg00949.html .

* doc/lispref/modes.texi (Example Major Modes):
* etc/srecode/el.srt:
* lisp/cedet/data-debug.el (data-debug-mode):
* lisp/cedet/semantic/grammar.el (semantic-grammar-mode):
* lisp/cedet/srecode/srt-mode.el (srecode-template-mode):
* lisp/comint.el (comint--unquote&requote-argument):
* lisp/emacs-lisp/lisp-mode.el (lisp-mode):
* lisp/gnus/mm-uu.el (mm-uu-type-alist):
* lisp/progmodes/cc-awk.el (c-awk-harmless-pattern-characters*):
* lisp/progmodes/cfengine.el (cfengine-common-settings):
* lisp/progmodes/cperl-mode.el (cperl-after-sub-regexp, cperl-init-faces):
* lisp/shell.el (shell-chdrive-regexp, shell--unquote&requote-argument):
* lisp/textmodes/tex-mode.el (tex-common-initialization):
Remove duplicated backslashes in character alternatives.

* lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2):
* lisp/progmodes/opascal.el (opascal--syntax-propertize):
* lisp/progmodes/pascal.el (pascal--syntax-propertize):
Remove backslashes escaping non-special characters.

* lisp/progmodes/fortran.el (fortran-font-lock-keywords-3): Escape '*'.
* lisp/progmodes/perl-mode.el (perl-syntax-propertize-function):
Escape '^'.

4 years agoRemove Emacs 20 bug workaround in ebnf2ps (bug#39663)
Mattias Engdegård [Wed, 19 Feb 2020 21:08:22 +0000 (22:08 +0100)]
Remove Emacs 20 bug workaround in ebnf2ps (bug#39663)

* lisp/progmodes/ebnf2ps.el (ebnf-range-regexp): Remove.  All calls
replaced with a string equivalent to the returned value.

4 years agoshr comment typo fix
Lars Ingebrigtsen [Thu, 20 Feb 2020 14:15:07 +0000 (15:15 +0100)]
shr comment typo fix

* lisp/net/shr.el (shr-parse-base): Comment typo fix.

4 years agoFix problem with degenerate <html base="."> specs in shr
Lars Ingebrigtsen [Thu, 20 Feb 2020 14:14:39 +0000 (15:14 +0100)]
Fix problem with degenerate <html base="."> specs in shr

* lisp/url/url-expand.el (url-expand-file-name): Don't bug out on
degenerate base/expander pairs (bug#39235).

4 years agoFix <button>...</button> submit button rendering in eww
Lars Ingebrigtsen [Thu, 20 Feb 2020 13:44:16 +0000 (14:44 +0100)]
Fix <button>...</button> submit button rendering in eww

* lisp/net/eww.el (eww-form-submit): Use the contents of the
<button>...</button> for the string if there is no value
(bug#39326).

4 years agoIntroduce face for <code> elements in shr
Kévin Le Gouguec [Thu, 20 Feb 2020 13:30:45 +0000 (14:30 +0100)]
Introduce face for <code> elements in shr

* lisp/net/shr.el (shr-tag-code): Don't use the `default' font,
because it has properties that will override surrounding elements
(like <a...>) (bug#39504).

4 years agoFix broken regexps
Mattias Engdegård [Thu, 20 Feb 2020 10:25:25 +0000 (11:25 +0100)]
Fix broken regexps

Incorrect escaping prevented these from working as intended.
Found by relint.

* lisp/progmodes/cc-defs.el (c-search-backward-char-property):
Add missing backslash.
* lisp/progmodes/simula.el (simula-mode):
Remove one backslash too many.

4 years ago; spelling and comment fix
Paul Eggert [Thu, 20 Feb 2020 01:54:00 +0000 (17:54 -0800)]
; spelling and comment fix

4 years ago; make change-history-commit
Paul Eggert [Thu, 20 Feb 2020 01:50:44 +0000 (17:50 -0800)]
; make change-history-commit

4 years ago* Makefile.in (PREFERRED_BRANCH): Now emacs-27.
Paul Eggert [Thu, 20 Feb 2020 01:35:57 +0000 (17:35 -0800)]
* Makefile.in (PREFERRED_BRANCH): Now emacs-27.

4 years agoFix bug when visiting euc-jp-encoded directories
Paul Eggert [Thu, 20 Feb 2020 01:21:16 +0000 (17:21 -0800)]
Fix bug when visiting euc-jp-encoded directories

Problem reported by Ken Sasaki (Bug#39672).
* src/fileio.c (Ffile_directory_p):
Encode filename before giving it to file_directory_p.
This fixes a typo introduced in
2019-09-18T02:18:14Z!eggert@cs.ucla.edu.

4 years agoFix some file-modes races
Paul Eggert [Wed, 19 Feb 2020 21:47:57 +0000 (13:47 -0800)]
Fix some file-modes races

* lisp/gnus/gnus-start.el (gnus-save-newsrc-file)
(gnus-slave-save-newsrc):
* lisp/gnus/gnus-uu.el (gnus-uu-initialize):
* lisp/gnus/mm-archive.el (mm-dissect-archive):
* lisp/gnus/mm-decode.el (mm-temp-files-delete)
(mm-display-external):
* lisp/image-dired.el (image-dired-create-thumb-1):
Use with-file-modes rather than setting the file modes later.
This fixes some race conditions where the file temporarily
has the wrong permissions.

4 years agoFix search for ~/.Xdefaults-HOSTNAME (again)
Johan Bockgård [Wed, 19 Feb 2020 19:41:18 +0000 (20:41 +0100)]
Fix search for ~/.Xdefaults-HOSTNAME (again)

* src/xrdb.c (get_environ_db): Fix typo when handling
~/.Xdefaults-HOSTNAME.

4 years agoFix conversion of text/html->multipart/related
Jeremy Compostella [Wed, 19 Feb 2020 13:51:43 +0000 (14:51 +0100)]
Fix conversion of text/html->multipart/related

* lisp/gnus/mml.el (mml-expand-all-html-into-multipart-related):
New function (bug#39230).
(mml-generate-mime): Use it to expand all HTML parts, no matter
where in the MIME tree.

4 years agoFix working text related issues on NS (Bug#38851)
Masahiro Nakamura [Thu, 13 Feb 2020 18:21:15 +0000 (03:21 +0900)]
Fix working text related issues on NS (Bug#38851)

* src/keyboard.c (read_char): Prevent redsiplay right after
ns-unput-working-text event.
* src/nsterm.m ([EmacsView insertText:]): Partially revert commit
ba04217.
([EmacsView firstRectForCharacterRange:]): Fix candidate window
position when cursor is on echoarea.
([EmacsView mouseDown:])
([EmacsView windowDidResignKey:]): Don't delete working text.

4 years agoFix horizontal bit shifting
Alan Third [Fri, 14 Feb 2020 20:08:40 +0000 (20:08 +0000)]
Fix horizontal bit shifting

* src/nsterm.m ([EmacsView copyRect:to:]): Calculate the horizontal
difference instead of just the vertical.
([EmacsView updateLayer]): Fix NSTRACE message.

4 years ago* doc/misc/texinfo.tex: Update from Gnulib.
Paul Eggert [Wed, 19 Feb 2020 01:50:52 +0000 (17:50 -0800)]
* doc/misc/texinfo.tex: Update from Gnulib.

4 years agoSupport state changing VC operations in dired-mode on files (bug#34949)
Juri Linkov [Tue, 18 Feb 2020 23:35:03 +0000 (01:35 +0200)]
Support state changing VC operations in dired-mode on files (bug#34949)

* lisp/vc/vc.el (vc-deduce-fileset): Don't error out when observer is nil.
(vc-dired-deduce-fileset): Add optional args 'state-model-only-files'
and 'observer'.  Check that all files are in a consistent state
when state-model-only-files is non-nil.  Error out on directories.

* lisp/vc/vc-dispatcher.el (vc-dispatcher-browsing): Check dired-mode
for derived-mode-p.

4 years ago* lisp/wdired.el (wdired-next-line, wdired-previous-line): Preserve column
Stefan Monnier [Tue, 18 Feb 2020 17:47:32 +0000 (12:47 -0500)]
* lisp/wdired.el (wdired-next-line, wdired-previous-line): Preserve column