1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Merged from

Patches applied:

 * emacs@sv.gnu.org/emacs--devo--0--patch-32
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-33
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-34
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-35
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-36
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-37
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-8
   Merge from emacs--devo--0

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-9
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-10
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-11
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-12
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-13
   Merge from emacs--devo--0

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-504
This commit is contained in:
Karoly Lorentey 2006-02-03 13:58:41 +00:00
commit 0a7114a4e5
76 changed files with 3163 additions and 2148 deletions

View file

@ -1,3 +1,8 @@
2006-01-31 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
* configure.in: Require GTK 2.4 or newer.
* configure: Regenerate
2006-01-29 Michael Olson <mwolson@gnu.org>
* Makefile.in (install-arch-indep, uninstall): Add ERC.

4
configure vendored
View file

@ -10137,8 +10137,8 @@ if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then
echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
{ (exit 1); exit 1; }; };
fi
GLIB_REQUIRED=2.0.1
GTK_REQUIRED=2.0.1
GLIB_REQUIRED=2.4
GTK_REQUIRED=2.4
GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
if test "X${with_pkg_config_prog}" != X; then

View file

@ -2000,8 +2000,8 @@ if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then
if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
AC_MSG_ERROR([Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}]);
fi
GLIB_REQUIRED=2.0.1
GTK_REQUIRED=2.0.1
GLIB_REQUIRED=2.4
GTK_REQUIRED=2.4
GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
dnl Check if --with-pkg-config-prog has been given.

View file

@ -1,3 +1,9 @@
2006-02-02 Bill Wohler <wohler@newt.com>
Release MH-E version 7.90.
* NEWS, MH-E-NEWS: Update for release 7.90.
2006-01-29 Michael Olson <mwolson@gnu.org>
* NEWS: Add entry for ERC.

View file

@ -1,11 +1,415 @@
* COPYRIGHT
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
* Changes in MH-E 7.90
Version 7.90 is the first 8.0 beta release and is a release that has
finally broken away from some unfortunate legacy decisions in favor of
something that will be easier to use and support. Many bugs were fixed
and many features were added, including making the pick search
equivalent to the other types of searches.
The rewrite of the manual accelerated dramatically in recent months
and drove the changes in this release. In order to make the
manual--and hence the software--better, clearer, more consistent, more
predictable, and easier to understand, many variables and functions
were renamed. The changes to the user-visible variables are listed
here. It is our hope that you, dear MH-E user, will embrace the
changes for the better and forgive us from making so many incompatible
changes.
If you use undocumented functionality, be sure to read the ChangeLog
for changes that might affect you.
** New Features in MH-E 7.90
*** Entry Points Have Moved
Emacs 21 users must now add `(require 'mh-autoloads)' because the
entry points (such as `mh-rmail' and `mh-smail') have moved to
different files which have made the autoloads that come with Emacs
inaccurate. This change was necessary because the code was reorganized
to remove circular dependencies, to make the code more stable and
maintainable, and to reduce the time to load MH-E.
*** MH-E No Longer Calls install-mh
The new variant detection code makes use of `mhparam' which assumes
that your MH environment has already been set up. The code to call
`install-mh', which could no longer be run anyway, was removed.
*** Use run-hook-with-args
We use normal hooks whenever possible and do not use
`run-hook-with-args' (with one documented exception) (closes SF
#643702).
*** Merge mh-index.el and mh-pick.el
We merged `mh-index.el' and `mh-pick.el' into a new file
`mh-search.el'. As part of this process, the old `F s' behavior of
adding messages to the search sequence has been removed. The `F i'
keybinding was then renamed to `F s' (`mh-search'). The mode of the
search-pattern buffer was renamed from MH-Pick to MH-Search. Within
the MH-Search buffer, the command `C-c C-p' (`mh-pick-do-search') now
runs pick on the given folder recursively and displays the results in
a search folder like the other search methods (closes SF #829207).
*** Improve Security of mh-fetch-x-image-url
The default has been changed to "Never Fetch." Those of you who like
the value of "Ask Before Fetching" will have to customize this option
(closes SF #831278).
*** Remove Emacs 20 Support
As it turns out, we had already added some code that didn't work on
Emacs 20. However, now we've formalized it and removed code that was
present solely for Emacs 20 support (closes SF #1359240).
*** Derive mh-letter-mode from mail-mode
MH-Letter mode is now derived from `mail-mode'. We were able to delete
a lot of code. In return, there are a few `mail-mode' commands that
are available that may or may not be useful and the `mail-mode-hook'
is run (closes SF #1385571).
*** Add Choices to mh-to-field-choices
In MH-Letter mode, you can use the "C-c C-f (mh-to-field)" prefix to
go to and insert fields. The fields "Reply-To:", "Mail-Reply-To:",
"Mail-Followup-To:" can now be created via the "C-r", "C-a" (for
author), and "C-l" keys respectively. The key for the "From:" field
has been renamed from "C-r" to "C-m" for consistency with `mail-mode'
(closes SF #1400139).
*** MH-Folder Keymap Changes
The function `mh-ps-print-toggle-mime' was never implemented and the
functionality in `mh-ps-print-msg-show' was better afforded by
`mh-ps-print-msg' and `mh-ps-print-msg-file'.
Key 7.4.85 7.4.90
F i mh-index-search -
F s mh-search-folder mh-search
P A mh-ps-print-toggle-mime -
P M mh-ps-print-toggle-mime -
P s mh-ps-print-msg-show -
*** MH-Letter Keymap Changes
The change where `mh-letter-mode' derives from `mail-mode' adds a few
keybindings. Some are interesting; experiment! Most of the changes
have to do with the renaming of the functions with "mhn" in them to
"mh" because nmh doesn't use `mhn'. The names were also made
consistent with the the family of "mml" functions.
Key 7.4.85 7.4.90
C-c C-e mh-edit-mhn mh-mh-to-mime
C-c C-f C-a - mh-to-field
C-c C-f C-l - mh-to-field
C-c C-f RET - mh-to-field
C-c C-f a - mh-to-field
C-c C-f l - mh-to-field
C-c C-f m - mh-to-field
C-c RET C-g mh-mhn-compose-anon-ftp mh-mh-compose-anon-ftp
C-c RET C-t mh-mhn-compose-external-compressed-tar
mh-mh-compose-external-compressed-tar
C-c RET C-u mh-revert-mhn-edit mh-mh-to-mime-undo
C-c RET C-x mh-mhn-compose-external-type mh-mh-compose-external-type
C-c RET g mh-mhn-compose-anon-ftp mh-mh-compose-anon-ftp
C-c RET t mh-mhn-compose-external-compressed-tar
mh-mh-compose-external-compressed-tar
C-c RET u mh-revert-mhn-edit mh-mh-to-mime-undo
C-c RET x mh-mhn-compose-external-type mh-mh-compose-external-type
*** MH-Search Keymap Changes
These are the changes associated with the new search mode. The command
`C-c C-c' (`mh-index-do-search') now performs the standard indexed
search, while `C-c C-p' (`mh-pick-do-search') runs pick as before,
only better!
Key 7.4.85 7.4.90
C-c C-c mh-do-search mh-index-do-search
C-c TAB mh-index-do-search -
** New Variables in MH-E 7.90
*** mh-after-commands-processed-hook
Hook run by `x' (`mh-execute-commands') after performing outstanding
refile and delete requests.
*** mh-before-commands-processed-hook
Renamed from `mh-folder-updated-hook'. It wasn't clear whether
`mh-folder-updated-hook' was run before or after the commands were
executed. We now provide both with clear names.
*** mh-highlight-citation-style
Renamed from `mh-highlight-citation-p' since it wasn't a boolean. The
new name is also more descriptive.
*** mh-insert-signature-hook
Renamed from `mh-letter-insert-signature-hook' since most of the other
hooks do not carry the mode in the prefix and because the new name is
equally clear.
*** mh-kill-folder-suppress-prompt-hooks
Renamed from `mh-kill-folder-suppress-prompt-hook'. By convention,
abnormal hooks, which this is, either have a -function or -hooks
suffix.
*** mh-mhl-format-file
Renamed from `mhl-formfile' to put it in the MH-E namespace and to be
consistent with other similar options.
*** mh-mh-to-mime-hook
Renamed from `mh-edit-mhn-hook'. We have a family of `mh-mml-to-mime'
functions and variables; the older mhn functions and variables were
renamed to have a consistent `mh-mh-to-mime' prefix.
*** mh-new-messages-folders
Renamed from `mh-index-new-messages-folders' for clarity.
*** mh-path
Additional list of directories to search for MH.
*** mh-redist-full-contents-flag
On means the `dist' command needs entire letter for redistribution.
This was previously a variable. It's now an option.
*** mh-search-mode-hook
Renamed from `mh-pick-mode-hook' as part of the
`mh-index.el'/`mh-pick.el' merge into `mh-search.el'.
*** mh-search-program
Renamed from `mh-index-program' as part of the
`mh-index.el'/`mh-pick.el' merge into `mh-search.el'.
*** mh-sortm-args
Additional arguments for `sortm'. This was previously an internal
variable. It's now an user-customizable option.
*** mh-speed-update-interval
Renamed from `mh-speed-flists-interval' for clarity.
*** mh-ticked-messages-folders
Renamed from `mh-index-ticked-messages-folders' for clarity.
*** mh-xemacs-tool-bar-position
Renamed from `mh-xemacs-toolbar-position' per GNU Emacs naming conventions.
*** mh-xemacs-use-tool-bar-flag
Renamed from `mh-xemacs-use-toolbar-flag' per GNU Emacs naming conventions.
*** mh-yank-behavior
Renamed from `mh-yank-from-start-of-msg' for clarity.
** Variables Deleted in MH-E 7.90
*** mail-citation-hook
This is already defined in `sendmail.el'.
*** mh-edit-mhn-hook
Renamed to `mh-mh-to-mime-hook'.
*** mh-folder-updated-hook
Renamed to `mh-before-commands-processed-hook'.
*** mh-highlight-citation-p
Renamed to `mh-highlight-citation-style'.
*** mh-index-new-messages-folders
Renamed to `mh-new-messages-folders'.
*** mh-index-program
Renamed to `mh-search-program'.
*** mh-index-ticked-messages-folders
Renamed to `mh-ticked-messages-folders'.
*** mh-kill-folder-suppress-prompt-hook
Renamed to `mh-kill-folder-suppress-prompt-hooks'.
*** mh-letter-insert-signature-hook
Renamed to `mh-insert-signature-hook'.
*** mhl-formfile
Renamed to `mh-mhl-format-file'.
*** mh-pick-mode-hook
Renamed to `mh-search-mode-hook'.
*** mh-speed-flists-interval
Renamed to `mh-speed-update-interval'.
*** mh-speed-run-flists-flag
Deleted since setting `mh-speed-flists-interval' to 0 accomplishes the
same thing.
*** mh-xemacs-toolbar-position
Renamed to `mh-xemacs-tool-bar-position'.
*** mh-xemacs-use-toolbar-flag
Renamed to `mh-xemacs-use-tool-bar-flag'.
*** mh-yank-from-start-of-msg
Renamed to `mh-yank-behavior'.
** Bug Fixes in MH-E 7.90
*** Error Message When Trying to Send Using MH-E
This behavior is no longer observed (closes SF #1002103).
*** "Args out of range" Error in Displaying Message
This behavior is no longer observed (closes SF #1227504).
*** Front-and-back Truncation in mailto: Rendering
This behavior is no longer observed (closes SF #1227510).
*** Completions Offered by mh-refile-message Are Not Sorted
This behavior is no longer observed (closes SF #698734).
*** Add Message-ID to Outgoing Messages
If you replied to a message in your `+outbox', an `In-Reply-To:'
header field was created that broke threading at the recipient's end.
We now add a `Message-ID:' to outgoing messages which fixes this
(closes SF #725425).
*** Speedbar Creating New Folders Instead of Visiting Existing
This was actually fixed in 7.4.3 (closes SF #792300).
*** Args Out of Range
This compilation error was actually fixed in 7.4.3 (closes SF
#806577).
*** Initialization Fails If ~/Mail Exists
MH-E no longer calls `install-mh' so this issue has gone away (closes
SF #835192).
*** RETURN Causes Infinite Loop in mh-letter
This behavior is no longer observed (closes SF #887346).
*** Missing Headers When Replying to All
User needed to edit `replgroupcomps' (closes SF #918194).
*** mh-find-path Doesn't Use mhparam
MH-E no longer peeks into the MH profile `~/.mh_profile' directly. It
uses `mhparam' instead (closes SF #1016027).
*** mh-index-previous-folder Does Not Work Correctly
If your cursor was on an item below a folder heading and you used
`M-TAB' (`mh-index-previous-folder'), you would move to the previous
folder heading. This has been fixed (closes SF #1126188).
*** XEmacs Compile Fails
Compiling produced a "Symbol's value as variable is void: require"
error on all files. This has been fixed. As a bonus, warnings have
been reduced from hundreds to just a few (closes SF #1127595).
*** buffer-offer-save Permanent Local
There was a movement to make `buffer-offer-save' a permanent local
which would have meant that we could not set it in `mh-letter-mode'.
However, this movement was fraught with issues and was postponed
(closes SF #1184756).
*** Better Handling of Empty cur Sequence
If you refiled a message into a folder and then used `F r'
(`mh-rescan-folder') in that folder, your cursor would be taken to the
first message. The cursor now stays where it was (closes SF #1207247).
*** Name of the Draft File in mh-comp.el
MH is documented to use the draft file. If you use a draft file for
something else (like Sylpheed), then use draft folders (closes SF
#1231483).
*** Use Standard Default Notation in Prompts
Emacs changed their defaults in prompts from "Prompt: [value]" to
"Prompt (default value): ". All MH-E prompts have been updated to
comply with the new standard (closes SF #1275933).
*** Msg Display Broken After Displaying Msg with Inline Image
Messages with inline images no longer trim certain message header
fields (closes SF #1306141).
*** mh-visit-folder Munges font-lock-keywords
MH-E broke highlighting in Gnus buffers. This was actually a problem
in CVS Emacs 22 and has been fixed there (closes SF #1393879).
*** Illegal Filename Chars for W32 Filesystems
Windows users who view `X-Image-URL:' images could not cache the
images since the cached image file names had illegal characters. This
has been fixed (closes SF #1396499).
*** mh-send Doesn't Handle mml Insertions Via mail-user-agent
Can now forward messages in Gnus if MH-E is your `mail-user-agent'
(closes SF #1399307).
* Changes in MH-E 7.85
Version 7.85 heralds a migration of the CVS repository from
@ -409,7 +813,7 @@ that you comment them out. The MH detection code has been completely
rewritten and it is very likely that you no longer to set them and
their setting may confuse other MH-E settings.
** Variables Deleted in MH-E
** Variables Deleted in MH-E 7.4.80
Variables that have been removed from MH-E that have not been
discussed elsewhere are listed here.

View file

@ -1,5 +1,5 @@
GNU Emacs NEWS -- history of user-visible changes. 2003-05-21
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
See the end for copying conditions.
@ -1372,9 +1372,10 @@ the next/previous matching line found by M-x occur.
+++
*** The new command `multi-occur' is just like `occur', except it can
search multiple buffers. There is also a new command
`multi-occur-by-filename-regexp' which allows you to specify the
buffers to search by their filename. Internally, Occur mode has been
rewritten, and now uses font-lock, among other changes.
`multi-occur-in-matching-buffers' which allows you to specify the
buffers to search by their filenames or buffer names. Internally,
Occur mode has been rewritten, and now uses font-lock, among other
changes.
** Grep changes:
@ -2977,7 +2978,7 @@ See the file GNUS-NEWS or the node "Oort Gnus" in the Gnus manual for details.
---
** MH-E changes.
Upgraded to MH-E version 7.85. There have been major changes since
Upgraded to MH-E version 7.90. There have been major changes since
version 5.0.2; see MH-E-NEWS for details.
** Calendar changes:

View file

@ -123,6 +123,8 @@ to the FSF.
* Other features we would like:
** Give Tar mode all the features of Archive mode.
** Create a category of errors called `process-error'
for some or all errors associated with using subprocesses.

View file

@ -1,3 +1,85 @@
2006-02-02 Luc Teirlinck <teirllm@auburn.edu>
* emulation/cua-base.el (cua-mode): Doc fix.
2006-02-02 Juanma Barranquero <lekktu@gmail.com>
* dframe.el (dframe-handle-make-frame-visible)
(dframe-handle-iconify-frame, dframe-get-focus)
(dframe-select-attached-frame, dframe-power-click)
(dframe-frame-mode): Fix typos in docstrings.
* ezimage.el (ezimage-mail, ezimage-object-out-of-date)
(ezimage-insert-image-button-maybe, ezimage-insert-over-text):
Fix typos in docstrings.
* hi-lock.el (hi-lock-mode, hi-lock-line-face-buffer)
(hi-lock-face-buffer, hi-lock-font-lock-hook)
(hi-lock-archaic-interface-message-used)
(hi-lock-file-patterns-range): Fix typos in docstrings.
* savehist.el (savehist-loaded, savehist-load, savehist-install)
(savehist-autosave, savehist-trim-history): Fix typos in
docstrings.
* mail/mailclient.el (mailclient-place-body-on-clipboard-flag):
Fix typo in docstring.
* net/rcirc.el (rcirc-debug): Fix docstring.
(rcirc-fill-column, rcirc-receive-message-hooks)
(rcirc-browse-url-map, rcirc-read-only-flag, rcirc-prompt)
(rcirc-mode, rcirc-generate-new-buffer-name)
(rcirc-startup-channels, rcirc-ignore-update-automatic)
(rcirc-cmd-ignore, rcirc-browse-url, rcirc-url-regexp):
Fix typos in docstrings.
(rcirc-print): "?\ " -> "?\s".
2006-02-01 Mark A. Hershberger <mah@everybody.org>
* xml.el (xml-parse-region): Move save-excursion and set-buffer up
before narrow-to-region.
2006-02-01 Richard M. Stallman <rms@gnu.org>
* simple.el (move-beginning-of-line): Scan properly for invis change.
* replace.el (multi-occur-in-matching-buffers): Fix prev change.
2006-02-01 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (tramp-convert-file-attributes): Set file's gid
change bit only when id-format is 'integer. Reported by Matt
Hodges <M.P.Hodges@rl.ac.uk>.
2006-02-01 Juanma Barranquero <lekktu@gmail.com>
* hilit-chg.el (highlight-changes-initial-state)
(highlight-changes-global-initial-state): Doc fixes.
(highlight-changes-global-modes, global-highlight-changes):
Fix typos in docstrings.
2006-02-01 Kim F. Storm <storm@cua.dk>
* emulation/cua-base.el (cua-mode): Mention that CUA enables
transient-mark-mode in doc string.
2006-01-31 Richard M. Stallman <rms@gnu.org>
* replace.el (multi-occur): Doc fix.
(multi-occur-in-matching-buffers): Renamed from
multi-occur-by-filename-regexp. Prefix arg says match
buffer names instead of file names.
2006-01-31 Juanma Barranquero <lekktu@gmail.com>
* bs.el: Allow non-default values of `bs-header-lines-length'.
(bs--running-in-xemacs): Remove (not needed anymore).
(bs--set-window-height): Simplify by using `fit-window-to-buffer'
instead of `shrink-window', thus avoiding having to compute the
height of the window.
(bs--up): Wrap around even when there's no header.
(bs--down): Use `forward-line' instead of `next-line'.
2006-01-30 Chong Yidong <cyd@stupidchicken.com>
* image-mode.el (image-toggle-display): Use file name if possible,

View file

@ -180,9 +180,6 @@ return a string representing the column's value."
:group 'bs-appearance
:type '(repeat sexp))
(defvar bs--running-in-xemacs (string-match "XEmacs" (emacs-version))
"Non-nil when running under XEmacs.")
(defun bs--make-header-match-string ()
"Return a regexp matching the first line of a Buffer Selection Menu buffer."
(let ((res "^\\(")
@ -701,12 +698,7 @@ Return nil if there is no such buffer."
(defun bs--set-window-height ()
"Change the height of the selected window to suit the current buffer list."
(unless (one-window-p t)
(shrink-window (- (window-height (selected-window))
;; window-height in xemacs includes mode-line
(+ (if bs--running-in-xemacs 3 1)
bs-header-lines-length
(min (length bs-current-list)
bs-max-window-height))))))
(fit-window-to-buffer (selected-window) bs-max-window-height)))
(defun bs--current-buffer ()
"Return buffer on current line.
@ -1011,13 +1003,11 @@ Uses function `vc-toggle-read-only'."
"Move cursor vertically up one line.
If on top of buffer list go to last line."
(interactive "p")
(previous-line 1)
(if (<= (count-lines 1 (point)) (1- bs-header-lines-length))
(progn
(goto-char (point-max))
(beginning-of-line)
(recenter -1))
(beginning-of-line)))
(if (> (count-lines 1 (point)) bs-header-lines-length)
(forward-line -1)
(goto-char (point-max))
(beginning-of-line)
(recenter -1)))
(defun bs-down (arg)
"Move cursor vertically down ARG lines in Buffer Selection Menu."
@ -1029,10 +1019,9 @@ If on top of buffer list go to last line."
(defun bs--down ()
"Move cursor vertically down one line.
If at end of buffer list go to first line."
(let ((last (line-end-position)))
(if (eq last (point-max))
(goto-line (1+ bs-header-lines-length))
(next-line 1))))
(if (eq (line-end-position) (point-max))
(goto-line (1+ bs-header-lines-length))
(forward-line 1)))
(defun bs-visits-non-file (buffer)
"Return t or nil whether BUFFER visits no file.

View file

@ -1,6 +1,7 @@
;;; dframe --- dedicate frame support modes
;;; Copyright (C) 1996, 97, 98, 99, 2000, 01, 02, 03, 04, 05 Free Software Foundation
;;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005 Free Software Foundation
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: file, tags, tools
@ -299,7 +300,7 @@ This frame is either resurrected, hidden, killed, etc based on
the value.
CACHE-VAR is a variable used to cache a cached frame.
BUFFER-VAR is a variable used to cache the buffer being used in dframe.
This buffer will have `dframe-mode' run on it.
This buffer will have `dframe-frame-mode' run on it.
FRAME-NAME is the name of the frame to create.
LOCAL-MODE-FN is the function used to call this one.
PARAMETERS are frame parameters to apply to this dframe.
@ -606,7 +607,7 @@ The function must take an EVENT.")
(defun dframe-handle-make-frame-visible (e)
"Handle a `make-frame-visible' event.
Should enables auto-updating if the last state was also enabled.
Should enable auto-updating if the last state was also enabled.
Argument E is the event making the frame visible."
(interactive "e")
(let ((f last-event-frame))
@ -617,7 +618,7 @@ Argument E is the event making the frame visible."
(defun dframe-handle-iconify-frame (e)
"Handle a `iconify-frame' event.
Should disables auto-updating if the last state was also enabled.
Should disable auto-updating if the last state was also enabled.
Argument E is the event iconifying the frame."
(interactive "e")
(let ((f last-event-frame))
@ -652,7 +653,7 @@ If the selected frame is not in the symbol FRAME-VAR, then FRAME-VAR
frame is selected. If the FRAME-VAR is active, then select the
attached frame. If FRAME-VAR is nil, ACTIVATOR is called to
created it. HOOK is an optional argument of hooks to run when
selecting FRAME."
selecting FRAME-VAR."
(interactive)
(if (eq (selected-frame) (symbol-value frame-var))
(if (frame-live-p dframe-attached-frame)
@ -696,10 +697,10 @@ If optional arg FRAME is nil just return `dframe-attached-frame'."
dframe-attached-frame))
(defun dframe-select-attached-frame (&optional frame)
"Switch to the frame the dframe controlled frame FRAME was started from. If
optional arg FRAME is nil assume the attached frame is already selected and
just run the hooks `dframe-after-select-attached-frame-hook'. Return the
attached frame."
"Switch to the frame the dframe controlled frame FRAME was started from.
If optional arg FRAME is nil assume the attached frame is already selected
and just run the hooks `dframe-after-select-attached-frame-hook'. Return
the attached frame."
(let ((frame (dframe-attached-frame frame)))
(if frame (select-frame frame))
(prog1 frame
@ -957,7 +958,7 @@ This should be bound to mouse event E."
(funcall dframe-mouse-position-function)))
(defun dframe-power-click (e)
"Activate any `dframe' mouse click as a power click.
"Activate any dframe mouse click as a power click.
A power click will dispose of cached data (if available) or bring a buffer
up into a different window.
This should be bound to mouse event E."

View file

@ -79,11 +79,13 @@
;; passed a circular list to `assoc', Emacs would crash. Historically,
;; problems of this kind have been few and short-lived.
;;; Code:
(provide 'unsafep)
(require 'byte-opt) ;Set up the `side-effect-free' properties
(defcustom safe-functions nil
"t to disable `unsafep', or a list of assumed-safe functions."
"A list of assumed-safe functions, or t to disable `unsafep'."
:group 'lisp
:type '(choice (const :tag "No" nil) (const :tag "Yes" t) hook))
@ -210,7 +212,7 @@ of symbols with local bindings."
(defun unsafep-function (fun)
"Return nil if FUN is a safe function
"Return nil iff FUN is a safe function.
\(either a safe lambda or a symbol that names a safe function). Otherwise
result is a reason code."
(cond
@ -233,7 +235,8 @@ for the first unsafe form."
(if reason (throw 'unsafep-progn reason))))))
(defun unsafep-let (clause)
"CLAUSE is a let-binding, either SYM or (SYM) or (SYM VAL). Checks VAL
"Check the safety of a let binding.
CLAUSE is a let-binding, either SYM or (SYM) or (SYM VAL). Checks VAL
and throws a reason to `unsafep' if unsafe. Returns SYM."
(let (reason sym)
(if (atom clause)
@ -245,7 +248,7 @@ and throws a reason to `unsafep' if unsafe. Returns SYM."
sym))
(defun unsafep-variable (sym global-okay)
"Returns nil if SYM is safe as a let-binding sym
"Return nil if SYM is safe as a let-binding sym
\(because it already has a temporary binding or is a non-risky buffer-local
variable), otherwise a reason why it is unsafe. Failing to be locally bound
is okay if GLOBAL-OKAY is non-nil."
@ -259,5 +262,5 @@ is okay if GLOBAL-OKAY is non-nil."
(local-variable-p sym)))
`(global-variable ,sym))))
;;; arch-tag: 6216f98b-eb8f-467a-9c33-7a7644f50658
;; unsafep.el ends here.
;; arch-tag: 6216f98b-eb8f-467a-9c33-7a7644f50658
;;; unsafep.el ends here

View file

@ -1393,7 +1393,12 @@ options:
You can customize `cua-enable-cua-keys' to completely disable the
CUA bindings, or `cua-prefix-override-inhibit-delay' to change
the prefix fallback behavior."
the prefix fallback behavior.
CUA mode manages Transient Mark mode internally. Trying to disable
Transient Mark mode while CUA mode is enabled does not work; if you
only want to highlight the region when it is selected using a
shifted movement key, set `cua-highlight-region-shift-only'."
:global t
:group 'cua
:set-after '(cua-enable-modeline-indications cua-rectangle-modifier-key)

View file

@ -1,3 +1,7 @@
2006-01-30 Simon Josefsson <jas@extundo.com>
* erc.el (erc-open-ssl-stream): Use tls.el.
2006-01-30 Michael Olson <mwolson@gnu.org>
* erc-stamp.el (erc-timestamp-right-align-by-pixel): New option

View file

@ -2062,13 +2062,14 @@ Arguments are as to erc-select."
"Open an SSL stream to an IRC server.
The process will be given the name NAME, its target buffer will be
BUFFER. HOST and PORT specify the connection target."
(when (require 'ssl)
(let ((proc (open-ssl-stream name buffer host port)))
(when (require 'tls)
(let ((proc (open-tls-stream name buffer host port)))
;; Ugly hack, but it works for now. Problem is it is
;; very hard to detect when ssl is established, because s_client
;; doesn't give any CONNECTIONESTABLISHED kind of message, and
;; most IRC servers send nothing and wait for you to identify.
(sit-for 5)
;; Disabled when switching to tls.el -- jas
;(sit-for 5)
proc)))
;;; Debugging the protocol

View file

@ -78,7 +78,7 @@ IMAGESPEC is the image data, and DOCSTRING is documentation for the image."
)
(if (not (fboundp 'make-glyph))
(defmacro defezimage (variable imagespec docstring)
"Don't bother loading up an image...
Argument VARIABLE is the variable to define.
@ -194,7 +194,7 @@ IMAGESPEC is the image data, and DOCSTRING is documentation for the image."
(defezimage ezimage-mail
((:type xpm :file "ezimage/mail.xpm" :ascent center))
"Image if an envelope.")
"Image of an envelope.")
(defezimage ezimage-checkout
((:type xpm :file "ezimage/checkmark.xpm" :ascent center))
@ -206,7 +206,7 @@ IMAGESPEC is the image data, and DOCSTRING is documentation for the image."
(defezimage ezimage-object-out-of-date
((:type xpm :file "ezimage/bitsbang.xpm" :ascent center))
"Image representing bits with a ! in it. (an out of data object file.)")
"Image representing bits with a ! in it. (An out of data object file.)")
(defezimage ezimage-label
((:type xpm :file "ezimage/label.xpm" :ascent center))
@ -264,7 +264,7 @@ IMAGESPEC is the image data, and DOCSTRING is documentation for the image."
"Insert an image button based on text starting at START for LENGTH chars.
If buttontext is unknown, just insert that text.
If we have an image associated with it, use that image.
Optional argument STRING is a st ring upon which to add text properties."
Optional argument STRING is a string upon which to add text properties."
(when ezimage-use-images
(let* ((bt (buffer-substring start (+ length start)))
(a (assoc bt ezimage-expand-image-button-alist)))
@ -293,7 +293,7 @@ Return STRING with properties applied."
(defun ezimage-insert-over-text (image start end &optional string)
"Place IMAGE over the text between START and END.
Assumes the image is part of a gui and can be clicked on.
Assumes the image is part of a GUI and can be clicked on.
Optional argument STRING is a string upon which to add text properties."
(when ezimage-use-images
(if (featurep 'xemacs)

View file

@ -1,8 +1,60 @@
2006-01-31 Andreas Seltenreich <uwi7@stud.uni-karlsruhe.de>
* nnweb.el (nnweb-group-alist): Use defvar instead of defvoo,
there's only one active file for all servers.
(nnweb-request-scan): Make sure nnweb-articles is initialized on
solid groups. Gnus might have used a FAST request to select the
group.
(nnweb-request-group, nnweb-google-parse-1): Don't keep nnweb-type
and nnweb-search redundantly in the active file.
(nnweb-request-list): Don't list bogus groups. There can only be
one.
(nnweb-request-create-group): Don't use ARGS.
(nnweb-possibly-change-server, nnweb-request-group): Remove some
initialisations. Let nnoo do the work.
2006-01-31 Romain Francoise <romain@orebokech.com>
* message.el (message-alternative-emails): Improve docstring.
(message-setup-1): Call `message-use-alternative-email-as-from'
after `message-setup-hook' to give it precedence over posting
styles, etc.
(message-use-alternative-email-as-from): Add docstring. Remove
the original From header if present.
2006-01-31 Katsumi Yamaoka <yamaoka@jpl.org>
* mm-uu.el (mm-uu-emacs-sources-extract): Say the part has been
decoded.
(mm-uu-diff-extract): Ditto.
2006-01-31 Kevin Ryde <user42@zip.com.au>
* mailcap.el (mailcap-viewer-passes-test): Don't put "(nil t)" into
mailcap-viewer-test-cache when there's no 'test clause, since that
will invert the meaning of a "nil" test previously determined by
mailcap-mailcap-entry-passes-test.
2006-01-30 Reiner Steib <Reiner.Steib@gmx.de>
* nnweb.el (nnweb-google-parse-1): Clarify some comments.
2006-01-30 Andreas Seltenreich <uwi7@stud.uni-karlsruhe.de>
* nnweb.el (nnweb-type-definition, nnweb-google-parse-1)
(nnweb-google-create-mapping, nnweb-google-search): Adapt to
current Google Groups.
2006-01-26 Katsumi Yamaoka <yamaoka@jpl.org>
* Makefile.in (clean): New rule.
(distclean): Use it.
2006-01-25 Katsumi Yamaoka <yamaoka@jpl.org>
* mm-uu.el (mm-uu-dissect-text-parts): Ignore it if a given part
is dissected into a single part of which the type is the same as
the given one.
the given one; decode charset.
2006-01-21 Kevin Ryde <user42@zip.com.au>

View file

@ -1,7 +1,7 @@
;;; mailcap.el --- MIME media types configuration
;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005 Free Software Foundation, Inc.
;; 2005, 2006 Free Software Foundation, Inc.
;; Author: William M. Perry <wmperry@aventail.com>
;; Lars Magne Ingebrigtsen <larsi@gnus.org>
@ -640,30 +640,31 @@ to supply to the test."
(viewer (cdr (assoc 'viewer viewer-info)))
(default-directory (expand-file-name "~/"))
status parsed-test cache result)
(if (setq cache (assoc test mailcap-viewer-test-cache))
(cadr cache)
(setq
result
(cond
((not test-info) t) ; No test clause
((not test) nil) ; Already failed test
((eq test t) t) ; Already passed test
((functionp test) ; Lisp function as test
(funcall test type-info))
((and (symbolp test) ; Lisp variable as test
(boundp test))
(symbol-value test))
((and (listp test) ; List to be eval'd
(symbolp (car test)))
(eval test))
(t
(setq test (mailcap-unescape-mime-test test type-info)
test (list shell-file-name nil nil nil
shell-command-switch test)
status (apply 'call-process test))
(eq 0 status))))
(push (list otest result) mailcap-viewer-test-cache)
result)))
(cond ((setq cache (assoc test mailcap-viewer-test-cache))
(cadr cache))
((not test-info) t) ; No test clause
(t
(setq
result
(cond
((not test) nil) ; Already failed test
((eq test t) t) ; Already passed test
((functionp test) ; Lisp function as test
(funcall test type-info))
((and (symbolp test) ; Lisp variable as test
(boundp test))
(symbol-value test))
((and (listp test) ; List to be eval'd
(symbolp (car test)))
(eval test))
(t
(setq test (mailcap-unescape-mime-test test type-info)
test (list shell-file-name nil nil nil
shell-command-switch test)
status (apply 'call-process test))
(eq 0 status))))
(push (list otest result) mailcap-viewer-test-cache)
result))))
(defun mailcap-add-mailcap-entry (major minor info)
(let ((old-major (assoc major mailcap-mime-data)))

View file

@ -1388,8 +1388,13 @@ should be sent in several parts. If it is nil, the size is unlimited."
(integer 1000000)))
(defcustom message-alternative-emails nil
"A regexp to match the alternative email addresses.
The first matched address (not primary one) is used in the From field."
"*Regexp matching alternative email addresses.
The first address in the To, Cc or From headers of the original
article matching this variable is used as the From field of
outgoing messages.
This variable has precedence over posting styles and anything that runs
off `message-setup-hook'."
:group 'message-headers
:link '(custom-manual "(message)Message Headers")
:type '(choice (const :tag "Always use primary" nil)
@ -5546,10 +5551,6 @@ are not included."
(when message-default-mail-headers
(insert message-default-mail-headers)
(or (bolp) (insert ?\n)))
(save-restriction
(message-narrow-to-headers)
(if message-alternative-emails
(message-use-alternative-email-as-from)))
(when message-generate-headers-first
(message-generate-headers
(message-headers-to-generate
@ -5565,6 +5566,12 @@ are not included."
(set-buffer-modified-p nil)
(setq buffer-undo-list nil)
(run-hooks 'message-setup-hook)
;; Do this last to give it precedence over posting styles, etc.
(when (message-mail-p)
(save-restriction
(message-narrow-to-headers)
(if message-alternative-emails
(message-use-alternative-email-as-from))))
(message-position-point)
(undo-boundary))
@ -6848,6 +6855,9 @@ regexp VARSTR."
(read-string prompt initial-contents))))
(defun message-use-alternative-email-as-from ()
"Set From field of the outgoing message to the first matching
address in `message-alternative-emails', looking at To, Cc and
From headers in the original article."
(require 'mail-utils)
(let* ((fields '("To" "Cc"))
(emails
@ -6862,6 +6872,7 @@ regexp VARSTR."
emails nil))
(pop emails))
(unless (or (not email) (equal email user-mail-address))
(message-remove-header "From")
(goto-char (point-max))
(insert "From: " email "\n"))))

View file

@ -266,7 +266,7 @@ Return that buffer."
(defun mm-uu-emacs-sources-extract ()
(mm-make-handle (mm-uu-copy-to-buffer start-point end-point)
'("application/emacs-lisp")
'("application/emacs-lisp" (charset . gnus-decoded))
nil nil
(list mm-dissect-disposition
(cons 'filename file-name))))
@ -282,7 +282,7 @@ Return that buffer."
(defun mm-uu-diff-extract ()
(mm-make-handle (mm-uu-copy-to-buffer start-point end-point)
'("text/x-patch")))
'("text/x-patch" (charset . gnus-decoded))))
(defun mm-uu-diff-test ()
(and gnus-newsgroup-name
@ -509,31 +509,53 @@ value of `mm-uu-text-plain-type'."
(setq result (cons "multipart/mixed" (nreverse result))))
result)))
(defun mm-uu-dissect-text-parts (handle)
"Dissect text parts and put uu handles into HANDLE."
;;;###autoload
(defun mm-uu-dissect-text-parts (handle &optional decoded)
"Dissect text parts and put uu handles into HANDLE.
Assume text has been decoded if DECODED is non-nil."
(let ((buffer (mm-handle-buffer handle)))
(cond ((stringp buffer)
(dolist (elem (cdr handle))
(mm-uu-dissect-text-parts elem)))
(mm-uu-dissect-text-parts elem decoded)))
((bufferp buffer)
(let ((type (mm-handle-media-type handle))
(case-fold-search t) ;; string-match
encoding children)
children charset encoding)
(when (and
(stringp type)
;; Mutt still uses application/pgp even though
;; it has already been withdrawn.
(string-match "\\`text/\\|\\`application/pgp\\'" type)
(setq children
(with-current-buffer buffer
(if (setq encoding (mm-handle-encoding handle))
;; Inherit the multibyteness of the `buffer'.
(with-temp-buffer
(insert-buffer-substring buffer)
(mm-decode-content-transfer-encoding
encoding type)
(mm-uu-dissect t (mm-handle-type handle)))
(mm-uu-dissect t (mm-handle-type handle))))))
(setq
children
(with-current-buffer buffer
(cond
((or decoded
(eq (setq charset (mail-content-type-get
(mm-handle-type handle)
'charset))
'gnus-decoded))
(setq decoded t)
(mm-uu-dissect
t (cons type '((charset . gnus-decoded)))))
(charset
(setq decoded t)
(mm-with-multibyte-buffer
(insert (mm-decode-string (mm-get-part handle)
charset))
(mm-uu-dissect
t (cons type '((charset . gnus-decoded))))))
((setq encoding (mm-handle-encoding handle))
(setq decoded nil)
;; Inherit the multibyteness of the `buffer'.
(with-temp-buffer
(insert-buffer-substring buffer)
(mm-decode-content-transfer-encoding
encoding type)
(mm-uu-dissect t (list type))))
(t
(setq decoded nil)
(mm-uu-dissect t (list type)))))))
;; Ignore it if a given part is dissected into a single
;; part of which the type is the same as the given one.
(if (and (<= (length children) 2)
@ -544,10 +566,10 @@ value of `mm-uu-text-plain-type'."
(setcdr handle (cdr children))
(setcar handle (car children)) ;; "multipart/mixed"
(dolist (elem (cdr children))
(mm-uu-dissect-text-parts elem))))))
(mm-uu-dissect-text-parts elem decoded))))))
(t
(dolist (elem handle)
(mm-uu-dissect-text-parts elem))))))
(mm-uu-dissect-text-parts elem decoded))))))
(provide 'mm-uu)

View file

@ -1,7 +1,7 @@
;;; nnweb.el --- retrieving articles via web search engines
;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
;; 2004, 2005 Free Software Foundation, Inc.
;; 2004, 2005, 2006 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
@ -27,11 +27,8 @@
;; Note: You need to have `w3' installed for some functions to work.
;; FIXME: Due to changes in the HTML output of Google Groups and Gmane, stuff
;; related to web groups (gnus-group-make-web-group) doesn't work anymore.
;; Fetching an article by MID (cf. gnus-refer-article-method) over Google
;; Groups should work.
;; FIXME: Due to changes in the HTML output of Gmane, stuff related to Gmane
;; web groups (`gnus-group-make-web-group') doesn't work anymore.
;;; Code:
@ -61,6 +58,7 @@ Valid types include `google', `dejanews', and `gmane'.")
(defvar nnweb-type-definition
'((google
(id . "http://www.google.com/groups?as_umsgid=%s&hl=en&dmode=source")
(result . "http://groups.google.com/group/%s/msg/%s?dmode=source")
(article . nnweb-google-wash-article)
(reference . identity)
(map . nnweb-google-create-mapping)
@ -69,8 +67,9 @@ Valid types include `google', `dejanews', and `gmane'.")
(base . "http://groups.google.com")
(identifier . nnweb-google-identity))
(dejanews ;; alias of google
(article . ignore)
(id . "http://groups.google.com/groups?selm=%s&output=gplain")
(id . "http://www.google.com/groups?as_umsgid=%s&hl=en&dmode=source")
(result . "http://groups.google.com/group/%s/msg/%s?dmode=source")
(article . nnweb-google-wash-article)
(reference . identity)
(map . nnweb-google-create-mapping)
(search . nnweb-google-search)
@ -100,7 +99,7 @@ Valid types include `google', `dejanews', and `gmane'.")
(defvoo nnweb-articles nil)
(defvoo nnweb-buffer nil)
(defvoo nnweb-group-alist nil)
(defvar nnweb-group-alist nil)
(defvoo nnweb-group nil)
(defvoo nnweb-hashtb nil)
@ -123,25 +122,19 @@ Valid types include `google', `dejanews', and `gmane'.")
(deffoo nnweb-request-scan (&optional group server)
(nnweb-possibly-change-server group server)
(if nnweb-ephemeral-p
(setq nnweb-hashtb (gnus-make-hashtable 4095)))
(setq nnweb-hashtb (gnus-make-hashtable 4095))
(unless nnweb-articles
(nnweb-read-overview group)))
(funcall (nnweb-definition 'map))
(unless nnweb-ephemeral-p
(nnweb-write-active)
(nnweb-write-overview group)))
(deffoo nnweb-request-group (group &optional server dont-check)
(nnweb-possibly-change-server nil server)
(when (and group
(not (equal group nnweb-group))
(not nnweb-ephemeral-p))
(setq nnweb-group group
nnweb-articles nil)
(let ((info (assoc group nnweb-group-alist)))
(when info
(setq nnweb-type (nth 2 info))
(setq nnweb-search (nth 3 info))
(unless dont-check
(nnweb-read-overview group)))))
(nnweb-possibly-change-server group server)
(unless (or nnweb-ephemeral-p
dont-check)
(nnweb-read-overview group))
(cond
((not nnweb-articles)
(nnheader-report 'nnweb "No matching articles"))
@ -205,7 +198,7 @@ Valid types include `google', `dejanews', and `gmane'.")
(nnweb-possibly-change-server nil server)
(save-excursion
(set-buffer nntp-server-buffer)
(nnmail-generate-active nnweb-group-alist)
(nnmail-generate-active (list (assoc server nnweb-group-alist)))
t))
(deffoo nnweb-request-update-info (group info &optional server)
@ -217,7 +210,7 @@ Valid types include `google', `dejanews', and `gmane'.")
(deffoo nnweb-request-create-group (group &optional server args)
(nnweb-possibly-change-server nil server)
(nnweb-request-delete-group group)
(push `(,group ,(cons 1 0) ,@args) nnweb-group-alist)
(push `(,group ,(cons 1 0)) nnweb-group-alist)
(nnweb-write-active)
t)
@ -287,18 +280,16 @@ Valid types include `google', `dejanews', and `gmane'.")
def))
(defun nnweb-possibly-change-server (&optional group server)
(nnweb-init server)
(when server
(unless (nnweb-server-opened server)
(nnweb-open-server server)))
(nnweb-open-server server))
(nnweb-init server))
(unless nnweb-group-alist
(nnweb-read-active))
(unless nnweb-hashtb
(setq nnweb-hashtb (gnus-make-hashtable 4095)))
(when group
(when (and (not nnweb-ephemeral-p)
(equal group nnweb-group))
(nnweb-request-group group nil t))))
(setq nnweb-group group)))
(defun nnweb-init (server)
"Initialize buffers and such."
@ -337,22 +328,27 @@ Valid types include `google', `dejanews', and `gmane'.")
(mm-url-decode-entities))))
(defun nnweb-google-parse-1 (&optional Message-ID)
"Parse search result in current buffer."
(let ((i 0)
(case-fold-search t)
(active (cadr (assoc nnweb-group nnweb-group-alist)))
Subject Score Date Newsgroups From
map url mid)
(unless active
(push (list nnweb-group (setq active (cons 1 0))
nnweb-type nnweb-search)
(push (list nnweb-group (setq active (cons 1 0)))
nnweb-group-alist))
;; Go through all the article hits on this page.
(goto-char (point-min))
(while (re-search-forward
"a href=/groups\\(\\?[^ \">]*selm=\\([^ &\">]+\\)\\)" nil t)
(setq mid (match-string 2)
(while
(re-search-forward
"a +href=\"/group/\\([^>\"]+\\)/browse_thread/[^>]+#\\([0-9a-f]+\\)"
nil t)
(setq Newsgroups (match-string-no-properties 1)
;; Note: Starting with Google Groups 2, `mid' is a Google-internal
;; ID, not a proper Message-ID.
mid (match-string-no-properties 2)
url (format
(nnweb-definition 'id) mid))
(nnweb-definition 'result) Newsgroups mid))
(narrow-to-region (search-forward ">" nil t)
(search-forward "</a>" nil t))
(mm-url-remove-markup)
@ -360,25 +356,22 @@ Valid types include `google', `dejanews', and `gmane'.")
(setq Subject (buffer-string))
(goto-char (point-max))
(widen)
(forward-line 2)
(when (looking-at "<br><font[^>]+>")
(goto-char (match-end 0)))
(if (not (looking-at "<a[^>]+>"))
(skip-chars-forward " \t")
(narrow-to-region (point)
(search-forward "</a>" nil t))
(mm-url-remove-markup)
(mm-url-decode-entities)
(setq Newsgroups (buffer-string))
(goto-char (point-max))
(widen)
(skip-chars-forward "- \t"))
(narrow-to-region (point)
(search-forward "</td" nil t))
(mm-url-remove-markup)
(mm-url-decode-entities)
(search-backward " - ")
(when (looking-at
"\\([0-9]+\\)[/ ]\\([A-Za-z]+\\)[/ ]\\([0-9]+\\)[ \t]*by[ \t]*\\([^<]*\\) - <a")
" - \\([a-zA-Z]+\\) \\([0-9]+\\)\\(?: \\([0-9]\\{4\\}\\)\\)?, [^\n]+by \\([^<\n]+\\)\n")
(setq From (match-string 4)
Date (format "%s %s 00:00:00 %s"
(match-string 2) (match-string 1)
(match-string 3))))
(match-string 1)
(match-string 2)
(or (match-string 3)
(substring (current-time-string) -4)))))
(widen)
(forward-line 1)
(incf i)
(unless (nnweb-get-hashtb url)
@ -419,7 +412,7 @@ Valid types include `google', `dejanews', and `gmane'.")
(goto-char (point-min))
(incf i 100)
(if (or (not (re-search-forward
"<td nowrap><a href=\\([^>]+\\).*<span class=b>Next</span>" nil t))
"<td><a href=\"\n\\([^>\"]+\\)\"><img src=\"/img/nav_next" nil t))
(>= i nnweb-max-hits))
(setq more nil)
;; Yup, there are more articles
@ -443,7 +436,8 @@ Valid types include `google', `dejanews', and `gmane'.")
("hl" . "en")
("lr" . "")
("safe" . "off")
("sites" . "groups")))))
("sites" . "groups")
("filter" . "0")))))
t)
(defun nnweb-google-identity (url)

View file

@ -91,7 +91,7 @@
(defcustom hi-lock-file-patterns-range 10000
"Limit of search in a buffer for hi-lock patterns.
When a file is visited and hi-lock mode is on patterns starting
When a file is visited and hi-lock mode is on, patterns starting
up to this limit are added to font-lock's patterns. See documentation
of functions `hi-lock-mode' and `hi-lock-find-patterns'."
:type 'integer
@ -200,7 +200,7 @@ calls."
(defvar hi-lock-archaic-interface-message-used nil
"True if user alerted that `global-hi-lock-mode' is now the global switch.
Earlier versions of hi-lock used `hi-lock-mode' as the global switch,
Earlier versions of hi-lock used `hi-lock-mode' as the global switch;
the message is issued if it appears that `hi-lock-mode' is used assuming
that older functionality. This variable avoids multiple reminders.")
@ -283,10 +283,10 @@ called interactively, are:
Remove highlighting on matches of REGEXP in current buffer.
\\[hi-lock-write-interactive-patterns]
Write active REGEXPs into buffer as comments (if possible). They will
Write active REGEXPs into buffer as comments (if possible). They will
be read the next time file is loaded or when the \\[hi-lock-find-patterns] command
is issued. The inserted regexps are in the form of font lock keywords.
(See `font-lock-keywords') They may be edited and re-loaded with \\[hi-lock-find-patterns],
(See `font-lock-keywords'.) They may be edited and re-loaded with \\[hi-lock-find-patterns],
any valid `font-lock-keywords' form is acceptable.
\\[hi-lock-find-patterns]
@ -295,12 +295,12 @@ called interactively, are:
When hi-lock is started and if the mode is not excluded, the
beginning of the buffer is searched for lines of the form:
Hi-lock: FOO
where FOO is a list of patterns. These are added to the font lock keywords
already present. The patterns must start before position (number
of characters into buffer) `hi-lock-file-patterns-range'. Patterns
will be read until
where FOO is a list of patterns. These are added to the font lock
keywords already present. The patterns must start before position
\(number of characters into buffer) `hi-lock-file-patterns-range'.
Patterns will be read until
Hi-lock: end
is found. A mode is excluded if it's in the list `hi-lock-exclude-modes'."
is found. A mode is excluded if it's in the list `hi-lock-exclude-modes'."
:group 'hi-lock
:lighter (:eval (if (or hi-lock-interactive-patterns
hi-lock-file-patterns)
@ -365,7 +365,7 @@ versions before 22 use the following in your .emacs file:
Interactively, prompt for REGEXP then FACE. Buffer-local history
list maintained for regexps, global history maintained for faces.
\\<minibuffer-local-map>Use \\[next-history-element] and \\[previous-history-element] to retrieve next or previous history item.
\(See info node `Minibuffer History')"
\(See info node `Minibuffer History'.)"
(interactive
(list
(hi-lock-regexp-okay
@ -390,7 +390,7 @@ list maintained for regexps, global history maintained for faces.
Interactively, prompt for REGEXP then FACE. Buffer-local history
list maintained for regexps, global history maintained for faces.
\\<minibuffer-local-map>Use \\[next-history-element] and \\[previous-history-element] to retrieve next or previous history item.
\(See info node `Minibuffer History')"
\(See info node `Minibuffer History'.)"
(interactive
(list
(hi-lock-regexp-okay
@ -595,7 +595,7 @@ not suitable."
(message "Hi-lock added %d patterns." (length all-patterns))))))
(defun hi-lock-font-lock-hook ()
"Add hi lock patterns to font-lock's."
"Add hi-lock patterns to font-lock's."
(if font-lock-mode
(progn
(font-lock-add-keywords nil hi-lock-file-patterns t)

View file

@ -261,15 +261,15 @@ colors then use this, if you want fancier faces then set
;; active or passive mode?
;;
(defcustom highlight-changes-initial-state 'active
"*What state (active or passive) `highlight-changes' should start in.
This is used when `highlight-changes' is called with no argument.
"*What state (active or passive) Highlight Changes mode should start in.
This is used when `highlight-changes-mode' is called with no argument.
This variable must be set to one of the symbols `active' or `passive'."
:type '(choice (const :tag "Active" active)
(const :tag "Passive" passive))
:group 'highlight-changes)
(defcustom highlight-changes-global-initial-state 'passive
"*What state `global-highlight-changes' should start in.
"*What state global Highlight Changes mode should start in.
This is used if `global-highlight-changes' is called with no argument.
This variable must be set to either `active' or `passive'."
:type '(choice (const :tag "Active" active)
@ -309,7 +309,7 @@ its name does not begin with ` ' or `*'.
A value of nil means no buffers are suitable for `global-highlight-changes'
\(effectively disabling the mode).
Examples:
Example:
(c-mode c++-mode)
means that Highlight Changes mode is turned on for buffers in C and C++
modes only."
@ -366,7 +366,7 @@ remove it from existing buffers."
(copy-face 'highlight-changes new-name)
(copy-face old-name new-name)
))
(setq new-list (append (list new-name) new-list))
(setq new-list (append (list new-name) new-list))
(setq n (1- n))
(setq p (cdr p)))
(if (equal new-list (widget-value w))
@ -419,7 +419,7 @@ Otherwise, this list will be constructed when needed from
;;; Functions...
(defun hilit-chg-map-changes (func &optional start-position end-position)
(defun hilit-chg-map-changes (func &optional start-position end-position)
"Call function FUNC for each region used by Highlight Changes mode."
;; if start-position is nil, (point-min) is used
;; if end-position is nil, (point-max) is used
@ -1048,7 +1048,7 @@ changes are made, so \\[highlight-changes-next-change] and
When called interactively:
- if no prefix, toggle global Highlight Changes mode on or off
- if called with a positive prefix (or just C-u) turn it on in active mode
- if called with a zero prefix turn it on in passive mode
- if called with a zero prefix turn it on in passive mode
- if called with a negative prefix turn it off
When called from a program:

View file

@ -24,21 +24,21 @@
;;; Commentary:
;; This package allows to hand over a buffer to be sent off
;; via the system's designated e-mail client.
;; This package allows to hand over a buffer to be sent off
;; via the system's designated e-mail client.
;; Note that the e-mail client will display the contents of the buffer
;; again for editing.
;; The e-mail client is taken to be whoever handles a mailto: URL
;; via `browse-url'.
;; via `browse-url'.
;; Mailto: URLs are composed according to RFC2368.
;; MIME bodies are not supported - we rather expect the mail client
;; to encode the body and add, for example, a digital signature.
;; The mailto URL RFC calls for "short text messages that are
;; actually the content of automatic processing."
;; actually the content of automatic processing."
;; So mailclient.el is ideal for situations where an e-mail is
;; generated automatically, and the user can edit it in the
;; mail client (e.g. bug-reports).
;; generated automatically, and the user can edit it in the
;; mail client (e.g. bug-reports).
;; To activate:
;; (setq send-mail-function 'mailclient-send-it) ; if you use `mail'
@ -49,11 +49,11 @@
(require 'sendmail) ;; for mail-sendmail-undelimit-header
(require 'mail-utils) ;; for mail-fetch-field
(defcustom mailclient-place-body-on-clipboard-flag
(defcustom mailclient-place-body-on-clipboard-flag
(fboundp 'w32-set-clipboard-data)
"If non-nil, put the e-mail body on the clipboard in mailclient.
This is useful on systems where only short mailto:// URLs are
supported. Defaults to non-nil on Windows, nil otherwise."
This is useful on systems where only short mailto:// URLs are
supported. Defaults to non-nil on Windows, nil otherwise."
:type 'boolean
:group 'mail)
@ -64,7 +64,7 @@ supported. Defaults to non-nil on Windows, nil otherwise."
(lambda (char)
(cond
((eq char ?\x20) "%20") ;; space
((eq char ?\n) "%0D%0A") ;; newline
((eq char ?\n) "%0D%0A") ;; newline
((string-match "[-a-zA-Z0-9_:/.@]" (char-to-string char))
(char-to-string char)) ;; printable
(t ;; everything else
@ -75,33 +75,33 @@ supported. Defaults to non-nil on Windows, nil otherwise."
(defvar mailclient-delim-static "?")
(defun mailclient-url-delim ()
(let ((current mailclient-delim-static))
(setq mailclient-delim-static "&")
(setq mailclient-delim-static "&")
current))
(defun mailclient-gather-addresses (str &optional drop-first-name)
(let ((field (mail-fetch-field str nil t)))
(if field
(save-excursion
(let ((first t)
(let ((first t)
(result ""))
(mapc
(lambda (recp)
(setq result
(concat
(setq result
(concat
result
(if (and drop-first-name
first)
""
(concat (mailclient-url-delim) str "="))
(mailclient-encode-string-as-url
(mailclient-encode-string-as-url
recp)))
(setq first nil))
(split-string
(split-string
(mail-strip-quoted-names field) "\, *"))
result)))))
;;;###autoload
(defun mailclient-send-it ()
(defun mailclient-send-it ()
"Pass current buffer on to the system's mail client.
Suitable value for `send-mail-function'.
The mail client is taken to be the handler of mailto URLs."
@ -122,19 +122,19 @@ The mail client is taken to be the handler of mailto URLs."
(while (and (re-search-forward "\n\n\n*" delimline t)
(< (point) delimline))
(replace-match "\n"))
(let ((case-fold-search t))
(let ((case-fold-search t))
;; initialize limiter
(setq mailclient-delim-static "?")
;; construct and call up mailto URL
(browse-url
(concat
(browse-url
(concat
(save-excursion
(narrow-to-region (point-min) delimline)
(concat
(concat
"mailto:"
;; some of the headers according to RFC822
(mailclient-gather-addresses "To"
'drop-first-name)
(mailclient-gather-addresses "To"
'drop-first-name)
(mailclient-gather-addresses "cc" )
(mailclient-gather-addresses "bcc" )
(mailclient-gather-addresses "Resent-To" )
@ -151,16 +151,16 @@ The mail client is taken to be the handler of mailto URLs."
(if subj ;; if non-blank
;; the mail client will deal with
;; warning the user etc.
(concat (mailclient-url-delim) "subject="
(concat (mailclient-url-delim) "subject="
(mailclient-encode-string-as-url subj))
""))))
;; body
(concat
(mailclient-url-delim) "body="
(concat
(mailclient-url-delim) "body="
(mailclient-encode-string-as-url
(if mailclient-place-body-on-clipboard-flag
(progn
(clipboard-kill-ring-save
(clipboard-kill-ring-save
(+ 1 delimline) (point-max))
(concat
"*** E-Mail body has been placed on clipboard, "

View file

@ -1,3 +1,196 @@
2006-02-02 Bill Wohler <wohler@newt.com>
* mh-e.el (Version, mh-version): Add +cvs to version.
2006-02-02 Bill Wohler <wohler@newt.com>
Release MH-E version 7.90.
* mh-e.el (Version, mh-version): Update for release 7.90.
2006-02-01 Bill Wohler <wohler@newt.com>
* mh-search.el (which-func-mode): Shush compiler on Emacs 21 too.
* mh-alias.el (mh-alias-gecos-name): Use
mh-replace-regexp-in-string instead of replace-regexp-in-string.
(crm, multi-prompt): Use mh-require instead of require.
(mh-goto-address-find-address-at-point): Use
mh-line-beginning-position and mh-line-end-position instead of
line-beginning-position and line-end-position. Use
mh-match-string-no-properties instead of
match-string-no-properties.
* mh-comp.el (mh-modify-header-field): Use
mh-line-beginning-position and mh-line-end-position instead of
line-beginning-position and line-end-position.
* mh-compat.el (mailabbrev): Use mh-require instead of require.
(mh-assoc-string, mh-display-completion-list, mh-face-foreground)
(mh-face-background): Make docstring consistent.
(mh-require, mh-cancel-timer, mh-display-color-cells)
(mh-line-beginning-position, mh-line-end-position)
(mh-match-string-no-properties, mh-replace-regexp-in-string)
(mh-view-mode-enter): Move definition here from mh-xemacs.el and
add mh- prefix since compatibility functions should have our
package prefix (mh-) by Emacs convention and to avoid messing up
checks for the same functions in other packages.
* mh-e.el (mh-compiling-flag): Move mh-xemacs-compiling-flag here
from mh-xemacs.el and rename.
(mh-xargs): Use mh-line-beginning-position and
mh-line-end-position instead of line-beginning-position and
line-end-position.
(mh-defface-compat): Use mh-display-color-cells instead of
display-color-cells.
* mh-folder.el (which-func): Use mh-require instead of require.
* mh-funcs.el (mh-list-folders): Use mh-view-mode-enter instead of
view-mode-enter.
* mh-gnus.el (gnus-util, mm-bodies, mm-decode, mm-view, mml): Use
mh-require instead of require.
* mh-letter.el (mh-letter-header-end, mh-letter-mode)
(mh-letter-next-header-field): Use mh-line-beginning-position and
mh-line-end-position instead of line-beginning-position and
line-end-position.
* mh-limit.el (mh-subject-to-sequence-unthreaded): Use
mh-match-string-no-properties instead of
match-string-no-properties.
(mh-narrow-to-header-field): Use mh-line-beginning-position and
mh-line-end-position instead of line-beginning-position and
line-end-position.
* mh-mime.el (mh-mime-inline-part, mh-mm-display-part)
(mh-mh-quote-unescaped-sharp, mh-mh-directive-present-p): Use
mh-line-beginning-position and mh-line-end-position instead of
line-beginning-position and line-end-position.
* mh-search.el (which-func): Use mh-require instead of require.
(mh-make-pick-template, mh-index-visit-folder)
(mh-pick-parse-search-buffer, mh-swish-next-result)
(mh-mairix-next-result, mh-namazu-next-result)
(mh-pick-next-result, mh-grep-next-result)
(mh-index-create-imenu-index, mh-index-match-checksum)
(mh-md5sum-parser, mh-openssl-parser, mh-index-update-maps): Use
mh-line-beginning-position and mh-line-end-position instead of
line-beginning-position and line-end-position.
* mh-seq.el (mh-list-sequences): Use mh-view-mode-enter instead of
view-mode-enter.
(mh-folder-size-flist, mh-parse-flist-output-line)
(mh-add-sequence-notation): Use mh-line-beginning-position and
mh-line-end-position instead of line-beginning-position and
line-end-position.
* mh-show.el (mh-show-addr): Use mh-require instead of require.
* mh-speed.el (mh-folder-speedbar-menu-items, mh-speed-toggle)
(mh-speed-view, mh-folder-speedbar-buttons)
(mh-speed-highlight, mh-speed-goto-folder)
(mh-speed-add-buttons, mh-speed-parse-flists-output)
(mh-speed-invalidate-map, mh-speedbar-change-expand-button-char)
(mh-speed-add-folder): Use mh-line-beginning-position and
mh-line-end-position instead of line-beginning-position and
line-end-position.
(mh-speed-flists): Use mh-cancel-timer instead of cancel-timer.
* mh-thread.el (mh-thread-find-children)
(mh-thread-parse-scan-line, mh-thread-generate): Use
mh-line-beginning-position and mh-line-end-position instead of
line-beginning-position and line-end-position.
* mh-utils.el (mh-colors-available-p): Use mh-display-color-cells
instead of display-color-cells.
(mh-folder-list): Use mh-replace-regexp-in-string instead of
replace-regexp-in-string.
(mh-sub-folders-actual, mh-letter-toggle-header-field-display):
Use mh-line-beginning-position and mh-line-end-position instead of
line-beginning-position and line-end-position.
* mh-comp.el (mh-send-sub): Don't find components file in current
directory--this seems to have been a side-effect of commenting out
the use of an old mh-etc variable. Improve error message.
2006-01-31 Bill Wohler <wohler@newt.com>
* mh-acros.el (mh-defun-compat, mh-defmacro-compat): Add name
argument since compatibility functions should have our package
prefix (mh-) by Emacs convention and to avoid messing up checks
for the same functions in other packages. Use explicit argument
instead of forming name by adding mh- prefix so that one can grep
and find the definition.
* mh-alias.el (mh-alias-local-users, mh-alias-reload)
(mh-alias-expand, mh-alias-minibuffer-confirm-address): Use
mh-assoc-string instead of assoc-string.
* mh-compat.el (assoc-string): Rename to mh-assoc-string.
(mh-mail-abbrev-make-syntax-table, mh-url-hexify-string): Move
here from mh-utils.el.
(mh-display-completion-list): Move here from mh-comp.el.
(mh-face-foreground, mh-face-background): Move here from
mh-xface.el.
(mh-write-file-functions): Move here from mh-folder.el
* mh-folder.el (mh-write-file-functions-compat): Move to
mh-compat.el and rename to mh-write-file-functions.
(mh-folder-mode): Use the new name.
* mh-gnus.el (gnus-local-map-property): Rename to
mh-gnus-local-map-property.
(mm-merge-handles): Rename to mh-mm-merge-handles.
(mm-set-handle-multipart-parameter): Rename to
mh-mm-set-handle-multipart-parameter.
(mm-inline-text-vcard): Rename to mh-mm-inline-text-vcard.
(mm-possibly-verify-or-decrypt): Rename to
mh-mm-possibly-verify-or-decrypt.
(mm-handle-multipart-ctl-parameter): Rename to
mh-mm-handle-multipart-ctl-parameter.
(mm-readable-p): Rename to mh-mm-readable-p.
(mm-long-lines-p): Rename to mh-mm-long-lines-p.
(mm-keep-viewer-alive-p): Rename to mh-mm-keep-viewer-alive-p.
(mm-destroy-parts): Rename to mh-mm-destroy-parts.
(mm-uu-dissect-text-parts): Rename to mh-mm-uu-dissect-text-parts.
(mml-minibuffer-read-disposition): Rename to
mh-mml-minibuffer-read-disposition.
* mh-identity.el (mh-identity-field-handler): Use mh-assoc-string
instead of assoc-string.
* mh-mime.el (mh-mm-inline-media-tests, mh-mm-inline-message)
(mh-mime-display, mh-mime-display-security)
(mh-insert-mime-button, mh-insert-mime-security-button)
(mh-handle-set-external-undisplayer)
(mh-mime-security-press-button, mh-mime-security-show-details)
(mh-mml-attach-file, mh-mime-cleanup)
(mh-destroy-postponed-handles): Use new mh-* names for
compatibility functions.
* mh-utils.el (mail-abbrev-make-syntax-table): Move to
mh-compat.el and rename to mh-mail-abbrev-make-syntax-table.
(mh-beginning-of-word): Use the new name.
(mh-get-field): Delete ancient alias.
* mh-xface.el (mh-face-foreground-compat): Move to mh-compat.el
and rename to mh-face-foreground
(mh-face-background-compat): Move to mh-compat.el
and rename to mh-face-background.
(mh-face-display-function): Use the new names.
(mh-x-image-url-cache-canonicalize): Use mh-url-hexify-string
instead of url-hexify-string.
(url-unreserved-chars): Move to mh-compat.el and rename to
mh-url-unreserved-chars.
(url-hexify-string): Move to mh-compat.el and rename to
mh-url-hexify-string.
* mh-letter.el (mh-complete-word): Fix bug in call to
mh-display-completion-list. Wrong argument was passed, so
completions wouldn't show highlighted prefix.
2006-01-29 Bill Wohler <wohler@newt.com>
* mh-e.el (mh-scan-format-file-check): Allow any non-nil for

View file

@ -82,25 +82,25 @@ loads \"cl\" appropriately."
(funcall ',function ,@args))))
;;;###mh-autoload
(defmacro mh-defun-compat (function arg-list &rest body)
"This is a macro to define functions which are not defined.
It is used for functions which were added to Emacs recently.
If FUNCTION is not defined then it is defined to have argument
list, ARG-LIST and body, BODY."
(defmacro mh-defun-compat (name function arg-list &rest body)
"Create function NAME.
If FUNCTION exists, then NAME becomes an alias for FUNCTION.
Otherwise, create function NAME with ARG-LIST and BODY."
(let ((defined-p (fboundp function)))
(unless defined-p
`(defun ,function ,arg-list ,@body))))
(if defined-p
`(defalias ',name ',function)
`(defun ,name ,arg-list ,@body))))
(put 'mh-defun-compat 'lisp-indent-function 'defun)
;;;###mh-autoload
(defmacro mh-defmacro-compat (function arg-list &rest body)
"This is a macro to define functions which are not defined.
It is used for macros which were added to Emacs recently.
If FUNCTION is not defined then it is defined to have argument
list, ARG-LIST and body, BODY."
(let ((defined-p (fboundp function)))
(unless defined-p
`(defmacro ,function ,arg-list ,@body))))
(defmacro mh-defmacro-compat (name macro arg-list &rest body)
"Create macro NAME.
If MACRO exists, then NAME becomes an alias for MACRO.
Otherwise, create macro NAME with ARG-LIST and BODY."
(let ((defined-p (fboundp macro)))
(if defined-p
`(defalias ',name ',macro)
`(defmacro ,name ,arg-list ,@body))))
(put 'mh-defmacro-compat 'lisp-indent-function 'defun)

View file

@ -125,10 +125,10 @@ COMMA-SEPARATOR is non-nil."
(setq res (match-string 1 res)))
;; Replace "&" with capitalized username
(if (string-match "&" res)
(setq res (replace-regexp-in-string "&" (capitalize username) res)))
(setq res (mh-replace-regexp-in-string "&" (capitalize username) res)))
;; Remove " character
(if (string-match "\"" res)
(setq res (replace-regexp-in-string "\"" "" res)))
(setq res (mh-replace-regexp-in-string "\"" "" res)))
;; If empty string, use username instead
(if (string-equal "" res)
(setq res username))
@ -169,7 +169,7 @@ Exclude all aliases already in `mh-alias-alist' from \"ali\""
(if (string-equal username realname)
(concat "<" username ">")
(concat realname " <" username ">"))))
(when (not (assoc-string alias-name mh-alias-alist t))
(when (not (mh-assoc-string alias-name mh-alias-alist t))
(setq passwd-alist (cons (list alias-name alias-translation)
passwd-alist)))))))
(forward-line 1)))
@ -198,12 +198,12 @@ been loaded."
(cond
((looking-at "^[ \t]")) ;Continuation line
((looking-at "\\(.+\\): .+: .*$") ; A new -blind- MH alias
(when (not (assoc-string (match-string 1) mh-alias-blind-alist t))
(when (not (mh-assoc-string (match-string 1) mh-alias-blind-alist t))
(setq mh-alias-blind-alist
(cons (list (match-string 1)) mh-alias-blind-alist))
(setq mh-alias-alist (cons (list (match-string 1)) mh-alias-alist))))
((looking-at "\\(.+\\): .*$") ; A new MH alias
(when (not (assoc-string (match-string 1) mh-alias-alist t))
(when (not (mh-assoc-string (match-string 1) mh-alias-alist t))
(setq mh-alias-alist
(cons (list (match-string 1)) mh-alias-alist)))))
(forward-line 1)))
@ -214,7 +214,7 @@ been loaded."
user)
(while local-users
(setq user (car local-users))
(if (not (assoc-string (car user) mh-alias-alist t))
(if (not (mh-assoc-string (car user) mh-alias-alist t))
(setq mh-alias-alist (append mh-alias-alist (list user))))
(setq local-users (cdr local-users)))))
(run-hooks 'mh-alias-reloaded-hook)
@ -251,15 +251,15 @@ returns the string unchanged if not defined. The same is done here."
"Return expansion for ALIAS.
Blind aliases or users from /etc/passwd are not expanded."
(cond
((assoc-string alias mh-alias-blind-alist t)
((mh-assoc-string alias mh-alias-blind-alist t)
alias) ; Don't expand a blind alias
((assoc-string alias mh-alias-passwd-alist t)
(cadr (assoc-string alias mh-alias-passwd-alist t)))
((mh-assoc-string alias mh-alias-passwd-alist t)
(cadr (mh-assoc-string alias mh-alias-passwd-alist t)))
(t
(mh-alias-ali alias))))
(require 'crm nil t) ; completing-read-multiple
(require 'multi-prompt nil t)
(mh-require 'crm nil t) ; completing-read-multiple
(mh-require 'multi-prompt nil t)
;;;###mh-autoload
(defun mh-read-address (prompt)
@ -292,7 +292,7 @@ Blind aliases or users from /etc/passwd are not expanded."
(let* ((case-fold-search t)
(beg (mh-beginning-of-word))
(the-name (buffer-substring-no-properties beg (point))))
(if (assoc-string the-name mh-alias-alist t)
(if (mh-assoc-string the-name mh-alias-alist t)
(message "%s -> %s" the-name (mh-alias-expand the-name))
;; Check if if was a single word likely to be an alias
(if (and (equal mh-alias-flash-on-comma 1)
@ -606,12 +606,12 @@ filing messages."
Then search backwards to beginning of line for the start of an
e-mail address. If no e-mail address found, return nil."
(re-search-backward "[^-_A-z0-9.@]" (line-beginning-position) 'lim)
(re-search-backward "[^-_A-z0-9.@]" (mh-line-beginning-position) 'lim)
(if (or (looking-at mh-address-mail-regexp) ; already at start
(and (re-search-forward mh-address-mail-regexp
(line-end-position) 'lim)
(mh-line-end-position) 'lim)
(goto-char (match-beginning 0))))
(match-string-no-properties 0)))
(mh-match-string-no-properties 0)))
(defun mh-alias-apropos (regexp)
"Show all aliases or addresses that match a regular expression REGEXP."

View file

@ -759,18 +759,9 @@ CONFIG is the window configuration before sending mail."
(setq components
(expand-file-name mh-comp-formfile mh-lib)))
components)
((file-exists-p
(setq components
(expand-file-name mh-comp-formfile
;; What is this mh-etc ?? -sm
;; This is dead code, so
;; remove it.
;(and (boundp 'mh-etc) mh-etc)
)))
components)
(t
(error "Can't find components file \"%s\""
components))))
(error "Can't find %s in %s or %s"
mh-comp-formfile mh-user-path mh-lib))))
nil)))
(mh-insert-fields "To:" to "Subject:" subject "Cc:" cc)
(goto-char (point-max))
@ -1040,7 +1031,7 @@ discarded."
(cond ((and overwrite-flag
(mh-goto-header-field (concat field ":")))
(insert " " value)
(delete-region (point) (line-end-position)))
(delete-region (point) (mh-line-end-position)))
((and (not overwrite-flag)
(mh-regexp-in-field-p (concat "\\b" value "\\b") field))
;; Already there, do nothing.

View file

@ -36,31 +36,167 @@
;; way, it's easy to occasionally go through this file and see which
;; macros we can retire.
;; See also mh-gnus.el for compatibility macros used to span different
;; Please use mh-gnus.el when providing compatibility with different
;; versions of Gnus.
;; Macros are listed alphabetically.
;; Items are listed alphabetically (except for mh-require which is
;; needed by a lesser character).
(unless (fboundp 'assoc-string)
(defsubst assoc-string (key list case-fold)
"Like `assoc' but specifically for strings.
(require 'mh-acros)
(mh-do-in-gnu-emacs
(defalias 'mh-require 'require))
(mh-do-in-xemacs
(defun mh-require (feature &optional filename noerror)
"If feature FEATURE is not loaded, load it from FILENAME.
If FEATURE is not a member of the list `features', then the feature
is not loaded; so load the file FILENAME.
If FILENAME is omitted, the printname of FEATURE is used as the file name.
If the optional third argument NOERROR is non-nil,
then return nil if the file is not found instead of signaling an error.
Simulate NOERROR argument in XEmacs which lacks it."
(if (not (featurep feature))
(if filename
(load filename noerror t)
(load (format "%s" feature) noerror t)))))
(mh-defun-compat mh-assoc-string assoc-string (key list case-fold)
"Like `assoc' but specifically for strings.
Case is ignored if CASE-FOLD is non-nil.
This function added by MH-E for Emacs versions that lack
`assoc-string', introduced in Emacs 22."
(if case-fold
(assoc-ignore-case key list)
(assoc key list))))
This function is used by Emacs versions that lack `assoc-string',
introduced in Emacs 22."
(if case-fold
(assoc-ignore-case key list)
(assoc key list)))
;; For XEmacs.
(defalias 'mh-cancel-timer
(if (fboundp 'cancel-timer)
'cancel-timer
'delete-itimer))
(mh-defun-compat mh-display-color-cells display-color-cells (&optional display)
"Return the number of color cells supported by DISPLAY.
This function is used by XEmacs to always return 0 when compiling
to avoid compiling errors. Otherwise uses `device-color-cells'."
(if mh-compiling-flag
0
(device-color-cells display)))
(defmacro mh-display-completion-list (completions &optional common-substring)
"Display the list of COMPLETIONS.
Calls `display-completion-list' correctly in older environments.
Versions of Emacs prior to version 22 lacked a COMMON-SUBSTRING
argument which is used to highlight the next possible character you
can enter in the current list of completions."
See documentation for `display-completion-list' for a description of the
arguments COMPLETIONS and perhaps COMMON-SUBSTRING.
This macro is used by Emacs versions that lack a COMMON-SUBSTRING
argument, introduced in Emacs 22."
(if (< emacs-major-version 22)
`(display-completion-list ,completions)
`(display-completion-list ,completions ,common-substring)))
(defmacro mh-face-foreground (face &optional frame inherit)
"Return the foreground color name of FACE, or nil if unspecified.
See documentation for `face-foreground' for a description of the
arguments FACE, FRAME, and perhaps INHERIT.
This macro is used by Emacs versions that lack an INHERIT argument,
introduced in Emacs 22."
(if (< emacs-major-version 22)
`(face-foreground ,face ,frame)
`(face-foreground ,face ,frame ,inherit)))
(defmacro mh-face-background (face &optional frame inherit)
"Return the background color name of face, or nil if unspecified.
See documentation for `back-foreground' for a description of the
arguments FACE, FRAME, and INHERIT.
This macro is used by Emacs versions that lack an INHERIT argument,
introduced in Emacs 22."
(if (< emacs-major-version 22)
`(face-background ,face ,frame)
`(face-background ,face ,frame ,inherit)))
;; For XEmacs.
(defalias 'mh-line-beginning-position
(if (fboundp 'line-beginning-position)
'line-beginning-position
'point-at-bol))
;; For XEmacs.
(defalias 'mh-line-end-position
(if (fboundp 'line-end-position)
'line-end-position
'point-at-eol))
(mh-require 'mailabbrev nil t)
(mh-defun-compat mh-mail-abbrev-make-syntax-table
mail-abbrev-make-syntax-table ()
"Emacs 21 and XEmacs don't have `mail-abbrev-make-syntax-table'.
This function does nothing on those systems."
nil)
(mh-defun-compat mh-match-string-no-properties
match-string-no-properties (num &optional string)
"Return string of text matched by last search, without text properties.
This function is used by XEmacs that lacks `match-string-no-properties'.
The function `buffer-substring-no-properties' is used instead.
The argument STRING is ignored."
(buffer-substring-no-properties
(match-beginning num) (match-end num)))
(mh-defun-compat mh-replace-regexp-in-string replace-regexp-in-string
(rep string &optional fixedcase literal subexp start)
"Replace REGEXP with REP everywhere in STRING and return result.
This function is used by XEmacs that lacks `replace-regexp-in-string'.
The function `replace-in-string' is used instead.
The arguments FIXEDCASE, LITERAL, SUBEXP, and START are ignored."
(replace-in-string string regexp rep))
;; Copy of constant from url-util.el in Emacs 22; needed by Emacs 21.
(if (not (boundp 'url-unreserved-chars))
(defconst mh-url-unresrved-chars
'(
?a ?b ?c ?d ?e ?f ?g ?h ?i ?j ?k ?l ?m ?n ?o ?p ?q ?r ?s ?t ?u ?v ?w ?x ?y ?z
?A ?B ?C ?D ?E ?F ?G ?H ?I ?J ?K ?L ?M ?N ?O ?P ?Q ?R ?S ?T ?U ?V ?W ?X ?Y ?Z
?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9
?- ?_ ?. ?! ?~ ?* ?' ?\( ?\))
"A list of characters that are _NOT_ reserved in the URL spec.
This is taken from RFC 2396."))
(mh-defun-compat mh-url-hexify-string url-hexify-string (str)
"Escape characters in a string.
This is a copy of `url-hexify-string' from url-util.el in Emacs
22; needed by Emacs 21."
(mapconcat
(lambda (char)
;; Fixme: use a char table instead.
(if (not (memq char mh-url-unreserved-chars))
(if (> char 255)
(error "Hexifying multibyte character %s" str)
(format "%%%02X" char))
(char-to-string char)))
str ""))
(mh-defun-compat mh-view-mode-enter
view-mode-enter (&optional return-to exit-action)
"Enter View mode.
This function is used by XEmacs that lacks `view-mode-enter'.
The function `view-mode' is used instead.
The arguments RETURN-TO and EXIT-ACTION are ignored."
;; Shush compiler.
(if return-to nil)
(if exit-action nil)
(view-mode 1))
(defmacro mh-write-file-functions ()
"Return `write-file-functions' if it exists.
Otherwise return `local-write-file-hooks'.
This macro exists purely for compatibility. The former symbol is used
in Emacs 22 onward while the latter is used in previous versions and
XEmacs."
(if (boundp 'write-file-functions)
''write-file-functions ;Emacs 22 on
''local-write-file-hooks)) ;XEmacs
(provide 'mh-compat)
;; Local Variables:

View file

@ -6,7 +6,7 @@
;; Author: Bill Wohler <wohler@newt.com>
;; Maintainer: Bill Wohler <wohler@newt.com>
;; Version: 7.85+cvs
;; Version: 7.90+cvs
;; Keywords: mail
;; This file is part of GNU Emacs.
@ -101,7 +101,13 @@
(eval-and-compile
(defvar mh-xemacs-flag (featurep 'xemacs)
"Non-nil means the current Emacs is XEmacs."))
"Non-nil means the current Emacs is XEmacs.")
(defvar mh-compiling-flag nil
"Non-nil means we're compiling."))
(eval-when (compile)
(setq mh-compiling-flag t))
(mh-do-in-xemacs
(require 'mh-xemacs))
@ -115,7 +121,7 @@
;; Try to keep variables local to a single file. Provide accessors if
;; variables are shared. Use this section as a last resort.
(defconst mh-version "7.85+sans-entropy" "Version number of MH-E.")
(defconst mh-version "7.90+cvs" "Version number of MH-E.")
;; Variants
@ -464,7 +470,8 @@ all the strings have been used."
(let ((arg-list (reverse args))
(count 0))
(while (and (not (eobp)) (< count mh-index-max-cmdline-args))
(push (buffer-substring-no-properties (point) (line-end-position))
(push (buffer-substring-no-properties (point)
(mh-line-end-position))
arg-list)
(incf count)
(forward-line))
@ -2970,7 +2977,7 @@ entirely if the display does not support the number of specified
colors."
(if mh-min-colors-defined-flag
spec
(let ((cells (display-color-cells))
(let ((cells (mh-display-color-cells))
new-spec)
;; Remove entries with min-colors, or delete them if we have fewer colors
;; than they specify.

View file

@ -515,17 +515,8 @@ font-lock is done highlighting.")
(set-specifier horizontal-scrollbar-visible-p nil
(cons (current-buffer) nil)))))
(defmacro mh-write-file-functions-compat ()
"Return `write-file-functions' if it exists.
Otherwise return `local-write-file-hooks'. This macro exists
purely for compatibility. The former symbol is used in Emacs 21.4
onward while the latter is used in previous versions and XEmacs."
(if (boundp 'write-file-functions)
''write-file-functions ;Emacs 21.4
''local-write-file-hooks)) ;XEmacs
;; Register mh-folder-mode as supporting which-function-mode...
(require 'which-func nil t)
(mh-require 'which-func nil t)
(when (boundp 'which-func-modes)
(add-to-list 'which-func-modes 'mh-folder-mode))
@ -650,8 +641,8 @@ perform the operation on all messages in that region.
(setq truncate-lines t)
(auto-save-mode -1)
(setq buffer-offer-save t)
(mh-make-local-hook (mh-write-file-functions-compat))
(add-hook (mh-write-file-functions-compat) 'mh-execute-commands nil t)
(mh-make-local-hook (mh-write-file-functions))
(add-hook (mh-write-file-functions) 'mh-execute-commands nil t)
(make-local-variable 'revert-buffer-function)
(make-local-variable 'hl-line-mode) ; avoid pollution
(mh-funcall-if-exists hl-line-mode 1)

View file

@ -154,7 +154,7 @@ Display the results only if something went wrong."
"-recurse"
"-norecurse"))
(goto-char (point-min))
(view-mode-enter)
(mh-view-mode-enter)
(setq view-exit-action 'kill-buffer)
(message "Listing folders...done")))))

View file

@ -32,33 +32,34 @@
(require 'mh-e)
(require 'gnus-util nil t)
(require 'mm-bodies nil t)
(require 'mm-decode nil t)
(require 'mm-view nil t)
(require 'mml nil t)
(mh-require 'gnus-util nil t)
(mh-require 'mm-bodies nil t)
(mh-require 'mm-decode nil t)
(mh-require 'mm-view nil t)
(mh-require 'mml nil t)
;; Copy of function from gnus-util.el.
(mh-defun-compat gnus-local-map-property (map)
(mh-defun-compat mh-gnus-local-map-property gnus-local-map-property (map)
"Return a list suitable for a text property list specifying keymap MAP."
(cond (mh-xemacs-flag (list 'keymap map))
((>= emacs-major-version 21) (list 'keymap map))
(t (list 'local-map map))))
;; Copy of function from mm-decode.el.
(mh-defun-compat mm-merge-handles (handles1 handles2)
(mh-defun-compat mh-mm-merge-handles mm-merge-handles (handles1 handles2)
(append (if (listp (car handles1)) handles1 (list handles1))
(if (listp (car handles2)) handles2 (list handles2))))
;; Copy of function from mm-decode.el.
(mh-defun-compat mm-set-handle-multipart-parameter (handle parameter value)
(mh-defun-compat mh-mm-set-handle-multipart-parameter
mm-set-handle-multipart-parameter (handle parameter value)
;; HANDLE could be a CTL.
(if handle
(put-text-property 0 (length (car handle)) parameter value
(car handle))))
;; Copy of function from mm-view.el.
(mh-defun-compat mm-inline-text-vcard (handle)
(mh-defun-compat mh-mm-inline-text-vcard mm-inline-text-vcard (handle)
(let (buffer-read-only)
(mm-insert-inline
handle
@ -72,25 +73,27 @@
;; Function from mm-decode.el used in PGP messages. Just define it with older
;; Gnus to avoid compiler warning.
(mh-defun-compat mm-possibly-verify-or-decrypt (parts ctl)
(mh-defun-compat mh-mm-possibly-verify-or-decrypt
mm-possibly-verify-or-decrypt (parts ctl)
nil)
;; Copy of macro in mm-decode.el.
(mh-defmacro-compat mm-handle-multipart-ctl-parameter (handle parameter)
(mh-defmacro-compat mh-mm-handle-multipart-ctl-parameter
mm-handle-multipart-ctl-parameter (handle parameter)
`(get-text-property 0 ,parameter (car ,handle)))
;; Copy of function in mm-decode.el.
(mh-defun-compat mm-readable-p (handle)
(mh-defun-compat mh-mm-readable-p mm-readable-p (handle)
"Say whether the content of HANDLE is readable."
(and (< (with-current-buffer (mm-handle-buffer handle)
(buffer-size)) 10000)
(mm-with-unibyte-buffer
(mm-insert-part handle)
(and (eq (mm-body-7-or-8) '7bit)
(not (mm-long-lines-p 76))))))
(not (mh-mm-long-lines-p 76))))))
;; Copy of function in mm-bodies.el.
(mh-defun-compat mm-long-lines-p (length)
(mh-defun-compat mh-mm-long-lines-p mm-long-lines-p (length)
"Say whether any of the lines in the buffer is longer than LENGTH."
(save-excursion
(goto-char (point-min))
@ -102,21 +105,22 @@
(and (> (current-column) length)
(current-column))))
(mh-defun-compat mm-keep-viewer-alive-p (handle)
(mh-defun-compat mh-mm-keep-viewer-alive-p mm-keep-viewer-alive-p (handle)
;; Released Gnus doesn't keep handles associated with externally displayed
;; MIME parts. So this will always return nil.
nil)
(mh-defun-compat mm-destroy-parts (list)
(mh-defun-compat mh-mm-destroy-parts mm-destroy-parts (list)
"Older versions of Emacs don't have this function."
nil)
(mh-defun-compat mm-uu-dissect-text-parts (handles)
(mh-defun-compat mh-mm-uu-dissect-text-parts mm-uu-dissect-text-parts (handles)
"Emacs 21 and XEmacs don't have this function."
nil)
;; Copy of function in mml.el.
(mh-defun-compat mml-minibuffer-read-disposition (type &optional default)
(mh-defun-compat mh-mml-minibuffer-read-disposition
mml-minibuffer-read-disposition (type &optional default)
(unless default (setq default
(if (and (string-match "\\`text/" type)
(not (string-match "\\`text/rtf\\'" type)))

View file

@ -127,7 +127,7 @@ The field name is downcased. If the FIELD begins with the
character \":\", then it must have a special handler defined in
`mh-identity-handlers', else return an error since it is not a
valid header field."
(or (cdr (assoc-string field mh-identity-handlers t))
(or (cdr (mh-assoc-string field mh-identity-handlers t))
(and (eq (aref field 0) ?:)
(error "Field %s not found in `mh-identity-handlers'" field))
(cdr (assoc ":default" mh-identity-handlers))

View file

@ -267,7 +267,7 @@ searching for `mh-mail-header-separator' in the buffer."
(goto-char (point-min))
(cond ((equal mh-mail-header-separator "") (point-min))
((search-forward (format "\n%s\n" mh-mail-header-separator) nil t)
(line-beginning-position 0))
(mh-line-beginning-position 0))
(t (point-min)))))
@ -319,7 +319,7 @@ order).
(set (make-local-variable 'mh-mail-header-separator)
(save-excursion
(goto-char (mh-mail-header-end))
(buffer-substring-no-properties (point) (line-end-position))))
(buffer-substring-no-properties (point) (mh-line-end-position))))
(make-local-variable 'mail-header-separator)
(setq mail-header-separator mh-mail-header-separator) ;override sendmail.el
(mh-set-help mh-letter-mode-help-messages)
@ -828,7 +828,7 @@ body."
((< (point) (progn
(beginning-of-line)
(re-search-forward mh-letter-header-field-regexp
(line-end-position) t)
(mh-line-end-position) t)
(point)))
(beginning-of-line))
(t (end-of-line)))
@ -894,7 +894,7 @@ Any match found replaces the text from BEGIN to END."
(if (equal word completion)
(with-output-to-temp-buffer completions-buffer
(mh-display-completion-list (all-completions word choices)
choices))
word))
(ignore-errors
(kill-buffer completions-buffer))
(delete-region begin end)

View file

@ -211,7 +211,7 @@ Return number of messages put in the sequence:
(string-equal "" (match-string 3)))
(progn (message "No subject line")
nil)
(let ((subject (match-string-no-properties 3))
(let ((subject (mh-match-string-no-properties 3))
(list))
(if (> (length subject) mh-limit-max-subject-size)
(setq subject (substring subject 0 mh-limit-max-subject-size)))
@ -219,7 +219,7 @@ Return number of messages put in the sequence:
(if all
(goto-char (point-min)))
(while (re-search-forward mh-scan-subject-regexp nil t)
(let ((this-subject (match-string-no-properties 3)))
(let ((this-subject (mh-match-string-no-properties 3)))
(if (> (length this-subject) mh-limit-max-subject-size)
(setq this-subject (substring this-subject
0 mh-limit-max-subject-size)))
@ -310,7 +310,7 @@ The MH command pick is used to do the match."
(while (not (eobp))
(let ((num (ignore-errors
(string-to-number
(buffer-substring (point) (line-end-position))))))
(buffer-substring (point) (mh-line-end-position))))))
(when num (push num msg-list))
(forward-line))))
(if (null msg-list)

View file

@ -144,7 +144,7 @@
mm-inline-text-html-renderer)
(and (boundp 'mm-text-html-renderer) mm-text-html-renderer))))
("text/x-vcard"
mm-inline-text-vcard
mh-mm-inline-text-vcard
(lambda (handle)
(or (featurep 'vcard)
(locate-library "vcard"))))
@ -174,7 +174,7 @@
("audio/.*" ignore ignore)
("image/.*" ignore ignore)
;; Default to displaying as text
(".*" mm-inline-text mm-readable-p))
(".*" mm-inline-text mh-mm-readable-p))
"Alist of media types/tests saying whether types can be displayed inline.")
(defvar mh-mime-save-parts-directory nil
@ -302,14 +302,14 @@ the attachment labeled with that number."
start end)
(cond ((and data (not inserted-flag) (not displayed-flag))
(let ((contents (mm-get-part data)))
(add-text-properties (line-beginning-position) (line-end-position)
'(mh-mime-inserted t))
(add-text-properties (mh-line-beginning-position)
(mh-line-end-position) '(mh-mime-inserted t))
(setq start (point-marker))
(forward-line 1)
(mm-insert-inline data contents)
(setq end (point-marker))
(add-text-properties
start (progn (goto-char start) (line-end-position))
start (progn (goto-char start) (mh-line-end-position))
`(mh-region (,start . ,end)))))
((and data (or inserted-flag displayed-flag))
(mh-press-button)
@ -460,10 +460,10 @@ decoding the same message multiple times."
(setf (gethash handle (mh-mime-handles-cache (mh-buffer-data)))
(let ((handles (mm-dissect-buffer nil)))
(if handles
(mm-uu-dissect-text-parts handles)
(mh-mm-uu-dissect-text-parts handles)
(setq handles (mm-uu-dissect)))
(setf (mh-mime-handles (mh-buffer-data))
(mm-merge-handles
(mh-mm-merge-handles
handles (mh-mime-handles (mh-buffer-data))))
handles))))
@ -527,11 +527,11 @@ parsed and then displayed."
(if pre-dissected-handles
(setq handles pre-dissected-handles)
(if (setq handles (mm-dissect-buffer nil))
(mm-uu-dissect-text-parts handles)
(mh-mm-uu-dissect-text-parts handles)
(setq handles (mm-uu-dissect)))
(setf (mh-mime-handles (mh-buffer-data))
(mm-merge-handles handles
(mh-mime-handles (mh-buffer-data))))
(mh-mm-merge-handles handles
(mh-mime-handles (mh-buffer-data))))
(unless handles
(mh-decode-message-body)))
@ -637,7 +637,7 @@ buttons for alternative parts that are usually suppressed."
(let ((mh-mime-security-button-line-format
mh-mime-security-button-end-line-format))
(mh-insert-mime-security-button handle))
(mm-set-handle-multipart-parameter
(mh-mm-set-handle-multipart-parameter
handle 'mh-region (cons (point-min-marker) (point-max-marker)))))
(defun mh-mime-display-single (handle)
@ -746,7 +746,8 @@ buttons for alternative parts that are usually suppressed."
(mh-insert-mime-button handle id (mm-handle-displayed-p handle))
(goto-char point)
(when region
(add-text-properties (line-beginning-position) (line-end-position)
(add-text-properties (mh-line-beginning-position)
(mh-line-end-position)
`(mh-region ,region)))))))
(defun mh-mime-part-index (handle)
@ -853,7 +854,7 @@ by commands like \"K v\" which operate on individual MIME parts."
(setq begin (point))
(gnus-eval-format
mh-mime-button-line-format mh-mime-button-line-format-alist
`(,@(gnus-local-map-property mh-mime-button-map)
`(,@(mh-gnus-local-map-property mh-mime-button-map)
mh-callback mh-mm-display-part
mh-part ,index
mh-data ,handle))
@ -878,7 +879,7 @@ by commands like \"K v\" which operate on individual MIME parts."
(defun mh-insert-mime-security-button (handle)
"Display buttons for PGP message, HANDLE."
(let* ((protocol (mm-handle-multipart-ctl-parameter handle 'protocol))
(let* ((protocol (mh-mm-handle-multipart-ctl-parameter handle 'protocol))
(crypto-type (or (nth 2 (assoc protocol mm-verify-function-alist))
(nth 2 (assoc protocol mm-decrypt-function-alist))
"Unknown"))
@ -886,9 +887,9 @@ by commands like \"K v\" which operate on individual MIME parts."
(if (equal (car handle) "multipart/signed")
" Signed" " Encrypted")
" Part"))
(info (or (mm-handle-multipart-ctl-parameter handle 'gnus-info)
(info (or (mh-mm-handle-multipart-ctl-parameter handle 'gnus-info)
"Undecided"))
(details (mm-handle-multipart-ctl-parameter handle 'gnus-details))
(details (mh-mm-handle-multipart-ctl-parameter handle 'gnus-details))
pressed-details begin end face)
(setq details (if details (concat "\n" details) ""))
(setq pressed-details (if mh-mime-security-button-pressed details ""))
@ -898,7 +899,7 @@ by commands like \"K v\" which operate on individual MIME parts."
(gnus-eval-format
mh-mime-security-button-line-format
mh-mime-security-button-line-format-alist
`(,@(gnus-local-map-property mh-mime-security-button-map)
`(,@(mh-gnus-local-map-property mh-mime-security-button-map)
mh-button-pressed ,mh-mime-security-button-pressed
mh-callback mh-mime-security-press-button
mh-line-format ,mh-mime-security-button-line-format
@ -1065,7 +1066,7 @@ This is only called in recent versions of Gnus. The MIME handles
are stored in data structures corresponding to MH-E folder buffer
FOLDER instead of in Gnus (as in the original). The MIME part,
HANDLE is associated with the undisplayer FUNCTION."
(if (mm-keep-viewer-alive-p handle)
(if (mh-mm-keep-viewer-alive-p handle)
(let ((new-handle (copy-sequence handle)))
(mm-handle-set-undisplayer new-handle function)
(mm-handle-set-undisplayer handle nil)
@ -1076,19 +1077,19 @@ HANDLE is associated with the undisplayer FUNCTION."
(defun mh-mime-security-press-button (handle)
"Callback from security button for part HANDLE."
(if (mm-handle-multipart-ctl-parameter handle 'gnus-info)
(if (mh-mm-handle-multipart-ctl-parameter handle 'gnus-info)
(mh-mime-security-show-details handle)
(let ((region (mm-handle-multipart-ctl-parameter handle 'mh-region))
(let ((region (mh-mm-handle-multipart-ctl-parameter handle 'mh-region))
point)
(setq point (point))
(goto-char (car region))
(delete-region (car region) (cdr region))
(with-current-buffer (mm-handle-multipart-ctl-parameter handle 'buffer)
(with-current-buffer (mh-mm-handle-multipart-ctl-parameter handle 'buffer)
(let* ((mm-verify-option 'known)
(mm-decrypt-option 'known)
(new (mm-possibly-verify-or-decrypt (cdr handle) handle)))
(new (mh-mm-possibly-verify-or-decrypt (cdr handle) handle)))
(unless (eq new (cdr handle))
(mm-destroy-parts (cdr handle))
(mh-mm-destroy-parts (cdr handle))
(setcdr handle new))))
(mh-mime-display-security handle)
(goto-char point))))
@ -1098,7 +1099,7 @@ HANDLE is associated with the undisplayer FUNCTION."
;; to be no way of getting rid of the inserted text.
(defun mh-mime-security-show-details (handle)
"Toggle display of detailed security info for HANDLE."
(let ((details (mm-handle-multipart-ctl-parameter handle 'gnus-details)))
(let ((details (mh-mm-handle-multipart-ctl-parameter handle 'gnus-details)))
(when details
(let ((mh-mime-security-button-pressed
(not (get-text-property (point) 'mh-button-pressed)))
@ -1296,7 +1297,7 @@ automatically."
(type (mh-minibuffer-read-type file))
(description (mml-minibuffer-read-description))
(dispos (or disposition
(mml-minibuffer-read-disposition type))))
(mh-mml-minibuffer-read-disposition type))))
(mml-insert-empty-tag 'part 'type type 'filename file
'disposition dispos 'description description)))
@ -1500,9 +1501,9 @@ This function will quote all such characters."
(goto-char (point-min))
(while (re-search-forward "^#" nil t)
(beginning-of-line)
(unless (mh-mh-directive-present-p (point) (line-end-position))
(unless (mh-mh-directive-present-p (point) (mh-line-end-position))
(insert "#"))
(goto-char (line-end-position)))))
(goto-char (mh-line-end-position)))))
;;;###mh-autoload
(defun mh-mh-to-mime-undo (noconfirm)
@ -1672,7 +1673,8 @@ buffer, while END defaults to the the end of the buffer."
(block 'search-for-mh-directive
(goto-char begin)
(while (re-search-forward "^#" end t)
(let ((s (buffer-substring-no-properties (point) (line-end-position))))
(let ((s (buffer-substring-no-properties
(point) (mh-line-end-position))))
(cond ((equal s ""))
((string-match "^forw[ \t\n]+" s)
(return-from 'search-for-mh-directive t))
@ -1784,7 +1786,7 @@ initialized. Always use the command `mh-have-file-command'.")
;; This is for Emacs, what about XEmacs?
(mh-funcall-if-exists remove-images (point-min) (point-max))
(when mime-data
(mm-destroy-parts (mh-mime-handles mime-data))
(mh-mm-destroy-parts (mh-mime-handles mime-data))
(remhash (current-buffer) mh-globals-hash))))
;;;###mh-autoload
@ -1792,7 +1794,7 @@ initialized. Always use the command `mh-have-file-command'.")
"Free MIME data for externally displayed MIME parts."
(let ((mime-data (mh-buffer-data)))
(when mime-data
(mm-destroy-parts (mh-mime-handles mime-data)))
(mh-mm-destroy-parts (mh-mime-handles mime-data)))
(remhash (current-buffer) mh-globals-hash)))
(provide 'mh-mime)

View file

@ -51,7 +51,6 @@
(require 'gnus-util)
(require 'imenu)
(require 'which-func nil t)
(defvar mh-searcher nil
"Cached value of chosen search program.")
@ -358,12 +357,13 @@ configuration and is used when the search folder is dismissed."
(goto-char (point-min))
(dotimes (i 5)
(add-text-properties (point) (1+ (point)) '(front-sticky t))
(add-text-properties (- (line-end-position) 2) (1- (line-end-position))
(add-text-properties (- (mh-line-end-position) 2)
(1- (mh-line-end-position))
'(rear-nonsticky t))
(add-text-properties (point) (1- (line-end-position)) '(read-only t))
(add-text-properties (point) (1- (mh-line-end-position)) '(read-only t))
(forward-line))
(add-text-properties (point) (1+ (point)) '(front-sticky t))
(add-text-properties (point) (1- (line-end-position)) '(read-only t))
(add-text-properties (point) (1- (mh-line-end-position)) '(read-only t))
(goto-char (point-max)))
;; Sequence Searches
@ -526,9 +526,10 @@ group of results."
(cond ((and (bolp) (eolp))
(ignore-errors (forward-line -1))
(setq msg (mh-get-msg-num t)))
((equal (char-after (line-beginning-position)) ?+)
((equal (char-after (mh-line-beginning-position)) ?+)
(setq folder (buffer-substring-no-properties
(line-beginning-position) (line-end-position))))
(mh-line-beginning-position)
(mh-line-end-position))))
(t (setq msg (mh-get-msg-num t)))))
(when (not folder)
(setq folder (car (gethash (gethash msg mh-index-msg-checksum-map)
@ -655,13 +656,13 @@ The cdr of the element is the pattern to search."
start begin)
(goto-char (point-min))
(while (not (eobp))
(if (search-forward "--------" (line-end-position) t)
(if (search-forward "--------" (mh-line-end-position) t)
(setq in-body-flag t)
(beginning-of-line)
(setq begin (point))
(setq start (if in-body-flag
(point)
(search-forward ":" (line-end-position) t)
(search-forward ":" (mh-line-end-position) t)
(point)))
(push (cons (and (not in-body-flag)
(intern (downcase
@ -669,7 +670,7 @@ The cdr of the element is the pattern to search."
begin (1- start)))))
(mh-index-parse-search-regexp
(buffer-substring-no-properties
start (line-end-position))))
start (mh-line-end-position))))
pattern-list))
(forward-line))
pattern-list)))
@ -979,8 +980,8 @@ is used to search."
(return nil))
(when (equal (char-after (point)) ?#)
(return 'error))
(let* ((start (search-forward " " (line-end-position) t))
(end (search-forward " " (line-end-position) t)))
(let* ((start (search-forward " " (mh-line-end-position) t))
(end (search-forward " " (mh-line-end-position) t)))
(unless (and start end)
(return 'error))
(setq end (1- end))
@ -1058,7 +1059,7 @@ SEARCH-REGEXP-LIST is used to search."
(return 'error))
(let ((start (point))
end msg-start)
(setq end (line-end-position))
(setq end (mh-line-end-position))
(unless (search-forward mh-mairix-folder end t)
(return 'error))
(goto-char (match-beginning 0))
@ -1191,7 +1192,7 @@ is used to search."
(block nil
(when (eobp) (return nil))
(let ((file-name (buffer-substring-no-properties
(point) (line-end-position))))
(point) (mh-line-end-position))))
(unless (equal (string-match mh-namazu-folder file-name) 0)
(return 'error))
(unless (file-exists-p file-name)
@ -1239,17 +1240,17 @@ is used to search."
(prog1
(block nil
(when (eobp) (return nil))
(when (search-forward-regexp "^\+" (line-end-position) t)
(when (search-forward-regexp "^\+" (mh-line-end-position) t)
(setq mh-index-pick-folder
(buffer-substring-no-properties (line-beginning-position)
(line-end-position)))
(buffer-substring-no-properties (mh-line-beginning-position)
(mh-line-end-position)))
(return 'error))
(unless (search-forward-regexp "^[1-9][0-9]*$" (line-end-position) t)
(unless (search-forward-regexp "^[1-9][0-9]*$" (mh-line-end-position) t)
(return 'error))
(list mh-index-pick-folder
(string-to-number
(buffer-substring-no-properties (line-beginning-position)
(line-end-position)))
(buffer-substring-no-properties (mh-line-beginning-position)
(mh-line-end-position)))
nil))
(forward-line)))
@ -1326,8 +1327,8 @@ record is invalid return 'error."
(block nil
(when (eobp)
(return nil))
(let ((eol-pos (line-end-position))
(bol-pos (line-beginning-position))
(let ((eol-pos (mh-line-end-position))
(bol-pos (mh-line-beginning-position))
folder-start msg-end)
(goto-char bol-pos)
(unless (search-forward mh-user-path eol-pos t)
@ -1408,8 +1409,12 @@ being the list of messages originally from that folder."
(when cur-msg (mh-goto-msg cur-msg t t))
(set-buffer-modified-p old-buffer-modified-flag)))
(mh-require 'which-func nil t)
;; Shush compiler.
(eval-when-compile (mh-do-in-xemacs (defvar which-func-mode)))
(eval-when-compile
(if (or mh-xemacs-flag (< emacs-major-version 22))
(defvar which-func-mode)))
;;;###mh-autoload
(defun mh-index-create-imenu-index ()
@ -1423,7 +1428,7 @@ being the list of messages originally from that folder."
(save-excursion
(beginning-of-line)
(push (cons (buffer-substring-no-properties
(point) (line-end-position))
(point) (mh-line-end-position))
(set-marker (make-marker) (point)))
alist)))
(setq imenu--index-alist (nreverse alist)))))
@ -1696,7 +1701,8 @@ folder, is removed from `mh-index-data'."
(mh-exec-cmd-output mh-scan-prog nil "-width" "80"
"-format" "%{x-mhe-checksum}\n" folder msg)
(goto-char (point-min))
(string-equal (buffer-substring-no-properties (point) (line-end-position))
(string-equal (buffer-substring-no-properties
(point) (mh-line-end-position))
checksum)))
@ -1805,8 +1811,8 @@ PROC is used to convert the value to actual data."
(defun mh-md5sum-parser ()
"Parse md5sum output."
(let ((begin (line-beginning-position))
(end (line-end-position))
(let ((begin (mh-line-beginning-position))
(end (mh-line-end-position))
first-space last-slash)
(setq first-space (search-forward " " end t))
(goto-char end)
@ -1819,8 +1825,8 @@ PROC is used to convert the value to actual data."
(defun mh-openssl-parser ()
"Parse openssl output."
(let ((begin (line-beginning-position))
(end (line-end-position))
(let ((begin (mh-line-beginning-position))
(end (mh-line-end-position))
last-space last-slash)
(goto-char end)
(setq last-space (search-backward " " begin t))
@ -1854,7 +1860,7 @@ origin-index) map is updated too."
(let (msg checksum)
(while (not (eobp))
(setq msg (buffer-substring-no-properties
(point) (line-end-position)))
(point) (mh-line-end-position)))
(forward-line)
(save-excursion
(cond ((not (string-match "^[0-9]*$" msg)))
@ -1865,7 +1871,7 @@ origin-index) map is updated too."
(t
;; update maps
(setq checksum (buffer-substring-no-properties
(point) (line-end-position)))
(point) (mh-line-end-position)))
(let ((msg (string-to-number msg)))
(set-buffer folder)
(mh-index-update-single-msg msg checksum origin-map)))))

View file

@ -175,7 +175,7 @@ The list appears in a buffer named \"*MH-E Sequences*\"."
(insert "\n"))
(setq seq-list (cdr seq-list)))
(goto-char (point-min))
(view-mode-enter)
(mh-view-mode-enter)
(setq view-exit-action 'kill-buffer)
(message "Listing sequences...done")))))
@ -749,7 +749,7 @@ completion is over."
(goto-char (point-min))
(multiple-value-bind (folder unseen total)
(mh-parse-flist-output-line
(buffer-substring (point) (line-end-position)))
(buffer-substring (point) (mh-line-end-position)))
(values total unseen folder))))
(defun mh-folder-size-folder (folder)
@ -777,7 +777,7 @@ folders whose names end with a '+' character."
(when (search-backward " out of " (point-min) t)
(setq total (string-to-number
(buffer-substring-no-properties
(match-end 0) (line-end-position))))
(match-end 0) (mh-line-end-position))))
(when (search-backward " in sequence " (point-min) t)
(setq p (point))
(when (search-backward " has " (point-min) t)
@ -955,7 +955,7 @@ font-lock is turned on."
;; the case of user sequences.
(mh-notate nil nil mh-cmd-note)
(when font-lock-mode
(font-lock-fontify-region (point) (line-end-position))))
(font-lock-fontify-region (point) (mh-line-end-position))))
(forward-char (+ mh-cmd-note mh-scan-field-destination-offset))
(let ((stack (gethash msg mh-sequence-notation-history)))
(setf (gethash msg mh-sequence-notation-history)

View file

@ -878,7 +878,7 @@ See also `mh-folder-mode'.
(defun mh-show-addr ()
"Use `goto-address'."
(when mh-show-use-goto-addr-flag
(require 'goto-addr nil t)
(mh-require 'goto-addr nil t)
(if (fboundp 'goto-address)
(goto-address))))

View file

@ -69,13 +69,13 @@
["Visit Folder" mh-speed-view
(save-excursion
(set-buffer speedbar-buffer)
(get-text-property (line-beginning-position) 'mh-folder))]
(get-text-property (mh-line-beginning-position) 'mh-folder))]
["Expand Nested Folders" mh-speed-expand-folder
(and (get-text-property (line-beginning-position) 'mh-children-p)
(not (get-text-property (line-beginning-position) 'mh-expanded)))]
(and (get-text-property (mh-line-beginning-position) 'mh-children-p)
(not (get-text-property (mh-line-beginning-position) 'mh-expanded)))]
["Contract Nested Folders" mh-speed-contract-folder
(and (get-text-property (line-beginning-position) 'mh-children-p)
(get-text-property (line-beginning-position) 'mh-expanded))]
(and (get-text-property (mh-line-beginning-position) 'mh-children-p)
(get-text-property (mh-line-beginning-position) 'mh-expanded))]
["Refresh Speedbar" mh-speed-refresh t])
"Extra menu items for speedbar.")
@ -157,7 +157,7 @@ The optional ARGS from speedbar are ignored."
(forward-line -1)
(speedbar-change-expand-button-char ?+)
(add-text-properties
(line-beginning-position) (1+ (line-beginning-position))
(mh-line-beginning-position) (1+ (line-beginning-position))
'(mh-expanded nil)))
(t
(forward-line)
@ -165,7 +165,7 @@ The optional ARGS from speedbar are ignored."
(goto-char point)
(speedbar-change-expand-button-char ?-)
(add-text-properties
(line-beginning-position) (1+ (line-beginning-position))
(mh-line-beginning-position) (1+ (line-beginning-position))
`(mh-expanded t)))))))
(defun mh-speed-view (&rest args)
@ -173,7 +173,7 @@ The optional ARGS from speedbar are ignored."
The optional ARGS from speedbar are ignored."
(interactive)
(declare (ignore args))
(let* ((folder (get-text-property (line-beginning-position) 'mh-folder))
(let* ((folder (get-text-property (mh-line-beginning-position) 'mh-folder))
(range (and (stringp folder)
(mh-read-range "Scan" folder t nil nil
mh-interpret-number-as-range-flag))))
@ -199,9 +199,9 @@ created."
(forward-line -1)
(setf (gethash nil mh-speed-folder-map)
(set-marker (or (gethash nil mh-speed-folder-map) (make-marker))
(1+ (line-beginning-position))))
(1+ (mh-line-beginning-position))))
(add-text-properties
(line-beginning-position) (1+ (line-beginning-position))
(mh-line-beginning-position) (1+ (line-beginning-position))
`(mh-folder nil mh-expanded nil mh-children-p t mh-level 0))
(mh-speed-stealth-update t)
(when (> mh-speed-update-interval 0)
@ -268,12 +268,12 @@ The update is always carried out if FORCE is non-nil."
(speedbar-with-writable
(goto-char (gethash folder mh-speed-folder-map (point)))
(beginning-of-line)
(if (re-search-forward "([1-9][0-9]*/[0-9]+)" (line-end-position) t)
(if (re-search-forward "([1-9][0-9]*/[0-9]+)" (mh-line-end-position) t)
(setq face (mh-speed-bold-face face))
(setq face (mh-speed-normal-face face)))
(beginning-of-line)
(when (re-search-forward "\\[.\\] " (line-end-position) t)
(put-text-property (point) (line-end-position) 'face face)))))
(when (re-search-forward "\\[.\\] " (mh-line-end-position) t)
(put-text-property (point) (mh-line-end-position) 'face face)))))
(defun mh-speed-normal-face (face)
"Return normal face for given FACE."
@ -313,7 +313,7 @@ The function will expand out parent folders of FOLDER if needed."
(while suffix-list
;; We always need atleast one toggle. We need two if the directory list
;; is stale since a folder was added.
(when (equal prefix (get-text-property (line-beginning-position)
(when (equal prefix (get-text-property (mh-line-beginning-position)
'mh-folder))
(mh-speed-toggle)
(unless (get-text-property (point) 'mh-expanded)
@ -368,9 +368,9 @@ uses."
(setf (gethash folder-name mh-speed-folder-map)
(set-marker (or (gethash folder-name mh-speed-folder-map)
(make-marker))
(1+ (line-beginning-position))))
(1+ (mh-line-beginning-position))))
(add-text-properties
(line-beginning-position) (1+ (line-beginning-position))
(mh-line-beginning-position) (1+ (mh-line-beginning-position))
`(mh-folder ,folder-name
mh-expanded nil
mh-children-p ,(not (not (cdr f)))
@ -400,7 +400,7 @@ flists is run only for that one folder."
(interactive (list t))
(when force
(when mh-speed-flists-timer
(cancel-timer mh-speed-flists-timer)
(mh-cancel-timer mh-speed-flists-timer)
(setq mh-speed-flists-timer nil))
(when (and (processp mh-speed-flists-process)
(not (eq (process-status mh-speed-flists-process) 'exit)))
@ -471,25 +471,25 @@ be handled next."
face)
(when pos
(goto-char pos)
(goto-char (line-beginning-position))
(goto-char (mh-line-beginning-position))
(cond
((null (get-text-property (point) 'mh-count))
(goto-char (line-end-position))
(goto-char (mh-line-end-position))
(setq face (get-text-property (1- (point)) 'face))
(insert (format " (%s/%s)" unseen total))
(mh-speed-highlight 'unknown face)
(goto-char (line-beginning-position))
(goto-char (mh-line-beginning-position))
(add-text-properties (point) (1+ (point))
`(mh-count (,unseen . ,total))))
((not (equal (get-text-property (point) 'mh-count)
(cons unseen total)))
(goto-char (line-end-position))
(goto-char (mh-line-end-position))
(setq face (get-text-property (1- (point)) 'face))
(re-search-backward " " (line-beginning-position) t)
(delete-region (point) (line-end-position))
(re-search-backward " " (mh-line-beginning-position) t)
(delete-region (point) (mh-line-end-position))
(insert (format " (%s/%s)" unseen total))
(mh-speed-highlight 'unknown face)
(goto-char (line-beginning-position))
(goto-char (mh-line-beginning-position))
(add-text-properties
(point) (1+ (point))
`(mh-count (,unseen . ,total))))))))))))
@ -519,15 +519,15 @@ be handled next."
(caar parent-kids)))
(setq parent-change ? ))))
(goto-char parent-position)
(when (equal (get-text-property (line-beginning-position) 'mh-folder)
(when (equal (get-text-property (mh-line-beginning-position) 'mh-folder)
parent)
(when (get-text-property (line-beginning-position) 'mh-expanded)
(when (get-text-property (mh-line-beginning-position) 'mh-expanded)
(mh-speed-toggle))
(when parent-change
(speedbar-with-writable
(mh-speedbar-change-expand-button-char parent-change)
(add-text-properties
(line-beginning-position) (1+ (line-beginning-position))
(mh-line-beginning-position) (1+ (mh-line-beginning-position))
`(mh-children-p ,(equal parent-change ?+)))))
(mh-speed-highlight mh-speed-last-selected-folder 'mh-speedbar-folder)
(setq mh-speed-last-selected-folder nil)
@ -541,7 +541,7 @@ be handled next."
"Change the expansion button character to CHAR for the current line."
(save-excursion
(beginning-of-line)
(if (re-search-forward "\\[.\\]" (line-end-position) t)
(if (re-search-forward "\\[.\\]" (mh-line-end-position) t)
(speedbar-with-writable
(backward-char 2)
(delete-char 1)
@ -573,9 +573,9 @@ The function invalidates the latest ancestor that is present."
(speedbar-with-writable
(mh-speedbar-change-expand-button-char ?+)
(add-text-properties
(line-beginning-position) (1+ (line-beginning-position))
(mh-line-beginning-position) (1+ (mh-line-beginning-position))
`(mh-children-p t)))
(when (get-text-property (line-beginning-position) 'mh-expanded)
(when (get-text-property (mh-line-beginning-position) 'mh-expanded)
(mh-speed-toggle))
(setq mh-speed-refresh-flag t))))

View file

@ -296,7 +296,7 @@ at the end."
(while (not (eobp))
(forward-char address-start-offset)
(unless (equal (string-match spaces (buffer-substring-no-properties
(point) (line-end-position)))
(point) (mh-line-end-position)))
0)
(beginning-of-line)
(backward-char)
@ -456,9 +456,9 @@ are the same containers."
If optional argument STRING is given then that is assumed to be
the scan line. Otherwise uses the line at point as the scan line
to parse."
(let* ((string (or string
(buffer-substring-no-properties (line-beginning-position)
(line-end-position))))
(let* ((string (or string (buffer-substring-no-properties
(mh-line-beginning-position)
(mh-line-end-position))))
(address-start (+ mh-cmd-note mh-scan-field-from-start-offset))
(body-start (+ mh-cmd-note mh-scan-field-from-end-offset))
(first-string (substring string 0 address-start)))
@ -599,18 +599,20 @@ Only information about messages in MSG-LIST are added to the tree."
(while (not (eobp))
(block process-message
(let* ((index-line
(prog1 (buffer-substring (point) (line-end-position))
(prog1 (buffer-substring (point) (mh-line-end-position))
(forward-line)))
(index (string-to-number index-line))
(id (prog1 (buffer-substring (point) (line-end-position))
(id (prog1 (buffer-substring (point) (mh-line-end-position))
(forward-line)))
(refs (prog1 (buffer-substring (point) (line-end-position))
(refs (prog1
(buffer-substring (point) (mh-line-end-position))
(forward-line)))
(in-reply-to (prog1 (buffer-substring (point)
(line-end-position))
(mh-line-end-position))
(forward-line)))
(subject (prog1
(buffer-substring (point) (line-end-position))
(buffer-substring
(point) (mh-line-end-position))
(forward-line)))
(subject-re-p nil))
(unless (gethash index mh-thread-scan-line-map)

View file

@ -51,11 +51,6 @@ used in lieu of `search' in the CL package."
;;; General Utilities
(require 'mailabbrev nil t)
(mh-defun-compat mail-abbrev-make-syntax-table ()
"Emacs 21 and XEmacs don't have this function."
nil)
;;;###mh-autoload
(defun mh-beginning-of-word (&optional n)
"Return position of the N th word backwards."
@ -63,7 +58,7 @@ used in lieu of `search' in the CL package."
(let ((syntax-table (syntax-table)))
(unwind-protect
(save-excursion
(mail-abbrev-make-syntax-table)
(mh-mail-abbrev-make-syntax-table)
(set-syntax-table mail-abbrev-syntax-table)
(backward-word n)
(point))
@ -73,7 +68,7 @@ used in lieu of `search' in the CL package."
(defun mh-colors-available-p ()
"Check if colors are available in the Emacs being used."
(or mh-xemacs-flag
(let ((color-cells (display-color-cells)))
(let ((color-cells (mh-display-color-cells)))
(and (numberp color-cells) (>= color-cells 8)))))
;;;###mh-autoload
@ -507,8 +502,8 @@ not be returned."
;; top-level folders; otherwise mh-sub-folders returns all the
;; files in / if given an empty string or +.
(when folder
(setq folder (replace-regexp-in-string "^\+" "" folder))
(setq folder (replace-regexp-in-string "/*$" "/" folder))
(setq folder (mh-replace-regexp-in-string "^\+" "" folder))
(setq folder (mh-replace-regexp-in-string "/*$" "/" folder))
(if (equal folder "")
(setq folder nil)))
(loop for f in (mh-sub-folders folder) do
@ -558,9 +553,10 @@ directories that aren't usually mail folders are hidden."
(apply #'call-process arg-list)
(goto-char (point-min))
(while (not (and (eolp) (bolp)))
(goto-char (line-end-position))
(let ((start-pos (line-beginning-position))
(has-pos (search-backward " has " (line-beginning-position) t)))
(goto-char (mh-line-end-position))
(let ((start-pos (mh-line-beginning-position))
(has-pos (search-backward " has "
(mh-line-beginning-position) t)))
(when (integerp has-pos)
(while (equal (char-after has-pos) ? )
(decf has-pos))
@ -575,7 +571,7 @@ directories that aren't usually mail folders are hidden."
(setq name (substring name 0 (1- (length name)))))
(push
(cons name
(search-forward "(others)" (line-end-position) t))
(search-forward "(others)" (mh-line-end-position) t))
results))))
(forward-line 1))))
(setq results (nreverse results))
@ -817,8 +813,6 @@ current buffer."
(buffer-substring-no-properties start (point))))
""))
(fset 'mh-get-field 'mh-get-header-field) ;MH-E 4 compatibility
;;;###mh-autoload
(defun mh-goto-header-field (field)
"Move to FIELD in the message header.
@ -934,10 +928,12 @@ is hidden, if positive then the field is displayed."
(unwind-protect
(cond ((or (and (not arg)
(text-property-any begin end 'invisible 'vanish))
(and (numberp arg) (>= arg 0))
(and (eq arg 'long) (> (line-beginning-position 5) end)))
(and (numberp arg)
(>= arg 0))
(and (eq arg 'long)
(> (mh-line-beginning-position 5) end)))
(remove-text-properties begin end '(invisible nil))
(search-forward ":" (line-end-position) t)
(search-forward ":" (mh-line-end-position) t)
(mh-letter-skip-leading-whitespace-in-header-field))
;; XXX Redesign to make usable by user. Perhaps use a positive
;; numeric prefix to make that many lines visible.

View file

@ -59,32 +59,6 @@
mh-clean-message-header-flag))
(funcall mh-show-xface-function)))
(defmacro mh-face-foreground-compat (face &optional frame inherit)
"Return the foreground color name of FACE, or nil if unspecified.
See documentation for `face-foreground' for a description of the
arguments FACE, FRAME, and INHERIT.
Calls `face-foreground' correctly in older environments. Versions
of Emacs prior to version 22 lacked an INHERIT argument which
when t tells `face-foreground' to consider an inherited value for
the foreground if the face does not define one itself."
(if (>= emacs-major-version 22)
`(face-foreground ,face ,frame ,inherit)
`(face-foreground ,face ,frame)))
(defmacro mh-face-background-compat(face &optional frame inherit)
"Return the background color name of face, or nil if unspecified.
See documentation for `back-foreground' for a description of the
arguments FACE, FRAME, and INHERIT.
Calls `face-background' correctly in older environments. Versions
of Emacs prior to version 22 lacked an INHERIT argument which
when t tells `face-background' to consider an inherited value for
the background if the face does not define one itself."
(if (>= emacs-major-version 22)
`(face-background ,face ,frame ,inherit)
`(face-background ,face ,frame)))
;; Shush compiler.
(eval-when-compile
(mh-do-in-xemacs (defvar default-enable-multibyte-characters)))
@ -120,9 +94,9 @@ in this order is used."
insert-image (create-image
raw type t
:foreground
(mh-face-foreground-compat 'mh-show-xface nil t)
(mh-face-foreground 'mh-show-xface nil t)
:background
(mh-face-background-compat 'mh-show-xface nil t))
(mh-face-background 'mh-show-xface nil t))
" ")))
;; XEmacs
(mh-do-in-xemacs
@ -386,41 +360,17 @@ This is only done if `mh-x-image-cache-directory' is nil."
(defun mh-x-image-url-cache-canonicalize (url)
"Canonicalize URL.
Replace the ?/ character with a ?! character and append .png.
Also replaces special characters with `url-hexify-string' since
not all characters, such as :, are legal within Windows
filenames. See URL `http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/naming_a_file.asp'."
Also replaces special characters with `mh-url-hexify-string'
since not all characters, such as :, are legal within Windows
filenames. See URL
`http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/naming_a_file.asp'."
(format "%s/%s.png" mh-x-image-cache-directory
(url-hexify-string
(mh-url-hexify-string
(with-temp-buffer
(insert url)
(mh-replace-string "/" "!")
(buffer-string)))))
;; Copy of constant from url-util.el in Emacs 22; needed by Emacs 21.
(if (not (boundp 'url-unreserved-chars))
(defconst url-unreserved-chars
'(
?a ?b ?c ?d ?e ?f ?g ?h ?i ?j ?k ?l ?m ?n ?o ?p ?q ?r ?s ?t ?u ?v ?w ?x ?y ?z
?A ?B ?C ?D ?E ?F ?G ?H ?I ?J ?K ?L ?M ?N ?O ?P ?Q ?R ?S ?T ?U ?V ?W ?X ?Y ?Z
?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9
?- ?_ ?. ?! ?~ ?* ?' ?\( ?\))
"A list of characters that are _NOT_ reserved in the URL spec.
This is taken from RFC 2396."))
(mh-defun-compat url-hexify-string (str)
"Escape characters in a string.
This is a copy of the function of the same name from url-util.el
in Emacs 22; needed by Emacs 21."
(mapconcat
(lambda (char)
;; Fixme: use a char table instead.
(if (not (memq char url-unreserved-chars))
(if (> char 255)
(error "Hexifying multibyte character %s" str)
(format "%%%02X" char))
(char-to-string char)))
str ""))
(defun mh-x-image-get-download-state (file)
"Check the state of FILE by following any symbolic links."
(unless (file-exists-p mh-x-image-cache-directory)

View file

@ -92,7 +92,7 @@ Each element looks like (SERVER-REGEXP . CHANNEL-LIST)."
(defcustom rcirc-fill-column nil
"*Column beyond which automatic line-wrapping should happen.
If nil, use value of `fill-column'. If frame-width, use the
If nil, use value of `fill-column'. If 'frame-width, use the
maximum frame width."
:type '(choice (const :tag "Value of `fill-column'")
(const :tag "Full frame width" frame-width)
@ -128,7 +128,7 @@ Used as the first arg to `format-time-string'."
:group 'rcirc)
(defcustom rcirc-read-only-flag t
"*Non-nil means make text in irc buffers read-only."
"*Non-nil means make text in IRC buffers read-only."
:type 'boolean
:group 'rcirc)
@ -167,7 +167,7 @@ See also `rcirc-authinfo-file-name'."
:group 'rcirc)
(defcustom rcirc-prompt "> "
"Prompt string to use in irc buffers.
"Prompt string to use in IRC buffers.
The following replacements are made:
%n is your nick.
@ -354,7 +354,7 @@ last ping."
"If non-nil, write information to `rcirc-debug-buffer'.")
(defun rcirc-debug (process text)
"Add an entry to the debug log including PROCESS and TEXT.
Debug text is written to `rcirc-debug-buffer' if `rcirc-debug-p'
Debug text is written to `rcirc-debug-buffer' if `rcirc-debug-flag'
is non-nil."
(when rcirc-debug-flag
(save-excursion
@ -401,8 +401,8 @@ Functions are called with PROCESS and SENTINEL arguments.")
ps))
(defvar rcirc-receive-message-hooks nil
"Hook functions run when a message is recieved from server.
Function is called with PROCESS COMMAND SENDER ARGS and LINE.")
"Hook functions run when a message is received from server.
Function is called with PROCESS, COMMAND, SENDER, ARGS and LINE.")
(defun rcirc-filter (process output)
"Called when PROCESS receives OUTPUT."
(rcirc-debug process output)
@ -587,7 +587,7 @@ If buffer is nil, return the target of the current buffer."
(define-key global-map (kbd "C-c C-SPC") 'rcirc-next-active-buffer)
(defvar rcirc-browse-url-map (make-sparse-keymap)
"Keymap used ror browsing URLs in `rcirc-mode'.")
"Keymap used for browsing URLs in `rcirc-mode'.")
(define-key rcirc-browse-url-map (kbd "RET") 'rcirc-browse-url-at-point)
(define-key rcirc-browse-url-map (kbd "<mouse-2>") 'rcirc-browse-url-at-mouse)
@ -599,7 +599,7 @@ If buffer is nil, return the target of the current buffer."
"Hook run when setting up rcirc buffer.")
(defun rcirc-mode (process target)
"Major mode for irc channel buffers.
"Major mode for IRC channel buffers.
\\{rcirc-mode-map}"
(kill-all-local-variables)
@ -722,7 +722,7 @@ If ALL is non-nil, update prompts in all IRC buffers."
(defun rcirc-generate-new-buffer-name (process target)
"Return a buffer name based on PROCESS and TARGET.
This is used for the initial name given to irc buffers."
This is used for the initial name given to IRC buffers."
(if target
(concat target "@" (process-name process))
(concat "*" (process-name process) "*")))
@ -985,7 +985,7 @@ record activity."
1)) ; [
(t 3)) ; ***
1)
? )))
?\s)))
(fill-column (cond ((eq rcirc-fill-column 'frame-width)
(1- (frame-width)))
(rcirc-fill-column
@ -1046,7 +1046,7 @@ record activity."
process sender response target text)))))
(defun rcirc-startup-channels (server)
"Return the list of startup channels for server."
"Return the list of startup channels for SERVER."
(let (channels)
(dolist (i rcirc-startup-channels-alist)
(if (string-match (car i) server)
@ -1127,8 +1127,8 @@ record activity."
(sort nicks (lambda (x y) (time-less-p (cdr y) (cdr x))))))))
(defun rcirc-ignore-update-automatic (nick)
"Remove NICK from `rcirc-ignore-list'
if NICK is also on `rcirc-ignore-list-automatic'."
"Remove NICK from `rcirc-ignore-list'
if NICK is also on `rcirc-ignore-list-automatic'."
(when (member nick rcirc-ignore-list-automatic)
(setq rcirc-ignore-list-automatic
(delete nick rcirc-ignore-list-automatic)
@ -1486,10 +1486,10 @@ With a prefix arg, prompt for new topic."
"Manage the ignore list.
Ignore NICK, unignore NICK if already ignored, or list ignored
nicks when no NICK is given. When listing ignored nicks, the
ones added to the list automatically are marked with an asterix."
ones added to the list automatically are marked with an asterisk."
(interactive "sToggle ignoring of nick: ")
(if (string= "" nick)
(rcirc-print process (rcirc-nick process) "NOTICE" target
(rcirc-print process (rcirc-nick process) "NOTICE" target
(mapconcat
(lambda (nick)
(concat nick
@ -1511,19 +1511,19 @@ ones added to the list automatically are marked with an asterix."
(propertize (or string "") 'face face 'rear-nonsticky t))
(defvar rcirc-url-regexp
(rx word-boundary
(rx word-boundary
(or "www."
(and (or "http" "https" "ftp" "file" "gopher" "news" "telnet" "wais"
(and (or "http" "https" "ftp" "file" "gopher" "news" "telnet" "wais"
"mailto")
"://"
(1+ (char "a-zA-Z0-9_."))
(optional ":" (1+ (char "0-9")))))
(1+ (char "-a-zA-Z0-9_=!?#$\@~`%&*+|\\/:;.,"))
(char "-a-zA-Z0-9_=!?#$\@~`%&*+|\\/:;"))
"Regexp matching URL's. Set to nil to disable URL features in rcirc.")
"Regexp matching URLs. Set to nil to disable URL features in rcirc.")
(defun rcirc-browse-url (&optional arg)
"Prompt for url to browse based on urls in buffer."
"Prompt for URL to browse based on URLs in buffer."
(interactive)
(let ((completions (mapcar (lambda (x) (cons x nil)) rcirc-urls))
(initial-input (car rcirc-urls))
@ -1559,13 +1559,13 @@ FUNCTION takes 3 arguments, MATCH-START, MATCH-END, and STRING."
"Return TEXT with properties added based on various patterns."
;; ^B
(setq text
(rcirc-map-regexp
(rcirc-map-regexp
(lambda (start end string)
(let ((orig-face (get-text-property start 'face string)))
(add-text-properties
start end
(list 'face (if (listp orig-face)
(append orig-face
(append orig-face
(list 'bold))
(list orig-face 'bold))
'rear-nonsticky t)
@ -1573,7 +1573,7 @@ FUNCTION takes 3 arguments, MATCH-START, MATCH-END, and STRING."
".*?"
text))
;; TODO: deal with ^_ and ^C colors sequences
(while (string-match "\\(.*\\)[]\\(.*\\)" text)
(while (string-match "\\(.*\\)[]\\(.*\\)" text)
(setq text (concat (match-string 1 text)
(match-string 2 text))))
;; my nick
@ -1596,7 +1596,7 @@ FUNCTION takes 3 arguments, MATCH-START, MATCH-END, and STRING."
(let ((orig-face (get-text-property start 'face string)))
(add-text-properties start end
(list 'face (if (listp orig-face)
(append orig-face
(append orig-face
(list 'bold))
(list orig-face 'bold))
'rear-nonsticky t
@ -1991,7 +1991,7 @@ Passwords are read from `rcirc-authinfo-file-name' (which see)."
'((((min-colors 88) (background dark)) (:foreground "cyan1"))
(((background dark)) (:foreground "cyan"))
(t (:foreground "dark blue")))
"The face to use to highlight prompts."
"The face used to highlight prompts."
:group 'rcirc-faces)
(defface rcirc-mode-line-nick

View file

@ -6766,13 +6766,14 @@ If `tramp-discard-garbage' is nil, just erase buffer."
"Convert file-attributes ATTR generated by perl script or ls.
Convert file mode bits to string and set virtual device number.
Return ATTR."
;; Convert file mode bits to string.
(unless (stringp (nth 8 attr))
;; Convert file mode bits to string.
(setcar (nthcdr 8 attr) (tramp-file-mode-from-int (nth 8 attr))))
;; Set file's gid change bit.
(setcar (nthcdr 9 attr)
(not (= (nth 3 attr)
(tramp-get-remote-gid multi-method method user host))))
;; Set file's gid change bit. Possible only when id-format is 'integer.
(when (numberp (nth 3 attr))
(setcar (nthcdr 9 attr)
(not (= (nth 3 attr)
(tramp-get-remote-gid multi-method method user host)))))
;; Set virtual device number.
(setcar (nthcdr 11 attr)
(tramp-get-device multi-method method user host))

View file

@ -973,7 +973,8 @@ the matching is case-sensitive."
(defun multi-occur (bufs regexp &optional nlines)
"Show all lines in buffers BUFS containing a match for REGEXP.
This function acts on multiple buffers; otherwise, it is exactly like
`occur'."
`occur'. When you invoke this command interactively, you must specify
the buffer names that you want, one by one."
(interactive
(cons
(let* ((bufs (list (read-buffer "First buffer to search: "
@ -993,15 +994,19 @@ This function acts on multiple buffers; otherwise, it is exactly like
(occur-read-primary-args)))
(occur-1 regexp nlines bufs))
(defun multi-occur-by-filename-regexp (bufregexp regexp &optional nlines)
"Show all lines matching REGEXP in buffers named by BUFREGEXP.
(defun multi-occur-in-matching-buffers (bufregexp regexp &optional allbufs)
"Show all lines matching REGEXP in buffers specified by BUFREGEXP.
Normally BUFREGEXP matches against each buffer's visited file name,
but if you specify a prefix argument, it matches against the buffer name.
See also `multi-occur'."
(interactive
(cons
(let* ((default (car regexp-history))
(input
(read-from-minibuffer
"List lines in buffers whose filename matches regexp: "
(if current-prefix-arg
"List lines in buffers whose names match regexp: "
"List lines in buffers whose filenames match regexp: ")
nil
nil
nil
@ -1011,12 +1016,15 @@ See also `multi-occur'."
input))
(occur-read-primary-args)))
(when bufregexp
(occur-1 regexp nlines
(occur-1 regexp nil
(delq nil
(mapcar (lambda (buf)
(when (and (buffer-file-name buf)
(string-match bufregexp
(buffer-file-name buf)))
(when (if allbufs
(string-match bufregexp
(buffer-name buf))
(and (buffer-file-name buf)
(string-match bufregexp
(buffer-file-name buf))))
buf))
(buffer-list))))))

View file

@ -1,6 +1,6 @@
;;; savehist.el --- Save minibuffer history.
;; Copyright (C) 1997,2005 Free Software Foundation
;; Copyright (C) 1997, 2005 Free Software Foundation
;; Author: Hrvoje Niksic <hniksic@xemacs.org>
;; Keywords: minibuffer
@ -171,7 +171,7 @@ buffer text.")
(defvar savehist-loaded nil
"Whether the history has already been loaded.
This prevents toggling savehist-mode from destroying existing
This prevents toggling `savehist-mode' from destroying existing
minibuffer history.")
(when (featurep 'xemacs)
@ -226,9 +226,9 @@ which is probably undesirable."
Don't call this from new code, use (savehist-mode 1) instead.
This function loads the variables stored in `savehist-file' and turns on
savehist-mode. If savehist-file is in the old format that doesn't record
the value of `savehist-minibuffer-history-variables', that value is
deducted from the contents of the file."
`savehist-mode'. If `savehist-file' is in the old format that doesn't
record the value of `savehist-minibuffer-history-variables', that value
is deducted from the contents of the file."
(savehist-mode 1)
;; Old versions of savehist distributed with XEmacs didn't save
;; savehist-minibuffer-history-variables. If that variable is nil
@ -250,8 +250,8 @@ deducted from the contents of the file."
(defun savehist-install ()
"Hook savehist into Emacs.
Normally invoked by calling `savehist-mode' to set the minor mode.
Installs `savehist-autosave' in `kill-emacs-hook' and on a timer. To
undo this, call `savehist-uninstall'."
Installs `savehist-autosave' in `kill-emacs-hook' and on a timer.
To undo this, call `savehist-uninstall'."
(add-hook 'minibuffer-setup-hook 'savehist-minibuffer-hook)
(add-hook 'kill-emacs-hook 'savehist-autosave)
;; Install an invocation of savehist-autosave on a timer. This
@ -333,14 +333,14 @@ If AUTO-SAVE is non-nil, compare the saved contents to the one last saved,
(defun savehist-autosave ()
"Save the minibuffer history if it has been modified since the last save.
Does nothing if savehist-mode is off."
Does nothing if `savehist-mode' is off."
(when savehist-mode
(savehist-save t)))
(defun savehist-trim-history (value)
"Retain only the first history-length items in VALUE.
"Retain only the first `history-length' items in VALUE.
Only used under XEmacs, which doesn't (yet) implement automatic
trimming of history lists to history-length items."
trimming of history lists to `history-length' items."
(if (and (featurep 'xemacs)
(natnump history-length)
(> (length value) history-length))

View file

@ -3735,7 +3735,7 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t."
;; Move to beginning-of-line, ignoring fields and invisibles.
(skip-chars-backward "^\n")
(while (and (not (bobp)) (line-move-invisible-p (1- (point))))
(goto-char (previous-char-property-change (1- (point))))
(goto-char (previous-char-property-change (point)))
(skip-chars-backward "^\n"))
;; Take care of fields.

View file

@ -188,62 +188,62 @@ If PARSE-NS is non-nil, then QNAMES are expanded."
(defvar xml-att-def-re)
(let* ((start-chars (concat "[:alpha:]:_"))
(name-chars (concat "-[:digit:]." start-chars))
;;[3] S ::= (#x20 | #x9 | #xD | #xA)+
;;[3] S ::= (#x20 | #x9 | #xD | #xA)+
(whitespace "[ \t\n\r]"))
;;[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6]
;; | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF]
;; | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF]
;; | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
;;[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6]
;; | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF]
;; | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF]
;; | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
(defvar xml-name-start-char-re (concat "[" start-chars "]"))
;;[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
;;[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
(defvar xml-name-char-re (concat "[" name-chars "]"))
;;[5] Name ::= NameStartChar (NameChar)*
;;[5] Name ::= NameStartChar (NameChar)*
(defvar xml-name-re (concat xml-name-start-char-re xml-name-char-re "*"))
;;[6] Names ::= Name (#x20 Name)*
;;[6] Names ::= Name (#x20 Name)*
(defvar xml-names-re (concat xml-name-re "\\(?: " xml-name-re "\\)*"))
;;[7] Nmtoken ::= (NameChar)+
;;[7] Nmtoken ::= (NameChar)+
(defvar xml-nmtoken-re (concat xml-name-char-re "+"))
;;[8] Nmtokens ::= Nmtoken (#x20 Nmtoken)*
;;[8] Nmtokens ::= Nmtoken (#x20 Nmtoken)*
(defvar xml-nmtokens-re (concat xml-nmtoken-re "\\(?: " xml-name-re "\\)*"))
;;[66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';'
;;[66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';'
(defvar xml-char-ref-re "\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)")
;;[68] EntityRef ::= '&' Name ';'
;;[68] EntityRef ::= '&' Name ';'
(defvar xml-entity-ref (concat "&" xml-name-re ";"))
;;[69] PEReference ::= '%' Name ';'
;;[69] PEReference ::= '%' Name ';'
(defvar xml-pe-reference-re (concat "%" xml-name-re ";"))
;;[67] Reference ::= EntityRef | CharRef
;;[67] Reference ::= EntityRef | CharRef
(defvar xml-reference-re (concat "\\(?:" xml-entity-ref "\\|" xml-char-ref-re "\\)"))
;;[10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'"
;;[10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'"
(defvar xml-att-value-re (concat "\\(?:\"\\(?:[^&\"]\\|" xml-reference-re "\\)*\"\\|"
"'\\(?:[^&']\\|" xml-reference-re "\\)*'\\)"))
;;[56] TokenizedType ::= 'ID' [VC: ID] [VC: One ID per Element Type] [VC: ID Attribute Default]
;; | 'IDREF' [VC: IDREF]
;; | 'IDREFS' [VC: IDREF]
;; | 'ENTITY' [VC: Entity Name]
;; | 'ENTITIES' [VC: Entity Name]
;; | 'NMTOKEN' [VC: Name Token]
;; | 'NMTOKENS' [VC: Name Token]
;;[56] TokenizedType ::= 'ID' [VC: ID] [VC: One ID per Element Type] [VC: ID Attribute Default]
;; | 'IDREF' [VC: IDREF]
;; | 'IDREFS' [VC: IDREF]
;; | 'ENTITY' [VC: Entity Name]
;; | 'ENTITIES' [VC: Entity Name]
;; | 'NMTOKEN' [VC: Name Token]
;; | 'NMTOKENS' [VC: Name Token]
(defvar xml-tokenized-type-re "\\(?:ID\\|IDREF\\|IDREFS\\|ENTITY\\|ENTITIES\\|NMTOKEN\\|NMTOKENS\\)")
;;[58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')'
;;[58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')'
(defvar xml-notation-type-re (concat "\\(?:NOTATION" whitespace "(" whitespace "*" xml-name-re
"\\(?:" whitespace "*|" whitespace "*" xml-name-re "\\)*" whitespace "*)\\)"))
;;[59] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')' [VC: Enumeration] [VC: No Duplicate Tokens]
;;[59] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')' [VC: Enumeration] [VC: No Duplicate Tokens]
(defvar xml-enumeration-re (concat "\\(?:(" whitespace "*" xml-nmtoken-re
"\\(?:" whitespace "*|" whitespace "*" xml-nmtoken-re "\\)*"
whitespace ")\\)"))
;;[57] EnumeratedType ::= NotationType | Enumeration
;;[57] EnumeratedType ::= NotationType | Enumeration
(defvar xml-enumerated-type-re (concat "\\(?:" xml-notation-type-re "\\|" xml-enumeration-re "\\)"))
;;[54] AttType ::= StringType | TokenizedType | EnumeratedType
;;[55] StringType ::= 'CDATA'
;;[54] AttType ::= StringType | TokenizedType | EnumeratedType
;;[55] StringType ::= 'CDATA'
(defvar xml-att-type-re (concat "\\(?:CDATA\\|" xml-tokenized-type-re "\\|" xml-notation-type-re"\\|" xml-enumerated-type-re "\\)"))
;;[60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue)
;;[60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue)
(defvar xml-default-decl-re (concat "\\(?:#REQUIRED\\|#IMPLIED\\|\\(?:#FIXED" whitespace "\\)*" xml-att-value-re "\\)"))
;;[53] AttDef ::= S Name S AttType S DefaultDecl
;;[53] AttDef ::= S Name S AttType S DefaultDecl
(defvar xml-att-def-re (concat "\\(?:" whitespace "*" xml-name-re
whitespace "*" xml-att-type-re
whitespace "*" xml-default-decl-re "\\)"))
;;[9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"'
;; | "'" ([^%&'] | PEReference | Reference)* "'"
;;[9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"'
;; | "'" ([^%&'] | PEReference | Reference)* "'"
(defvar xml-entity-value-re (concat "\\(?:\"\\(?:[^%&\"]\\|" xml-pe-reference-re
"\\|" xml-reference-re "\\)*\"\\|'\\(?:[^%&']\\|"
xml-pe-reference-re "\\|" xml-reference-re "\\)*'\\)")))
@ -269,7 +269,7 @@ If PARSE-NS is non-nil, then QNAMES are expanded."
;; Get space syntax correct per XML [3].
(dotimes (c 31)
(modify-syntax-entry c "." table)) ; all are space in standard table
(dolist (c '(?\t ?\n ?\r)) ; these should be space
(dolist (c '(?\t ?\n ?\r)) ; these should be space
(modify-syntax-entry c " " table))
;; For skipping attributes.
(modify-syntax-entry ?\" "\"" table)
@ -306,16 +306,16 @@ is not well-formed XML.
If PARSE-DTD is non-nil, the DTD is parsed rather than skipped,
and returned as the first element of the list.
If PARSE-NS is non-nil, then QNAMES are expanded."
(save-restriction
(narrow-to-region beg end)
;; Use fixed syntax table to ensure regexp char classes and syntax
;; specs DTRT.
(with-syntax-table (standard-syntax-table)
(let ((case-fold-search nil) ; XML is case-sensitive.
xml result dtd)
(save-excursion
(if buffer
(set-buffer buffer))
;; Use fixed syntax table to ensure regexp char classes and syntax
;; specs DTRT.
(with-syntax-table (standard-syntax-table)
(let ((case-fold-search nil) ; XML is case-sensitive.
xml result dtd)
(save-excursion
(if buffer
(set-buffer buffer))
(save-restriction
(narrow-to-region beg end)
(goto-char (point-min))
(while (not (eobp))
(if (search-forward "<" nil t)
@ -390,7 +390,7 @@ Returns one of:
parse-ns
(if parse-ns
(list
;; Default for empty prefix is no namespace
;; Default for empty prefix is no namespace
(cons "" "")
;; "xml" namespace
(cons "xml" "http://www.w3.org/XML/1998/namespace")
@ -431,12 +431,12 @@ Returns one of:
;; Parse this node
(let* ((node-name (match-string 1))
;; Parse the attribute list.
(attrs (xml-parse-attlist xml-ns))
children pos)
;; Parse the attribute list.
(attrs (xml-parse-attlist xml-ns))
children pos)
;; add the xmlns:* attrs to our cache
(when (consp xml-ns)
;; add the xmlns:* attrs to our cache
(when (consp xml-ns)
(dolist (attr attrs)
(when (and (consp (car attr))
(equal "http://www.w3.org/2000/xmlns/"
@ -444,7 +444,7 @@ Returns one of:
(push (cons (cdar attr) (cdr attr))
xml-ns))))
(setq children (list attrs (xml-maybe-do-ns node-name "" xml-ns)))
(setq children (list attrs (xml-maybe-do-ns node-name "" xml-ns)))
;; is this an empty element ?
(if (looking-at "/>")
@ -494,21 +494,21 @@ Returns one of:
(defun xml-parse-string ()
"Parse the next whatever. Could be a string, or an element."
(let* ((pos (point))
(string (progn (if (search-forward "<" nil t)
(forward-char -1)
(goto-char (point-max)))
(buffer-substring pos (point)))))
;; Clean up the string. As per XML specifications, the XML
;; processor should always pass the whole string to the
;; application. But \r's should be replaced:
;; http://www.w3.org/TR/2000/REC-xml-20001006#sec-line-ends
(setq pos 0)
(while (string-match "\r\n?" string pos)
(setq string (replace-match "\n" t t string))
(setq pos (1+ (match-beginning 0))))
(let* ((pos (point))
(string (progn (if (search-forward "<" nil t)
(forward-char -1)
(goto-char (point-max)))
(buffer-substring pos (point)))))
;; Clean up the string. As per XML specifications, the XML
;; processor should always pass the whole string to the
;; application. But \r's should be replaced:
;; http://www.w3.org/TR/2000/REC-xml-20001006#sec-line-ends
(setq pos 0)
(while (string-match "\r\n?" string pos)
(setq string (replace-match "\n" t t string))
(setq pos (1+ (match-beginning 0))))
(xml-substitute-special string)))
(xml-substitute-special string)))
(defun xml-parse-attlist (&optional xml-ns)
"Return the attribute-list after point.
@ -543,8 +543,8 @@ Leave point at the first non-blank character after the tag."
(replace-regexp-in-string "\\s-\\{2,\\}" " " string)
(let ((expansion (xml-substitute-special string)))
(unless (stringp expansion)
; We say this is the constraint. It is acctually that
; external entities nor "<" can be in an attribute value.
; We say this is the constraint. It is acctually that
; external entities nor "<" can be in an attribute value.
(error "XML: (Not Well-Formed) Entities in attributes cannot expand into elements"))
(push (cons name expansion) attlist)))

View file

@ -1,3 +1,116 @@
2006-02-01 Luc Teirlinck <teirllm@auburn.edu>
* frames.texi (Frame Parameters): Remove @item for S-Mouse-1; it
is not inside the @table.
* emacs.texi (Top): Correct node name.
* files.texi (File Names): Fix @xref.
(Reverting): Fix typo.
* mule.texi (International): Correct node name.
* kmacro.texi (Save Keyboard Macro): Add missing @kbd to @table.
2006-02-01 Richard M. Stallman <rms@gnu.org>
* emacs.texi (Top): Update subnode menu.
* mule.texi: Minor clarifications.
Reduce the specific references to X Windows.
Refer to "graphical" terminals, rather than window systems.
(Text Coding): Renamed from Specify Coding.
(Communication Coding, File Name Coding, Terminal Coding):
New nodes split out from Text Coding.
* kmacro.texi: Minor clarifications.
(Keyboard Macro Ring): Comment out some excessive commands.
(Basic Keyboard Macro): Split up the table, putting part in each node.
* major.texi: Minor clarifications.
* misc.texi (Single Shell, Interactive Shell): Fix xrefs.
* windows.texi: Minor clarifications.
(Change Window): Don't describe mode-line mouse cmds here.
Add xref to Mode Line Mouse.
* msdog.texi (Text and Binary, MS-DOS and MULE): Fix xrefs.
* macos.texi (Mac International): Fix xref.
* indent.texi: Minor clarifications.
* frames.texi: Minor clarifications.
Reduce the specific references to X Windows.
Refer to "graphical" terminals, rather than window systems.
(Frame Parameters): Don't mention commands like
set-foreground-color. Just say to customize a face.
(Drag and Drop): Lisp-level stuff moved to Emacs Lisp manual.
* files.texi: Minor clarifications.
(Numbered Backups): New node, split out from Backup Names.
* display.texi (Font Lock): C mode no longer depends on (-in-col-0.
* cmdargs.texi (General Variables): Fix xref.
* buffers.texi: Minor clarifications.
2006-01-31 Romain Francoise <romain@orebokech.com>
* message.texi (Message Headers): Explain what
`message-alternative-emails' does in more detail.
Update copyright year.
2006-01-31 Richard M. Stallman <rms@gnu.org>
* display.texi (Scrolling, Horizontal Scrolling, Follow Mode):
Nodes moved to top.
* display.texi: Minor clarifications.
(Display): Rearrange menu.
(Standard Faces): Mention query-replace face.
(Faces): Simplify.
(Font Lock): Simplify face customization info.
(Highlight Changes): Node merged into Highlight Interactively.
(Highlight Interactively): Much rewriting and cleanup.
(Optional Mode Line): Narrowed line number not good for goto-line.
Simplify face customization advice.
(Text Display): Mention use of escape-glyph face.
Move ctl-arrow and tab-width here.
(Display Custom): Move no-redraw-on-reenter to end of node.
* search.texi: Minor clarifications.
(Isearch Scroll): Simplify.
(Other Repeating Search): Document multi-occur-in-matching-buffers.
* regs.texi (Registers): Mention bookmarks here.
* mark.texi: Minor clarifications.
(Selective Undo): Node deleted.
* m-x.texi: Minor clarifications
* killing.texi: Minor clarifications.
Refer to "graphical" terminals, rather than window systems.
* help.texi: Clarifications.
(Help): Don't describe C-h F and C-h K here.
(Key Help): Describe C-h K here.
(Name Help): Mention Emacs Lisp Intro.
Describe C-h F here.
(Misc Help): Mention C-h F and C-h K only briefly.
* fixit.texi (Undo): New node, mostly copied from basic.texi.
Selective undo text merged in.
(Spelling): Mention Aspell along with Ispell.
* emacs.texi (Top): Update subnode menus.
* basic.texi (Basic Undo): Renamed from Undo. Most of text
moved to new Undo node.
2006-01-30 Juanma Barranquero <lekktu@gmail.com>
* makefile.w32-in (clean): Add newsticker, sieve, pgg, erc and

View file

@ -21,7 +21,7 @@ use the tutorial, run Emacs and type @kbd{Control-h t}
* Moving Point:: How to move the cursor to the place where you want to
change something.
* Erasing:: Deleting and killing text.
* Undo:: Undoing recent changes in the text.
* Basic Undo:: Undoing recent changes in the text.
* Files: Basic Files. Visiting, creating, and saving files.
* Help: Basic Help. Asking what a character does.
* Blank Lines:: Commands to make or delete blank lines.
@ -312,73 +312,33 @@ line, it kills all the text up to the end of the line. If you type
@xref{Killing}, for more flexible ways of killing text.
@node Undo
@node Basic Undo
@section Undoing Changes
@cindex undo
@cindex changes, undoing
You can undo all the recent changes in the buffer text, up to a
certain point. Each buffer records changes individually, and the undo
command always applies to the current buffer. Usually each editing
command makes a separate entry in the undo records, but some commands
such as @code{query-replace} make many entries, and very simple commands
such as self-inserting characters are often grouped to make undoing less
tedious.
Emacs records a list of changes made in the buffer text, so you can
you can undo all the recent changes, as far as the records go.
Usually each editing command makes a separate entry in the undo
records, but sometimes an entry covers just part of a command, and
very simple commands may be grouped.
@table @kbd
@item C-x u
Undo one batch of changes---usually, one command worth (@code{undo}).
Undo one entry of the undo records---usually, one command worth
(@code{undo}).
@item C-_
@itemx C-/
The same.
@end table
@kindex C-x u
@kindex C-_
@kindex C-/
@findex undo
The command @kbd{C-x u} (or @kbd{C-_} or @kbd{C-/}) is how you undo.
The first time you give this command, it undoes the last change.
Point moves back to where it was before the command that made the
change.
Consecutive repetitions of @kbd{C-_} or @kbd{C-x u} undo earlier and
earlier changes, back to the limit of the undo information available.
If all recorded changes have already been undone, the undo command
displays an error message and does nothing.
@findex undo-only
Any command other than an undo command breaks the sequence of undo
commands. Starting from that moment, the previous undo commands become
ordinary changes that you can undo. Thus, to redo changes you have
undone, type @kbd{C-f} or any other command that will harmlessly break
the sequence of undoing, then type more undo commands. On the other
hand, if you want to ignore previous undo commands, use @kbd{M-x
undo-only}. This is like @code{undo}, but will not redo changes
you have just undone.
If you notice that a buffer has been modified accidentally, the
easiest way to recover is to type @kbd{C-_} repeatedly until the stars
disappear from the front of the mode line. At this time, all the
modifications you made have been canceled. Whenever an undo command
makes the stars disappear from the mode line, it means that the buffer
contents are the same as they were when the file was last read in or
saved.
If you do not remember whether you changed the buffer deliberately,
type @kbd{C-_} once. When you see the last change you made undone, you
will see whether it was an intentional change. If it was an accident,
leave it undone. If it was deliberate, redo the change as described
above.
Normal undo applies to the buffer as a whole. You can also
selectively undo changes in any part of the buffer (@pxref{Selective
Undo}).
Some specialized buffers do not record undo information. Buffers
whose names start with spaces never do; these buffers are used
internally by Emacs and its extensions to hold text that users don't
normally look at or edit.
Consecutive repetitions of @kbd{C-x u} (or its aliases) undo earlier
and earlier changes, back to the limit of the undo information
available. If all recorded changes have already been undone, the undo
command displays an error message and does nothing.
The undo command applies only to changes in the buffer; you can't
use it to undo mere cursor motion. However, some cursor motion
@ -386,42 +346,6 @@ commands set the mark, so if you use these commands from time to time,
you can move back to the neighborhoods you have moved through by
popping the mark ring (@pxref{Mark Ring}).
@vindex undo-limit
@vindex undo-strong-limit
@vindex undo-outer-limit
@cindex undo limit
When the undo information for a buffer becomes too large, Emacs
discards the oldest undo information from time to time (during garbage
collection). You can specify how much undo information to keep by
setting three variables: @code{undo-limit}, @code{undo-strong-limit},
and @code{undo-outer-limit}. Their values are expressed in units of
bytes of space.
The variable @code{undo-limit} sets a soft limit: Emacs keeps undo
data for enough commands to reach this size, and perhaps exceed it,
but does not keep data for any earlier commands beyond that. Its
default value is 20000. The variable @code{undo-strong-limit} sets a
stricter limit: a previous command (not the most recent one) which
pushes the size past this amount is itself forgotten. The default
value of @code{undo-strong-limit} is 30000.
Regardless of the values of those variables, the most recent change
is never discarded unless it gets bigger than @code{undo-outer-limit}
(normally 3,000,000). At that point, Emacs discards the undo data and
warns you about it. This is the only situation in which you cannot
undo the last command. If this happens, you can increase the value of
@code{undo-outer-limit} to make it even less likely to happen in the
future. But if you didn't expect the command to create such large
undo data, then it is probably a bug and you should report it.
@xref{Bugs,, Reporting Bugs}.
The reason the @code{undo} command has three key bindings, @kbd{C-x
u}, @kbd{C-_} and @kbd{C-/}, is that it is worthy of a
single-character key, but @kbd{C-x u} is more straightforward for
beginners to type. Meanwhile, @kbd{C--} on a text-only terminal is
really @kbd{C-_}, which makes it a natural and easily typed binding
for undoing.
@node Basic Files
@section Files

View file

@ -87,8 +87,8 @@ selected buffer other than the current buffer.
@findex switch-to-buffer
To select the buffer named @var{bufname}, type @kbd{C-x b @var{bufname}
@key{RET}}. This runs the command @code{switch-to-buffer} with argument
@var{bufname}. You can use completion on an abbreviation for the buffer
name you want (@pxref{Completion}). An empty argument to @kbd{C-x b}
@var{bufname}. You can use completion to enter the buffer
name (@pxref{Completion}). An empty argument to @kbd{C-x b}
specifies the buffer that was current most recently among those not
now displayed in any window.
@ -128,7 +128,7 @@ customizing the variables @code{special-display-buffer-names},
@ref{Special Buffer Frames}, for more about these variables. In
addition, if the value of @code{display-buffer-reuse-frames} is
non-@code{nil}, and the buffer you want to switch to is already
displayed in some frame, Emacs will raise that frame.
displayed in some frame, Emacs will just raise that frame.
Most buffers are created by visiting files, or by Emacs commands that
want to display some text, but you can also create a buffer explicitly
@ -177,10 +177,11 @@ line in the list shows one buffer's name, major mode and visited file.
The buffers are listed in the order that they were current; the
buffers that were current most recently come first.
@samp{*} in the first field of a line indicates the buffer is ``modified.''
If several buffers are modified, it may be time to save some with @kbd{C-x s}
(@pxref{Save Commands}). @samp{%} indicates a read-only buffer. @samp{.} marks the
current buffer. Here is an example of a buffer list:@refill
@samp{*} in the first field of a line indicates the buffer is
``modified.'' If several buffers are modified, it may be time to save
some with @kbd{C-x s} (@pxref{Save Commands}). @samp{%} indicates a
read-only buffer. @samp{.} marks the current buffer. Here is an
example of a buffer list:@refill
@smallexample
CRM Buffer Size Mode File
@ -199,7 +200,7 @@ CRM Buffer Size Mode File
Note that the buffer @samp{*Help*} was made by a help request; it is
not visiting any file. The buffer @code{src} was made by Dired on the
directory @file{~/cvs/emacs/src/}. You can list only buffers that are
visiting files by giving the command a prefix; for instance, by typing
visiting files by giving the command a prefix argument, as in
@kbd{C-u C-x C-b}.
@code{list-buffers} omits buffers whose names begin with a space,
@ -243,10 +244,10 @@ flag, but it also checks the file in or out. @xref{Version
Control}.
@findex rename-buffer
@kbd{M-x rename-buffer} changes the name of the current buffer. Specify
the new name as a minibuffer argument. There is no default. If you
specify a name that is in use for some other buffer, an error happens and
no renaming is done.
@kbd{M-x rename-buffer} changes the name of the current buffer. You
specify the new name as a minibuffer argument; there is no default.
If you specify a name that is in use for some other buffer, an error
happens and no renaming is done.
@findex rename-uniquely
@kbd{M-x rename-uniquely} renames the current buffer to a similar
@ -274,7 +275,7 @@ your perusal remain in effect.
The commands @kbd{M-x append-to-buffer} and @kbd{M-x insert-buffer}
can be used to copy text from one buffer to another. @xref{Accumulating
Text}.@refill
Text}.
@node Kill Buffer
@section Killing Buffers
@ -470,17 +471,15 @@ you run @code{list-buffers} (that is, type @kbd{C-x C-b}) and select
the buffer list manually, you can use all of the commands described
here.
Normally, the buffer @samp{*Buffer List*} is not updated automatically when
buffers are created and killed; its contents are just text. If you have
created, deleted or renamed buffers, the way to update @samp{*Buffer
List*} to show what you have done is to type @kbd{g}
(@code{revert-buffer}) or repeat the @code{buffer-menu} command.
The @samp{*Buffer List*} buffer does automatically update every
@code{auto-revert-interval} seconds if you enable Auto Revert mode in
it. (As long as it is not marked modified.) Global Auto Revert mode
does not update the @samp{*Buffer List*} buffer by default, but it
does if @code{global-auto-revert-non-file-buffers} is non-@code{nil}.
Normally, the buffer @samp{*Buffer List*} is not updated
automatically when buffers are created and killed; its contents are
just text. If you have created, deleted or renamed buffers, the way
to update @samp{*Buffer List*} to show what you have done is to type
@kbd{g} (@code{revert-buffer}). You can make this happen regularly
every @code{auto-revert-interval} seconds if you enable Auto Revert
mode in this buffer, as long as it is not marked modified. Global
Auto Revert mode applies to the @samp{*Buffer List*} buffer only if
@code{global-auto-revert-non-file-buffers} is non-@code{nil}.
@inforef{Autorevert,, emacs-xtra}, for details.
The command @code{buffer-menu-other-window} works the same as
@ -589,7 +588,7 @@ forward order after the file name, as in @samp{file|top/middle}.
name is not very important if you are going to @emph{look} at the
buffer names before you type one. But as an experienced user, if you
know the rule, you won't have to look. And then you may find that one
rule or another is easier for you to remember and utilize fast.
rule or another is easier for you to remember and apply quickly.
@node Iswitchb
@subsection Switching Between Buffers using Substrings

View file

@ -577,8 +577,7 @@ does not use @env{TZ} at all.
The user's login name. See also @env{LOGNAME}. On MS-DOS, this
defaults to @samp{root}.
@item VERSION_CONTROL
Used to initialize the @code{version-control} variable (@pxref{Backup
Names}).
Used to initialize the @code{version-control} variable (@pxref{Numbered Backups}).
@end table
@node Misc Variables

File diff suppressed because it is too large Load diff

View file

@ -235,7 +235,7 @@ Basic Editing Commands
* Moving Point:: How to move the cursor to the place where you want to
change something.
* Erasing:: Deleting and killing text.
* Undo:: Undoing recent changes in the text.
* Basic Undo:: Undoing recent changes in the text.
* Basic Files:: Visiting, creating, and saving files.
* Basic Help:: Asking what a character does.
* Blank Lines:: Commands to make or delete blank lines.
@ -272,7 +272,6 @@ The Mark and the Region
when there is one.
* Momentary Mark:: Enabling Transient Mark mode momentarily.
* Using Region:: Summary of ways to operate on contents of the region.
* Selective Undo:: Undoing within a given region.
* Marking Objects:: Commands to put region around textual units.
* Mark Ring:: Previous mark positions saved so you can go back there.
* Global Mark Ring:: Previous mark positions in various buffers.
@ -307,16 +306,15 @@ Registers
Controlling the Display
* Scrolling:: Moving text up and down in a window.
* Horizontal Scrolling:: Moving text left and right in a window.
* Follow Mode:: Follow mode lets two windows scroll as one.
* Faces:: How to change the display style using faces.
* Standard Faces:: Emacs' predefined faces.
* Font Lock:: Minor mode for syntactic highlighting using faces.
* Highlight Interactively:: Tell Emacs what text to highlight.
* Highlight Changes:: Using colors to show where you changed the buffer.
* Scrolling:: Moving text up and down in a window.
* Horizontal Scrolling:: Moving text left and right in a window.
* Fringes:: Enabling or disabling window fringes.
* Useless Whitespace:: Showing possibly-spurious trailing whitespace.
* Follow Mode:: Follow mode lets two windows scroll as one.
* Selective Display:: Hiding lines with lots of indentation.
* Optional Mode Line:: Optional mode line display features.
* Text Display:: How text characters are normally displayed.
@ -343,6 +341,7 @@ Replacement Commands
Commands for Fixing Typos
* Undo:: Full details of Emacs undo commands.
* Kill Errors:: Commands to kill a batch of recently entered text.
* Transpose:: Exchanging two characters, words, lines, lists...
* Fixing Case:: Correcting case of last word entered.
@ -461,7 +460,11 @@ International Character Set Support
* Coding Systems:: Character set conversion when you read and
write files, and so on.
* Recognize Coding:: How Emacs figures out which conversion to use.
* Specify Coding:: Various ways to choose which conversion to use.
* Text Coding:: Choosing conversion to use for file text.
* Communication Coding:: Coding systems for interprocess communication.
* File Name Coding:: Coding systems for file @emph{names}.
* Terminal Coding:: Specifying coding systems for converting
terminal input and output.
* Fontsets:: Fontsets are collections of fonts
that cover the whole spectrum of characters.
* Defining Fontsets:: Defining a new fontset.

View file

@ -68,21 +68,22 @@ a slash, it is interpreted with respect to the default directory. The
default directory is kept in the variable @code{default-directory},
which has a separate value in every buffer.
For example, if the default file name is @file{/u/rms/gnu/gnu.tasks} then
the default directory is @file{/u/rms/gnu/}. If you type just @samp{foo},
which does not specify a directory, it is short for @file{/u/rms/gnu/foo}.
@samp{../.login} would stand for @file{/u/rms/.login}. @samp{new/foo}
would stand for the file name @file{/u/rms/gnu/new/foo}.
@findex cd
@findex pwd
The command @kbd{M-x pwd} displays the current buffer's default
directory, and the command @kbd{M-x cd} sets it (to a value read using
the minibuffer). A buffer's default directory changes only when the
@code{cd} command is used. A file-visiting buffer's default directory
is initialized to the directory of the file that is visited in that buffer. If
you create a buffer with @kbd{C-x b}, its default directory is copied
from that of the buffer that was current at the time.
is initialized to the directory of the file it visits. If you create
a buffer with @kbd{C-x b}, its default directory is copied from that
of the buffer that was current at the time.
For example, if the default file name is @file{/u/rms/gnu/gnu.tasks}
then the default directory is normally @file{/u/rms/gnu/}. If you
type just @samp{foo}, which does not specify a directory, it is short
for @file{/u/rms/gnu/foo}. @samp{../.login} would stand for
@file{/u/rms/.login}. @samp{new/foo} would stand for the file name
@file{/u/rms/gnu/new/foo}.
@vindex insert-default-directory
The default directory actually appears in the minibuffer when the
@ -102,6 +103,14 @@ with @samp{/usr/tmp/} and you add @samp{/x1/rms/foo}, you get
first slash in the double slash; the result is @samp{/x1/rms/foo}.
@xref{Minibuffer File}.
@cindex home directory shorthand
You can use @file{~/} in a file name to mean your home directory,
or @file{~@var{user-id}/} to mean the home directory of a user whose
login name is @code{user-id}. (On DOS and Windows systems, where a user
doesn't have a home directory, Emacs substitutes @file{~/} with the
value of the environment variable @code{HOME}; see @ref{General
Variables}.)
@cindex environment variables in file names
@cindex expansion of environment variables
@cindex @code{$} in file names
@ -120,14 +129,6 @@ is not defined).
Note that shell commands to set environment variables affect Emacs
only when done before Emacs is started.
@cindex home directory shorthand
You can use @file{~/} in a file name to mean your home directory,
or @file{~@var{user-id}/} to mean the home directory of a user whose
login name is @code{user-id}. (On DOS and Windows systems, where a user
doesn't have a home directory, Emacs substitutes @file{~/} with the
value of the environment variable @code{HOME}; see @ref{General
Variables}.)
To access a file with @samp{$} in its name, if the @samp{$} causes
expansion, type @samp{$$}. This pair is converted to a single
@samp{$} at the same time as variable substitution is performed for a
@ -136,13 +137,13 @@ single @samp{$}. Alternatively, quote the whole file name with
literal @samp{~} should also be quoted with @samp{/:}.
@findex substitute-in-file-name
The Lisp function that performs the substitution is called
The Lisp function that performs the @samp{$}-substitution is called
@code{substitute-in-file-name}. The substitution is performed only on
file names read as such using the minibuffer.
You can include non-@acronym{ASCII} characters in file names if you set the
variable @code{file-name-coding-system} to a non-@code{nil} value.
@xref{Specify Coding}.
@xref{File Name Coding}.
@node Visiting
@section Visiting Files
@ -185,7 +186,7 @@ in that window, so you can always tell what buffer you are editing.
The changes you make with editing commands are made in the Emacs
buffer. They do not take effect in the file that you visited, or any
place permanent, until you @dfn{save} the buffer. Saving the buffer
permanent place, until you @dfn{save} the buffer. Saving the buffer
means that Emacs writes the current contents of the buffer into its
visited file. @xref{Saving}.
@ -208,17 +209,17 @@ While in the minibuffer, you can abort @kbd{C-x C-f} by typing
@kbd{C-g}. File-name completion ignores certain filenames; for more
about this, see @ref{Completion Options}.
Your confirmation that @kbd{C-x C-f} has completed successfully is the
appearance of new text on the screen and a new buffer name in the mode
line. If the specified file does not exist and could not be created, or
cannot be read, then you get an error, with an error message displayed
in the echo area.
Your confirmation that @kbd{C-x C-f} has completed successfully is
the appearance of new text on the screen and a new buffer name in the
mode line. If the specified file does not exist and you could not
create it, or exists but you can't read it, then you get an error,
with an error message displayed in the echo area.
If you visit a file that is already in Emacs, @kbd{C-x C-f} does not make
another copy. It selects the existing buffer containing that file.
However, before doing so, it checks that the file itself has not changed
since you visited or saved it last. If the file has changed, a warning
message is shown. @xref{Interlocking,,Simultaneous Editing}.
However, before doing so, it checks whether the file itself has changed
since you visited or saved it last. If the file has changed, Emacs offers
to reread it.
@vindex large-file-warning-threshold
@cindex maximum buffer size exceeded, error message
@ -232,7 +233,7 @@ buffer size, which is around 256 megabytes on 32-bit machines
saying that the maximum buffer size has been exceeded.
@cindex file selection dialog
On graphical terminals, there are two additional methods for
On graphical displays there are two additional methods for
visiting files. Firstly, when Emacs is built with a suitable GUI
toolkit, commands invoked with the mouse (by clicking on the menu bar
or tool bar) use the toolkit's standard File Selection dialog instead
@ -313,9 +314,6 @@ buffer (after first offering to save it if it is modified). When
default file name in the buffer, with point just after the directory
part; this is convenient if you made a slight error in typing the name.
If you find a file which exists but cannot be read, @kbd{C-x C-f}
signals an error.
@kindex C-x 4 f
@findex find-file-other-window
@kbd{C-x 4 f} (@code{find-file-other-window}) is like @kbd{C-x C-f}
@ -392,7 +390,7 @@ Save any or all buffers in their visited files (@code{save-some-buffers}).
Forget that the current buffer has been changed (@code{not-modified}).
With prefix argument (@kbd{C-u}), mark the current buffer as changed.
@item C-x C-w
Save the current buffer as a specified file name (@code{write-file}).
Save the current buffer with a specified file name (@code{write-file}).
@item M-x set-visited-file-name
Change the file name under which the current buffer will be saved.
@end table
@ -464,9 +462,9 @@ saved. (@samp{~} is often used as a mathematical symbol for `not'; thus
a different file name, one which is not in use for anything important.
Alternatively, you can cancel all the changes made since the file was
visited or saved, by reading the text from the file again. This is
called @dfn{reverting}. @xref{Reverting}. You could also undo all the
called @dfn{reverting}. @xref{Reverting}. (You could also undo all the
changes by repeating the undo command @kbd{C-x u} until you have undone
all the changes; but reverting is easier.
all the changes; but reverting is easier.) You can also kill the buffer.
@findex set-visited-file-name
@kbd{M-x set-visited-file-name} alters the name of the file that the
@ -522,6 +520,9 @@ to make backup files. By default it is @code{nil}, since backup files
are redundant when you store all the previous versions in a version
control system. @xref{General VC Options}.
At your option, Emacs can keep either a single backup for each file,
or make a series of numbered backup files for each file that you edit.
@vindex backup-enable-predicate
@vindex temporary-file-directory
@vindex small-temporary-file-directory
@ -530,9 +531,6 @@ prevents backup files being written for files in the directories used
for temporary files, specified by @code{temporary-file-directory} or
@code{small-temporary-file-directory}.
At your option, Emacs can keep either a single backup file or a series of
numbered backup files for each file that you edit.
Emacs makes a backup for a file only the first time the file is saved
from one buffer. No matter how many times you save a file, its backup file
continues to contain the contents from before the file was visited.
@ -550,19 +548,54 @@ backup from the previous contents, and arranges to make another from the
newly saved contents if you save again.
@menu
* Names: Backup Names. How backup files are named;
choosing single or numbered backup files.
* One or Many: Numbered Backups. Whether to make one backup file or many.
* Names: Backup Names. How backup files are named.
* Deletion: Backup Deletion. Emacs deletes excess numbered backups.
* Copying: Backup Copying. Backups can be made by copying or renaming.
@end menu
@node Numbered Backups
@subsubsection Numbered Backups
@vindex version-control
The choice of single backup file or multiple numbered backup files
is controlled by the variable @code{version-control}. Its possible
values are:
@table @code
@item t
Make numbered backups.
@item nil
Make numbered backups for files that have numbered backups already.
Otherwise, make single backups.
@item never
Never make numbered backups; always make single backups.
@end table
@noindent
The usual way to set this variable is globally, through your
@file{.emacs} file or the customization buffer. However, you can set
@code{version-control} locally in an individual buffer to control the
making of backups for that buffer's file. For example, Rmail mode
locally sets @code{version-control} to @code{never} to make sure that
there is only one backup for an Rmail file. @xref{Locals}.
@cindex @env{VERSION_CONTROL} environment variable
If you set the environment variable @env{VERSION_CONTROL}, to tell
various GNU utilities what to do with backup files, Emacs also obeys the
environment variable by setting the Lisp variable @code{version-control}
accordingly at startup. If the environment variable's value is @samp{t}
or @samp{numbered}, then @code{version-control} becomes @code{t}; if the
value is @samp{nil} or @samp{existing}, then @code{version-control}
becomes @code{nil}; if it is @samp{never} or @samp{simple}, then
@code{version-control} becomes @code{never}.
@node Backup Names
@subsubsection Single or Numbered Backups
If you choose to have a single backup file (this is the default),
the backup file's name is normally constructed by appending @samp{~} to the
file name being edited; thus, the backup file for @file{eval.c} would
be @file{eval.c~}.
When Emacs makes a single backup file, its name is normally
constructed by appending @samp{~} to the file name being edited; thus,
the backup file for @file{eval.c} would be @file{eval.c~}.
@vindex make-backup-file-name-function
@vindex backup-directory-alist
@ -593,36 +626,6 @@ through names like @file{eval.c.~259~} and beyond. The variable
@code{backup-directory-alist} applies to numbered backups just as
usual.
@vindex version-control
The choice of single backup or numbered backups is controlled by the
variable @code{version-control}. Its possible values are
@table @code
@item t
Make numbered backups.
@item nil
Make numbered backups for files that have numbered backups already.
Otherwise, make single backups.
@item never
Never make numbered backups; always make single backups.
@end table
@noindent
You can set @code{version-control} locally in an individual buffer to
control the making of backups for that buffer's file. For example,
Rmail mode locally sets @code{version-control} to @code{never} to make sure
that there is only one backup for an Rmail file. @xref{Locals}.
@cindex @env{VERSION_CONTROL} environment variable
If you set the environment variable @env{VERSION_CONTROL}, to tell
various GNU utilities what to do with backup files, Emacs also obeys the
environment variable by setting the Lisp variable @code{version-control}
accordingly at startup. If the environment variable's value is @samp{t}
or @samp{numbered}, then @code{version-control} becomes @code{t}; if the
value is @samp{nil} or @samp{existing}, then @code{version-control}
becomes @code{nil}; if it is @samp{never} or @samp{simple}, then
@code{version-control} becomes @code{never}.
@node Backup Deletion
@subsubsection Automatic Deletion of Backups
@ -822,6 +825,7 @@ different name, and use @code{diff} to compare the two files.@refill
@subsection Shadowing Files
@cindex shadow files
@cindex file shadows
@findex shadow-initialize
@table @kbd
@item M-x shadow-initialize
@ -867,7 +871,6 @@ shadow-define-cluster}.
@node Time Stamps
@subsection Updating Time Stamps Automatically
@findex time-stamp
@cindex time stamps
@cindex modification dates
@cindex locale, date format
@ -888,6 +891,7 @@ or like this:
Time-stamp: " "
@end example
@findex time-stamp
Then add the hook function @code{time-stamp} to the hook
@code{before-save-hook}; that hook function will automatically update
the time stamp, inserting the current date and time when you save the
@ -946,24 +950,26 @@ discard your changes.)
You may find it useful to have Emacs revert files automatically when
they change. Three minor modes are available to do this.
@kbd{M-x global-auto-revert-mode} runs Global Auto-Revert mode,
@kbd{M-x global-auto-revert-mode} enables Global Auto-Revert mode,
which periodically checks all file buffers and reverts when the
corresponding file has changed. @kbd{M-x auto-revert-mode} runs a
local version, Auto-Revert mode, which applies only to the buffer in
which it was activated. Auto-Revert mode can be used to ``tail'' a
file, such as a system log, so that changes made to that file by other
programs are continuously displayed. To do this, just move the point
to the end of the buffer, and it will stay there as the file contents
change. However, if you are sure that the file will only change by
growing at the end, you can tail the file more efficiently using
Auto-Revert Tail mode, @kbd{M-x auto-revert-tail-mode}.
corresponding file has changed. @kbd{M-x auto-revert-mode} enables a
local version, Auto-Revert mode, which applies only to the current
buffer.
You can use Auto-Revert mode to ``tail'' a file such as a system
log, so that changes made to that file by other programs are
continuously displayed. To do this, just move the point to the end of
the buffer, and it will stay there as the file contents change.
However, if you are sure that the file will only change by growing at
the end, use Auto-Revert Tail mode instead
(@code{auto-revert-tail-mode}). It is more efficient for this.
@vindex auto-revert-interval
The variable @code{auto-revert-interval} controls how often to check
for a changed file. Since checking a remote file is too slow, these
modes do not check or revert remote files.
@xref{VC Mode Line}, for Auto Revert peculiarities in buffers that
@xref{VC Mode Line}, for Auto Revert peculiarities in buffers that
visit files under version control.
@node Auto Save
@ -977,13 +983,13 @@ your keystrokes) without being asked. This is called @dfn{auto-saving}.
It prevents you from losing more than a limited amount of work if the
system crashes.
When Emacs determines that it is time for auto-saving, each buffer is
considered, and is auto-saved if auto-saving is turned on for it and it
has been changed since the last time it was auto-saved. The message
@samp{Auto-saving...} is displayed in the echo area during auto-saving,
if any files are actually auto-saved. Errors occurring during
auto-saving are caught so that they do not interfere with the execution
of commands you have been typing.
When Emacs determines that it is time for auto-saving, it considers
each buffer, and each is auto-saved if auto-saving is enabled for it
and it has been changed since the last time it was auto-saved. The
message @samp{Auto-saving...} is displayed in the echo area during
auto-saving, if any files are actually auto-saved. Errors occurring
during auto-saving are caught so that they do not interfere with the
execution of commands you have been typing.
@menu
* Files: Auto Save Files. The file where auto-saved changes are
@ -1041,10 +1047,10 @@ saving.
@vindex delete-auto-save-files
A buffer's auto-save file is deleted when you save the buffer in its
visited file. To inhibit this, set the variable @code{delete-auto-save-files}
to @code{nil}. Changing the visited file name with @kbd{C-x C-w} or
@code{set-visited-file-name} renames any auto-save file to go with
the new visited name.
visited file. (You can inhibit this by setting the variable
@code{delete-auto-save-files} to @code{nil}.) Changing the visited
file name with @kbd{C-x C-w} or @code{set-visited-file-name} renames
any auto-save file to go with the new visited name.
@node Auto Save Control
@subsection Controlling Auto-Saving
@ -1284,9 +1290,11 @@ merging, and use of symbolic links and meta-data in repositories.
terms of capabilities, it is the weakest of the six that VC supports.
VC compensates for certain features missing in SCCS (snapshots, for
example) by implementing them itself, but some other VC features, such
as multiple branches, are not available with SCCS. You should use
SCCS only if for some reason you cannot use RCS, or one of the
higher-level systems such as CVS or GNU Arch.
as multiple branches, are not available with SCCS. Since SCCS is
non-free, not respecting its users freedom,d, you should not use it;
use its free replacement CSSC instead. But you should use CSSC only
if for some reason you cannot use RCS, or one of the higher-level
systems such as CVS or GNU Arch.
In the following, we discuss mainly RCS, SCCS and CVS. Nearly
everything said about CVS applies to GNU Arch, Subversion and Meta-CVS
@ -1549,13 +1557,13 @@ Version Control}).
When you check in changes, @kbd{C-x v v} first reads a log entry. It
pops up a buffer called @samp{*VC-Log*} for you to enter the log entry.
Sometimes the @samp{*VC-Log*} buffer contains default text when you enter it,
Sometimes the @samp{*VC-Log*} buffer contains default text when you enter it,
typically the last log message entered. If it does, mark and point
are set around the entire contents of the buffer so that it is easy to
kill the contents of the buffer with @kbd{C-w}.
@findex log-edit-insert-changelog
If you work by writing entries in the @file{ChangeLog}
If you work by writing entries in the @file{ChangeLog}
(@pxref{Change Log}) and then commit the change under revision
control, you can generate the Log Edit text from the ChangeLog using
@kbd{C-c C-a} (@kbd{log-edit-insert-changelog}). This looks for
@ -1565,13 +1573,13 @@ if the top entry was made under your user name on the current date.
@xref{Change Logs and VC}, for the opposite way of
working---generating ChangeLog entries from the revision control log.
In the @samp{*VC-Log*} buffer, @kbd{C-c C-f} (@kbd{M-x log-edit-show-files})
In the @samp{*VC-Log*} buffer, @kbd{C-c C-f} (@kbd{M-x log-edit-show-files})
shows the list of files to be committed in case you need to check
that. (This can be a list of more than one file if you use VC Dired
mode or PCL-CVS. @xref{VC Dired Mode}, and @ref{Top, , About PCL-CVS,
pcl-cvs, PCL-CVS --- The Emacs Front-End to CVS}.)
When you have finished editing the log message, type @kbd{C-c C-c} to
When you have finished editing the log message, type @kbd{C-c C-c} to
exit the buffer and commit the change.
To abort check-in, just @strong{don't} type @kbd{C-c C-c} in that
@ -1665,8 +1673,8 @@ them; they exist only in the records of the master file.
For some backends, you can display the file @dfn{annotated} with
per-line version information and using colors to enhance the visual
appearance, with the command @kbd{M-x vc-annotate}.
It creates a new buffer
to display file's text, colored to show how old each part is. Text
It creates a new buffer (the ``annotate buffer'') displaying the
file's text, with each part colored to show how old it is. Text
colored red is new, blue means old, and intermediate colors indicate
intermediate ages. By default, the time scale is 360 days, so that
everything more than one year old is shown in blue.
@ -1790,8 +1798,8 @@ changes to the current file, including the text of the log entries. The
output appears in a separate window. The point is centered at the
revision of the file that is currently being visited.
From the change log buffer, the following keys are used to move
between the logs of revisions and files, to view past revisions, and
In the change log buffer, you can use the following keys to move
between the logs of revisions and of files, to view past revisions, and
to view diffs:
@table @kbd
@ -2410,14 +2418,16 @@ or a snapshot against a named version.
@cindex named configurations (RCS)
VC's snapshot facilities are modeled on RCS's named-configuration
support. They use RCS's native facilities for this, so under VC
snapshots made using RCS are visible even when you bypass VC.
support. They use RCS's native facilities for this, so
snapshots made using RCS through VC are visible even when you bypass VC.
@c worded verbosely to avoid overfull hbox.
For SCCS, VC implements snapshots itself. The files it uses contain
name/file/version-number triples. These snapshots are visible only
through VC.
@c ??? What about CVS?
A snapshot is a set of checked-in versions. So make sure that all the
files are checked in and not locked when you make a snapshot.
@ -2472,6 +2482,8 @@ most recent entry in the change log file.
This command works with RCS or CVS only, not with SCCS.
@c ??? What about other back ends?
@item C-u C-x v a
As above, but only find entries for the current buffer's file.
@ -2625,6 +2637,8 @@ directly into working files. Certain special strings called
@dfn{version headers} are replaced in each successive version by the
number of that version.
@c ??? How does this relate to CVS?
If you are using RCS, and version headers are present in your working
files, Emacs can use them to determine the current version and the
locking state of the files. This is more reliable than referring to the
@ -2657,7 +2671,7 @@ setting the variables @code{vc-@var{backend}-header} where
each string in the list is inserted as a separate header on a line of
its own.
It is often necessary to use ``superfluous'' backslashes when
It may be necessary to use apparently-superfluous backslashes when
writing the strings that you put in this variable. For instance, you
might write @code{"$Id\$"} rather than @code{"$Id@w{$}"}. The extra
backslash prevents the string constant from being interpreted as a
@ -2899,8 +2913,8 @@ only for repositories from hosts that match the pattern.
listing} is a list of all the files in a directory. Emacs provides
commands to create and delete directories, and to make directory
listings in brief format (file names only) and verbose format (sizes,
dates, and authors included). There is also a directory browser called
Dired; see @ref{Dired}.
dates, and authors included). Emacs also includes a directory browser
feature called Dired; see @ref{Dired}.
@table @kbd
@item C-x C-d @var{dir-or-pattern} @key{RET}
@ -2950,9 +2964,10 @@ default).
@vindex directory-free-space-program
@vindex directory-free-space-args
Emacs adds information about the amount of free space on the disk
that contains the directory. To do this, it runs the program
specified by @code{directory-free-space-program} with arguments
In verbose directory listings, Emacs adds information about the
amount of free space on the disk that contains the directory. To do
this, it runs the program specified by
@code{directory-free-space-program} with arguments
@code{directory-free-space-args}.
@node Comparing Files
@ -2967,19 +2982,26 @@ running the @code{diff} program, using options taken from the variable
@code{diff-switches}. The value of @code{diff-switches} should be a
string; the default is @code{"-c"} to specify a context diff.
@findex diff-goto-source
After running @kbd{M-x diff}, you can use @kbd{C-x `} to visit
successive changed locations in the two source files, as in
Compilation mode (@pxref{Compilation Mode}.) In the @samp{*diff*} buffer,
you can move to a particular hunk of changes and type @kbd{C-c C-c}
(@code{diff-goto-source}) to visit the corresponding source location.
@findex diff-backup
The command @kbd{M-x diff-backup} compares a specified file with its most
recent backup. If you specify the name of a backup file,
@code{diff-backup} compares it with the source file that it is a backup
of.
@findex diff-goto-source
@findex diff-mode
@cindex Diff mode
The @samp{*diff*} buffer uses Diff mode, which enables you to use
@kbd{C-x `} to visit successive changed locations in the two source
files, as in Compilation mode (@pxref{Compilation Mode}.) You can
also move to a particular hunk of changes and type @kbd{C-c C-c}
(@code{diff-goto-source}) to visit the corresponding source location.
@cindex patches
Differences between versions of files are often distributed as
patches, which are the output from the @command{diff} program. You
can use Diff mode to operate on a patch by typing @kbd{M-x diff-mode}.
@findex compare-windows
The command @kbd{M-x compare-windows} compares the text in the
current window with that in the next window. (For more information
@ -2990,10 +3012,10 @@ one character at a time, until it reaches characters that don't match.
Then the command exits.
If point in the two windows is followed by non-matching text when
the command starts, it tries heuristically to advance up to matching
text in the two windows, and then exits. So if you use @kbd{M-x
compare-windows} repeatedly, each time it either skips one matching
range or finds the start of another.
the command starts, @kbd{M-x compare-windows} tries heuristically to
advance up to matching text in the two windows, and then exits. So if
you use @kbd{M-x compare-windows} repeatedly, each time it either
skips one matching range or finds the start of another.
@vindex compare-ignore-case
@vindex compare-ignore-whitespace
@ -3004,16 +3026,6 @@ If the variable @code{compare-ignore-whitespace} is non-@code{nil},
@code{compare-windows} normally ignores changes in whitespace, and a
prefix argument turns that off.
@findex diff-mode
@cindex diffs
@cindex patches
@cindex Diff mode
Differences between versions of files are often distributed as
@dfn{patches}, which are the output from @command{diff} or a version
control system that uses @command{diff}. @kbd{M-x diff-mode} turns on
Diff mode, a major mode for viewing and editing patches, either as
``unified diffs'' or ``context diffs.''
@cindex Smerge mode
@findex smerge-mode
@cindex failed merges
@ -3154,19 +3166,20 @@ mode called Tar mode which provides a Dired-like list of the contents
would in Dired, and visit the subfiles contained in the archive.
However, not all Dired commands are available in Tar mode.
If you enable Auto Compression mode (@pxref{Compressed Files}), then
If Auto Compression mode is enabled (@pxref{Compressed Files}), then
Tar mode is used also for compressed archives---files with extensions
@samp{.tgz}, @code{.tar.Z} and @code{.tar.gz}.
The keys @kbd{e}, @kbd{f} and @key{RET} all extract a component file
into its own buffer. You can edit it there and when you save the buffer
the edited version will replace the version in the Tar buffer. @kbd{v}
extracts a file into a buffer in View mode. @kbd{o} extracts the file
and displays it in another window, so you could edit the file and
operate on the archive simultaneously. @kbd{d} marks a file for
into its own buffer. You can edit it there, and if you save the
buffer, the edited version will replace the version in the Tar buffer.
@kbd{v} extracts a file into a buffer in View mode. @kbd{o} extracts
the file and displays it in another window, so you could edit the file
and operate on the archive simultaneously. @kbd{d} marks a file for
deletion when you later use @kbd{x}, and @kbd{u} unmarks a file, as in
Dired. @kbd{C} copies a file from the archive to disk and @kbd{R}
renames a file. @kbd{g} reverts the buffer from the archive on disk.
renames a file within the archive. @kbd{g} reverts the buffer from
the archive on disk.
The keys @kbd{M}, @kbd{G}, and @kbd{O} change the file's permission
bits, group, and owner, respectively.
@ -3282,8 +3295,6 @@ This is achieved using the variable @code{auto-save-file-name-transforms}.
Normally, if you do not specify a user name in a remote file name,
that means to use your own user name. But if you set the variable
@code{ange-ftp-default-user} to a string, that string is used instead.
(The Emacs package that implements FTP file access is called
@code{ange-ftp}.)
@cindex anonymous FTP
@vindex ange-ftp-generate-anonymous-password
@ -3293,8 +3304,8 @@ are handled specially. The variable
@code{ange-ftp-generate-anonymous-password} controls what happens: if
the value of this variable is a string, then that string is used as
the password; if non-@code{nil} (the default), then the value of
@code{user-mail-address} is used; if @code{nil}, the user is prompted
for a password as normal.
@code{user-mail-address} is used; if @code{nil}, then Emacs prompts
you for a password as usual.
@cindex firewall, and accessing remote files
@cindex gateway, and remote file access with @code{ange-ftp}
@ -3453,7 +3464,7 @@ This adds a @samp{Filesets} menu to the menu bar.
@findex filesets-add-buffer
@findex filesets-remove-buffer
The simplest way to define filesets is by adding files to them one
The simplest way to define a fileset is by adding files to it one
at a time. To add a file to fileset @var{name}, visit the file and
type @kbd{M-x filesets-add-buffer @kbd{RET} @var{name} @kbd{RET}}. If
there is no fileset @var{name}, this creates a new one, which

View file

@ -20,12 +20,126 @@ and earlier changes, back to the limit of the undo information
available. @xref{Undo}, for more information.
@menu
* Undo:: The Undo commands.
* Kill Errors:: Commands to kill a batch of recently entered text.
* Transpose:: Exchanging two characters, words, lines, lists...
* Fixing Case:: Correcting case of last word entered.
* Spelling:: Apply spelling checker to a word, or a whole file.
@end menu
@node Undo
@section Undo
@cindex undo
@cindex changes, undoing
The @dfn{undo} commands undo recent changes in the buffer's text.
Each buffer records changes individually, and the undo command always
applies to the current buffer. You can undo all the changes in a
buffer for as far as back these records go. Usually each editing
command makes a separate entry in the undo records, but some commands
such as @code{query-replace} divide their changes into multiple
entries for flexibility in undoing. Meanwhile, self-inserting
characters are usually grouped to make undoing less tedious.
@table @kbd
@item C-x u
@itemx C-_
@itemx C-/
Undo one entry in the current buffer's undo records (@code{undo}).
@end table
@kindex C-x u
@kindex C-_
@kindex C-/
@findex undo
To begin to undo, type the command @kbd{C-x u} (or its aliases,
@kbd{C-_} or @kbd{C-/}). This undoes the most recent change in the
buffer, and moves point back to where it was before that change.
Consecutive repetitions of @kbd{C-x u} (or its aliases) undo earlier
and earlier changes in the current buffer, back to the limit of the
current buffer's undo records. If all the recorded changes have
already been undone, the undo command just signals an error.
If you notice that a buffer has been modified accidentally, the
easiest way to recover is to type @kbd{C-_} repeatedly until the stars
disappear from the front of the mode line. At this time, all the
modifications you made have been canceled. Whenever an undo command
makes the stars disappear from the mode line, it means that the buffer
contents are the same as they were when the file was last read in or
saved.
If you do not remember whether you changed the buffer deliberately,
type @kbd{C-_} once. When you see the last change you made undone, you
will see whether it was an intentional change. If it was an accident,
leave it undone. If it was deliberate, redo the change as described
below.
@findex undo-only
Any command other than an undo command breaks the sequence of undo
commands. Starting from that moment, the previous undo commands
become ordinary changes that you can undo. Thus, to redo changes you
have undone, type @kbd{C-f} or any other command that will harmlessly
break the sequence of undoing, then type undo commands again. On the
other hand, if you want to resume undoing, without redoing previous
undo commands, use @kbd{M-x undo-only}. This is like @code{undo}, but
will not redo changes you have just undone.
@cindex selective undo
@kindex C-u C-x u
Ordinary undo applies to all changes made in the current buffer. You
can also perform @dfn{selective undo}, limited to the region.
To do this, specify the region you want, then run the @code{undo}
command with a prefix argument (the value does not matter): @kbd{C-u
C-x u} or @kbd{C-u C-_}. This undoes the most recent change in the
region. To undo further changes in the same region, repeat the
@code{undo} command (no prefix argument is needed). In Transient Mark
mode (@pxref{Transient Mark}), any use of @code{undo} when there is an
active region performs selective undo; you do not need a prefix
argument.
Some specialized buffers do not make undo records. Buffers
whose names start with spaces never do; these buffers are used
internally by Emacs and its extensions to hold text that users don't
normally look at or edit.
@vindex undo-limit
@vindex undo-strong-limit
@vindex undo-outer-limit
@cindex undo limit
When the undo records for a buffer becomes too large, Emacs
discards the oldest undo records from time to time (during garbage
collection). You can specify how much undo records to keep by
setting three variables: @code{undo-limit}, @code{undo-strong-limit},
and @code{undo-outer-limit}. Their values are expressed in units of
bytes of space.
The variable @code{undo-limit} sets a soft limit: Emacs keeps undo
data for enough commands to reach this size, and perhaps exceed it,
but does not keep data for any earlier commands beyond that. Its
default value is 20000. The variable @code{undo-strong-limit} sets a
stricter limit: a previous command (not the most recent one) which
pushes the size past this amount is itself forgotten. The default
value of @code{undo-strong-limit} is 30000.
Regardless of the values of those variables, the most recent change
is never discarded unless it gets bigger than @code{undo-outer-limit}
(normally 3,000,000). At that point, Emacs discards the undo data and
warns you about it. This is the only situation in which you cannot
undo the last command. If this happens, you can increase the value of
@code{undo-outer-limit} to make it even less likely to happen in the
future. But if you didn't expect the command to create such large
undo data, then it is probably a bug and you should report it.
@xref{Bugs,, Reporting Bugs}.
The reason the @code{undo} command has three key bindings, @kbd{C-x
u}, @kbd{C-_} and @kbd{C-/}, is that it is worthy of a
single-character key, but @kbd{C-x u} is more straightforward for
beginners to remember and type. Meanwhile, @kbd{C--} on a text-only
terminal is really @kbd{C-_}, which makes it a natural and easily
typed binding for undoing.
@node Kill Errors
@section Killing Your Mistakes
@ -41,7 +155,7 @@ Kill to beginning of sentence (@code{backward-kill-sentence}).
The @key{DEL} character (@code{delete-backward-char}) is the most
important correction command. It deletes the character before point.
When @key{DEL} follows a self-inserting character command, you can think
of it as canceling that command. However, avoid the mistake of thinking
of it as canceling that command. However, avoid the confusion of thinking
of @key{DEL} as a general way to cancel a command!
When your mistake is longer than a couple of characters, it might be
@ -152,9 +266,9 @@ case-convert it and go on typing. @xref{Case}.@refill
This section describes the commands to check the spelling of a single
word or of a portion of a buffer. These commands work with the spelling
checker program Ispell, which is not part of Emacs.
checker programs Aspell and Ispell, which are not part of Emacs.
@ifinfo
@xref{Top, Ispell, Overview ispell, ispell, The Ispell Manual}.
@xref{Top, Aspell,, aspell, The Aspell Manual}.
@end ifinfo
@table @kbd
@ -178,9 +292,9 @@ Check and correct spelling of each word in the region.
Check and correct spelling of each word in a draft mail message,
excluding cited material.
@item M-x ispell-change-dictionary @key{RET} @var{dict} @key{RET}
Restart the Ispell process, using @var{dict} as the dictionary.
Restart the Aspell or Ispell process, using @var{dict} as the dictionary.
@item M-x ispell-kill-ispell
Kill the Ispell subprocess.
Kill the Aspell or Ispell subprocess.
@end table
@cindex Flyspell mode
@ -261,7 +375,7 @@ Accept the incorrect word---treat it as correct, but only in this
editing session and for this buffer.
@item i
Insert this word in your private dictionary file so that Ispell will
Insert this word in your private dictionary file so that Aspell or Ispell will
consider it correct from now on, even in future sessions.
@item u
@ -328,26 +442,27 @@ reload your private dictionary if you edit the file outside of Ispell.
@cindex @code{ispell} program
@findex ispell-kill-ispell
Once started, the Ispell subprocess continues to run (waiting for
something to do), so that subsequent spell checking commands complete
more quickly. If you want to get rid of the Ispell process, use
@kbd{M-x ispell-kill-ispell}. This is not usually necessary, since the
process uses no time except when you do spelling correction.
Once started, the Aspell or Ispell subprocess continues to run
(waiting for something to do), so that subsequent spell checking
commands complete more quickly. If you want to get rid of the
process, use @kbd{M-x ispell-kill-ispell}. This is not usually
necessary, since the process uses no time except when you do spelling
correction.
@vindex ispell-dictionary
Ispell uses two dictionaries together for spell checking: the
Ispell and Aspell use two dictionaries together for spell checking: the
standard dictionary and your private dictionary. The variable
@code{ispell-dictionary} specifies the file name to use for the
standard dictionary; a value of @code{nil} selects the default
dictionary. The command @kbd{M-x ispell-change-dictionary} sets this
variable and then restarts the Ispell subprocess, so that it will use
variable and then restarts the subprocess, so that it will use
a different standard dictionary.
@vindex ispell-complete-word-dict
Ispell uses a separate dictionary for word completion. The variable
@code{ispell-complete-word-dict} specifies the file name of this
dictionary. The completion dictionary must be different because it
cannot use root and affix information. For some languages
Aspell and Ispell use a separate dictionary for word completion.
The variable @code{ispell-complete-word-dict} specifies the file name
of this dictionary. The completion dictionary must be different
because it cannot use root and affix information. For some languages
there is a spell checking dictionary but no word completion
dictionary.

View file

@ -3,29 +3,29 @@
@c 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Frames, International, Windows, Top
@chapter Frames and X Windows
@chapter Frames and Graphical Displays
@cindex frames
When using the X Window System, you can create multiple windows at the
X level in a single Emacs session. Each X window that belongs to Emacs
displays a @dfn{frame} which can contain one or several Emacs windows.
A frame initially contains a single general-purpose Emacs window which
you can subdivide vertically or horizontally into smaller windows. A
frame normally contains its own echo area and minibuffer, but you can
make frames that don't have these---they use the echo area and
minibuffer of another frame.
Editing you do in one frame also affects the other frames. For
instance, if you put text in the kill ring in one frame, you can yank it
in another frame. If you exit Emacs through @kbd{C-x C-c} in one frame,
it terminates all the frames. To delete just one frame, use @kbd{C-x 5
0} (that is zero, not @kbd{o}).
When using a graphical display, you can create multiple windows at
the system in a single Emacs session. Each system-level window that
belongs to Emacs displays a @dfn{frame} which can contain one or
several Emacs windows. A frame initially contains a single
general-purpose Emacs window which you can subdivide vertically or
horizontally into smaller windows. A frame normally contains its own
echo area and minibuffer, but you can make frames that don't have
these---they use the echo area and minibuffer of another frame.
To avoid confusion, we reserve the word ``window'' for the
subdivisions that Emacs implements, and never use it to refer to a
frame.
Emacs compiled for MS-DOS emulates some aspects of the window system
Editing you do in one frame affects the other frames. For
instance, if you put text in the kill ring in one frame, you can yank it
in another frame. If you exit Emacs through @kbd{C-x C-c} in one frame,
it terminates all the frames. To delete just one frame, use @kbd{C-x 5
0} (that is zero, not @kbd{o}).
Emacs compiled for MS-DOS emulates some windowing functionality,
so that you can use many of the features described in this chapter.
@xref{MS-DOS Mouse}, for more information.
@ -185,46 +185,46 @@ point. Then it does not matter where you click, or even which of the
frame's windows you click on. The default value is @code{nil}. This
variable also affects yanking the secondary selection.
@cindex cutting and X
@cindex pasting and X
@cindex cutting
@cindex pasting
@cindex X cutting and pasting
To copy text to another X window, kill it or save it in the kill ring.
Under X, this also sets the @dfn{primary selection}. Then use the
``paste'' or ``yank'' command of the program operating the other window
to insert the text from the selection.
To copy text to another windowing application, kill it or save it in
the kill ring. Then use the ``paste'' or ``yank'' command of the
other application to insert the text.
To copy text from another X window, use the ``cut'' or ``copy''
command of the program operating the other window, to select the text
you want. Then yank it in Emacs with @kbd{C-y} or @kbd{Mouse-2}.
The standard coding system for X selections is
@code{compound-text-with-extensions}. To specify another coding
system for X selections, use @kbd{C-x @key{RET} x} or @kbd{C-x
@key{RET} X}. @xref{Specify Coding}.
To copy text from another windowing application, use its ``cut'' or
``copy'' command to select the text you want. Then yank it in Emacs
with @kbd{C-y} or @kbd{Mouse-2}.
@cindex primary selection
@cindex cut buffer
@cindex selection, primary
@vindex x-cut-buffer-max
When Emacs puts text into the kill ring, or rotates text to the front
of the kill ring, it sets the @dfn{primary selection} in the X server.
This is how other X clients can access the text. Emacs also stores the
text in the cut buffer, but only if the text is short enough
(the value of @code{x-cut-buffer-max} specifies the maximum number of
characters); putting long strings in the cut buffer can be slow.
When Emacs puts text into the kill ring, or rotates text to the
front of the kill ring, it sets the @dfn{primary selection} in the
window system. This is how other windowing applications can access
the text. On the X Window System, emacs also stores the text in the
cut buffer, but only if the text is short enough (the value of
@code{x-cut-buffer-max} specifies the maximum number of characters);
putting long strings in the cut buffer can be slow.
The commands to yank the first entry in the kill ring actually check
first for a primary selection in another program; after that, they check
for text in the cut buffer. If neither of those sources provides text
to yank, the kill ring contents are used.
The standard coding system for X Window System selections is
@code{compound-text-with-extensions}. To specify another coding
system for selections, use @kbd{C-x @key{RET} x} or @kbd{C-x @key{RET}
X}. @xref{Communication Coding}.
@node Secondary Selection
@section Secondary Selection
@cindex secondary selection
The @dfn{secondary selection} is another way of selecting text using
X. It does not use point or the mark, so you can use it to kill text
without setting point or the mark.
the X Window System. It does not use point or the mark, so you can
use it to kill text without setting point or the mark.
@table @kbd
@findex mouse-set-secondary
@ -275,16 +275,15 @@ that matters is which window you click on. @xref{Mouse Commands}.
@node Clipboard
@section Using the Clipboard
@cindex X clipboard
@cindex clipboard
@vindex x-select-enable-clipboard
@findex menu-bar-enable-clipboard
@cindex OpenWindows
@cindex Gnome
Apart from the primary and secondary selection types, X supports a
@dfn{clipboard} selection type which is used by some applications,
particularly under OpenWindows and Gnome.
Apart from the primary and secondary selection types, Emacs can
handle the @dfn{clipboard} selection type which is used by some
applications, particularly under OpenWindows and Gnome.
The command @kbd{M-x menu-bar-enable-clipboard} makes the @code{Cut},
@code{Paste} and @code{Copy} menu items, as well as the keys of the same
@ -295,7 +294,7 @@ the Emacs yank functions consult the clipboard before the primary
selection, and to make the kill functions to store in the clipboard as
well as the primary selection. Otherwise they do not access the
clipboard at all. Using the clipboard is the default on MS-Windows,
unlike most systems.
but not on other systems.
@node Mouse References
@section Following References with the Mouse
@ -342,16 +341,16 @@ the mouse.
@vindex mouse-1-click-follows-link
In Emacs versions before 22, only @kbd{Mouse-2} follows links and
@kbd{Mouse-1} always sets points. If you prefer this behavior, set
the variable @code{mouse-1-click-follows-link} to @code{nil}. This
variable also lets you choose various other alternatives for following
links with the mouse. Type @kbd{C-h v mouse-1-click-follows-link @key{RET}}
for more details.
@kbd{Mouse-1} always sets point. If you prefer this older behavior,
set the variable @code{mouse-1-click-follows-link} to @code{nil}.
This variable also lets you choose various other alternatives for
following links with the mouse. Type @kbd{C-h v
mouse-1-click-follows-link @key{RET}} for more details.
@node Menu Mouse Clicks
@section Mouse Clicks for Menus
Mouse clicks modified with the @key{CTRL} and @key{SHIFT} keys
Several mouse clicks with the @key{CTRL} and @key{SHIFT} modifiers
bring up menus.
@table @kbd
@ -382,7 +381,7 @@ present in the menu bar---not just the mode-specific ones---so that
you can access them without having to display the menu bar.
@item S-Mouse-1
This menu is for specifying the frame's principal font.
This menu is for specifying the frame's default font.
@end table
@node Mode Line Mouse
@ -396,17 +395,17 @@ windows.
Some areas of the mode line, such as the buffer name and the major
mode name, have their own special mouse bindings. These areas are
highlighted when you hold the mouse over them, and information about
the special bindings will be displayed (@pxref{Tooltips}).
You can also click on areas of the mode line that do not have
special mouse bindings of their own. This has the following effects:
the special bindings will be displayed (@pxref{Tooltips}). This
section's commands do not apply in those areas.
@table @kbd
@item Mouse-1
@kindex Mouse-1 @r{(mode line)}
@kbd{Mouse-1} on a mode line selects the window it belongs to. By
dragging @kbd{Mouse-1} on the mode line, you can move it, thus
changing the height of the windows above and below.
changing the height of the windows above and below. Changing heights
with the mouse in this way never deletes windows, it just refuses to
make any window smaller than the minimum height.
@item Mouse-2
@kindex Mouse-2 @r{(mode line)}
@ -425,7 +424,10 @@ horizontally, above the place in the mode line where you click.
@end table
@kindex C-Mouse-2 @r{(scroll bar)}
@kbd{C-Mouse-2} on a scroll bar splits the corresponding window
@kindex Mouse-1 @r{(scroll bar)}
Using @kbd{Mouse-1} on the divider between two side-by-side mode
lines, you can move the vertical boundary left or right. Using
@kbd{C-Mouse-2} on a scroll bar splits the corresponding window
vertically. @xref{Split Window}.
@node Creating Frames
@ -638,12 +640,12 @@ for all of them!
@section Special Buffer Frames
@vindex special-display-buffer-names
You can make certain chosen buffers, for which Emacs normally creates
a second window when you have just one window, appear in special frames
of their own. To do this, set the variable
@code{special-display-buffer-names} to a list of buffer names; any
buffer whose name is in that list automatically gets a special frame,
when an Emacs command wants to display it ``in another window.''
You can make certain chosen buffers, which Emacs normally displays
in ``another window,'' appear in special frames of their own. To do
this, set the variable @code{special-display-buffer-names} to a list
of buffer names; any buffer whose name is in that list automatically
gets a special frame, when an Emacs command wants to display it ``in
another window.''
For example, if you set the variable this way,
@ -664,7 +666,7 @@ frame automatically.
More generally, you can set @code{special-display-regexps} to a list
of regular expressions; then a buffer gets its own frame if its name
matches any of those regular expressions. (Once again, this applies only
to buffers that normally get displayed for you in a separate window.)
to buffers that normally get displayed for you in ``another window.'')
@vindex special-display-frame-alist
The variable @code{special-display-frame-alist} specifies the frame
@ -707,79 +709,38 @@ whether that feature is also in use for the same buffer name.
@cindex Auto-Raise mode
@cindex Auto-Lower mode
This section describes commands for altering the display style and
window management behavior of the selected frame.
@kindex S-Mouse-1
You can specify the font and colors used for text display, and the
colors for the frame borders, the cursor, and the mouse cursor, by
customizing the faces @code{default}, @code{border}, @code{cursor} and
@code{mouse}. @xref{Face Customization}. You can also set a frame's
default font through a pop-up menu. Press @kbd{S-Mouse-1} to activate
this menu.
These commands are available for controlling the window management
behavior of the selected frame.
@findex set-foreground-color
@findex set-background-color
@findex set-cursor-color
@findex set-mouse-color
@findex set-border-color
@findex auto-raise-mode
@findex auto-lower-mode
@cindex colors
@table @kbd
@item M-x set-foreground-color @key{RET} @var{color} @key{RET}
Specify color @var{color} for the foreground of the selected frame.
(This also changes the foreground color of the default face.) You can
specify @var{color} either by its symbolic name or by its RGB
numerical specification@footnote{
See the X Window System documentation for more details. On a typical
GNU or Unix system, the command @kbd{man 7 X} or @kbd{man -s 7 X} will
display the X manual page that explains how to specify colors.}.
@item M-x set-background-color @key{RET} @var{color} @key{RET}
Specify color @var{color} for the background of the selected frame.
(This also changes the background color of the default face.)
@item M-x set-cursor-color @key{RET} @var{color} @key{RET}
Specify color @var{color} for the cursor of the selected frame.
@item M-x set-mouse-color @key{RET} @var{color} @key{RET}
Specify color @var{color} for the mouse cursor when it is over the
selected frame.
@item M-x set-border-color @key{RET} @var{color} @key{RET}
Specify color @var{color} for the border of the selected frame.
@item M-x list-colors-display
Display the defined color names and show what the colors look like.
This command is somewhat slow. @xref{Colors, list-colors-display,
Display available colors}.
@findex auto-raise-mode
@item M-x auto-raise-mode
Toggle whether or not the selected frame should auto-raise. Auto-raise
means that every time you move the mouse onto the frame, it raises the
frame.
Note that this auto-raise feature is implemented by Emacs itself. Some
window managers also implement auto-raise. If you enable auto-raise for
Emacs frames in your X window manager, it should work, but it is beyond
Emacs's control and therefore @code{auto-raise-mode} has no effect on
it.
Some window managers also implement auto-raise. If you enable
auto-raise for Emacs frames in your window manager, it will work, but
it is beyond Emacs' control, so @code{auto-raise-mode} has no effect
on it.
@findex auto-lower-mode
@item M-x auto-lower-mode
Toggle whether or not the selected frame should auto-lower.
Auto-lower means that every time you move the mouse off the frame,
the frame moves to the bottom of the stack of X windows.
the frame moves to the bottom of the stack on the screen.
The command @code{auto-lower-mode} has no effect on auto-lower
implemented by the X window manager. To control that, you must use
the appropriate window manager features.
@findex set-frame-font
@item M-x set-frame-font @key{RET} @var{font} @key{RET}
@cindex font (principal)
Specify font @var{font} as the principal font for the selected frame.
The principal font controls several face attributes of the
@code{default} face (@pxref{Faces}). For example, if the principal font
has a height of 12 pt, all text will be drawn in 12 pt fonts, unless you
use another face that specifies a different height. @xref{Font X}, for
ways to list the available fonts on your system.
@kindex S-Mouse-1
You can also set a frame's principal font through a pop-up menu.
Press @kbd{S-Mouse-1} to activate this menu.
implemented by the window manager. To control that, you must use the
appropriate window manager features.
@end table
In Emacs versions that use an X toolkit, the color-setting and
@ -800,13 +761,13 @@ Parameters,,, elisp, The Emacs Lisp Reference Manual}.
@cindex Scroll Bar mode
@cindex mode, Scroll Bar
When using X, Emacs normally makes a @dfn{scroll bar} at the left of
each Emacs window.@footnote{Placing it at the left is usually more
useful with overlapping frames with text starting at the left margin.}
The scroll bar runs the height of the window, and shows a moving
rectangular inner box which represents the portion of the buffer
currently displayed. The entire height of the scroll bar represents the
entire length of the buffer.
On graphical displays, Emacs normally makes a @dfn{scroll bar} at
the left of each Emacs window.@footnote{Placing it at the left is
usually more useful with overlapping frames with text starting at the
left margin.} The scroll bar runs the height of the window, and shows
a moving rectangular inner box which represents the portion of the
buffer currently displayed. The entire height of the scroll bar
represents the entire length of the buffer.
You can use @kbd{Mouse-2} (normally, the middle button) in the scroll
bar to move or drag the inner box up and down. If you move it to the
@ -826,16 +787,18 @@ window vertically. The split occurs on the line where you click.
@findex scroll-bar-mode
@vindex scroll-bar-mode
You can enable or disable Scroll Bar mode with the command @kbd{M-x
scroll-bar-mode}. With no argument, it toggles the use of scroll bars.
With an argument, it turns use of scroll bars on if and only if the
argument is positive. This command applies to all frames, including
frames yet to be created. Customize the variable @code{scroll-bar-mode}
to control the use of scroll bars at startup. You can use it to specify
that they are placed at the right of windows if you prefer that. You
have to set this variable through the @samp{Customize} interface
(@pxref{Easy Customization}). Otherwise, it will not work properly.
You can use the X resource @samp{verticalScrollBars} to control the
initial setting of Scroll Bar mode similarly. @xref{Resources}.
scroll-bar-mode}. With no argument, it toggles the use of scroll
bars. With an argument, it turns use of scroll bars on if and only if
the argument is positive. This command applies to all frames,
including frames yet to be created. Customize the variable
@code{scroll-bar-mode} to control the use of scroll bars at startup.
You can use it to specify that they are placed at the right of windows
if you prefer that. You have to set this variable through the
@samp{Customize} interface (@pxref{Easy Customization}), or it will
not work properly.
You can also use the X resource @samp{verticalScrollBars} to control
the initial setting of Scroll Bar mode. @xref{Resources}.
@findex toggle-scroll-bar
To enable or disable scroll bars for just the selected frame, use the
@ -887,37 +850,8 @@ directory displayed in that buffer.
you prefer to visit the file in a new window in such cases, customize
the variable @code{dnd-open-file-other-window}.
@ignore
@c ??? To Lisp manual
@vindex x-dnd-test-function
@vindex x-dnd-known-types
When a user drags something from another application over Emacs, that other
application expects Emacs to tell it if Emacs can handle the data that is
dragged. The variable @code{x-dnd-test-function} is used by Emacs to determine
what to reply. The default value is @code{x-dnd-default-test-function}
which accepts drops if the type of the data to be dropped is present in
@code{x-dnd-known-types}. You can customize @code{x-dnd-test-function} and/or
@code{x-dnd-known-types} if you want Emacs to accept or reject drops based
on some other criteria.
@vindex x-dnd-types-alist
If you want to change the way Emacs handles drop of different types
or add a new type, customize @code{x-dnd-types-alist}. This requires
detailed knowledge of what types other applications use for drag and
drop.
@vindex dnd-protocol-alist
When an URL is dropped on Emacs it may be a file, but it may also be
another URL type (ftp, http, etc.). Emacs first checks
@code{dnd-protocol-alist} to determine what to do with the URL. If
there is no match there and if @code{browse-url-browser-function} is
an alist, Emacs looks for a match there. If no match is found the
text for the URL is inserted. If you want to alter Emacs behavior,
you can customize these variables.
@end ignore
The drag and drop protocols XDND, Motif and the
old KDE 1.x protocol are currently supported.
The XDND and Motif drag and drop protocols, and the old KDE 1.x
protocol, are currently supported.
@node Menu Bars
@section Menu Bars
@ -941,7 +875,7 @@ with @kbd{C-Mouse-3} on a display which supports pop-up menus.
@xref{Menu Bar}, for information on how to invoke commands with the
menu bar. @xref{X Resources}, for how to customize the menu bar
menus.
menus' visual appearance.
@node Tool Bars
@section Tool Bars
@ -980,13 +914,18 @@ use of dialog boxes. This also controls whether to use file selection
windows (but those are not supported on all platforms).
@vindex use-file-dialog
A file selection window is a special kind of dialog box for asking for
file names.
A file selection window is a special kind of dialog box for asking
for file names. You can customize the variable @code{use-file-dialog}
to suppress the use of file selection windows, even if you still want
other kinds of dialogs. This variable has no effect if you have
suppressed all dialog boxes with the variable @code{use-dialog-box}.
You can customize the variable @code{use-file-dialog} to suppress the
use of file selection windows even if you still want other kinds
of dialogs. This variable has no effect if you have suppressed all dialog
boxes with the variable @code{use-dialog-box}.
@vindex x-gtk-show-hidden-files
For Gtk+ version 2.4 and newer, Emacs use the Gtk+ file chooser
dialog. Emacs adds a toggle button that enables and disables showing
of hidden files (files starting with a dot) in that dialog. The
variable @code{x-gtk-show-hidden-files} controls whether to show
hidden files by default.
@vindex x-use-old-gtk-file-dialog
For Gtk+ version 2.4 and 2.6, you can make Emacs use the old file dialog
@ -994,12 +933,6 @@ by setting the variable @code{x-use-old-gtk-file-dialog} to a non-@code{nil}
value. If Emacs is built with a Gtk+ version that has only one file dialog,
the setting of this variable has no effect.
@vindex x-gtk-show-hidden-files
For Gtk+ version 2.4 and newer, Emacs use the Gtk+ file chooser dialog.
Emacs adds a toggle button that enables and disables showing of hidden files
(files starting with a dot) in that dialog. This variable controls if
hidden files should be shown by default or not.
@node Tooltips
@section Tooltips
@cindex tooltips
@ -1010,13 +943,13 @@ movement. There are two types of tooltip: help tooltips and GUD
tooltips.
@dfn{Help tooltips} typically display over text---including the mode
line---but may be also available for many other parts of the Emacs
frame such as the tool bar and menu items.
line---but are also available for other parts of the Emacs frame, such
as the tool bar and menu items.
@findex tooltip-mode
You can toggle help tooltips (Tooltip mode) with the command
@kbd{M-x tooltip-mode}. When Tooltip mode is disabled, the help text
is displayed in the echo area instead.
You can toggle display of help tooltips (Tooltip mode) with the
command @kbd{M-x tooltip-mode}. When Tooltip mode is disabled, the
help text is displayed in the echo area instead.
@dfn{GUD tooltips} show values of variables. They are useful when
you are debugging a program. @xref{Debugger Operation}.
@ -1066,11 +999,10 @@ the mode.
@cindex non-window terminals
@cindex single-frame terminals
If your terminal does not have a window system that Emacs supports,
then it can display only one Emacs frame at a time. However, you can
still create multiple Emacs frames, and switch between them. Switching
frames on these terminals is much like switching between different
window configurations.
On a text-only terminal, Emacs can display only one Emacs frame at a
time. However, you can still create multiple Emacs frames, and switch
between them. Switching frames on these terminals is much like
switching between different window configurations.
Use @kbd{C-x 5 2} to create a new frame and switch to it; use @kbd{C-x
5 o} to cycle through the existing frames; use @kbd{C-x 5 0} to delete
@ -1083,20 +1015,20 @@ appears near the beginning of the mode line, in the form
@findex set-frame-name
@findex select-frame-by-name
@samp{F@var{n}} is actually the frame's name. You can also specify a
different name if you wish, and you can select a frame by its name. Use
the command @kbd{M-x set-frame-name @key{RET} @var{name} @key{RET}} to
specify a new name for the selected frame, and use @kbd{M-x
select-frame-by-name @key{RET} @var{name} @key{RET}} to select a frame
according to its name. The name you specify appears in the mode line
when the frame is selected.
@samp{F@var{n}} is in fact the frame's initial name. You can give
frames more meaningful names if you wish, and you can select a frame
by its name. Use the command @kbd{M-x set-frame-name @key{RET}
@var{name} @key{RET}} to specify a new name for the selected frame,
and use @kbd{M-x select-frame-by-name @key{RET} @var{name} @key{RET}}
to select a frame according to its name. The name you specify appears
in the mode line when the frame is selected.
@node XTerm Mouse
@section Using a Mouse in Terminal Emulators
@cindex xterm, mouse support
@cindex terminal emulators, mouse support
Some terminal emulators under X support mouse clicks in the terminal
Some terminal emulators under X support mouse clicks in the terminal
window. In a terminal emulator which is compatible with @code{xterm},
you can use @kbd{M-x xterm-mouse-mode} to give Emacs control over
simple use of the mouse---basically, only non-modified single clicks

View file

@ -12,17 +12,19 @@
@kindex F1
Emacs provides extensive help features accessible through a single
character, @kbd{C-h}. @kbd{C-h} is a prefix key that is used for
commands that display documentation. The characters that you can type after
@kbd{C-h} are called @dfn{help options}. One help option is @kbd{C-h};
that is how you ask for help about using @kbd{C-h}. To cancel, type
@kbd{C-g}. The function key @key{F1} is equivalent to @kbd{C-h}.
character, @kbd{C-h} (or @key{F1}). @kbd{C-h} is a prefix key that is
used for commands that display documentation. The characters that you
can type after @kbd{C-h} are called @dfn{help options}. One help
option is @kbd{C-h}; that is how you ask for help about using
@kbd{C-h}. To cancel, type @kbd{C-g}. The function key @key{F1} is
equivalent to @kbd{C-h}.
@kindex C-h C-h
@findex help-for-help
@kbd{C-h C-h} (@code{help-for-help}) displays a list of the possible
help options, each with a brief description. Before you type a help
option, you can use @key{SPC} or @key{DEL} to scroll through the list.
help options, each with a brief description. You can look at the
list, using @key{SPC} and @key{DEL} to scroll through it, then type
the help option you want. To cancel, type @kbd{C-g}.
@kbd{C-h} or @key{F1} means ``help'' in various other contexts as
well. After a prefix key, it displays a list of the alternatives that
@ -70,13 +72,6 @@ Finally, you can try looking up a suitable package using keywords
pertinent to the feature you need. @xref{Library Keywords}.
@end table
To find the documentation of a key sequence or a menu item, type
@kbd{C-h K} and then type that key sequence or select the menu
item. This looks up the description of the command invoked by the key
or the menu in the appropriate manual (not necessarily the Emacs
manual). Likewise, use @kbd{C-h F} for reading documentation of a
command.
@menu
* Help Summary:: Brief list of all Help commands.
* Key Help:: Asking what a key does in Emacs.
@ -100,7 +95,8 @@ command.
Here is a summary of the Emacs interactive help commands.
@xref{Help Files}, for other help commands that just display a
pre-written file of information.
pre-written file of information. The character that follows
@kbd{C-h} is a ``help option.''
@table @kbd
@item C-h a @var{topics} @key{RET}
@ -180,7 +176,7 @@ links in @samp{*Help*} buffers (@code{display-local-help}).
@kindex C-h c
@findex describe-key-briefly
The most basic @kbd{C-h} options are @kbd{C-h c}
The most basic @kbd{C-h} commands are @kbd{C-h c}
(@code{describe-key-briefly}) and @w{@kbd{C-h k}} (@code{describe-key}).
@kbd{C-h c @var{key}} displays in the echo area the name of the command
that @var{key} is bound to. For example, @kbd{C-h c C-f} displays
@ -194,8 +190,19 @@ what @var{key} does.
displays the documentation string of the command as well as its name.
This is too big for the echo area, so a window is used for the display.
@kbd{C-h c} and @kbd{C-h k} work for any sort of key sequences,
including function keys and mouse events.
@kindex C-h K
@findex Info-goto-emacs-key-command-node
To find the documentation of a key sequence, type @kbd{C-h K} and
then enter that key sequence. This looks up the description of the
command invoked by the key in whichever manual describes it (this need
not be the Emacs manual). @kbd{C-h K} runs the command
@code{Info-goto-emacs-key-command-node}.
@kbd{C-h c}, @kbd{C-h k} and @kbd{C-h K} work for any sort of key
sequences, including function keys, menus, and mouse events. For
instance, you can type @kbd{C-h k} and then select a menu item from
the menu bar, to show the documentation string of the command that
menu item runs.
@kindex C-h w
@findex where-is
@ -256,9 +263,18 @@ variable. @xref{Variables}.
hyperlinks to the definition, if you have the source files installed.
(@xref{Hyperlinking}.) If you know Lisp (or C), this provides the
ultimate documentation. If you don't know Lisp, you should learn it.
If you are just @emph{using} Emacs, treating Emacs as an object
(file), then you don't really love it. For true intimacy with your
editor, you need to read the source code.
(The Introduction to Emacs Lisp Programming, available from the FSF
through fsf.org, is a good way to get started.) Emacs won't be happy
if it feels you are just @emph{using} Emacs, treating it as an object
program. If you really love Emacs, show that you care by reading the
source code.
@kindex C-h F
@findex Info-goto-emacs-command-node
To find a specific function's documentation in a manual, use
@kbd{C-h F} (@code{Info-goto-emacs-command-node}). This knows
about various manuals, not just the Emacs manual, and finds the
right one.
@node Apropos
@section Apropos
@ -432,8 +448,8 @@ use:
the support for a specific language environment. @xref{Language
Environments}. This tells you which languages this language
environment is useful for, and lists the character sets, coding
systems, and input methods that go with it. It also shows some sample
text to illustrate scripts.
systems, and input methods that it operates on. It also shows some
sample text to illustrate scripts.
The command @kbd{C-h h} (@code{view-hello-file}) displays the file
@file{etc/HELLO}, which shows how to say ``hello'' in many languages.
@ -456,9 +472,7 @@ Ops}), plus a few special commands of their own.
@item @key{SPC}
Scroll forward.
@item @key{DEL}
@itemx @key{BS}
Scroll backward. On some keyboards, this key is known as @key{BS} or
@key{backspace}.
Scroll backward.
@item @key{RET}
Follow a cross reference at point.
@item @key{TAB}
@ -521,24 +535,9 @@ have an entry in the top-level Info menu. It is also handy when you
need to get to the documentation quickly, and you know the exact name
of the file.
@kindex C-h F
@kindex C-h K
@findex Info-goto-emacs-key-command-node
@findex Info-goto-emacs-command-node
There are two special help commands for accessing Emacs
documentation through Info. @kbd{C-h F @var{function} @key{RET}}
enters Info and goes straight to the documentation of the Emacs
function @var{function}. @kbd{C-h K @var{key}} enters Info and goes
straight to the documentation of the key @var{key}. These two keys
run the commands @code{Info-goto-emacs-command-node} and
@code{Info-goto-emacs-key-command-node}. You can use @kbd{C-h K} to
find the documentation of a menu item: just select that menu item when
@kbd{C-h K} prompts for a key.
@kbd{C-h F} and @kbd{C-h K} know about commands and keys described
in manuals other than the Emacs manual. Thus, they make it easier to
find the documentation of commands and keys when you are not sure
which manual describes them, like when using some specialized mode.
The help commands @kbd{C-h F @var{function} @key{RET}} and @kbd{C-h
K @var{key}}, described above, enter Info and go straight to the
documentation of @var{function} or @var{key}.
@kindex C-h S
@findex info-lookup-symbol

View file

@ -45,7 +45,7 @@ Insert a tab character. You can type @kbd{C-q @key{TAB}} to do this.
A tab character is displayed as a stretch of whitespace which extends
to the next display tab stop position, and the default width of a tab
stop is eight. @xref{Display Custom}, for more details.
stop is eight. @xref{Text Display}, for more details.
@item
Insert whitespace up to the next tab stop. You can set tab stops at
@ -114,13 +114,13 @@ regard, @kbd{C-M-o} resembles @kbd{C-o}.
@kindex M-^
@findex delete-indentation
To join two lines cleanly, use the @kbd{M-^}
(@code{delete-indentation}) command. It deletes the indentation at the
front of the current line, and the line boundary as well, replacing them
with a single space. As a special case (useful for Lisp code) the
single space is omitted if the characters to be joined are consecutive
open parentheses or closing parentheses, or if the junction follows
another newline. To delete just the indentation of a line, go to the
beginning of the line and use @kbd{M-\}
(@code{delete-indentation}) command. It deletes the indentation at
the front of the current line, and the line boundary as well,
replacing them with a single space. As a special case (useful for
Lisp code) the single space is omitted if the characters to be joined
are consecutive open parentheses or closing parentheses, or if the
junction follows another newline. To delete just the indentation of a
line, go to the beginning of the line and use @kbd{M-\}
(@code{delete-horizontal-space}), which deletes all spaces and tabs
around the cursor.
@ -140,12 +140,12 @@ shifted left or right so that its first nonblank character appears in
that column. @kbd{C-x @key{TAB}} (@code{indent-rigidly}) moves all of
the lines in the region right by its argument (left, for negative
arguments). The whole group of lines moves rigidly sideways, which is
how the command gets its name.@refill
how the command gets its name.
@cindex remove indentation
If you want to remove all indentation from all of the line in the
region, invoke @kbd{C-x @key{TAB}} with a large negative argument,
such as -1000.
To remove all indentation from all of the lines in the region,
invoke @kbd{C-x @key{TAB}} with a large negative argument, such as
-1000.
@findex indent-relative
@kbd{M-x indent-relative} indents at point based on the previous line

View file

@ -84,8 +84,7 @@ Delete next character (@code{delete-char}). If your keyboard has a
binds it to @code{delete-char} as well.
@item @key{DEL}
@itemx @key{BS}
Delete previous character (@code{delete-backward-char}). Some keyboards
refer to this key as a ``backspace key'' and label it with a left arrow.
Delete previous character (@code{delete-backward-char}).
@item M-\
Delete spaces and tabs around point (@code{delete-horizontal-space}).
@item M-@key{SPC}
@ -112,11 +111,12 @@ kill instead, since they can erase more than one character this way.
@kindex BACKSPACE
@kindex BS
@kindex DELETE
Every keyboard has a large key, labeled @key{DEL}, @key{BACKSPACE},
@key{BS} or @key{DELETE}, which is a short distance above the
Every keyboard has a large key which is a short distance above the
@key{RET} or @key{ENTER} key and is normally used for erasing what you
have typed. Regardless of the actual name on the key, in Emacs it is
equivalent to @key{DEL}---or it should be.
have typed. It may be labeled @key{DEL}, @key{BACKSPACE}, @key{BS},
@key{DELETE}, or even with a left arrow. Regardless of the label on
the key, in Emacs it called @key{DEL}, and it should delete one
character backwards.
Many keyboards (including standard PC keyboards) have a
@key{BACKSPACE} key a short ways above @key{RET} or @key{ENTER}, and a
@ -251,22 +251,23 @@ and @kbd{M-d} (@pxref{Words}); balanced expressions, with @kbd{C-M-k}
@kbd{M-k} (@pxref{Sentences}).@refill
@node Graphical Kill
@subsection Killing on Graphical Terminals
@subsection Killing on Graphical Displays
On multi-window terminals, the most recent kill done in Emacs is
also the primary selection, if it is more recent than any selection
you made in another program. This means that the paste commands of
other applications with separate windows copy the text that you killed
in Emacs. In addition, Emacs yank commands treat other applications'
selections as part of the kill ring, so you can yank them into Emacs.
On graphical displays with window systems, the most recent kill done
in Emacs is also the primary selection, if it is more recent than any
selection you made in another program. This means that the paste
commands of other window-based applications copy the text that you
killed in Emacs. In addition, Emacs yank commands treat other
applications' selections as part of the kill ring, so you can yank
them into Emacs.
@cindex Delete Selection mode
@cindex mode, Delete Selection
@findex delete-selection-mode
Many window systems follow the convention that insertion while text
is selected deletes the selected text. You can make Emacs behave this
way by enabling Delete Selection mode, with @kbd{M-x
delete-selection-mode}, or using Custom. Another effect of this mode
way by enabling Delete Selection mode---with @kbd{M-x
delete-selection-mode} or using Custom. Another effect of this mode
is that @key{DEL}, @kbd{C-d} and some other keys, when a selection
exists, will kill the whole selection. It also enables Transient Mark
mode (@pxref{Transient Mark}).
@ -297,10 +298,10 @@ Save region as last killed text without actually killing it
Append next kill to last batch of killed text (@code{append-next-kill}).
@end table
On window systems, if there is a current selection in some other
application, and you selected it more recently than you killed any
text in Emacs, @kbd{C-y} copies the selection instead of text
killed within Emacs.
On graphical displays with window systems, if there is a current
selection in some other application, and you selected it more recently
than you killed any text in Emacs, @kbd{C-y} copies the selection
instead of text killed within Emacs.
@menu
* Kill Ring:: Where killed text is stored. Basic yanking.
@ -601,7 +602,8 @@ move left into the gap.
rectangle is not stored in the kill ring, but in a special place that
can only record the most recent rectangle killed. This is because yanking
a rectangle is so different from yanking linear text that different yank
commands have to be used and yank-popping is hard to make sense of.
commands have to be used. It is hard to define yank-popping for rectangles,
so we do not try.
@kindex C-x r y
@findex yank-rectangle
@ -665,7 +667,7 @@ applications. @kbd{C-x} means cut (kill), @kbd{C-c} copy, @kbd{C-v}
paste (yank), and @kbd{C-z} undo. Standard Emacs commands like
@kbd{C-x C-c} still work, because @kbd{C-x} and @kbd{C-c} only take
effect when the mark is active (and the region is highlighted).
However, if you don't want these bindings at all, set
However, if you don't want to override these bindings Emacs at all, set
@code{cua-enable-cua-keys} to @code{nil}.
In CUA mode, using @kbd{Shift} together with the movement keys
@ -674,10 +676,10 @@ standard (unshifted) movement keys deactivate the mark, and typed text
replaces the active region as in Delete-Selection mode
(@pxref{Graphical Kill}).
To run a command like @kbd{C-x C-f} while the mark is active, use
one of the following methods: either hold @kbd{Shift} together with
the prefix key, e.g. @kbd{S-C-x C-f}, or quickly type the prefix key
twice, e.g. @kbd{C-x C-x C-f}.
To enter an Emacs command like @kbd{C-x C-f} while the mark is
active, use one of the following methods: either hold @kbd{Shift}
together with the prefix key, e.g. @kbd{S-C-x C-f}, or quickly type
the prefix key twice, e.g. @kbd{C-x C-x C-f}.
@cindex rectangle highlighting
CUA mode provides enhanced rectangle support with visible

View file

@ -7,22 +7,22 @@
@cindex defining keyboard macros
@cindex keyboard macro
In this chapter we describe how a sequence of editing commands can
be recorded and repeated multiple times.
In this chapter we describe how to record a sequence of editing
commands so you can repeat it conveniently later.
A @dfn{keyboard macro} is a command defined by the user to stand for
another sequence of keys. For example, if you discover that you are
about to type @kbd{C-n C-d} forty times, you can speed your work by
defining a keyboard macro to do @kbd{C-n C-d} and calling it with a
repeat count of forty.
about to type @kbd{C-n M-d C-d} forty times, you can speed your work by
defining a keyboard macro to do @kbd{C-n M-d C-d}, and then executing
it 39 more times.
You define a keyboard macro while executing the commands which are the
definition. Put differently, as you define a keyboard macro, the
definition is being executed for the first time. This way, you can see
what the effects of your commands are, so that you don't have to figure
them out in your head. When you are finished, the keyboard macro is
defined and also has been, in effect, executed once. You can then do the
whole thing over again by invoking the macro.
You define a keyboard macro by executing and recording the commands
which are its definition. Put differently, as you define a keyboard
macro, the definition is being executed for the first time. This way,
you can see the effects of your commands, so that you don't have to
figure them out in your head. When you close the definition, the
keyboard macro is defined and also has been, in effect, executed once.
You can then do the whole thing over again by invoking the macro.
Keyboard macros differ from ordinary Emacs commands in that they are
written in the Emacs command language rather than in Lisp. This makes it
@ -63,19 +63,6 @@ execute the most recent keyboard macro
Re-execute last keyboard macro, then add more keys to its definition.
@item C-u C-u C-x (
Add more keys to the last keyboard macro without re-executing it.
@item C-x q
When this point is reached during macro execution, ask for confirmation
(@code{kbd-macro-query}).
@item C-x C-k n
Give a command name (for the duration of the session) to the most
recently defined keyboard macro (@code{kmacro-name-last-macro}).
@item C-x C-k b
Bind the most recently defined keyboard macro to a key sequence (for
the duration of the session) (@code{kmacro-bind-to-key}).
@item M-x insert-kbd-macro
Insert in the buffer a keyboard macro's definition, as Lisp code.
@item C-x C-k e
Edit a previously defined keyboard macro (@code{edit-kbd-macro}).
@item C-x C-k r
Run the last keyboard macro on each line that begins in the region
(@code{apply-macro-to-region-lines}).
@ -157,12 +144,12 @@ of that event, the position that the mouse had while you were defining
the macro. The effect of this may be hard to predict. (Using the
current mouse position would be even less predictable.)
One thing that doesn't always work well in a keyboard macro is the
One thing that sometimes works badly in a keyboard macro is the
command @kbd{C-M-c} (@code{exit-recursive-edit}). When this command
exits a recursive edit that started within the macro, it works as you'd
expect. But if it exits a recursive edit that started before you
invoked the keyboard macro, it also necessarily exits the keyboard macro
as part of the process.
exits a recursive edit that started within the macro, it works as
you'd expect. But if it exits a recursive edit that started before
you invoked the keyboard macro, it also necessarily exits the keyboard
macro as part of the process.
After you have terminated the definition of a keyboard macro, you can add
to the end of its definition by typing @kbd{C-u C-x (}. This is equivalent
@ -190,6 +177,17 @@ beginning of the line and then executing the macro.
a list of sequences of keys. There is only one keyboard macro ring,
shared by all buffers.
@table @kbd
@item C-x C-k C-k
Execute the keyboard macro at the head of the ring (@code{kmacro-end-or-call-macro-repeat}).
@item C-x C-k C-n
Rotate the keyboard macro ring to the next macro (defined earlier)
(@code{kmacro-cycle-ring-next}).
@item C-x C-k C-p
Rotate the keyboard macro ring to the previous macro (defined later)
(@code{kmacro-cycle-ring-previous}).
@end table
All commands which operate on the keyboard macro ring use the
same @kbd{C-x C-k} prefix. Most of these commands can be executed and
repeated immediately after each other without repeating the @kbd{C-x
@ -212,7 +210,7 @@ executes the keyboard macro at the head of the macro ring. You can
repeat the macro immediately by typing another @kbd{C-k}, or you can
rotate the macro ring immediately by typing @kbd{C-n} or @kbd{C-p}.
When a keyboard macro is being defined, @kbd{C-x C-k C-k} behaves like
When a keyboard macro is being defined, @kbd{C-x C-k C-k} behaves like
@kbd{C-x )} except that, immediately afterward, you can use most key
bindings of this section without the @kbd{C-x C-k} prefix. For
instance, another @kbd{C-k} will re-execute the macro.
@ -231,12 +229,13 @@ desired macro is at the head of the ring. To execute the new macro
ring head immediately, just type @kbd{C-k}.
Note that Emacs treats the head of the macro ring as the ``last
defined keyboard macro''. For instance, it is the keyboard macro that
@kbd{C-x e} will execute.
defined keyboard macro.'' For instance, @kbd{C-x e} will execute that
macro, and @kbd{C-x C-k n} will give it a name.
@ignore @c This interface is too kludgy
@c and the functionality duplicates the functionality above -- rms.
@findex kmacro-view-macro-repeat
@kindex C-x C-k C-v
The command @kbd{C-x C-k C-v} (@code{kmacro-view-macro-repeat})
displays the last keyboard macro, or when repeated (with @kbd{C-v}),
it displays the previous macro on the macro ring, just like @kbd{C-x
@ -248,7 +247,11 @@ macro is executed, but still without altering the macro ring.
macro the current macro and executes it twice, @kbd{C-x C-k C-v C-v
C-v C-k C-k} will display and execute the 3rd previous macro once and
then the current macro once.
@end ignore
@ignore @c This is just too much feeping creaturism.
@c If you are reusing certain macros enough to want these,
@c you should give then names. -- rms
@findex kmacro-delete-ring-head
@kindex C-x C-k C-d
@ -269,6 +272,7 @@ the macro ring.
The command @kbd{C-x C-k C-l} (@code{kmacro-call-ring-2nd-repeat})
executes the previous (rather than the head) element on the macro ring.
@end ignore
@vindex kmacro-ring-max
The maximum number of macros stored in the keyboard macro ring is
@ -277,6 +281,19 @@ determined by the customizable variable @code{kmacro-ring-max}.
@node Keyboard Macro Counter
@section The Keyboard Macro Counter
@table @kbd
@item C-x C-k C-i
Insert the keyboard macro counter value in the buffer
(@code{kmacro-insert-counter}).
@item C-x C-k C-c
Set the keyboard macro counter (@code{kmacro-set-counter}).
@item C-x C-k C-a
Add the prefix arg to the keyboard macro counter (@code{kmacro-add-counter}).
@item C-x C-k C-f
Specify the format for inserting the keyboard macro counter
(@code{kmacro-set-format}).
@end table
Each keyboard macro has an associated counter. Normally, the
macro counter is initialized to 0 when you start defining the macro,
and incremented by 1 after each insertion of the counter value;
@ -364,6 +381,12 @@ numbers stored in registers.
@node Keyboard Macro Query
@section Executing Macros with Variations
@table @kbd
@item C-x q
When this point is reached during macro execution, ask for confirmation
(@code{kbd-macro-query}).
@end table
@kindex C-x q
@findex kbd-macro-query
Using @kbd{C-x q} (@code{kbd-macro-query}), you can get an effect
@ -408,6 +431,17 @@ register as a counter, incrementing it on each repetition of the macro.
@node Save Keyboard Macro
@section Naming and Saving Keyboard Macros
@table @kbd
@item C-x C-k n
Give a command name (for the duration of the Emacs session) to the most
recently defined keyboard macro (@code{kmacro-name-last-macro}).
@item C-x C-k b
Bind the most recently defined keyboard macro to a key sequence (for
the duration of the session) (@code{kmacro-bind-to-key}).
@item M-x insert-kbd-macro
Insert in the buffer a keyboard macro's definition, as Lisp code.
@end table
@cindex saving keyboard macros
@findex kmacro-name-last-macro
@kindex C-x C-k n
@ -434,7 +468,7 @@ bindings, you should select the key sequence carefully. If you try to
bind to a key sequence with an existing binding (in any keymap), this
command asks you for confirmation before replacing the existing binding.
To avoid problems caused by overriding existing bindings, the key
To avoid problems caused by overriding existing bindings, the key
sequences @kbd{C-x C-k 0} through @kbd{C-x C-k 9} and @kbd{C-x C-k A}
through @kbd{C-x C-k Z} are reserved for your own keyboard macro
bindings. In fact, to bind to one of these key sequences, you only
@ -474,6 +508,16 @@ when you load the file.
@node Edit Keyboard Macro
@section Editing a Keyboard Macro
@table @kbd
@item C-x C-k C-e
Edit the last defined keyboard macro (@code{kmacro-edit-macro}).
@item C-x C-k e @var{name} @key{RET}
Edit a previously defined keyboard macro @var{name} (@code{edit-kbd-macro}).
@item C-x C-k l
Edit the last 100 keystrokes as a keyboard macro
(@code{kmacro-edit-lossage}).
@end table
@findex kmacro-edit-macro
@kindex C-x C-k C-e
@kindex C-x C-k RET

View file

@ -8,10 +8,10 @@
Every Emacs command has a name that you can use to run it. Commands
that are used often, or that must be quick to type, are also bound to
keys---short sequences of characters---for convenient use. You can
run them by name if you don't remember the keys. Other Emacs commands
that do not need to be quick are not bound to keys; the only way to
run them is by name. @xref{Key Bindings}, for the description of
how to bind commands to keys.
run them by typing the keys, or run them by name if you don't remember
the keys. Other Emacs commands that do not need to be quick are not
bound to keys; the only way to run them is by name. @xref{Key
Bindings}, for the description of how to bind commands to keys.
By convention, a command name consists of one or more words,
separated by hyphens; for example, @code{auto-fill-mode} or
@ -47,9 +47,9 @@ Note that @code{forward-char} is the same command that you invoke with
the key @kbd{C-f}. You can run any Emacs command by name using
@kbd{M-x}, whether or not any keys are bound to it.
If you type @kbd{C-g} while the command name is being read, you
cancel the @kbd{M-x} command and get out of the minibuffer, ending up
at command level.
If you type @kbd{C-g} while the command name is being read, that
cancels the @kbd{M-x} command and exits the minibuffer, so you end up
back at command level.
To pass a numeric argument to the command you are invoking with
@kbd{M-x}, specify the numeric argument before the @kbd{M-x}. @kbd{M-x}
@ -58,10 +58,11 @@ appears in the prompt while the command name is being read.
@vindex suggest-key-bindings
If the command you type has a key binding of its own, Emacs mentions
this in the echo area. For example, if you type @kbd{M-x
forward-word}, the message says that you can run the same command more
easily by typing @kbd{M-f}. You can turn off these messages by
setting @code{suggest-key-bindings} to @code{nil}.
this in the echo area after running the command. For example, if you
type @kbd{M-x forward-word}, the message says that you can run the
same command more easily by typing @kbd{M-f}. You can turn off these
messages by setting the variable @code{suggest-key-bindings} to
@code{nil}.
Normally, when describing in this manual a command that is run by
name, we omit the @key{RET} that is needed to terminate the name. Thus

View file

@ -130,7 +130,7 @@ One can still do copy and paste with another application from the Edit
menu.
On Mac, the role of the coding system for selection that is set by
@code{set-selection-coding-system} (@pxref{Specify Coding}) is
@code{set-selection-coding-system} (@pxref{Communication Coding}) is
two-fold. First, it is used as a preferred coding system for the
traditional text flavor that does not specify any particular encodings
and is mainly used by applications on Mac OS Classic. Second, it

View file

@ -65,10 +65,10 @@ because most lines in a program are usually indented
most of the time Emacs determines which mode to use based on the file
name or on special text in the file.
Explicit selection of a new major mode is done with a @kbd{M-x} command.
From the name of a major mode, add @code{-mode} to get the name of a
command to select that mode. Thus, you can enter Lisp mode by executing
@kbd{M-x lisp-mode}.
To explicitly select a new major, you use an @kbd{M-x} command.
Take the name of a major mode and add @code{-mode} to get the name of
the command to select that mode. Thus, you can enter Lisp mode by
executing @kbd{M-x lisp-mode}.
@vindex auto-mode-alist
When you visit a file, Emacs usually chooses the right major mode based

View file

@ -44,7 +44,6 @@ mark in the @dfn{mark ring}.
when there is one.
* Momentary Mark:: Enabling Transient Mark mode momentarily.
* Using Region:: Summary of ways to operate on contents of the region.
* Selective Undo:: Undoing within a given region.
* Marking Objects:: Commands to put region around textual units.
* Mark Ring:: Previous mark positions saved so you can go back there.
* Global Mark Ring:: Previous mark positions in various buffers.
@ -88,9 +87,11 @@ button one across a range of text; that puts point where you release the
mouse button, and sets the mark at the other end of that range. Or you
can click mouse button three, which sets the mark at point (like
@kbd{C-@key{SPC}}) and then moves point where you clicked (like
@kbd{Mouse-1}). Both of these methods copy the region into the kill
@kbd{Mouse-1}).
Using the mouse to mark a region copies the region into the kill
ring in addition to setting the mark; that gives behavior consistent
with other window-driven applications, but if you don't want to modify
with other window-driven applications. If you don't want to modify
the kill ring, you must use keyboard commands to set the mark.
@xref{Mouse Commands}.
@ -299,30 +300,12 @@ Print hardcopy with @kbd{M-x print-region} (@pxref{Printing}).
@item
Evaluate it as Lisp code with @kbd{M-x eval-region} (@pxref{Lisp Eval}).
@item
Undo changes within it using @kbd{C-u C-x u} (@pxref{Selective Undo}).
Undo changes within it using @kbd{C-u C-x u} (@pxref{Undo}).
@end itemize
Most commands that operate on the text in the region have the word
@code{region} in their names.
@node Selective Undo
@section Selective Undo
@cindex selective undo
@kindex C-u C-x u
Ordinary undo applies to all changes made in the current buffer. You
can also perform @dfn{selective undo}, limited to the current region
(@pxref{Mark}).
To do this, specify the region you want, then run the @code{undo}
command with a prefix argument (the value does not matter): @kbd{C-u
C-x u} or @kbd{C-u C-_}. This undoes the most recent change in the
region. To undo further changes in the same region, repeat the
@code{undo} command (no prefix argument is needed). In Transient Mark
mode (@pxref{Transient Mark}), any use of @code{undo} when there is an
active region performs selective undo; you do not need a prefix
argument.
@node Marking Objects
@section Commands to Mark Textual Objects
@ -368,12 +351,12 @@ point. If the prefix argument is @minus{}@var{n}, @kbd{M-h} also
marks @var{n} paragraphs, running back form the one surrounding point.
In that last case, point moves forward to the end of that paragraph,
and the mark goes at the start of the region. Repeating the @kbd{M-h}
command extends the region, just as with @kbd{M-@@} and @kbd{C-M-@@}.
command extends the region to subsequent paragraphs.
@kbd{C-M-h} (@code{mark-defun}) similarly puts point before, and the
mark after, the current (or following) major top-level definition, or
defun (@pxref{Moving by Defuns}). Repeating @kbd{C-M-h} also extends
the region.
defun (@pxref{Moving by Defuns}). Repeating @kbd{C-M-h} extends
the region to subsequent defuns.
@kbd{C-x C-p} (@code{mark-page}) puts point before the current page,
and mark at the end (@pxref{Pages}). The mark goes after the

View file

@ -9,7 +9,7 @@
This file documents Message, the Emacs message composition mode.
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005 Free Software Foundation, Inc.
2005, 2006 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
@ -1386,8 +1386,23 @@ trailing old subject. In this case,
@item message-alternative-emails
@vindex message-alternative-emails
A regexp to match the alternative email addresses. The first matched
address (not primary one) is used in the @code{From} field.
Regexp matching alternative email addresses. The first address in the
To, Cc or From headers of the original article matching this variable is
used as the From field of outgoing messages, replacing the default From
value.
For example, if you have two secondary email addresses john@@home.net
and john.doe@@work.com and want to use them in the From field when
composing a reply to a message addressed to one of them, you could set
this variable like this:
@lisp
(setq message-alternative-emails
(regexp-opt '("john@@home.net" "john.doe@@work.com")))
@end lisp
This variable has precedence over posting styles and anything that runs
off @code{message-setup-hook}.
@item message-allow-no-recipients
@vindex message-allow-no-recipients

View file

@ -419,7 +419,7 @@ the buffer @samp{*Async Shell Command*}. Output arrives in that
buffer regardless of whether it is visible in a window.
To specify a coding system for @kbd{M-!} or @kbd{M-|}, use the command
@kbd{C-x @key{RET} c} immediately beforehand. @xref{Specify Coding}.
@kbd{C-x @key{RET} c} immediately beforehand. @xref{Communication Coding}.
@vindex shell-command-default-error-buffer
Error output from the command is normally intermixed with the regular
@ -481,7 +481,7 @@ from. For example, if you use bash, the file sent to it is
To specify a coding system for the shell, you can use the command
@kbd{C-x @key{RET} c} immediately before @kbd{M-x shell}. You can also
specify a coding system after starting the shell by using @kbd{C-x
@key{RET} p} in the shell buffer. @xref{Specify Coding}.
@key{RET} p} in the shell buffer. @xref{Communication Coding}.
@cindex @env{EMACS} environment variable
Unless the environment variable @env{EMACS} is already defined,

View file

@ -344,7 +344,7 @@ the usual carriage-return linefeed.
@cindex DOS-to-Unix conversion of files
To visit a file and specify whether it uses DOS-style or Unix-style
end-of-line, specify a coding system (@pxref{Specify Coding}). For
end-of-line, specify a coding system (@pxref{Text Coding}). For
example, @kbd{C-x @key{RET} c unix @key{RET} C-x C-f foobar.txt}
visits the file @file{foobar.txt} without converting the EOLs; if some
line ends with a carriage-return linefeed pair, Emacs will display
@ -719,7 +719,7 @@ visit a file written on a DOS machine in another country), use the
the codepage, with completion, then creates the coding system for the
specified codepage. You can then use the new coding system to read and
write files, but you must specify it explicitly for the file command
when you want to use it (@pxref{Specify Coding}).
when you want to use it (@pxref{Text Coding}).
These coding systems are also useful for visiting a file encoded using
a DOS codepage, using Emacs running on some other operating system.

View file

@ -40,10 +40,7 @@ including European and Vietnamese variants of the Latin alphabet, as
well as Cyrillic, Devanagari (for Hindi and Marathi), Ethiopic, Greek,
Han (for Chinese and Japanese), Hangul (for Korean), Hebrew, IPA,
Kannada, Lao, Malayalam, Tamil, Thai, Tibetan, and Vietnamese scripts.
These features have been merged from the modified version of Emacs
known as MULE (for ``MULti-lingual Enhancement to GNU Emacs'')
Emacs also supports various encodings of these characters used by
Emacs also supports various encodings of these characters used by
other internationalized software, such as word processors and mailers.
Emacs allows editing text with international characters by supporting
@ -57,15 +54,15 @@ compilers, spell-checkers, and mailers). Setting your language
environment (@pxref{Language Environments}) takes care of setting up the
coding systems and other options for a specific language or culture.
Alternatively, you can specify how Emacs should encode or decode text
for each command; see @ref{Specify Coding}.
for each command; see @ref{Text Coding}.
@item
You can display non-@acronym{ASCII} characters encoded by the various scripts.
This works by using appropriate fonts on X and similar graphics
displays (@pxref{Defining Fontsets}), and by sending special codes to
text-only displays (@pxref{Specify Coding}). If some characters are
displayed incorrectly, refer to @ref{Undisplayable Characters}, which
describes possible problems and explains how to solve them.
You can display non-@acronym{ASCII} characters encoded by the various
scripts. This works by using appropriate fonts on graphics displays
(@pxref{Defining Fontsets}), and by sending special codes to text-only
displays (@pxref{Terminal Coding}). If some characters are displayed
incorrectly, refer to @ref{Undisplayable Characters}, which describes
possible problems and explains how to solve them.
@item
You can insert non-@acronym{ASCII} characters or search for them. To do that,
@ -73,12 +70,14 @@ you can specify an input method (@pxref{Select Input Method}) suitable
for your language, or use the default input method set up when you set
your language environment. If
your keyboard can produce non-@acronym{ASCII} characters, you can select an
appropriate keyboard coding system (@pxref{Specify Coding}), and Emacs
appropriate keyboard coding system (@pxref{Terminal Coding}), and Emacs
will accept those characters. Latin-1 characters can also be input by
using the @kbd{C-x 8} prefix, see @ref{Single-Byte Character Support,
C-x 8}. On X Window systems, your locale should be set to an
appropriate value to make sure Emacs interprets keyboard input
correctly; see @ref{Language Environments, locales}.
C-x 8}.
On X Window systems, your locale should be set to an appropriate value
to make sure Emacs interprets keyboard input correctly; see
@ref{Language Environments, locales}.
@end itemize
The rest of this chapter describes these issues in detail.
@ -93,7 +92,11 @@ correctly; see @ref{Language Environments, locales}.
* Coding Systems:: Character set conversion when you read and
write files, and so on.
* Recognize Coding:: How Emacs figures out which conversion to use.
* Specify Coding:: Various ways to choose which conversion to use.
* Text Coding:: Choosing conversion to use for file text.
* Communication Coding:: Coding systems for interprocess communication.
* File Name Coding:: Coding systems for file @emph{names}.
* Terminal Coding:: Specifying coding systems for converting
terminal input and output.
* Fontsets:: Fontsets are collections of fonts
that cover the whole spectrum of characters.
* Defining Fontsets:: Defining a new fontset.
@ -106,15 +109,16 @@ correctly; see @ref{Language Environments, locales}.
@node International Chars
@section Introduction to International Character Sets
The users of international character sets and scripts have established
many more-or-less standard coding systems for storing files. Emacs
internally uses a single multibyte character encoding, so that it can
intermix characters from all these scripts in a single buffer or string.
This encoding represents each non-@acronym{ASCII} character as a sequence of bytes
in the range 0200 through 0377. Emacs translates between the multibyte
character encoding and various other coding systems when reading and
writing files, when exchanging data with subprocesses, and (in some
cases) in the @kbd{C-q} command (@pxref{Multibyte Conversion}).
The users of international character sets and scripts have
established many more-or-less standard coding systems for storing
files. Emacs internally uses a single multibyte character encoding,
so that it can intermix characters from all these scripts in a single
buffer or string. This encoding represents each non-@acronym{ASCII}
character as a sequence of bytes in the range 0200 through 0377.
Emacs translates between the multibyte character encoding and various
other coding systems when reading and writing files, when exchanging
data with subprocesses, and (in some cases) in the @kbd{C-q} command
(@pxref{Multibyte Conversion}).
@kindex C-h h
@findex view-hello-file
@ -138,23 +142,24 @@ to multibyte characters, coding systems, and input methods.
@node Enabling Multibyte
@section Enabling Multibyte Characters
@cindex turn multibyte support on or off
You can enable or disable multibyte character support, either for
Emacs as a whole, or for a single buffer. When multibyte characters are
disabled in a buffer, then each byte in that buffer represents a
character, even codes 0200 through 0377. The old features for
supporting the European character sets, ISO Latin-1 and ISO Latin-2,
work as they did in Emacs 19 and also work for the other ISO 8859
character sets.
However, there is no need to turn off multibyte character support to
use ISO Latin; the Emacs multibyte character set includes all the
characters in these character sets, and Emacs can translate
automatically to and from the ISO codes.
By default, Emacs starts in multibyte mode, because that allows you to
use all the supported languages and scripts without limitations.
@cindex turn multibyte support on or off
You can enable or disable multibyte character support, either for
Emacs as a whole, or for a single buffer. When multibyte characters
are disabled in a buffer, we call that @dfn{unibyte mode}. Then each
byte in that buffer represents a character, even codes 0200 through
0377.
The old features for supporting the European character sets, ISO
Latin-1 and ISO Latin-2, work in unibyte mode as they did in Emacs 19
and also work for the other ISO 8859 character sets. However, there
is no need to turn off multibyte character support to use ISO Latin;
the Emacs multibyte character set includes all the characters in these
character sets, and Emacs can translate automatically to and from the
ISO codes.
To edit a particular file in unibyte representation, visit it using
@code{find-file-literally}. @xref{Visiting}. To convert a buffer in
multibyte representation into a single-byte representation of the same
@ -162,7 +167,7 @@ characters, the easiest way is to save the contents in a file, kill the
buffer, and find the file again with @code{find-file-literally}. You
can also use @kbd{C-x @key{RET} c}
(@code{universal-coding-system-argument}) and specify @samp{raw-text} as
the coding system with which to find or save a file. @xref{Specify
the coding system with which to find or save a file. @xref{Text
Coding}. Finding a file as @samp{raw-text} doesn't disable format
conversion, uncompression and auto mode selection as
@code{find-file-literally} does.
@ -209,8 +214,8 @@ load a Lisp file as unibyte, on any one occasion, by typing @kbd{C-x
The mode line indicates whether multibyte character support is enabled
in the current buffer. If it is, there are two or more characters (most
often two dashes) before the colon near the beginning of the mode line.
When multibyte characters are not enabled, just one dash precedes the
colon.
When multibyte characters are not enabled, nothing precedes the colon
except a single dash.
@node Language Environments
@section Language Environments
@ -314,12 +319,12 @@ file.
@findex describe-language-environment
To display information about the effects of a certain language
environment @var{lang-env}, use the command @kbd{C-h L @var{lang-env}
@key{RET}} (@code{describe-language-environment}). This tells you which
languages this language environment is useful for, and lists the
@key{RET}} (@code{describe-language-environment}). This tells you
which languages this language environment is useful for, and lists the
character sets, coding systems, and input methods that go with it. It
also shows some sample text to illustrate scripts used in this language
environment. By default, this command describes the chosen language
environment.
also shows some sample text to illustrate scripts used in this
language environment. If you give an empty input for @var{lang-env},
this command describes the chosen language environment.
@vindex set-language-environment-hook
You can customize any language environment with the normal hook
@ -483,9 +488,9 @@ language environment that it is meant to be used with. The variable
@findex toggle-input-method
@kindex C-\
Input methods use various sequences of @acronym{ASCII} characters to stand for
non-@acronym{ASCII} characters. Sometimes it is useful to turn off the input
method temporarily. To do this, type @kbd{C-\}
Input methods use various sequences of @acronym{ASCII} characters to
stand for non-@acronym{ASCII} characters. Sometimes it is useful to
turn off the input method temporarily. To do this, type @kbd{C-\}
(@code{toggle-input-method}). To reenable the input method, type
@kbd{C-\} again.
@ -674,13 +679,14 @@ variants @code{iso-latin-1-unix}, @code{iso-latin-1-dos} and
@code{iso-latin-1-mac}.
The coding system @code{raw-text} is good for a file which is mainly
@acronym{ASCII} text, but may contain byte values above 127 which are not meant to
encode non-@acronym{ASCII} characters. With @code{raw-text}, Emacs copies those
byte values unchanged, and sets @code{enable-multibyte-characters} to
@code{nil} in the current buffer so that they will be interpreted
properly. @code{raw-text} handles end-of-line conversion in the usual
way, based on the data encountered, and has the usual three variants to
specify the kind of end-of-line conversion to use.
@acronym{ASCII} text, but may contain byte values above 127 which are
not meant to encode non-@acronym{ASCII} characters. With
@code{raw-text}, Emacs copies those byte values unchanged, and sets
@code{enable-multibyte-characters} to @code{nil} in the current buffer
so that they will be interpreted properly. @code{raw-text} handles
end-of-line conversion in the usual way, based on the data
encountered, and has the usual three variants to specify the kind of
end-of-line conversion to use.
In contrast, the coding system @code{no-conversion} specifies no
character code conversion at all---none for non-@acronym{ASCII} byte values and
@ -822,16 +828,16 @@ pattern, are decoded correctly. One of the builtin
If Emacs recognizes the encoding of a file incorrectly, you can
reread the file using the correct coding system by typing @kbd{C-x
@key{RET} r @var{coding-system}
@key{RET}}. To see what coding system Emacs actually used to decode
the file, look at the coding system mnemonic letter near the left edge
of the mode line (@pxref{Mode Line}), or type @kbd{C-h C @key{RET}}.
@key{RET} r @var{coding-system} @key{RET}}. To see what coding system
Emacs actually used to decode the file, look at the coding system
mnemonic letter near the left edge of the mode line (@pxref{Mode
Line}), or type @kbd{C-h C @key{RET}}.
@findex unify-8859-on-decoding-mode
The command @code{unify-8859-on-decoding-mode} enables a mode that
``unifies'' the Latin alphabets when decoding text. This works by
converting all non-@acronym{ASCII} Latin-@var{n} characters to either Latin-1 or
Unicode characters. This way it is easier to use various
converting all non-@acronym{ASCII} Latin-@var{n} characters to either
Latin-1 or Unicode characters. This way it is easier to use various
Latin-@var{n} alphabets together. In a future Emacs version we hope
to move towards full Unicode support and complete unification of
character sets.
@ -843,7 +849,7 @@ system, by default, for operations that write from this buffer into a
file. This includes the commands @code{save-buffer} and
@code{write-region}. If you want to write files from this buffer using
a different coding system, you can specify a different coding system for
the buffer using @code{set-buffer-file-coding-system} (@pxref{Specify
the buffer using @code{set-buffer-file-coding-system} (@pxref{Text
Coding}).
You can insert any possible character into any Emacs buffer, but
@ -901,11 +907,12 @@ default value is @code{nil}, which means that Rmail files are not
translated (they are read and written in the Emacs internal character
code).
@node Specify Coding
@section Specifying a Coding System
@node Text Coding
@section Specifying a Coding System for File Text
In cases where Emacs does not automatically choose the right coding
system, you can use these commands to specify one:
system for a file's contents, you can use these commands to specify
one:
@table @kbd
@item C-x @key{RET} f @var{coding} @key{RET}
@ -919,32 +926,9 @@ command.
@item C-x @key{RET} r @var{coding} @key{RET}
Revisit the current file using the coding system @var{coding}.
@item C-x @key{RET} k @var{coding} @key{RET}
Use coding system @var{coding} for keyboard input.
@item C-x @key{RET} t @var{coding} @key{RET}
Use coding system @var{coding} for terminal output.
@item C-x @key{RET} p @var{input-coding} @key{RET} @var{output-coding} @key{RET}
Use coding systems @var{input-coding} and @var{output-coding} for
subprocess input and output in the current buffer.
@item C-x @key{RET} x @var{coding} @key{RET}
Use coding system @var{coding} for transferring selections to and from
other programs through the window system.
@item C-x @key{RET} F @var{coding} @key{RET}
Use coding system @var{coding} for encoding and decoding file
@emph{names}. This affects the use of non-ASCII characters in file
names. It has no effect on reading and writing the @emph{contents} of
files.
@item C-x @key{RET} X @var{coding} @key{RET}
Use coding system @var{coding} for transferring @emph{one}
selection---the next one---to or from the window system.
@item M-x recode-region
Convert the region from a previous coding system to a new one.
@item M-x recode-region @key{RET} @var{right} @key{RET} @var{wrong} @key{RET}
Convert a region that was decoded using coding system @var{wrong},
decoding it using coding system @var{right} instead.
@end table
@kindex C-x RET f
@ -978,10 +962,9 @@ contains characters that the coding system cannot handle.
Other file commands affected by a specified coding system include
@kbd{C-x C-i} and @kbd{C-x C-v}, as well as the other-window variants
of @kbd{C-x C-f}. @kbd{C-x @key{RET} c} also affects commands that
start subprocesses, including @kbd{M-x shell} (@pxref{Shell}).
If the immediately following command does not use the coding system,
then @kbd{C-x @key{RET} c} ultimately has no effect.
start subprocesses, including @kbd{M-x shell} (@pxref{Shell}). If the
immediately following command does not use the coding system, then
@kbd{C-x @key{RET} c} ultimately has no effect.
An easy way to visit a file with no conversion is with the @kbd{M-x
find-file-literally} command. @xref{Visiting}.
@ -1000,6 +983,136 @@ environment.
with @kbd{C-x @key{RET} r} (@code{revert-buffer-with-coding-system}).
This visits the current file again, using a coding system you specify.
@findex recode-region
If a piece of text has already been inserted into a buffer using the
wrong coding system, you can redo the decoding of it using @kbd{M-x
recode-region}. This prompts you for the proper coding system, then
for the wrong coding system that was actually used, and does the
conversion. It first encodes the region using the wrong coding system,
then decodes it again using the proper coding system.
@node Communication Coding
@section Coding Systems for Interprocess Communication
This section explains how to specify coding systems for use
in communication with other processes.
@table @kbd
@item C-x @key{RET} x @var{coding} @key{RET}
Use coding system @var{coding} for transferring selections to and from
other programs through the window system.
@item C-x @key{RET} X @var{coding} @key{RET}
Use coding system @var{coding} for transferring @emph{one}
selection---the next one---to or from the window system.
@item C-x @key{RET} p @var{input-coding} @key{RET} @var{output-coding} @key{RET}
Use coding systems @var{input-coding} and @var{output-coding} for
subprocess input and output in the current buffer.
@item C-x @key{RET} c @var{coding} @key{RET}
Specify coding system @var{coding} for the immediately following
command.
@end table
@kindex C-x RET x
@kindex C-x RET X
@findex set-selection-coding-system
@findex set-next-selection-coding-system
The command @kbd{C-x @key{RET} x} (@code{set-selection-coding-system})
specifies the coding system for sending selected text to other windowing
applications, and for receiving the text of selections made in other
applications. This command applies to all subsequent selections, until
you override it by using the command again. The command @kbd{C-x
@key{RET} X} (@code{set-next-selection-coding-system}) specifies the
coding system for the next selection made in Emacs or read by Emacs.
@kindex C-x RET p
@findex set-buffer-process-coding-system
The command @kbd{C-x @key{RET} p} (@code{set-buffer-process-coding-system})
specifies the coding system for input and output to a subprocess. This
command applies to the current buffer; normally, each subprocess has its
own buffer, and thus you can use this command to specify translation to
and from a particular subprocess by giving the command in the
corresponding buffer.
You can also use @kbd{C-x @key{RET} c} just before the command that
runs or starts a subprocess, to specify the coding system to use for
communication with that subprocess.
The default for translation of process input and output depends on the
current language environment.
@vindex locale-coding-system
@cindex decoding non-@acronym{ASCII} keyboard input on X
The variable @code{locale-coding-system} specifies a coding system
to use when encoding and decoding system strings such as system error
messages and @code{format-time-string} formats and time stamps. That
coding system is also used for decoding non-@acronym{ASCII} keyboard input on X
Window systems. You should choose a coding system that is compatible
with the underlying system's text representation, which is normally
specified by one of the environment variables @env{LC_ALL},
@env{LC_CTYPE}, and @env{LANG}. (The first one, in the order
specified above, whose value is nonempty is the one that determines
the text representation.)
@node File Name Coding
@section Coding Systems for File Names
@table @kbd
@item C-x @key{RET} F @var{coding} @key{RET}
Use coding system @var{coding} for encoding and decoding file
@emph{names}.
@end table
@vindex file-name-coding-system
@cindex file names with non-@acronym{ASCII} characters
The variable @code{file-name-coding-system} specifies a coding
system to use for encoding file names. It has no effect on reading
and writing the @emph{contents} of files.
@findex set-file-name-coding-system
@kindex C-x @key{RET} F
If you set the variable to a coding system name (as a Lisp symbol or
a string), Emacs encodes file names using that coding system for all
file operations. This makes it possible to use non-@acronym{ASCII}
characters in file names---or, at least, those non-@acronym{ASCII}
characters which the specified coding system can encode. Use @kbd{C-x
@key{RET} F} (@code{set-file-name-coding-system}) to specify this
interactively.
If @code{file-name-coding-system} is @code{nil}, Emacs uses a
default coding system determined by the selected language environment.
In the default language environment, any non-@acronym{ASCII}
characters in file names are not encoded specially; they appear in the
file system using the internal Emacs representation.
@strong{Warning:} if you change @code{file-name-coding-system} (or the
language environment) in the middle of an Emacs session, problems can
result if you have already visited files whose names were encoded using
the earlier coding system and cannot be encoded (or are encoded
differently) under the new coding system. If you try to save one of
these buffers under the visited file name, saving may use the wrong file
name, or it may get an error. If such a problem happens, use @kbd{C-x
C-w} to specify a new file name for that buffer.
@findex recode-file-name
If a mistake occurs when encoding a file name, use the command
@kbd{M-x recode-file-name} to change the file name's coding
system. This prompts for an existing file name, its old coding
system, and the coding system to which you wish to convert.
@node Terminal Coding
@section Coding Systems for Terminal I/O
@table @kbd
@item C-x @key{RET} k @var{coding} @key{RET}
Use coding system @var{coding} for keyboard input.
@item C-x @key{RET} t @var{coding} @key{RET}
Use coding system @var{coding} for terminal output.
@end table
@kindex C-x RET t
@findex set-terminal-coding-system
The command @kbd{C-x @key{RET} t} (@code{set-terminal-coding-system})
@ -1049,92 +1162,15 @@ the sequences that are translated are typically sequences of @acronym{ASCII}
printing characters. Coding systems typically translate sequences of
non-graphic characters.
@kindex C-x RET x
@kindex C-x RET X
@findex set-selection-coding-system
@findex set-next-selection-coding-system
The command @kbd{C-x @key{RET} x} (@code{set-selection-coding-system})
specifies the coding system for sending selected text to the window
system, and for receiving the text of selections made in other
applications. This command applies to all subsequent selections, until
you override it by using the command again. The command @kbd{C-x
@key{RET} X} (@code{set-next-selection-coding-system}) specifies the
coding system for the next selection made in Emacs or read by Emacs.
@kindex C-x RET p
@findex set-buffer-process-coding-system
The command @kbd{C-x @key{RET} p} (@code{set-buffer-process-coding-system})
specifies the coding system for input and output to a subprocess. This
command applies to the current buffer; normally, each subprocess has its
own buffer, and thus you can use this command to specify translation to
and from a particular subprocess by giving the command in the
corresponding buffer.
The default for translation of process input and output depends on the
current language environment.
@findex recode-region
If a piece of text has already been inserted into a buffer using the
wrong coding system, you can decode it again using @kbd{M-x
recode-region}. This prompts you for the old coding system and the
desired coding system, and acts on the text in the region.
@vindex file-name-coding-system
@cindex file names with non-@acronym{ASCII} characters
@findex set-file-name-coding-system
@kindex C-x @key{RET} F
The variable @code{file-name-coding-system} specifies a coding
system to use for encoding file names. If you set the variable to a
coding system name (as a Lisp symbol or a string), Emacs encodes file
names using that coding system for all file operations. This makes it
possible to use non-@acronym{ASCII} characters in file names---or, at
least, those non-@acronym{ASCII} characters which the specified coding
system can encode. Use @kbd{C-x @key{RET} F}
(@code{set-file-name-coding-system}) to specify this interactively.
If @code{file-name-coding-system} is @code{nil}, Emacs uses a default
coding system determined by the selected language environment. In the
default language environment, any non-@acronym{ASCII} characters in file names are
not encoded specially; they appear in the file system using the internal
Emacs representation.
@strong{Warning:} if you change @code{file-name-coding-system} (or the
language environment) in the middle of an Emacs session, problems can
result if you have already visited files whose names were encoded using
the earlier coding system and cannot be encoded (or are encoded
differently) under the new coding system. If you try to save one of
these buffers under the visited file name, saving may use the wrong file
name, or it may get an error. If such a problem happens, use @kbd{C-x
C-w} to specify a new file name for that buffer.
@findex recode-file-name
If a mistake occurs when encoding a file name, use the command
@kbd{M-x recode-file-name} to change the file name's coding
system. This prompts for an existing file name, its old coding
system, and the coding system to which you wish to convert.
@vindex locale-coding-system
@cindex decoding non-@acronym{ASCII} keyboard input on X
The variable @code{locale-coding-system} specifies a coding system
to use when encoding and decoding system strings such as system error
messages and @code{format-time-string} formats and time stamps. That
coding system is also used for decoding non-@acronym{ASCII} keyboard input on X
Window systems. You should choose a coding system that is compatible
with the underlying system's text representation, which is normally
specified by one of the environment variables @env{LC_ALL},
@env{LC_CTYPE}, and @env{LANG}. (The first one, in the order
specified above, whose value is nonempty is the one that determines
the text representation.)
@node Fontsets
@section Fontsets
@cindex fontsets
A font for X typically defines shapes for a single alphabet or script.
Therefore, displaying the entire range of scripts that Emacs supports
requires a collection of many fonts. In Emacs, such a collection is
called a @dfn{fontset}. A fontset is defined by a list of fonts, each
assigned to handle a range of character codes.
A font for X Windows typically defines shapes for a single alphabet
or script. Therefore, displaying the entire range of scripts that
Emacs supports requires a collection of many fonts. In Emacs, such a
collection is called a @dfn{fontset}. A fontset is defined by a list
of fonts, each assigned to handle a range of character codes.
Each fontset has a name, like a font. The available X fonts are
defined by the X server; fontsets, however, are defined within Emacs
@ -1148,11 +1184,11 @@ additional font support.}
Emacs creates two fontsets automatically: the @dfn{standard fontset}
and the @dfn{startup fontset}. The standard fontset is most likely to
have fonts for a wide variety of non-@acronym{ASCII} characters; however, this is
not the default for Emacs to use. (By default, Emacs tries to find a
font that has bold and italic variants.) You can specify use of the
standard fontset with the @samp{-fn} option, or with the @samp{Font} X
resource (@pxref{Font X}). For example,
have fonts for a wide variety of non-@acronym{ASCII} characters;
however, this is not the default for Emacs to use. (By default, Emacs
tries to find a font that has bold and italic variants.) You can
specify use of the standard fontset with the @samp{-fn} option, or
with the @samp{Font} X resource (@pxref{Font X}). For example,
@example
emacs -fn fontset-standard
@ -1295,13 +1331,13 @@ call this function explicitly to create a fontset.
@section Undisplayable Characters
There may be a some non-@acronym{ASCII} characters that your terminal cannot
display. Most non-windowing terminals support just a single character
display. Most text-only terminals support just a single character
set (use the variable @code{default-terminal-coding-system}
(@pxref{Specify Coding}) to tell Emacs which one); characters which
(@pxref{Terminal Coding}) to tell Emacs which one); characters which
can't be encoded in that coding system are displayed as @samp{?} by
default.
Windowing terminals can display a broader range of characters, but
Graphical displays can display a broader range of characters, but
you may not have fonts installed for all of them; characters that have
no font appear as a hollow box.
@ -1335,8 +1371,8 @@ such as @samp{Latin-@var{n}}.
For more information about unibyte operation, see @ref{Enabling
Multibyte}. Note particularly that you probably want to ensure that
your initialization files are read as unibyte if they contain non-@acronym{ASCII}
characters.
your initialization files are read as unibyte if they contain
non-@acronym{ASCII} characters.
@vindex unibyte-display-via-language-environment
Emacs can also display those characters, provided the terminal or font
@ -1377,11 +1413,11 @@ If your keyboard can generate character codes 128 (decimal) and up,
representing non-@acronym{ASCII} characters, you can type those character codes
directly.
On a window system, you should not need to do anything special to use
On a graphical display, you should not need to do anything special to use
these keys; they should simply work. On a text-only terminal, you
should use the command @code{M-x set-keyboard-coding-system} or the
variable @code{keyboard-coding-system} to specify which coding system
your keyboard uses (@pxref{Specify Coding}). Enabling this feature
your keyboard uses (@pxref{Terminal Coding}). Enabling this feature
will probably require you to use @kbd{ESC} to type Meta characters;
however, on a console terminal or in @code{xterm}, you can arrange for
Meta to be converted to @kbd{ESC} and still be able type 8-bit
@ -1417,11 +1453,11 @@ Use @kbd{C-x 8 C-h} to list all the available @kbd{C-x 8} translations.
Emacs groups all supported characters into disjoint @dfn{charsets}.
Each character code belongs to one and only one charset. For
historical reasons, Emacs typically divides an 8-bit character code
for an extended version of @acronym{ASCII} into two charsets: @acronym{ASCII}, which
covers the codes 0 through 127, plus another charset which covers the
``right-hand part'' (the codes 128 and up). For instance, the
characters of Latin-1 include the Emacs charset @code{ascii} plus the
Emacs charset @code{latin-iso8859-1}.
for an extended version of @acronym{ASCII} into two charsets:
@acronym{ASCII}, which covers the codes 0 through 127, plus another
charset which covers the ``right-hand part'' (the codes 128 and up).
For instance, the characters of Latin-1 include the Emacs charset
@code{ascii} plus the Emacs charset @code{latin-iso8859-1}.
Emacs characters belonging to different charsets may look the same,
but they are still different characters. For example, the letter

View file

@ -25,6 +25,11 @@ contains, use @kbd{M-x view-register}.
Display a description of what register @var{r} contains.
@end table
@dfn{Bookmarks} record files and positions in them, so you can
return to those positions when you look at the file again.
Bookmarks are similar enough in spirit to registers that they
seem to belong in this chapter.
@menu
* Position: RegPos. Saving positions in registers.
* Text: RegText. Saving text in registers.

View file

@ -41,7 +41,6 @@ found. When you have typed enough characters to identify the place you
want, you can stop. Depending on what you plan to do next, you may or
may not need to terminate the search explicitly with @key{RET}.
@c WideCommands
@table @kbd
@item C-s
Incremental search forward (@code{isearch-forward}).
@ -73,9 +72,9 @@ from the keyboard, and moves point past the next occurrence of those
characters. If you type @kbd{C-s} and then @kbd{F}, that puts the
cursor after the first @samp{F} (the first following the starting point, since
this is a forward search). Then if you type an @kbd{O}, you will see
the cursor move just after the first @samp{FO} (the @samp{F} in that
the cursor move to just after the first @samp{FO} (the @samp{F} in that
@samp{FO} may or may not be the first @samp{F}). After another
@kbd{O}, the cursor moves after the first @samp{FOO} after the place
@kbd{O}, the cursor moves to just after the first @samp{FOO} after the place
where you started the search. At each step, the buffer text that
matches the search string is highlighted, if the terminal can do that;
the current search string is always displayed in the echo area.
@ -135,19 +134,20 @@ string in the minibuffer without replacing it with items from the
search ring, type @kbd{M-e}. Type @kbd{C-s} or @kbd{C-r}
to terminate editing the string and search for it.
You can change to searching backwards with @kbd{C-r}. If a search fails
because the place you started was too late in the file, you should do this.
Repeated @kbd{C-r} keeps looking for more occurrences backwards. A
@kbd{C-s} starts going forwards again. @kbd{C-r} in a search can be canceled
You can change to searching backwards with @kbd{C-r}. For instance,
if you are searching forward but you realize you were looking for
something above the starting point, you can do this. Repeated
@kbd{C-r} keeps looking for more occurrences backwards. A @kbd{C-s}
starts going forwards again. @kbd{C-r} in a search can be canceled
with @key{DEL}.
@kindex C-r
@findex isearch-backward
If you know initially that you want to search backwards, you can use
@kbd{C-r} instead of @kbd{C-s} to start the search, because @kbd{C-r} as
a key runs a command (@code{isearch-backward}) to search backward. A
backward search finds matches that are entirely before the starting
point, just as a forward search finds matches that begin after it.
@kbd{C-r} instead of @kbd{C-s} to start the search, because @kbd{C-r}
as a key runs a command (@code{isearch-backward}) to search backward.
A backward search finds matches that end before the starting point,
just as a forward search finds matches that begin after it.
@node Error in Isearch
@subsection Errors in Incremental Search
@ -281,50 +281,46 @@ If you don't like this feature, you can turn it off by setting
@cindex faces for highlighting search matches
You can control how this highlighting looks by customizing the faces
@code{isearch} (used for the current match) and @code{lazy-highlight}
(for all the other matches). The latter is also used for other matches
inside @code{query-replace}.
(for all the other matches).
@node Isearch Scroll
@subsection Scrolling During Incremental Search
Vertical scrolling during incremental search can be enabled by
setting the customizable variable @code{isearch-allow-scroll} to a
non-@code{nil} value.
You can then use the vertical scroll-bar or certain keyboard
You can enable the use of vertical scrolling during incremental
search (without exiting the search) by setting the customizable
variable @code{isearch-allow-scroll} to a non-@code{nil} value. This
applies to using the vertical scroll-bar and to certain keyboard
commands such as @kbd{@key{PRIOR}} (@code{scroll-down}),
@kbd{@key{NEXT}} (@code{scroll-up}) and @kbd{C-l} (@code{recenter})
within the search, thus letting you see more of the text near the
current match. You must run these commands via their key sequences to
stay in the search---typing M-x @var{command-name} will always
terminate a search.
@kbd{@key{NEXT}} (@code{scroll-up}) and @kbd{C-l} (@code{recenter}).
You must run these commands via their key sequences to stay in the
search---typing @kbd{M-x} will terminate the search. You can give
prefix arguments to these commands in the usual way.
You can give prefix arguments to these commands in the usual way.
The current match cannot be scrolled out of the window---this is
intentional.
This feature won't let you scroll the current match out of visibility,
however.
Several other commands, such as @kbd{C-x 2}
The feature also affects some other commands, such as @kbd{C-x 2}
(@code{split-window-vertically}) and @kbd{C-x ^}
(@code{enlarge-window}) which don't scroll the window, are
nevertheless made available under this rubric, since they are likewise
handy during a search.
(@code{enlarge-window}) which don't exactly scroll but do affect where
the text appears on the screen. In general, it applies to any command
whose name has a non-@code{nil} @code{isearch-scroll} property. So you
can control which commands are affected by changing these properties.
You can make other commands usable within an incremental search by
giving the command a non-@code{nil} @code{isearch-scroll} property.
For example, to make @kbd{C-h l} usable within an incremental search
For example, to make @kbd{C-h l} usable within an incremental search
in all future Emacs sessions, use @kbd{C-h c} to find what command it
runs. (You type @kbd{C-h c C-h l}; it says @code{view-lossage}.) Then
you can put the following line in your @file{.emacs} file (@pxref{Init File}):
runs. (You type @kbd{C-h c C-h l}; it says @code{view-lossage}.)
Then you can put the following line in your @file{.emacs} file
(@pxref{Init File}):
@example
(put 'view-lossage 'isearch-scroll t)
@end example
@noindent
This works for commands that don't permanently change point, the
buffer contents, the match data, the current buffer, or the selected
window and frame. The command must not delete the current window and
must not itself attempt an incremental search.
This feature can be applied to any command that doesn't permanently
change point, the buffer contents, the match data, the current buffer,
or the selected window and frame. The command must not itself attempt
an incremental search.
@node Slow Isearch
@subsection Slow Terminal Incremental Search
@ -387,7 +383,7 @@ which specifies a word search.
commands @code{search-forward} and @code{search-backward}. These
commands may be bound to keys in the usual manner. The feature that you
can get to them via the incremental search commands exists for
historical reasons, and to avoid the need to find key sequences
historical reasons, and to avoid the need to find separate key sequences
for them.
@node Word Search
@ -427,7 +423,7 @@ by constructing a regular expression and searching for that; see
@code{word-search-forward} and @code{word-search-backward}. These
commands may be bound to keys in the usual manner. They are available
via the incremental search commands both for historical reasons and
to avoid the need to find suitable key sequences for them.
to avoid the need to find separate key sequences for them.
@node Regexp Search
@section Regular Expression Search
@ -468,10 +464,10 @@ defaults. They also have separate search rings that you can access with
If you type @key{SPC} in incremental regexp search, it matches any
sequence of whitespace characters, including newlines. If you want to
match just a space, type @kbd{C-q @key{SPC}}. You can control what a
bare spece matches by setting the variable
bare space matches by setting the variable
@code{search-whitespace-regexp} to the desired regexp.
Note that adding characters to the regexp in an incremental regexp
In some cases, adding characters to the regexp in an incremental regexp
search can make the cursor move back and start again. For example, if
you have searched for @samp{foo} and you add @samp{\|bar}, the cursor
backs up in case the first @samp{bar} precedes the first @samp{foo}.
@ -932,7 +928,7 @@ of the pattern and asks you whether to replace it.
The replace commands normally operate on the text from point to the
end of the buffer; however, in Transient Mark mode (@pxref{Transient
Mark}), when the mark is active, they operate on the region. The
replace commands all replace one string (or regexp) with one
basic replace commands replace one string (or regexp) with one
replacement string. It is possible to perform several replacements in
parallel using the command @code{expand-region-abbrevs}
(@pxref{Expanding Abbrevs}).
@ -1246,7 +1242,7 @@ Mark mode.
@findex list-matching-lines
@findex occur
@findex multi-occur
@findex multi-occur-by-filename-regexp
@findex multi-occur-in-matching-buffers
@findex how-many
@findex delete-non-matching-lines
@findex delete-matching-lines
@ -1273,19 +1269,21 @@ searched and moves point to the original of the chosen occurrence.
@kbd{o} and @kbd{C-o} display the match in another window; @kbd{C-o}
does not select it.
Occur mode supports the @code{next-error} functionality described in
@ref{Compilation Mode}.
After using @kbd{M-x occur}, you can use @code{next-error} to visit
the occurrences found, one by one. @ref{Compilation Mode}.
@item M-x list-matching-lines
Synonym for @kbd{M-x occur}.
@item M-x multi-occur @key{RET} @var{buffers} @key{RET} @var{regexp} @key{RET}
This function is just like @code{occur}, except it is able to search
through multiple buffers.
through multiple buffers. It asks you to specify the buffer names one by one.
@item M-x multi-occur-by-filename-regexp @key{RET} @var{bufregexp} @key{RET} @var{regexp} @key{RET}
@item M-x multi-occur-in-matching-buffers @key{RET} @var{bufregexp} @key{RET} @var{regexp} @key{RET}
This function is similar to @code{multi-occur}, except the buffers to
search are specified by a regexp on their filename.
search are specified by a regular expression that matches visited
filenames. With a prefix argument, it uses the regular expression to match
buffer names instead.
@item M-x how-many @key{RET} @var{regexp} @key{RET}
Print the number of matches for @var{regexp} that exist in the buffer

View file

@ -29,24 +29,24 @@ one frame.
Each Emacs window displays one Emacs buffer at any time. A single
buffer may appear in more than one window; if it does, any changes in
its text are displayed in all the windows where it appears. But the
windows showing the same buffer can show different parts of it, because
each window has its own value of point.
its text are displayed in all the windows where it appears. But these
windows can show different parts of the buffer, because each window
has its own value of point.
@cindex selected window
At any time, one of the windows is the @dfn{selected window}; the
At any time, one Emacs window is the @dfn{selected window}; the
buffer this window is displaying is the current buffer. The terminal's
cursor shows the location of point in this window. Each other window
has a location of point as well. On text-only terminals, there is no
way to show where those locations are, since the terminal has only one
cursor. If you are using a window system, the location of point in a
non-selected window is indicated by a hollow box. The cursor in the
cursor. On a graphical display, the location of point in a
non-selected window is indicated by a hollow box; the cursor in the
selected window is blinking or solid.
Commands to move point affect the value of point for the selected Emacs
window only. They do not change the value of point in any other Emacs
window, even one showing the same buffer. The same is true for commands
such as @kbd{C-x b} to change the current buffer in the selected window;
window only. They do not change the value of point in other Emacs
windows, even those showing the same buffer. The same is true for commands
such as @kbd{C-x b} to switch buffers in the selected window;
they do not affect other windows at all. However, there are other commands
such as @kbd{C-x 4 b} that select a different window and switch buffers in
it. Also, all commands that display information in a window, including
@ -129,8 +129,7 @@ inevitable. If this variable is @code{nil}, then @kbd{C-x 2} tries to
avoid scrolling the text currently visible on the screen, by putting
point in each window at a position already visible in the window. It
also selects whichever window contains the screen line that the cursor
was previously on. Some users prefer the latter mode on slow
terminals.
was previously on. Some users prefer that mode on slow terminals.
@node Other Window
@section Using Other Windows
@ -283,17 +282,6 @@ Shrink this window if its buffer doesn't need so many lines
(@code{shrink-window-if-larger-than-buffer}).
@item C-x +
Make all windows the same height (@code{balance-windows}).
@item Drag-Mouse-1
Dragging a window's mode line up or down with @kbd{Mouse-1} changes
window heights.
@item Mouse-2
@kbd{Mouse-2} in a window's mode line deletes all other windows in the frame
(@code{mouse-delete-other-windows}).
@item Mouse-3
@kbd{Mouse-3} in a window's mode line deletes that window
(@code{mouse-delete-window}), unless the frame has only one window, in
which case it buries the current buffer instead and switches to another
buffer.
@end table
@kindex C-x 0
@ -320,19 +308,6 @@ different way; it deletes all the windows except the selected one (and
the minibuffer); the selected window expands to use the whole frame
except for the echo area.
You can also delete a window by clicking on its mode line with
@kbd{Mouse-3}, and delete all the windows in a frame except one window
by clicking on that window's mode line with @kbd{Mouse-2}.
You can also adjust window heights and widths with the mouse. If
you press @kbd{Mouse-1} on a mode line, you can drag that mode line up
or down, changing the heights of the windows above and below it. If
you press it on the divider between two consecutive mode lines, you
can drag that divider right or left, changing the widths of the
windows to either side. Note that changing heights and widths with
the mouse never deletes windows, it just refuses to make any window
smaller than it can be.
@kindex C-x ^
@findex enlarge-window
@kindex C-x @}
@ -341,7 +316,7 @@ smaller than it can be.
@vindex window-min-width
To readjust the division of space among vertically adjacent windows,
use @kbd{C-x ^} (@code{enlarge-window}). It makes the currently
selected window get one line bigger, or as many lines as is specified
selected window one line bigger, or as many lines as is specified
with a numeric argument. With a negative argument, it makes the
selected window smaller. @kbd{C-x @}}
(@code{enlarge-window-horizontally}) makes the selected window wider by
@ -349,10 +324,10 @@ the specified number of columns. @kbd{C-x @{}
(@code{shrink-window-horizontally}) makes the selected window narrower
by the specified number of columns.
When you make a window bigger, the space comes from one of its
neighbors. If this makes any window too small, it is deleted and its
space is given to an adjacent window. The minimum size is specified by
the variables @code{window-min-height} and @code{window-min-width}.
When you make a window bigger, the space comes from its peers. If
this makes any window too small, it is deleted and its space is given
to an adjacent window. The minimum size is specified by the variables
@code{window-min-height} and @code{window-min-width}.
@kindex C-x -
@findex shrink-window-if-larger-than-buffer
@ -366,6 +341,9 @@ gives the extra lines to other windows in the frame.
You can also use @kbd{C-x +} (@code{balance-windows}) to even out the
heights of all the windows in the selected frame.
Mouse clicks on the mode line provide another way to change window
heights and to delete windows. @xref{Mode Line Mouse}.
@node Window Convenience
@section Window Handling Convenience Features and Customization

View file

@ -1,3 +1,13 @@
2006-02-02 Kenichi Handa <handa@m17n.org>
* coding.c (decode_composition_emacs_mule): Fix handling of
incorrect format data.
2006-01-31 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
* gtkutil.c (update_frame_tool_bar): Use new tool bar functions
(gtk_toolbar_insert) so we can have tool bars of different sizes.
2006-01-30 Luc Teirlinck <teirllm@auburn.edu>
* data.c (Flistp): Doc fix.

View file

@ -868,7 +868,7 @@ decode_composition_emacs_mule (coding, src, src_end,
component[ncomponent] = c;
}
}
else
else if (c >= 0x80)
{
/* This may be an old Emacs 20 style format. See the comment at
the section 2 of this file. */
@ -920,6 +920,8 @@ decode_composition_emacs_mule (coding, src, src_end,
else
return 0;
}
else
return 0;
if (buf == bufp || dst + (bufp - buf) <= (dst_bytes ? dst_end : src))
{

View file

@ -3359,9 +3359,7 @@ xg_tool_bar_help_callback (w, event, client_data)
Lisp_Object help, frame;
if (! GTK_IS_BUTTON (w))
{
return FALSE;
}
return FALSE;
if (! f || ! f->n_tool_bar_items || NILP (f->tool_bar_items))
return FALSE;
@ -3596,54 +3594,56 @@ update_frame_tool_bar (f)
if (! wicon)
{
GtkWidget *w = xg_get_image_for_pixmap (f, img, x->widget, NULL);
GtkToolItem *ti = gtk_tool_button_new (w, "");
gtk_misc_set_padding (GTK_MISC (w), hmargin, vmargin);
gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget),
ti,
i);
/* The EMACS_INT cast avoids a warning. */
gtk_toolbar_append_item (GTK_TOOLBAR (x->toolbar_widget),
0, 0, 0,
w,
GTK_SIGNAL_FUNC (xg_tool_bar_callback),
(gpointer) (EMACS_INT) i);
g_signal_connect (GTK_WIDGET (ti), "clicked",
GTK_SIGNAL_FUNC (xg_tool_bar_callback),
(gpointer) (EMACS_INT) i);
gtk_widget_show (GTK_WIDGET (ti));
gtk_widget_show (GTK_WIDGET (w));
/* Save the image so we can see if an update is needed when
this function is called again. */
g_object_set_data (G_OBJECT (w), XG_TOOL_BAR_IMAGE_DATA,
(gpointer)img->pixmap);
g_object_set_data (G_OBJECT (ti), XG_FRAME_DATA, (gpointer)f);
/* Catch expose events to overcome an annoying redraw bug, see
comment for xg_tool_bar_item_expose_callback. */
g_signal_connect (G_OBJECT (w),
g_signal_connect (G_OBJECT (ti),
"expose-event",
G_CALLBACK (xg_tool_bar_item_expose_callback),
0);
/* We must set sensitive on the button that is the parent
of the GtkImage parent. Go upwards until we find the button. */
gtk_widget_set_sensitive (GTK_WIDGET (ti), enabled_p);
gtk_tool_item_set_homogeneous (GTK_TOOL_ITEM (ti), FALSE);
while (! GTK_IS_BUTTON (w))
w = gtk_widget_get_parent (w);
if (w)
{
/* Save the frame in the button so the xg_tool_bar_callback
can get at it. */
g_object_set_data (G_OBJECT (w), XG_FRAME_DATA, (gpointer)f);
gtk_widget_set_sensitive (w, enabled_p);
g_object_set_data (G_OBJECT (w), XG_FRAME_DATA, (gpointer)f);
/* Use enter/leave notify to show help. We use the events
rather than the GtkButton specific signals "enter" and
"leave", so we can have only one callback. The event
will tell us what kind of event it is. */
/* The EMACS_INT cast avoids a warning. */
g_signal_connect (G_OBJECT (w),
"enter-notify-event",
G_CALLBACK (xg_tool_bar_help_callback),
(gpointer) (EMACS_INT) i);
g_signal_connect (G_OBJECT (w),
"leave-notify-event",
G_CALLBACK (xg_tool_bar_help_callback),
(gpointer) (EMACS_INT) i);
}
/* Use enter/leave notify to show help. We use the events
rather than the GtkButton specific signals "enter" and
"leave", so we can have only one callback. The event
will tell us what kind of event it is. */
/* The EMACS_INT cast avoids a warning. */
g_signal_connect (G_OBJECT (w),
"enter-notify-event",
G_CALLBACK (xg_tool_bar_help_callback),
(gpointer) (EMACS_INT) i);
g_signal_connect (G_OBJECT (w),
"leave-notify-event",
G_CALLBACK (xg_tool_bar_help_callback),
(gpointer) (EMACS_INT) i);
}
else
{