gnus-sum.el (gnus-update-marks): Reinstate the code to not alter marks on non-selected articles.
gnus-start.el (gnus-get-unread-articles): Don't try to contact denied servers.
Improvements to flyspell-mark-duplications-exceptions.
* lisp/textmodes/flyspell.el (flyspell-word): Recognize default
dictionary case for flyspell-mark-duplications-exceptions. Use
regexp matching for languages.
(flyspell-mark-duplications-exceptions): Add "that" and "had" for
default dictionary (Bug#7926).
* xdisp.c (display_count_lines): Remove parameter `start',
unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
(get_char_face_and_encoding): Remove parameter `multibyte_p',
unused since 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
(fill_stretch_glyph_string): Remove parameters `row' and `area',
unused at least since Kim's GUI unification at 2003-03-16T20:45:46Z!storm@cua.dk
and thereabouts. All callers changed.
(get_per_char_metric): Remove parameter `f', unused since
2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
Merge open-protocol-stream into open-network-stream.
* lisp/subr.el (open-network-stream): Move to net/network-stream.el.
* lisp/gnus/proto-stream.el: Move to net/network-stream.el.
* lisp/net/network-stream.el: Move from gnus/proto-stream.el.
Change prefix to network-stream throughout.
(open-protocol-stream): Merge into open-network-stream, leaving
open-protocol-stream as an alias. Handle nil BUFFER args.
* lisp/gnus/nnimap.el (nnimap-open-connection-1): Pass explicit :end-of-command
parameter to open-protocol-stream.
* lisp/find-dired.el (find-exec-terminator): New option.
(find-ls-option): Test for -ls support.
(find-ls-subdir-switches): Test for -b in find-ls-option.
(find-dired, find-grep-dired): Doc fixes.
(find-dired): Use find-exec-terminator.
Use find -exec with '+' for grep-find if supported.
* lisp/progmodes/grep.el (grep-find-use-xargs): Doc fix.
(grep-compute-defaults): Check for `-exec COMMAND +' support.
Set grep-find-use-xargs, grep-find-command, and grep-find-template
accordingly. Don't add the null-device if not needed.
* lisp/custom.el (custom-initialize-default, custom-declare-variable):
Use `defvar'.
* lisp/files.el (lexical-binding): Declare safe.
* lisp/help-fns.el (help-split-fundoc): Return nil if there's nothing else
than the arglist.
(help-add-fundoc-usage): Don't add `Not documented'.
(help-function-arglist): Handle closures, subroutines, and new
byte-code-functions.
(help-make-usage): Remove leading underscores.
(describe-function-1): Handle closures.
(describe-variable): Use special-variable-p for completion.
* lisp/simple.el (with-wrapper-hook, apply-partially): Move to subr.el.
* lisp/subr.el (apply-partially): Use new closures rather than CL.
(--dolist-tail--, --dotimes-limit--): Don't declare dynamic.
(dolist, dotimes): Use slightly different expansion for lexical code.
(functionp): Move to C.
(letrec): New macro.
(with-wrapper-hook): Use it and apply-partially instead of CL.
(eval-after-load): Preserve lexical-binding.
(save-window-excursion, with-output-to-temp-buffer): Turn them
into macros.
* lisp/emacs-lisp/advice.el (ad-arglist): Use help-function-arglist.
* lisp/emacs-lisp/autoload.el (make-autoload): Don't burp on trivial macros.
* lisp/emacs-lisp/byte-opt.el: Use lexical binding.
(byte-inline-lapcode): Remove (to bytecomp).
(byte-compile-inline-expand): Pay attention to inlining to/from
lexically bound code.
(byte-compile-unfold-lambda): Don't handle byte-code-functions
any more.
(byte-optimize-form-code-walker): Don't handle save-window-excursion
any more and don't call compiler-macros.
(byte-compile-splice-in-already-compiled-code): Remove.
(byte-code): Don't inline any more.
(disassemble-offset): Receive `bytes' as argument rather than via
dynamic scoping.
(byte-compile-tag-number): Declare before first use.
(byte-decompile-bytecode-1): Handle new byte-codes, don't change
`return' even if make-spliceable.
(byte-compile-side-effect-and-error-free-ops): Add stack-ref, remove
obsolete interactive-p.
(byte-optimize-lapcode): Optimize new lap-codes.
Don't trip up on new form of `byte-constant' lap code.
* lisp/emacs-lisp/byte-run.el (make-obsolete): Don't set the `byte-compile'
handler any more.
* lisp/emacs-lisp/bytecomp.el: Use lexical binding instead of
a "bytecomp-" prefix. Macroexpand everything as a separate phase.
(byte-compile-initial-macro-environment):
Handle declare-function here.
(byte-compile--lexical-environment): New var.
(byte-stack-ref, byte-stack-set, byte-discardN)
(byte-discardN-preserve-tos): New lap codes.
(byte-interactive-p): Don't use any more.
(byte-compile-push-bytecodes, byte-compile-push-bytecode-const2):
New macros.
(byte-compile-lapcode): Use them and handle new lap codes.
(byte-compile-obsolete): Remove.
(byte-compile-arglist-signature): Handle new byte-code arg"lists".
(byte-compile-arglist-warn): Check late def of inlinable funs.
(byte-compile-cl-warn): Don't silence warnings for compiler-macros
since they should have been expanded by now.
(byte-compile--outbuffer): Rename from bytecomp-outbuffer.
(byte-compile-from-buffer): Remove unused second arg.
(byte-compile-preprocess): New function.
(byte-compile-toplevel-file-form): New function to distinguish
file-form calls from outside from file-form calls from hunk-handlers.
(byte-compile-file-form): Simplify.
(byte-compile-file-form-defsubst): Remove.
(byte-compile-file-form-defmumble): Simplify now that
byte-compile-lambda always returns a byte-code-function.
(byte-compile): Preprocess.
(byte-compile-byte-code-maker, byte-compile-byte-code-unmake):
Remove, not used any more.
(byte-compile-arglist-vars, byte-compile-make-lambda-lexenv)
(byte-compile-make-args-desc): New funs.
(byte-compile-lambda): Handle lexical functions. Always return
a byte-code-function.
(byte-compile-reserved-constants): New var, to make up room for
closed-over variables.
(byte-compile-constants-vector): Obey it.
(byte-compile-top-level): New args `lexenv' and `reserved-csts'.
(byte-compile-macroexpand-declare-function): New function.
(byte-compile-form): Call byte-compile-unfold-bcf to inline immediate
byte-code-functions.
(byte-compile-form): Check obsolescence here.
(byte-compile-inline-lapcode, byte-compile-unfold-bcf): New functions.
(byte-compile-variable-ref): Remove.
(byte-compile-dynamic-variable-op): New fun.
(byte-compile-dynamic-variable-bind, byte-compile-variable-ref)
(byte-compile-variable-set): New funs.
(byte-compile-discard): Add 2 args.
(byte-compile-stack-ref, byte-compile-stack-set)
(byte-compile-make-closure, byte-compile-get-closed-var): New funs.
(byte-compile-funarg, byte-compile-funarg-2): Remove, handled in
macroexpand-all instead.
(byte-compile-quote-form): Remove.
(byte-compile-push-binding-init, byte-compile-not-lexical-var-p)
(byte-compile-bind, byte-compile-unbind): New funs.
(byte-compile-let): Handle let* and lexical binding.
(byte-compile-let*): Remove.
(byte-compile-catch, byte-compile-unwind-protect)
(byte-compile-track-mouse, byte-compile-condition-case):
Handle a new :fun-body form, used for lexical scoping.
(byte-compile-save-window-excursion)
(byte-compile-with-output-to-temp-buffer): Remove.
(byte-compile-defun): Simplify.
(byte-compile-stack-adjustment): New fun.
(byte-compile-out): Use it.
(byte-compile-refresh-preloaded): Don't reload byte-compiler files.
* lisp/emacs-lisp/disass.el (disassemble-internal): Handle new
`closure' objects.
(disassemble-1): Handle new byte codes.
* lisp/emacs-lisp/edebug.el (edebug-eval-defun)
(edebug-eval-top-level-form): Use eval-sexp-add-defvars.
(edebug-toggle): Avoid `eval'.
* lisp/emacs-lisp/eieio-comp.el: Remove.
* lisp/emacs-lisp/eieio.el (byte-compile-file-form-defmethod):
Don't autoload.
(eieio-defgeneric-form-primary-only-one): Use `byte-compile' rather
than the internal `byte-compile-lambda'.
(defmethod): Don't hide code under quotes.
(eieio-defmethod): New `code' argument.
* lisp/emacs-lisp/float-sup.el (pi): Don't declare as dynamically bound.
* lisp/emacs-lisp/lisp-mode.el (eval-last-sexp-1):
Use eval-sexp-add-defvars.
(eval-sexp-add-defvars): New fun.
* lisp/emacs-lisp/macroexp.el: Use lexical binding.
(macroexpand-all-1): Check obsolete macros. Expand compiler-macros.
Don't convert ' to #' without checking that it's indeed quoting
a lambda.
* lisp/emacs-lisp/pcase.el: Don't use destructuring-bind.
(pcase--memoize): Rename from pcase-memoize. Change weakness.
(pcase): Add `let' pattern.
Change memoization so it actually works.
(pcase-mutually-exclusive-predicates): Add byte-code-function-p.
(pcase--u1) <guard, pred>: Fix possible shadowing problem.
<let>: New case.
* src/alloc.c (Fmake_symbol): Init new `declared_special' field.
* src/buffer.c (defvar_per_buffer): Set new `declared_special' field.
* src/bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN):
New byte-codes.
(exec_byte_code): New function extracted from Fbyte_code to handle new
calling convention for byte-code-functions. Add new byte-codes.
* src/callint.c (Fcall_interactively): Preserve lexical-binding mode for
interactive spec.
* src/eval.c (Fsetq): Handle lexical vars.
(Fdefun, Fdefmacro, Ffunction): Make closures when needed.
(Fdefconst, Fdefvaralias, Fdefvar): Mark as dynamic.
(FletX, Flet): Obey lexical binding.
(Fcommandp): Handle closures.
(Feval): New `lexical' arg.
(eval_sub): New function extracted from Feval. Use it almost
everywhere where Feval was used. Look up vars in lexical env.
Handle closures.
(Ffunctionp): Move from subr.el.
(Ffuncall): Handle closures.
(apply_lambda): Remove `eval_flags'.
(funcall_lambda): Handle closures and new byte-code-functions.
(Fspecial_variable_p): New function.
(syms_of_eval): Initialize the Vinternal_interpreter_environment var,
but without exporting it to Lisp.
Eli Zaretskii [Thu, 31 Mar 2011 19:12:30 +0000 (21:12 +0200)]
Fix bug #6671 with recentering and other scrolling problems.
src/xdisp.c (SCROLL_LIMIT): New macro.
(try_scrolling): Use it when setting scroll_limit. Limit
scrolling to 100 screen lines.
(redisplay_window): Even when falling back on "recentering",
position point in the window according to scroll-conservatively,
scroll-margin, and scroll-*-aggressively variables.
(try_scrolling): When point is above the window, allow searching
as far as scroll_max, or one screenful, to compute vertical
distance from PT to the scroll margin position. This prevents
try_scrolling from unnecessarily failing when
scroll-conservatively is set to a value slightly larger than the
window height. Clean up the case of PT below the margin at bottom
of window: scroll_max can no longer be INT_MAX. When aggressive
scrolling is in use, don't let point enter the opposite scroll
margin as result of the scroll.
(syms_of_xdisp) <scroll-conservatively>: Document the
threshold of 100 lines for never-recentering scrolling.
doc/emacs/display.texi (Auto Scrolling): Document the limit of 100 lines
for never-recentering scrolling with `scroll-conservatively'.
Stefan Monnier [Wed, 30 Mar 2011 22:25:57 +0000 (18:25 -0400)]
(completion-in-region): Pop down *Completions* automatically.
* lisp/minibuffer.el (completion-table-dynamic): Optimize `boundaries'.
(completion-in-region-mode): New minor mode.
(completion-in-region): Use it.
(completion-in-region--data, completion-in-region-mode-map): New vars.
(completion-in-region--postch): New function.
(completion--capf-misbehave-funs, completion--capf-safe-funs): New vars.
(completion--capf-wrapper): New function.
(completion-at-point): Use it to track well-behavedness of hook functions.
(completion-help-at-point): New command.
Jason Merrill [Wed, 30 Mar 2011 21:56:04 +0000 (17:56 -0400)]
* lisp/vc/add-log.el (add-change-log-entry): Don't use whitespace
syntax class to search for whitespace on a single line
(Message-ID: <4D938140.4030905@redhat.com>).
Eli Zaretskii [Wed, 30 Mar 2011 20:59:42 +0000 (22:59 +0200)]
Documentation parts of the scroll fix.
src/xdisp.c (syms_of_xdisp) <scroll-conservatively>: Document the
threshold of 100 lines for never-recentering scrolling.
doc/emacs/display.texi (Auto Scrolling): Document the limit of 100
lines for never-recentering scrolling with `scroll-conservatively'.
Stefan Monnier [Wed, 30 Mar 2011 19:18:12 +0000 (15:18 -0400)]
* src/eval.c (struct backtrace): Don't cheat with negative numbers, but do
steal a few bits to be more compact.
(interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace):
Remove unneeded casts.
Stefan Monnier [Wed, 30 Mar 2011 18:40:00 +0000 (14:40 -0400)]
* lisp/subr.el (apply-partially): Use a non-nil static environment.
(--dolist-tail--, --dotimes-limit--): Don't declare dynamically bound.
(dolist): Use a more efficient form for lexical-binding.
(dotimes): Use a cleaner semantics for lexical-binding.
* lisp/emacs-lisp/edebug.el (edebug-eval-top-level-form):
Use eval-sexp-add-defvars.
Gnus developers [Wed, 30 Mar 2011 14:59:42 +0000 (14:59 +0000)]
Merge Gnus' changes.
gnus.texi (Listing Groups): Document gnus-group-list-ticked.
gssapi.el (open-gssapi-stream): Remove the last mentions of the IMAP stuff.
gnus-score.el (gnus-score-string): Fix calling convention of `gnus-simplify-buffer-fuzzy' after last patches.
gnus-sum.el (gnus-update-marks): Don't send any marks updates to the server for articles we didn't get any headers for. This is a sanity check.
nnimap.el (nnimap-open-connection-1): Is the login responds with a new CAPABILITY, use it.
gnus-agent.el (gnus-agent-fetch-headers): Don't message if we're not downloading anything.
gnus.el (gnus-splash-svg-color-symbols): Removed superfluous `and'.
gnus.el (gnus-group-startup-message): Prefer svg file and replace colors.
(gnus-splash-svg-color-symbols): New function.
gnus-sum.el (gnus-simplify-buffer-fuzzy): Take the regexp explicitly instead of using the global gnus-simplify-subject-fuzzy-regexp.
(gnus-simplify-subject-fuzzy): Use the local gnus-simplify-subject-fuzzy-regex instead of the global one. This makes using this variable in group parameters work.
gnus-registry.el (gnus-registry-unfollowed-groups): Add "archive:sent" to the unfollowed group regex (for the recent Gnus archive:sent-YYYY-MM-DD groups).
(gnus-registry-split-fancy-with-parent): Bail out early in sender tracking if there are more than `gnus-registry-max-track-groups' matches.
message.el (message--yank-original-internal): New function to do the insertion cleanly inside eval in `message-yank-original'.
(message-yank-original): Use it.
Stefan Monnier [Wed, 30 Mar 2011 03:27:56 +0000 (23:27 -0400)]
* lisp/subr.el (with-output-to-temp-buffer): Don't change current-buffer to
standard-output while running the body.
* lisp/Makefile.in (COMPILE_FIRST): Remove pcase; it's not so important.
* lisp/startup.el: Fix up warnings, move lambda expressions
outside of quote.
* nntp.el (nntp-open-connection-function): Document the fact that some
values are not functions but are instead handled specially. Recognize
nntp-open-plain-stream value.
(nntp-open-connection): Recognize that value.
* proto-stream.el (open-protocol-stream): Bring back `network' type.
Make this the default type.
(proto-stream-open-plain): Rename from proto-stream-open-default.
(open-protocol-stream, proto-stream-open-starttls)
(proto-stream-open-tls, proto-stream-open-shell): Replace `default'
with `plain'.
Eli Zaretskii [Tue, 29 Mar 2011 19:58:13 +0000 (21:58 +0200)]
Fix off-by-one in scroll down aggressively.
src/xdisp.c (try_scrolling): When scrolling down aggressively,
scroll one screen line less, to make sure we end up at the margin
for fractions close to 1.
Ken Manheimer [Tue, 29 Mar 2011 18:26:01 +0000 (14:26 -0400)]
* allout.el (allout-hide-by-annotation, allout-flag-region): Reduce
possibility of overlay leakage by making them volatile.
* allout-widgets.el (allout-widgets-tally): Define as nil so the hash is
not shared between buffers. Mode initialization is responsible for giving
it a useful starting value.
(allout-item-span): Reduce possibility of overlay leakage by making them
volatile.
(allout-widgets-count-buttons-in-region): Add diagnostic function for
tracking down overlay leaks.
Gnus developers [Tue, 29 Mar 2011 13:23:38 +0000 (13:23 +0000)]
Merge changes made in Gnus trunk.
mm-view.el (mm-display-inline-fontify): Use `set-normal-mode' with local variables disabled rather than `normal-mode'.
imap.el (imap-shell-open, imap-process-connection-type): Use imap-process-connection-type for 'shell' streams as well as Kerberos, SSL, other subprocesses.
* coding.c (encode_designation_at_bol): Remove parameter `charbuf_end',
unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
All callers changed.
Stefan Monnier [Mon, 28 Mar 2011 20:26:35 +0000 (16:26 -0400)]
Don't reset post-command-hook to nil upon error.
* src/eval.c (enum run_hooks_condition): Remove.
(funcall_nil, funcall_not): New functions.
(run_hook_with_args): Call each function through a `funcall' argument.
Remove `cond' argument, now redundant.
(Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success)
(Frun_hook_with_args_until_failure): Adjust accordingly.
(run_hook_wrapped_funcall, Frun_hook_wrapped): New functions.
* src/keyboard.c (safe_run_hook_funcall): New function.
(safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error,
don't set the hook to nil, but remove the offending function instead.
(Qcommand_hook_internal): Remove, unused.
(syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define
Vcommand_hook_internal.
* doc/lispref/commands.texi (Command Overview): post-command-hook is not reset
to nil any more.
Eli Zaretskii [Mon, 28 Mar 2011 19:30:35 +0000 (21:30 +0200)]
Fix failures in try_scrolling when scrolling back.
src/xdisp.c (try_scrolling): When point is above the window, allow
searching as far as scroll_max, or one screenful, to compute
vertical distance from PT to the scroll margin position. This
prevents try_scrolling from unnecessarily failing when
scroll-conservatively is set to a value slightly larger than the
window height.
* print.c (strout): Remove parameter `multibyte', unused since
1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed.
* search.c (boyer_moore): Remove parameters `len', `pos' and `lim',
never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org.
All callers changed.
* w32.c (_wsa_errlist): Use braces for struct initializers.
* xdisp.c (string_buffer_position_lim): Remove parameter `w',
never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org.
All callers changed.
(string_buffer_position): Likewise. Also, make static (it's never
used outside xdisp.c).
(cursor_row_p): Remove parameter `w', unused since
2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed.
(decode_mode_spec): Remove parameter `precision', introduced during
Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used.
All callers changed.
Eli Zaretskii [Sun, 27 Mar 2011 20:01:46 +0000 (22:01 +0200)]
Fix scrolling back with scroll-down-aggressively.
src/xdisp.c (try_scrolling): Clean up the case of PT below the
margin at bottom of window: scroll_max can no longer be INT_MAX.
(redisplay_window): Find character position of margin and use
that, rather than adding margin to PT.
Jan Djärv [Sun, 27 Mar 2011 10:36:44 +0000 (12:36 +0200)]
Introduce ns-auto-hide-menu-bar to hide menubar for Emacs frames.
Code by Anders Lindgren.
* nsterm.m (ns_menu_bar_is_hidden): New variable.
(ns_constrain_all_frames, ns_menu_bar_should_be_hidden)
(ns_update_auto_hide_menu_bar): New functions.
(ns_update_begin): Call ns_update_auto_hide_menu_bar.
(applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and
ns_constrain_all_frames.
(constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden.
(syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil.
Chong Yidong [Sat, 26 Mar 2011 23:18:42 +0000 (19:18 -0400)]
Changes to open-protocol-stream, preparing for merging it with open-network-stream.
* lisp/gnus/proto-stream.el: Changes preparatory to merging open-protocol-stream
with open-network-stream.
(proto-stream-always-use-starttls): Option removed.
(open-protocol-stream): Return a process object by default. Provide a
new parameter :return-list specifying a list-type return value, which
now has the form (PROP . PLIST) instead of a fixed-length list. Change
:type `network' to `try-starttls', and `network-only' to `default'.
Make `default' the default, for compatibility with open-network-stream.
Handle the no-parameter case exactly as open-network-stream, with no
additional stream processing. Search plists using plist-get.
Explicitly add :end-of-commend parameter if it is missing.
(proto-stream-open-default): Renamed from
proto-stream-open-network-only. Return 'default as the type.
(proto-stream-open-starttls): Rename from proto-stream-open-network.
Use plist-get. Don't return `tls' as the type if STARTTLS negotiation
failed. Always return a list with a (possibly dead) process as the
first element, for compatibility with open-network-stream.
(proto-stream-open-tls): Use plist-get. Always return a list.
(proto-stream-open-shell): Return `default' as connection type.
(proto-stream-capability-open): Use plist-get.
(proto-stream-eoc): Function deleted.
* lisp/gnus/nnimap.el (nnimap-stream, nnimap-open-connection)
(nnimap-open-connection-1): Handle renaming of :type parameter for
open-protocol-stream.
(nnimap-open-connection-1): Pass a :return-list parameter
open-protocol-stream to obtain a list return value. Parse this list
using plist-get.
* lisp/gnus/nntp.el (nntp-open-connection): Handle renaming of :type parameter
for open-protocol-stream. Accept open-protocol-stream return value
that is a subprocess object instead of a list. Handle the case of a
dead returned process.
Eli Zaretskii [Sat, 26 Mar 2011 22:05:30 +0000 (00:05 +0200)]
Fix scrolling with scroll-*-aggressively.
Aggressive scrolling backward by large distance still doesn't DTRT.
src/xdisp.c (try_scrolling): When aggressive scrolling is in use, don't
let point enter the opposite scroll margin as result of the scroll.
(redisplay_window): Fix operator precedence in condition.