Commit graph

67399 commits

Author SHA1 Message Date
Mark Oteiza
098d29af10 Revert "Add a couple cells to lisp-prettify-symbols-alist"
This reverts commit bdda4855c6.
2016-07-14 18:23:40 -04:00
Stefan Monnier
0ea47a6159 * lisp/simple.el (shell-command): Add save-match-data comment 2016-07-14 09:45:05 -04:00
Alan Mackenzie
d0dc74a3a8 CC Mode: correct incorrect invocation of parse-partial-sexp.
Fixes bug #23944.

* lisp/progmodes/cc-engine.el (c-literal-limits): make the sixth argument of
an invocation of parse-partial-sexp 'syntax-table, not the fourth.
2016-07-14 12:42:17 +00:00
Stephen Berman
a8e1414c0d Fix delete-duplicate-lines
* lisp/sort.el (delete-duplicate-lines): Delete duplicate
first line when operating backward (bug#23863).
2016-07-14 09:55:28 +02:00
Katsumi Yamaoka
288ba2d406 * lisp/gnus/mm-decode.el (mm-convert-shr-links):
Use shr-image-map instead of shr-map (bug#23964).
2016-07-14 02:19:24 +00:00
Stefan Monnier
d2533d7268 * lisp/mouse.el (mouse): Consolidate group definition here
* lisp/cus-edit.el (mouse): Remove both group definitions.
2016-07-13 11:08:21 -04:00
Chris Feng
96bd07a322 Include versioned preloaded libraries in `package--builtin-versions'
* lisp/emacs-lisp/autoload.el (update-directory-autoloads): Do not
exclude preloaded libraries or remove entries generated for them.
(autoload-generate-file-autoloads): Do not generate autoload
statements for preloaded libraries.
2016-07-13 19:58:10 +08:00
Tino Calancha
cff2f4606d Escape meta chars in commands processed by shell
* lisp/progmodes/grep.el (grep-compute-defaults): Quote braces
in all commands to be passed to a shell (Bug#23959).
2016-07-13 13:27:33 +09:00
Stefan Monnier
9c8c3a5478 * lisp/emacs-lisp/cl-macs.el (cl--prog): New function
(cl-prog, cl-prog*): New macros.
2016-07-12 12:05:01 -04:00
Stefan Monnier
3698c4e475 * cl-generic.el (cl-defmethod): Make docstring dynamic
* lisp/emacs-lisp/cl-generic.el (cl-defmethod): Make docstring dynamic.
(cl--generic-make-defmethod-docstring): New function for that.
(cl-defmethod, cl-generic-generalizers): Tweak docstrings accordingly.
(cl-generic-define-method, cl--generic-describe): Change `load-history'
format of cl-defmethods, so as not to confused methods with equal
specializers but different qualifiers.
* lisp/emacs-lisp/eieio-core.el (cl-generic-generalizers): Provide docstrings.
2016-07-12 12:04:01 -04:00
Alan Mackenzie
a1db933c5b Amend CC Mode to handle big C++ raw strings correctly.
Problems were caused by such a string spanning jit-lock chunks, and by a flaw
in the +-500 bytes boundaries imposed for macros.

* lisp/progmodes/cc-mode.el (c-extend-region-for-CPP): Check the +-500 byte
macro boundaries here.
(c-extend-font-lock-region-for-macros): Remove the check on the +-500 byte
lower boundary.  Fix the check on the upper boundary.

* lisp/progmodes/cc-fonts.el (c-font-lock-raw-strings): Handle the starting
point already being within a raw string.

* lisp/progmodes/cc-engine.el (c-raw-string-pos)
(c-depropertize-raw-strings-in-region, c-after-change-re-mark-raw-strings):
Modify regexp element "\\{,16\\}" to "\\{0,16\\}" for greater compatibility
with other Emacsen.
2016-07-12 13:16:02 +00:00
Stephen Berman
2f67f8a145 * lisp/mouse.el (mouse-select-region-move-to-beginning): Add :group. 2016-07-12 10:43:24 +02:00
Mark Oteiza
69b79bdff0 ; Remove parens from sentence in docstring. 2016-07-11 14:37:54 -04:00
Stefan Monnier
7af6c87b50 Prevent to apply funcall on t
* lisp/vc/ediff-util.el (ediff-really-quit): Ignore the global part of
'ediff-after-quit-hook-internal' hook (Bug#23933).
2016-07-12 00:55:04 +09:00
Tino Calancha
713e922243 Ignore angle mode while simplifying units
* lisp/calc/calc-forms.el (math-to-hms, math-from-hms):
Ignore value of 'calc-angle-mode' when 'math-simplifying-units'
is non-nil (Bug#23889).
* lisp/calc/calc-math.el (math-to-radians, math-from-radians)
(math-from-radians-2, math-to-radians-2): Idem.
2016-07-12 00:38:14 +09:00
Tino Calancha
df7774be39 Dired always read file system
* dired.el (dired-always-read-filesystem): Add new option.
(dired-mark-files-containing-regexp): Use it (Bug#22694).
* doc/emacs/dired.texi: Mention it in the manual.
* test/lisp/dired-tests.el (dired-test-bug22694): Add test.
;* etc/NEWS: Add entry for this change.
2016-07-11 14:34:49 +09:00
Tino Calancha
8dc4626a0b Avoid 'unused var' 'not left unused var' warnings
* lisp/ibuffer.el (ibuffer-locked-buffer-p): Remove unused var 'char'.
Rename used var '_buffer' to 'cbuffer'.

* lisp/ibuf-ext.el (ibuffer-unmark-all): Rename used var '_mark'
to cmark'.
2016-07-11 11:30:48 +09:00
Tino Calancha
244754e2b2 * lisp/simple.el (shell-command, shell-command-on-region): Fix doc strings 2016-07-11 02:47:28 +09: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
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
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
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
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
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
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
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
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