1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-22 10:26:20 +00:00
Commit Graph

128277 Commits

Author SHA1 Message Date
Noam Postavsky
2bfe83fcd3 Make sure eshell pipelines don't drop data
* lisp/eshell/esh-proc.el (eshell-sentinel): If called while still
handling output of the process, make sure to close the pipes only later,
so that the next process in the pipeline recieves EOF only after getting
all its input (Bug#25549).
2017-02-08 23:37:57 -05:00
Katsumi Yamaoka
41de25c113 Make mm-shr use mail-parse-charset by default
* lisp/gnus/mm-decode.el (mm-shr): Use mail-parse-charset by default.
This helps an html message with no charset spec to be decoded.
2017-02-09 00:41:19 +00:00
Stephen Berman
90f76eb358 describe-char: unambiguous name for inserting ASCII 7
* lisp/descr-text.el (describe-char): Make the input
suggestion for inserting ASCII character 7 by name use the
unambiguous name "BELL (BEL)" (bug#25641).
2017-02-08 22:38:39 +01:00
Michael Albinus
e3b6596308 Modify suppressing `vc-refresh-state' in filenotify-tests.el
* test/lisp/filenotify-tests.el (file-notify-test03-autorevert):
Use an advice rather than an alias for suppressing `vc-refresh-state'.
2017-02-08 19:33:52 +01:00
Michael Albinus
c8ee570a8b Suppress undesired error messages in filenotify-tests.el
* test/lisp/filenotify-tests.el (file-notify-test03-autorevert):
Suppress `vc-refresh-state', it produces undesired error messages.
2017-02-07 21:42:12 +01:00
Lars Ingebrigtsen
1af484f87e Ensure that Gnus bugs show up in the Emacs tracker
* lisp/gnus/gnus.el (gnus-bug-package): Include Emacs in the
package spec.
2017-02-07 15:52:42 +01:00
Lars Ingebrigtsen
4b59f53b67 Revert "Don't tag Gnus bugs with "gnus""
This reverts commit b6fa580723.

The debbugs syntax requires a package name
2017-02-07 15:52:41 +01:00
Mark Oteiza
c939075b81 Add xdg library
* etc/NEWS: Mention new library.
* lisp/xdg.el: New file.
2017-02-06 23:28:44 -05:00
Paul Eggert
d7134989be Do not trick info/dir’s timestamp
* Makefile.in (${srcdir}/info/dir): When making this file, do not
do anything special about its timestamp.  Previously this rule
used move-if-change, which meant that this file’s timestamp could
end up being older than the files it depends on, and this caused
‘make --question info’ to fail, which caused ‘make-dist’ to fail
now that ‘make-dist’ invokes ‘make --question info’.
2017-02-06 18:04:50 -08:00
Paul Eggert
03a012a796 Make FOR_EACH_TAIL more like other FOR_EACH macros
See comments by Stefan Monnier in:
http://lists.gnu.org/archive/html/emacs-devel/2017-02/msg00181.html
and by Eli Zaretskii in:
http://lists.gnu.org/archive/html/emacs-devel/2017-02/msg00207.html
* src/fns.c (internal_equal): Do not bypass check for depth
overflow when tail-recursing via a dotted list tail or an overlay
plist, to avoid a rare infloop.
* src/lisp.h (FOR_EACH_TAIL, FOR_EACH_TAIL_SAFE): Take TAIL as an
arg, and update it at each iteration, rather than have callers
access it.tail.  All callers changed.
(FOR_EACH_TAIL): Do not check for dotted lists, as this is now
the caller’s responsibility.  All callers changed.
(FOR_EACH_TAIL_CONS): Remove.  All callers changed.
(struct for_each_tail_internal.tail): Remove; no longer needed.
(FOR_EACH_TAIL_INTERNAL): Remove dotted arg, and set the tail
arg each time through the loop.  All callers changed.
2017-02-06 17:34:41 -08:00
Paul Eggert
d45dbccc5d Port to clang 3.8.0
It does not allow a for-loop's control var to be an anonymous struct.
* src/lisp.h (struct for_each_tail_internal): New type.
(FOR_EACH_TAIL_INTERNAL): Use it.
2017-02-05 14:07:31 -08:00
Paul Eggert
c3ee4d2860 Add cyclic-list tests
* test/manual/cycle-tests.el: New file (Bug#25606).
2017-02-05 13:30:29 -08:00
Paul Eggert
b491322ed0 FOR_EACH_TAIL now checks for quit
As per Eli Zaretskii (Bug#25606#20).  Although these calls to
maybe_quit are unnecessary in practice, Eli was not convinced
that the calls are unnecessary.
* src/lisp.h (FOR_EACH_TAIL, FOR_EACH_TAIL_CONS):
Call maybe_quit every so often.
(FOR_EACH_TAIL_INTERNAL): New arg CHECK_QUIT.  All callers changed.
2017-02-05 13:30:29 -08:00
Paul Eggert
14dd9101ec Signal list cycles in ‘length’ etc.
Use macros like FOR_EACH_TAIL instead of maybe_quit to
catch list cycles automatically instead of relying on the
user becoming impatient and typing C-g (Bug#25606).
* src/fns.c (Flength, Fmember, Fmemq, Fmemql, Fassq, Fassoc, Frassq)
(Frassoc, Fdelete, Freverse):
Use FOR_EACH_TAIL instead of maybe_quit.
(Fnreverse): Use simple EQ to check for circular list instead
of rarely_quit, as this suffices in this unusual case.
(Fplist_put, Flax_plist_put, Flax_plist_put):
Use FOR_EACH_TAIL_CONS instead of maybe_quit.
(internal_equal): Use FOR_EACH_TAIL_CONS to check lists, instead
of by-hand tail recursion that did not catch cycles.
* src/fns.c (Fsafe_length, Fplist_get):
* src/xdisp.c (display_mode_element):
Use FOR_EACH_TAIL_SAFE instead of by-hand Floyd’s algorithm.
* src/lisp.h (QUIT_COUNT_HEURISTIC): Remove; no longer needed.
(rarely_quit): Simply count toward USHRT_MAX + 1, since the
fancier versions are no longer needed.
(FOR_EACH_TAIL_CONS, FOR_EACH_TAIL_SAFE)
(FOR_EACH_TAIL_INTERNAL): New macros, the last with definiens
mostly taken from FOR_EACH_TAIL.
(FOR_EACH_TAIL): Rewrite in terms of FOR_EACH_TAIL_INTERNAL.
2017-02-05 13:30:29 -08:00
Paul Eggert
b7fa6b1f1c Simplify use of FOR_EACH_TAIL
* src/data.c (circular_list): New function.
* src/lisp.h (FOR_EACH_TAIL): Use Brent’s algorithm and C99 for-loop
decl, to eliminate the need for the args TAIL, TORTOISE and N, and
to speed things up a bit on typical hosts with optimization.
All uses changed (Bug#25605).
2017-02-05 13:30:28 -08:00
Simen Heggestøyl
5e222f6737 * lisp/textmodes/css-mode.el: Require subr-x at compile time 2017-02-05 22:23:57 +01:00
Tom Tromey
148100d983 typo fix
(css--colon-inside-selector-p): Fix typo in docstring.
2017-02-04 13:22:39 -07:00
Tom Tromey
394fc3fd03 Set comment-multi-line in js-mode
Bug#6806:
* lisp/progmodes/js.el (js-mode): Set comment-multi-line to t.
* test/lisp/progmodes/js-tests.el (js-mode-auto-fill): New test.
2017-02-04 13:00:59 -07:00
Simen Heggestøyl
caf31fb5f5 * test/manual/indent/scss-mode.scss: Fix indentation 2017-02-04 20:40:13 +01:00
Simen Heggestøyl
f6ff7bb1fc Fix indentation of multiline CSS property values
* lisp/textmodes/css-mode.el (css-smie-grammar): Give colons belonging
to properties higher precedence.
(css--colon-inside-selector-p, css--colon-inside-funcall): New
functions for helping SMIE during tokenization.
(css-smie--forward-token, css-smie--backward-token): Distinguish
colons belonging to properties from other colons.

* test/manual/indent/css-mode.css: Add tests for the changes above.

* test/manual/indent/scss-mode.scss: Ditto.
2017-02-04 20:19:54 +01:00
Gemini Lasswell
ff4dd0d39c Add tests for lisp/kmacro.el
* test/lisp/kmacro-tests.el: New file.  (Bug#24939)
2017-02-04 13:55:47 +02:00
Eli Zaretskii
c8f91b168b Fix autorevert-tests on MS-Windows
* test/lisp/autorevert-tests.el
(auto-revert-test02-auto-revert-deleted-file): Don't check that
auto-revert-use-notify was reset to nil on w32.
2017-02-04 13:49:55 +02:00
Gemini Lasswell
ef3d8d6f72 New macro 'ert-with-message-capture'
* lisp/emacs-lisp/ert-x.el (ert-with-message-capture): New macro.
(Bug#25158)

* test/lisp/autorevert-tests.el (auto-revert--wait-for-revert)
(auto-revert-test00-auto-revert-mode)
(auto-revert-test01-auto-revert-several-files)
(auto-revert-test02-auto-revert-deleted-file)
(auto-revert-test03-auto-revert-tail-mode)
(auto-revert-test04-auto-revert-mode-dired):
* test/lisp/filenotify-tests.el (file-notify-test03-autorevert): Use
ert-with-message-capture.
2017-02-04 13:36:43 +02:00
Gemini Lasswell
8ba27b7ce2 Avoid invalid read syntax errors due to 'ert-with-test-buffer'
* lisp/emacs-lisp/ert-x.el (ert-with-test-buffer): Fix the
'declare' form.  (Bug#24722)
2017-02-04 13:18:29 +02:00
Eli Zaretskii
a46a61904d Fix a syntax error when evaluating pcase.el under Edebug
* lisp/emacs-lisp/pcase.el (pcase-MACRO): Replace def-edebug-spec
with an explicit 'put' form.  Suggested by Gemini Lasswell
<gazally@runbox.com>.  (Bug#24717)
2017-02-04 13:12:14 +02:00
Eli Zaretskii
cc84a405f3 ; * lisp/files.el (save-some-buffers-default-predicate): Add :version. 2017-02-04 12:59:41 +02:00
Gemini Lasswell
78f841d6db Change edebug-max-depth from defconst to defcustom
* lisp/emacs-lisp/edebug.el (edebug-max-depth): Add defcustom.
(Bug#24713)

* etc/NEWS: Mention edebug-max-depth.

* doc/lispref/edebug.texi (Checking Whether to Stop): Mention
edebug-max-depth and index it.  Add cross-references for
max-lisp-eval-depth and max-specpdl-size.

Co-authored-by: Eli Zaretskii <eliz@gnu.org>
2017-02-04 12:56:19 +02:00
Eli Zaretskii
c71b718be8 Support options with embedded whitespace in 'dired-listing-switches'
* lisp/dired.el (dired-listing-switches): Document how to quote
options with embedded whitespace.

* lisp/files.el (insert-directory): Use split-string-and-unquote
to support dired-listing-switches that specify command-line
options with embedded spaces.  (Bug#25485)
2017-02-04 12:02:55 +02:00
Gemini Lasswell
331eb6c915 Add tests for lisp/emacs-lisp/testcover.el
* test/lisp/emacs-lisp/testcover-tests.el: New file.
* test/lisp/emacs-lisp/testcover-resources/testcases.el: New file.

Co-authored-by: Noam Postavsky <npostavs@users.sourceforge.net>
2017-02-04 11:43:50 +02:00
Eli Zaretskii
12a79dc3ce Document 'save-some-buffers-default-predicate'
* doc/lispref/files.texi (Saving Buffers):
* doc/emacs/files.texi (Save Commands): Document
save-some-buffers-default-predicate.
2017-02-04 11:33:54 +02:00
Richard Stallman
6db5582479 New defcustom 'save-some-buffers-default-predicate'
* lisp/files.el (save-some-buffers-default-predicate): New defcustom.
(save-some-buffers): Use it when PRED is nil or omitted.
2017-02-04 11:16:55 +02:00
Mark Oteiza
be10c00d3d Rename to if-let* and when-let*
Make the existing if-let and when-let aliases.
* lisp/emacs-lisp/subr-x.el (if-let*, when-let*): New macros.  Rewrite
docstrings, incorporating that from let* and the existing if-let.
(if-let, when-let, and-let*): Alias them.
2017-02-03 21:42:42 -05:00
Paul Eggert
e080d019f4 Re-port alloc.c to Solaris sparc and simplify
alloc.c had bitrotted a bit, and used an undefined symbol
stack_base when Emacs was built on Solaris sparc, leading to
compilation failures.  Also, code related to __builtin_unwind_init
was unnecessarily duplicated.  Fix the bitrot and remove some
duplication.
* src/alloc.c: Remove uses of GC_SAVE_REGISTERS_ON_STACK, since it
is never defined.
(test_setjmp) [!HAVE___BUILTIN_UNWIND_INIT && GC_SETJMP_WORKS]:
Define a no-op dummy, to simplify use.
(test_setjmp) [!GC_SETJMP_WORKS]: Test setjmp_tested_p here rather
than in the caller, to simplify use.
(stacktop_sentry): New type.
(__builtin_unwind_init) [!HAVE___BUILTIN_UNWIND_INIT]: New macro.
(SET_STACK_TOP_ADDRESS): New macro, containing code that was duplicated.
(flush_stack_call_func, Fgarbage_collect): Use it.
(init_alloc): Omit unnecessary initialization.
After dumping, Emacs need not re-test setjmp.
2017-02-02 22:58:20 -08:00
Noam Postavsky
ce88155d83 ; Merge: fixes and updates to scroll margin (Bug#5718)
- add new option `maximum-sroll-margin'
- refactor and fix scroll margin calculation
2017-02-02 21:35:51 -05:00
Noam Postavsky
da515a0d8e Add tests for scrolling
* test/manual/scroll-tests.el: New tests for scroll-margin behavior.
2017-02-02 21:21:18 -05:00
Noam Postavsky
b9be4c14e8 Fix scrolling with partial lines
* src/xdisp.c (partial_line_height): New function.
(try_scrolling):
* src/window.c (window_scroll_pixel_based): Use it for calculating the
pixel scroll margin correctly in a window with partial lines.
2017-02-02 21:21:18 -05:00
Noam Postavsky
e27a91cddc Make limit on scroll-margin variable
* src/xdisp.c (maximum-scroll-margin): New variable.
* lisp/cus-start.el: Make it customizable.
* etc/NEWS: Mention it.
* doc/emacs/display.texi (Auto Scrolling):
* doc/lispref/windows.texi (Textual Scrolling): Document it.
* src/window.c (window_scroll_pixel_based): Use it instead of hardcoding
division by 4 (Bug #5718).
2017-02-02 21:20:29 -05:00
Noam Postavsky
c92fc7a215 Don't count mode line for scroll-margin limit
* src/window.c (window_scroll_margin): Use window_box_height to avoid
counting header line, scrollbars for scroll-margin limit (Bug #5718).
2017-02-02 21:19:53 -05:00
Noam Postavsky
d17e92da06 Refactor uses of scroll_margin to a function
Its effective range needs to be clamped between 0 and (window height /
4), so it's better to have this constraint in a single place.

* src/window.c (window_scroll_margin): New function.
(window_scroll_pixel_based, window_scroll_line_based):
(Frecenter, Fmove_to_window_line):
* src/xdisp.c (try_scrolling, try_cursor_movement):
(redisplay_window, try_window, try_window_id): Use it.
2017-02-02 21:19:52 -05:00
Dmitry Gutov
604724e49d (xref-collect-matches): Use '-E' together with '-e'
* lisp/progmodes/xref.el (xref-collect-matches): Use '-E'
together with '-e', as suggested by Noam Postavsky
(http://lists.gnu.org/archive/html/emacs-devel/2017-01/msg00780.html).
2017-02-03 03:12:05 +02:00
Paul Eggert
53c16c75a5 Pacify Oracle Studio 12.5
* src/emacs.c (main): Do not silently convert char * to bool.
2017-02-02 15:53:19 -08:00
Eli Zaretskii
df915775bc ; Fix recent documentation changes
* doc/emacs/search.texi (Other Repeating Search): Index recently
introduced variables and faces.
2017-02-02 23:06:48 +02:00
Paul Eggert
eee537267f Fix lisp.h underparenthesization
* src/lisp.h (STACK_CONS, AUTO_STRING_WITH_LEN):
Parenthesize compound literals that are function call args.
Although this does not fix any bugs, it is the proper style for
macro parenthesization as it means this code will continue to
work even if make_lisp_ptr is changed to a macro.
2017-02-02 09:52:37 -08:00
Stefan Monnier
f5372d411d * lisp/doc-view.el (doc-view-mode): Don't require a final newline
(doc-view-revert-buffer): Silence overflow warnings.
2017-02-02 10:57:37 -05:00
Paul Eggert
46aa9a3009 Merge from gnulib
2017-01-30 Port to PGI 16.10 x86-64
2017-01-20 time_rz: fix comment typo
2017-01-14 strftime: %z is -00 if unknown
This incorporates:
* doc/misc/texinfo.tex, lib/c-ctype.h, lib/strftime.c:
* lib/time-internal.h, lib/verify.h:
Copy from gnulib.
2017-02-02 07:50:22 -08:00
Tino Calancha
a362b56b51 Check if there are hunks before kill or refine a hunk
* lisp/vc/diff-mode.el (diff--some-hunks-p): New predicate.
(diff-hunk-kill, diff-file-kill, diff-refine-hunk): Use it (Bug#25571).
2017-02-02 22:27:33 +09:00
Tino Calancha
01d87bf846 Ignore error after kill last file or hunk
* lisp/vc/diff-mode.el (diff-hunk-kill): Go to beginning of hunk before kill.
Ignore error after kill last hunk (Bug#25570).
(diff-file-kill): Idem.
2017-02-02 22:27:18 +09:00
Tino Calancha
e280b94dcd Show current line highlighted in *Occur* buffer
* lisp/replace.el (list-matching-lines-current-line-face)
(list-matching-lines-jump-to-current-line): New user options.
(occur--orig-line, occur--orig-line-str): New variables.
(occur, occur-engine): Use them.
(occur--final-pos): New variable.
(occur-1): Use it.
(occur-engine): Idem.
Show the current line with 'list-matching-lines-current-line-face'.
Set point on the first matching line after the current one.
* etc/NEWS: Add entry for the new option.
2017-02-02 19:13:27 +09:00
Tino Calancha
8e871aef10 Allow occur command to operate on the region
See discussion in:
https://lists.gnu.org/archive/html/emacs-devel/2016-12/msg01084.html
* lisp/replace.el (occur--region-start, occur--region-end)
(occur--matches-threshold): New variables.
(occur-engine): Use them.
(occur): Idem.
Add optional arg REGION; if non-nil occur applies in that region.
* doc/lispintro/emacs-lisp-intro.texi (Keybindings): Update manual
* doc/emacs/search.texi (Other Repeating Search): Idem.
; etc/NEWS: Add entry for the new feature.
2017-02-02 19:13:05 +09:00
Mark Oteiza
141b085674 Treat list-buffers-directory as a string
Another step in the long history of list-buffers-directory.  A thread
branch discussing the meaning/use of the variable starts here
https://lists.gnu.org/archive/html/emacs-devel/2009-09/msg00684.html
Also see (info "(elisp) Buffer File Name").
* lisp/buff-menu.el: Relocate special case code into info.el.  Nix
Info-* defvars.
(Buffer-menu--pretty-file-name): Remove special case.  Use
bound-and-true-p.
(Buffer-menu-info-node-description): Remove.
* lisp/ibuffer.el (ibuffer-buffer-file-name): Treat
list-buffers-directory as a string.
* lisp/info.el (Info-node-description): New function.
(Info-select-node): Use it.
2017-02-01 22:57:23 -05:00