Stefan Monnier [Wed, 9 Dec 2009 01:53:15 +0000 (01:53 +0000)]
Get rid of the ELCFILES abomination.
* Makefile.in (update-elclist, ELCFILES, compile-last): Remove.
(compile-elcfiles): New phony target.
(compile-main): Compute ELCFILES dynamically.
(compile-clean): New target to remove left-over elc files.
(compile, all): Use it.
Dan Nicolaescu [Tue, 8 Dec 2009 15:56:57 +0000 (15:56 +0000)]
Add support for stashing a snapshot of the current tree.
* vc-git.el (vc-git-stash-snapshot): New function.
(vc-git-stash-map, vc-git-extra-menu-map): Add a mapping for it.
Juri Linkov [Mon, 7 Dec 2009 22:36:58 +0000 (22:36 +0000)]
Don't lazy-highlight the comint output in history Isearch mode.
* comint.el (comint-history-isearch-search): Instead of
`comint-line-beginning-position', use `comint-after-pmark-p'
to check if point if before the process mark, and go to
`process-mark' in this case.
Stefan Monnier [Mon, 7 Dec 2009 20:06:26 +0000 (20:06 +0000)]
* minibuffer.el (completion-at-point-functions): New var.
(completion-at-point): New command.
* indent.el (indent-for-tab-command): Handle the new `complete' behavior.
* progmodes/python.el (python-mode-map): Use completion-at-point.
(python-completion-at-point): Rename from python-partial-symbol and
adjust for use in completion-at-point-functions.
(python-mode): Setup completion-at-point for Python completion.
* emacs-lisp/lisp.el (lisp-completion-at-point): New function
extracted from lisp-complete-symbol.
(lisp-complete-symbol): Use it.
* emacs-lisp/lisp-mode.el (emacs-lisp-mode): Use define-derived-mode,
setup completion-at-point for Elisp completion.
(emacs-lisp-mode-map, lisp-interaction-mode-map): Use completion-at-point.
* ielm.el (ielm-map): Use completion-at-point.
(inferior-emacs-lisp-mode): Setup completion-at-point for Elisp completion.
* progmodes/sym-comp.el: Move to...
* obsolete/sym-comp.el: Move from progmodes.
Eli Zaretskii [Mon, 7 Dec 2009 19:21:57 +0000 (19:21 +0000)]
Prevent save-buffer in Rmail buffers from using the coding-system
of the current message, and from clobbering the encoding mnemonics
in the mode line (Bug#4623).
(rmail-swap-buffers): Swap encoding and modified flag, too.
(rmail-message-encoding): New variable.
(rmail-write-region-annotate): Record the encoding of the current message
in rmail-message-encoding.
(rmail-after-save-hook): New function, restores the encoding of the current
message after the message collection is saved.
Juri Linkov [Mon, 7 Dec 2009 17:30:01 +0000 (17:30 +0000)]
Correctly restore original Isearch point. (Bug#4994)
* isearch.el (isearch-mode): Move `isearch-push-state' after
`(run-hooks 'isearch-mode-hook)'.
(isearch-cancel): When `isearch-push-state-function' is defined,
let-bind `isearch-cmds' to the first state (the last element of
`isearch-cmds') and call `isearch-top-state' (it calls pop-state
function and restores the original point). Otherwise, move point
to `isearch-opoint'.
Dan Nicolaescu [Mon, 7 Dec 2009 09:02:11 +0000 (09:02 +0000)]
Support showing a single log entry from vc-annotate.
* vc.el (print-log): Add a new argument: START-REVISION.
(vc-print-log-internal): Add a new optional argument and
pass it to the backend.
(vc-print-log, vc-print-root-log): Adjust callers.
* vc-annotate.el (vc-annotate-show-log-revision-at-line): If a
buffer already displays the requested log entry, use it.
Otherwise display only the log entry in question.
* vc-svn.el (vc-svn-print-log):
* vc-mtn.el (log-view-file-re):
* vc-hg.el (vc-hg-state):
* vc-git.el (vc-git-print-log): Add support for new argument START-REVISION.
(vc-git-show-log-entry): Return t on success.
* vc-bzr.el (vc-bzr-print-log): Add support new argument START-REVISION.
(vc-bzr-show-log-entry): Return t on success.
* vc-rcs.el (vc-rcs-print-log):
* vc-sccs.el (vc-sccs-print-log):
* vc-cvs.el (vc-cvs-print-log): Add new argument, ignore it.
Michael Albinus [Mon, 7 Dec 2009 06:38:06 +0000 (06:38 +0000)]
Handle prompt rules of ksh in OpenBSD 4.5. Reported by Raphaël
Berbain <raphael.berbain@gmail.com>.
* net/tramp.el (tramp-end-of-output): Move up. Use `#' and `$'
characters.
(tramp-initial-end-of-output): New defconst.
(tramp-methods, tramp-find-shell)
(tramp-open-connection-setup-interactive-shell)
(tramp-maybe-open-connection): Use it.
(tramp-shell-prompt-pattern, tramp-wait-for-output): Handle
existence of `#' and `$'.
* net/tramp-fish.el (tramp-fish-maybe-open-connection): Use
`tramp-initial-end-of-output'.
Dan Nicolaescu [Mon, 7 Dec 2009 06:30:30 +0000 (06:30 +0000)]
Get the background mode from the terminal for xterm, and set
faces accordingly.
* term/xterm.el (xterm-set-background-mode): New function.
(terminal-init-xterm): Use it in case xterm supports background
color queries. Recompute faces after getting the background
color.
Stefan Monnier [Mon, 7 Dec 2009 02:37:42 +0000 (02:37 +0000)]
Make it work for non-file buffers (bug#5102).
* doc-view.el (doc-view-current-cache-dir):
Use doc-view-buffer-file-name rather than buffer-file-name.
(doc-view-mode): Use buffer-name when buffer-file-name is nil.
Roland Winkler [Sun, 6 Dec 2009 05:05:36 +0000 (05:05 +0000)]
* textmodes/bibtex.el (bibtex-enclosing-field): Exclude entry delimiter
if it is at the end of the current line.
(bibtex-generate-url-list): Fix docstring.
Stefan Monnier [Sun, 6 Dec 2009 01:25:41 +0000 (01:25 +0000)]
(minibuffer-complete-and-exit): Don't replace the
minibuffer's content with itself.
Fold the confirm-after-completion case into the `confirm' case.
(completion-pcm-word-delimiters): Add : and / to the delimiters.
Juri Linkov [Sat, 5 Dec 2009 23:22:03 +0000 (23:22 +0000)]
Save and restore dired buffer's point positions too. (Bug#4880)
(dired-save-positions): Return in the first element
buffer's position in format (BUFFER DIRED-FILENAME BUFFER-POINT).
Doc fix.
(dired-restore-positions): First restore buffer's position.
While restoring window's positions, check if window still displays
the original buffer.
Chong Yidong [Sat, 5 Dec 2009 22:49:00 +0000 (22:49 +0000)]
* xdisp.c (push_display_prop): Don't set avoid_cursor_p. Return 0
if push failed.
(handle_line_prefix): Set avoid_cursor_p here. Check return value
of push_display_prop (Bug#5000).
Juri Linkov [Sat, 5 Dec 2009 19:49:47 +0000 (19:49 +0000)]
(Info-find-node-2): Set `Info-current-subfile' to nil
for virtual nodes. (Bug#4147)
(Info-find-node-2): Set `Info-current-node-virtual' to nil
when moving from a virtual node.
(Info-mode-menu): Add `Info-virtual-index' to the menu.
(Info-mode): Add `Info-virtual-index' to the docstring.
Roland Winkler [Sat, 5 Dec 2009 04:08:48 +0000 (04:08 +0000)]
(bibtex-map-entries): Use marker to keep
track of the buffer position of the end of a BibTeX entry as this
position may change during reformatting.
(bibtex-format-entry): Remove whitespace before processing
numerical fields so that we recognize the latter properly.
(bibtex-reformat): Do not use push which changes the global value
of bibtex-entry-format.
(bibtex-field-braces-alist, bibtex-field-strings-alist)
(bibtex-field-re-init): Replace only space characters by regexp
for whitespace.
(bibtex-generate-url-list, bibtex-cite-matcher-alist): Fix
docstring.
(bibtex-initialize): Also update bibtex-strings.
(bibtex-kill-field): Preserve white space at end of entry.
(bibtex-kill-entry, bibtex-yank-pop, bibtex-insert-kill): Update
bibtex-reference-keys.
Glenn Morris [Sat, 5 Dec 2009 03:08:30 +0000 (03:08 +0000)]
(Displaying the Diary): Holidays may be in the buffer
or mode line. Don't mention invisible text or the details of
diary-print-entries here, only in cal-xtra.
(Format of Diary File): Mention that the "date on first line" format
only really affects the simple display.
Glenn Morris [Sat, 5 Dec 2009 03:08:05 +0000 (03:08 +0000)]
(Advanced Calendar/Diary Usage): Update menu.
(Diary Customizing): Holidays may be in the buffer or mode line.
Move diary-print-entries to the "Diary Display" section.
(Diary Display): New section, split out from "Fancy Diary Display".
Explain the limitations of simple display, and how to print it.
Glenn Morris [Sat, 5 Dec 2009 03:07:26 +0000 (03:07 +0000)]
(Standard Hooks): Remove diary-display-hook, replaced by
diary-display-function, and no longer recommended to be a hook.
Update for changes in the names of calendar and diary hooks.
diary-print-entries-hook has changed section.
Juri Linkov [Fri, 4 Dec 2009 21:47:08 +0000 (21:47 +0000)]
(proced): Call `(proced-update t)' to update process
information instead of only running proced-post-display-hook.
(proced-send-signal): Add a leading space to the buffer name
" *Marked Processes*" to make this buffer ephemeral.
Juri Linkov [Fri, 4 Dec 2009 21:43:07 +0000 (21:43 +0000)]
Change roles of modes and functions in image-mode.el (Bug#5062).
* image-mode.el: Replace `image-mode-maybe' with `image-mode'
in `auto-mode-alist'.
(image-mode-previous-major-mode): New variable.
(image-minor-mode-map): Rename from `image-mode-text-map'.
(image-mode): Move graceful error-handling code from
`image-minor-mode' to here. On errors call `image-mode-as-text'.
(image-minor-mode): Remove all image-handling code.
Replace `image-mode-text-map' with `image-minor-mode-map'.
Check for `image-type' in mode-line format string.
(image-mode-maybe): Make obsolete with an alias to `image-mode'.
(image-mode-as-text): New function with most code from
`image-mode-maybe'.
(image-toggle-display-text): Move code that removes image
properties from `image-toggle-display' to here.
(image-toggle-display-image): New function with code that adds
image properties copied from `image-toggle-display'.
(image-toggle-display): Remove most code with leaving only code
that toggles between `image-mode-as-text' and `image-mode'.
Fix `string-to-number' to deal consistently with integers and floats.
* lread.c (isfloat_string): New argument ignore_trailing to accept all
trailing characters, not just whitespace.
(read1): Pass new arg 0 to keep old behavior.
* data.c (Fstring_to_number): Pass 1 to isfloat_string to ignore
trailing chars, as it is already done for integers. Doc fixes.
* lisp.h (isfloat_string): Add new arg to declaration of isfloat_string.
Stefan Monnier [Fri, 4 Dec 2009 04:39:21 +0000 (04:39 +0000)]
Minor cleanup.
* term.el (term-send-raw, term-send-raw-meta): Use read-key-sequence's
key decoding rather than do it manually via last-input-event + ascii-character.
(term-exec): Use delete-and-extract-region.
(term-handle-ansi-terminal-messages): Remove unused var `end'.
(term-process-pager): Remove unused var `i'.
(term-dynamic-simple-complete): Make obsolete.
(serial-update-config-menu): Remove unused vars `y' and `str'.
(term-update-mode-line): Remove unused var `temp'.
Dan Nicolaescu [Thu, 3 Dec 2009 19:12:52 +0000 (19:12 +0000)]
Limit the number of log entries displayed by default.
* vc.el (vc-print-log-internal): Fix check for limit-unsupported.
(vc-print-log, vc-print-root-log): Use vc-log-show-limit when not
using a prefix argument.
Stefan Monnier [Thu, 3 Dec 2009 18:51:32 +0000 (18:51 +0000)]
(Qseqpacket): New symbol.
(HAVE_SEQPACKET): New macro.
(Fmake_network_process): Accept new :type `seqpacket'.
(init_process): Add `seqpacket' feature when applicable.
(syms_of_process): Initialize Qseqpacket.