Eli Zaretskii [Fri, 6 Nov 2015 15:19:39 +0000 (17:19 +0200)]
Don't invoke overlay modification hooks in wrong buffer
* src/buffer.c (report_overlay_modification): When called with
AFTER non-zero, don't invoke overlay modification hooks if the
buffer recorded in last_overlay_modification_hooks is different
from the current buffer. (Bug#21824)
Eli Zaretskii [Thu, 5 Nov 2015 18:12:19 +0000 (20:12 +0200)]
Add test for bug #21831
* test/automated/process-tests.el
(start-process-should-not-modify-arguments): New test. (Bug#21831)
Suggested by Nicolas Richard <youngfrog@members.fsf.org>
Stefan Monnier [Wed, 4 Nov 2015 14:42:20 +0000 (09:42 -0500)]
* lisp/emacs-lisp/eieio-compat.el: Typo caught by tests
(eieio--generic-static-object-generalizer): Fix typo.
* test/automated/eieio-tests.el: Byte-compile it again.
It looks like the underlying cause of bug#17852 was fixed in the mean time.
Anders Lindgren [Wed, 4 Nov 2015 05:50:19 +0000 (06:50 +0100)]
Render fringe bitmaps correctly on NextStep (bug#21301).
The fringe bitmaps were inverted, the background was not transparent,
the image data was horizontally mirrored, and periodic fringe bitmaps
were not supported.
* nsimage.m ([EmacsImage initFromXBM:width:height:fg:bg:]): When
both background and foreground colors are 0, set the background
alpha channel to 0 (making the background transparent). When
copying the image data, do this from the most significant bit
(leftmost) to the least (rightmost), to avoid mirroring.
* nsterm.m (ns_draw_fringe_bitmap): Don't invert the image bits. Add
support for periodic images (e.g. the empty line indicator).
Stephen Leake [Tue, 3 Nov 2015 14:37:53 +0000 (08:37 -0600)]
Fix Bug#21816; case insensitive file system in elisp-mode-tests.el
* test/automated/elisp-mode-tests.el (xref-elisp-test-run): Use
case-insensitive string compare for file names.
(emacs-test-dir): Add 'downcase' to cause case differences (at least on
my system).
Ken Brown [Mon, 2 Nov 2015 16:22:51 +0000 (11:22 -0500)]
Document behavior of collation on Cygwin
* test/automated/fns-tests.el (fns-tests-collate-sort): Mark as
expected failure on Cygwin.
* doc/lispref/strings.texi (Text Comparison): Document that
punctuation and whitespace are not ignored for sorting on Cygwin.
Michael Albinus [Sun, 1 Nov 2015 12:43:35 +0000 (13:43 +0100)]
Improve completion in tramp-gvfs.el
* lisp/net/tramp-gvfs.el (tramp-zeroconf-parse-device-names):
Renamed from `tramp-zeroconf-parse-service-device-names'.
(tramp-zeroconf-parse-webdav-device-names): Removed. Code merged
with `tramp-zeroconf-parse-device-names'.
(tramp-gvfs-parse-device-names): New defun.
(top): Use it when `tramp-zeroconf-parse-device-names' is not
applicable.
* lisp/net/tramp.el (tramp-set-completion-function): The argument
could also be a zeroconf service type.
* lisp/progmodes/python.el (python-syntax-closing-paren-p): Check with
`eql' instead of `=' to accommodate the case that (syntax-after (point))
returns nil.
* test/automated/python-tests.el (python-indent-inside-paren-7):
New test.
(python-tests-with-temp-buffer, python-tests-with-temp-file):
Bind `python-indent-guess-indent-offset' to nil.
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
# Your branch is up-to-date with 'origin/master'.
#
# Changes to be committed:
# modified: test/automated/python-tests.el
#
Paul Eggert [Sat, 31 Oct 2015 02:21:29 +0000 (19:21 -0700)]
Merge from gnulib.
This incorporates:
2015-10-30 intprops: add WRAPV and const flavors for GCC 5
2015-10-25 stdalign: port to Sun C 5.9
* doc/misc/texinfo.tex, lib/intprops.h, lib/stdalign.in.h:
Copy from gnulib.
Artur Malabarba [Fri, 30 Oct 2015 15:00:37 +0000 (15:00 +0000)]
* lisp/faces.el: Refactor common code and fix a bug
(faces--attribute-at-point): New function. Fix a bug when the
face at point is a list of faces and the desired attribute is not
on the first one.
(foreground-color-at-point, background-color-at-point): Use it.
Michael Albinus [Fri, 30 Oct 2015 12:11:35 +0000 (13:11 +0100)]
Some minor fixes for tramp-gvfs.el
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-attributes):
An attribute returned by gvfs-info might be empty. In case of
undetermined uid or gid, return "UNKNOWN" or -1, respectively.
(tramp-zeroconf-parse-service-device-names): New defun.
Derived from `tramp-zeroconf-parse-workstation-device-names'.
(top): Add completion functions for "afp" and "smb" methods.
Eli Zaretskii [Fri, 30 Oct 2015 10:28:00 +0000 (12:28 +0200)]
Describe known problems with pinning Emacs to taskbar
* etc/PROBLEMS: Describe the problem with pinning Emacs to taskbar
on Windows 10. For the details, see the discussion starting at
http://lists.gnu.org/archive/html/help-emacs-windows/2015-09/msg00000.html.
(auth-source-netrc-use-gpg-tokens): Simplify (symbol-value 'VAR) to
just VAR.
(auth-source-backend-parse): Use make-instance.
(auth-source-search): Remove unused key args.
Remove unused vars `accessor-key' and `backend'. Avoid `eval'.
(auth-source-search-backends): Use slot names rather than their initarg.
(auth-source-netrc-create):
(auth-source-delete):
(auth-source-secrets-create, auth-source-plstore-search)
(auth-source-macos-keychain-create, auth-source-macos-keychain-search)
(auth-source-plstore-create, auth-source-netrc-search)
(auth-source-netrc-parse): Remove unused key args.
(auth-source-forget+): Simplify the arglist.
(auth-source-macos-keychain-search-items)
(auth-source-token-passphrase-callback-function): Mark unused args.
(auth-source-epa-extract-gpg-token): Remove unused var `plain'.
(pp-escape-newlines): Declare.
(auto-source--symbol-keyword): New function.
(auth-source-plstore-create, auth-source-netrc-create)
(auth-source-netrc-normalize): Use it.
(auth-source-netrc-search): Don't pass :delete to
auth-source-netrc-parse since it doesn't use it.
(auth-source-plstore-create, auth-source-netrc-create): Use plist-get
symbol-value to index in keyword args.
(auth-source-macos-keychain-result-append): Avoid setq.
(auth-source-netrc-create): Remove unused vars `file' and `add'.
(auth-source-user-or-password): Remove unused var `cname'.
(cl--generic-derived-specializers): New function.
(cl--generic-derived-generalizer): New generalizer.
(cl-generic-generalizers): New specializer (derived-mode MODE).
(cl--generic-split-args): Apply the rewriter, if any.
(cl-generic-define-context-rewriter): New macro.
(major-mode): Use it to define a new context-rewriter, so we can write
`(major-mode MODE)' instead of `(major-mode (derived-mode MODE))'.
* lisp/frame.el (window-system): New context-rewriter so we can write
`(window-system VAL)' instead of (window-system (eql VAL)).
(cl--generic-split-args): Apply the rewriter, if any.
(frame-creation-function): Use the new syntax.
(cl--generic-generalizer): Add `name' field.
(cl-generic-make-generalizer): Add corresponding `name' argument.
(cl-generic-define-generalizer): New macro.
(cl--generic-head-generalizer, cl--generic-eql-generalizer)
(cl--generic-struct-generalizer, cl--generic-typeof-generalizer)
(cl--generic-t-generalizer): Use it.
(cl-generic-ensure-function): Add `noerror' argument.
(cl-generic-define): Use it so we don't follow aliases.
(cl-generic-define-method): Preserve pre-existing ordering of methods.
(cl--generic-arg-specializer): New function.
(cl--generic-cache-miss): Use it.
(cl-generic-generalizers): Only fset a temporary definition
during bootstrap.
(cl--generic-struct-tag, cl--generic-struct-specializers):
Allow extra arguments.
* lisp/emacs-lisp/eieio-compat.el (eieio--generic-static-symbol-generalizer)
(eieio--generic-static-object-generalizer): Use cl-generic-define-generalizer.
(eieio--generic-static-symbol-specializers): Allow extra arguments.
* lisp/emacs-lisp/eieio-core.el (eieio--generic-generalizer)
(eieio--generic-subclass-generalizer): Use cl-generic-define-generalizer.
(eieio--generic-subclass-specializers): Allow extra arguments.
Michael Albinus [Thu, 29 Oct 2015 13:05:55 +0000 (14:05 +0100)]
Add "afp" method to Tramp
* doc/misc/tramp.texi (GVFS based methods): Describe `afp' method.
* lisp/net/tramp-gvfs.el (tramp-gvfs-methods): Add "afp" method.
(tramp-gvfs-handle-expand-file-name)
(tramp-gvfs-handler-mounted-unmounted)
(tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec)
(tramp-gvfs-maybe-open-connection): Support also "afp".
(tramp-gvfs-handle-file-attributes): Handle the case of empty
"owner::user" and "owner::group" entries.
Vibhav Pant [Wed, 28 Oct 2015 17:07:34 +0000 (22:37 +0530)]
Fix eshell/clear not working if the output has a small line count
* lisp/eshell/esh-mode.el: (eshell/clear): Use (window-size) as the
number of newlines to be inserted. This fixes the issue where
eshell/clear wouldn't work if the prompt was not at the bottom of the
window, and the output wasn't too long.
(macroexp-unprogn): Make sure we never return an empty list.
(macroexp-if): Remove unused (and unsafe) optimization.
Optimize (if A T (if B T E)) into (if (or A B) T E) instead, which does
occur occasionally.
* lisp/simple.el (delete-trailing-whitespace): Save match data when
calling `skip-syntax-backward'.
* test/automated/simple-test.el (simple-delete-trailing-whitespace):
New test.
Artur Malabarba [Wed, 28 Oct 2015 15:03:47 +0000 (15:03 +0000)]
* lisp/character-fold.el: Make compatible with lax-whitespace
(character-fold-to-regexp): Rework internals to play nice with
lax-whitespacing.
When the user types a space, we want to match the table entry for
?\s, which is generally a regexp like "[ ...]". However, the
`search-spaces-regexp' variable doesn't "see" spaces inside these
regexp constructs, so we need to use "\\( \\|[ ...]\\)" instead (to
manually expose a space).
Furthermore, the lax search engine acts on a bunch of spaces, not
on individual spaces, so if the string contains sequential spaces
like " ", we need to keep them grouped together like this:
"\\( \\|[ ...][ ...]\\)".