1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-16 09:50:25 +00:00
Commit Graph

8811 Commits

Author SHA1 Message Date
Mattias Engdegård
e9f9827eb0 Avoid polling in global-auto-revert-mode (bug#35418)
Make `auto-revert-avoid-polling' have effect in global-auto-revert-mode.
Buffers actually handled by that mode are marked with a non-nil value
of `auto-revert--global-mode'.  When global-auto-revert-mode is
entered, eligible buffers are marked in that way, and hooks are set up
to mark new buffers and take care of buffers whose file names change.
This way the existing poll-avoidance logic can be used, since the
entire set of buffers in auto-revert is known.

A new hook, `after-set-visited-file-name-hook', was added to handle
the case when the file name of a tracked buffer changes.

* lisp/autorevert.el (auto-revert-avoid-polling): Amend doc string.
(auto-revert--global-mode): New buffer-local variable.
(global-auto-revert-mode): Mark existing buffers and set up hooks when
mode is entered; do the opposite when exited.
(auto-revert--global-add-current-buffer)
(auto-revert--global-adopt-current-buffer)
(auto-revert--set-visited-file-name-advice): New functions.
(auto-revert--polled-buffers, auto-revert--need-polling-p)
(auto-revert-notify-handler)
(auto-revert-active-p): Modify logic to cover global-auto-revert-mode.
* lisp/files.el (after-set-visited-file-name-hook): New hook.
(set-visited-file-name-hook): Call new hook.
* test/lisp/autorevert-tests.el (top):  Use lexical-binding.
(auto-revert-test--write-file, auto-revert-test--buffer-string)
(auto-revert-test--wait-for, auto-revert-test--wait-for-buffer-text)
(auto-revert-test05-global-notify): New test.
* doc/lispref/hooks.texi (Standard Hooks):
Mention new hook (in a comment, since it's unclear whether it should
actually be documented here)
* etc/NEWS (Changes in Specialized Modes and Packages): Update entry.
2019-05-20 11:26:51 +02:00
Paul Eggert
bef1be8730 Fixes for "Maintainer:" and related lines
Mostly, this just removes "Maintainer: emacs-devel@gnu.org" lines,
which are not that useful.  It also cleans up and regularizes a
few similar lines.
2019-05-19 21:34:27 -07:00
Martin Rudalics
8783becbba New buffer display action function 'display-buffer-in-direction'
* lisp/window.el (windows-sharing-edge)
(window--try-to-split-window-in-direction)
(display-buffer-in-direction): New functions.
* doc/lispref/windows.texi (Buffer Display Action Functions):
Describe new action function 'display-buffer-in-direction'.
(Buffer Display Action Alists): Describe new entry 'direction'.
Amend description of 'window' entry.
* etc/NEWS: Mention 'display-buffer-in-direction' and 'direction'
and 'window' action alist entries.
2019-05-19 11:03:05 +02:00
Mattias Engdegård
1943220d1b Don't use file notification on non-file buffers
Allow non-file buffers to declare that notification on their
default-directory is sufficient to know when auto-revert updates are
required by setting the new variable `buffer-auto-revert-by-notification'
to non-nil.  If nil, the default, then auto-revert will poll
those buffers instead. (bug#35418).
Currently, only Dired sets that variable.

* lisp/autorevert.el (auto-revert-buffers):
Modify condition for using notification.
* lisp/files.el (buffer-auto-revert-by-notification): New variable.
* lisp/dired.el (dired-mode): Set buffer-auto-revert-by-notification.
* doc/emacs/arevert-xtra.texi (Non-File Buffers): Document new variable.
* etc/NEWS (Changes in Specialized Modes and Packages): Describe new variable.
2019-05-18 14:16:21 +02:00
Paul Eggert
4ac234ad57 Distribute test cases in tarballs by default
* INSTALL, INSTALL.REPO, admin/make-tarball.txt:
Mention ‘make check’.
* configure.ac: Update comment.
* etc/NEWS: Say that tarballs have a test directory.
* make-dist (with_tests): Default to "yes".
Add an option --no-tests to make it "no".
2019-05-16 10:51:27 -07:00
Noam Postavsky
04e9938350 Accept NO-PROPERTIES in thing-at-point aliases (Bug#35491)
* lisp/thingatpt.el (word-at-point, sentence-at-point): Accept and
pass NO-PROPERTIES to thing-at-point.
* etc/NEWS: Announce change.
2019-05-16 06:53:05 -04:00
Mattias Engdegård
26f735ff19 Add standard unmatchable regexp
Add `regexp-unmatchable' as a standard unmatchable regexp, defined as
"\\`a\\`".  Use it where such a regexp is needed, replacing slower
expressions in several places.
From a suggestion by Philippe Schnoebelen.

* lisp/subr.el (regexp-unmatchable): New defconst.
* etc/NEWS (Lisp Changes): Mention `regexp-unmatchable'.
* doc/lispref/searching.texi (Regexp Functions): Document it.
* lisp/emacs-lisp/regexp-opt.el (regexp-opt)
* lisp/progmodes/cc-defs.el (cc-conditional-require-after-load)
(c-make-keywords-re)
* lisp/progmodes/cc-engine.el (c-beginning-of-statement-1)
(c-forward-<>-arglist-recur, c-forward-decl-or-cast-1)
(c-looking-at-decl-block)
* lisp/progmodes/cc-fonts.el (c-doc-line-join-re)
(c-doc-bright-comment-start-re)
* lisp/progmodes/cc-langs.el (c-populate-syntax-table)
(c-assignment-op-regexp)
(c-block-comment-ender-regexp, c-font-lock-comment-end-skip)
(c-block-comment-start-regexp, c-line-comment-start-regexp)
(c-doc-comment-start-regexp, c-decl-start-colon-kwd-re)
(c-type-decl-prefix-key, c-type-decl-operator-prefix-key)
(c-pre-id-bracelist-key, c-enum-clause-introduction-re)
(c-nonlabel-token-2-key)
* lisp/progmodes/cc-mode.el (c-doc-fl-decl-start, c-doc-fl-decl-end)
* lisp/progmodes/cc-vars.el (c-noise-macro-with-parens-name-re)
(c-noise-macro-name-re, c-make-noise-macro-regexps)
* lisp/progmodes/octave.el (octave-help-mode)
* lisp/vc/vc-bzr.el (vc-bzr-log-view-mode, vc-bzr-revision-completion-table)
* lisp/vc/vc-git.el (vc-git-log-view-mode)
* lisp/vc/vc-hg.el (vc-hg-log-view-mode)
* lisp/vc/vc-mtn.el (vc-mtn-log-view-mode):
Use `regexp-unmatchable'.
* lisp/textmodes/ispell.el (ispell-non-empty-string):
Use `regexp-unmatchable', fixing a broken never-match regexp.
2019-05-15 18:55:27 +02:00
Juri Linkov
c11c990356 * lisp/progmodes/project.el (project-read-file-name-function): Fix type. 2019-05-14 23:40:31 +03:00
Paul Eggert
d2dea70415 Default to disabling ImageMagick (Bug#33587)
ImageMagick has continuing stability and security problems, suggesting
that 'configure' should disable it by default.  See Glenn Morris's notes
at: https://lists.gnu.org/r/emacs-devel/2018-12/msg00036.html
* INSTALL, etc/NEWS, nt/INSTALL.W64: Mention this.
* configure.ac (imagemagick): Default to off.
2019-05-13 23:07:05 -07:00
Dmitry Gutov
e0ee41d155 Allow customizing the display of project file names when reading
To hopefully resolve a long-running discussion
(https://lists.gnu.org/archive/html/emacs-devel/2019-05/msg00162.html).

* lisp/progmodes/project.el (project-read-file-name-function):
New variable.
(project--read-file-absolute, project--read-file-cpd-relative):
New functions, possible values for the above.
(project-find-file-in): Use the introduced variable.
(project--completing-read-strict): Retain just the logic that fits
the name.
2019-05-14 05:11:18 +03:00
Stefan Monnier
3c1967dbfe * lisp/emacs-lisp/packages.el: Add all to package-check-signature
(package-check-signature): Add `all` option.
(package--check-signature-content): Adjust accordingly.
2019-05-12 13:03:24 -04:00
Glenn Morris
8b789755b4 Merge from origin/emacs-26
1c6484e (origin/emacs-26) Fix incorrect cloning of eieio-instance-inh...
37436fe Fix cloning of eieio-named objects (Bug#22840)
fb65a36 Fix ibuffer-unmark-backward synopsis (bug#35572)
f77bd2b ; * src/lisp.h (DEFSYM): Fix inaccurate comment.
3b86e0b Clarify handling of long options (Bug#24949)
04340a8 Improve documentation of the daemon and emacsclient
3e29de2 * etc/NEWS.24: Belatedly announce delete-consecutive-dups.
2019-05-08 07:51:48 -07:00
Juri Linkov
4cb64ac3f9 * lisp/progmodes/flymake.el: Obsolete variable flymake-start-on-newline
(flymake-start-syntax-check-on-newline): Mark it obsolete.
(flymake-after-change-function): Remove obsolete variable
flymake-start-syntax-check-on-newline (temporarily renamed to
flymake-start-on-newline).  (Bug#34294)

* doc/misc/flymake.texi: Remove obsolete variable.
2019-05-07 23:29:14 +03:00
Basil L. Contovounesios
c972da907d Clarify what constitutes an event (bug#35238)
* doc/lispref/commands.texi (Input Events): Specify that events are
non-nil and remove vestiges of bug#10190.
* doc/lispref/os.texi (Recording Input): Document optional argument
of recent-keys.
* lisp/subr.el (eventp): Check that the car of conses is non-nil.
* etc/NEWS: Announce it as an incompatible change.
* src/keyboard.c (Frecent_keys): Clarify that returned "events" are
not real events.
2019-05-07 18:00:20 +01:00
Michael Albinus
1ac5c6c3cf ; Make /etc/NEWS more consistent 2019-05-06 11:23:54 +02:00
Juri Linkov
be3ab9f301 * lisp/progmodes/flymake.el: Rename flymake-start-on-newline (bug#34294)
* lisp/progmodes/flymake.el (flymake-start-on-newline): Rename from
flymake-start-syntax-check-on-newline.
(flymake-start-syntax-check-on-newline): Define obsolete alias.
(flymake-no-changes-timeout): Add customization option nil.

* doc/misc/flymake.texi (Using Flymake): Rename variable.
2019-05-05 23:05:01 +03:00
Juri Linkov
df9b56ecff Rename shell-command-width to async-shell-command-width (bug#35055)
* lisp/simple.el (async-shell-command-width):
* lisp/net/tramp.el (tramp-handle-shell-command):
* test/lisp/net/tramp-tests.el (tramp-test32-shell-command):
* doc/misc/tramp.texi (Remote processes): Rename this variable.

* doc/emacs/misc.texi (Single Shell): Add async-shell-command-width.
2019-05-05 22:27:33 +03:00
Jimmy Aguilar Mena
a336300ccf ;Corrected display-fill-column-indicator mode.
Small corrections in the documentation and code format to merge into master.
2019-05-05 16:27:37 +02:00
Jimmy Aguilar Mena
18ea7605c0 ;Small changes in the documentation
*src/xdisp.c: Fixed docstring for display-fill-column-indicator-column
*etc/NEWS: Concordance fix in the display-fill-column-indicator part.
*doc/emacs/display.texi: Name mismatch fix.
2019-05-05 16:27:37 +02:00
Jimmy Aguilar Mena
c7ff15c6eb Added fill-column-indicator manual documentation
*etc/NEWS: reduced the comments about fill-column-indicator
*doc/emacs/display.texi: Added documentation for fill-column-indicator
 in this section in the manual
2019-05-05 16:27:37 +02:00
Jimmy Aguilar Mena
ab4619e7c3 Display-fill-column-indicator NEWS info.
*etc/NEWS: Added information about the fill-column-indicator mode.
*lisp/faces.el: Added a face for the display fill column indicator.
2019-05-05 16:27:37 +02:00
Noam Postavsky
3e29de2ce0 * etc/NEWS.24: Belatedly announce delete-consecutive-dups. 2019-05-01 22:17:10 -04:00
Basil L. Contovounesios
5a4f58f7ee ; * etc/NEWS: Fix position of +++ marker 2019-05-01 14:51:37 +01:00
Mattias Engdegård
c61bbb4c8e Don't poll auto-revert files that use notification (bug#35418)
It is a waste to periodically poll files that use change notification
in auto-revert mode; stop doing that.  If no files need polling,
turn off the periodic execution entirely to further avoid wasting power.
Use a timer to inhibit immediate reversion for some time after a
notification, for throttling.

This change does not apply to files in global-auto-revert-mode, where
polling is still necessary.  It is disabled by default, and enabled by
setting `auto-revert-avoid-polling' to non-nil.

* lisp/autorevert.el
(toplevel): Require cl-lib.
(auto-revert-avoid-polling, auto-revert--polled-buffers)
(auto-revert--need-polling-p, auto-revert--lockout-interval)
(auto-revert--lockout-timer, auto-revert--end-lockout): New.
(global-auto-revert-mode): Keep notifiers for buffers in auto-revert mode.
(auto-revert-set-timer): Use auto-revert--need-polling-p.
(auto-revert-notify-handler): Restart polling if notification stopped.
Use new lockout timer.
(auto-revert-buffers):
Use auto-revert--polled-buffers and auto-revert--need-polling-p.
(auto-revert-buffers-counter, auto-revert-buffers-counter-lockedout):
Remove.

* etc/NEWS (Changes in Specialized Modes and Packages):
Describe the new auto-revert-avoid-polling variable.

* doc/emacs/files.texi (Reverting):
Add paragraph describing auto-revert-avoid-polling.
2019-04-30 13:25:52 +02:00
Philipp Stephani
4d97e1a9ea Export major version of latest Emacs supported by emacs-module.h.
This is useful if module authors want to support multiple versions of
emacs-module.h.

* configure.ac (emacs_major_version): Define substitution.

* src/emacs-module.h.in (EMACS_MAJOR_VERSION): Define macro.

* doc/lispref/internals.texi (Module Initialization): Document
EMACS_MAJOR_VERSION preprocessor macro.

* test/data/emacs-module/mod-test.c (emacs_module_init): Verify
behavior of EMACS_MAJOR_VERSION.
2019-04-28 20:08:25 +02:00
YAMAMOTO Mitsuharu
2822066471 Update multicolor font support status
* etc/NEWS: Mention multicolor font support on Cairo and NS.
* src/macfont.m (macfont_list): Re-enable color bitmap fonts.
2019-04-27 14:43:19 +09:00
Stephen Leake
1486eadf7c Fix Bug#33618; define search path variables for grep, byte-compile
* etc/NEWS: Mention new variables.

* lisp/emacs-lisp/bytecomp.el (emacs-lisp-compilation-search-path): New.

* lisp/progmodes/grep.el (grep-search-path): New.
2019-04-25 15:49:38 -07:00
Stefan Monnier
e08e0880f9 Use lexical-binding by default for M-:, --eval, and *scratch*
* lisp/startup.el (command-line): Default to lexical-binding in *scratch*.
(normal-no-mouse-startup-screen, command-line-1):
Use startup--get-buffer-create-scratch.
(command-line-1):
* lisp/simple.el (eval-expression):
* lisp/server.el (server-eval-and-print): Use lexical-binding to
evaluate the expression.
(server-execute): Use startup--get-buffer-create-scratch.
* lisp/ielm.el (inferior-emacs-lisp-mode): Default to lexical-binding.
2019-04-25 14:36:03 -04:00
Philipp Stephani
e290a7d173 Add module functions to convert from and to big integers.
* src/module-env-27.h: Add new module functions to convert big
integers.

* src/emacs-module.h.in (emacs_mpz): Define if GMP is available.

* src/emacs-module.c (module_extract_big_integer)
(module_make_big_integer): New functions.
(initialize_environment): Use them.

* test/data/emacs-module/mod-test.c (Fmod_test_double): New test
function.
(emacs_module_init): Define it.

* test/src/emacs-module-tests.el (mod-test-double): New unit test.

* doc/lispref/internals.texi (Module Values): Document new functions.
2019-04-24 12:53:54 +02:00
Philipp Stephani
bffceab633 Add conversions to and from struct timespec to module interface.
Time values are a fundamental data type, and such conversions are hard
to implement within modules because of the various forms of time
values in Emacs Lisp.  Adding dedicated conversion functions can
significantly simplify module code dealing with times.

This approach uses nanosecond precision.  While Emacs in theory has
support for higher-precision time values, in practice most languages
and standards, such as POSIX, C, Java, and Go, have settled on
nanosecond-precision integers to represent time.

* src/emacs-module.h.in: Add header for struct timespec.

* src/module-env-27.h: Add module functions for time conversion.

* src/emacs-module.c (module_extract_time, module_make_time): New
functions.
(initialize_environment): Use them.

* test/data/emacs-module/mod-test.c (Fmod_test_add_nanosecond): New
test function.
(emacs_module_init): Define it.

* test/src/emacs-module-tests.el (mod-test-add-nanosecond/valid)
(mod-test-add-nanosecond/nil, mod-test-add-nanosecond/invalid): New
unit tests.

* doc/lispref/internals.texi (Module Values): Document time
conversion functions.
2019-04-24 11:33:52 +02:00
Stefan Monnier
26f9a77f24 * etc/package-keyring.gpg: Add the 2019 key 2019-04-23 16:36:59 -04:00
Paul Eggert
27540be5c6 Improve UBSan discussion in etc/DEBUG
* etc/DEBUG: Improve -gdwarf-N documentation.
Go into more detail about UndefinedBehaviorSanitizer.
2019-04-22 17:26:25 -07:00
Eli Zaretskii
4ec0244593 ; * etc/NEWS: Improve wording of a recent addition. 2019-04-22 11:12:45 +03:00
Paul Eggert
b20d8a9322 Mention AddressSanitizer etc. in etc/DEBUG
* etc/DEBUG: Modernize for AddressSanitizer etc.
* etc/NEWS: Defer to etc/DEBUG for this.
2019-04-21 23:16:48 -07:00
Paul Eggert
1ea048f6e0 Remove --enable-checking=xmallocoverrun
It doesn’t work anymore, and these days ‘gcc -fsanitize=address’
does a better job anyway.
* configure.ac: Remove the option.
* configure.ac (ac_xmalloc_overrun, XMALLOC_OVERRUN_CHECK):
* src/alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD)
(XMALLOC_OVERRUN_CHECK_SIZE, XMALLOC_OVERRUN_SIZE_SIZE)
(xmalloc_overrun_check_header, xmalloc_overrun_check_trailer)
(xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
(overrun_check_realloc, overrun_check_free):
Remove.  All uses removed.
* etc/NEWS: Mention this.
2019-04-21 23:16:48 -07:00
Paul Eggert
72067661fe Remove --enablechecking=conslist configure option
* configure.ac: Remove the option.
* configure.ac (ac_gc_check_cons_list, GC_CHECK_CONS_LIST):
* src/alloc.c (check_cons_list) [GC_CHECK_CONS_LIST]:
* src/lisp.h (lisp_h_check_cons_list, check_cons_list):
Remove.  All uses removed.
* etc/NEWS: Mention this.
2019-04-21 23:16:48 -07:00
Glenn Morris
828a6eb64f Merge from origin/emacs-26
cd2204f Add a package: line to c-submit-bug-report.
a992dca ; Remove empty NEWS sections
ea67270 ; Add NEWS sections for 26.3

Conflicts:
	etc/NEWS
2019-04-21 07:51:38 -07:00
Glenn Morris
a992dcabc7 ; Remove empty NEWS sections 2019-04-20 10:06:26 -07:00
Glenn Morris
ea67270752 ; Add NEWS sections for 26.3 2019-04-20 10:04:18 -07:00
Philipp Stephani
5c5e309527 Remove :stop key from make-process.
This has never worked and caused issues such as Bug#30460.

* src/process.c (Fmake_process): Don't accept :stop key any more.
(syms_of_process): Define needed symbol 'null'.

* test/src/process-tests.el (make-process/stop): New unit test.

* doc/lispref/processes.texi (Asynchronous Processes): Remove :stop
key from manual.
2019-04-19 14:03:16 +02:00
Philipp Stephani
f5e3c2cc98 Add a new user option 'ido-big-directories'.
This provides an alternative to 'ido-max-directory-size', for
directories that are statically known to be too big for Ido
completion.

* lisp/ido.el (ido-big-directories): New user option.
(ido-directory-too-big-p): Use it.

* test/lisp/ido-tests.el (ido-directory-too-big-p): New unit test.
2019-04-19 10:31:02 +02:00
Juri Linkov
6fe81676f3 * etc/NEWS: Mention new xref faces (bug#23179) 2019-04-17 00:04:30 +03:00
Alexander Gramiak
fc0f469fb5 Bump minimum GTK versions to 2.24 and 3.10
* configure.ac: Bump required GTK 2 and GTK 3 versions and the
associated GLib versions. Remove obsolete AC_CHECK_FUNCS calls. These
check for functions available in later GTK 2 versions. These checks
and can safely be removed with the exception of
gtk_window_set_has_resize_grip, which according to a comment in
gtkutil.c causes an issue in Ubuntu's GTK 2.

* src/gtkutil.c:
* src/xfns.c:
* src/xterm.c:
* src/xterm.h: Remove now unused conditional blocks. Use HAVE_GTK3
instead of GTK_CHECK_VERSION where now applicable. Remove checks of
now always true USE_GTK_TOOLTIP.
2019-04-14 19:15:45 -06:00
Stephen Leake
5ee5895f9b Merge commit '890440a44cd5f4f09742f521c7783785d114fffc' 2019-04-14 09:24:42 -07:00
Stephen Leake
ca449fb1c1 Rename new user variable next-error-verbosity' to next-error-verbose'
* etc/NEWS: Update entry to match renaming.

* lisp/simple.el (next-error-verbose): Rename.
(next-error, next-error-internal): Match rename.
2019-04-14 09:23:24 -07:00
Eli Zaretskii
29b36a007a Improve documentation of a recent commit
* etc/NEWS: Fix the description of 'shell-command-width'.
Mark the entry as not needing the manual update.

* lisp/simple.el (shell-command-width): Doc fix.  (Bug#35055)
2019-04-14 17:50:12 +03:00
Juri Linkov
3a34f57c7e * lisp/simple.el (shell-command-width): New defcustom.
(shell-command): Use it.  (Bug#35055)
2019-04-14 00:46:38 +03:00
Stefan Monnier
896e580216 * lisp/help-fns.el (help-fns-describe-variable-functions): New hook
(help-fns--compiler-macro, help-fns--parent-mode, help-fns--obsolete)
(help-fns--interactive-only): Indent output by 2 spaces.
(help-fns--side-effects): New function extracted from
describe-function-1.
(help-fns-describe-function-functions): Use it.
(help-fns--first-release, help-fns--mention-first-release): New functions.
(help-fns-function-description-header): Keymaps and macros can't
be interactive.
(help-fns--ensure-empty-line): New function.
(describe-function-1): Use it.
(help-fns--var-safe-local, help-fns--var-risky)
(help-fns--var-ignored-local, help-fns--var-file-local)
(help-fns--var-watchpoints, help-fns--var-obsolete)
(help-fns--var-alias, help-fns--var-bufferlocal): New functions,
extacted from describe-variable.
(describe-variable): Run help-fns-describe-variable-functions instead.
2019-04-12 12:37:00 -04:00
Glenn Morris
a25f4d6ef5 Merge from origin/emacs-26
818a68b * etc/HISTORY: Update for Emacs 26.2 release.
e04aa5a ; ChangeLog.3 update
8297e97 * etc/AUTHORS: Update.
8582936 Improve documentation of 'read-command'
dc81c05 ; * CONTRIBUTE: Mention where to ask for the copyright assign...
b77723a Fix an outdated URL in a comment
2019-04-12 07:51:35 -07:00
Stephen Leake
7ba7def5ca Merge commit 'de238b39e335c6814283faa171b35145f124edf2' 2019-04-11 14:00:02 -07:00