summaryrefslogtreecommitdiff
path: root/lisp
Commit message (Collapse)AuthorAgeFilesLines
* ; Tramp cleanupMichael Albinus2019-01-297-30/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection): Handle `non-essential'. * lisp/net/tramp-archive.el: Increase `max-specpdl-size' when loading tramp-gvfs. * lisp/net/tramp-rclone.el (tramp-rclone-mounted-p): Reorder for better traces. (tramp-rclone-maybe-open-connection): Handle `non-essential'. * lisp/net/tramp-sh.el (tramp-sh-handle-copy-directory) (tramp-find-inline-encoding): Simplify check. * lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory) (tramp-smb-handle-insert-directory): Simplify check. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-action-sudo): Simplify check. (tramp-sudoedit-maybe-open-connection): Handle `non-essential'. * lisp/net/tramp.el (tramp-handle-load, tramp-wait-for-regexp): Simplify check. (tramp-action-login, tramp-action-password, tramp-action-yesno) (tramp-action-yn, tramp-action-terminal): Return explicitly t. (tramp-process-one-action, tramp-process-actions): Adapt docstring.
* Small fixesJuri Linkov2019-01-282-0/+3
| | | | | | | | * lisp/generic-x.el (etc-passwd-generic-mode): Add comment. (Bug#34225) * lisp/vc/diff-mode.el (diff-syntax-fontify-hunk): Set overlay property 'diff-mode to 'syntax. (Bug#33567) (diff-syntax-fontify-props): Reset buffer-file-name to nil.
* More checks for live buffers.Juri Linkov2019-01-282-3/+5
| | | | | | | | * lisp/dired-x.el (dired-jump): Check if archive/tar superior buffer was killed by the user. * lisp/progmodes/ruby-mode.el (ruby-flymake--helper): Check if source buffer was killed by the user immediately after visiting and before process finishes.
* * lisp/generic-x.el (etc-passwd-generic-mode): Support backups of passwd,Juri Linkov2019-01-281-1/+1
| | | | group and shadow /etc files. (Bug#34225)
* Adapt accept-process-output timeouts in TrampMichael Albinus2019-01-287-29/+21
| | | | | | | | | | | | | | | * lisp/net/tramp.el (tramp-accept-process-output): Make timeout optional. Do not set explicit timer. (tramp-action-out-of-band, tramp-process-one-action) (tramp-wait-for-regexp, tramp-interrupt-process): * lisp/net/tramp-adb.el (tramp-adb-parse-device-names): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch): * lisp/net/tramp-rclone.el (tramp-rclone-parse-device-names): * lisp/net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch): * lisp/net/tramp-smb.el (tramp-smb-action-get-acl) (tramp-smb-action-set-acl, tramp-smb-wait-for-output): * tramp-sudoedit.el (tramp-sudoedit-action-sudo): Adapt `accept-process-output' calls wrt timeouts.
* Detect when we hit limit in backward search in c-just-after-func-arglist-pAlan Mackenzie2019-01-281-12/+39
| | | | | | | | | | | | This fixes a bug reported by Yasushi SHOJI <yasushi.shoji@gmail.com> to emacs-devel on 2018-11-26, where wrong analysis and fontification occurred. * lisp/progmodes/cc-engine.el (c-beginning-of-statement-1): Add new parameter HIT-LIM which, if non-nil causes the function to return nil rather than 'same when we reach the backward search limit without finding the beginning of statement. (c-just-after-func-arglist-p): Supply argument t to this new parameter in call to c-beginning-of-statement-1.
* * lisp/loadup.el (load-file-name): Set back to nilStefan Monnier2019-01-251-0/+4
|
* Adjust previous electric.el and elec-pair.el changeJoão Távora2019-01-252-10/+28
| | | | | | | | | | | | | | | | | | | | | | This fixes a serious bug introduced previously electric-pair-inhibit-if-helps-balance and electric-pair-skip-if-helps-balance, whereby "innocent" markers were being pushed by those function's new save-change-and-restore semantics. The fix can probably still be improved. It also adds comments to parts of the code, where deemed necessary. * lisp/elec-pair.el (electric-pair--insert): Add comment. (electric-pair--save-literal-point-excursion): New helper macro. (electric-pair-inhibit-if-helps-balance) (electric-pair-skip-if-helps-balance): Don't use insert-before-markers since it may hurt other markers that have nothing to do with the 'save-excursion'. (electric-pair-post-self-insert-function): Use electric-pair--save-literal-point-excursion. * lisp/electric.el (electric-indent-post-self-insert-function): Remove lexical variable.
* Use minibuffer-default in completion-all-sorted-completions (bug#34083)João Távora2019-01-251-4/+8
| | | | | * lisp/minibuffer (completion-all-sorted-completions): Sort with the default on top.
* Make tabulated-list-mode-map inherit from special-mode-mapAlex Branham2019-01-251-2/+4
| | | | | | | * lisp/emacs-lisp/tabulated-list.el (tabulated-list-mode-map): Use 'make-composed-keymap'. Bug #30452
* image-mode: Make parameters buffer-localBenjamin Riefenstahl2019-01-251-3/+3
| | | | | | | | Image parameters were treated as image specific, but because they actually were global variables, their behaviour transfered to new images. * lisp/image-mode.el (image-transform-resize, image-transform-scale) (image-transform-rotation): Declare with defvar-local. (Bug#33990)
* Some fixes in tramp-smb.elMichael Albinus2019-01-241-15/+30
| | | | | | | | * lisp/net/tramp-smb.el (tramp-smb-errors): Add "NT_STATUS_NOT_A_DIRECTORY". (tramp-smb-maybe-open-connection): Respect ´non-essential'. Do not record smbserver-version. (tramp-smb-wait-for-output): Improve reading pending output.
* Avoid byte-compiler warning in starttls.elEli Zaretskii2019-01-241-0/+1
| | | | | * lisp/net/network-stream.el (starttls-open-stream): Declare to avoid compilation warning.
* Check for client certificates when using GnuTLSRobert Pluim2019-01-242-17/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes Bug#33780, and extends the documentation to describe how to enable use of client certificates. * lisp/net/network-stream.el (network-stream-certificate): Correct order of parameters to plist-get. (network-stream-open-tls): Pass all received parameters to open-gnutls-stream as plist, not just :nowait. * lisp/net/gnutls.el (open-gnutls-stream): Change optional nowait arg to be plist. Derive nowait and client certificate(s) and keys(s) from plist (maybe via auth-source) and pass to gnutls-boot-parameters and gnutls-negotiate. (network-stream-certificate): Add declare-function form for it. * doc/misc/auth.texi (Help for users): Describe format to use for client key/cert specification. * doc/misc/emacs-gnutls.texi (Help For Developers): Describe usage of optional plist argument. Add crossreference to description of .authinfo format for client key/cert specification. * etc/NEWS: Describe new client certificate functionality for 'open-network-stream'. * test/lisp/net/network-stream-tests.el: Add require of network-stream. (connect-to-tls-ipv4-nowait): Bind network-security-level to 'low in order to bypass nsm prompting. (connect-to-tls-ipv6-nowait): Likewise. (open-network-stream-tls-wait): New test. (open-network-stream-tls-nowait): New test. (open-network-stream-tls): New test. (open-network-stream-tls-nocert): New test. (open-gnutls-stream-new-api-default): New test. (open-gnutls-stream-new-api-wait): New test. (open-gnutls-stream-old-api-wait): New test. (open-gnutls-stream-new-api-nowait): New test. (open-gnutls-stream-old-api-nowait): New test. (open-gnutls-stream-new-api-errors): New test. The new tests exercise 'open-network-stream' and the old and new api of 'open-gnutls-stream'.
* Fix error in Tramp's encoding checkMichael Albinus2019-01-241-1/+1
| | | | | * lisp/net/tramp-sh.el (tramp-find-inline-encoding): Use `tramp-get-connection-buffer'.
* doc-view-presentation, doc-view-fit-window-to-page, and use mutoolStefan Monnier2019-01-231-47/+151
| | | | | | | | | | | | | | | | | * lisp/doc-view.el (doc-view-pdfdraw-program): Use "mutool" if available. (doc-view-mode-map): Keep default 'g' binding of 'revert-buffer'. Change 'r' binding to 'revert-buffer'. (doc-view-revert-buffer): Make it an obsolete alias. (doc-view--revert-buffer): Rename from doc-view-revert-buffer, change calling convention for use in add-function. (doc-view-fit-window-to-page): New command. (doc-view-pdf->png-converter-mupdf): Make it work with "mutool". (doc-view-mode): Use add-function for revert-buffer-function. (doc-view-presentation-mode-map, doc-view-presentation--src-data): New vars. (doc-view-presentation-exit, doc-view-presentation-mode) (doc-view-presentation--propagate-pn, doc-view-presentation): New functions.
* Rework last commit to icomplete and minibuffer.el.Stefan Monnier2019-01-232-55/+50
| | | | | | | | | | | | | | | Rather than let minibuffer-force-complete set up cycling and then undoing it, better tell it directly not to setup cycling. Also be a bit more careful to remove the transient map. Additionally to bug#34077 and bug#34116, this also relates to bug#25644. * lisp/minibuffer.el (completion--flush-all-sorted-completions): Also take down the transient cycling map if applicable. (minibuffer-force-complete): New arg dont-cycle. Set completion-cycling to the actual function that takes down the transient map rather than just t. (minibuffer-force-complete-and-exit): * lisp/icomplete.el (icomplete-force-complete): Use new dont-cycle arg.
* Force completion in icomplete with C-M-i, but don't cycle (bug#34077)João Távora2019-01-231-1/+16
| | | | | | | | | | | | | | | | | | | | Cycling after forcing a completion with C-M-i in icomplete can be confusing, as it leaves rotated prospects in the minibuffer. In C-x C-f, for example it is very difficult to understand if the prospects refer to subdirectories of the directory being completed to, which happens naturally when the completion is unique; or if they are a cycled version of prospects that match the new completion pattern, in case the completion happens to still match other items. To resolve this confusion, never cycle with C-M-i in icomplete: non-ambiguous cycling can be achieved with C-. and C-, The former behaviour can still be restored with: (define-key icomplete-minibuffer-map (kbd "C-M-i") 'minibuffer-force-complete) * lisp/icomplete.el (icomplete-force-complete): New command. (icomplete-minibuffer-map): Bind C-M-i to icomplete-force-complete.
* Avoid cycling in minibuffer-force-complete-and-exit (bug#34116)João Távora2019-01-231-1/+7
| | | | | * lisp/minibuffer.el (minibuffer-force-complete-and-exit): Check completion-cycling before minibuffer-force-complete.
* * lisp/net/tramp.el (tramp-set-file-uid-gid): Fix thinko.Michael Albinus2019-01-231-3/+5
| | | | | * test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case): Adapt docstring.
* * lisp/emacs-lisp/package.el (package--alist): NewStefan Monnier2019-01-221-19/+18
| | | | | | | | | (package-activate-all): Use it so we only initialize the local part of package.el (this reduces the impact of bug#24467 and speeds up startup). (package-installed-p): Use it so it works even if package is not fully initialized. (package-delete): Use it so we only initialize the local part of package.el.
* Add hook for all eventsPhillip Lord2019-01-221-0/+6
| | | | | * lisp/subr.el (input-event-functions): Add input-event-functions * src/keyboard.c (read_char): Call input-event-functions on all hooks
* electric-layout-mode kicks in before electric-pair-modeJoão Távora2019-01-222-33/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This aims to solve problems with indentation. Previously in, say, a js-mode buffer with electric-layout-rules set to (?\{ before after) (?\} before) would produce an intended: function () { <indented point> } The initial state function () { Would go immediately to the following by e-p-m function () {} Only then would e-l-m be applied to } first, and then again to {. This makes lines indent in the wrong order, which can be a problem in some modes. The way we fix this is by reversing the order of e-p-m and e-l-m in the post-self-insert-hook (and also fixing a number of details that this uncovered). In the end this changes the sequence from function () { By way of e-l-m becomes: function () <newline> { <newline> The e-p-m inserts the pair function () <newline> { <newline>} And then e-l-m kicks in for the pair again, yielding the desired result function () <newline> { <indented point> } * lisp/elec-pair.el (electric-pair--insert): Bind electric-layout-no-duplicate-newlines. (electric-pair-inhibit-if-helps-balance) (electric-pair-skip-if-helps-balance): Use insert-before-markers, playing nice with save-excurion. (electric-pair-post-self-insert-function): Go to correct position before checking electric-pair-inhibit-predicate and electric-pair-skip-self predicate. (electric-pair-post-self-insert-function): Increase priority to 50. * lisp/electric.el (electric-indent-post-self-insert-function): Delete trailing space in reindented line only if line was really reindented. Rewrite comment. (electric-layout-allow-duplicate-newlines): New variable. (electric-layout-post-self-insert-function-1): Rewrite comments. Honours electric-layout-allow-duplicate-newlines. Don't reindent previous line because racecar. * test/lisp/electric-tests.el: New test. (plainer-c-mode): Move up. (electric-modes-int-main-allman-style) (electric-layout-int-main-kernel-style): Simplify electric-layout-rules. (electric-layout-for-c-style-du-jour): New helper. (electric-layout-plainer-c-mode-use-c-style): New test.
* Extend electric-pair-mode actions to < and >, and also to ( and ) in literalsAlan Mackenzie2019-01-223-41/+86
| | | | | | | | | | | | | * lisp/progmodes/cc-cmds.el (c-electric-lt-gt): Actuate electric-pair-mode if a < or > is typed in a context where this is meaningful (#include, or template). (c-electric-paren): Allow electric-pair-mode activity in a comment or string. * lisp/progmodes/cc-defs.el (c-make-keywords-re): Fix a bug where lists of source symbols could get overwritten when parameter adorn is set to 'appendable. * list/progmodes/cc-langs.el (c-cpp-include-key): New lang const and var.
* Revert "Fix electric-pair-tests by disabling bug#33794's fix with a variable"Alan Mackenzie2019-01-221-56/+40
| | | | This reverts commit be505726b68d407a44fdcd9c7ac1ef722398532d.
* Respect setgid bit of the upper directory in TrampMichael Albinus2019-01-224-35/+31
| | | | | | | | | | | | | | * doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.4.2-pre". * lisp/net/tramp.el: Bump version to 2.4.2-pre. (tramp-set-file-uid-gid): Respect setgid bit of the upper directory. (tramp-default-file-modes, tramp-handle-insert-file-contents) (tramp-mode-string-to-int, tramp-make-tramp-temp-file): * lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region): * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-directly) (tramp-sh-handle-write-region): Use octal constants.
* * lisp/international/titdic-cnv.el: Use lexical-bindingStefan Monnier2019-01-211-26/+23
| | | | | | | | | | | | (tit-process-body): Remove unused vars 'template' and 'second'. (tsang-quick-converter): Remove unused args 'name' and 'title'. Remove unused var 'slot'. (tsang-b5-converter, quick-b5-converter, tsang-cns-converter) (quick-cns-converter, py-converter, ziranma-converter) (ctlau-converter, ctlau-gb-converter, ctlau-b5-converter): Remove unused args 'name' and 'title'. (miscdic-convert): Remove unused var 'dicbuf'. Don't pass 'name' and 'title' to the conversion function.
* * lisp/electric.el: Fix typo in last change.Stefan Monnier2019-01-211-2/+2
|
* (electric--sort-post-self-insertion-hook): Accept non-symbol functionsStefan Monnier2019-01-211-2/+2
| | | | | * lisp/electric.el (electric--sort-post-self-insertion-hook): Don't burp on non-symbol functions.
* * lisp/net/tramp-sh.el (tramp-set-remote-path): Fix usage of tmpfile.Michael Albinus2019-01-211-2/+4
|
* Use `inhibit-read-only' in TrampMichael Albinus2019-01-214-10/+11
| | | | | | | | | | | * lisp/net/tramp.el (tramp-process-actions, tramp-accept-process-output) (tramp-send-string): * lisp/net/tramp-adb.el (tramp-adb-handle-make-process) (tramp-adb-send-command-and-check, tramp-adb-wait-for-output): * lisp/net/tramp-sh.el (tramp-sh-handle-make-process) (tramp-wait-for-output, tramp-send-command-and-check): * lisp/net/tramp-smb.el (tramp-smb-wait-for-output): Use `inhibit-read-only'.
* Use POSIX "df" in Tramp, if availableMichael Albinus2019-01-201-14/+30
| | | | | | * lisp/net/tramp-sh.el (tramp-get-remote-df): Support also POSIX.1 "df". (tramp-sh-handle-file-system-info): Adapt accordingly.
* ; Update the commentaryDmitry Gutov2019-01-191-5/+3
|
* Misc ignore-related project.el changesDmitry Gutov2019-01-191-3/+8
| | | | | | | | | * lisp/progmodes/project.el (project-ignores): Don't append the default ignores list, just use vc-directory-exclusion-list. (project--dir-ignores): Use the default ignores if the dir is outside of the current project. (project-files): Use project--dir-ignores to support external roots better.
* Revert "Remove leftover from previous electric-layout-rules API"João Távora2019-01-181-0/+1
| | | | | | | This is a backward-incompatible change, and removing it isn't really necessary. This reverts commit 942dad2b519cabddf6caea7641517507dc06944b.
* (electric-layout-post-self-insert-function-1): Simplify.Stefan Monnier2019-01-181-17/+12
| | | | | Call electric--after-char-pos right from the start, and take advantage of the fact that it guarantees to return the right position or nil.
* Ensure fns in electric-layout-rules are called in right positionJoão Távora2019-01-181-3/+7
| | | | | * lisp/electric.el (electric-layout-rules): Ensure rules are called from right spot.
* Remove leftover from previous electric-layout-rules APIJoão Távora2019-01-181-1/+0
| | | | | | | | An element of electric-layout-rules is either a function or a pair (CHAR . WHERE), and WHERE can't be a function anymore. * lisp/electric.el (electric-layout-post-self-insert-function-1): Remove leftover line.
* Merge from origin/emacs-26Glenn Morris2019-01-188-23/+40
|\ | | | | | | | | | | | | | | | | | | | | | | | | b6d78a0 (origin/emacs-26) Fix a typo in ELisp manual c9f6f86 Prevent redrawing if frame is garbaged 00ba226 Attempt to fix hangs on MS-Windows due to C-g b26d637 Fix Calc graph output on MS-Windows 03818b0 Fix a minor mistake in ELisp manual 6ac5985 ; Fix some trivial doc typos 21b9026 * etc/tutorials/TUTORIAL: Fix typo (bug#34049) d223727 Fix UI of Buffer-menu 0f71655 Reinitialize ispell-really-enchant when changing the speller 9845044 Speed up loading css-mode
| * Fix Calc graph output on MS-WindowsEli Zaretskii2019-01-132-15/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous code relied on "pgnuplot" executable, which is no longer provided with Gnuplot 5.x. * lisp/calc/calc.el (calc-gnuplot-name): Set to "pgnuplot" on MS-Windows only if such an executable exists. * lisp/calc/calc-graph.el (calc-graph-w32-p): New defsubst. (calc-graph-plot, calc-graph-command, calc-gnuplot-command) (calc-graph-init): Call calc-graph-w32-p wherever we need to do something special for invoking gnuplot on MS-Windows, instead of comparing against calc-gnuplot-name. (calc-graph-plot): Set the terminal to "qt" on MS-Windows when pgnuplot.exe is not available. (calc-graph-kill): Delete the temporary files only after killing the gnuplot process, otherwise the deletion might fail on MS-Windows because the files are still in use.
| * ; Fix some trivial doc typosGlenn Morris2019-01-124-4/+4
| |
| * Fix UI of Buffer-menuDevon Sean McCullough2019-01-121-4/+4
| | | | | | | | | | | | * lisp/buff-menu.el (Buffer-menu-execute): Don't remove entries of buffers whose killing the user didn't confirm. (Bug#33669)
| * Reinitialize ispell-really-enchant when changing the spellerPhilip K2019-01-121-0/+1
| | | | | | | | | | | | | | * lisp/textmodes/ispell.el (ispell-check-version): Reset also ispell-really-enchant. (Bug#34019) Copyright-paperwork-exempt: yes
| * Speed up loading css-modeLeo Liu2019-01-081-1/+0
| | | | | | | | | | lisp/textmodes/css-mode.el: Remove (require 'eww) which is redundant and slow. (Bug#33939)
* | Rebase project-find-regexp on top of project-filesDmitry Gutov2019-01-181-32/+107
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/project.el (project--files-in-directory): New function. (project-files, project-find-regexp): Use it. (project--dir-ignores): New function. (project--find-regexp-in): Remove. (project--process-file-region): New function. (project--find-regexp-in-files): New function. (project-find-regexp, project-or-external-find-regexp): Use it, and project-files as well.
* | ; Update the numberDmitry Gutov2019-01-181-1/+1
| |
* | Make 'project-files' the "canonical" generic of the twoDmitry Gutov2019-01-181-27/+21
| | | | | | | | | | | | * lisp/progmodes/project.el (project-files): Move the actual command building and invocation here. (project-file-completion-table): Delegate to 'project-files'.
* | * lisp/textmodes/sgml-mode.el: Try and fix bug#33887.Stefan Monnier2019-01-171-32/+28
| | | | | | | | | | Remove redundant :group args. (sgml-syntax-propertize-rules): Speed up processing of most double quotes.
* | Fix electric-pair-tests by disabling bug#33794's fix with a variableJoão Távora2019-01-171-40/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The variable c--disable-fix-of-bug-33794, which should be removed in the short term in favor of a permanent solution, is introduced. It is bound to nil by default. This means that breakage is still happening in actual c-mode and c++-mode usage, though the tests no longer show it. To get around this breakage, put (setq c--disable-fix-of-bug-33794 t) In your init file. Evidently, you will lose the fix for bug#33794, but that only affects a small corner case of c-toggle-auto-newline, which is not turned on by default. See https://lists.gnu.org/archive/html/emacs-devel/2019-01/msg00360.html for more information. * lisp/progmodes/cc-cmds.el (c--disable-fix-of-bug-33794): New variable. (c--with-post-self-insert-hook-maybe): New macro. (c-electric-pound, c-electric-brace, c-electric-slash) (c-electric-star, c-electric-semi&comma, c-electric-colon) (c-electric-lt-gt, c-electric-paren): Use it. (c-electric-paren, c-electric-brace): Check c--disable-fix-of-bug-33794. * test/lisp/electric-tests.el (c--disable-fix-of-bug-33794): Forward declare. (electric-pair-test-for) (electric-layout-int-main-kernel-style) (electric-modes-in-c-mode-with-self-insert-command): Use it.
* | Simplify ignored extensions filtering in Icomplete (bug#34070)João Távora2019-01-171-12/+22
| | | | | | | | | | | | * lisp/icomplete.el: Use lexical binding. (icomplete-completions): Use minibuffer-completion-predicate to filter out completion-ignored-extensions.