]> code.delx.au - gnu-emacs/log
gnu-emacs
8 years agoMigrate modules/.gitignore into .gitignore
Paul Eggert [Thu, 19 Nov 2015 16:21:10 +0000 (08:21 -0800)]
Migrate modules/.gitignore into .gitignore

* .gitignore: Add former contents of modules/.gitignore.
* modules/.gitignore: Remove.

8 years agoAdd copyright notices to module code
Paul Eggert [Thu, 19 Nov 2015 16:14:00 +0000 (08:14 -0800)]
Add copyright notices to module code

Put them in the usual format for GNU Emacs copyright notices.

8 years agoRename emacs_module.h to module.h
Paul Eggert [Thu, 19 Nov 2015 15:53:51 +0000 (07:53 -0800)]
Rename emacs_module.h to module.h

* src/module.h: Rename from src/emacs_module.h.
All uses changed.

8 years ago* src/module.c (Fmodule_load): Remove unused vars `doc_name', `args'
Juanma Barranquero [Thu, 19 Nov 2015 10:07:10 +0000 (11:07 +0100)]
* src/module.c (Fmodule_load): Remove unused vars `doc_name', `args'

8 years ago* src/lread.c (Fload): Remove unused variable `size'
Juanma Barranquero [Thu, 19 Nov 2015 10:02:38 +0000 (11:02 +0100)]
* src/lread.c (Fload): Remove unused variable `size'

8 years agosrc/keyboard.c (pre-command-hook): Fix typo in doc string: "pre" -> "post".
Alan Mackenzie [Thu, 19 Nov 2015 09:38:48 +0000 (09:38 +0000)]
src/keyboard.c (pre-command-hook): Fix typo in doc string: "pre" -> "post".

8 years agoPrioritize looking inside vc-parent-buffer over log-view-mode fallback
Dmitry Gutov [Thu, 19 Nov 2015 01:37:55 +0000 (03:37 +0200)]
Prioritize looking inside vc-parent-buffer over log-view-mode fallback

* lisp/vc/vc.el (vc-deduce-fileset): Prioritize looking inside
vc-parent-buffer over log-view-mode fallback (bug#21955).

8 years ago* configure.ac (LIBMODULES): Don’t define on Cygwin
Ken Brown [Wed, 18 Nov 2015 20:17:58 +0000 (15:17 -0500)]
* configure.ac (LIBMODULES): Don’t define on Cygwin

8 years agoFix MS-Windows build --with-modules
Eli Zaretskii [Wed, 18 Nov 2015 20:09:08 +0000 (22:09 +0200)]
Fix MS-Windows build --with-modules

* src/module.c: Reformat copyright commentary.
(module_vec_get): Use explicit cast to size_t to avoid compiler
warning in 32-bit builds.
(check_main_thread) [WINDOWSNT]: Fix letter-case in Windows APIs.
Compare thread IDs directly, as GetThreadId is not available
before Windows Vista.
(check_main_thread) [WINDOWSNT]: Duplicate the thread handle
without using APIs and constants not available on XP and older
systems.  Obtain and store the thread ID as well.

8 years ago; * admin/release-process: Minor copyedits and additions.
Eli Zaretskii [Wed, 18 Nov 2015 19:33:12 +0000 (21:33 +0200)]
; * admin/release-process: Minor copyedits and additions.

8 years agoAdd dynamic module test and helper script
Aurélien Aptel [Mon, 16 Nov 2015 00:00:25 +0000 (01:00 +0100)]
Add dynamic module test and helper script

Add 'modhelp.py' script (python2) to automate module testing and
module generation.

To build and test all modules in the modules/ dir
  $ ./modhelp.py test

To generate a module from template code (good starting point)
  $ ./modhelp init mynewtestmodule

See the script -h option for more documentation.

* modules/modhelp.py: New module helper script.
* modules/mod-test/Makefile: New file. Makefile for the test module.
* modules/mod-test/mod-test.c: New file. Test module source file.
* modules/mod-test/test.el: New file. ert test suite for the test module.
* modules/.gitignore: New file. Local .gitignore file.

Co-authored-by: Philipp Stephani <phst@google.com>
8 years agoMake 'Fload' look for modules
Aurélien Aptel [Sun, 15 Nov 2015 23:53:15 +0000 (00:53 +0100)]
Make 'Fload' look for modules

'Fload' can now load dynamic modules. This also makes 'require' work.

* src/lread.c:
  (suffix_p): New function.
  (Fload): Use 'suffix_p'.  Call 'Fmodule_load' when we try to load a file
  with a module suffix.
  (syms_of_lread): Append module suffix to 'Vload_suffixes'.

8 years agoAdd dynamic module module support
Aurélien Aptel [Sun, 15 Nov 2015 23:47:04 +0000 (00:47 +0100)]
Add dynamic module module support

* configure.ac: Add '--with-modules' option.  Conditionally add
  dynlib.o and module.o to the list of objects.  Add any system
  specific flags to the linker flags to support dynamic libraries.
* m4/ax_gcc_var_attribute.m4: Add autoconf extension to test gcc
  attributes.
* src/Makefile.in: Conditionally add module objects and linker flags.
* src/alloc.c (garbage_collect_1): protect module local values from
  GC.
* src/lisp.h: Add 'module_init' and 'syms_of_module' prototypes.
* src/emacs_module.h: New header file included by modules.  Public
  module API.
* src/module.c: New module implementation file.

Co-authored-by: Philipp Stephani <phst@google.com>
8 years agoAdd new User Pointer (User_Ptr) type
Aurélien Aptel [Sun, 15 Nov 2015 23:42:14 +0000 (00:42 +0100)]
Add new User Pointer (User_Ptr) type

* src/lisp.h: Add new Lisp_Misc_User_Ptr type.
(XUSER_PTR): New User_Ptr accessor.
* src/alloc.c (make_user_ptr): New function.
(mark_object, sweep_misc): Handle Lisp_Misc_User_Ptr.
* src/data.c (Ftype_of): Return 'user-ptr' for user pointer.
(Fuser-ptrp): New user pointer type predicate function.
(syms_of_data): New 'user-ptrp', 'user-ptr' symbol.  New 'user-ptrp'
subr.
* src/print.c (print_object): Add printer for User_Ptr type.

8 years agoAdd portable layer for dynamic loading
Aurélien Aptel [Sun, 15 Nov 2015 23:36:35 +0000 (00:36 +0100)]
Add portable layer for dynamic loading

* src/dynlib.h: New file.
* src/dynlib.c: New file.

Co-authored-by: Philipp Stephani <phst@google.com>
8 years agoAdd catch-all & no-signal version of PUSH_HANDLER
Philipp Stephani [Sun, 15 Nov 2015 23:31:56 +0000 (00:31 +0100)]
Add catch-all & no-signal version of PUSH_HANDLER

Ground work for modules. Add a non-signaling version of PUSH_HANDLER and
a new "catch-all" handler type.

* src/eval.c (init_handler, push_handler, push_handler_nosignal): New
  functions.
* src/fns.c (hash_remove_from_table): Expose function public.
* src/lisp.h: New handler type, define macro to push_handler call.

8 years ago; * lisp/server.el (server-process-filter): Simplify last change
Ken Brown [Wed, 18 Nov 2015 19:16:40 +0000 (14:16 -0500)]
; * lisp/server.el (server-process-filter): Simplify last change

8 years agoSilence byte-compiler warning
Ken Brown [Wed, 18 Nov 2015 18:34:47 +0000 (13:34 -0500)]
Silence byte-compiler warning

* lisp/server.el (server-process-filter): Silence byte-compiler
warning.

8 years agoQuote symbols in docstrings using `'
Paul Eggert [Wed, 18 Nov 2015 17:17:20 +0000 (09:17 -0800)]
Quote symbols in docstrings using `'

Be more systematic about quoting symbols `like-this' rather than
`like-this or 'like-this' in docstrings.  This follows up Artur
Malabarba's email in:
http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01647.html

8 years agoFix savegames in dunnet
Peder O. Klingenberg [Tue, 17 Nov 2015 20:47:27 +0000 (21:47 +0100)]
Fix savegames in dunnet

* lisp/play/dunnet.el (dun-rot13): Use the standard rot13-region instead
  of separate implementation.

8 years ago* lisp/emacs-lisp/package.el (package--with-response-buffer):
Artur Malabarba [Wed, 18 Nov 2015 10:28:02 +0000 (10:28 +0000)]
* lisp/emacs-lisp/package.el (package--with-response-buffer):

Ensure we're at the start of the buffer before searching for
the end of headers.

8 years ago* admin/release-process: Improve wording.
Xue Fuqiao [Wed, 18 Nov 2015 00:56:50 +0000 (08:56 +0800)]
* admin/release-process: Improve wording.

8 years agoBackport: * CONTRIBUTE: Remove information about feature freeze.
Xue Fuqiao [Sun, 15 Nov 2015 02:05:17 +0000 (10:05 +0800)]
Backport: * CONTRIBUTE: Remove information about feature freeze.

(cherry picked from commit ae0653b5ab9ee223751ec389b87011963e1cbbef)

8 years agoBackport: Document the release process
Xue Fuqiao [Sun, 15 Nov 2015 01:35:50 +0000 (09:35 +0800)]
Backport: Document the release process

* admin/notes/versioning: Add information about RC releases.
* admin/release-process: Document the release process.
* admin/authors.el (authors-ignored-files):
* admin/README: Change FOR-RELEASE to release-process.
* CONTRIBUTE:
* admin/notes/bugtracker: Don't mention FOR-RELEASE.

(cherry picked from commit 9a4aa0f5945a03611ae29c516025dbd353bd26ab)

8 years agoBackport: * admin/release-process: Rename from admin/FOR-RELEASE.
Xue Fuqiao [Sun, 15 Nov 2015 01:32:12 +0000 (09:32 +0800)]
Backport: * admin/release-process: Rename from admin/FOR-RELEASE.

(cherry picked from commit f8cc14b59700e51a4e31139c0a65c8154995e055)

8 years agoBackport: Mention CONTRIBUTE in README
Xue Fuqiao [Sat, 14 Nov 2015 04:49:17 +0000 (12:49 +0800)]
Backport: Mention CONTRIBUTE in README

Mention CONTRIBUTE in README, since it was moved from etc/ to root.
* etc/TODO: Remove the reference to `etc/CONTRIBUTE'.
* README: Mention CONTRIBUTE.

(cherry picked from commit ed2e7e20ae0945288c98091f308f5460c3453873)

8 years agoFix docstring quoting problems with ‘ '’
Paul Eggert [Tue, 17 Nov 2015 23:28:50 +0000 (15:28 -0800)]
Fix docstring quoting problems with ‘ '’

Problem reported by Artur Malabarba in:
http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01513.html
Most of these fixes are to documentation; many involve fixing
longstanding quoting glitches that are independent of the
recent substitute-command-keys changes.  The changes to code are:
* lisp/cedet/mode-local.el (mode-local-augment-function-help)
(describe-mode-local-overload):
Substitute docstrings before displaying them.
* lisp/emacs-lisp/cl-macs.el (cl--transform-lambda):
Quote the generated docstring for later substitution.

8 years agoImprove configure --help text for wide ints
Eli Zaretskii [Tue, 17 Nov 2015 19:07:37 +0000 (21:07 +0200)]
Improve configure --help text for wide ints

* configure.ac (wide-int): Clarify user-level advantages and
disadvantages.

8 years agoImprove doc string
Stephen Leake [Tue, 17 Nov 2015 13:46:11 +0000 (07:46 -0600)]
Improve doc string

* lisp/progmodes/xref.el (xref-backend-references): Improve doc string.

8 years agoeval_sub followed dangling pointer when debugging
Paul Eggert [Tue, 17 Nov 2015 07:08:54 +0000 (23:08 -0800)]
eval_sub followed dangling pointer when debugging

Problem reported by Pip Cet (Bug#21245).
This bug could occur in eval_sub if the C compiler reused
storage associated with the ‘argvals’ local after ‘argvals’
went out of scope, and if the Elisp debugger stopped on Elisp
function exit and accessed ‘argvals’.  It could also occur if
a variadic function was called with so many arguments (over
2048 args on x86-64) that SAFE_ALLOCA_LISP called malloc, then
SAFE_FREE freed the arguments, then the memory manager used
the storage for other purposes, then the debugger accessed the
arguments.
* src/eval.c (eval_sub): Declare ‘argvals’ at top level of
function body. Simplify local decls.
When allocating args via SAFE_ALLOCA, call
debugger before invoking SAFE_FREE, as the debugger needs
access to the args.
(eval_sub, apply_lambda): Rework to avoid need for
set_backtrace_debug_on_exit hack.  This is cleaner,
and should work better with buggy custom debuggers.

8 years ago* lisp/image-mode.el: Support encrypted file
Daiki Ueno [Tue, 17 Nov 2015 02:27:51 +0000 (11:27 +0900)]
* lisp/image-mode.el: Support encrypted file

(image-toggle-display-image): Read content from the buffer instead
of the file, if the buffer holds a decrypted data.  (Bug#21870)

8 years agoELF unexec: align section header
Paul Eggert [Tue, 17 Nov 2015 01:48:08 +0000 (17:48 -0800)]
ELF unexec: align section header

This ports the recent unexelf.c changes to Fedora x86-64
when configured with GCC’s -fsanitize=undefined option.
* src/unexelf.c (unexec): Align new_data2_size to a multiple
of ElfW (Shdr)’s alignment, so that NEW_SECTION_H returns a
pointer aligned appropriately for its type.

8 years ago; lisp/window.el (display-buffer-at-bottom): Fix indentation
Juanma Barranquero [Tue, 17 Nov 2015 01:02:07 +0000 (02:02 +0100)]
; lisp/window.el (display-buffer-at-bottom): Fix indentation

8 years agoDo more checks on bytecode objects (Bug#21929)
Andreas Schwab [Mon, 16 Nov 2015 22:47:17 +0000 (23:47 +0100)]
Do more checks on bytecode objects (Bug#21929)

* src/eval.c (funcall_lambda): Check size of compiled function
object.
(Ffetch_bytecode): Likewise.

8 years agopcase.el: Fix edebugging of backquoted cons patterns
Johan Bockgård [Sun, 15 Nov 2015 23:07:06 +0000 (00:07 +0100)]
pcase.el: Fix edebugging of backquoted cons patterns

* lisp/emacs-lisp/pcase.el (pcase-QPAT): Fix edebugging of backquoted
cons patterns. (Bug#21920)

8 years agoImprove fix for regex reentrancy abort
Paul Eggert [Mon, 16 Nov 2015 21:09:46 +0000 (13:09 -0800)]
Improve fix for regex reentrancy abort

Suggested by Stefan Monnier (Bug#21688).
* src/syntax.c (update_syntax_table_forward):
Remove recently-added PROPERTIZE arg, and assume it is true.
All callers changed.
* src/syntax.h (UPDATE_SYNTAX_TABLE_FORWARD_FAST):
Invoke update_syntax_table directly.

8 years ago; Fix breakage in elisp-mode-tests.el
Dmitry Gutov [Mon, 16 Nov 2015 17:15:28 +0000 (19:15 +0200)]
; Fix breakage in elisp-mode-tests.el

8 years ago* lisp/faces.el (faces--attribute-at-point): Use `face-list-p'
Artur Malabarba [Mon, 16 Nov 2015 14:35:31 +0000 (14:35 +0000)]
* lisp/faces.el (faces--attribute-at-point): Use `face-list-p'

8 years ago* lisp/emacs-lisp/package.el (package--with-response-buffer): Missing require
Artur Malabarba [Mon, 16 Nov 2015 13:53:45 +0000 (13:53 +0000)]
* lisp/emacs-lisp/package.el (package--with-response-buffer): Missing require

8 years ago* lisp/emacs-lisp/nadvice.el (add-function): Escape quote
Artur Malabarba [Mon, 16 Nov 2015 09:49:00 +0000 (09:49 +0000)]
* lisp/emacs-lisp/nadvice.el (add-function): Escape quote

8 years agoRecognize .rbw and .pyw files (bug#18753)
Vasily Korytov [Sun, 15 Nov 2015 23:32:01 +0000 (01:32 +0200)]
Recognize .rbw and .pyw files (bug#18753)

* lisp/progmodes/python.el (auto-mode-alist):
Recognize .pyw files.

* lisp/progmodes/ruby-mode.el (auto-mode-alist):
Recognize .rbw files.

8 years agoFix ruby-mode auto-mode-alist entry
Dmitry Gutov [Sun, 15 Nov 2015 23:14:54 +0000 (01:14 +0200)]
Fix ruby-mode auto-mode-alist entry

* lisp/progmodes/ruby-mode.el (auto-mode-alist): Add grouping
around the extensions (bug#21257).

8 years agoFix etags completion near eob
Dmitry Gutov [Sun, 15 Nov 2015 22:30:12 +0000 (00:30 +0200)]
Fix etags completion near eob

* lisp/progmodes/etags.el (tags-completion-at-point-function):
Use `goto-char', to avoid the end-of-buffer error (bug#20061).

8 years agoDe-pessimize detection of C++ member initialization lists.
Alan Mackenzie [Sun, 15 Nov 2015 21:59:40 +0000 (21:59 +0000)]
De-pessimize detection of C++ member initialization lists.

list/progmodes/cc-engine.el (c-back-over-list-of-member-inits): New macro.
(c-back-over-member-initializers): Reformulate such that c-at-toplevel-p
is only called when a construct "looks right" rather than continually.
(c-guess-basic-syntax, CASE 5R): Add a check for the mode being C++ Mode.

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'.