summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Modify `beginning-of-defun-comments'fix/bug-21072Noam Postavsky2017-05-121-8/+16
| | | | | * lisp/emacs-lisp/lisp.el (beginning-of-defun-comments): Try not to stop in the middle of a multiline comment.
* Fix elisp-tests-with-temp-buffer compilationNoam Postavsky2017-05-121-33/+33
| | | | | | | | | | | | * test/lisp/emacs-lisp/lisp-tests.el (elisp-tests-with-temp-buffer): Don't refer to the =!NAME= as "markers" since they produce variables with just plain positions, not marker objects. Explicitly specify that CONTENTS is evaluated at compile time. Don't re-evaluate CONTENTS at runtime. Fix debug specification. Suppress warnings due to BODY not using =!NAME= variables. (elisp-test-point-position-regex): Rename from `elisp-test-point-marker-regex'. (mark-defun-test-buffer): Wrap in `eval-and-compile'.
* * lisp/emacs-lisp/lisp.el (mark-defun): Simplify moving the point.Noam Postavsky2017-05-121-7/+3
|
* Fix Bug#21072 and rework `mark-defun'Marcin Borkowski2017-05-124-43/+359
| | | | | | | | | | | | | | | | | * test/lisp/progmodes/elisp-mode-tests.el (mark-defun-test-buffer): New variable (mark-defun-no-arg-region-inactive) (mark-defun-no-arg-region-active) (mark-defun-arg-region-active) (mark-defun-pos-arg-region-inactive) (mark-defun-neg-arg-region-inactive, mark-defun-bob): Add tests for the new `mark-defun'. * lisp/emacs-lisp/lisp.el (beginning-of-defun--in-emptyish-line-p): New function. (beginning-of-defun-comments): New function. (mark-defun): Fix bug#21072, also rewrite large parts of `mark-defun' to accept a numerical prefix argument.
* Add elisp-tests-with-temp-buffer, a new testing macroMarcin Borkowski2017-05-091-0/+39
| | | | | | | * test/lisp/emacs-lisp/lisp-tests.el (elisp-test-point-marker-regex) New variable. (elisp-tests-with-temp-buffer): New macro to help test functions moving the point and/or mark.
* Avoid infinite loop in redisplay when header-line-format is invalidEli Zaretskii2017-04-211-1/+2
| | | | | | * src/xdisp.c (handle_invisible_prop): Avoid inflooping when the string has an invalid %-construct in it and is displayed as part of mode-line or header-line. (Bug#26586)
* Add tests to check image scaling functionalityLars Ingebrigtsen2017-04-212-0/+64
| | | | | | | | | | This is in preparation to doing further work in this area to avoid regressions. * test/data/image/blank-200x100.png: New file for testing image scaling. * test/manual/image-size-tests.el: New file.
* Allow svg-image to take all create-image PROPSLars Ingebrigtsen2017-04-211-4/+6
| | | | | * lisp/svg.el (svg-image): Allow passing in PROPS when creating an image for convenience.
* Treat non-erroring lisp call as successful eshell command (Bug#26161)George D. Plymale II2017-04-201-8/+4
| | | | | | | | | | | | This lets a compound command like 'cd .. && echo ok' print 'ok', similar to how most other shells behave. * lisp/eshell/esh-cmd.el (eshell-exit-success-p): Only check if the last exit code was zero, rather than first checking whether the last command returned nil. (eshell-exec-lisp): Set `eshell-last-command-status' to 1 on error. Copyright-paperwork-exempt: yes
* Fix reading of tab settings in whitespace-modeReuben Thomas2017-04-201-34/+18
| | | | | | | | | | | | | | lisp/whitespace.el (whitespace-indent-tabs-mode) whitespace-tab-width): Remove these variables. The underlying variables `indent-tabs-mode' and `tab-width' are already buffer-local when needed, and whitespace-mode never changes them. (whitespace-ensure-local-variables): Remove this function, which only existed to set the above variables. (whitespace-cleanup-region, whitespace-regexp) (whitespace-indentation-regexp, whitespace-report-region) (whitespace-turn-on, whitespace-color-on): Adjust these functions to use `indent-tabs-mode' and `tab-width' directly, and not call `whitespace-ensure-local-variables'.
* * lisp/vc/vc-hg.el (vc-hg-state-fast): Fix compiler warningStefan Monnier2017-04-201-10/+3
| | | | by simplifying ascii-test.
* bytecomp: Don't inline functions that use byte-switch (Bug#26518)Vibhav Pant2017-04-201-40/+46
| | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-unfold-bcf): Don't inline FORM if the bytecode uses the byte-switch instruction. It is impossible to guess the correct stack depth while inlining such bytecode, resulting in faulty code.
* Don't register "def" as an autoload prefix (Bug#26412)Noam Postavsky2017-04-191-1/+3
| | | | | * lisp/emacs-lisp/autoload.el (autoload--make-defs-autoload): Don't accept "def" as a prefix.
* Use substring completion for Info menus and indexStefan Monnier2017-04-193-14/+13
| | | | | | | * lisp/info.el (Info-complete-menu-item): Add `category' metadata. (Info-menu): Simplify now that we use the `default' arg of completing-read. * lisp/minibuffer.el (completion-category-defaults): Use substring completion for `info-menu`.
* Remove some explicit runtime loads of pcaseGlenn Morris2017-04-195-5/+0
| | | | | | | | Pcase is macros, so these should have used eval-when-compile. Anyway, pcase entry points are autoloaded, so the compiler handles it. * lisp/profiler.el, lisp/emacs-lisp/eieio-core.el: * lisp/emacs-lisp/generator.el, lisp/emacs-lisp/subr-x.el: * lisp/progmodes/xref.el: No need to require pcase.
* Stop cl-lib loading pcase at runtimeGlenn Morris2017-04-191-1/+2
| | | | | | The cause was an unexpanded pcase-defmacro in cl-loaddefs. * lisp/emacs-lisp/autoload.el (make-autoload): Treat pcase-defmacro like defmacro.
* Note frame documentation exceptions for NS buildsAlan Third2017-04-191-6/+14
| | | | | * doc/lispref/frames.texi (Management Parameters, Child Frames): Note NS differences.
* Fix bug introduced by my last commitAlan Third2017-04-191-1/+1
| | | | * src/nsterm.m (ns_draw_fringe_bitmap): Revert key-mashing accident.
* Add new frame functionality to NS portAlan Third2017-04-198-101/+341
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/frame.el (frame-restack): Call ns-frame-restack. * src/keyboard.c (kbd_buffer_get_event) [HAVE_NS]: Enable MOVE_FRAME_EVENT handling. * src/frame.h: * src/frame.c: Enable 'z-group', 'undecorated' and 'parent' frame definitions. * src/nsfns.m: Add x_set_z_group, x_set_parent_frame and x_set_undecorated (Cocoa only) to handler struct. (Fx_create_frame): Handle 'z-group', 'parent-frame' and 'undecorated' frame parameter. (Fns_frame_restack): New function. * src/nsmenu.m (free_frame_tool_bar, update_frame_tool_bar): FRAME_TOOLBAR_HEIGHT is no longer a variable. * src/nsterm.h (NS_PARENT_WINDOW_LEFT_POS, NS_PARENT_WINDOW_TOP_POS): Add #defines to find the screen position of the parent frame. (NS_TOP_POS): Remove defun. (EmacsView): Remove redundant toolbar variables and add createToolbar method. (FRAME_NS_TITLEBAR_HEIGHT, FRAME_TOOLBAR_HEIGHT): Always calculate the values instead of storing them in a variable. * src/nsterm.m (x_set_offset, windowDidMove): Take parent frame position into account when positioning frames. (initFrameFromEmacs): Remove toolbar creation code and handle new frame parameters. (x_set_window_size): Remove toolbar height calculation. (x_set_z_group): (x_set_parent_frame): (x_set_undecorated) [NS_IMPL_COCOA]: New function. (x_destroy_window): Detach parent if child closes. (updateFrameSize): Change NSTRACE message to reflect new reality and no longer reset frame size. (windowWillResize): Don’t change NS window name when the titlebar is invisible. (createToolbar): Move toolbar creation code into it’s own method. (toggleFullScreen): FRAME_TOOLBAR_HEIGHT and FRAME_NS_TITLEBAR_HEIGHT are no longer variables. (windowDidMove): Fire MOVE_FRAME_EVENT Emacs event.
* Tweak bytecomp's loading of cl-extraGlenn Morris2017-04-181-2/+4
| | | | | * lisp/emacs-lisp/bytecomp.el: Don't force load of cl-extra in a post-bootstrap emacs where cl-loaddefs does exist.
* Avoid unnecessary loading of subr-x at run-timeGlenn Morris2017-04-1812-11/+13
| | | | | | | | | | * lisp/doc-view.el, lisp/filenotify.el, lisp/info-look.el: * lisp/svg.el, lisp/emacs-lisp/byte-opt.el, lisp/net/shr.el: * lisp/textmodes/sgml-mode.el, test/lisp/dom-tests.el: No need to load subr-x at run-time. * lisp/gnus/nnheader.el: No need to load subr-x. ; * lisp/emacs-lisp/subr-x.el, lisp/gnus/message.el, lisp/net/nsm.el: ; Comments.
* Use iteration in math-factorial-itermichael schuldt2017-04-181-5/+7
| | | | | | * lisp/calc/calc-comb.el (math-factorial-iter): Use iteration instead of recursion to avoid max-specpdl-size problem. Copyright-paperwork-exempt: yes
* * test/lisp/kmacro-tests.el: Require seq, for seq-concatenate.Glenn Morris2017-04-181-0/+1
|
* Avoid ert test failuresGlenn Morris2017-04-181-0/+1
| | | | | | | * lisp/emacs-lisp/ert.el (ert--expand-should-1): Avoid errors related to undefined byte-compile-macro-environment. Somehow masked until very recently because loading seq (eg) loads bytecomp. http://hydra.nixos.org/build/51730765
* Fix find-library-name for load-history entries with nil FILE-NAME (Bug#26355)Noam Postavsky2017-04-181-35/+13
| | | | | | | * lisp/emacs-lisp/find-func.el (find-library--from-load-history): Rename from find-library--from-load-path. Check for `load-history' entries with nil FILE-NAMEs. Simplify by not double checking for suffixes and making use of `locate-file'.
* Use vfork if possible on Darwin (bug#26397)Alan Third2017-04-183-6/+22
| | | | | | | | | | | Co-authored-by: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> * src/conf_post.h (HAVE_WORKING_VFORK): Don't undef. (vfork): Don't define. * src/process.c (create_process) [DARWIN_OS]: Use fork if pty_flag is set, otherwise vfork. * src/callproc.c (call_process) [DARWIN_OS]: Use TIOCNOTTY to detach the controlling terminal instead of setsid.
* Small erc-kill-channel fix (bug#23700)Fran Litterio2017-04-171-3/+4
| | | | * lisp/erc/erc.el (erc-kill-channel): Handle null erc-default-target.
* ediff: use user-error rather than debug-ignored-errorsGlenn Morris2017-04-179-104/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/vc/ediff-diff.el (ediff-prepare-error-list): * lisp/vc/ediff-help.el (ediff-help-for-quick-help): * lisp/vc/ediff-init.el (ediff-barf-if-not-control-buffer) (ediff-check-version): * lisp/vc/ediff-merg.el (ediff-shrink-window-C): * lisp/vc/ediff-mult.el (ediff-draw-dir-diffs, ediff-show-dir-diffs) (ediff-append-custom-diff, ediff-meta-show-patch) (ediff-filegroup-action, ediff-show-meta-buffer, ediff-show-registry) (ediff-get-meta-info, ediff-patch-file-form-meta): * lisp/vc/ediff-ptch.el (ediff-patch-file-internal): * lisp/vc/ediff-util.el (ediff-toggle-autorefine) (ediff--check-ancestor-exists, ediff-toggle-read-only) (ediff-toggle-wide-display, ediff-toggle-multiframe) (ediff-toggle-use-toolbar, ediff-toggle-show-clashes-only) (ediff-next-difference, ediff-previous-difference) (ediff-pop-diff, ediff-read-file-name, ediff-verify-file-buffer) (ediff-save-buffer): * lisp/vc/ediff-wind.el (ediff-make-wide-display): * lisp/vc/ediff.el (ediff-find-file, ediff-buffers-internal) (ediff-directories-internal, ediff-directory-revisions-internal) (ediff-regions-wordwise, ediff-regions-linewise) (ediff-load-version-control): Use user-error. (debug-ignored-errors): No longer modify.
* mh-e: use user-error rather than debug-ignored-errorsGlenn Morris2017-04-172-4/+2
| | | | | | * lisp/mh-e/mh-alias.el (mh-alias-grab-from-field): * lisp/mh-e/mh-utils.el (mh-get-msg-num): Use user-error. (debug-ignored-errors): No longer modify.
* ispell.el: use user-error rather than debug-ignored-errorsGlenn Morris2017-04-171-4/+1
| | | | | * lisp/textmodes/ispell.el (ispell-get-word): Use user-error. (debug-ignored-errors): No longer modify.
* ; Spelling fixPaul Eggert2017-04-171-1/+1
|
* * src/xterm.c (x_fill_rectangle): Now static.Paul Eggert2017-04-172-2/+1
|
* Tighten recently-added UTF-8 checkPaul Eggert2017-04-173-3/+5
| | | | | | * src/coding.c (encode_coding_utf_8): Now extern. * src/terminal.c (terminal_glyph_code) [HAVE_STRUCT_UNIPAIR_UNICODE]: Check for UTF-8, not just for multibyte.
* xml: Properly handle symbol-qnames for attribute parsingDavid Engster2017-04-172-4/+18
| | | | | | | | | | * lisp/xml.el (xml-parse-attlist): Do not strip 'symbol-qnames from xml-ns argument (reverts aea67018) (Bug#26533). (xml-maybe-do-ns): Properly handle default namespace by not interning new symbol when 'special' flag is set. * tests/lisp/xml-tests.el (xml-parse-test--namespace-attribute-qnames) (xml-parse-namespace-attribute-qnames): Add test for Bug#26533.
* * src/lisp.h (STRING_SET_CHARS): Simplify assertion.Paul Eggert2017-04-171-2/+3
|
* Fix assertion violations when displaying thread-related errorEli Zaretskii2017-04-171-2/+10
| | | | | * src/process.c (Faccept_process_output): Don't assume a thread's name is always a string.
* dired ‘M’ should not complain about ‘.’ and ‘..’Paul Eggert2017-04-161-3/+5
| | | | | * lisp/dired-aux.el (dired-do-redisplay): Allow redisplay of ‘.’ and ‘..’ (Bug#26528).
* Remove unused coding enumsPaul Eggert2017-04-161-33/+0
| | | | | * src/coding.h (enum coding_system_type, enum end_of_line_type): Remove; unused.
* Work around bug with unibyte Linux consolesPaul Eggert2017-04-161-1/+3
| | | | | * src/terminal.c (terminal_glyph_code): Skip the UTF-8 stuff if the terminal's coding system is unibyte (Bug#26396).
* ; Fix typo in error messages (Bug#26034)Christian Garbs2017-04-171-2/+2
| | | | Copyright-paperwork-exempt: yes
* Fix org-agenda's command for calendar-lunar-phasesTeemu Likonen2017-04-161-1/+1
| | | | | | Function org-agenda-phases-of-moon tries to call a non-existing function calendar-phases-of-moon. The correct function is calendar-lunar-phases.
* Tuning for `separate' Tramp syntaxMichael Albinus2017-04-162-4/+156
| | | | | | | | * lisp/net/tramp.el (tramp-method-regexp): Fix it for `separate' syntax. (tramp-completion-file-name-regexp-separate): Simplify. * test/lisp/net/tramp-tests.el (tramp-test02-file-name-dissect-separate): Extend test.
* Fix bug #26529: C-h k errors with a lambda function bound to a key.Alan Mackenzie2017-04-161-2/+4
| | | | | | * lisp/help-fns.el (help-fns--signature, describe-function-1): Check `function' is a symbol before trying to get property `reader-construct' from it.
* Fix highlighting of short selectors in CSS modeSimen Heggestøyl2017-04-161-1/+1
| | | | | | * lisp/textmodes/css-mode.el (css--font-lock-keywords): Highlight selectors where the part before a colon is only one character long, such as `a:hover'.
* Fix redisplay performance problems with some fontsEli Zaretskii2017-04-161-10/+16
| | | | | | | * src/font.c (font_list_entities): Revert part of the changes introduced on Apr 2, 2014 to fix bug#17125. It turns out having zero_vector in the font-cache is an important indication that cannot be removed. (Bug#21028)
* Add assertion to STRING_SET_CHARSEli Zaretskii2017-04-161-0/+4
| | | | | | * src/lisp.h (STRING_SET_CHARS): Add an assertion and commentary to prevent incorrect usage. For details, see this discussion: http://lists.gnu.org/archive/html/emacs-devel/2017-04/msg00412.html.
* Avoid compilation warnings on MS-WindowsEli Zaretskii2017-04-162-10/+8
| | | | | | | * src/w32term.c (w32_read_socket): Avoid compiler warnings about parentheses around assignment. * src/w32fns.c (w32_createwindow): Remove unused variable dwStyle. Use "|=" where appropriate.
* Merge from gnulibPaul Eggert2017-04-152-20/+33
| | | | | | | This incorporates: 2017-04-14 intprops: try to avoid tickling similar bugs 2017-04-14 intprops: port to Oracle Studio 12.3 x86 * doc/misc/texinfo.tex, lib/intprops.h: Copy from gnulib.
* Fix bugs in `with-displayed-buffer-window' and `fit-window-to-buffer'Martin Rudalics2017-04-151-11/+25
| | | | | | | | | | | | | | | * lisp/window.el (with-displayed-buffer-window): When a 'window-height' action alist entry specifies a function, call `temp-buffer-window-show' with a '(window-height . t)' dummy entry so `window--try-to-split-window' will bind `window-combination-limit' to t and that function does not resize any other window but the one we split this one off (Bug#25055, Bug#25179). (fit-window-to-buffer): Call `window-max-delta' with NOUP t so we steal space only from windows in the same combination. Stealing space from other windows would not allow us to return that space later when this window is deleted (Bug#25055, Bug#25179).
* Avoid userlock queries hanging forever in batch modeGlenn Morris2017-04-141-0/+4
| | | | | * lisp/userlock.el (ask-user-about-lock) (ask-user-about-supersession-threat): Abort in batch mode.