Gnus developers [Tue, 31 May 2011 22:08:51 +0000 (22:08 +0000)]
Merge changes made in Gnus trunk.
gnus.texi (Store custom flags and keywords): Refer to `gnus-registry-article-marks-to-{chars,names}' instead of `gnus-registry-user-format-function-{M,M2}'.
shr.el (shr-rescale-image): Add an :ascent of 100 to images so that the underline comes at the bottom.
gnus-registry.el (gnus-registry-article-marks-to-chars): Rename from `gnus-registry-user-format-function-M' and declare the latter obsolete.
(gnus-registry-article-marks-to-names): Rename from `gnus-registry-user-format-function-M2'.
shr.el (shr-browse-image): Copy the URL if called interactively.
Stefan Monnier [Tue, 31 May 2011 21:40:30 +0000 (18:40 -0300)]
* lisp/minibuffer.el (complete-with-action): Return nil for the metadata and
boundaries of non-functional tables.
(completion-table-dynamic): Return nil for the metadata.
(completion-table-with-terminator): Add default case, using
complete-with-action.
(completion--metadata): New function.
(completion-all-sorted-completions, minibuffer-completion-help): Use it
to try and avoid pathological performance problems.
(completion--embedded-envvar-table): Return `category' metadata.
Dan Nicolaescu [Tue, 31 May 2011 14:52:10 +0000 (07:52 -0700)]
Don't force ./temacs to start in terminal mode.
* frame.c (make_initial_frame): Initialize faces in all cases, not
only when CANNOT_DUMP is defined.
* dispnew.c (init_display): Remove CANNOT_DUMP condition.
Dan Nicolaescu [Tue, 31 May 2011 05:12:19 +0000 (22:12 -0700)]
Make it possible to run ./temacs.
* callproc.c (set_initial_environment): Remove CANNOT_DUMP code,
syms_of_callproc does the same thing. Remove test for
"initialized", do it in the caller.
* emacs.c (main): Avoid calling set_initial_environment when dumping.
Stefan Monnier [Tue, 31 May 2011 03:03:38 +0000 (00:03 -0300)]
* lisp/minibuffer.el: Add metadata method to completion tables.
(completion-category-overrides): New defcustom.
(completion-metadata, completion--field-metadata)
(completion-metadata-get, completion--styles)
(completion--cycle-threshold): New functions.
(completion-try-completion, completion-all-completions):
Add `metadata' argument to choose completion-styles.
(completion--do-completion): Use metadata to choose cycling.
(completion-all-sorted-completions): Use metadata for sorting.
Remove :completion-cycle-penalty which is not needed any more.
(completion--try-word-completion): Add `metadata' argument.
(minibuffer-completion-help): Check metadata for annotation function
and sorting.
(completion-file-name-table): Return `category' metadata.
(minibuffer-completing-file-name): Make obsolete.
* lisp/simple.el (minibuffer-completing-symbol): Make obsolete.
* lisp/icomplete.el (icomplete-completions): Pass new `metadata' param to
completion-try-completion.
* src/minibuf.c (Finternal_complete_buffer): Return `category' metadata.
(read_minibuf): Use get_minibuffer.
(syms_of_minibuf): Use DEFSYM.
(Qmetadata): New var.
* src/data.c (Qbuffer): Don't make it static.
(syms_of_data): Use DEFSYM.
gnus-group.el (gnus-group-mark-article-read): It's possible that we want to have `gnus-newsgroup-unselected' kept sorted. If this isn't done, then unselected articles may be marked as read.
pop3.el (pop3-open-server): Erase the buffer after the greeting, since not doing this seems to lead to a race condition in pop3-logon.
nnvirtual.el (nnvirtual-request-article): Bind `gnus-command-method' so that the call chain it correct when we call "upwards".
gnus-sum.el (gnus-select-newsgroup): Auto-expiry doesn't make sense in read-only groups.
gnus-group.el (gnus-group-mark-article-read): Ditto.
message.el (message-cite-reply-position): Doc string fix.
nnimap.el (nnimap-transform-headers): Simplify regexp to hopefully avoid regexp overflow.
(nnimap-transform-split-mail): Ditto.
pop3.el (pop3-retr): Error out if the server closes the connection.
Stefan Monnier [Mon, 30 May 2011 17:21:59 +0000 (14:21 -0300)]
* lisp/gnus/mml1991.el (mml1991-mailcrypt-encrypt): Remove use of ill-designed
mm-with-unibyte-current-buffer. The buffer should not contain any
multibyte chars anyway at this stage.
Paul Eggert [Mon, 30 May 2011 05:39:59 +0000 (22:39 -0700)]
* eval.c (Qdebug): Now static.
* lisp.h (Qdebug): Remove decl. This reverts a part of the
2011-04-26T11:26:05Z!dan.colascione@gmail.com that inadvertently undid part of
2011-04-14T06:48:41Z!eggert@cs.ucla.edu.
Gnus developers [Sun, 29 May 2011 23:28:45 +0000 (23:28 +0000)]
shr.el (shr-urlify): Use shr-add-font to make underlines be less ugly at the end of lines.
smiley.el (gnus-smiley-file-types): Add gif as supported file type.
Chong Yidong [Sun, 29 May 2011 21:35:35 +0000 (17:35 -0400)]
Fix animated gifs (Bug#6981).
* lisp/image-mode.el (image-toggle-display-image): Ensure that the
image spec passed to the animate timer is the same object as in
the the buffer's display property.
(image-transform-properties): Doc fix.
* lisp/image.el (image-animate-max-time): Default to nil.
* lisp/image.el (image-animate-max-time): Allow nil and t values.
Default to nil.
(create-animated-image): Doc fix.
(image-animate-start): Remove second arg; just use
image-animate-max-time.
(image-animate-timeout): Doc fix. Args changed.
Leo Liu [Sat, 28 May 2011 22:56:14 +0000 (18:56 -0400)]
New major mode: Occur Edit mode.
* lisp/replace.el (occur-menu-map, occur-edit-mode-map): New vars.
(occur-mode-map): Bind occur-edit-mode. Use occur-menu-map.
(occur-edit-mode): New major mode (Bug#8463).
(occur-after-change-function): New function.
(occur-engine): Give Occur tags a read-only property.
Dima Kogan [Sat, 28 May 2011 18:35:29 +0000 (14:35 -0400)]
More fixes to prevent hide-show from being confused by commented-out braces (Bug#8279).
* progmodes/hideshow.el (hs-looking-at-block-start-p): New fun.
(hs-hide-block-at-point, hs-find-block-beginning)
(hs-already-hidden-p, hs-hide-block, hs-show-block): Use it.
Jim Meyering [Sat, 28 May 2011 12:19:08 +0000 (14:19 +0200)]
avoid a sign-extension bug in crypto_hash_function
* fns.c (to_uchar): Define.
(crypto_hash_function): Use it to convert some newly-signed
variables to unsigned, to avoid sign-extension bugs. For example,
without this change, (md5 "truc") would evaluate to 45723a2aff78ff4fff7fff1114760e62 rather than the expected 45723a2af3788c4ff17f8d1114760e62. Reported by Antoine Levitt in
http://thread.gmane.org/gmane.emacs.devel/139824
Eli Zaretskii [Sat, 28 May 2011 10:00:09 +0000 (13:00 +0300)]
Adapt the MSDOS build to introduction of sha1 and other latest changes.
msdos/sed1v2.inp: Edit "make-docfile -d FOO" commands to chdir back to
src/. Make editing of RUN_TEMACS commands less sensitive to
leading whitespace.
msdos/sedlibmk.inp (gl_LIBOBJS): Add sha1.o.
Stefan Monnier [Sat, 28 May 2011 02:10:32 +0000 (23:10 -0300)]
* lisp/minibuffer.el (completion--capf-wrapper): Check applicability before
retuning non-nil for non-exclusive completion data.
* lisp/progmodes/etags.el (tags-completion-at-point-function):
* lisp/info-look.el (info-lookup-completions-at-point): Mark as non-exclusive.
(info-complete): Adjust accordingly.
* lisp/erc/erc-pcomplete.el (erc-pcompletions-at-point): Mark the completion
data as non-exclusive if it's using the default-completion-function.
(pcomplete-erc-parse-arguments): Rename pcomplete-parse-erc-arguments.
(pcomplete-erc-setup): Use new name.
Stefan Monnier [Sat, 28 May 2011 01:33:10 +0000 (22:33 -0300)]
* lisp/info-look.el: Convert to lexical-binding and completion-at-point.
(info-lookup-completions-at-point): New function.
(info-complete): Use it and completion-in-region.
Toby Cubitt [Fri, 27 May 2011 19:58:19 +0000 (16:58 -0300)]
* lisp/emacs-lisp/avl-tree.el (avl-tree--del-balance): Rename from
avl-tree--del-balance1 and make it work both ways.
(avl-tree--del-balance2): Remove.
(avl-tree--enter-balance): Rename from avl-tree--enter-balance1 and
make it work both ways.
(avl-tree--enter-balance2): Remove.
(avl-tree--switch-dir, avl-tree--dir-to-sign, avl-tree--sign-to-dir):
New macros.
(avl-tree--mapc, avl-tree-map): Add direction argument.
Paul Eggert [Fri, 27 May 2011 19:32:01 +0000 (12:32 -0700)]
* xselect.c: Fix minor problems prompted by GCC 4.6.0 warnings.
(x_handle_selection_request, frame_for_x_selection): Remove unused vars.
(x_clipboard_manager_save): Now static.
(Fx_clipboard_manager_save): Rename local to avoid shadowing.
Chong Yidong [Fri, 27 May 2011 16:17:59 +0000 (12:17 -0400)]
Support X clipboard managers.
* lisp/select.el (xselect-convert-to-targets): Add MULTIPLE target to list.
(xselect-convert-to-save-targets): New function.
* src/xselect.c: Support for clipboard managers.
(Vselection_alist): Move to termhooks.h as terminal-local var.
(LOCAL_SELECTION): New macro.
(x_atom_to_symbol): Handle x_display_info_for_display fail case.
(symbol_to_x_atom): Remove gratuitous arg.
(x_handle_selection_request, lisp_data_to_selection_data)
(x_get_foreign_selection, Fx_register_dnd_atom): Callers changed.
(x_own_selection, x_get_local_selection, x_convert_selection): New
arg, specifying work frame. Use terminal-local Vselection_alist.
(some_frame_on_display): Delete unused function.
(Fx_own_selection_internal, Fx_get_selection_internal)
(Fx_disown_selection_internal, Fx_selection_owner_p)
(Fx_selection_exists_p): New optional frame arg.
(frame_for_x_selection, Fx_clipboard_manager_save): New functions.
(x_handle_selection_clear): Don't treat other terminals with the
same keyboard specially. Use the terminal-local Vselection_alist.
(x_clear_frame_selections): Use Frun_hook_with_args.
* src/termhooks.h (Vselection_alist): Make it terminal-local.
* src/terminal.c (create_terminal): Initialize it.
* src/xterm.c (x_term_init): Intern ATOM and CLIPBOARD_MANAGER atoms.