aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into comment-cachecomment-cacheAlan Mackenzie2017-02-12167-2189/+4939
|\
| * 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.
| * Treat list-buffers-directory as a stringMark Oteiza2017-02-013-25/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Turn on lexical-binding in parse-time.elMark Oteiza2017-02-011-9/+3
| | | | | | | | | | | | * lisp/calendar/parse-time.el: Turn on lexical-binding. (parse-time-iso8601-regexp, parse-iso8601-time-string): Remove unused bindings.
| * Prevent creating thumbnails of all gif framesMark Oteiza2017-02-011-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With the previous defaults, doing image-dired on a directory with an animated foo.gif would cause creation of foo.thumb-N.gif for each of N frames in foo.gif. By default image-dired looks for foo.thumb.gif, so there additionally is no usable thumbnail after all the needless effort. image-dired never handled animation, regardless. * lisp/image-dired.el: Mention limitation. (image-dired-cmd-create-thumbnail-options): (image-dired-cmd-create-temp-image-options): (image-dired-cmd-create-standard-thumbnail-options): Append [0] to filename to indicate only converting the 0th frame. (image-dired-display-image-mode): Don't show a cursor.
| * Fix quitting bug when buffers are frozenPaul Eggert2017-02-017-80/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem noted by Eli Zaretskii in: http://lists.gnu.org/archive/html/emacs-devel/2017-01/msg00721.html This patch also fixes some other issues in that report. * src/lisp.h (incr_rarely_quit): Remove. All callers changed to use rarely_quit directly. * src/search.c (freeze_buffer_relocation) (thaw_buffer_relocation): New functions. (looking_at_1, fast_looking_at, search_buffer): Use them to fix bug when quitting when buffers are frozen. * src/sysdep.c (emacs_intr_read): Rename from emacs_nointr_read. All uses changed.
| * Revamp quitting and fix infloopsPaul Eggert2017-02-0116-220/+295
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes some infinite loops that cannot be quitted out of, e.g., (defun foo () (nth most-positive-fixnum '#1=(1 . #1#))) when byte-compiled and when run under X. See: http://lists.gnu.org/archive/html/emacs-devel/2017-01/msg00577.html This also attempts to keep the performance improvements I recently added, as much as possible under the constraint that the infloops must be caught. In some cases this fixes infloop bugs recently introduced when I removed immediate_quit. * src/alloc.c (Fmake_list): Use rarely_quit, not maybe_quit, for speed in the usual case. * src/bytecode.c (exec_byte_code): * src/editfns.c (Fcompare_buffer_substrings): * src/fns.c (Fnthcdr): * src/syntax.c (scan_words, skip_chars, skip_syntaxes) (Fbackward_prefix_chars): Use rarely_quit so that users can C-g out of long loops. * src/callproc.c (call_process_cleanup, call_process): * src/fileio.c (read_non_regular, Finsert_file_contents): * src/indent.c (compute_motion): * src/syntax.c (scan_words, Fforward_comment): Remove now-unnecessary maybe_quit calls. * src/callproc.c (call_process): * src/doc.c (get_doc_string, Fsnarf_documentation): * src/fileio.c (Fcopy_file, read_non_regular, Finsert_file_contents): * src/lread.c (safe_to_load_version): * src/sysdep.c (system_process_attributes) [GNU_LINUX]: Use emacs_read_quit instead of emacs_read in places where C-g handling is safe. * src/eval.c (maybe_quit): Move comment here from lisp.h. * src/fileio.c (Fcopy_file, e_write): Use emacs_write_quit instead of emacs_write_sig in places where C-g handling is safe. * src/filelock.c (create_lock_file): Use emacs_write, not plain write, as emacs_write no longer has a problem. (read_lock_data): Use emacs_read, not read, as emacs_read no longer has a problem. * src/fns.c (rarely_quit): Move to lisp.h and rename to incr_rarely_quit. All uses changed.. * src/fns.c (Fmemq, Fmemql, Fassq, Frassq, Fplist_put, Fplist_member): * src/indent.c (compute_motion): * src/syntax.c (find_defun_start, back_comment, forw_comment) (Fforward_comment, scan_lists, scan_sexps_forward): Use incr_rarely_quit so that users can C-g out of long loops. * src/fns.c (Fnconc): Move incr_rarely_quit call to within inner loop, so that it catches C-g there too. * src/keyboard.c (tty_read_avail_input): Remove commented-out and now-obsolete code dealing with interrupts. * src/lisp.h (rarely_quit, incr_rarely_quit): New functions, the latter moved here from fns.c and renamed from rarely_quit. (emacs_read_quit, emacs_write_quit): New decls. * src/search.c (find_newline, search_buffer, find_newline1): Add maybe_quit to catch C-g. * src/sysdep.c (get_child_status): Always invoke maybe_quit if interruptible, so that the caller need not bother. (emacs_nointr_read, emacs_read_quit, emacs_write_quit): New functions. (emacs_read): Rewrite in terms of emacs_nointr_read. Do not handle C-g or signals; that is now for emacs_read_quit. (emacs_full_write): Replace PROCESS_SIGNALS two-way arg with INTERRUPTIBLE three-way arg. All uses changed.
| * Remove immediate_quit.Paul Eggert2017-02-0117-213/+30
| | | | | | | | | | | | | | | | | | The old code that sets and clears immediate_quit was ineffective except when Emacs is running in terminal mode, and has problematic race conditions anyway, so remove it. This will introduce some hangs when Emacs runs in terminal mode, and these hangs should be fixed in followup patches. * src/keyboard.c (immediate_quit): Remove. All uses removed.
| * Allow C++ nested brace-list-entries to be better indented.Alan Mackenzie2017-02-015-36/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes bug #24431. The key change of this bug fix is correctly analyzing nested brace lists when the opening element stands on the same line as both its introductory brace and an enclosing parameter list parenthesis. * list/progmodes/cc-align.el (c-lineup-under-anchor): New line-up function. * list/progmodes/cc-engine.el (c-looking-at-or-maybe-in-bracelist): Accept the presence of exactly an identifier between an open parenthesis and an open brace as evidence of the brace starting a brace list. (c-looking-at-statement-block): New function, extracted from c-looking-at-inexpr-block. Enhance it to analyze inner blocks recursively when needed. (c-looking-at-inexpr-block): Extract new function (see above) and call it. (c-add-stmt-syntax): Enhance, with new &optional parameter, to supply the prime syntactic symbol with a fixed anchor point. When this is used, restrict all added syntactic symbols to those having an anchor point on the same line. Add, in addition to the current additional symbols, c-brace-list-entry when needed; use c-looking-at-statement-block to determine the latter. (c-guess-basic-syntax, CASE 9D): Use c-add-stmt-syntax rather than just c-add-syntax, to assemble the syntactic context of a 'brace-list-entry, thus getting, possibly, several accompanying syntactic entries. * lisp/progmodes/cc-styles.el (c-style-alist, "gnu" style): New entry for 'brace-list-intro, namely c-lineup-arglist-intro-after-paren. * lisp/progmodes/cc-vars.el (c-offsets-alist): Change the factory default offset for 'brace-list-entry from 0 to c-lineup-under-anchor. * doc/misc/cc-mode.texi (Syntactic Symbols): Amend the definition of brace-list-intro. (Brace List Symbols): Amend the example to show the new analysis of brace lists when the first element comes on the same line as the opening brace. (Misc Line-Up): Document the new line-up function c-lineup-under-anchor.
| * Revert "DOn't use string-as-unibyte in Gnus"Lars Ingebrigtsen2017-02-017-24/+17
| | | | | | | | | | | | | | This reverts commit d1c931009004aef847105b7bac6b6ffafd985b82. Not all the cases where we had string-as-unibyte were characters, so this needs to be considered more thoroughly before being redone.
| * Fix a subtle problem in Tramp with timersMichael Albinus2017-02-011-6/+24
| | | | | | | | | | | | * lisp/net/tramp.el (tramp-accept-process-output): Change argument list. Make it work when called inside a timer. See <http://lists.gnu.org/archive/html/tramp-devel/2017-01/msg00010.html>.
| * ; Bump let-alistMark Oteiza2017-01-311-1/+1
| | | | | | | | * lisp/emacs-lisp/let-alist.el: Bump micro version (bug#24641).
| * read-multiple-choice: explain dialog popups moreTed Zlatanov2017-01-311-0/+5
| | | | | | | | | | * lisp/emacs-lisp/subr-x.el (read-multiple-choice): Explain when a graphical popup is used and how it can be avoided.
| * auth-source-user-and-password: add forgotten user parameterTed Zlatanov2017-01-311-1/+1
| | | | | | | | | | | | * lisp/auth-source.el (auth-source-user-and-password): Use accidentally unused "user" parameter. Reported by Oscar Najera <najera.oscar@gmail.com>.
| * Fix typo in a NEWS entry for CSS modeSimen Heggestøyl2017-01-311-1/+1
| |
| * DOn't use string-as-unibyte in GnusLars Ingebrigtsen2017-01-317-17/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/gnus/nnmail.el (nnmail-parse-active): Don't use string-as-unibyte. (nnmail-insert-xref): Ditto. * lisp/gnus/canlock.el (canlock-make-cancel-key): Ditto. * lisp/gnus/gnus-art.el (gnus-article-browse-html-parts): Ditto. * lisp/gnus/gnus-srvr.el (gnus-browse-foreign-server): Ditto. (gnus-browse-foreign-server): Ditto. (gnus-browse-foreign-server): Ditto. * lisp/gnus/gnus-start.el (gnus-update-active-hashtb-from-killed): Ditto. (gnus-read-newsrc-el-file): Ditto. * lisp/gnus/mml.el (mml-generate-mime-1): Ditto. * lisp/gnus/nnir.el (nnir-get-active): Ditto. (nnir-get-active): Ditto.
| * Allow C-s C-w to yank ' to the search ring in the Gnus article bufferJuri Linkov2017-01-311-3/+4
| | | | | | | | | | | | * lisp/gnus/gnus-art.el (gnus-article-mode-syntax-table): Make M-. in article buffers work for `foo' strings, and still allow C-s C-w to yank ' to the search ring (bug#22248).
| * * src/alloc.c, src/lisp.h: Fix minor glitches in recent changes.Paul Eggert2017-01-312-16/+12
| |