summaryrefslogtreecommitdiff
path: root/lisp
Commit message (Collapse)AuthorAgeFilesLines
* 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)
* New defcustom 'save-some-buffers-default-predicate'Richard Stallman2017-02-041-0/+12
| | | | | * 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-031-12/+24
| | | | | | | 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.
* ; Merge: fixes and updates to scroll margin (Bug#5718)Noam Postavsky2017-02-021-0/+1
|\ | | | | | | | | - add new option `maximum-sroll-margin' - refactor and fix scroll margin calculation
| * Make limit on scroll-margin variableNoam Postavsky2017-02-021-0/+1
| | | | | | | | | | | | | | | | | | | | * 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).
* | (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).
* * 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.
* 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-021-5/+67
| | | | | | | | | | | | | * 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-021-7/+40
| | | | | | | | | | | | | 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.
* Allow C++ nested brace-list-entries to be better indented.Alan Mackenzie2017-02-014-30/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>.
* 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).
* Handle patch terminators produced by git and bzr patch exportDima Kogan2017-01-311-9/+17
| | | | | | | Patch by Juri Linkov posted in the #9597 bug report * lisp/vc/diff-mode.el (diff-sanity-check-hunk): Find and ignore terminator (Bug #9597, #5302)
* Revert two accidental commitsDima Kogan2017-01-313-62/+5
| | | | | This reverts commit f3c77d11af65f3b319b1784b4c3cf08c51aa7997. This reverts commit 3c941b900007c9e79c00af0f21d88154f6d8af1a.
* stashDima Kogan2017-01-303-1/+61
|
* comint-get-old-input-default: behavior follows docstringDima Kogan2017-01-301-4/+1
| | | | | | lisp/comint.el (comint-get-old-input-default): Modify behavior to follow docstring: if `comint-use-prompt-regexp' is nil, then return the CURRENT LINE, if point is on an output field.
* css-mode documentation lookup featureTom Tromey2017-01-301-0/+114
| | | | | | | | | | | | * etc/NEWS: Mention new feature. * lisp/textmodes/css-mode.el (css-mode-map): New defvar. (css--mdn-lookup-history): New defvar. (css-lookup-url-format): New defcustom. (css--mdn-property-regexp, css--mdn-completion-list): New defconsts. (css--mdn-after-render, css--mdn-find-symbol, css-lookup-symbol): New defuns. * test/lisp/textmodes/css-mode-tests.el (css-mdn-symbol-guessing): New test.
* edt-mapper: just loading a library should not run codeGlenn Morris2017-01-302-268/+265
| | | | | | | * lisp/emulation/edt-mapper.el (edt-mapper): New function, containing code previously at top-level. * lisp/emulation/edt.el (edt-load-keys): After loading edt-mapper, run edt-mapper function.
* mh-compat.el: remove duplicate definitionGlenn Morris2017-01-301-10/+0
| | | | | * lisp/mh-e/mh-compat.el (mh-make-obsolete-variable): Remove duplicate definition.
* * lisp/indent.el (indent-region-line-by-line): New function.Stefan Monnier2017-01-301-15/+17
| | | | | Extracted from indent-region. (indent-region, indent-region-function): Use it.
* * lisp/subr.el (string-make-unibyte, string-make-multibyte): Obsolete.Stefan Monnier2017-01-301-0/+2
|
* Escape dash in xref rgrep regexpDmitry Gutov2017-01-291-0/+4
| | | | | * lisp/progmodes/xref.el (xref-collect-matches): Escape dash in REGEXP if it's the first character.
* Say JavaScript, not JavascriptDmitry Gutov2017-01-291-7/+7
| | | | | | | * lisp/progmodes/js.el (js-mode-map, js-syntax-propertize) (js-js-error, js-eval, js-set-js-context) (js--get-js-context): Refer to the language consistently as JavaScript.
* lisp/*.el: Fix some warningsJuanma Barranquero2017-01-295-5/+10
| | | | | | | | | | | | | * lisp/battery.el (dbus-get-property): * lisp/dired-aux.el (format-spec): Declare function. * lisp/net/zeroconf.el (zeroconf-list-service-names) (zeroconf-list-service-types, zeroconf-list-services): Mark unused lexical arg. * lisp/progmodes/hideshow.el (hs-hide-block-at-point): * lisp/progmodes/sql.el (sql-end-of-statement): Pass LIMIT to 'looking-back'.
* Don't warn about obsolete defgenerics when defining themNoam Postavsky2017-01-291-7/+8
| | | | | * lisp/emacs-lisp/cl-generic.el (cl-defgeneric): The declaration code should run after the definition code (Bug#25556).
* Fix Bug#25524Tino Calancha2017-01-291-2/+4
| | | | | | * lisp/vc/diff-mode.el (diff-beginning-of-hunk): Return position at the beginning off the hunk. (diff-file-junk-re): Add SVN keywords.
* hl-line.el: Don't try to operate on a killed bufferStephen Berman2017-01-281-1/+2
| | | | | * lisp/hl-line.el (hl-line-maybe-unhighlight): Examine only live buffers (bug#25522).
* Use access-file in EWW to check before downloading a fileMark Oteiza2017-01-281-0/+1
| | | | | | | | * lisp/net/eww.el (eww-download): Check accessibility of eww-download-directory to prevent starting a download that will fail to write. * src/fileio.c (Faccess_file): Clarify the use of string argument in the docstring.
* Subject: Check Bcc after the Messag hook has runYuri D'Elia2017-01-281-1/+1
| | | | | | * lisp/gnus/message.el (message-send): If the hook modifies the message (mml tags or headers), we should check bcc on the final message, not on the original.
* Fix a couple eww customization typesMark Oteiza2017-01-271-2/+2
| | | | | * lisp/new/eww.el (eww-download-directory, eww-bookmarks-directory): Change customization type to "directory".
* Don't require a shell when loading htmlfontifyPhilipp Stephani2017-01-271-3/+9
| | | | | | | * lisp/htmlfontify.el (hfy-which-etags): Don't call a shell for detecting the etags version (Bug#25468). * test/lisp/htmlfontify-tests.el (htmlfontify-bug25468): Add unit test.
* Add \citetitle to biblatex cite formatArash Esbati2017-01-271-0/+2
| | | | | | | * lisp/textmodes/reftex-vars.el (reftex-cite-format-builtin): Add \citetitle[*] to `reftex-cite-format' and bind them to keys i/I per user request http://lists.gnu.org/archive/html/auctex/2017-01/msg00049.html.
* Fix charsets and encodings from non-file MIME partsLars Ingebrigtsen2017-01-271-19/+26
| | | | | * lisp/gnus/mml.el (mml-generate-mime-1): Get the charsets and encoding right for parts that do not originate from files.
* Fix 'describe-variable' for longish variable valuesEli Zaretskii2017-01-271-1/+1
| | | | | * lisp/help-fns.el (describe-variable): Don't accidentally remove the last character of a variable's value. (Bug#25545)
* Ensure last line is at window bottom in shell buffersEli Zaretskii2017-01-271-5/+8
| | | | | | | * lisp/shell.el (shell-mode): Use setq-local. Set scroll-conservatively to 101 locally. See the discussion at http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00736.html for the reasons.
* Support Bash Ctrl-Z indication of directory name in term.elMichael Hoffman2017-01-271-7/+8
| | | | | | | * term.el (term-emulate-terminal): Do not display ?\032 escape codes even when 'handled-ansi-message' is non-nil. (Bug#11919) Copyright-paperwork-exempt: yes
* python-mode: Fix detection for opening blocks.Hong Xu2017-01-261-2/+18
| | | | | | | | | * python.el (python-info-dedenter-opening-block-positions): There can't be any back-indented lines between an opening block and the current line. * python-tests.el (python-indent-electric-colon-4): Add an indent test case where there is one-more indented previous opening block.
* Fix Message check for bogus domain namesLars Ingebrigtsen2017-01-271-1/+1
| | | | | * lisp/gnus/message.el (message-make-fqdn): Fix check for bogus system names (bug#24570).
* Subject: Restore correct Gnus newsgroup name after sending messageØyvind Stegard2017-01-271-1/+2
| | | | | | | * lisp/gnus/gnus-msg.el (gnus-msg-mail): Set the value of gnus-newsgroup-name in the correct buffer (bug#24329). Copyright-paperwork-exempt: yes
* Don't try to find charsets of non-text MIME partsLars Ingebrigtsen2017-01-271-5/+1
| | | | | | | | * lisp/gnus/mml.el (mml-generate-mime-1): It seems nonsensical to try to determine the charset of non-text message parts, so skip that (bug#24190). This will also remove messages like "bunzip2ing /tmp/acsb.cpio.bz2...done" while sending messages if you include such files.