summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * Make FOR_EACH_TAIL more like other FOR_EACH macrosPaul Eggert2017-02-063-111/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Port to clang 3.8.0Paul Eggert2017-02-051-3/+9
| | | | | | | | | | | | 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.
| * Add cyclic-list testsPaul Eggert2017-02-051-0/+314
| | | | | | | | * test/manual/cycle-tests.el: New file (Bug#25606).
| * FOR_EACH_TAIL now checks for quitPaul Eggert2017-02-051-20/+32
| | | | | | | | | | | | | | | | | | 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.
| * Signal list cycles in ‘length’ etc.Paul Eggert2017-02-054-216/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Simplify use of FOR_EACH_TAILPaul Eggert2017-02-053-23/+33
| | | | | | | | | | | | | | | | * 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).
| * * lisp/textmodes/css-mode.el: Require subr-x at compile timeSimen Heggestøyl2017-02-051-1/+1
| |
* | * src/bytecode.c: Refactor to follow GNU coding standardsVibhav Pant2017-02-111-14/+10
| |
* | src/bytecode.c: Avoid comparing values unnecessarily in BswitchVibhav Pant2017-02-101-2/+4
| | | | | | | | | | | | * src/bytecode.c: (exec_byte_code) While linear searching the jump table, compare the value's hash table first to avoid calling h->test.cmpfn every time.
* | src/bytecode.c (exec_byte_code): Remove unneeded assert.Vibhav Pant2017-02-091-6/+4
| |
* | bytecode.c (exec_byte_code): Use h->count instead of HASH_TABLE_SIZEVibhav Pant2017-02-091-2/+9
| |
* | bytecode.c (exec_byte_code): don't check hash code in linear search.Vibhav Pant2017-02-091-2/+4
| | | | | | | | | | | | | | | | * src/bytecode.c (exec_byte_code): Don't check that the hash code is not nil when linear scanning the jump table. Hash tables for are declared with :size as the exact number of cases, so each entry i should have a hash code. When BYTE_CODE_SAFE, do it as a sanity check.
* | Improve byte-switch execution.Vibhav Pant2017-02-093-15/+33
| | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/byte-opt.el, lisp/emacs-lisp/bytecomp.el (byte-decompile-bytecode-1), (byte-compile-lapcode): Calculate the actual jump address while compiling, store it in the jump table. * src/bytecode.c: Jump to the looked up value directly, do a linear search when the number of elements is <= 5.
* | Add tests for checking byte-switch code.Vibhav Pant2017-02-071-0/+14
| | | | | | | | | | * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-cond): New test, test byte-switch bytecode.
* | ; bytecomp.el (byte-compile-cond-jump-table): Add TODO noteVibhav Pant2017-02-061-0/+2
| |
* | ; byte(-opt, comp).el: Add more documentation for byte-switch code.Vibhav Pant2017-02-062-0/+22
| |
* | Merge remote-tracking branch 'origin/master' into feature/byte-switchVibhav Pant2017-02-0582-1371/+3655
|\ \ | |/
| * typo fixTom Tromey2017-02-041-1/+1
| | | | | | | | (css--colon-inside-selector-p): Fix typo in docstring.
| * Set comment-multi-line in js-modeTom Tromey2017-02-042-0/+15
| | | | | | | | | | | | 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.
| * * test/manual/indent/scss-mode.scss: Fix indentationSimen Heggestøyl2017-02-041-13/+13
| |
| * Fix indentation of multiline CSS property valuesSimen Heggestøyl2017-02-043-4/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
| * Add tests for lisp/kmacro.elGemini Lasswell2017-02-041-0/+890
| | | | | | | | * test/lisp/kmacro-tests.el: New file. (Bug#24939)
| * Fix autorevert-tests on MS-WindowsEli Zaretskii2017-02-041-1/+3
| | | | | | | | | | | | * 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.
| * New macro 'ert-with-message-capture'Gemini Lasswell2017-02-043-121/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
| * Avoid invalid read syntax errors due to 'ert-with-test-buffer'Gemini Lasswell2017-02-041-1/+1
| | | | | | | | | | * lisp/emacs-lisp/ert-x.el (ert-with-test-buffer): Fix the 'declare' form. (Bug#24722)
| * Fix a syntax error when evaluating pcase.el under EdebugEli Zaretskii2017-02-041-1/+2
| | | | | | | | | | | | * 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)
| * ; * lisp/files.el (save-some-buffers-default-predicate): Add :version.Eli Zaretskii2017-02-041-1/+2
| |
| * Change edebug-max-depth from defconst to defcustomGemini Lasswell2017-02-043-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * Support options with embedded whitespace in 'dired-listing-switches'Eli Zaretskii2017-02-042-1/+5
| | | | | | | | | | | | | | | | | | * 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)
| * Add tests for lisp/emacs-lisp/testcover.elGemini Lasswell2017-02-042-0/+679
| | | | | | | | | | | | | | * 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>
| * Document 'save-some-buffers-default-predicate'Eli Zaretskii2017-02-043-11/+22
| | | | | | | | | | | | * doc/lispref/files.texi (Saving Buffers): * doc/emacs/files.texi (Save Commands): Document save-some-buffers-default-predicate.
| * New defcustom 'save-some-buffers-default-predicate'Richard Stallman2017-02-042-0/+17
| | | | | | | | | | * lisp/files.el (save-some-buffers-default-predicate): New defcustom. (save-some-buffers): Use it when PRED is nil or omitted.
| * Rename to if-let* and when-let*Mark Oteiza2017-02-032-12/+28
| | | | | | | | | | | | | | 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.
| * Re-port alloc.c to Solaris sparc and simplifyPaul Eggert2017-02-021-120/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * ; Merge: fixes and updates to scroll margin (Bug#5718)Noam Postavsky2017-02-029-80/+243
| |\ | | | | | | | | | | | | - add new option `maximum-sroll-margin' - refactor and fix scroll margin calculation
| | * Add tests for scrollingNoam Postavsky2017-02-021-0/+130
| | | | | | | | | | | | * test/manual/scroll-tests.el: New tests for scroll-margin behavior.
| | * Fix scrolling with partial linesNoam Postavsky2017-02-023-2/+30
| | | | | | | | | | | | | | | | | | | | | * 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.
| | * Make limit on scroll-margin variableNoam Postavsky2017-02-026-9/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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).
| | * Don't count mode line for scroll-margin limitNoam Postavsky2017-02-021-4/+2
| | | | | | | | | | | | | | | * src/window.c (window_scroll_margin): Use window_box_height to avoid counting header line, scrollbars for scroll-margin limit (Bug #5718).
| | * Refactor uses of scroll_margin to a functionNoam Postavsky2017-02-023-74/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | (xref-collect-matches): Use '-E' together with '-e'Dmitry Gutov2017-02-031-5/+1
| |/ | | | | | | | | | | * 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).
| * Pacify Oracle Studio 12.5Paul Eggert2017-02-021-1/+1
| | | | | | | | * src/emacs.c (main): Do not silently convert char * to bool.
| * ; Fix recent documentation changesEli Zaretskii2017-02-021-0/+2
| | | | | | | | | | * doc/emacs/search.texi (Other Repeating Search): Index recently introduced variables and faces.
| * Fix lisp.h underparenthesizationPaul Eggert2017-02-021-3/+2
| | | | | | | | | | | | | | | | * 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.
| * * lisp/doc-view.el (doc-view-mode): Don't require a final newlineStefan Monnier2017-02-021-0/+5
| | | | | | | | (doc-view-revert-buffer): Silence overflow warnings.
| * Merge from gnulibPaul Eggert2017-02-025-38/+38
| | | | | | | | | | | | | | | | | | | | 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.
| * Check if there are hunks before kill or refine a hunkTino Calancha2017-02-021-74/+85
| | | | | | | | | | * lisp/vc/diff-mode.el (diff--some-hunks-p): New predicate. (diff-hunk-kill, diff-file-kill, diff-refine-hunk): Use it (Bug#25571).
| * Ignore error after kill last file or hunkTino Calancha2017-02-021-2/+3
| | | | | | | | | | | | * 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.
| * Show current line highlighted in *Occur* bufferTino Calancha2017-02-023-5/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
| * Allow occur command to operate on the regionTino Calancha2017-02-024-17/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.