]> git.eshelyaron.com Git - emacs.git/log
emacs.git
8 years agoBackport: * lisp/emacs-lisp/package.el: Fix a decoding issue.
Artur Malabarba [Sun, 15 Nov 2015 21:28:37 +0000 (21:28 +0000)]
Backport: * lisp/emacs-lisp/package.el: Fix a decoding issue.

* lisp/url/url-handlers.el (url-insert-file-contents): Move some code to
`url-insert-buffer-contents'.
(url-insert-buffer-contents): New function

(package--with-response-buffer): Use `url-insert-buffer-contents'.
The previous code had some issues with decoding. Refactoring that
function allows us to use the decoding from url-handlers while still
treating both sync and async requests the same.

8 years agoImprove a few doc strings, comments
Stephen Leake [Sat, 14 Nov 2015 22:44:58 +0000 (16:44 -0600)]
Improve a few doc strings, comments

* lisp/cedet/cedet-global.el (cedet-gnu-global-expand-filename):
* lisp/cedet/ede/locate.el (ede-locate-base):
* lisp/cedet/semantic/symref.el (semantic-symref-calculate-rootdir):
* src/fns.c (Fdelq): Improve doc string.

* lisp/progmodes/elisp-mode.el (elisp--xref-find-definitions): Add FIXME.

8 years agoEnhance NSTRACE (trace output for NextStep).
Anders Lindgren [Sun, 15 Nov 2015 19:19:34 +0000 (20:19 +0100)]
Enhance NSTRACE (trace output for NextStep).

Trace can be disabled for groups of functions. By default, event
functions and functions that generate lots of output are disabled.

Trace output of Objective-C functions now use the "[ClassName
parameter:]" form.

* src/nsterm.h (NSTRACE_ALL_GROUPS, NSTRACE_GROUP_EVENTS)
(NSTRACE_GROUP_UPDATES, NSTRACE_GROUP_FRINGE, NSTRACE_GROUP_COLOR)
(NSTRACE_GROUP_GLYPHS, NSTRACE_GROUP_FOCUS): New macros,
controlling in which function groups trace should be active.
(NSTRACE_WHEN): Support for silencing a function, this also
silencing all called functions.
(NSTRACE_UNSILENCE): New macro, used to re-enable trace.
(NSTRACE_FMT_FSTYPE, NSTRACE_ARG_FSTYPE): New macros, used to
print the full screen state in NSTRACE functions.

* src/nsterm.m (nstrace_depth, nstrace_num): Made volatile as they
can be accessed from multiple threads.
(nstrace_enabled_global): New variable, when FALSE, trace is
silenced.
(nstrace_restore_global_trace_state): New function, used to
restore `nstrace_enabled_global' at end of block.
([EmacsView setFrame:], [EmacsWindow setFrame:display:])
([EmacsWindow setFrame:display:animation:])
([EmacsWindow setFrameTopLeftPoint:]): New functions, print trace
and call corresponding super function.
(Many functions): Add or enhance trace output.

* src/nsimage.m (ns_image_from_file): Enhanced trace output.

* src/nsfns.m (x_set_tool_bar_lines): Add trace output.

* src/nsmenu.m ([EmacsToolbar setVisible:]): New function, print trace
and call corresponding super function.

8 years ago; Cleanup of change log. Removed obsolete email addresses.
Anders Lindgren [Sun, 15 Nov 2015 18:28:32 +0000 (19:28 +0100)]
; Cleanup of change log. Removed obsolete email addresses.

8 years agoFixed a toolbar related issue on OS X.
Anders Lindgren [Sun, 15 Nov 2015 18:17:53 +0000 (19:17 +0100)]
Fixed a toolbar related issue on OS X.

Earlier, when toggling the tool-bar in a maximized frame, the
frame size didn't match the number of text lines, leaving an
unused area at the bottom of the frame.

* nsfns.m (x_set_tool_bar_lines): Exit maximized and full height
fullscreen modes when tool bar is disabled.

8 years agoFixed OS X 10.6.8 build issue (bug#21862).
Anders Lindgren [Sun, 15 Nov 2015 17:46:04 +0000 (18:46 +0100)]
Fixed OS X 10.6.8 build issue (bug#21862).

* src/nsterm.h (EmacsView): Add missing declarations.
* src/nsterm.m ([EmacsView windowDidBecomeKey]): New method, like
the standard method but without the notification parameter.
Intended to be used for direct calls.
([EmacsView windowDidEnterFullScreen]): Call the non-notification
version of `windowDidBecomeKey'. Made the notification method call
the non-notification method instead of the vice versa.
(NSWindowDidEnterFullScreenNotification): Deleted, no longer
needed.

8 years ago* lisp/faces.el (faces--attribute-at-point): Fix an issue
Artur Malabarba [Sun, 15 Nov 2015 18:42:20 +0000 (18:42 +0000)]
* lisp/faces.el (faces--attribute-at-point): Fix an issue

Previous code would signal an error when the face at point was
a manually built list of attributes such as '(:foregroud "white").

* test/automated/faces-tests.el (faces--test-color-at-point): Add a test

8 years agoFix regex abort when it tries to reenter itself
Paul Eggert [Sun, 15 Nov 2015 09:14:39 +0000 (01:14 -0800)]
Fix regex abort when it tries to reenter itself

Problem reported by Ken Raeburn.
Solution suggested by Stefan Monnier (Bug#21688).
* src/regex.c (re_match_2_internal):
Use new _FAST functions to avoid regex code reentering itself.
* src/syntax.c (update_syntax_table_forward): New arg PROPERTIZE.
All callers changed.
* src/syntax.h (UPDATE_SYNTAX_TABLE_FORWARD_FAST)
(UPDATE_SYNTAX_TABLE_FAST): New inline functions.

8 years agoImprove Ruby 1.9-style keyword keys highlighting
Dmitry Gutov [Sun, 15 Nov 2015 05:25:19 +0000 (07:25 +0200)]
Improve Ruby 1.9-style keyword keys highlighting

* lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords):
Handle required keyword arguments (bug#21367).
And highlight the colon together with the name.

8 years agoUnify the absolutely equal xref-backend-references implementations
Dmitry Gutov [Sun, 15 Nov 2015 05:00:45 +0000 (07:00 +0200)]
Unify the absolutely equal xref-backend-references implementations

* lisp/progmodes/elisp-mode.el (xref-backend-references):
Remove.

* lisp/progmodes/etags.el (xref-backend-references):
Remove.

* lisp/progmodes/xref.el (xref-backend-references):
Define the default implementation.

8 years agoUpdate project-find-regexp for the new xref API
Dmitry Gutov [Sun, 15 Nov 2015 04:31:51 +0000 (06:31 +0200)]
Update project-find-regexp for the new xref API

* lisp/progmodes/project.el (project--read-regexp):
Update to use the new xref API methods.

* lisp/progmodes/xref.el (xref-find-backend): Autoload.

8 years agoFix replacing a match with a shorter string
Dmitry Gutov [Sun, 15 Nov 2015 03:59:34 +0000 (05:59 +0200)]
Fix replacing a match with a shorter string

In effect, partially reverting fe973fc.

* lisp/progmodes/xref.el (xref-query-replace): Store the end
of each match as a marker again, instead of length.
(xref--query-replace-1): Update accordingly.

8 years ago* lisp/progmodes/xref.el (xref-pop-marker-stack): Downgrade errors
Artur Malabarba [Sat, 14 Nov 2015 21:13:12 +0000 (21:13 +0000)]
* lisp/progmodes/xref.el (xref-pop-marker-stack): Downgrade errors

Signal user-errors instead.

8 years agoDocument 'describe-symbol'
Eli Zaretskii [Sat, 14 Nov 2015 20:02:26 +0000 (22:02 +0200)]
Document 'describe-symbol'

* doc/emacs/help.texi (Help Summary): Mention "C-h o".
(Name Help): Document "C-h o" and describe-symbol.

* lisp/help-fns.el (describe-symbol): Doc fix.

8 years agoChange test name to avoid spellcheck issue.
Paul Eggert [Sat, 14 Nov 2015 19:48:16 +0000 (11:48 -0800)]
Change test name to avoid spellcheck issue.

8 years ago; * etc/NEWS: Minor improvements in wording.
Eli Zaretskii [Sat, 14 Nov 2015 19:38:47 +0000 (21:38 +0200)]
; * etc/NEWS: Minor improvements in wording.

8 years agoAvoid signaling an error in 'describe-symbol'
Eli Zaretskii [Sat, 14 Nov 2015 17:27:52 +0000 (19:27 +0200)]
Avoid signaling an error in 'describe-symbol'

* lisp/help-fns.el (describe-symbol): Avoid errors when the symbol
exists as a function/variable/face/etc., but is undocumented.

* test/automated/help-fns.el (help-fns-test-describe-symbol): New
test.

8 years ago; * etc/NEWS: Fix formatting
Eli Zaretskii [Sat, 14 Nov 2015 16:25:24 +0000 (18:25 +0200)]
; * etc/NEWS: Fix formatting

8 years ago; * etc/NEWS: Some easily fixed documentation marks
Eli Zaretskii [Sat, 14 Nov 2015 16:22:45 +0000 (18:22 +0200)]
; * etc/NEWS: Some easily fixed documentation marks

8 years ago* INSTALL (--with-cairo): Document this new configure option.
Eli Zaretskii [Sat, 14 Nov 2015 16:20:36 +0000 (18:20 +0200)]
* INSTALL (--with-cairo): Document this new configure option.

8 years agoDocument that GNU Make >= 3.81 is required to build Emacs
Eli Zaretskii [Sat, 14 Nov 2015 16:12:25 +0000 (18:12 +0200)]
Document that GNU Make >= 3.81 is required to build Emacs

* doc/lispref/internals.texi (Building Emacs): Document that GNU
Make 3.81 or later is now required.

8 years agoBackport: * lisp/emacs-lisp/package.el: Refactor -with-work-buffer-async.
Artur Malabarba [Sat, 14 Nov 2015 15:44:44 +0000 (15:44 +0000)]
Backport: * lisp/emacs-lisp/package.el: Refactor -with-work-buffer-async.

(package--with-work-buffer-async): Reimplement as
`package--with-response-buffer'.
(package--with-work-buffer): Mark obsolete.
(package--with-response-buffer): New macro. This is a more self
contained and less contrived version of
`package--with-work-buffer-async'.  It uses keyword arguments,
doesn't have async on the name, doesn't fallback on
`package--with-work-buffer', and has _much_ simpler error
handling.  On master, this macro will soon be part of another
library (either standalone or inside url.el), which is why this
commit is not to be merged back.

(package--check-signature, package--download-one-archive)
(package-install-from-archive, describe-package-1): Use it.

(package--download-and-read-archives): Let
`package--download-one-archive' take care of calling
`package--update-downloads-in-progress'.

8 years ago* CONTRIBUTE (Branches): Improve wording for back-ported commits.
Eli Zaretskii [Sat, 14 Nov 2015 11:52:34 +0000 (13:52 +0200)]
* CONTRIBUTE (Branches): Improve wording for back-ported commits.

8 years agoMerge branch 'master' into emacs-25
Dmitry Gutov [Sat, 14 Nov 2015 11:02:35 +0000 (13:02 +0200)]
Merge branch 'master' into emacs-25

8 years ago; Fix warnings
Dmitry Gutov [Sat, 14 Nov 2015 01:03:58 +0000 (03:03 +0200)]
; Fix warnings

* lisp/vc/diff-mode.el (diff-kill-applied-hunks):
Fix unused variable warnings.

8 years ago; Update xref-etags-mode for the latest change
Dmitry Gutov [Sat, 14 Nov 2015 00:40:06 +0000 (02:40 +0200)]
; Update xref-etags-mode for the latest change

8 years agoUse generic dispatch for xref backends
Dmitry Gutov [Sat, 14 Nov 2015 00:37:01 +0000 (02:37 +0200)]
Use generic dispatch for xref backends

* lisp/progmodes/xref.el (xref-backend-functions):
New variable.
(xref-find-function): Remove.
(xref-find-backend)
(xref--etags-backend): New functions.
(xref-identifier-at-point-function)
(xref-identifier-completion-table-function): Remove.
(xref-backend-definitions, xref-backend-references)
(xref-backend-apropos, xref-backend-identifier-at-point)
(xref-backend-identifier-completion-table):
New generic functions.

* lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Add
`elisp--xref-backend' to the beginning of
`xref-backend-functions', locally.  Delete references to
removed functions and vars.
(elisp-xref-find): Remove.
(elisp--xref-backend): New function.
(elisp--xref-find-references, elisp--xref-find-apropos)
(elisp--xref-identifier-completion-table):
Turn into appropriately named generic methods.

* lisp/progmodes/etags.el (etags-xref-find): Remove.
(xref-backend-identifier-completion-table)
(xref-backend-references, xref-backend-definitions)
(xref-backend-apropos): New generic methods.

8 years agoSupport rectangular regions for more commands
Juri Linkov [Fri, 13 Nov 2015 23:28:03 +0000 (01:28 +0200)]
Support rectangular regions for more commands

* lisp/simple.el (region-extract-function): Handle the arg value ‘bounds’.
(region-insert-function): New function.
(shell-command-on-region): Add arg ‘region-noncontiguous-p’.
If non-nil, operate on multiple chunks.
(region-noncontiguous-p): New function.

* lisp/rect.el: Add function rectangle--insert-region
around region-insert-function.
(extract-rectangle-bounds): New function.
(rectangle--extract-region): Handle the arg value ‘bounds’.
(rectangle--insert-region): New function.

* lisp/emulation/cua-rect.el: Add function cua--insert-rectangle
around region-insert-function.
(cua--extract-rectangle-bounds): New function.
(cua--rectangle-region-extract): Handle the arg value ‘bounds’.

* lisp/replace.el (query-replace, query-replace-regexp): Add arg
‘region-noncontiguous-p’.  Use ‘use-region-p’.
(query-replace-regexp-eval, map-query-replace-regexp)
(replace-string, replace-regexp): Use ‘use-region-p’.
(keep-lines, flush-lines, how-many): Use ‘use-region-p’.
(perform-replace): Add arg ‘region-noncontiguous-p’.
If non-nil, operate on multiple chunks.

* src/casefiddle.c (Fdowncase_region): Add arg ‘region-noncontiguous-p’.
If non-nil, operate on multiple chunks. (Bug#19829)

8 years agoHandle multiple matches on the same line; add highlighting
Dmitry Gutov [Mon, 9 Nov 2015 03:24:23 +0000 (05:24 +0200)]
Handle multiple matches on the same line; add highlighting

* lisp/progmodes/xref.el (xref-location-marker): Interpret the
column value in characters.
(xref--collect-matches): Rename from `xref--collect-match'.
Search for all matches in the hit line.  Add `highlight' face to
the matched region in the summary.  Update both callers.

8 years agoReplace xref-match-bounds with xref-match-length
Dmitry Gutov [Sun, 8 Nov 2015 03:01:05 +0000 (05:01 +0200)]
Replace xref-match-bounds with xref-match-length

Relying on xref-location-marker to point to the beginning of the match

* lisp/progmodes/xref.el (xref-match-bounds): Remove.
(xref-match-length): Add.
(xref-make-match): Change the arguments.
(xref--match-buffer-bounds): Remove.
(xref-match-item): Store length, instead of end-column.
(xref-pulse-momentarily)
(xref--collect-match)
(xref--query-replace-1): Update accordingly.
(xref-query-replace): Ditto.  And check that the search results
are up-to-date.

8 years agoMerge remote-tracking branch 'origin/master' into emacs-25
John Wiegley [Fri, 13 Nov 2015 22:41:41 +0000 (14:41 -0800)]
Merge remote-tracking branch 'origin/master' into emacs-25

8 years agoMerge branch 'erc-async-reconnect' into emacs-25
l3thal [Fri, 13 Nov 2015 21:37:26 +0000 (16:37 -0500)]
Merge branch 'erc-async-reconnect' into emacs-25

8 years agoReconnect asynchronously.
l3thal [Fri, 13 Nov 2015 21:34:32 +0000 (16:34 -0500)]
Reconnect asynchronously.

8 years agoMerge from gnulib
Paul Eggert [Fri, 13 Nov 2015 20:39:13 +0000 (12:39 -0800)]
Merge from gnulib

This incorporates:
2015-11-13 xalloc-oversized: improve performance with GCC 5
* lib/xalloc-oversized.h: Copy from gnulib.

8 years agoSpruce up ftfont.c memory allocation
Paul Eggert [Fri, 13 Nov 2015 20:02:21 +0000 (12:02 -0800)]
Spruce up ftfont.c memory allocation

* src/ftfont.c (setup_otf_gstring):
Avoid O(N**2) behavior when reallocating.
(ftfont_shape_by_flt): Prefer xpalloc to xrealloc when
reallocating buffers; this simplifies the code.  Do not trust
mflt_run to leave the output areas unchanged on failure, as
this isn’t part of its interface spec.

8 years agoMerge branch 'emacs-25' of git.savannah.gnu.org:/srv/git/emacs into emacs-25
Eli Zaretskii [Fri, 13 Nov 2015 20:03:12 +0000 (22:03 +0200)]
Merge branch 'emacs-25' of git.savannah.gnu.org:/srv/git/emacs into emacs-25

8 years agoPort recent XCB changes to 64-bit ‘long int’
Paul Eggert [Fri, 13 Nov 2015 17:28:53 +0000 (09:28 -0800)]
Port recent XCB changes to 64-bit ‘long int’

For historical reasons, libX11 represents 32-bit values like Atoms as
‘long int’ even on platforms where ‘long int’ is 64 bits.  XCB doesn’t
do that, so adapt the recent XCB code to behave properly on 64-bit
platforms.  Also, fix what appears to be a bug in the interpretation
of xcb_get_property_value_length, at least on my Fedora platform
which is running libxcb-1.11-5.fc21.
* src/xfns.c (x_real_pos_and_offsets):
* src/xterm.c (get_current_wm_state):
xcb_get_property_value_length returns a byte count, not a word count.
For 32-bit quantities, xcb_get_property_value returns a vector
of 32-bit words, not of (possibly 64-bit) long int.

Backport.

8 years ago* src/undo.c (run_undoable_change): Now static.
Paul Eggert [Fri, 13 Nov 2015 16:44:14 +0000 (08:44 -0800)]
* src/undo.c (run_undoable_change): Now static.

Backport.

8 years agoRemove support for ':timeout' from w32 tray notifications
Eli Zaretskii [Fri, 13 Nov 2015 13:33:29 +0000 (15:33 +0200)]
Remove support for ':timeout' from w32 tray notifications

* src/w32fns.c (Fw32_notification_notify): Delete the code that
supports ':timeout'.
(syms_of_w32fns): Don't DEFSYM ':timeout'.  This avoids clashes
with dbusbind.c when D-Bus is compiled in.

* doc/lispref/os.texi (Desktop Notifications): Don't mention
':timeout'.

Backport.

8 years ago* test/automated/simple-test.el: Add test for bug#20698 (bug#21885)
Juanma Barranquero [Fri, 13 Nov 2015 13:09:35 +0000 (14:09 +0100)]
* test/automated/simple-test.el: Add test for bug#20698 (bug#21885)

(simple-test--transpositions): New macro.
(simple-transpose-subr): New test.

Backport.

8 years ago* lisp/progmodes/elisp-mode.el: Declare function `project-roots'
Juanma Barranquero [Fri, 13 Nov 2015 10:04:10 +0000 (11:04 +0100)]
* lisp/progmodes/elisp-mode.el: Declare function `project-roots'

Backport.

8 years ago* src/undo.c: Small fixes for previous change
Juanma Barranquero [Fri, 13 Nov 2015 09:56:28 +0000 (10:56 +0100)]
* src/undo.c: Small fixes for previous change

(run_undoable_change): Mark void argument list.
(record_property_change): Remove unused variable `boundary'.

Backport.

8 years agoAdd a few more variables to redisplay--variables
Eli Zaretskii [Fri, 13 Nov 2015 09:56:08 +0000 (11:56 +0200)]
Add a few more variables to redisplay--variables

* lisp/frame.el (redisplay--variables): Add bidi-paragraph-direction
and bidi-display-reordering to the list.

Backport.

8 years ago* lisp/loadup.el: Enlarge the size of the hash table to 80000.
Eli Zaretskii [Fri, 13 Nov 2015 09:52:53 +0000 (11:52 +0200)]
* lisp/loadup.el: Enlarge the size of the hash table to 80000.

Backport.

8 years agoFix point positioning after transposing with negative arg
Eli Barzilay [Fri, 13 Nov 2015 09:46:20 +0000 (11:46 +0200)]
Fix point positioning after transposing with negative arg

* lisp/simple.el (transpose-subr): When invoked with a negative
argument, move point to after the transposed text, like we do
when invoked with a positive argument.  (Bug#21885)

Backport.

8 years agoFix last change in shr.el
Eli Zaretskii [Fri, 13 Nov 2015 09:23:35 +0000 (11:23 +0200)]
Fix last change in shr.el

* lisp/net/shr.el (shr--have-one-fringe-p): Rename from
have-fringes-p.  All callers changed.  Doc fix.  (Bug#21895)

Backport.

8 years agoFix last change
Eli Zaretskii [Fri, 13 Nov 2015 09:07:43 +0000 (11:07 +0200)]
Fix last change

* src/w32fns.c (syms_of_w32fns) [WINDOWSNT && !HAVE_DBUS]:
Don't DEFSYM tray notification symbols if D-Bus is being used.

Backport.

8 years agoAnother fix for MinGW64 and Cygwin builds due to notifications
Eli Zaretskii [Fri, 13 Nov 2015 09:02:04 +0000 (11:02 +0200)]
Another fix for MinGW64 and Cygwin builds due to notifications

* src/w32fns.c: Ifdef away tray notification code if D-Bus is
being compiled into Emacs.
(syms_of_w32fns) [WINDOWSNT && !HAVE_DBUS]: Don't defsubr
Sw32_notification_notify and Sw32_notification_close if the code
is not compiled.  Reported by Andy Moreton <andrewjmoreton@gmail.com>.

Backport.

8 years agoRemove intern calls and XXX comments from Fx_export_frames
YAMAMOTO Mitsuharu [Fri, 13 Nov 2015 03:48:09 +0000 (12:48 +0900)]
Remove intern calls and XXX comments from Fx_export_frames

* src/xfns.c (Fx_export_frames): Use Qpdf, Qpng, Qpostscript, and
Qsvg instead of intern calls.  Use "postscript" instead of "ps"
for consistency with image types.  Remove XXX comments.
(syms_of_xfns) <Qpdf>: DEFSYM it.

Backport.

8 years agoPort recent XCB changes to 64-bit ‘long int’
Paul Eggert [Fri, 13 Nov 2015 17:28:53 +0000 (09:28 -0800)]
Port recent XCB changes to 64-bit ‘long int’

For historical reasons, libX11 represents 32-bit values like Atoms as
‘long int’ even on platforms where ‘long int’ is 64 bits.  XCB doesn’t
do that, so adapt the recent XCB code to behave properly on 64-bit
platforms.  Also, fix what appears to be a bug in the interpretation
of xcb_get_property_value_length, at least on my Fedora platform
which is running libxcb-1.11-5.fc21.
* src/xfns.c (x_real_pos_and_offsets):
* src/xterm.c (get_current_wm_state):
xcb_get_property_value_length returns a byte count, not a word count.
For 32-bit quantities, xcb_get_property_value returns a vector
of 32-bit words, not of (possibly 64-bit) long int.

8 years ago* src/undo.c (run_undoable_change): Now static.
Paul Eggert [Fri, 13 Nov 2015 16:44:14 +0000 (08:44 -0800)]
* src/undo.c (run_undoable_change): Now static.

8 years agoAdapt Tramp version, do not merge with master
Michael Albinus [Fri, 13 Nov 2015 16:41:55 +0000 (17:41 +0100)]
Adapt Tramp version, do not merge with master

* doc/misc/trampver.texi (trampver):
* lisp/net/trampver.el (tramp-version): Set to "2.2.13-25.1".

8 years agoRemove support for ':timeout' from w32 tray notifications
Eli Zaretskii [Fri, 13 Nov 2015 13:33:29 +0000 (15:33 +0200)]
Remove support for ':timeout' from w32 tray notifications

* src/w32fns.c (Fw32_notification_notify): Delete the code that
supports ':timeout'.
(syms_of_w32fns): Don't DEFSYM ':timeout'.  This avoids clashes
with dbusbind.c when D-Bus is compiled in.

* doc/lispref/os.texi (Desktop Notifications): Don't mention
':timeout'.

8 years ago* test/automated/simple-test.el: Add test for bug#20698 (bug#21885)
Juanma Barranquero [Fri, 13 Nov 2015 13:09:35 +0000 (14:09 +0100)]
* test/automated/simple-test.el: Add test for bug#20698 (bug#21885)

(simple-test--transpositions): New macro.
(simple-transpose-subr): New test.

8 years ago* lisp/progmodes/elisp-mode.el: Declare function `project-roots'
Juanma Barranquero [Fri, 13 Nov 2015 10:04:10 +0000 (11:04 +0100)]
* lisp/progmodes/elisp-mode.el: Declare function `project-roots'

8 years ago* src/undo.c: Small fixes for previous change
Juanma Barranquero [Fri, 13 Nov 2015 09:56:28 +0000 (10:56 +0100)]
* src/undo.c: Small fixes for previous change

(run_undoable_change): Mark void argument list.
(record_property_change): Remove unused variable `boundary'.

8 years agoAdd a few more variables to redisplay--variables
Eli Zaretskii [Fri, 13 Nov 2015 09:56:08 +0000 (11:56 +0200)]
Add a few more variables to redisplay--variables

* lisp/frame.el (redisplay--variables): Add bidi-paragraph-direction
and bidi-display-reordering to the list.

8 years ago* lisp/loadup.el: Enlarge the size of the hash table to 80000.
Eli Zaretskii [Fri, 13 Nov 2015 09:52:53 +0000 (11:52 +0200)]
* lisp/loadup.el: Enlarge the size of the hash table to 80000.

8 years agoFix point positioning after transposing with negative arg
Eli Barzilay [Fri, 13 Nov 2015 09:46:20 +0000 (11:46 +0200)]
Fix point positioning after transposing with negative arg

* lisp/simple.el (transpose-subr): When invoked with a negative
argument, move point to after the transposed text, like we do
when invoked with a positive argument.  (Bug#21885)

8 years agoFix last change in shr.el
Eli Zaretskii [Fri, 13 Nov 2015 09:23:35 +0000 (11:23 +0200)]
Fix last change in shr.el

* lisp/net/shr.el (shr--have-one-fringe-p): Rename from
have-fringes-p.  All callers changed.  Doc fix.  (Bug#21895)

8 years agoFix last change
Eli Zaretskii [Fri, 13 Nov 2015 09:07:43 +0000 (11:07 +0200)]
Fix last change

* src/w32fns.c (syms_of_w32fns) [WINDOWSNT && !HAVE_DBUS]:
Don't DEFSYM tray notification symbols if D-Bus is being used.

8 years agoAnother fix for MinGW64 and Cygwin builds due to notifications
Eli Zaretskii [Fri, 13 Nov 2015 09:02:04 +0000 (11:02 +0200)]
Another fix for MinGW64 and Cygwin builds due to notifications

* src/w32fns.c: Ifdef away tray notification code if D-Bus is
being compiled into Emacs.
(syms_of_w32fns) [WINDOWSNT && !HAVE_DBUS]: Don't defsubr
Sw32_notification_notify and Sw32_notification_close if the code
is not compiled.  Reported by Andy Moreton <andrewjmoreton@gmail.com>.

9 years agoRemove intern calls and XXX comments from Fx_export_frames
YAMAMOTO Mitsuharu [Fri, 13 Nov 2015 03:48:09 +0000 (12:48 +0900)]
Remove intern calls and XXX comments from Fx_export_frames

* src/xfns.c (Fx_export_frames): Use Qpdf, Qpng, Qpostscript, and
Qsvg instead of intern calls.  Use "postscript" instead of "ps"
for consistency with image types.  Remove XXX comments.
(syms_of_xfns) <Qpdf>: DEFSYM it.

9 years agoshr: don't invoke unbound function (Bug#21895)
Eric Hanchrow [Fri, 13 Nov 2015 01:23:37 +0000 (17:23 -0800)]
shr: don't invoke unbound function (Bug#21895)

* lisp/net/shr.el (have-fringes-p): New function.
  (shr-insert-document, shr-fill-text): Use it.

9 years ago* test/automated/keymaps-test.el: Fix test to make it repeatable
Juanma Barranquero [Thu, 12 Nov 2015 22:36:33 +0000 (23:36 +0100)]
* test/automated/keymaps-test.el: Fix test to make it repeatable

(keymap-store_in_keymap-FASTINT-on-nonchars): Reset Buffer-menu-mode-map
entry to its initial value to make the test repeatable in interactive
sessions (assuming it doesn't fail and crashes Emacs, of course).

9 years ago* test/automated/cl-lib-tests.el (cl-lib-struct-constructors): Small fix
Artur Malabarba [Thu, 12 Nov 2015 23:32:40 +0000 (23:32 +0000)]
* test/automated/cl-lib-tests.el (cl-lib-struct-constructors): Small fix

9 years ago: Tests for undo-auto functionality.
Phillip Lord [Thu, 12 Nov 2015 22:18:59 +0000 (22:18 +0000)]
: Tests for undo-auto functionality.

9 years ago; Merge branch 'fix/no-undo-boundary-on-secondary-buffer-change'
Phillip Lord [Thu, 12 Nov 2015 22:01:22 +0000 (22:01 +0000)]
; Merge branch 'fix/no-undo-boundary-on-secondary-buffer-change'

Conflicts:
src/cmds.c
src/keyboard.c

9 years agoThe heuristic that Emacs uses to add an `undo-boundary' has been
Phillip Lord [Thu, 6 Aug 2015 20:33:58 +0000 (21:33 +0100)]
The heuristic that Emacs uses to add an `undo-boundary' has been
reworked, as it interacts poorly with functions on `post-command-hook'
or `after-change-functions'.

* lisp/simple.el: New section added.
* src/cmds.c (remove_excessive_undo_boundaries): Now in lisp.
(self_insert_command): Calls simple.el to amalgamate.
(delete_char): Calls simple.el to amalgamate.
* src/keyboard.c (last_undo_boundary): Removed.
* src/undo.c (run_undoable_change): New function.

9 years agoBind [?\S-\ ] to previous line command in Dired-like modes.
Juri Linkov [Thu, 12 Nov 2015 20:54:01 +0000 (22:54 +0200)]
Bind [?\S-\ ] to previous line command in Dired-like modes.

* lisp/arc-mode.el (archive-mode-map):
* lisp/dired.el (dired-mode-map):
* lisp/proced.el (proced-mode-map):
* lisp/vc/vc-dir.el (vc-dir-mode-map):
Bind [?\S-\ ] to previous line command.
(Bug#20790)

9 years agoFix the MinGW64 and Cygwin-w32 builds
Eli Zaretskii [Thu, 12 Nov 2015 20:40:31 +0000 (22:40 +0200)]
Fix the MinGW64 and Cygwin-w32 builds

* src/w32fns.c (MYNOTIFYICONDATAW_V1_SIZE)
(MYNOTIFYICONDATAW_V2_SIZE, MYNOTIFYICONDATAW_V3_SIZE): Define and
use instead of the corresponding NOTIFYICONDATAW_Vn_SIZE macros,
which cause trouble with MinGW42 headers.  Ifdef away tray
notifications code for Cygwin.  Reported by Andy Moreton
<andrewjmoreton@gmail.com>.

9 years agoEnable sorting of JSON object keys when encoding
Simen Heggestøyl [Thu, 12 Nov 2015 17:30:37 +0000 (18:30 +0100)]
Enable sorting of JSON object keys when encoding

* lisp/json.el (json-encoding-object-sort-predicate): New variable for
specifying a sorting predicate for JSON objects during encoding.
(json--plist-to-alist): New utility function.
(json-encode-hash-table): Re-use `json-encode-alist' when object keys
are to be sorted.
(json-encode-alist): Sort output by
`json-encoding-object-sort-predicate, when set.
(json-encode-plist): Re-use `json-encode-alist' when object keys are
to be sorted.
(json-pretty-print-buffer-ordered): New command to pretty print the
buffer with object keys sorted alphabetically.
(json-pretty-print-ordered): New command to pretty print the region with
object keys sorted alphabetically.

* test/automated/json-tests.el (test-json-plist-to-alist)
(test-json-encode-plist, test-json-encode-hash-table)
(test-json-encode-alist-with-sort-predicate)
(test-json-encode-plist-with-sort-predicate): New tests.

* etc/NEWS: Add an entry for the new commands.

9 years ago* test/automated/keymap-tests.el: New test file
Juanma Barranquero [Thu, 12 Nov 2015 16:54:48 +0000 (17:54 +0100)]
* test/automated/keymap-tests.el: New test file

9 years agoSpeed up x_real_pos_and_offsets using XCB
Ken Raeburn [Sat, 7 Nov 2015 08:06:32 +0000 (03:06 -0500)]
Speed up x_real_pos_and_offsets using XCB

* src/xfns.c (x_real_pos_and_offsets) [USE_XCB]: Add XCB flavors of
all X calls, and pipeline requests when possible, collecting results
later.  Eliminate use of x_catch_errors (and thus XSync) in XCB case.

9 years agoEnable use of XCB for checking window manager state
Ken Raeburn [Sat, 7 Nov 2015 08:06:32 +0000 (03:06 -0500)]
Enable use of XCB for checking window manager state

* src/xterm.c (get_current_wm_state) [USE_XCB]: Use XCB calls instead
of XGetWindowProperty plus error-catching, since we can explicitly
check for errors in the XCB version.  This eliminates 3 XSync calls on
top of the round-trip actually fetching the information.

9 years agoDetect XCB and save a connection handle
Ken Raeburn [Sat, 7 Nov 2015 08:06:32 +0000 (03:06 -0500)]
Detect XCB and save a connection handle

* configure.ac: If using X11, check for XCB libraries and header.
* src/Makefile.in (XCB_LIBS): Define.
(LIBX_EXTRA): Include it.

* src/xterm.h [USE_XCB]: Include X11/Xlib-xcb.h.
(struct x_display_info) [USE_XCB]: Add an XCB connection handle field.
* src/xterm.c (x_term_init) [USE_XCB]: Initialize the new field.

9 years agoReduce some data dependencies between X calls
Ken Raeburn [Sat, 7 Nov 2015 08:06:32 +0000 (03:06 -0500)]
Reduce some data dependencies between X calls

Gains nothing in the traditional-Xlib code, but more closely aligns
with how the XCB version will work.

* src/xfns.c (x_real_pos_and_offsets): When translating coordinates,
send coordinates (0,0) to the X server and add in the real coordinates
after getting the response.  Move XGetGeometry for outer window inside
error-trapping block.  Use DPY variable more, since it's available.

9 years agoUse color cache for creating bitmap
Ken Raeburn [Sat, 7 Nov 2015 08:06:32 +0000 (03:06 -0500)]
Use color cache for creating bitmap

* src/image.c (x_create_bitmap_from_xpm_data) [ALLOC_XPM_COLORS]: Set
attributes to use the caching color allocator.  Initialize and free
the cache.

9 years agoAdd "^" to the interactive specs of `dired-next/previous-line'
Eli Barzilay [Thu, 12 Nov 2015 08:07:38 +0000 (03:07 -0500)]
Add "^" to the interactive specs of `dired-next/previous-line'

* lisp/dired.el (dired-next-line, dired-previous-line): It makes sense
to bind these commands to the arrow keys, and that means that they work
better with a "^" in the `interactive' declaration so selection works
as expected.

9 years agoSync with soap-client repository, version 3.0.2
Thomas Fitzsimmons [Thu, 12 Nov 2015 04:43:50 +0000 (23:43 -0500)]
Sync with soap-client repository, version 3.0.2

* soap-client.el: Bump version to 3.0.2.

* soap-client.el (soap-warning): Use format, not format-message.

* soap-client.el: Add cl-lib to Package-Requires.  Require cl-lib.
(soap-validate-xs-simple-type): Use cl-labels instead of cl-flet.

* soap-client.el: Support Emacs versions that do not have
define-error.

* soap-inspect.el: Remove version header.

* soap-client.el, soap-inspect.el, jira2.el: Fix first line header
format.

9 years agoCC Mode: Respect users' settings of open-paren-in-column-0-is-defun-start.
Alan Mackenzie [Wed, 11 Nov 2015 22:06:12 +0000 (22:06 +0000)]
CC Mode: Respect users' settings of open-paren-in-column-0-is-defun-start.

lisp/progmodes/cc-engine.el (c-backward-single-comment, c-backward-comments)
(c-invalidate-state-cache-1, c-parse-state-1, c-guess-basic-syntax):
remove bindings of open-paren-in-column-0-is-defun-start to nil.
(c-get-fallback-scan-pos): "New" function (existed several years ago).
(c-parse-state-get-strategy): Reintroduce the 'BOD strategy, using
c-get-fallback-scan-pos.
(c-parse-state-1): Handle 'BOD strategy.

lisp/progmodes/cc-mode.el (c-before-change, c-after-change)
c-font-lock-fontify-region): remove bindings of
open-paren-in-column-0-is-defun-start to nil.

cc-mode.texi (Performance Issues, Limitations and Known Bugs): Fix mix up
between @chapter and @appendix.

9 years ago* lisp/obarray.el: Fix shadowed variables
Artur Malabarba [Wed, 11 Nov 2015 22:30:22 +0000 (22:30 +0000)]
* lisp/obarray.el: Fix shadowed variables

(obarray-map, obarray-remove, obarray-put, obarray-get):
Change OBARRAY arg to OB to avoid shadowing ‘obarray’.

9 years agoAvoid error in submitting a form with EWW
Eli Zaretskii [Wed, 11 Nov 2015 20:01:39 +0000 (22:01 +0200)]
Avoid error in submitting a form with EWW

* lisp/gnus/mm-url.el (mm-url-form-encode-xwfu): Allow argument
CHUNK to be nil.  (Bug#21881)

9 years ago; * doc/lispref/os.texi: Fix indentation of sample code.
Juanma Barranquero [Wed, 11 Nov 2015 17:42:25 +0000 (18:42 +0100)]
; * doc/lispref/os.texi: Fix indentation of sample code.

9 years agoRename seq-p and map-p to seqp and mapp
Nicolas Petton [Wed, 11 Nov 2015 17:18:32 +0000 (18:18 +0100)]
Rename seq-p and map-p to seqp and mapp

* lisp/emacs-lisp/seq.el (seqp): New name.
* lisp/emacs-lisp/map.el (mapp): New name.
* doc/lispref/sequences.texi: Update the documentation for seqp.
* test/automated/map-tests.el: Update the tests for mapp.

9 years agoRename obarray-p to obarrayp
Nicolas Petton [Wed, 11 Nov 2015 17:09:42 +0000 (18:09 +0100)]
Rename obarray-p to obarrayp

* lisp/obarray.el (obarrayp): New name.
* test/automated/obarray-tests.el: Update the tests.

9 years agoRename obarray-foreach to obarray-map
Nicolas Petton [Wed, 11 Nov 2015 16:53:41 +0000 (17:53 +0100)]
Rename obarray-foreach to obarray-map

* lisp/obarray.el (obarray-map): New name.
* test/automated/obarray-tests.el: Update the corresponding tests.

9 years agoNew file with obarray functions.
Przemysław Wojnowski [Sun, 8 Nov 2015 15:59:07 +0000 (16:59 +0100)]
New file with obarray functions.

* lisp/obarray.el: basic obarray functions extracted from abbrev.el
* test/automated/obarray-tests.el: new file

9 years agoImplement tray notifications for MS-Windows
Eli Zaretskii [Wed, 11 Nov 2015 16:29:36 +0000 (18:29 +0200)]
Implement tray notifications for MS-Windows

* src/w32fns.c (MY_NOTIFYICONDATAW): New typedef.
(NOTIFYICONDATAW_V1_SIZE, NOTIFYICONDATAW_V2_SIZE)
(NOTIFYICONDATAW_V3_SIZE, NIF_INFO, NIIF_NONE, NIIF_INFO)
(NIIF_WARNING, NIIF_ERROR, EMACS_TRAY_NOTIFICATION_ID)
(EMACS_NOTIFICATION_MSG): New macros.
(NI_Severity): New enumeration.
(get_dll_version, utf8_mbslen_lim, add_tray_notification)
(delete_tray_notification, Fw32_notification_notify)
(Fw32_notification_close): New functions.
(syms_of_w32fns): Defsubr functions exposed to Lisp.  DEFSYM
keywords used by w32-notification-notify.

* doc/lispref/os.texi (Desktop Notifications): Describe the native
w32 tray notifications.

9 years agoOptimize `file-equal-p' and `file-in-directory-p' in Tramp
Michael Albinus [Wed, 11 Nov 2015 10:47:26 +0000 (11:47 +0100)]
Optimize `file-equal-p' and `file-in-directory-p' in Tramp

* lisp/net/tramp.el (tramp-handle-file-equal-p)
(tramp-handle-file-in-directory-p): New defuns.  Suggested by
Harvey Chapman <hchapman@3gfp.com>

* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): Use them.

9 years ago* CONTRIBUTE: Encourage adding tests.
Karl Fogel [Tue, 10 Nov 2015 21:28:40 +0000 (15:28 -0600)]
* CONTRIBUTE: Encourage adding tests.

Based on this post from John Wiegley:

  From: "John Wiegley" <johnw@newartisans.com>
  Subject: Re: [Emacs-diffs] master 1f02cbe: Fix bug#21766 and add test
  To: Juanma Barranquero <lekktu@gmail.com>
Cc: emacs-diffs@gnu.org, bruce.connor.am@gmail.com,
      emacs-devel <emacs-devel@gnu.org>
  Date: Wed, 28 Oct 2015 18:45:29 -0700
  Message-ID: <m2y4emqwg6.fsf@newartisans.com>

  https://lists.gnu.org/archive/html/emacs-devel/2015-10/msg02372.html

9 years agoAvoid creating notification objects when possible
David Reitter [Tue, 10 Nov 2015 20:41:17 +0000 (15:41 -0500)]
Avoid creating notification objects when possible

* src/nsterm.m (windowWillEnterFullScreen, windowWillExitFullScreen:,
windowDidEnterFullScreen, windowDidExitFullScreen): provide
convenience functions that do not require a notification object.  When
needed, define NSWindowDidEnterFullScreenNotification to allow for
compilation on OS X 10.6.8.

9 years agoMove INTEGER_TO_CONS body out of .h file
Paul Eggert [Tue, 10 Nov 2015 20:46:22 +0000 (12:46 -0800)]
Move INTEGER_TO_CONS body out of .h file

* src/data.c (INTBIG_TO_LISP): New macro, with most
of the contents of the old INTEGER_TO_CONS.
(intbig_to_lisp, uintbig_to_lisp): New functions.
* src/lisp.h (INTEGER_TO_CONS):
Simplify by using EXPR_SIGNED and the new functions.
This shrinks code size a bit, and makes it easier to
put a breakpoint on handling of large integers.

9 years agoMerge from gnulib
Paul Eggert [Tue, 10 Nov 2015 20:42:06 +0000 (12:42 -0800)]
Merge from gnulib

This incorporates:
2015-11-10 intprops: new public macro EXPR_SIGNED
2015-11-10 intprops: fix typo in clang port
* lib/intprops.h: Copy from gnulib.

9 years agoSpelling fixes
Paul Eggert [Tue, 10 Nov 2015 18:22:29 +0000 (10:22 -0800)]
Spelling fixes

* lisp/net/soap-inspect.el (soap-inspect-xs-simple-type):
Fix misspelling in output.

9 years ago* doc/lispref/variables.texi (Directory Local Variables):
Artur Malabarba [Tue, 10 Nov 2015 13:47:42 +0000 (13:47 +0000)]
* doc/lispref/variables.texi (Directory Local Variables):

Document dir-locals wildcards

* lisp/files.el (dir-locals-file): Point to Info node.

* doc/emacs/custom.texi (Directory Variables):
Document dir-locals wildcards.

* etc/NEWS: Document new functionality.

9 years ago* lisp/files.el: Don't allow customization of dir-locals sorting
Artur Malabarba [Tue, 10 Nov 2015 13:26:00 +0000 (13:26 +0000)]
* lisp/files.el: Don't allow customization of dir-locals sorting

In retrospect, this is not a good idea for the same reason that
`dir-locals-file' is a defconst, because it is important that this
behaviour be "uniform across different environments and users".
Sure, the user can still change the sorting with a hack, but we
shouldn't encourage them to change it.

(dir-locals--all-files): Return list in the order returned by
`file-expand-wildcards'.
(file-expand-wildcards): Document the sorting predicate used.
(dir-locals-sort-predicate): Delete variable.

9 years ago* lisp/files.el (dir-locals-read-from-file): Better handle errors
Artur Malabarba [Tue, 10 Nov 2015 13:14:49 +0000 (13:14 +0000)]
* lisp/files.el (dir-locals-read-from-file): Better handle errors

9 years ago* lisp/isearch.el (search-default-regexp-mode): change default value
Artur Malabarba [Tue, 10 Nov 2015 13:04:02 +0000 (13:04 +0000)]
* lisp/isearch.el (search-default-regexp-mode): change default value

9 years ago* lisp/files.el (dir-locals-find-file): Don't stop at unreadable files
Artur Malabarba [Tue, 10 Nov 2015 04:13:25 +0000 (04:13 +0000)]
* lisp/files.el (dir-locals-find-file): Don't stop at unreadable files

`locate-dominating-file' will now keep looking if the files it finds in
a given directory are unreadable (or not files).