summaryrefslogtreecommitdiff
path: root/lisp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add XDG desktop file parsing and testsMark Oteiza2017-09-061-7/+66
| | | | | | | | | | | * lisp/xdg.el: Add support for Desktop Entry Specification. (xdg--user-dirs-parse-line): Check if file is readable. (xdg-desktop-group-regexp, xdg-desktop-entry-regexp): New variables. (xdg--desktop-parse-line, xdg-desktop-read-file, xdg-desktop-strings): New functions. * test/lisp/xdg-tests.el: * test/data/xdg/test.desktop: * test/data/xdg/wrong.desktop: New files.
* ; Try not to affect match dataMark Oteiza2017-09-061-3/+4
| | | | * lisp/xdg.el (xdg-user-dir): Use save-match-data.
* ; * lisp/emacs-lisp/ert.el (ert-batch-backtrace-right-margin): Fix tag.Glenn Morris2017-09-051-1/+1
|
* Allow customizing line length of ert backtraces in batch modeGlenn Morris2017-09-051-12/+19
| | | | | | * lisp/emacs-lisp/ert.el (ert-batch-backtrace-right-margin): Make it a user option. (ert-run-tests-batch): Handle ert-batch-backtrace-right-margin nil.
* Refactor some loops in mailcap.elMark Oteiza2017-09-051-40/+32
| | | | | * lisp/net/mailcap.el (mailcap-mime-types): (mailcap-file-default-commands): Convert nested maps to loops.
* Handle non-zero exit status from psql more gracefullySimen Heggestøyl2017-09-051-3/+4
| | | | | | | | * lisp/progmodes/sql.el (sql-postgres-list-databases): Handle non-zero exit statuses from `psql -ltX' more gracefully by returning nil. * test/lisp/progmodes/sql-tests.el (sql-tests-postgres-list-databases-error): New test.
* Move soundex.el test to a proper testMark Oteiza2017-09-051-11/+2
| | | | | * test/lisp/soundex-tests.el: New file. * lisp/soundex.el: Use lexical-binding. Remove commented test.
* Work on Tramp's (symbolic) linksMichael Albinus2017-09-045-121/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/tramp.texi (Traces and Profiles): Mention the backtrace when tramp-verbose is greater than or equal to 10. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): Use `tramp-handle-add-name-to-file'. * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Use `tramp-handle-add-name-to-file' and `tramp-handle-file-truename'. * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link): Improve. * lisp/net/tramp-smb.el (tramp-smb-errors): Add "NT_STATUS_CONNECTION_DISCONNECTED" and "NT_STATUS_OBJECT_PATH_SYNTAX_BAD". (tramp-smb-file-name-handler-alist): Use `tramp-handle-file-truename'. (tramp-smb-do-file-attributes-with-stat): Return non-nil only if one of the attributes is non-nil. (tramp-smb-handle-file-local-copy): Use `file-truename'. (tramp-smb-handle-file-truename): Move to tramp.el. (tramp-smb-handle-insert-directory): Show symlinks. (tramp-smb-handle-make-symbolic-link): Improve. (tramp-smb-read-file-entry): Handle extended file modes in Samba. * lisp/net/tramp.el (tramp-handle-add-name-to-file) (tramp-handle-file-truename): New defuns. * test/lisp/net/tramp-tests.el (tramp-test21-file-links): Extend test. (tramp--test-check-files): Make check for "smb".
* Embed JSON readtable into json-readMark Oteiza2017-09-041-11/+11
| | | | | | | Also unroll dispatch into a cond. * lisp/json.el (json-readtable): Remove. (json-readtable-dispatch): New macro. Assimilate json-readtable. (json-read): Use the macro.
* Hexify strings in EWW search queriesMark Oteiza2017-09-031-1/+2
| | | | | | | | Previously, inputting "cats & dogs" would lose dogs because the ampersand signifies a query parameter. Instead, hexify each word while preserving quotes with split-string. * lisp/net/eww.el (eww--dwim-expand-url): Join hexified words together with + separators, instead of replacing whitespace with +.
* * lisp/simple.el (visual-line-mode): Doc fix. (Bug#28337)Eli Zaretskii2017-09-031-1/+1
|
* Correct the fontification of quote marks after buffer changes in CC Mode.Alan Mackenzie2017-09-032-83/+121
| | | | | | | | | | * lisp/progmodes/cc-defs.el (c-search-forward-char-property-with-value-on-char): New macro. * lisp/progmodes/cc-mode.el (c-parse-quotes-before-change) (c-parse-quotes-after-change): Rewrite the functions, simplifying considerably, and removing unnecessary optimisations. Invalidate two caches after manipulating text properties.
* Fix fontification of "operator~" in C++ Mode.Alan Mackenzie2017-09-032-1/+24
| | | | | | | | | * lisp/progmodes/cc-langs.el (c-ambiguous-overloadable-or-identifier-prefices) (c-ambiguous-overloadable-or-identifier-prefix-re): New c-lang-defconsts/vars. * lisp/progmodes/cc-engine.el (c-forward-name): Do not try to parse "~" (and two other symbols) as a cast without good evidence. Prefer an overloaded operator in ambiguous cases.
* Fix decrypting in plstore.el on MS-WindowsEli Zaretskii2017-09-021-1/+2
| | | | | | * lisp/plstore.el (plstore-open): Bind coding-system-for-read to raw-text, instead of using insert-file-contents-literally. (Bug#28114)
* Turn off checkdoc complaint about default argument orderMark Oteiza2017-09-011-1/+2
| | | | | | * etc/NEWS: Mention change. * lisp/emacs-lisp/checkdoc.el (checkdoc-arguments-in-order-flag): Disable by default, note version.
* * lisp/obsolete/html2text.el: Don't require CLStefan Monnier2017-09-011-3/+1
| | | | (html2text-clean-anchor): Mark unused arg.
* ; Auto-commit of loaddefs files.Glenn Morris2017-09-011-35/+83
|
* Don't remove undisplayers from inlined MIME parts (bugfix)Katsumi Yamaoka2017-09-011-19/+3
| | | | | | * lisp/gnus/gnus-art.el (gnus-mime-buttonize-attachments-in-header): Don't remove undisplayers from inlined MIME parts (bugfix); Simplify criterion that finds attachments.
* ; Escape some character literalsMark Oteiza2017-08-311-3/+3
| | | | * lisp/leim/quail/latin-ltx.el: Escape some fancy brackets.
* Make ucs-names a hash table (Bug#28302)Mark Oteiza2017-08-313-39/+40
| | | | | | | | | | | | | | * etc/NEWS: Mention the type change. * lisp/descr-text.el (describe-char): Use gethash to access ucs-names. Hardcode BEL's name into the function instead of needlessly mapping over the hash table in the spirit of rassoc. * lisp/international/mule-cmds.el (ucs-names): Fix variable and function docstrings. Initialize a hash table for ucs-names--the number of entries is 42845 here. Switch to hash-table getters/setters. (mule--ucs-names-annotation): Use hash-table getter. (char-from-name): Upcase the string if ignore-case is truthy. * lisp/leim/quail/latin-ltx.el: Use maphash instead of dolist.
* Fix a glitch in CC Mode's syntactic whitespace cache.Alan Mackenzie2017-08-311-11/+4
| | | | | * lisp/progmodes/cc-engine.el (c-forward-sws): Deal correctly with a block comment close at the end of a macro.
* Correct the fontification of C++ Mode enclosed declarations.Alan Mackenzie2017-08-311-12/+10
| | | | | | * lisp/progmodes/cc-fonts.el (c-font-lock-enclosing-decls): abolish the spurious check that the character before the start of an enclosed declaration must be ; or }. It might also be {.
* Respect directory a user enters (bug#28299)Katsumi Yamaoka2017-08-311-6/+10
| | | | | * lisp/gnus/mm-decode.el (mm-save-part): Respect directory a user enters (bug#28299).
* Do not split line before width of fill-prefixSamuel Freilich2017-08-301-15/+12
| | | | | | | | | | When auto-filling a paragraph, don't split a line before the width of the fill-prefix, creating a subsequent line that is as long or longer (Bug#20774). * lisp/simple.el (do-auto-fill): Only consider break-points that are later in the line than the width of the fill-prefix. This is a more general solution than the previous logic, which only skipped over the exact fill-prefix. The fill-prefix doesn't necessarily match the prefix of the first line of a paragraph in adaptive-fill-mode.
* Support lazy loading for autogenerated usage docstrings too (Bug#27748)Noam Postavsky2017-08-301-1/+1
| | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-defmumble): Consider any documentation that ended up in code as a docstring (e.g., autogenerated (fn ARG1 ARG2) type things), not just what the user passed.
* Drop docstrings from cl-defsubst produced inline bodies (Bug#27748)Noam Postavsky2017-08-301-1/+2
| | | | | * lisp/emacs-lisp/cl-macs.el (cl-defsubst): Use macroexp-parse-progn to drop the docstring. Add a simple docstring to the compiler-macro.
* Quote file-truename symlink to "../foo:bar:"Paul Eggert2017-08-301-8/+8
| | | | | | Problem reported by Michael Albinus (Bug#28264#19). * lisp/files.el (files--splice-dirname-file): Fix bug where a relative symlink to "../foo:bar:" did not quote the result.
* * lisp/man.el (Man-softhyphen-to-minus): Avoid string-as-multibyte.Stefan Monnier2017-08-301-4/+1
|
* Correct "hide others" shortcut on macOS (bug#28215)Devon Sean McCullough2017-08-301-0/+2
| | | | | | * lisp/term/ns-win.el: Fix shortcut for ns-do-hide-others. Copyright-paperwork-exempt: yes
* Improve symlinks for TrampMichael Albinus2017-08-302-6/+15
| | | | | | | | | | | | | | * lisp/files.el (files--splice-dirname-file): Quote whole file. * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link): Do not expand TARGET, it could be remote. (tramp-sh-handle-file-truename): Check for cyclic symlink also in case of readlink. Quote result if it looks remote. (tramp-sh-handle-file-local-copy): Use `file-truename'. * test/lisp/net/tramp-tests.el (tramp-test08-file-local-copy) (tramp-test09-insert-file-contents): Test also file missing. (tramp-test21-file-links): Extend test.
* Use cl-print for all values printed by `describe-variable'Noam Postavsky2017-08-291-2/+8
| | | | | * lisp/help-fns.el (describe-variable): Use cl-prin1 for original and global values too.
* Minor simplification for byte-compile-constant-pushNoam Postavsky2017-08-291-5/+4
| | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-constant): Move the meat of the code from here... (byte-compile-constant-push): ... to here. No need to bind byte-compile--for-effect anymore.
* Prefer file-name-quote to concat "/:"Paul Eggert2017-08-291-3/+3
| | | | | | Suggested by Michael Albinus (Bug#28264#13). * lisp/files.el (files--splice-dirname-file): Use file-name-quote rather than attempting to do it by hand.
* * lisp/progmodes/sh-script.el: Test "in-string" of the right char!Stefan Monnier2017-08-291-1/+1
| | | | | (sh-syntax-propertize-function): Fix off-by-one error. Fixes bug#23526.
* Update Org to v9.0.10Rasmus2017-08-2925-556/+619
| | | | | Please see etc/ORG-NEWS for major changes. Note, this is a bugfix release.
* Silence false alarms for symlinks to sourcesPaul Eggert2017-08-281-8/+18
| | | | | | Problem reported by Glenn Morris (Bug#28264). * lisp/files.el (files--splice-dirname-file): New function. (file-truename, file-chase-links): Use it.
* Further fixes in tramp-smb.elMichael Albinus2017-08-281-3/+21
| | | | | | | | | | | * lisp/net/tramp-smb.el (tramp-smb-handle-file-truename): New defun. (tramp-smb-file-name-handler-alist): Use it. (tramp-smb-handle-make-symbolic-link): Unquote target. * test/lisp/net/tramp-tests.el (tramp--test-ignore-make-symbolic-link-error): New defmacro. (tramp-test18-file-attributes, tramp-test21-file-links) (tramp--test-check-files): Use it.
* ; Fix last ido patchMichael Albinus2017-08-281-1/+1
|
* Use string-match to check for dotfiles in idoRobert Pluim2017-08-281-1/+1
| | | | | | | | * lisp/ido.el (ido-make-file-list): Use string-match to check for dotfiles instead of substring, as when using tramp simplified syntax ido-temp-list may contain empty strings. Copyright-paperwork-exempt: yes
* Font-lock FDO desktop files correctlyMark Oteiza2017-08-272-11/+24
| | | | | | | | | | | | | Single and double quotes do not have a special meaning in desktop files. https://standards.freedesktop.org/desktop-entry-spec/latest/ * etc/NEWS: Mention new mode. * lisp/files.el (auto-mode-alist): Split out an entry for handling the .desktop extension with conf-desktop-mode. * lisp/textmodes/conf-mode.el (conf-desktop-font-lock-keywords): New variable with rules for booleans and format specifiers. (conf-unix-mode): Remove desktop file entry example from docstring. (conf-desktop-mode): New derived major mode.
* Fix auto-fill bug in js-modeTom Tromey2017-08-271-0/+5
| | | | | | | * lisp/progmodes/js.el (js-do-auto-fill): New function. (js-mode): Set normal-auto-fill-function. * test/lisp/progmodes/js-tests.el (js-mode-fill-comment-bug): New test.
* Disable completion while entering python multiline statementsNoam Postavsky2017-08-271-1/+15
| | | | | | | | | | | The "legacy" completion mechanism sends newlines to the running python process to get the list of completions, which confuses things if the user is in the middle of entering a multiline statement (Bug#28051). It's better to disable completion in this case. * lisp/progmodes/python.el (python-shell--block-prompt): New variable. (python-shell-prompt-set-calculated-regexps): Set it. (python-shell-completion-at-point): Return 'ignore' as the completion function when the current prompt is a block prompt.
* Tramp cleanupMichael Albinus2017-08-273-53/+53
| | | | | | | | | | | | | | | | * lisp/net/tramp-sh.el (tramp-sh-extra-args): Remove compat code. (tramp-sh-handle-make-symbolic-link): More robust check for TARGET remoteness. * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory): Disable copying by tar temporarily, it doesn't work reliably. (tramp-smb-do-file-attributes-with-stat): Resolve symlink. (tramp-smb-handle-make-symbolic-link): Fix implementation. * lisp/net/tramp.el (tramp-handle-file-symlink-p): Simplify. * test/lisp/net/tramp-tests.el (tramp-test21-file-links): Extend test.
* Always use gtk_window_move in new versionsPhilipp Stephani2017-08-271-0/+2
| | | | | | | | | | | * src/gtkutil.c (my_log_handler): Don’t define in new versions of GTK+. (xg_set_geometry): Always use gtk_window_move in new versions of GTK+. * src/xterm.c (syms_of_xterm): Document that x-gtk-use-window-move is ignored. * lisp/subr.el (x-gtk-use-window-move): Make obsolete.
* Fix 'diff-goto-source' when buffer is narrowed (Bug#21262)Charles A. Roelli2017-08-271-45/+47
| | | | | | | | * lisp/vc/diff-mode.el (diff-find-file-name): Save the current narrowing, and widen the buffer before searching for the name of the file corresponding to the diff. With thanks to Noam Postavsky.
* Amend the CC Mode macro cache to cope with changes at the macro startAlan Mackenzie2017-08-271-1/+1
| | | | | | | Fixes bug #28233. * lisp/progmodes/cc-engine.el (c-invalidate-macro-cache): Fix an off-by-1 error.
* Fix over-protection of byte-compiled filesPaul Eggert2017-08-262-1/+12
| | | | | | | | | | Problem reported by Sven Joachim (Bug#28244). Also, fix similar problem for autoload files. * lisp/emacs-lisp/autoload.el (autoload--save-buffer): Set temp file modes to the buffer-file-name file modes (or 666 if not available) as adjusted by umask. * lisp/emacs-lisp/bytecomp.el (byte-compile-file): Set temp file modes to 666 as adjusted by umask.
* Refine conf-toml-mode font-lockTom Tromey2017-08-261-2/+28
| | | | | | | Bug#28218 * lisp/textmodes/conf-mode.el (conf-toml-font-lock-keywords): Use conf-toml-recognize-section. Use \s- in variable regexp. (conf-toml-recognize-section): New function.
* Do not munge contents of local symbolic linksPaul Eggert2017-08-262-14/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | This lets Emacs deal with arbitrary local symlinks without mishandling their contents (Bug#28156). For example, (progn (shell-command "ln -fs '~' 'x'") (rename-file "x" "/tmp/x")) now consistently creates a symbolic link from '/tmp/x' to '~'. Formerly, it did that only if the working directory was on the same filesystem as /tmp; otherwise, it expanded the '~' to the user's home directory. * lisp/dired.el (dired-get-filename): Use files--name-absolute-system-p instead of rolling our own code. * lisp/files.el (files--name-absolute-system-p): New function. (file-truename, file-chase-links): Use it to avoid mishandling symlink contents that begin with ~. (copy-directory, move-file-to-trash): Use concat rather than expand-file-name, to avoid mishandling symlink contents that begin with ~. * src/fileio.c (Fmake_symbolic_link): Do not expand leading "~" in the target unless interactive. Strip leading "/:" if interactive. (emacs_readlinkat): Do not prepend "/:" to the link target if it starts with "/" and contains ":" before NUL. * test/src/fileio-tests.el (try-link): Rename from try-char, and accept a string instead of a char. All uses changed. (fileio-tests--symlink-failure): Also test leading ~, and "/:", to test the new behavior.
* Remove invalid regexp for shell builtins for wkshReuben Thomas2017-08-271-3/+1
| | | | | | * lisp/progmodes/sh-script.el (sh-builtins): Shell built-ins have to be literal strings, so remove a regexp for wksh. In any case, it’s a defunct proprietary shell.