1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-22 10:26:20 +00:00
Commit Graph

126537 Commits

Author SHA1 Message Date
Tino Calancha
244754e2b2 * lisp/simple.el (shell-command, shell-command-on-region): Fix doc strings 2016-07-11 02:47:28 +09:00
Michael Albinus
9a8edcd9ab Add a note how to use `tramp-own-remote-path'
* doc/misc/tramp.texi (Inline methods, External methods)
(Remote shell setup, Android shell setup)
(Frequently Asked Questions, Frequently Asked Questions):
Use @command and @samp consequently.
(Remote programs): The remote shell must support the -l
argument, in order to use `tramp-own-remote-path'.  (Bug#23914)
2016-07-10 17:03:48 +02:00
Alan Third
04a7977f70 Remove App Nap setting from Info.plist (bug#22993)
* nextstep/templates/Info.plist.in: Remove LSAppNapIsDisabled key since
it doesn't actually disable app nap.
2016-07-10 10:24:32 +01:00
Mario Lang
466ee1b3ea An efficient built-in mapcan
A built-in version of `mapcan' avoids consing up (and GC'ing) the
intermediate list.

* src/fns.c (Fmapcan): New built-in.
(syms_of_fns): Define.

* lisp/emacs-lisp/cl.el (mapcan): Remove defalias.

* lisp/emacs-lisp/cl-extra.el (cl-mapcan): Use built-in `mapcan'
if only one sequence is provided.

* lisp/progmodes/hideif.el (hif-delimit):
* lisp/dired-aux.el (dired-do-find-regexp):
* lisp/woman.el (woman-parse-colon-path): Use `mapcan' instead of
`cl-mapcan'.

* lisp/woman.el (eval-when-compile): Require 'cl-lib only when
compiling.

* lisp/mouse.el (mouse-buffer-menu-map):
* lisp/net/pop3.el (pop3-uidl-dele):
* lisp/progmodes/gud.el (gud-jdb-build-source-files-list):
* lisp/cedet/semantic/db-find.el (semanticdb-fast-strip-find-results):
* lisp/cedet/semantic/symref/grep.el (semantic-symref-derive-find-filepatterns):
* lisp/gnus/nnmail.el (nnmail-split-it):
* lisp/gnus/gnus-sum.el (gnus-articles-in-thread):
* lisp/gnus/gnus-registry.el (gnus-registry-sort-addresses):
* lisp/gnus/gnus-util.el (gnus-mapcar): Use `mapcan'.
2016-07-10 01:18:47 +02:00
Tino Calancha
c3223dd505 Detect aliases to built-in functions
* lisp/help-fns.el (describe-function-1): Check for aliases
defined with (defalias alias (symbol-function built-in)) (Bug#23887).

* test/lisp/help-fns-tests.el (help-fns-test-bug23887): Untag as
failing this test.
2016-07-09 22:56:25 +09:00
Michael Albinus
bfc29a5bce Avoid recursive detection of remote uid and gid in tramp-gvfs.el
* lisp/net/tramp-gvfs.el (tramp-gvfs-get-remote-uid-gid-in-progress):
New variable.
(tramp-gvfs-maybe-open-connection): Use it.

* test/lisp/net/tramp-tests.el (tramp-test18-file-attributes):
Reorder test.
2016-07-09 14:20:07 +02:00
Jürgen Hötzel
e4adb6cdf3 Wrap around error in coreutil's ls
* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory): Add switch
"--quoting-style=literal" if remote host supports quoting style.
Recent versions of coreutils changed default quoting style to
"--quoting=shell-escape".
2016-07-09 14:19:12 +02:00
Eli Zaretskii
0a2aedfe6d Minor tweaks of copying text properties when padding strings
* src/editfns.c (styled_format): Don't include padding on the left
in the properties at the beginning of the string.  (Bug#23897)

* test/src/editfns-tests.el (format-properties): Add tests for
faces when the string is padded on the left or on the right.
2016-07-09 11:01:17 +03:00
Mario Lang
e52ad7fdfc Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2016-07-09 07:06:53 +02:00
Mario Lang
47f6336e6a No need to require the same feature twice.
* lisp/dired-aux.el (require 'cl-lib): Remove.
2016-07-09 07:06:13 +02:00
Mark Oteiza
316bbd956e Turn on lexical binding
* lisp/net/secrets.el (secrets-collection-handler): Use cl-pushnew.
(secrets-search-items, secrets-create-item): Use append.
(secrets-show-secrets): Remove unused binding.
(secrets-expand-item, secrets-tree-widget-after-toggle-function):
Ignore unused arguments.
2016-07-08 21:49:52 -04:00
Mark Oteiza
7095596ac3 Derive secrets-mode from special-mode
* lisp/net/secrets.el: Remove top-level secrets-mode hack.
(secrets-mode-map): New variable.  Add key bindings to n and p for
navigating lines.
(secrets-mode): Derive from special-mode.  Remove keymap code and
initialization code.  Do not record undo information.  Make
secrets-show-collections the local revert-buffer-function.
(secrets-show-collections): Change signature to satisfy revert-buffer.
2016-07-08 21:10:32 -04:00
Mark Oteiza
bdda4855c6 Add a couple cells to lisp-prettify-symbols-alist
* lisp/emacs-lisp/lisp-mode.el (lisp-prettify-symbols-alist): Add
"sqrt" and "not".
2016-07-08 17:12:54 -04:00
Michael Albinus
5deebc3c91 Detect remote uid and gid in tramp-gvfs.el
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name)
(tramp-gvfs-handler-mounted-unmounted)
(tramp-gvfs-connection-mounted-p):
Make "default-location" a connection property.
(tramp-gvfs-get-remote-uid, tramp-gvfs-get-remote-gid): New defuns.
(tramp-gvfs-maybe-open-connection): Use them.
2016-07-08 22:44:11 +02:00
Eli Zaretskii
d8a9c450cf Yet another fix for copying properties by 'format'
* src/textprop.c (extend_property_ranges): Accept an additional
argument OLD_END, and only extend the end of a property range if
its original end is at OLD_END; all the other ranges are left
intact.  (Bug#23897)
* src/editfns.c (styled_format): Pass the original length of the
string to 'extend_property_ranges'.
* src/intervals.h (extend_property_ranges): Adjust prototype.

* test/src/editfns-tests.el (format-properties): Add tests for
bug#23897.
2016-07-08 22:34:34 +03:00
Stephen Berman
d0c0b71d88 Allow selecting region with mouse to move point to beginning
* etc/NEWS: Mention new user option
`mouse-select-region-move-to-beginning'.

* doc/emacs/frames.texi (Mouse Commands): Add cross-reference
to the following.
(Word and Line Mouse): Describe how double-clicking mouse-1 to
activate region and `mouse-select-region-move-to-beginning'
affect point.

* lisp/mouse.el (mouse-select-region-move-to-beginning): New defcustom.
(mouse-set-point): Use it.  (Bug#23478)
2016-07-08 17:36:55 +02:00
Stephen Berman
381c6bbfb3 Fix menu bar breakage
* lisp/menu-bar.el (menu-bar-showhide-scroll-bar-menu): Use backquoting
to prevent void variable errors, and fix typo (bug#23918).
2016-07-08 17:22:14 +02:00
Tino Calancha
56c8551219 Copy buffer names to kill ring
* ibuf-ext.el (ibuffer-copy-buffername-as-kill): New command.
* lisp/ibuffer (ibuffer-mode-map): Bound it to 'B'.
;* etc/NEWS: Add entry for this new feature.
2016-07-08 17:22:56 +09:00
Tino Calancha
0e6fa2ddf7 Remove just input mark
* lisp/ibuffer.el (ibuffer-unmark-all): When MARK is not ?\r remove
just MARK.
2016-07-08 11:22:34 +09:00
Tino Calancha
9bf31d1d3f Ibuffer change marks
* lisp/ibuffer.el (ibuffer-change-marks): New command.
(ibuffer-mode-map): Bind it to '* c'.
(ibuffer-mode-groups-popup): Update menus.
(ibuffer-mode): Update mode doc.
; * etc/NEWS: Add entry for this new feature.
2016-07-08 10:55:22 +09:00
Alan Third
ee7bc98860 Prevent NS event loop being re-entered (bug#11049)
* nsterm.m (ns_read_socket, ns_select): Return -1 if already in event
loop instead of aborting.
2016-07-07 20:48:35 +01:00
Alan Third
5508f06f32 Fix some deprecated functions
* src/nsterm.m (firstRectForCharacterRange): In OS X >10.6 replace
convertBaseToScreen with convertRectToScreen.
* src/nsmenu.m (ns_update_menubar): Remove attachedMenu, deprecated in
OS X 10.2, and always seems to return nil.
2016-07-07 20:48:35 +01:00
Aaron Jensen
42ac8f5723 Disable App Nap (bug#22993)
* nextstep/templates/Info.plist.in: Insert AppNap disable code.

Copyright-paperwork-exempt: yes
2016-07-07 19:57:47 +01:00
Michael Albinus
0e8d3445a7 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2016-07-07 18:51:00 +02:00
Michael Albinus
7f8e742833 Fix an error in Tramp for rsync
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
Make it work for "rsync".
(tramp-make-copy-program-file-name): Apply `directory-file-name'.
2016-07-07 18:50:24 +02:00
Tino Calancha
44517b21ab Ibuffer: Mark locked buffers
* lisp/ibuf-ext.el (ibuffer-locked-buffer-p): New defun.
(ibuffer-mark-by-locked): New command.
(ibuffer-mode-map): Bind it to '% L'; update menus.
(ibuffer-mode): Update mode doc.
;* etc/NEWS: Add NEWS entry for these changes and previous two commits.
2016-07-08 01:34:35 +09:00
Tino Calancha
9d70e4da74 * lisp/ibuffer.el: Add face for locked buffers 2016-07-08 01:15:54 +09:00
Tino Calancha
56277b8150 * lisp/ibuffer.el: Add mark for locked buffers 2016-07-08 01:13:55 +09:00
Tino Calancha
ee554d94f6 ;* etc/NEWS (Ibuffer): Update entry according with last commit 2016-07-08 00:57:40 +09:00
Tino Calancha
1650d7102a Remove duplicate binding
* lisp/ibuffer.el (ibuffer-mode-map): 'ibuffer-mark-by-content-regexp'
just bound to '% g'.
As suggested in:
http://lists.gnu.org/archive/html/emacs-devel/2016-07/msg00165.html
2016-07-07 23:59:45 +09:00
Tino Calancha
1583b569eb Ibuffer: Drop needless binding
* lisp/ibuffer.el (ibuffer-mark-interactive): 'inhibit-read-only'
already bound to 't' inside 'ibuffer-set-mark'.
2016-07-07 17:49:02 +09:00
Phillip Lord
1efb208032 Run tests from non-byte compiled files
* test/Makefile.in: Eval non-byte-compiled files for tests.
2016-07-07 09:35:11 +01:00
Mark Oteiza
5811404f0b Replace eldoc-documentation-function with a hook
* lisp/emacs-lisp/eldoc.el (eldoc-documentation-functions): New hook.
(eldoc-documentation-function): Make into obsolete alias.
(eldoc-echo-area-use-multiline-p, eldoc-highlight-function-argument):
(eldoc-argument-case, global-eldoc-mode): Update docstrings.
(eldoc-print-current-symbol-info): Use run-hook-with-args-until-success
on eldoc-documentation-functions.
(eldoc-supported-p): New function.
(eldoc-mode, global-eldoc-mode, eldoc-schedule-timer): Use eldoc-supported-p.
* etc/NEWS: Mention eldoc-documentation-functions.
* doc/lispref/modes.texi: Update reference.
2016-07-06 23:16:32 -04:00
Simen Heggestøyl
c0a5ae906d Complete "initial" and "unset" in CSS mode
* lisp/textmodes/css-mode.el (css--complete-property-value): Make
"initial" and "unset" completion candidates for all CSS properties,
just like "inherit".

* test/lisp/textmodes/css-mode-tests.el
(css-test-complete-property-value): Update test to reflect the above
change.
2016-07-06 19:25:10 +02:00
Michael Albinus
2cbd80a5f8 * lisp/net/tramp-gvfs.el (tramp-gvfs-mount-spec): Fix typo. 2016-07-06 17:33:00 +02:00
Paul Eggert
7eb7335f00 Simplify rfc1345.el a bit
* lisp/leim/quail/rfc1345.el: Omit commented-out codes for ASCII
that would no longer parse.  Replace control characters with
escapes in character constants.  Omit unnecessary \ after ?.
This does not change behavior.
2016-07-06 16:11:06 +02:00
Dmitry Antipov
a7e302dc1d Prefer 'frame-parameter' where it is expected to be a bit faster
* lisp/international/mule-diag.el (mule-diag):
* lisp/menu-bar.el (menu-bar-showhide-scroll-bar-menu):
* lisp/mouse.el (mouse-drag-line, font-menu-add-default):
* lisp/scroll-bar.el (toggle-scroll-bar, toggle-horizontal-scroll-bar):
* lisp/faces.el (x-resolve-font-name): Use 'frame-parameter'.
2016-07-06 06:05:15 +03:00
Dmitry Antipov
b1a64dba04 Reduce consing caused by vertical motion commands
* src/frame.c (Fframe_parameter): Avoid call to Fframe_parameters for the
parameters frequently requested by calls to 'next-line' and 'previous-line'.
2016-07-06 06:03:12 +03:00
Michael Albinus
1ba6f2c7bb Make all Tramp tests pass for "gdrive" method
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-delete-directory)
* lisp/net/tramp-compat.el (tramp-compat-copy-directory)
(tramp-compat-delete-directory):
* lisp/net/tramp-smb.el (tramp-smb-handle-delete-directory):
Use `directory-files-no-dot-files-regexp'.

* lisp/net/tramp-gvfs.el (tramp-gvfs-handler-mounted-unmounted)
(tramp-gvfs-send-command): Call `tramp-flush-file-property' in
case of problems.

* test/lisp/net/tramp-tests.el (tramp--instrument-test-case):
Adapt docstring.
(tramp-test14-delete-directory): Make further tests.
2016-07-05 21:16:25 +02:00
Eli Zaretskii
36e69bd82a Fix redisplay with window-start on continuation lines
* src/xdisp.c (pos_visible_p): Return false if the window starts
after CHARPOS.
(compute_window_start_on_continuation_line): Don't return
window-start position that is after point in the buffer, as the
callers don't expect this to happen, and will generally display an
empty window with the cursor in its middle.  (Bug#23871)
2016-07-05 19:33:01 +03:00
Tino Calancha
c770dbb098 Add :expected-result :failed for unfixed bug test
* test/lisp/help-fns-tests.el (help-fns-test-bug23887):
2016-07-06 01:10:22 +09:00
Tino Calancha
a18baf565e * test/lisp/help-fns-tests.el: Add several tests for 'describe-function'. 2016-07-05 16:16:11 +09:00
Michal Nazarewicz
dcefd2bbc0 Don’t create unnecessary marker in ‘delete-trailing-whitespace’
* lisp/simple.el (delete-trailing-whitespace): If END argument is nil,
there is no need for the end-marker to be created.
2016-07-04 23:44:06 +02:00
Michal Nazarewicz
7c6317a049 Simplify ‘delete-trailing-whitespace’ by not treating \n as whitespace
* lisp/simple.el (delete-trailing-whitespace): Set newline’s character
syntax to non-whitespace so that ‘\s-’ regular expression does not match
it.

This simplifies the loop slightly since a simple ‘\s-+$’ can be used and
as a consequence ‘line-beginning-position’ function does not need to be
called any longer.

Furthermore, when newline has whitespace syntax, ‘\s-$’ regular
expression ends up matching empty lins since ‘\s-’ matches newline
characetr of proceeding line.  This leads to needless loop iterations.

Since previous change to ‘delete-trailing-whitespace’ already introduced
‘with-syntax-table’, take advantage of it and also overwrite newline’s
character syntax.
2016-07-04 23:44:06 +02:00
Michal Nazarewicz
dc294483af Make ‘delete-trailing-whitespace’ delete spaces after form feed
* lisp/simple.el (delete-trailing-whitespace): Treat form fead as
a non-whitespace character (regradless of whether it’s character syntax
is whitespace) and delete any whitespace following it instead of leaving
lines with form feeds completely unchanged.  I.e. a line like "\f " will
now became "\f".
2016-07-04 23:44:06 +02:00
Dmitry Antipov
e3ae3c4488 Cleanup XEditRes hack
* configure.ac [USE_X_TOOLKIT]: Define X_TOOLKIT_EDITRES if
_XEditResCheckMessages is declared in X11/Xmu/Editres.h and may be
linked with -lXmu.  This should work with any non-ancient Xmu library.
* xfns.c (toplevel): Remove old cruft.
(x_window) [USE_X_TOOLKIT]: Use X_TOOLKIT_EDITRES.
* xterm.c (toplevel): Remove old cruft.
(handle_one_xevent): Use X_TOOLKIT_EDITRES.
* xterm.h (toplevel): Include X11/Xmu/Editres.h if X_TOOLKIT_EDITRES.
2016-07-04 20:05:06 +03:00
Michael Albinus
f24fe30cb8 Add Google Drive support to Tramp
* doc/misc/tramp.texi: Add `gdrive' method.

* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.3.1-pre".

* etc/NEWS: Add Tramp connection method "gdrive".

* lisp/net/tramp-gvfs.el (tramp-gvfs-methods) <gdrive>: Add.
(tramp-default-user-alist, tramp-default-host-alist): Add rule
for "gdrive".
(tramp-gvfs-file-attributes): Add "name", remove "standard::icon".
(tramp-gvfs-file-attributes-with-gvfs-ls-regexp): Simplify regexp.
(tramp-gvfs-get-directory-attributes): Improve loop.  Use
"standard::display-name" as file name, if available.
(tramp-gvfs-handle-file-name-all-completions): Simplify.
(tramp-gvfs-url-file-name, tramp-gvfs-handler-mounted-unmounted)
(tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec):
Map between "gdrive" and "google-drive".

* lisp/net/tramp.el (tramp-call-process): Do not signal error.

* test/lisp/net/tramp-tests.el (tramp--instrument-test-case):
Do not enable `tramp-message-show-message'.
(tramp-test13-make-directory, tramp-test14-delete-directory):
Do not specify error type.
2016-07-04 15:36:30 +02:00
Tino Calancha
05d76dba66 Calc: Update mode line after change mode
* lisp/calc/calc-ext.el (calc-change-mode): Call 'calc-set-mode-line'.
2016-07-04 16:08:55 +09:00
Mark Oteiza
ca1b9b38dc * lisp/simple.el (save-mark-and-excursion): Add declare forms. 2016-07-03 18:54:43 -04:00
Paul Eggert
838f122873 Re-fix open-network-stream responsiveness
Problem reported by Christer Ekholm (Bug#23864).
* src/process.c (wait_reading_process_output): Further fix for
typo introduced in 2015-07-06T02:19:13Z!eggert@cs.ucla.edu when
wait == INFINITY and got_output_end_time is invalid.  See:
http://bugs.gnu.org/23864#20
2016-07-04 00:47:41 +02:00