1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-06 23:51:24 -08:00
Commit graph

126839 commits

Author SHA1 Message Date
Paul Eggert
b1601a95ea Minor text-quoting-style fixes
* src/charset.c (check_iso_charset_parameter):
* src/frame.c (store_frame_param):
* src/xselect.c (x_fill_property_data):
Use grave accent for left single quote in ‘error’ format strings.
2016-08-21 04:02:38 -07:00
Martin Rudalics
1a1062d6e1 Fix semantics of 'minibuffer' frame parameter
The 'minibuffer' frame parameter is now t for a normal frame
(a frame with a root window plus a minibuffer window) and the
frame's minibuffer window for a minibuffer-less frame (a frame
whose minibuffer window is on another frame).  See also:
https://lists.gnu.org/archive/html/emacs-devel/2016-07/msg01259.html

* src/frame.c (make_frame, make_frame_without_minibuffer)
(make_minibuffer_frame): When assigning the frame's minibuffer
window also store corresponding 'minibuffer' frame parameter.
(store_frame_param): Move the 'minibuffer' parameter checks to
the beginning so we can silently override the value before it
gets stored in the parameter alist.  Fix error handling.
(Fframe_parameters): Return value of 'minibuffer' parameter
unmodified.

* lisp/frameset.el (frameset-filter-minibuffer): When the cdr of
the parameter is a minibuffer window, save (minibuffer . nil)
instead of (minibuffer . t).
(frameset--reuse-frame): To find a non-minibuffer-only frame
look out for a frame whose 'minibuffer' parameter is t instead
of that frame's minibuffer window.
(frameset-minibufferless-first-p): To find a minibuffer-less
frame look out for a frame whose 'minibuffer' parameter is a
window instead of nil.
2016-08-21 11:36:11 +02:00
Alan Mackenzie
f0ee3ca5a9 * lisp/progmodes/cc-defs.el (c-safe-scan-lists): Resolve overelaborate "nil" 2016-08-20 20:46:39 +00:00
Alan Mackenzie
43201d7117 In c-\(go-\)?-\(up-\|down-\)?list-\(forward\|backward\) check limit isn't nil
Check the limit both at macro expansion time (for a hard coded nil) and at run
time in the generated code.  Tidy up these macros generally.

* lisp/progmodes/cc-defs.el (c-safe-scan-lists): Check `limit' is present and
not identically nil before generating a narrow-to-region call.  Generate code
to check `limit' is not nil at run time.
(c-go-list-forward, c-go-list-backward): Remove the generation of redundant
narrow-to-region, instead calling c-safe-scan-lists directly.
(c-go-up-list-forward, c-go-up-list-backward, c-go-down-list-forward)
(c-go-down-list-backward): Invoke the corresponding macros without the "go-"
to determine the destination position instead of generating a redundant
narrow-to-region.
2016-08-20 14:12:06 +00:00
Robert Cochran
a4ba426d25 * lisp/emacs-lisp/map.el (map--dispatch): Fix docstring
The docstring referenced a non-existant parameter, as well as a
parameter that has been renamed since the docstring was written. Fix
both errors, fixing (Bug#24182).
2016-08-20 00:41:43 +02:00
Alan Mackenzie
4a80c8bb27 Amend hack-local-variables-prop-line not always to return any mode on line 1.
This fixes bug #24266.

* lisp/files.el (hack-local-variables-prop-line): Change the name of the
parameter mode-only to handle-mode.  Change its meaning, such that it being
set to a value non-nil and not t removes any mode parameter from the result
list.  Leave its values nil and t with the same meanings they had.
(hack-local-variables): Call hack-local-variables-prop-line appropriately.
2016-08-19 16:03:05 +00:00
Daiki Ueno
72ef0c8b2f Improve doc string of epg-*-program
* lisp/epg-config.el (epg-gpg-program, epg-gpgsm-program):
Suggest to use Customize when setting.  (Bug#24229)
2016-08-19 11:20:30 +02:00
Tino Calancha
a4fa31150f Add tests for Bug#24264
* test/lisp/emacs-lisp/cl-seq-tests.el (cl-seq-test-bug24264):
Add test for Bug#24264.
(cl-seq-fill-test, cl-seq-replace-test)
(cl-seq-remove-test ,cl-seq-delete-test)
(cl-seq-remove-duplicates-test, cl-seq-substitute-test)
(cl-seq-nsubstitute-test, cl-seq-position-test)
(cl-seq-count-test, cl-seq-mismatch-test)
(cl-seq-search-test, cl-seq-test-bug24264):
Add tests for all functions in the file; test all keywords.
2016-08-19 17:04:42 +09:00
Johan Bockgård
8fcf3df939 Fix bug in --eval reply message from server
* lisp/server.el (server-reply-print): Fix check for truncated quote
sequence at end of message. Problem reported in:
http://lists.gnu.org/archive/html/emacs-devel/2016-08/msg00101.html
2016-08-18 21:29:48 +02:00
Eli Zaretskii
b305fab44c Add tests for 'substitute-command-keys'
* test/src/doc-tests.el (doc-test-substitute-command-keys): New
tests.
2016-08-18 18:06:33 +03:00
Oleh Krehel
45522a1ed3 lisp/textmodes/table.el (table-generate-source): Fix completing-read call
Doesn't make sense to pass '(("html") ("latex") ("cals")) to
`completing-read'.
2016-08-18 16:11:56 +02:00
Oleh Krehel
4db19cdaf6 lisp/dired-aux.el (dired-compress-file-suffixes): Add entry for tgz
The previous behavior resulted in a "tgz" -> "tar" -> "tgz" loop,
without any files being extracted.
2016-08-18 16:11:02 +02:00
Andreas Politz
413cd292f6 Don't let window start override window point in `window-state-put' (Bug#24240)
* lisp/window.el (window--state-put-2): Set 'noforce argument
when restoring a window's start position.  This avoids that the
effect of `set-window-point' gets overidden by that of
`set-window-start' (Bug#24240).
2016-08-18 10:27:05 +02:00
Alan Mackenzie
0434f7609a Fontify constructs following "::" in C++ argument lists correctly - part 2.
This fixes bug #24246.

* lisp/progmodes/cc-engine.el (c-find-decl-prefix-search): Put a
`save-match-data' around the new `looking-at' introduced by the previous CC
Mode patch this evening.
2016-08-17 19:37:19 +00:00
Alan Mackenzie
5ee08b3d6d Fontify constructs following "::" in C++ argument lists correctly.
This fixes bug #24246.

* lisp/progmodes/cc-engine.el (c-find-decl-prefix-search): In the "pseudo
match" loop, test a found string for a match with c-opt-identifier-concat-key
(e.g. with "::").
2016-08-17 18:06:24 +00:00
Paul Eggert
848591904d * src/doc.c (Fsubstitute_command_keys): Clarify GC comments. 2016-08-17 10:16:22 -07:00
K. Handa
7faabf03d8 Fix hz encoding and decoding (bug#23814)
* lisp/language/china-util.el (decode-hz-region): Pay
attention to "~~}" sequence at the end of Chinese character
range.
(hz-category-table): New variable.
(encode-hz-region): Convert non-encodable characters to
\u... and \U...  Preserve ESC on ecoding.  Put
`chinese-gb2312' `charset' text property in advance to force
iso-2022-encoding to select chinese-gb2312 designation.
2016-08-17 23:37:17 +09:00
Tino Calancha
8d4039bcd6 file-attribute-collect: New defun
* lisp/files.el (file-attribute-collect):
Return a sublist of the attributes returned by 'file-attributes'.
Suggested by Ted Zlatanov in:

http://lists.gnu.org/archive/html/emacs-devel/2016-07/msg01195.html
; * etc/NEWS: Mention this defun in NEWS.
2016-08-17 18:25:54 +09:00
Michael Albinus
80082d00d8 Fix Bug#24203
* lisp/comint.el (comint-password-prompt-regexp): Relax regexp.  (Bug#24203)
2016-08-17 10:10:47 +02:00
Karl Fogel
527bf164bb Improve doc string.
* src/fileio.c (Ffile_name_as_directory): Be precise about the
conditions under which a slash is appended.
2016-08-16 15:25:52 -05:00
Paul Eggert
4b1b8dd80a Omit substitute-command-keys code no longer needed
* src/doc.c (Fsubstitute_command_keys):
Remove duplicate initializations.
2016-08-16 13:17:11 -07:00
Tino Calancha
c7119916dc Allow not erase output buffer in shell commands
* lisp/simple.el (shell-command-not-erase-buffer): New option to allow
not erasing the output buffer between shell commands.  Defaults to nil.
(shell-command-on-region): Use it.
(shell-command--save-pos-or-erase): New defun; store a buffer position
if 'shell-command-not-erase-buffer' is non-nil; otherwise
erase the output buffer of the shell command.
(shell-command, shell-command-on-region): Use it.
(shell-command--set-point-after-cmd): New defun;
if 'shell-command-not-erase-buffer' is non-nil, set point
in the output buffer to the position in 'shell-command-saved-pos'.
(shell-command-sentinel, shell-command-on-region): Use it.
* doc/emacs/misc.texi (shell-command-not-erase-buffer):
Document this feature in the manual.
; * etc/NEWS: Add entry for this new feature.
See discussion on:
http://lists.gnu.org/archive/html/emacs-devel/2016-07/msg00610.html
2016-08-16 18:18:44 +09:00
Michael Albinus
5783984787 Rearrange Tramp manual title page
* doc/misc/tramp.texi: Move @insertcopying out of the title
page.  Do not use @ifnottex anymore.
2016-08-16 09:48:24 +02:00
Glenn Morris
126f95a708 * doc/misc/tramp.texi: Adapt 2016-08-14 change for makeinfo 4. 2016-08-15 12:48:01 -04:00
Alan Mackenzie
15c16a5d3b Fix minor bug in c-syntactic-re-search-forward.
Bug was: when NOERROR is neither nil nor t, BOUND is non-nil, PAREN-LEVEL is
non-nil, and the first internal search attempt fails, point wrongly ends up at
BOUND, rather than just before the next closing paren.

* lisp/progmodes/cc-engine.el (c-syntactic-re-search-forward): Guard against
the above situation.
2016-08-15 16:22:36 +00:00
Alan Mackenzie
ce1ed9c811 Handle C++11 lambda functions.
* lisp/progmodes/cc-engine.el (c-looking-at-inexpr-block): Enhance also to
handle C++ lambda functions.
(c-looking-at-c++-lambda-capture-list): New function.

* lisp/progmodes/cc-fonts.el (c-font-lock-declarations): Recognize the
parameter list of a lambda function and set `context' and
`c-restricted-<>-arglists' suitably for it.
(c-font-lock-c++-lambda-captures): New function.
(c-complex-decl-matchers): Insert c-font-lock-c++-lambda-captures into it.

* lisp/progmodes/cc-langs.el (c-pre-lambda-tokens, c-pre-lambda-tokens-re):
New language constants/variables.
(c-paren-nontype-kwds): Include "noexcept" in the C++ value.

* lisp/progmodes/cc-mode.el (c-fl-decl-start): Handle being in a C++ lambda
function capture list.
2016-08-15 11:52:32 +00:00
Michael Albinus
9c2ce57719 Fix stale cache problem in Tramp
* lisp/net/tramp-cache.el (tramp-get-connection-property):
Check, that a process as key is still running.  (Bug#22478)
2016-08-15 12:29:20 +02:00
Paul Eggert
9c2ea5cdd6 * doc/misc/tramp.texi (Configuration): Fix @xref typo. 2016-08-14 15:06:15 -05:00
Eli Zaretskii
7aaeb86f8c Another fix for scroll-conservatively and overlay strings
* src/xdisp.c (redisplay_window): Handle also the case where the
calculated window-start point has an overlay string touching it.
(Bug#24179)
2016-08-14 21:25:52 +03:00
Michael Albinus
59720dc137 Improve handling of defcustoms in tramp
* doc/misc/tramp.texi: Protect all multi-line examples by
@group ... @end group.  Use proper `custom-set-variables'
examples.  Use consequently @option for user options.  Remove
superfluous @cindex and @vindex entries.
(Top): Remove reference to outdated mail archives.
(Configuration): Tune references.
(Default Method): Make `tramp-default-method' and
`tramp-default-method-alist' a @defopt.
(Default User): Make `tramp-default-user' and
`tramp-default-user-alist' a @defopt.
(Default Host): Make `tramp-default-host' and
`tramp-default-host-alist' a @defopt.

* lisp/net/tramp.el (tramp-mode, tramp-verbose)
(tramp-backup-directory-alist, tramp-auto-save-directory)
(tramp-encoding-shell, tramp-encoding-command-switch)
(tramp-encoding-command-interactive, tramp-default-method)
(tramp-default-method-alist, tramp-default-user)
(tramp-default-user-alist, tramp-default-host)
(tramp-default-host-alist, tramp-default-proxies-alist)
(tramp-save-ad-hoc-proxies)
(tramp-restricted-shell-hosts-alist)
(tramp-local-end-of-line, tramp-rsh-end-of-line)
(tramp-login-prompt-regexp, tramp-shell-prompt-pattern)
(tramp-password-prompt-regexp, tramp-wrong-passwd-regexp)
(tramp-yesno-prompt-regexp, tramp-yn-prompt-regexp)
(tramp-terminal-prompt-regexp)
(tramp-operation-not-permitted-regexp)
(tramp-copy-failed-regexp, tramp-process-alive-regexp)
(tramp-syntax, tramp-chunksize)
(tramp-process-connection-type, tramp-connection-timeout)
(tramp-connection-min-time-diff)
(tramp-completion-reread-directory-timeout):
* lisp/net/tramp-adb.el (tramp-adb-program)
(tramp-adb-connect-if-not-connected, tramp-adb-prompt):
* lisp/net/tramp-cache.el (tramp-connection-properties)
(tramp-persistency-file-name):
* lisp/net/tramp-gvfs.el (tramp-gvfs-methods)
(tramp-gvfs-zeroconf-domain)
(tramp-bluez-discover-devices-timeout):
* lisp/net/tramp-sh.el (tramp-inline-compress-start-size)
(tramp-copy-size-limit, tramp-terminal-type)
(tramp-histfile-override)
(tramp-use-ssh-controlmaster-options, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args):
* lisp/net/tramp-smb.el (tramp-smb-program, tramp-smb-acl-program)
(tramp-smb-conf, tramp-smb-winexe-program)
(tramp-smb-winexe-shell-command)
(tramp-smb-winexe-shell-command-switch): Add :require 'tramp.
2016-08-14 13:31:07 +02:00
Paul Eggert
66ae4cada5 Minor text-quoting-style fixes
* lisp/cus-edit.el (custom-buffer-create-internal):
* lisp/recentf.el (recentf-edit-list):
Follow text-quoting-style preference when quoting in UI strings.
* src/doc.c (Fsubstitute_command_keys): Don’t say that curved
quotes are substituted for, as this is no longer true.
2016-08-13 23:32:36 -05:00
Paul Eggert
2791580f5e Fix substitute-command-keys unibyte, alloc bugs
* src/doc.c (Fsubstitute_command_keys): Fix some problems with
unibyte strings and with buffer allocation.  Make strings
multibyte, to avoid problems with unibyte strings that are not
valid UTF-8 (Bug#24206).  Redo buffer allocation so that it is
O(N), not O(N**2).  Avoid going past the end of the input string
when given invalid input.  Avoid some unlikely problems in
accessing the wrong storage after a GC.
2016-08-13 23:32:36 -05:00
Joakim Jalap
c1021ba910 Fix "C-u" when an input method is active
* lisp/international/quail.el (quail-input-method): Defer to the
input method iff 'overriding-terminal-local-map' is
'universal-argument-map' and the given key has no binding there.
(Bug#22958)
2016-08-13 12:26:27 +03:00
Martin Rudalics
6bb55a25fa Fix docs on `display-buffer-below-selected' (Bug#24213)
* lisp/window.el (display-buffer-below-selected): Fix
doc-string (Bug#24213).
* doc/lispref/windows.texi (Display Action Functions): Fix
documentation of `display-buffer-below-selected'.
2016-08-13 09:59:14 +02:00
Tino Calancha
50548fd9af cl-fill: Rename arguments to cl-seq and cl-item
* lisp/emacs-lisp/cl-seq.el (cl-fill):
Rename arguments to 'cl-seq' and 'cl-item' as elsewhere.
2016-08-13 13:25:15 +09:00
Thomas Fitzsimmons
9f17bf6e64 Fix display.texi typo
* doc/lispref/display.texi (Faces): Fix typo.
2016-08-12 22:33:11 -04:00
Paul Eggert
2dd8044bfb Fix process leak with make-network-process
This problem was introduced by the recent async changes (Bug#23808).
* src/process.c (Fmake_process): Move USE_SAFE_ALLOCA later,
so that it follows the start_process_unwind unwind-protect.
Set pid to -1 while the process is being created.
(start_process_unwind): Omit unnecessary emacs_abort test.
(connect_network_socket): Simplify use of counts.  Unwind
bind_polling_period a bit earlier, so that a remove_process
unwind-protect can be added when needed; this is the heart of
the fix.  Undo the unwind-protect just before returning.
2016-08-11 11:26:34 -07:00
Eli Zaretskii
2e0a2b376f Avoid annoying re-scroll when buffer has many overlay strings
* src/xdisp.c (redisplay_window): Add better recovery from a
situation where window-start is on buffer position which has a
before-string that includes newlines, with the result that point
is not visible in the window, because the display engine starts
displaying with the before-string.  (Bug#24179)
2016-08-11 18:04:42 +03:00
Paul Eggert
cd35240613 Omit unnecessary process initialization
* src/process.c (make_process, Fmake_process)
(Fmake_pipe_process, Fmake_serial_process)
(Fmake_network_process, server_accept_connection):
Omit unnecessary initialization of already-cleared storage.
2016-08-10 13:19:36 -07:00
Tino Calancha
76f3328199 cl-delete-duplicates: Parse :if to have cl-if bound
* lisp/emacs-lisp/cl-seq.el (cl--delete-duplicates):
We need also to parse keyword :if, otherwise cl-if
is unbound.
This reverts commit:
68fdbeb917
2016-08-10 23:23:18 +09:00
Tino Calancha
68fdbeb917 cl-delete-duplicates: do not parse :if keyword
* lisp/emacs-lisp/cl-seq.el (cl--delete-duplicates):
Parse only the supported keywords.
2016-08-10 22:34:21 +09:00
Michael Albinus
c2664aaab6 Add compatibility layer for `temporary-file-directory-function'
* lisp/net/tramp-compat.el
(tramp-compat-temporary-file-directory-function): New defalias.

* lisp/net/tramp.el (tramp-handle-make-nearby-temp-file): Use it.

* test/lisp/net/tramp-tests.el (tramp-test32-make-nearby-temp-file):
Skip for older Emacs versions.
2016-08-10 12:10:26 +02:00
Michael Albinus
5115743b67 * lisp/comint.el (comint-password-prompt-regexp): Add "PEM" for OpenVPN.
(Bug#24059)
2016-08-10 12:09:12 +02:00
Vincent Belaïche
538d5916c1 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2016-08-10 10:14:29 +02:00
Vincent Belaïche
bfeacfcdc9 Handle nil cell value in compiled printer functions.
* doc/misc/ses.texi (Quick Tutorial): Minor clarification about the
ses-range `!' modifier.
(More on cell printing): Fix this that the fallback printer is
`ses-prin1', not "%S".  That makes a difference for any cell value for
which "%S" would insert a backslash characters.

* lisp/ses.el (ses-local-printer-compile): Handle the nil cell value
--- contrary to emacs-25 branches ses-call-printer does not handle
prior to calling a function printer.  Not doing this would still work
because the compiled function would throw and error and SES would in
the end resort to the ses-prin1 fallback, however this way would not
be in line with the raison d'être of compiling printer which is speed.
2016-08-10 10:13:27 +02:00
Mark Oteiza
05dc6794f1 Turn on lexical-binding in json.el
Measuring with (benchmark-run 100 (json-read-file "foobar.json"))
showed 12-31% reduction in execution time.
* lisp/json.el: Turn on lexical-binding.
2016-08-10 00:42:40 -04:00
Mark Oteiza
4ffdcfc6d1 Nudge WoMan toward lexical-binding
* lisp/woman.el (woman-parse-man.conf, woman-manpath-add-locales):
Use cl-pushnew instead of add-to-list.
(woman-justify-list): Rename to woman-justify-styles.
(woman-justify-styles): New array.
(woman-justify, woman-decode-region, woman2-ad, woman2-na): Use it.
(woman-cached-data): Use cl-pushnew instead of add-to-list.
2016-08-10 00:15:55 -04:00
Vincent Belaïche
731d225cf3 Apply changes from commits 3c97b0f758 and 8a38e948b0 to master branch.
Here follows the logs from the two commits which I apply to master.

commit 3c97b0f758
Author: Vincent Belaïche <vincentb1@users.sourceforge.net>
Date:   Fri Jul 29 13:44:14 2016 +0200

Fix ses-delete-blanks to delete only blanks + documentation.

* doc/misc/ses.texi (Quick Tutorial): Mention the '!'
'ses-range' modifier as an alternative to 'ses+'.
(Advanced Features): Add a refernce to node 'Nonrelocatable
references' concerning function 'ses-rename-cell'.
(Standard formula functions): Mention the '!' 'ses-range'
modifier as an alternative to 'ses-delete-blanks'.
(More on cell printing): Fix fallback printer
definition.  Minor editorial formatting changes.
(Nonrelocatable references): Document the use of
'ses-rename-cell' as a better way to make cell reference
non-relocatable.
(The data area): Document the presence of local printer
definitions in the data area.

* lisp/ses.el (ses-delete-blanks): Do not remove
*error*.  Any error in an argument should propagate into the
using formula rather than being silently hidden !

commit 8a38e948b0
Author: Vincent Belaïche <vincentb1@users.sourceforge.net>
Date:   Thu Jul 28 19:49:37 2016 +0200

Fix local printer set to left aligned string formatter.

* lisp/ses.el (ses-local-printer-compile): Add missing case
for left-aligned string formatter.
2016-08-09 23:46:13 +02:00
Paul Eggert
e13c5467fc * .dir-locals.el (c-noise-macro-names): Remove NONVOLATILE. 2016-08-09 11:51:16 -07:00
Stefan Monnier
c97cd6c005 * lisp/emacs-lisp/cconv.el: Fix λ-lifting in the presence of shadowing
Change the code which detects and circumvents the case where one of the
variables used in λ-lifting is shadowed, so that it also works when the
shadowing comes before the λ-lifted function (bug#24171).

(cconv--remap-llv): New function, extracted from cconv-convert.
(cconv-convert): Use it, but differently for `let' and `let*'.
2016-08-09 13:05:03 -04:00