Michael Albinus [Fri, 5 Jan 2018 20:04:39 +0000 (21:04 +0100)]
Add new Tramp connection method "owncloud"
* doc/misc/tramp.texi (all): Use @acronym{GNOME} thoroughly.
(Using GNOME Online Accounts based methods): Rename from
"Using Google Drive". Add `owncloud'.
(GVFS based methods): Add `owncloud'.
* lisp/net/tramp-gvfs.el (tramp-gvfs-methods): Add "owncloud".
Remove goa methods if not supported.
(tramp-goa-methods, tramp-goa-service, tramp-goa-path)
(tramp-goa-path-accounts, tramp-goa-interface-documents)
(tramp-goa-interface-printers, tramp-goa-interface-files)
(tramp-goa-interface-contacts, tramp-goa-interface-calendar)
(tramp-goa-interface-oauth2based)
(tramp-goa-interface-account, tramp-goa-identity-regexp)
(tramp-goa-interface-mail, tramp-goa-interface-chat)
(tramp-goa-interface-photos, tramp-goa-path-manager)
(tramp-goa-interface-documents)
(tramp-gvfs-owncloud-default-prefix)
(tramp-gvfs-owncloud-default-prefix-regexp): New defconst.
(tramp-goa-name): New defstruct.
(tramp-gvfs-stringify-dbus-message): Handle all consp messages.
(tramp-dbus-function, tramp-gvfs-get-remote-prefix)
(tramp-get-goa-accounts): New defun.
(with-tramp-dbus-call-method): Use it.
(with-tramp-dbus-get-all-properties): New defmacro.
(tramp-gvfs-url-file-name)
(tramp-gvfs-handler-mounted-unmounted)
(tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec):
Map between "owncloud" and "davs".
(tramp-gvfs-maybe-open-connection): Set "vector" connection property.
* test/lisp/net/tramp-tests.el (tramp-gvfs-handler-askquestion):
Suppress run in tests.
(tramp--test-owncloud-p): New defun.
(tramp-test11-copy-file, tramp-test12-rename-file): Use it.
Jay Kamat [Fri, 22 Dec 2017 23:34:44 +0000 (15:34 -0800)]
Make eshell history expansion more like bash (Bug#29821)
- Prevent expansion of quick substitutions when the initial "^" is not
at start of line (Bug#29157).
- Allow spaces inside substitutions, so "^foo bar^baz" works.
- Allow trailing characters after substitution, so "^foo^bar^trailing"
works.
- Throw an error when substitution does not match.
* lisp/eshell/em-hist.el (eshell-expand-history-references): Expand
history substitution before other types of expansions, and expand them
with the whole line.
(eshell-history-substitution): New function to expand only
substitutions, taking in the entire typed line rather than individual
arguments.
Noam Postavsky [Fri, 24 Nov 2017 02:57:09 +0000 (21:57 -0500)]
Fix command repetition with lexical-binding (Bug#29334)
`call-interactively' relies on analyzing the source of `interactive'
forms in order to preserve arguments like (region-end) in the command
history, rather than just storing the resulting position. However,
the byte-compiler does not preserve the source of the interactive form
when lexical-binding is in effect, because `call-interactively' would
evaluate the form with dynamic binding in that case.
To fix this, change `call-interactively' so that it checks compiled
functions for lexical-binding as well. Then the byte-compiler can
preserve the source of interactive forms regardless of the value of
lexical-binding.
* src/callint.c (Fcall_interactively): Functions compiled with
lexical-binding have their arglist encoded as an integer, use this to
choose the right kind of binding for compiled functions too.
* lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Preserve the
uncompiled form of the interactive form when lexical-binding is
enabled too.
Paul Eggert [Wed, 3 Jan 2018 06:38:01 +0000 (22:38 -0800)]
Fix .gdbinit to work with Lisp_Word
Problem reported by Stefan Monnier (Bug#29957).
* src/.gdbinit (xgetptr, xgetint, xgettype):
Cast Lisp_Word value to EMACS_INT, since it might be a pointer now.
Paul Eggert [Mon, 1 Jan 2018 09:13:04 +0000 (01:13 -0800)]
Merge from origin/emacs-26
63b04c11d5 Fix copyright years by hand 5c7dd8a783 Update copyright year to 2018 220a9ecba1 Merge from Gnulib 312c565566 Don't add empty keyboard macro to macro ring (Bug#24992) 39ca289a7a Allow customization of decoding of "man" command f8240815ea * etc/NEWS: Add security consideration note on passphrase ... 0c78822c70 Fix subtle problem with scroll-down when scroll-margin is ... acd289c5a4 Fix problems with indexing in User manual b240c7846b * lisp/help.el (describe-key): Only (copy-sequence elt) wh... e879a5444a * src/buffer.c (Frestore_buffer_modified_p): Fix bug#29846 81b1028b63 Improve documentation of 'inhibit-modification-hooks' and ... 7175496d7a Fix doc string of 'enable-recursive-minibuffers' 5b38406491 Fix documentation of delsel and of killing text
Paul Eggert [Mon, 1 Jan 2018 01:19:57 +0000 (01:19 +0000)]
Merge from Gnulib
This incorporates:
2018-01-01 maint: Run 'make update-copyright'
2017-12-29 Add cross-compilation results for GNU/Hurd.
2017-12-12 explicit_bzero: port to macOS + Clang 9.0.0
Eli Zaretskii [Sun, 31 Dec 2017 16:20:12 +0000 (18:20 +0200)]
Allow customization of decoding of "man" command
* lisp/man.el (Man-coding-system): New defcustom.
(Man-start-calling): Use it, and also pay attention to user
overriding coding-system-for-read. (Bug#29872)
Philipp Stephani [Sat, 23 Dec 2017 16:56:36 +0000 (17:56 +0100)]
Improve error reporting when serializing non-Unicode strings to JSON
* src/coding.c (utf8_string_p): New helper function.
(syms_of_coding) <utf-8-unix>: Move from json.c.
* src/json.c (json_check_utf8): New helper function.
(lisp_to_json_toplevel_1, lisp_to_json): Use it. To save a bit of
time, check for invalid UTF-8 strings only after encountering an
error, since Jansson already rejects them.
Eli Zaretskii [Fri, 29 Dec 2017 21:41:20 +0000 (23:41 +0200)]
Fix subtle problem with scroll-down when scroll-margin is nonzero
* src/window.c (window_scroll_pixel_based): Account for
scroll-margin when scrolling down, i.e. moving window-start
towards the beginning of the buffer. Reported by zhang cc
<ccsmile2008@outlook.com> in
http://lists.gnu.org/archive/html/emacs-devel/2017-12/msg00894.html.
Eric Abrahamsen [Thu, 28 Dec 2017 20:04:13 +0000 (12:04 -0800)]
Make gnus-alter-articles-to-read-function a constant lambda
* lisp/gnus/gnus-sum.el (gnus-alter-articles-to-read-function):
Default to a no-op lambda form, mention the use of `add-function' in
the docstring.
* lisp/gnus/gnus-sum.el (gnus-articles-to-read): Check if the option
value is callable.
Eli Zaretskii [Thu, 28 Dec 2017 17:23:34 +0000 (19:23 +0200)]
Improve documentation of 'inhibit-modification-hooks' and friends
* src/buffer.c (Fset_buffer_modified_p)
(Frestore_buffer_modified_p): Doc fixes.
* src/insdel.c (syms_of_insdel) <inhibit-modification-hooks>:
Document in the doc string that this variable also inhibits file
locks and active region handling. (Bug#29846)
Michael Albinus [Thu, 28 Dec 2017 10:26:28 +0000 (11:26 +0100)]
Fix Bug#29874
* lisp/net/ange-ftp.el (ange-ftp-file-accessible-directory-p)
(ange-ftp-real-file-accessible-directory-p): New defuns.
(ange-ftp-nslookup-host, ange-ftp-start-process):
Use `ange-ftp-real-file-accessible-directory-p'.
(file-accessible-directory-p): Put `ange-ftp' property. (Bug#29874)
Stefan Monnier [Wed, 27 Dec 2017 22:49:39 +0000 (17:49 -0500)]
(delayed-after-hook-functions): Tighten the code a bit
* lisp/subr.el (delayed-mode-hooks, delayed-after-hook-functions):
Use defvar-local.
(run-mode-hooks): Reset delayed-after-hook-functions before running
those functions, in case an error is signaled.
Eli Zaretskii [Wed, 27 Dec 2017 18:23:10 +0000 (20:23 +0200)]
Fix documentation of delsel and of killing text
* doc/emacs/killing.texi (Appending Kills): Make sure the text
with 2 spaces is not broken between 2 lines.
* doc/emacs/mark.texi (Using Region): Remove the sentence about
delsel mode that describes behavior which exists even without
delsel mode turned on. Suggested by Petteri Hintsanen
<petterih@iki.fi> in emacs-manual-bugs@gnu.org.
Glenn Morris [Wed, 27 Dec 2017 18:00:16 +0000 (10:00 -0800)]
Merge from origin/emacs-26
fd35804971 (origin/emacs-26) * doc/lispref/strings.texi (Case Convers... 89e257d71b * doc/misc/speedbar.texi (Top): Fix grammar. a31ab5ffb5 * lisp/subr.el (with-silent-modifications): Doc fixes. 2ebc8dc3b6 Fix curved quotes in printed manual e4a881b5cf Say that "gnus-cloud" is a parody name 13c59d0a83 More improvements for text.texi 7850b7620e Adjudicate review comments for the "Text" chapter of user ... d7d3b14a99 * lisp/url/url-http.el (url-http-wait-for-headers-change-f... f3819ad13e In C-h k <mouse-n>, alert user to existence of any matchin... 99054fbef9 * net/eww.el (eww): Handle URLs without host part. de89c0b641 Make C-h c/k S-mouse-1 display message for mouse-appearanc... 720ed0b533 Avoid crashes when ':eval' deletes our frame 9105c9aa34 Fix scrolling up in pixel-scroll.el b882d4ef11 Fix problems with ligatures in PDF version of ELisp manual 289dd53bb3 (elisp-flymake-byte-compile): Handle killed buffer in sent... cf36c82127 Avoid some overfull lines in PDF lispref b07b56a351 Avoid some overfull lines in PDF manual 6b3118f025 * doc/emacs/arevert-xtra.texi (Auto Reverting the Buffer M... 7ffb7b1e01 ; lispref nil/t markup fixes
Fix highlighting in query-replace with non-nil replace-char-fold
* lisp/replace.el (replace-highlight): Bind
'isearch-regexp-function' in the same way that function
'replace-search' does, so as to respect the value of
'replace-char-fold'. (Bug#24356)
Stefan Monnier [Tue, 26 Dec 2017 03:51:23 +0000 (22:51 -0500)]
* lisp/register.el: Use cl-generic
(registerv): Make it a "normal"struct.
(registerv-make): Declare obsolete.
(register-val-jump-to, register-val-describe, register-val-insert):
New generic functions.
(jump-to-register, describe-register-1, insert-register): Use them.
* lisp/emacs-lisp/cl-generic.el: Prefill a combination of struct+typeof.
(cl--generic-prefill-dispatchers): Allow a list of specializers.
Eli Zaretskii [Sun, 24 Dec 2017 18:47:06 +0000 (20:47 +0200)]
Adjudicate review comments for the "Text" chapter of user manual
* doc/emacs/text.texi (Text): Rearrange text for clarity. Add
cross-reference to the Org manual. Make the cross-reference to
Outline Mode appear in online manuals as well (the conditional was
a forgotten remnant from time immemoriam).
(Paragraphs): Add a note that 'paragraph-start' and
'paragraph-separate' should not be anchored.
(Auto Fill): Remove redundant text. Suggested by Petteri
Hintsanen <petterih@iki.fi> in emacs-manual-bugs@gnu.org.
Alan Mackenzie [Sun, 24 Dec 2017 10:29:52 +0000 (10:29 +0000)]
In C-h k <mouse-n>, alert user to existence of any matching down-mouse-event
, and instruct her to hold the mouse button to display its documentation.
* lisp/help.el (help-downify-mouse-event-type): New function.
(help-read-key-sequence, describe-key): handle double-click-time being nil or
t.
(describe-key): Print out instructions for displaying documentation of
matching mouse down key sequence command when such exists.
Alan Mackenzie [Sat, 23 Dec 2017 18:00:10 +0000 (18:00 +0000)]
Make C-h c/k S-mouse-1 display message for mouse-appearance-menu, etc.
Currently, C-h c/k for S-mouse-1 reports that S-mouse-1 is unbound, ignoring
that S-down-mouse-1 is bound. We fix this by reporting on the "latest" mouse
event of a sequence which is bound.
* lisp/help.el (help-read-key-sequence): Save all encountered mouse events in
a list. Return the latest one which has a binding.
Tak Kunihiro [Sat, 23 Dec 2017 09:16:40 +0000 (11:16 +0200)]
Fix scrolling up in pixel-scroll.el
* lisp/pixel-scroll.el (pixel-scroll-up): Do not try to move cursor
down when EOB is shown at the top. This function is reverted to
commit 1bda71ec3b11eeb4d06c3da094a3cb21bac18d5c. (bug#29737)
Boruch Baum [Sat, 23 Dec 2017 04:06:22 +0000 (23:06 -0500)]
* lisp/mail/footnote.el (footnote-align-to-fn-text): New config var
(footnote-mode): Declare.
(Footnote--get-area-point-min): Fix last change to use 'car` instead of
the undefined 'first'.
(Footnote--calc-fn-alignment-column, Footnote--fill-prefix-string)
(Footnote--adaptive-fill-function): New functions.
(footnote-mode): Use them.
Boruch Baum [Sat, 23 Dec 2017 02:44:52 +0000 (21:44 -0500)]
* lisp/mail/footnote.el: Misc changes in preparation for more
(footnote-section-tag-regexp): Don't require the trailing space.
(Footnote--point-in-body-p, Footnote--get-area-point-min)
(Footnote--get-area-point-max): New functions.
(Footnote-narrow-to-footnotes, Footnote-text-under-cursor): Use them.
Glenn Morris [Fri, 22 Dec 2017 18:23:16 +0000 (13:23 -0500)]
Merge from origin/emacs-26
34fcfc5 (origin/emacs-26, emacs-26) * lisp/emacs-lisp/inline.el (defi... f7a62c2 Fix doc string of 'footnote-style-alist' c3b6742 Improve documentation of selecting windows 861d110 Improve documentation of records 22b3075 * etc/NEWS: Mention the removal of pinentry.el. (Bug#27445) 689526b Fix interactive spec of 'semantic-ia-show-variants' 90ca37f Fix documentation of 'mouse-drag-and-drop-region' and friends d60faf3 Improve detection of speller version in ispell.el a0e3b06 Document 'mouse-drag-and-drop-region' options and mention the... 164e84c Fix uses of 'nil' and 'non-nil' in manuals and a few more min... 798f07f Document that mode commands should be idempotent. ad2a47c ; * src/xdisp.c (extend_face_to_end_of_line): Fix last change. 88ddf53 Fontify a CPP construct correctly when a comment follows with... de7de9c Prevent infloop in redisplay on TTY frames 293720e Fix loss of documentation face in certain CC Mode doc comment...
Stefan Monnier [Fri, 22 Dec 2017 15:06:49 +0000 (10:06 -0500)]
* lisp/progmodes/cperl-mode.el: Use cl-lib. Fix comment convention
(defgroup, defcustom, defface, x-color-defined-p, uncomment-region)
(ps-extend-face-list, eval-after-load, turn-on-font-lock):
Assume defined.
(cperl-calculate-indent): Use 'functionp' to test if a value is a function.
Eli Zaretskii [Fri, 22 Dec 2017 10:18:12 +0000 (12:18 +0200)]
Improve documentation of selecting windows
* doc/lispref/windows.texi (Basic Windows, Selecting Windows):
Clarify what selecting a window means for keyboard input, and that
input focus may need to be considered when selecting windows on
other frames. See
http://lists.gnu.org/archive/html/emacs-devel/2017-12/msg00372.html
for more details.
Eli Zaretskii [Fri, 22 Dec 2017 10:04:23 +0000 (12:04 +0200)]
Improve documentation of records
* doc/lispref/Makefile.in (srcs): Add the forgotten records.texi.
* doc/lispref/records.texi (Records): Recommend that record type
names use package-naming conventions.
* etc/NEWS: Add the naming convention recommendation for record
types.
Eli Zaretskii [Fri, 22 Dec 2017 09:19:56 +0000 (11:19 +0200)]
Fix documentation of 'mouse-drag-and-drop-region' and friends
* doc/emacs/frames.texi (Drag and Drop): Index
'mouse-drag-and-drop-region-cut-when-buffers-differ',
'mouse-drag-and-drop-region-show-tooltip', and
'mouse-drag-and-drop-region-show-cursor'.
* etc/NEWS: Fix the format of the related entries.
Eli Zaretskii [Fri, 22 Dec 2017 09:11:29 +0000 (11:11 +0200)]
Improve detection of speller version in ispell.el
* lisp/textmodes/ispell.el (ispell-check-version): Accept more
general forms of version numbers for Aspell, Hunspell, and
Enchant, to include various beta and prereleases. (Bug#29801)
Stefan Monnier [Fri, 22 Dec 2017 06:12:26 +0000 (01:12 -0500)]
* lisp/progmodes/cperl-mode.el: Use lexical-binding
Drop some support code for Emacs-19. Remove unused args and vars.
(cperl-mark-active): Remove, use region-active-p.
(cperl-use-region-p): Remove, use use-region-p.
(cperl-can-font-lock, cperl-enable-font-lock, cperl-emacs-can-parse):
Remove, obsolete.
(cperl-mode-map): Move initialization into declaration.
Stefan Monnier [Fri, 22 Dec 2017 04:22:59 +0000 (23:22 -0500)]
* lisp/progmodes/cperl-mode.el: Merge from Jonathan Rockway's version
(cperl-indent-subs-specially): New var.
(cperl-mode-abbrev-table): Add '=begin'. Obey cperl-electric-keywords.
(cperl-sub-keywords, cperl-sub-regexp): New vars.
(cperl-char-ends-sub-keyword-p): New function.
(cperl-mode): Use them.
(cperl-db): Pass `-d` arg to perl.
(cperl-electric-keyword, cperl-linefeed): Accept also '=end'.
(cperl-sniff-for-indent): Obey cperl-indent-parens-as-block and
cperl-indent-subs-specially.
(cperl-calculate-indent): Fix handling of numbers in
cperl-indent-rules-alist, and add a case for functions.
(cperl-find-pods-heres): Use cperl-sub-regexp and allow =begin/=end.
Also recognize 'say'.
(cperl-block-p): Use cperl-sub-regexp
(cperl-after-block-p): Use cperl-char-ends-sub-keyword-p and
cperl-sub-regexp.
(cperl-after-block-and-statement-beg): Accept 'say'.
(cperl-indent-exp): Accept 'state'.
(cperl-fix-line-spacing): Accept 'state'.
(cperl-init-faces): Add 'given', 'when', 'default', 'break', 'try',
'catch', 'finally', 'evalbytes', 'state', '__SUB__', 'fc', 'sysseek'.
Use cperl-sub-regexp.
(cperl-etags): Use cperl-sub-regexp.
(cperl-not-bad-style-regexp): Add '//'.
(cperl-short-docs): Add ~~, UNITCHECK, 'break', 'default', 'evalbytes',
'given', 'say', 'state', //, 'fc', 'prototype', =begin', and '=end'.
Philipp Stephani [Fri, 22 Dec 2017 00:56:38 +0000 (01:56 +0100)]
Fix bugs in JSON test
* test/src/json-tests.el (json-serialize/invalid-unicode): Fix two
bugs that canceled each other out. "a\xCCb" is actually a valid
Unicode string because the hexadecimal character escape isn't
terminated by the "b". But this was masked by an incorrect
closing parentheses, causing an unrelated error.