Martin Rudalics [Fri, 14 Jan 2011 10:29:40 +0000 (11:29 +0100)]
Sanitize buffer display handling in calendar.el, a first step.
* window.el (window-safely-shrinkable-p): Remove.
* calendar/calendar.el (calendar-generate-window): Only fit a
vertically combined window to its buffer.
(calendar-basic-setup): Call pop-to-buffer, preferably making a
new window at the bottom of the frame. Remove the
split-height-threshold binding around call of
calendar-list-holidays, this must be handled separately.
Kim F. Storm [Thu, 13 Jan 2011 16:26:40 +0000 (17:26 +0100)]
* ido.el (ido-may-cache-directory): Move "too-big" check later.
(ido-next-match, ido-prev-match): Fix stray reordering of matching
items when cycling through the matches.
Chong Yidong [Thu, 13 Jan 2011 04:23:41 +0000 (23:23 -0500)]
New arg RETURN-ACTION for compose-mail, and related functions.
* lisp/mail/sendmail.el (mail-return-action): New var.
(mail-mode): Make it buffer-local.
(mail-bury): Obey it. Move special Rmail window handling to
rmail-mail-return.
(mail, mail-setup): New arg RETURN-ACTION.
(sendmail-user-agent-compose): Move from simple.el.
* lisp/simple.el (sendmail-user-agent-compose): Move to sendmail.el.
(compose-mail): New arg RETURN-ACTION.
(compose-mail-other-window, compose-mail-other-frame): Likewise.
* lisp/gnus/gnus-msg.el (gnus-msg-mail): New arg RETURN-ACTION. Pass it to
message-mail.
* lisp/gnus/message.el (message-mail): New arg RETURN-ACTION.
(message-return-action): New var.
(message-bury): Use it.
(message-mode): Make it buffer-local.
(message-send-and-exit): Always call message-bury.
(message-tool-bar-gnome): Tweak tool-bar items. Add :vert-only tags.
* lisp/mail/rmail.el (rmail-mail-return): New function.
(rmail-start-mail): Pass it to compose-mail.
* lisp/mh-e/mh-comp.el (mh-user-agent-compose): New arg RETURN-ACTION.
Martin Rudalics [Wed, 12 Jan 2011 13:19:30 +0000 (14:19 +0100)]
Sanitize buffer display handling in dired.el and proced.el.
* dired.el (dired-display-file, dired-why): Use
display-buffer-other-window with label.
(dired-pop-to-buffer): Remove.
(dired-mark-pop-up): Use display-buffer and quit-restore-window.
* proced.el (proced-send-signal): Use display-buffer and
quit-restore-window.
proto-stream.el (open-protocol-stream): Protect against the low-level transport functions returning nil.
gnus-sum.el (gnus-summary-next-article): Remove hack to reselect group window, because it does the wrong thing when a separate frame displays the group buffer.
gnus-int.el (gnus-request-accept-article): Don't try to update marks and stuff if the backend didn't return the article number. This fixes an Exchange-related nnimap bug.
mm-decode.el (mm-preferred-alternative-precedence): Discourage showing empty parts.
nnimap.el (nnimap-convert-partial-article): Protect against zero-length body parts.
Tassilo Horn [Tue, 11 Jan 2011 20:14:13 +0000 (21:14 +0100)]
* image.c (imagemagick_load_image, Finit_image_library): Free
intermediate image after creating a MagickWand from it. Terminate
MagickWand environment after image loading.
Martin Rudalics [Tue, 11 Jan 2011 17:02:28 +0000 (18:02 +0100)]
Sanitize buffer display handling in simple.el.
* simple.el (goto-line, compose-mail-other-window): Replace
switch-to-buffer-other-window by pop-to-buffer-other-window.
(pop-global-mark): Use pop-to-buffer-same-window instead of
switch-to-buffer.
(compose-mail-other-frame): Use pop-to-buffer-other-frame
instead of switch-to-buffer-other-frame.
(special-mode-map): Bind "q" to quit-restore-window instead of
quit-window.
Martin Rudalics [Tue, 11 Jan 2011 15:55:59 +0000 (16:55 +0100)]
Sanitize some buffer display calls with new method specifiers.
* buff-menu.el (Buffer-menu-mode-map): Bind "q" to
quit-restore-window.
(buffer-menu): Call pop-to-buffer-same-window.
(buffer-menu-other-window): Call pop-to-buffer-other-window.
(Buffer-menu-select): Rewrite using display-buffer-same-window
and display-buffer.
(Buffer-menu-1-window, Buffer-menu-mouse-select)
(Buffer-menu-this-window): Call pop-to-buffer-same-window.
(Buffer-menu-other-window): Call pop-to-buffer-other-window.
(Buffer-menu-switch-other-window): Call
display-buffer-same-frame-other-window.
(Buffer-menu-2-window): Add label argument in calls of
display-buffer-same-window and
pop-to-buffer-same-frame-other-window.
* mail/reporter.el (reporter-submit-bug-report): Use
display-buffer-same-frame-other-window.
* progmodes/compile.el (compilation-find-file): Use
display-buffer-same-frame.
* progmodes/inf-lisp.el (switch-to-lisp): Rewrite with new buffer
display method specifiers.
* vc/ediff-ptch.el (ediff-get-patch-buffer): Use
pop-to-buffer-other-window.
(ediff-patch-file-internal): Replace switch-to-buffer by
pop-to-buffer-same-window and switch-to-buffer-other-window by
pop-to-buffer-other-window.
* vc/pcvs.el (cvs-ediff-exit-hook): Call
pop-to-buffer-same-window instead of switch-to-buffer.
(cvs-mode-find-file): Replace switch-to-buffer and
switch-to-buffer-other-window by pop-to-buffer-same-window and
pop-to-buffer-other-window. Replace call to dired-other-window
by call to display-buffer-other-window.
(cvs-temp-buffer): Call display-buffer-other-window instead of
display-buffer.
Stefan Monnier [Tue, 11 Jan 2011 05:07:32 +0000 (00:07 -0500)]
* lisp/progmodes/prolog.el: Fix up coding conventions and such.
(prolog-indent-width): Use the same default as in
previous prolog.el rather than tab-width which depends on which buffer
is current when the file is loaded.
(prolog-electric-newline-flag): Only enable if electric-indent-mode
is not available.
(prolog-emacs): Remove. Use (featurep 'xemacs) instead.
(prolog-known-systems): Remove.
(prolog-mode-syntax-table, prolog-inferior-mode-map):
Move initialization into declaration.
(prolog-mode-map): Move initialization into declaration.
Remove system-specific mode-map vars, since they referred to the same
keymap anyway.
(prolog-mode-variables): Obey the user's preference w.r.t
adaptive-fill-mode. Prefer symbol-value to `eval'.
(prolog-mode-keybindings-edit): Add compatibility bindings.
(prolog-mode): Use define-derived-mode. Don't handle mercury here.
(mercury-mode-map): New var.
(mercury-mode, prolog-inferior-mode): Use define-derived-mode.
(prolog-ensure-process, prolog-process-insert-string)
(prolog-consult-compile): Use with-current-buffer.
(prolog-guess-fill-prefix): Simplify data flow.
(prolog-replace-in-string): New function to use instead of
replace-in-string.
(prolog-enable-sicstus-sd): Don't abuse `eval'.
(prolog-uncomment-region): Use `uncomment-region' when available.
(prolog-electric-colon, prolog-electric-dash): Use `eolp'.
(prolog-int-to-char, prolog-char-to-int): New functions to use instead
of int-to-char and char-to-int.
(prolog-mode-hook, prolog-inferior-mode-hook): Don't force font-lock.
Ken Manheimer [Mon, 10 Jan 2011 22:05:42 +0000 (17:05 -0500)]
allout.el: Add 2011 to the file copyright.
(allout-encrypt-string): Prevent encryption from adding an extra newline at
the end of the topic body.
(allout-version): Increment to 2.3.
Michael Albinus [Mon, 10 Jan 2011 09:56:17 +0000 (10:56 +0100)]
* dbusbind.c (QCdbus_request_name_allow_replacement): New symbol;
used by Fdbus_register_service.
(QCdbus_request_name_replace_existing): Likewise.
(QCdbus_request_name_do_not_queue): Likewise.
(QCdbus_request_name_reply_primary_owner): Likewise.
(QCdbus_request_name_reply_in_queue): Likewise.
(QCdbus_request_name_reply_exists): Likewise.
(QCdbus_request_name_reply_already_owner): Likewise.
(Fdbus_register_service): New function.
(Fdbus_register_method): Use Fdbus_register_service to do the name
registration.
(syms_of_dbusbind): Add symbols dbus-register-service,
:allow-replacement, :replace-existing, :do-not-queue,
:primary-owner, :existing, :in-queue and :already-owner.
Michael Albinus [Mon, 10 Jan 2011 09:46:19 +0000 (10:46 +0100)]
* net/dbus.el (dbus-unregister-service): Translate returned
integer into a symbol.
(dbus-register-property): Use `dbus-register-service' to do the
name registration.
Chong Yidong [Sun, 9 Jan 2011 21:35:53 +0000 (16:35 -0500)]
Improvements to tango themes, including some faces from Jan Moringen.
* themes/tango-theme.el, themes/tango-dark-theme.el: Let-bind
tango palette colors. Only define faces for color displays.
Customize the ansi-color-names-vector variable. Add Ediff,
Flyspell, and Semantic faces as suggested by Jan Moringen.
Chong Yidong [Sun, 9 Jan 2011 21:05:53 +0000 (16:05 -0500)]
Fix 2010-03-12T22:56:30Z!cyd@stupidchicken.com change -- rename :on/off-image widget props to :on/off-glyph.
* wid-edit.el (visibility): Replace :on-image and :off-image
widget properties with :on-glyph and :off-glyph, for consistency
with the `visibility' widget.
(widget-toggle-value-create, widget-visibility-value-create):
Merge into a single function `widget-toggle-value-create'.
* cus-edit.el (custom-variable-value-create, custom-visibility)
(custom-face-edit-value-create, custom-face-value-create): Replace
:on-image and :off-image widget properties with :on-glyph and
:off-glyph, for consistency with the `visibility' widget.
Chong Yidong [Sun, 9 Jan 2011 04:59:56 +0000 (23:59 -0500)]
Record "safe themes" as sha1 hashes, as suggested by Stefan Monnier.
* lisp/custom.el (custom-safe-themes): Rename from
custom-safe-theme-files. Add :risky tag.
(load-theme, custom-theme-load-confirm): Save sha1 hashes to
custom-safe-themes, not filenames. Suggested by Stefan Monnier.
Chong Yidong [Sat, 8 Jan 2011 19:19:55 +0000 (14:19 -0500)]
Load themes using `load', querying if theme file not known safe.
* custom.el (custom-safe-theme-files): New defcustom.
(custom-theme-load-confirm): New function.
(load-theme): Load theme using `load', confirming with
custom-theme-load-confirm if necessary.
Martin Rudalics [Sat, 8 Jan 2011 11:20:19 +0000 (12:20 +0100)]
Major rewrite of display-buffer functions, atomic and side windows.
* buff-menu.el (Buffer-menu-switch-other-window): Use
display-buffer-same-frame-other-window.
(Buffer-menu-2-window): Use
pop-to-buffer-same-frame-other-window.
* progmodes/compile.el (compilation-start): Use
pop-up-window-set-height specifier.
(compilation-goto-locus): Rewrite window-setup code with new
display method specifiers.
* vc/ediff-mult.el (ediff-collect-custom-diffs)
(ediff-meta-show-patch): Use display-buffer-other-window.
* files.el (ctl-x-5-map): Remove binding for
display-buffer-other-frame.
* window.el (window-child-count): New function.
(walk-window-tree-1, walk-window-tree, walk-window-subtree):
Move them here.
(windows-with-parameter, window-with-parameter)
(window-atom-root, make-window-atom, window-atom-check-1)
(window-atom-check): New functions.
(window-sides-vertical, window-sides-slots, window-sides-alist):
New options.
(window-side-check, window-check): New functions.
(composite-window-p, composite-root-window-p)
(composite-main-window-p, composite-support-window-p)
(composite-root-window, composite-major-window)
(composite-main-sibling, composite-lowest-child-role)
(compound-window-p, compound-main-window-p)
(compound-root-window, group-window-p, group-root-window): Remove,
their functionality is now provided by atomic and side windows.
(other-window): Check other-window-function parameter and rewrite
handling of no-other-window parameter.
(window-deletable-p, delete-window, delete-other-windows)
(split-window): Handle ignore-window-parameters, atomic and side
windows. Call window-check.
(make-compound-window, make-window-group, make-support-window):
Remove, replaced by atomic and side windows.
(display-buffer-names, display-buffer-regexps): Remove, replaced
by display-buffer-alist.
(display-buffer-method-specifiers)
(display-buffer-macro-specifiers): New constants.
(display-buffer-default-specifiers): Rewrite.
(display-buffer-alist): New variable.
(display-buffer-other-window-specifiers)
(display-buffer-same-frame-specifiers)
(display-buffer-other-window-same-frame-specifiers)
(display-buffer-other-frame-specifiers): Rewrite with new
display specifiers.
(display-buffer-function, display-buffer-window)
(display-buffer-even-sizes, display-buffer-select-window, display-buffer-in-window):
Rewrite doc-string.
(display-buffer-set-height): Rename from display-buffer-adjust-height.
(display-buffer-set-width): Rename from display-buffer-adjust-width.
(display-buffer-in-window): Install no-other-window parameter if
required.
(display-buffer-reuse-window): New function.
(display-buffer-split-window-1, display-buffer-split-window):
Rewrite.
(display-buffer-split-atom-window, display-buffer-pop-up-window)
(display-buffer-pop-up-frame, display-buffer-pop-up-side-window):
New functions.
(display-buffer-normalize-specifiers-1)
(display-buffer-normalize-specifiers, display-buffer
(display-buffer-same-window, display-buffer-same-frame)
(display-buffer-other-window)
(display-buffer-same-frame-other-window, pop-to-buffer)
(pop-to-buffer-same-window, pop-to-buffer-same-frame)
(pop-to-buffer-other-window)
(pop-to-buffer-same-frame-other-window)
(pop-to-buffer-other-frame): Rewrite using new display
specifiers.
(special-display-regexps, special-display-function)
(same-window-buffer-names, same-window-regexps, pop-up-frames)
(display-buffer-reuse-frames, pop-up-windows)
(split-window-preferred-function, split-height-threshold)
(split-width-threshold, even-window-heights)
(display-buffer-mark-dedicated): Rewrite obsolete declarations.
(special-display-p, same-window-p): Rewrite with new display
specifiers.
* windows.texi (Windows): Rename sections "Frames and Windows"
to "Windows and Frames", "Compound Windows" to "Atomic Windows",
and "Window Groups" to "Side Windows".
(Splitting Windows, Deleting Windows): Rewrite sections dealing
with window parameters and ignore-window-parameters. Describe
handling of atomic windows and side windows.
(Displaying Buffers): Describe method and other new display
specifiers, display-buffer-alist, and the new functions
display-buffer-reuse-window, display-buffer-pop-up-window,
display-buffer-pop-up-frame, and display-buffer-in-side-window.
Add description of specifier normalization
(Window Parameters): Describe functions windows-with-parameter
and window-with-parameter and the window parameters used by the
window handling routines.
(Composite Windows, Compound Windows, Window Groups): Sections
removed.
(Atomic Windows): New section on atomic windows.
(Side Windows): New section on side windows.
Ken Manheimer [Thu, 6 Jan 2011 07:19:05 +0000 (02:19 -0500)]
allout.el: (allout-back-to-current-heading): Ensure return to the visible
containing topic, rather than a collapsed one.
(allout-view-change-hook): Remove hook that was deprecated long ago.
(allout-exposure-change-hook): Remove documentation remarks concerning
removed allout-view-change-hook.
(allout-flag-region): Remove invocation of and documentation remarks
concerning allout-view-change-hook.
Tassilo Horn [Wed, 5 Jan 2011 21:17:51 +0000 (22:17 +0100)]
* doc-view.el (doc-view-image-width): New variable.
(doc-view-enlarge, doc-view-insert-image): Prefer imagemagick
backend for PNG images, and do dynamic rescaling instead of
reconverting the whole doc.
Ken Manheimer [Tue, 4 Jan 2011 19:44:10 +0000 (14:44 -0500)]
Reconcile with changes in line movement behavior for long text lines
that cross more than a single physical window line, ie when truncate-lines
is nil.
(allout-next-visible-heading): Provide for change in line-move behavior on
long lines when truncate-lines is nil. In that case, line-move can wind up
on the same textual line when it moves to the next window line, and moving
to the bullet position after the move yields zero advancement. Add logic
to detect and compensate for the lack of progress.
(allout-current-topic-collapsed-p): move-end-of-line respect for field
boundaries is different when operating with body lines shorter than window
width versus ones greater than window width, which can yield false
negatives in this function. Avoid difference by applying move-end-of-line
while field-text-motion is inhibited.