* xfaces.c (make_face_cache): For struct face_cache, prefer
xmalloc to xzalloc and so avoid redundant call to memset.
(Finternal_set_lisp_face_attribute): Fix comment typo and style.
Gnus: Improve subthread sorting;
make subthread sorting customizable and add docs for it
* doc/misc/gnus.texi (Sorting the Summary Buffer): Document new defcustom
`gnus-subthread-sort-functions' and remove the obsolete documentation
of `gnus-sort-threads-recursively'.
* lisp/gnus/gnus-sum.el (gnus-sort-subthreads-recursive): New function.
(gnus-sort-threads-recursive): Use it.
(gnus-sort-threads): Unconditionally call `gnus-sort-threads-recursive'
again. Now that determines how to sort subthreads.
David Engster [Mon, 29 Jul 2013 20:26:19 +0000 (22:26 +0200)]
Merge with CEDET upstream (rev. 8579).
* lisp/cedet/cedet.el (cedet-packages): Remove speedbar since its
development does no longer happens in CEDET upstream but in Emacs
proper. Also remove cedet-contrib and cogre since those are only
in upstream.
* semantic/analyze/fcn.el (semantic-analyze-type-to-name): If TYPE
has a parent, return a fully qualified name.
* semantic/decorate/mode.el
(semantic-decoration-on-includes-p-default)
(semantic-decoration-on-includes-highlight-default): Declare for
byte compiler.
* semantic/wisent/python.el (semantic/format): New require.
* eieio.texi (top): Make clear that EIEIO is not a full CLOS
implementation.
(Introduction): Add further missing features.
(Building Classes): Add introductory paragraph.
(Wish List): Add metaclasses and EQL specialization.
lisp/desktop.el: Fix problem creating minibuffer(less,only) frames.
(desktop--make-frame): Include `minibuffer' in the minimal set of parameters
passed when creating a frame, because the minibuffer status of a frame cannot
be changed later.
Stephen Berman [Sun, 28 Jul 2013 22:34:32 +0000 (00:34 +0200)]
* calendar/todo-mode.el (todo-rename-file): Fix incorrect use of
replace-regexp-in-string and inadvertent omissions in previous change.
(todo-filter-items): Ensure only file names are comma-separated in
renamed filtered items buffer.
Eli Zaretskii [Sun, 28 Jul 2013 15:22:27 +0000 (18:22 +0300)]
Fix bug #14970 with crashes when deleting many frames on MS-Windows.
src/w32fns.c (w32_wnd_proc) <WM_IME_STARTCOMPOSITION>: Make sure the
frame which got the message is still alive, before dereferencing
its pointer.
src/frame.c (delete_frame): Test "this" frame's minibuffer window to
be a live window, before using it as such.
lisp/desktop.el: Optionally force offscreen frames back onscreen.
(desktop-restoring-reuses-frames): New option.
(desktop--compute-pos, desktop--move-onscreen): New functions.
(desktop--make-frame): Use desktop--move-onscreen.
David Engster [Sat, 27 Jul 2013 21:09:43 +0000 (23:09 +0200)]
Merge from CEDET upstream (8569).
* lisp/cedet/semantic/edit.el (semantic-edits-splice-remove): Wrap
debug message removing middle tag in semantic-edits-verbose-flag
check.
* semantic/bovine/el.el (semantic/db-el): New require.
* semantic/db-el.el (semanticdb-normalize-one-tag): It might be that a
symbol comes from a file but cannot be found in its table. This
happens for instance when a symbol was dynamically created through a
macro like `defstruct'. In this case, return the original tag.
(semanticdb-elisp-sym->tag): Deal with autoloaded functions, where
the argument list is not available until the file is loaded.
Stephen Berman [Sat, 27 Jul 2013 15:58:56 +0000 (17:58 +0200)]
* calendar/todo-mode.el: Add command to rename todo files.
(todo-rename-file): New command.
(todo-key-bindings-t): Add key binding for it. Change the
bindings of todo-filter-regexp-items(-multifile) to use `x'
instead of `r', since the latter is better suited to the new
renaming command.
Eli Zaretskii [Sat, 27 Jul 2013 13:08:03 +0000 (16:08 +0300)]
Fix focus-out events on MS-Windows.
src/w32term.c (w32_read_socket) <WM_KILLFOCUS>: Call
w32_detect_focus_change instead of doing part of its job by hand.
This fixes the problem whereby FOCUS_OUT events were not sent to
the event queue.
Alan Mackenzie [Sat, 27 Jul 2013 12:07:43 +0000 (12:07 +0000)]
Make Java try-with-resources statement parse properly.
progmodes/cc-langs.el (c-block-stmt-1-2-kwds, c-block-stmt-1-2-key): New
language constants/variables.
progmodes/cc-engine.el (c-beginning-of-statement-1, c-after-conditional): Adapt
to deal with c-block-stmt-1-2-key.
progmodes/cc-fonts.el (c-font-lock-declarations): Adapt to deal with
c-block-stmt-1-2-key.
lisp/desktop.el: Restore frames at their positions, even if offscreen.
(desktop--make-frame): Apply most frame parameters after creating the frame
to force (partially or totally) offscreen frames to be restored as such.
gnus-sum.el (gnus-sort-threads-recursively): New defcustom.
(gnus-sort-threads): Use it.
gnus.texi (Sorting the Summary Buffer): Document new defcustom `gnus-sort-threads-recursively'.
Stefan Monnier [Fri, 26 Jul 2013 15:09:04 +0000 (11:09 -0400)]
* lisp/emacs-lisp/edebug.el: Use backtrace-eval to handle lexical variables.
(edebug-eval): Use backtrace-eval.
(edebug--display, edebug--recursive-edit): Don't let-bind the
edebug-outer-* vars that keep track of variables we locally let-bind.
(edebug-outside-excursion): Don't restore outside values of locally
let-bound vars.
(edebug--display): Use user-error.
(cl-lexical-debug, cl-debug-env): Remove.
Eli Zaretskii [Fri, 26 Jul 2013 09:59:59 +0000 (12:59 +0300)]
Fix bug #14841 with invisible frames on MS-Windows.
src/w32term.c (w32_read_socket) <WM_EMACS_PAINT>: Warn about frame
being re-exposed only if it didn't ask to become visible.
<WM_SIZE>: Under SIZE_RESTORED, only set the frame visible if it
was previously iconified.
(x_iconify_frame): Mark the frame iconified.
Add aliases for encrypting mail.
* epa.el (epa-mail-aliases): New option.
* epa-mail.el (epa-mail-encrypt): Rewrite to be callable from programs.
Bind inhibit-read-only so read-only text doesn't ruin everything.
(epa-mail-default-recipients): New subroutine broken out.
Handle epa-mail-aliases.
Stefan Monnier [Fri, 26 Jul 2013 07:38:18 +0000 (03:38 -0400)]
Add support for lexical variables to the debugger's `e' command.
* lisp/emacs-lisp/debug.el (debug): Don't let-bind the debugger-outer-*
vars, except for debugger-outer-match-data.
(debugger-frame-number): Move check for "on a function call" from
callers into it. Add `skip-base' argument.
(debugger-frame, debugger-frame-clear): Simplify accordingly.
(debugger-env-macro): Only reset the state stored in non-variables,
i.e. current-buffer and match-data.
(debugger-eval-expression): Rewrite using backtrace-eval.
* lisp/subr.el (internal--called-interactively-p--get-frame): Remove.
(called-interactively-p):
* lisp/emacs-lisp/edebug.el (edebug--called-interactively-skip): Use the new
`base' arg of backtrace-frame instead.
* src/eval.c (set_specpdl_old_value): New function.
(unbind_to): Minor simplification.
(get_backtrace_frame): New function.
(Fbacktrace_frame): Use it. Add `base' argument.
(backtrace_eval_unrewind, Fbacktrace_eval): New functions.
(syms_of_eval): Export backtrace-eval.
* src/xterm.c (x_focus_changed): Simplify.
lisp/desktop.el: Use pcase-let, pcase-let* in a few places.
(desktop--select-frame, desktop--sort-states, desktop-restore-frames):
Deobfuscate access to desktop--mini values.
* doc/misc/eshell.texi (Bugs and ideas): Minor updates.
* doc/misc/faq.texi (Reporting bugs, Origin of the term Emacs)
(Setting up a customization file)
(Using an already running Emacs process, Turning off beeping)
(Packages that do not come with Emacs)
(Replying to the sender of a message): Avoid using @email.
* doc/misc/pcl-cvs.texi (Contributors, Bugs): Avoid using @email.
* doc/misc/reftex.texi (Imprint): Avoid using @email.
lisp/desktop.el: Add workaround for bug#14949.
(desktop--make-frame): Do not pass the `fullscreen' parameter to
modify-frame-parameters if the value has not changed.
(desktop--make-frame): On cl-delete-if call, check parameter name,
not full parameter.
Michael Albinus [Wed, 24 Jul 2013 13:56:19 +0000 (15:56 +0200)]
* automated/file-notify-tests.el
(file-notify--test-local-enabled): New defconst. Replaces all
`file-notify-support' occurences.
(file-notify--test-remote-enabled): New defun.
(file-notify--deftest-remote): Use it.
(file-notify-test00-availability): Rewrite.
(file-notify-test00-availability-remote): New defun.
(file-notify-test01-add-watch): Rewrite first erroneous check.
Paul Eggert [Wed, 24 Jul 2013 06:21:07 +0000 (07:21 +0100)]
* src/eval.c (Fprogn): Do not check that BODY is a proper list.
This undoes the previous change. The check slows down the
interpreter, and is not needed to prevent a crash. See
<http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00693.html>.
* doc/lispref/eval.texi (Special Forms): Mention 'lambda'. Also, say that
non-well-formed expressions result in unspecified behavior, though
Emacs will not crash.
Stefan Monnier [Wed, 24 Jul 2013 04:56:12 +0000 (00:56 -0400)]
* lisp/files.el (revert-buffer-function): Use a non-nil default.
(revert-buffer-preserve-modes): Declare var to
provide access to the `preserve-modes' argument.
(revert-buffer): Let-bind it.
(revert-buffer--default): New function, extracted from revert-buffer.
Stefan Monnier [Wed, 24 Jul 2013 04:37:11 +0000 (00:37 -0400)]
* lisp/lpr.el: Signal print errors more prominently.
(print-region-function): Don't default to nil.
(lpr-print-region): New function, extracted from print-region-1.
Check lpr's return value and signal an error in case of problem.
(print-region-1): Use it.
* lisp/ps-print.el (ps-windows-system, ps-lp-system): Remove. Use the lpr-*
versions instead.
(ps-printer-name): Default to nil.
(ps-printer-name-option): Default to lpr-printer-switch.
(ps-print-region-function): Don't default to nil.
(ps-postscript-code-directory): Simplify default.
(ps-do-despool): Use lpr-print-region to properly check the outcome.
(ps-string-list, ps-eval-switch, ps-flatten-list)
(ps-flatten-list-1): Remove.
(ps-multibyte-buffer): Avoid setq.
* lisp/dos-w32.el (direct-print-region-helper): Use proper regexp operators.
(print-region-function, ps-print-region-function): Don't set them here.
Michael Mauger [Wed, 24 Jul 2013 00:25:53 +0000 (20:25 -0400)]
* progmodes/sql.el Version 3.3
(sql-product-alist): Improve oracle :prompt-cont-regexp.
(sql-starts-with-prompt-re, sql-ends-with-prompt-re): New functions.
(sql-interactive-remove-continuation-prompt): Rewrite, use
functions above. Fix continuation prompt and complete output line
handling.
(sql-redirect-one, sql-execute): Use `read-only-mode' on
redirected output buffer.
(sql-mode): Restore deleted code (Bug#13591).
No need for configure to create etc/ and lisp/ any more
* configure.ac (etc, lisp): No need to create specially.
Configure already creates lisp when generating lisp/Makefile;
src/Makefile now creates etc when needed.