Patches applied:

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

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

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

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

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

 * emacs@sv.gnu.org/emacs--devo--0--patch-271
   Rename "field-at-point" to "field-at-pos"

 * emacs@sv.gnu.org/emacs--devo--0--patch-272
   (comint-insert-input): Remove redundant calls to setq and goto-char

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-556
This commit is contained in:
Karoly Lorentey 2006-05-10 15:04:01 +00:00
commit 8dadeb1e1f
122 changed files with 8155 additions and 5713 deletions

View file

@ -1,3 +1,9 @@
2006-05-06 Eli Zaretskii <eliz@gnu.org>
* Makefile.in (INFO_FILES): Remove emacs-xtra.
* info/dir: Remove the Emacs-Xtra entry.
2006-04-20 Ramprasad B <ramprasad_i82@yahoo.com>
* Copyright (sources/emacs): updated copyright year(s)

View file

@ -135,7 +135,7 @@ man1dir=$(mandir)/man1
# system, it is inappropriate to imply that it is part of Emacs.
infodir=@infodir@
INFO_FILES=ada-mode autotype calc ccmode cl dired-x ebrowse ediff efaq \
elisp eintr emacs emacs-mime emacs-xtra eshell eudc flymake \
elisp eintr emacs emacs-mime eshell eudc flymake \
forms gnus idlwave info message mh-e newsticker org pcl-cvs \
pgg reftex sc ses sieve speedbar tramp vip viper widget \
woman smtpmail url rcirc erc

View file

@ -1,3 +1,8 @@
2006-05-06 Bill Wohler <wohler@newt.com>
* FOR-RELEASE: MH-E 8.0 has been released, so removed reminder
about it.
2006-04-17 Ramprasad B <ramprasad_i82@yahoo.com>
* ./* (Copyright): Updated Copyright year(s)

View file

@ -26,9 +26,6 @@ face name prefixes should be in it for good results.
** Send an email to the various distributions, including the GNOME
and KDE projects, to use the new Emacs icons in etc/images/icons.
** Ensure MH-E 8.0 has been released.
Assigned to Bill Wohler <wohler@newt.com>.
* BUGS
** JD Smith's 17 Apr 2006 bug report that CVS operations

View file

@ -1,3 +1,9 @@
2006-05-06 Bill Wohler <wohler@newt.com>
Release MH-E version 8.0.
* NEWS, MH-E-NEWS: Update for MH-E release 8.0.
2006-04-28 Bill Wohler <wohler@newt.com>
Release MH-E version 7.95.

File diff suppressed because it is too large Load diff

View file

@ -571,18 +571,18 @@ can be edited for each replacement.
*** The current match in query-replace is highlighted in new face
`query-replace' which by default inherits from isearch face.
** File operation changes:
+++
*** Unquoted `$' in file names do not signal an error any more when
the corresponding environment variable does not exist.
Instead, the `$ENVVAR' text is left as is, so that `$$' quoting
is only rarely needed.
** Local variables lists:
+++
*** In processing a local variables list, Emacs strips the prefix and
suffix from every line before processing all the lines.
+++
*** Text properties in local variables.
A file local variables list cannot specify a string with text
properties--any specified text properties are discarded.
+++
*** If the local variables list contains any variable-value pairs that
are not known to be safe, Emacs shows a prompt asking whether to apply
@ -590,7 +590,7 @@ the local variables list as a whole. In earlier versions, a prompt
was only issued for variables explicitly marked as risky (for the
definition of risky variables, see `risky-local-variable-p').
At the prompt, the user can choose to save the contents of this local
At the prompt, you can choose to save the contents of this local
variables list to `safe-local-variable-values'. This new customizable
option is a list of variable-value pairs that are known to be safe.
Variables can also be marked as safe with the existing
@ -598,6 +598,38 @@ Variables can also be marked as safe with the existing
However, risky variables will not be added to
`safe-local-variable-values' in this way.
+++
*** The variable `enable-local-variables' controls how local variable
lists are handled. t, the default, specifies the standard querying
behavior. :safe means use only safe values, and ignore the rest.
nil means ignore them all. Anything else means always query.
+++
*** The variable `safe-local-eval-forms' specifies a list of forms that
are ok to evaluate when they appear in an `eval' local variables
specification. Normally Emacs asks for confirmation before evaluating
such a form, but if the form appears in this list, no confirmation is
needed.
+++
*** If a function has a non-nil `safe-local-eval-function' property,
that means it is ok to evaluate some calls to that function when it
appears in an `eval' local variables specification. If the property
is t, then any form calling that function with constant arguments is
ok. If the property is a function or list of functions, they are called
with the form as argument, and if any returns t, the form is ok to call.
If the form is not "ok to call", that means Emacs asks for
confirmation as before.
** File operation changes:
+++
*** Unquoted `$' in file names do not signal an error any more when
the corresponding environment variable does not exist.
Instead, the `$ENVVAR' text is left as is, so that `$$' quoting
is only rarely needed.
+++
*** find-file-read-only visits multiple files in read-only mode,
when the file name contains wildcard characters.
@ -3055,7 +3087,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.95. There have been major changes since
Upgraded to MH-E version 8.0. There have been major changes since
version 5.0.2; see MH-E-NEWS for details.
** Calendar changes:
@ -3557,6 +3589,15 @@ It modifies the list destructively, like `delete'. Of several `equal'
occurrences of an element in the list, the one that's kept is the
first one.
+++
*** New function `add-to-history' adds an element to a history list.
Lisp packages should use this function to add elements to their
history lists.
If `history-delete-duplicates' is non-nil, it removes duplicates of
the new element from the history list it updates.
+++
*** New function `rassq-delete-all'.
@ -3994,38 +4035,6 @@ the minibuffer with a default value: if DEF is non-nil, the minibuffer
prompt provided in PROMPT is edited to show the default value provided
in DEF before the terminal colon and space.
** Local variables lists:
+++
*** Text properties in local variables.
A file local variables list cannot specify a string with text
properties--any specified text properties are discarded.
+++
*** The variable `enable-local-variables' controls how local variable
lists are handled. t, the default, specifies the standard querying
behavior. :safe means use only safe values, and ignore the rest.
nil means ignore them all. Anything else means always query.
+++
*** The variable `safe-local-eval-forms' specifies a list of forms that
are ok to evaluate when they appear in an `eval' local variables
specification. Normally Emacs asks for confirmation before evaluating
such a form, but if the form appears in this list, no confirmation is
needed.
---
*** If a function has a non-nil `safe-local-eval-function' property,
that means it is ok to evaluate some calls to that function when it
appears in an `eval' local variables specification. If the property
is t, then any form calling that function with constant arguments is
ok. If the property is a function or list of functions, they are called
with the form as argument, and if any returns t, the form is ok to call.
If the form is not "ok to call", that means Emacs asks for
confirmation as before.
** Searching and matching changes:
+++

View file

@ -32,7 +32,6 @@ Emacs
* CL: (cl). Partial Common Lisp support for Emacs Lisp.
* Dired-X: (dired-x). Dired Extra Features.
* Ediff: (ediff). A visual interface for comparing and merging programs.
* Emacs-Xtra: (emacs-xtra). Specialized Emacs features.
* Org Mode: (org). Outline-based notes management and organizer.
* PCL-CVS: (pcl-cvs). Emacs front-end to CVS.
* Speedbar: (speedbar). File/Tag summarizing utility.

View file

@ -1,3 +1,242 @@
2006-05-09 Miles Bader <miles@gnu.org>
* comint.el (comint-insert-input): Remove redundant calls to setq
and goto-char.
2006-05-10 Nick Roberts <nickrob@snap.net.nz>
* comint.el (comint-insert-input): Make it work when
comint-use-prompt-regexp is t.
2006-05-10 Miles Bader <miles@gnu.org>
* subr.el (field-at-pos): New function.
* comint.el (comint-insert-input): Use it.
2006-05-09 Juri Linkov <juri@jurta.org>
* battery.el (battery-linux-proc-acpi): Also try
`/proc/acpi/thermal_zone/THR2/temperature'.
* files.el <safe-local-variable>: Remove `eval' and `let' binding
for now unused lambda `string-or-null'.
* add-log.el (change-log-default-name): Put `string-or-null-p'
instead of lambda on `safe-local-variable' property.
* diff-mode.el (diff-context->unified): Use `region-beginning' and
`region-end' instead of `mark' and `point'.
(diff-unified->context, diff-reverse-direction, diff-fixup-modifs):
Operate on region in Transient Mark mode when the mark is active.
Use `region-beginning' and `region-end' instead of `mark' and
`point'.
(diff-hunk-text, diff-goto-source): Doc fix.
* startup.el (fancy-splash-screens, normal-splash-screen): Use
face `mode-line-buffer-id' for mode-line buffer face instead of
hard-coded `(:weight bold)'.
* arc-mode.el (archive-set-buffer-as-visiting-file): Bind
buffer-undo-list to t (undo-ask is reproducible by visiting
nested archives).
2006-05-09 Kim F. Storm <storm@cua.dk>
* progmodes/grep.el (rgrep): Set default directory of *grep*
buffer if we start M-x rgrep in the *grep* buffer and choose
a different base directory.
2006-05-09 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (tramp-register-file-name-handlers): Enable Tramp
completion also when ido is loaded.
2006-05-09 Masatake YAMATO <jet@gyve.org>
* font-lock.el (cpp-font-lock-keywords-source-directives): Addded
"warning" and "import".
(cpp-font-lock-keywords): Added "warning".
2006-05-08 Dan Nicolaescu <dann@ics.uci.edu>
* term/xterm.el (terminal-init-xterm): Add more key bindings.
2006-05-08 Stefan Monnier <monnier@iro.umontreal.ca>
* mwheel.el (mwheel-scroll): Make sure that when scrolling multiple
pages at a time, if we signal the end, we should indeed reach that end.
2006-05-08 David Reitter <david.reitter@gmail.com>
* emacs-lisp/easy-mmode.el (define-minor-mode): Only preserve messages
output during execution of the body.
2006-05-08 Kim F. Storm <storm@cua.dk>
* progmodes/grep.el (lgrep, rgrep): Doc fixes.
2006-05-08 Thien-Thi Nguyen <ttn@gnu.org>
* emacs-lisp/ewoc.el (ewoc--set-buffer-bind-dll-let*):
Use with-current-buffer.
2006-05-07 Kim F. Storm <storm@cua.dk>
* subr.el (add-to-history): Remove keep-dups arg.
* kmacro.el (kmacro-push-ring): Let-bind history-delete-duplicates
to nil around call to add-to-history.
2006-05-07 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/syntax.el (syntax-ppss): Flush the cache before rather
than after a buffer modification.
2006-05-08 Nick Roberts <nickrob@snap.net.nz>
* progmodes/gdb-ui.el (gdb-var-create-handler): Move speedbar
call to...
(gud-watch): ...here so speedbar is raised for already watched
expressions.
(gdb-speedbar-refresh): Delete function.
(gdb-speedbar-update, gdb-speedbar-timer-fn): New functions.
Use speedbar-timer-fn instead of speedbar-refresh (reverting
earlier change).
(gdb-var-evaluate-expression-handler)
(gdb-var-list-children-handler-1, gdb-var-update-handler-1): Use it.
* speedbar.el (speedbar-timer-fn): Remove save-window-excursion.
Update localized contents for all buffers except ignored modes.
2006-05-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* term/mac-win.el (mac-utxt-to-string): Use `eq' instead of `='.
(mac-atsu-font-table, mac-font-panel-mode): Add defvars.
(mac-bytes-to-digits, mac-handle-toolbar-switch-mode)
(mac-handle-font-panel-closed, mac-handle-font-selection):
New functions.
(mac-font-panel-mode): New minor mode.
(mac-apple-event-map): Add bindings for toolbar toggle button and
font panel.
(menu-bar-showhide-menu): Add mac-font-panel-mode.
2006-05-07 John Paul Wallington <jpw@pobox.com>
* ibuffer.el (ibuffer-compressed-file-name-regexp):
Avoid `regexp-opt'; simplify regexp for readability.
2006-05-06 Eli Zaretskii <eliz@gnu.org>
* ldefs-boot.el (dired-do-redisplay, dired-maybe-insert-subdir):
* files.el (buffer-stale-function):
* dired-aux.el (dired-do-redisplay, dired-maybe-insert-subdir):
* autorevert.el (global-auto-revert-non-file-buffers): Point Info
links to the main manual, not to emacs-xtra.
2006-05-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* term/mac-win.el: (mac-utxt-to-string): Don't make adjustment for
MacJapanese if text is ASCII-only.
2006-05-06 Nick Roberts <nickrob@snap.net.nz>
* progmodes/gdb-ui.el (gdb-goto-breakpoint): Use or instead of
unless so nil isn't returned.
(gdb-setup-windows, gdb-restore-windows): Reset gdb-source-window.
2006-05-06 Kim F. Storm <storm@cua.dk>
* subr.el (add-to-history): New function.
* ediff.el (ediff-files, ediff-files3, ediff-merge-files)
(ediff-merge-files-with-ancestor):
* env.el (setenv):
* isearch.el (isearch-update-ring):
* server.el (server-visit-files):
* progmodes/grep.el (lgrep, rgrep):
* progmodes/vhdl-mode.el (vhdl-generate-makefile-1):
* progmodes/xscheme.el (xscheme-insert-expression):
Use add-to-history.
* kmacro.el (kmacro-push-ring): Use add-to-history.
(kmacro-ring-length): Remove unused defun.
(kmacro-start-macro): Use kmacro-push-ring.
2006-05-06 Thien-Thi Nguyen <ttn@gnu.org>
* emacs-lisp/ewoc.el (ewoc-create, ewoc-set-hf): Use `insert'
directly instead of a lambda expression that calls it.
2006-05-06 Kim F. Storm <storm@cua.dk>
* avoid.el (mouse-avoidance-point-position): Use posn-at-point
instead of compute-motion.
2006-05-05 Dan Nicolaescu <dann@ics.uci.edu>
* ibuffer.el (ibuffer-compressed-file-name-regexp): Undo previous
change.
2006-05-05 Reiner Steib <Reiner.Steib@gmx.de>
* startup.el (command-line-1): Refer to "Pure Storage" on
pure-space-overflow.
2006-05-05 Martin Rudalics <rudalics@gmx.at>
* emacs-lisp/re-builder.el (reb-update-overlays): Cycle through
provided faces once they all have been used up.
2006-05-05 Eli Zaretskii <eliz@gnu.org>
* startup.el (normal-splash-screen, fancy-splash-screens-1): Add a
reference to the Lisp manual to the warning about pure space
overflow.
2006-05-05 Micha,Ak(Bl Cadilhac <michael.cadilhac@lrde.org>
* textmodes/ispell.el (ispell-buffer-local-dict): Add a `no-reload'
argument to avoid the call to `ispell-internal-change-dictionary'
when not needed.
(ispell-change-dictionary): Use this argument and call
`ispell-internal-change-dictionary' after the possible change
to `ispell-local-dictionary'.
(ispell-internal-change-dictionary): Check for a change in
personal dictionary use too.
Cosmetic changes from Agustin Martin
<agustin.martin@hispalinux.es>.
2006-05-05 Eli Zaretskii <eliz@gnu.org>
* startup.el (command-line): On MS-Windows, probe "~", not
"~USER", for warning about non-existent home directory
* arc-mode.el (archive-l-e): New optional argument `float' means
generate a float value.
(archive-arc-summarize, archive-lzh-summarize)
(archive-zip-summarize, archive-zoo-summarize): Invoke archive-l-e
with 3rd argument non-nil when file's size is being computed.
Format the file sizes with %8.0f instead of %8d.
2006-05-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* cus-start.el (all): Add mac-dnd-known-types.
* term/mac-win.el: (mac-utxt-to-string, mac-string-to-utxt)
(mac-TEXT-to-string, mac-string-to-TEXT, mac-furl-to-string)
(mac-TIFF-to-string): New functions.
(x-get-selection, x-selection-value)
(mac-select-convert-to-string): Use them.
(mac-text-encoding-mac-japanese-basic-variant): New constant.
(mac-dnd-types-alist): New customization variable.
(mac-dnd-handle-furl, mac-dnd-handle-hfs, mac-dnd-insert-utxt)
(mac-dnd-insert-TEXT, mac-dnd-insert-TIFF, mac-dnd-drop-data)
(mac-dnd-handle-drag-n-drop-event): New functions.
(mac-drag-n-drop): Remove function.
(global-map): Bind drag-n-drop and M-drag-n-drop to
mac-dnd-handle-drag-n-drop-event.
2006-05-04 Karl Chen <quarl@NOSPAM.quarl.org>
* progmodes/perl-mode.el (perl-beginning-of-function):

View file

@ -45,8 +45,7 @@
:type '(choice (const :tag "default" nil)
string)
:group 'change-log)
(put 'change-log-default-name 'safe-local-variable
(lambda (a) (or (stringp a) (null a))))
(put 'change-log-default-name 'safe-local-variable 'string-or-null-p)
(defcustom change-log-mode-hook nil
"Normal hook run by `change-log-mode'."

View file

@ -464,10 +464,12 @@ Each descriptor is a vector of the form
(defsubst archive-name (suffix)
(intern (concat "archive-" (symbol-name archive-subtype) "-" suffix)))
(defun archive-l-e (str &optional len)
(defun archive-l-e (str &optional len float)
"Convert little endian string/vector STR to integer.
Alternatively, STR may be a buffer position in the current buffer
in which case a second argument, length LEN, should be supplied."
in which case a second argument, length LEN, should be supplied.
FLOAT, if non-nil, means generate and return a float instead of an integer
\(use this for numbers that can overflow the Emacs integer)."
(if (stringp str)
(setq len (length str))
(setq str (buffer-substring str (+ str len))))
@ -475,7 +477,8 @@ in which case a second argument, length LEN, should be supplied."
(i 0))
(while (< i len)
(setq i (1+ i)
result (+ (ash result 8) (aref str (- len i)))))
result (+ (if float (* result 256.0) (ash result 8))
(aref str (- len i)))))
result))
(defun archive-int-to-mode (mode)
@ -860,7 +863,8 @@ using `make-temp-file', and the generated name is returned."
"Set the current buffer as if it were visiting FILENAME."
(save-excursion
(goto-char (point-min))
(let ((coding
(let ((buffer-undo-list t)
(coding
(or coding-system-for-read
(and set-auto-coding-function
(save-excursion
@ -1331,13 +1335,14 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
(let* ((namefld (buffer-substring (+ p 2) (+ p 2 13)))
(fnlen (or (string-match "\0" namefld) 13))
(efnname (substring namefld 0 fnlen))
(csize (archive-l-e (+ p 15) 4))
;; Convert to float to avoid overflow for very large files.
(csize (archive-l-e (+ p 15) 4 'float))
(moddate (archive-l-e (+ p 19) 2))
(modtime (archive-l-e (+ p 21) 2))
(ucsize (archive-l-e (+ p 25) 4))
(ucsize (archive-l-e (+ p 25) 4 'float))
(fiddle (string= efnname (upcase efnname)))
(ifnname (if fiddle (downcase efnname) efnname))
(text (format " %8d %-11s %-8s %s"
(text (format " %8.0f %-11s %-8s %s"
ucsize
(archive-dosdate moddate)
(archive-dostime modtime)
@ -1359,7 +1364,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
dash)
(archive-summarize-files (nreverse visual))
(insert dash
(format " %8d %d file%s"
(format " %8.0f %d file%s"
totalsize
(length files)
(if (= 1 (length files)) "" "s"))
@ -1393,9 +1398,10 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
(while (progn (goto-char p) ;beginning of a base header.
(looking-at "\\(.\\|\n\\)\\(.\\|\n\\)-l[hz][0-9ds]-"))
(let* ((hsize (char-after p)) ;size of the base header (level 0 and 1)
(csize (archive-l-e (+ p 7) 4)) ;size of a compressed file to follow (level 0 and 2),
;; Convert to float to avoid overflow for very large files.
(csize (archive-l-e (+ p 7) 4 'float)) ;size of a compressed file to follow (level 0 and 2),
;size of extended headers + the compressed file to follow (level 1).
(ucsize (archive-l-e (+ p 11) 4)) ;size of an uncompressed file.
(ucsize (archive-l-e (+ p 11) 4 'float)) ;size of an uncompressed file.
(time1 (archive-l-e (+ p 15) 2)) ;date/time (MSDOS format in level 0, 1 headers
(time2 (archive-l-e (+ p 17) 2)) ;and UNIX format in level 2 header.)
(hdrlvl (char-after (+ p 20))) ;header level
@ -1471,12 +1477,12 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
(archive-unixtime time1 time2)
(archive-dostime time1)))
(setq text (if archive-alternate-display
(format " %8d %5S %5S %s"
(format " %8.0f %5S %5S %s"
ucsize
(or uid "?")
(or gid "?")
ifnname)
(format " %10s %8d %-11s %-8s %s"
(format " %10s %8.0f %-11s %-8s %s"
modestr
ucsize
moddate
@ -1506,8 +1512,8 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
"M Length Uid Gid File\n"
"M Filemode Length Date Time File\n"))
(sumline (if archive-alternate-display
" %8d %d file%s"
" %8d %d file%s")))
" %8.0f %d file%s"
" %8.0f %d file%s")))
(insert header dash)
(archive-summarize-files (nreverse visual))
(insert dash
@ -1603,7 +1609,8 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
;; (method (archive-l-e (+ p 10) 2))
(modtime (archive-l-e (+ p 12) 2))
(moddate (archive-l-e (+ p 14) 2))
(ucsize (archive-l-e (+ p 24) 4))
;; Convert to float to avoid overflow for very large files.
(ucsize (archive-l-e (+ p 24) 4 'float))
(fnlen (archive-l-e (+ p 28) 2))
(exlen (archive-l-e (+ p 30) 2))
(fclen (archive-l-e (+ p 32) 2))
@ -1629,7 +1636,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
(string= (upcase efnname) efnname)))
(ifnname (if fiddle (downcase efnname) efnname))
(width (string-width ifnname))
(text (format " %10s %8d %-11s %-8s %s"
(text (format " %10s %8.0f %-11s %-8s %s"
modestr
ucsize
(archive-dosdate moddate)
@ -1655,7 +1662,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
dash)
(archive-summarize-files (nreverse visual))
(insert dash
(format " %8d %d file%s"
(format " %8.0f %d file%s"
totalsize
(length files)
(if (= 1 (length files)) "" "s"))
@ -1709,7 +1716,8 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
(let* ((next (1+ (archive-l-e (+ p 6) 4)))
(moddate (archive-l-e (+ p 14) 2))
(modtime (archive-l-e (+ p 16) 2))
(ucsize (archive-l-e (+ p 20) 4))
;; Convert to float to avoid overflow for very large files.
(ucsize (archive-l-e (+ p 20) 4 'float))
(namefld (buffer-substring (+ p 38) (+ p 38 13)))
(dirtype (char-after (+ p 4)))
(lfnlen (if (= dirtype 2) (char-after (+ p 56)) 0))
@ -1733,7 +1741,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
(fiddle (and (= lfnlen 0) (string= efnname (upcase efnname))))
(ifnname (if fiddle (downcase efnname) efnname))
(width (string-width ifnname))
(text (format " %8d %-11s %-8s %s"
(text (format " %8.0f %-11s %-8s %s"
ucsize
(archive-dosdate moddate)
(archive-dostime modtime)
@ -1755,7 +1763,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
dash)
(archive-summarize-files (nreverse visual))
(insert dash
(format " %8d %d file%s"
(format " %8.0f %d file%s"
totalsize
(length files)
(if (= 1 (length files)) "" "s"))

View file

@ -215,10 +215,10 @@ changes in subdirectories or in the contents, size, modes, etc.,
of files. You may still sometimes want to revert them manually.
Use this option with care since it could lead to excessive auto-reverts.
For more information, see Info node `(emacs-xtra)Autorevert'."
For more information, see Info node `(emacs)Autorevert'."
:group 'auto-revert
:type 'boolean
:link '(info-link "(emacs-xtra)Autorevert"))
:link '(info-link "(emacs)Autorevert"))
(defcustom global-auto-revert-ignore-modes ()
"List of major modes Global Auto-Revert Mode should not check."

View file

@ -139,23 +139,13 @@ Only applies in mouse-avoidance-modes `animate' and `jump'."
(defun mouse-avoidance-point-position ()
"Return the position of point as (FRAME X . Y).
Analogous to `mouse-position'."
(let* ((w (selected-window))
(edges (window-inside-edges w))
(list
(compute-motion (max (window-start w) (point-min)) ; start pos
;; window-start can be < point-min if the
;; latter has changed since the last redisplay
'(0 . 0) ; start XY
(point) ; stop pos
nil ; stop XY: none
nil ; width
(cons (window-hscroll w) 0) ; 0 may not be right?
(selected-window))))
;; compute-motion returns (pos HPOS VPOS prevhpos contin)
;; we want: (frame hpos . vpos)
(let ((edges (window-inside-edges))
(x-y (posn-x-y (posn-at-point))))
(cons (selected-frame)
(cons (+ (car edges) (car (cdr list)))
(+ (car (cdr edges)) (car (cdr (cdr list))))))))
(cons (+ (car edges)
(/ (car x-y) (frame-char-width)))
(+ (car (cdr edges))
(/ (cdr x-y) (frame-char-height)))))))
;(defun mouse-avoidance-point-position-test ()
; (interactive)

View file

@ -386,6 +386,14 @@ The following %-sequences are provided:
(when (re-search-forward
"temperature: +\\([0-9]+\\) C$" nil t)
(match-string 1))))
(when (file-exists-p
"/proc/acpi/thermal_zone/THR2/temperature")
(with-temp-buffer
(insert-file-contents
"/proc/acpi/thermal_zone/THR2/temperature")
(when (re-search-forward
"temperature: +\\([0-9]+\\) C$" nil t)
(match-string 1))))
"N/A"))
(cons ?r (or (and rate (concat (number-to-string rate) " "
rate-type)) "N/A"))

View file

@ -802,27 +802,31 @@ buffer. The hook `comint-exec-hook' is run after each exec."
;; This doesn't use "e" because it is supposed to work
;; for events without parameters.
(interactive (list last-input-event))
(let ((pos (point)))
(if event (posn-set-point (event-end event)))
(if (not (eq (get-char-property (point) 'field) 'input))
;; No input at POS, fall back to the global definition.
(let* ((keys (this-command-keys))
(last-key (and (vectorp keys) (aref keys (1- (length keys)))))
(fun (and last-key (lookup-key global-map (vector last-key)))))
(goto-char pos)
(and fun (call-interactively fun)))
(setq pos (point))
;; There's previous input at POS, insert it at the end of the buffer.
(goto-char (point-max))
;; First delete any old unsent input at the end
(delete-region
(or (marker-position comint-accum-marker)
(process-mark (get-buffer-process (current-buffer))))
(point))
;; Insert the input at point
(insert (buffer-substring-no-properties
(previous-single-char-property-change (1+ pos) 'field)
(next-single-char-property-change pos 'field))))))
(when event
(posn-set-point (event-end event)))
(if comint-use-prompt-regexp
(let ((input (funcall comint-get-old-input))
(process (get-buffer-process (current-buffer))))
(if (not process)
(error "Current buffer has no process")
(goto-char (process-mark process))
(insert input)))
(let ((pos (point)))
(if (not (eq (field-at-pos pos) 'input))
;; No input at POS, fall back to the global definition.
(let* ((keys (this-command-keys))
(last-key (and (vectorp keys) (aref keys (1- (length keys)))))
(fun (and last-key (lookup-key global-map (vector last-key)))))
(and fun (call-interactively fun)))
;; There's previous input at POS, insert it at the end of the buffer.
(goto-char (point-max))
;; First delete any old unsent input at the end
(delete-region
(or (marker-position comint-accum-marker)
(process-mark (get-buffer-process (current-buffer))))
(point))
;; Insert the input at point
(insert (field-string-no-properties pos))))))
;; Input history processing in a buffer

View file

@ -193,6 +193,8 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
(suggest-key-bindings keyboard (choice (const :tag "off" nil)
(integer :tag "time" 2)
(other :tag "on")))
;; macselect.c
(mac-dnd-known-types mac (repeat string) "22.1")
;; macterm.c
(mac-control-modifier mac (choice (const :tag "No modifier" nil)
(const control) (const meta)

View file

@ -633,8 +633,8 @@ Non-nil OLD means that we want the old file."
"Convert unified diffs to context diffs.
START and END are either taken from the region (if a prefix arg is given) or
else cover the whole bufer."
(interactive (if current-prefix-arg
(list (mark) (point))
(interactive (if (or current-prefix-arg (and transient-mark-mode mark-active))
(list (region-beginning) (region-end))
(list (point-min) (point-max))))
(unless (markerp end) (setq end (copy-marker end)))
(let (;;(diff-inhibit-after-change t)
@ -722,7 +722,7 @@ START and END are either taken from the region
\(when it is highlighted) or else cover the whole buffer.
With a prefix argument, convert unified format to context format."
(interactive (if (and transient-mark-mode mark-active)
(list (mark) (point) current-prefix-arg)
(list (region-beginning) (region-end) current-prefix-arg)
(list (point-min) (point-max) current-prefix-arg)))
(if to-context
(diff-unified->context start end)
@ -795,8 +795,8 @@ With a prefix argument, convert unified format to context format."
"Reverse the direction of the diffs.
START and END are either taken from the region (if a prefix arg is given) or
else cover the whole bufer."
(interactive (if current-prefix-arg
(list (mark) (point))
(interactive (if (or current-prefix-arg (and transient-mark-mode mark-active))
(list (region-beginning) (region-end))
(list (point-min) (point-max))))
(unless (markerp end) (setq end (copy-marker end)))
(let (;;(diff-inhibit-after-change t)
@ -857,8 +857,8 @@ else cover the whole bufer."
"Fixup the hunk headers (in case the buffer was modified).
START and END are either taken from the region (if a prefix arg is given) or
else cover the whole bufer."
(interactive (if current-prefix-arg
(list (mark) (point))
(interactive (if (or current-prefix-arg (and transient-mark-mode mark-active))
(list (region-beginning) (region-end))
(list (point-min) (point-max))))
(let ((inhibit-read-only t))
(save-excursion
@ -1069,7 +1069,7 @@ Only works for unified diffs."
(defun diff-hunk-text (hunk destp char-offset)
"Return the literal source text from HUNK as (TEXT . OFFSET).
if DESTP is nil TEXT is the source, otherwise the destination text.
If DESTP is nil, TEXT is the source, otherwise the destination text.
CHAR-OFFSET is a char-offset in HUNK, and OFFSET is the corresponding
char-offset in TEXT."
(with-temp-buffer
@ -1302,7 +1302,7 @@ With a prefix argument, try to REVERSE the hunk."
`diff-jump-to-old-file' (or its opposite if the OTHER-FILE prefix arg
is given) determines whether to jump to the old or the new file.
If the prefix arg is bigger than 8 (for example with \\[universal-argument] \\[universal-argument])
then `diff-jump-to-old-file' is also set, for the next invocations."
then `diff-jump-to-old-file' is also set, for the next invocations."
(interactive (list current-prefix-arg last-input-event))
;; When pointing at a removal line, we probably want to jump to
;; the old location, and else to the new (i.e. as if reverting).

View file

@ -918,7 +918,7 @@ or delete subdirectories can bypass this machinery. Hence, you sometimes
may have to reset some subdirectory switches after a `dired-undo'.
You can reset all subdirectory switches to the default using
\\<dired-mode-map>\\[dired-reset-subdir-switches].
See Info node `(emacs-xtra)Subdir switches' for more details."
See Info node `(emacs)Subdir switches' for more details."
;; Moves point if the next ARG files are redisplayed.
(interactive "P\np")
(if (and test-for-subdir (dired-get-subdir))
@ -1761,7 +1761,7 @@ or delete subdirectories can bypass this machinery. Hence, you sometimes
may have to reset some subdirectory switches after a `dired-undo'.
You can reset all subdirectory switches to the default using
\\<dired-mode-map>\\[dired-reset-subdir-switches].
See Info node `(emacs-xtra)Subdir switches' for more details."
See Info node `(emacs)Subdir switches' for more details."
(interactive
(list (dired-get-filename)
(if current-prefix-arg

View file

@ -210,12 +210,11 @@
ediff-last-dir-B
(file-name-directory f)))
(progn
(setq file-name-history
(cons (ediff-abbreviate-file-name
(expand-file-name
(file-name-nondirectory f)
dir-B))
file-name-history))
(add-to-history 'file-name-history
(ediff-abbreviate-file-name
(expand-file-name
(file-name-nondirectory f)
dir-B)))
(ediff-get-default-file-name f 1)))
)))
(ediff-files-internal file-A
@ -246,25 +245,22 @@
ediff-last-dir-B
(file-name-directory f)))
(progn
(setq file-name-history
(cons
(ediff-abbreviate-file-name
(expand-file-name
(file-name-nondirectory f)
dir-B))
file-name-history))
(add-to-history 'file-name-history
(ediff-abbreviate-file-name
(expand-file-name
(file-name-nondirectory f)
dir-B)))
(ediff-get-default-file-name f 1))))
(ediff-read-file-name "File C to compare"
(setq dir-C (if ediff-use-last-dir
ediff-last-dir-C
(file-name-directory ff)))
(progn
(setq file-name-history
(cons (ediff-abbreviate-file-name
(expand-file-name
(file-name-nondirectory ff)
dir-C))
file-name-history))
(add-to-history 'file-name-history
(ediff-abbreviate-file-name
(expand-file-name
(file-name-nondirectory ff)
dir-C)))
(ediff-get-default-file-name ff 2)))
)))
(ediff-files-internal file-A
@ -1109,12 +1105,11 @@ lines. For small regions, use `ediff-regions-wordwise'."
ediff-last-dir-B
(file-name-directory f)))
(progn
(setq file-name-history
(cons (ediff-abbreviate-file-name
(expand-file-name
(file-name-nondirectory f)
dir-B))
file-name-history))
(add-to-history 'file-name-history
(ediff-abbreviate-file-name
(expand-file-name
(file-name-nondirectory f)
dir-B)))
(ediff-get-default-file-name f 1)))
)))
(setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks))
@ -1153,13 +1148,11 @@ lines. For small regions, use `ediff-regions-wordwise'."
ediff-last-dir-B
(file-name-directory f)))
(progn
(setq file-name-history
(cons
(ediff-abbreviate-file-name
(expand-file-name
(file-name-nondirectory f)
dir-B))
file-name-history))
(add-to-history 'file-name-history
(ediff-abbreviate-file-name
(expand-file-name
(file-name-nondirectory f)
dir-B)))
(ediff-get-default-file-name f 1))))
(ediff-read-file-name "Ancestor file"
(setq dir-ancestor
@ -1167,12 +1160,11 @@ lines. For small regions, use `ediff-regions-wordwise'."
ediff-last-dir-ancestor
(file-name-directory ff)))
(progn
(setq file-name-history
(cons (ediff-abbreviate-file-name
(expand-file-name
(file-name-nondirectory ff)
dir-ancestor))
file-name-history))
(add-to-history 'file-name-history
(ediff-abbreviate-file-name
(expand-file-name
(file-name-nondirectory ff)
dir-ancestor)))
(ediff-get-default-file-name ff 2)))
)))
(setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks))

View file

@ -139,7 +139,8 @@ For example, you could write
(setq body (list* lighter keymap body) lighter nil keymap nil))
((keywordp keymap) (push keymap body) (setq keymap nil)))
(let* ((mode-name (symbol-name mode))
(let* ((last-message (current-message))
(mode-name (symbol-name mode))
(pretty-name (easy-mmode-pretty-mode-name mode lighter))
(globalp nil)
(set nil)
@ -236,7 +237,10 @@ With zero or negative ARG turn mode off.
(if (called-interactively-p)
(progn
,(if globalp `(customize-mark-as-set ',mode))
(unless (current-message)
;; Avoid overwriting a message shown by the body,
;; but do overwrite previous messages.
(unless ,(and (current-message)
(not (equal last-message (current-message))))
(message ,(format "%s %%sabled" pretty-name)
(if ,mode "en" "dis")))))
(force-mode-line-update)

View file

@ -221,16 +221,12 @@ dll bound to ewoc--dll, and VARLIST bound as in a let*.
dll will be bound when VARLIST is initialized, but the current
buffer will *not* have been changed.
Return value of last form in FORMS."
(let ((old-buffer (make-symbol "old-buffer"))
(hnd (make-symbol "ewoc")))
`(let* ((,old-buffer (current-buffer))
(,hnd ,ewoc)
(let ((hnd (make-symbol "ewoc")))
`(let* ((,hnd ,ewoc)
(dll (ewoc--dll ,hnd))
,@varlist)
(set-buffer (ewoc--buffer ,hnd))
(unwind-protect
(progn ,@forms)
(set-buffer ,old-buffer)))))
(with-current-buffer (ewoc--buffer ,hnd)
,@forms))))
(defmacro ewoc--set-buffer-bind-dll (ewoc &rest forms)
`(ewoc--set-buffer-bind-dll-let* ,ewoc nil ,@forms))
@ -322,8 +318,8 @@ be inserted at the bottom of the ewoc."
(unless header (setq header ""))
(unless footer (setq footer ""))
(setf (ewoc--node-start-marker dll) (copy-marker pos))
(let ((foot (ewoc--create-node footer (lambda (x) (insert footer)) pos))
(head (ewoc--create-node header (lambda (x) (insert header)) pos)))
(let ((foot (ewoc--create-node footer 'insert pos))
(head (ewoc--create-node header 'insert pos)))
(ewoc--node-enter-first dll head)
(ewoc--node-enter-last dll foot)
(setf (ewoc--header new-ewoc) head)
@ -601,8 +597,8 @@ Return nil if the buffer has been deleted."
"Set the HEADER and FOOTER of EWOC."
(setf (ewoc--node-data (ewoc--header ewoc)) header)
(setf (ewoc--node-data (ewoc--footer ewoc)) footer)
(ewoc--refresh-node (lambda (x) (insert header)) (ewoc--header ewoc))
(ewoc--refresh-node (lambda (x) (insert footer)) (ewoc--footer ewoc)))
(ewoc--refresh-node 'insert (ewoc--header ewoc))
(ewoc--refresh-node 'insert (ewoc--footer ewoc)))
(provide 'ewoc)

View file

@ -112,7 +112,7 @@
(if (not (fboundp 'make-overlay))
(require 'overlay))
;; User costomizable variables
;; User customizable variables
(defgroup re-builder nil
"Options for the RE Builder."
:group 'lisp
@ -627,11 +627,9 @@ Return t if the (cooked) expression changed."
beg (match-end 0)))
i))
(defun reb-update-overlays (&optional subexp)
"Switch to `reb-target-buffer' and mark all matches of `reb-regexp'.
If SUBEXP is non-nil mark only the corresponding sub-expressions."
(let* ((re (reb-target-binding reb-regexp))
(subexps (reb-count-subexps re))
(matches 0)
@ -645,24 +643,35 @@ If SUBEXP is non-nil mark only the corresponding sub-expressions."
(or (not reb-auto-match-limit)
(< matches reb-auto-match-limit)))
(if (= 0 (length (match-string 0)))
(error "Empty regular expression!"))
(let ((i 0))
(error "Empty regular expression!"))
(let ((i 0)
suffix max-suffix)
(setq matches (1+ matches))
(while (<= i subexps)
(if (and (or (not subexp) (= subexp i))
(match-beginning i))
(let ((overlay (make-overlay (match-beginning i)
(match-end i)))
(face-name (format "reb-match-%d" i)))
(if (not firstmatch)
(setq firstmatch (match-data)))
;; When we have exceeded the number of provided faces,
;; cycle thru them where `max-suffix' denotes the maximum
;; suffix for `reb-match-*' that has been defined and
;; `suffix' the suffix calculated for the current match.
(face
(cond
(max-suffix
(if (= suffix max-suffix)
(setq suffix 1)
(setq suffix (1+ suffix)))
(intern-soft (format "reb-match-%d" suffix)))
((intern-soft (format "reb-match-%d" i)))
((setq max-suffix (1- i))
(setq suffix 1)
;; `reb-match-1' must exist.
'reb-match-1))))
(unless firstmatch (setq firstmatch (match-data)))
(setq reb-overlays (cons overlay reb-overlays)
submatches (1+ submatches))
(overlay-put
overlay 'face
(or (intern-soft face-name)
(error "Too many subexpressions - face `%s' not defined"
face-name )))
(overlay-put overlay 'face face)
(overlay-put overlay 'priority i)))
(setq i (1+ i))))))
(let ((count (if subexp submatches matches)))

View file

@ -27,9 +27,9 @@
;; The main exported function is `syntax-ppss'. You might also need
;; to call `syntax-ppss-flush-cache' or to add it to
;; after-change-functions'(although this is automatically done by
;; before-change-functions'(although this is automatically done by
;; syntax-ppss when needed, but that might fail if syntax-ppss is
;; called in a context where after-change-functions is temporarily
;; called in a context where before-change-functions is temporarily
;; let-bound to nil).
;;; Todo:
@ -94,10 +94,9 @@ point (where the PPSS is equivalent to nil).")
(setq syntax-ppss-last nil)
(setcar syntax-ppss-last nil)))
;; Unregister if there's no cache left. Sadly this doesn't work
;; because `after-change-functions' is temporarily bound to nil here.
;; because `before-change-functions' is temporarily bound to nil here.
;; (unless syntax-ppss-cache
;; (remove-hook 'after-change-functions
;; 'syntax-ppss-after-change-function t))
;; (remove-hook 'before-change-functions 'syntax-ppss-flush-cache t))
)
(defvar syntax-ppss-stats
@ -148,7 +147,7 @@ Point is at POS when this function returns."
;; too far from `pos', we could try to use other positions
;; in (nth 9 old-ppss), but that doesn't seem to happen in
;; practice and it would complicate this code (and the
;; after-change-function code even more). But maybe it
;; before-change-function code even more). But maybe it
;; would be useful in "degenerate" cases such as when the
;; whole file is wrapped in a set of parenthesis.
(setq pt-min (or (car (nth 9 old-ppss))
@ -176,10 +175,10 @@ Point is at POS when this function returns."
(setq cache (cdr cache)))
(if cache (setq pt-min (caar cache) ppss (cdar cache)))
;; Setup the after-change function if necessary.
;; Setup the before-change function if necessary.
(unless (or syntax-ppss-cache syntax-ppss-last)
(add-hook 'after-change-functions
'syntax-ppss-flush-cache nil t))
(add-hook 'before-change-functions
'syntax-ppss-flush-cache t t))
;; Use the best of OLD-POS and CACHE.
(if (or (not old-pos) (< old-pos pt-min))

View file

@ -133,7 +133,7 @@ a side-effect."
(let* ((var (read-envvar-name "Set environment variable: " nil))
(value (getenv var)))
(when value
(push value setenv-history))
(add-to-history 'setenv-history value))
;; Here finally we specify the args to give call setenv with.
(list var
(read-from-minibuffer (format "Set %s to value: " var)

View file

@ -2350,31 +2350,29 @@ asking you for confirmation."
;; For variables defined in the C source code the declaration should go here:
;; FIXME: Some variables should be moved according to the rules above.
(let ((string-or-null (lambda (a) (or (stringp a) (null a)))))
(eval
`(mapc (lambda (pair)
(put (car pair) 'safe-local-variable (cdr pair)))
'((byte-compile-dynamic . booleanp)
(byte-compile-dynamic-docstrings . booleanp)
(byte-compile-warnings . booleanp)
(c-basic-offset . integerp)
(c-file-style . stringp)
(c-indent-level . integerp)
(comment-column . integerp)
(compile-command . string-or-null-p)
(find-file-visit-truename . booleanp)
(fill-column . integerp)
(fill-prefix . string-or-null-p)
(indent-tabs-mode . booleanp) ;; C source code
(kept-old-versions . integerp)
(kept-new-versions . integerp)
(left-margin . integerp)
(no-byte-compile . booleanp)
(no-update-autoloads . booleanp)
(outline-regexp . string-or-null-p)
(tab-width . integerp) ;; C source code
(truncate-lines . booleanp) ;; C source code
(version-control . symbolp)))))
(mapc (lambda (pair)
(put (car pair) 'safe-local-variable (cdr pair)))
'((byte-compile-dynamic . booleanp)
(byte-compile-dynamic-docstrings . booleanp)
(byte-compile-warnings . booleanp)
(c-basic-offset . integerp)
(c-file-style . stringp)
(c-indent-level . integerp)
(comment-column . integerp)
(compile-command . string-or-null-p)
(find-file-visit-truename . booleanp)
(fill-column . integerp)
(fill-prefix . string-or-null-p)
(indent-tabs-mode . booleanp) ;; C source code
(kept-old-versions . integerp)
(kept-new-versions . integerp)
(left-margin . integerp)
(no-byte-compile . booleanp)
(no-update-autoloads . booleanp)
(outline-regexp . string-or-null-p)
(tab-width . integerp) ;; C source code
(truncate-lines . booleanp) ;; C source code
(version-control . symbolp)))
(put 'c-set-style 'safe-local-eval-function t)
@ -3932,7 +3930,7 @@ user. In such situations, one has to be careful with potentially
time consuming operations.
For more information on how this variable is used by Auto Revert mode,
see Info node `(emacs-xtra)Supporting additional buffers'.")
see Info node `(emacs)Supporting additional buffers'.")
(defvar before-revert-hook nil
"Normal hook for `revert-buffer' to run before reverting.

View file

@ -1974,17 +1974,17 @@ This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item."
;;
;; (regexp-opt
;; '("define" "elif" "else" "endif" "error" "file" "if" "ifdef"
;; "ifndef" "include" "line" "pragma" "undef"))
;; "ifndef" "import" "include" "line" "pragma" "undef" "warning"))
;;
(defconst cpp-font-lock-keywords-source-directives
"define\\|e\\(?:l\\(?:if\\|se\\)\\|ndif\\|rror\\)\\|file\\|i\\(?:f\\(?:n?def\\)?\\|nclude\\)\\|line\\|pragma\\|undef"
"define\\|e\\(?:l\\(?:if\\|se\\)\\|ndif\\|rror\\)\\|file\\|i\\(?:f\\(?:n?def\\)?\\|mport\\|nclude\\)\\|line\\|pragma\\|undef\\|warning"
"Regular expressoin used in `cpp-font-lock-keywords'.")
;; `cpp-font-lock-keywords-source-depth' is calculated from:
;;
;; (regexp-opt-depth (regexp-opt
;; '("define" "elif" "else" "endif" "error" "file" "if" "ifdef"
;; "ifndef" "include" "line" "pragma" "undef")))
;; "ifndef" "import" "include" "line" "pragma" "undef" "warning")))
;;
(defconst cpp-font-lock-keywords-source-depth 0
"An integer representing regular expression depth of `cpp-font-lock-keywords-source-directives'.
@ -1996,7 +1996,7 @@ Used in `cpp-font-lock-keywords'.")
(list
;;
;; Fontify error directives.
'("^#[ \t]*error[ \t]+\\(.+\\)" 1 font-lock-warning-face prepend)
'("^#[ \t]*\\(?:error\\|warning\\)[ \t]+\\(.+\\)" 1 font-lock-warning-face prepend)
;;
;; Fontify filenames in #include <...> preprocessor directives as strings.
'("^#[ \t]*\\(?:import\\|include\\)[ \t]*\\(<[^>\"\n]*>?\\)"

View file

@ -324,14 +324,11 @@ directory, like `default-directory'."
:type '(repeat function)
:group 'ibuffer)
(eval-when-compile
(defcustom ibuffer-compressed-file-name-regexp
(concat "\\.\\("
(regexp-opt '("arj" "bgz" "bz2" "gz" "lzh" "taz" "tgz" "zip" "z"))
"\\)$")
"\\.\\(arj\\|bgz\\|bz2\\|gz\\|lzh\\|taz\\|tgz\\|zip\\|z\\)$"
"Regexp to match compressed file names."
:type 'regexp
:group 'ibuffer))
:group 'ibuffer)
(defcustom ibuffer-hook nil
"Hook run when `ibuffer' is called."

View file

@ -831,21 +831,10 @@ NOPUSH is t and EDIT is t."
(defun isearch-update-ring (string &optional regexp)
"Add STRING to the beginning of the search ring.
REGEXP if non-nil says use the regexp search ring."
(if regexp
(when (or (null regexp-search-ring)
(not (string= string (car regexp-search-ring))))
(when history-delete-duplicates
(setq regexp-search-ring (delete string regexp-search-ring)))
(push string regexp-search-ring)
(when (> (length regexp-search-ring) regexp-search-ring-max)
(setcdr (nthcdr (1- search-ring-max) regexp-search-ring) nil)))
(when (or (null search-ring)
(not (string= string (car search-ring))))
(when history-delete-duplicates
(setq search-ring (delete string search-ring)))
(push string search-ring)
(when (> (length search-ring) search-ring-max)
(setcdr (nthcdr (1- search-ring-max) search-ring) nil)))))
(add-to-history
(if regexp 'regexp-search-ring 'search-ring)
string
(if regexp regexp-search-ring-max search-ring-max)))
;; Switching buffers should first terminate isearch-mode.
;; ;; For Emacs 19, the frame switch event is handled.

View file

@ -349,10 +349,8 @@ and `kmacro-counter-format'.")
(defun kmacro-push-ring (&optional elt)
"Push ELT or current macro onto `kmacro-ring'."
(when (setq elt (or elt (kmacro-ring-head)))
(let ((len (length kmacro-ring)))
(setq kmacro-ring (cons elt kmacro-ring))
(if (>= len kmacro-ring-max)
(setcdr (nthcdr len kmacro-ring) nil)))))
(let ((history-delete-duplicates nil))
(add-to-history 'kmacro-ring elt kmacro-ring-max))))
(defun kmacro-split-ring-element (elt)
@ -377,11 +375,6 @@ Non-nil arg RAW means just return raw first element."
(kmacro-pop-ring1 raw)))
(defun kmacro-ring-length ()
"Return length of macro ring, including pseudo head."
(+ (if last-kbd-macro 1 0) (length kmacro-ring)))
(defun kmacro-ring-empty-p (&optional none)
"Tell user and return t if `last-kbd-macro' is nil or `kmacro-ring' is empty.
Check only `last-kbd-macro' if optional arg NONE is non-nil."
@ -577,13 +570,8 @@ Use \\[kmacro-bind-to-key] to bind it to a key sequence."
(let ((append (and arg (listp arg))))
(unless append
(if last-kbd-macro
(let ((len (length kmacro-ring)))
(setq kmacro-ring
(cons
(list last-kbd-macro kmacro-counter kmacro-counter-format-start)
kmacro-ring))
(if (>= len kmacro-ring-max)
(setcdr (nthcdr len kmacro-ring) nil))))
(kmacro-push-ring
(list last-kbd-macro kmacro-counter kmacro-counter-format-start)))
(setq kmacro-counter (or (if arg (prefix-numeric-value arg))
kmacro-initial-counter-value
0)

View file

@ -7037,7 +7037,7 @@ or delete subdirectories can bypass this machinery. Hence, you sometimes
may have to reset some subdirectory switches after a `dired-undo'.
You can reset all subdirectory switches to the default using
\\<dired-mode-map>\\[dired-reset-subdir-switches].
See Info node `(emacs-xtra)Subdir switches' for more details.
See Info node `(emacs)Subdir switches' for more details.
\(fn &optional ARG TEST-FOR-SUBDIR)" t nil)
@ -7175,7 +7175,7 @@ or delete subdirectories can bypass this machinery. Hence, you sometimes
may have to reset some subdirectory switches after a `dired-undo'.
You can reset all subdirectory switches to the default using
\\<dired-mode-map>\\[dired-reset-subdir-switches].
See Info node `(emacs-xtra)Subdir switches' for more details.
See Info node `(emacs)Subdir switches' for more details.
\(fn DIRNAME &optional SWITCHES NO-ERROR-IF-NOT-DIR-P)" t nil)

View file

@ -1,3 +1,13 @@
2006-05-06 Bill Wohler <wohler@newt.com>
Release MH-E version 8.0.
* mh-e.el (Version, mh-version): Update for release 8.0.
2006-05-05 Bill Wohler <wohler@newt.com>
* mh-e.el: Update commentary.
2006-04-28 Bill Wohler <wohler@newt.com>
Release MH-E version 7.95.

View file

@ -6,7 +6,7 @@
;; Author: Bill Wohler <wohler@newt.com>
;; Maintainer: Bill Wohler <wohler@newt.com>
;; Version: 7.95
;; Version: 8.0
;; Keywords: mail
;; This file is part of GNU Emacs.
@ -28,6 +28,20 @@
;;; Commentary:
;; MH-E is an Emacs interface to the MH mail system.
;; MH-E is supported by GNU Emacs 21 and 22, as well as XEmacs 21
;; (except for versions 21.5.9-21.5.16). It is compatible with MH
;; versions 6.8.4 and higher, all versions of nmh, and GNU mailutils
;; 0.4 and higher.
;; MH (Message Handler) is a powerful mail reader. See
;; http://rand-mh.sourceforge.net/.
;; N.B. MH must have been compiled with the MHE compiler flag or several
;; features necessary for MH-E will be missing from MH commands, specifically
;; the -build switch to repl and forw.
;; How to use:
;; M-x mh-rmail to read mail. Type C-h m there for a list of commands.
;; C-u M-x mh-rmail to visit any folder.
@ -44,23 +58,6 @@
;; If you want to customize MH-E before explicitly loading it, add this:
;; (require 'mh-cus-load)
;; MH (Message Handler) is a powerful mail reader.
;; The MH newsgroup is comp.mail.mh; the mailing list is mh-users@ics.uci.edu
;; (send to mh-users-request to be added). See the monthly Frequently Asked
;; Questions posting there for information on getting MH and MH-E:
;; http://www.faqs.org/faqs/mail/mh-faq/part1/preamble.html
;; N.B. MH must have been compiled with the MHE compiler flag or several
;; features necessary for MH-E will be missing from MH commands, specifically
;; the -build switch to repl and forw.
;; MH-E is an Emacs interface to the MH mail system.
;; MH-E is supported in GNU Emacs 21 and 22 as well as XEmacs 21
;; (except for versions 21.5.9-21.5.16), with MH 6.8.4 on, nmh 1.0.4
;; on, and GNU mailutils 0.4 on.
;; Mailing Lists:
;; mh-e-users@lists.sourceforge.net
;; mh-e-announce@lists.sourceforge.net
@ -136,7 +133,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.95" "Version number of MH-E.")
(defconst mh-version "8.0" "Version number of MH-E.")
;; Variants

View file

@ -204,8 +204,25 @@ This should only be bound to mouse buttons 4 and 5."
(setq amt (* amt (event-click-count event))))
(unwind-protect
(let ((button (mwheel-event-button event)))
(cond ((eq button mouse-wheel-down-event) (scroll-down amt))
((eq button mouse-wheel-up-event) (scroll-up amt))
(cond ((eq button mouse-wheel-down-event)
(condition-case nil (scroll-down amt)
;; Make sure we do indeed scroll to the beginning of
;; the buffer.
(beginning-of-buffer
(unwind-protect
(scroll-down)
;; If the first scroll succeeded, then some scrolling
;; is possible: keep scrolling til the beginning but
;; do not signal an error. For some reason, we have
;; to do it even if the first scroll signalled an
;; error, because otherwise the window is recentered
;; for a reason that escapes me. This problem seems
;; to only affect scroll-down. --Stef
(set-window-start (selected-window) (point-min))))))
((eq button mouse-wheel-up-event)
(condition-case nil (scroll-up amt)
;; Make sure we do indeed scroll to the end of the buffer.
(end-of-buffer (while t (scroll-up)))))
(t (error "Bad binding in mwheel-scroll"))))
(if curwin (select-window curwin))))
(when (and mouse-wheel-click-event mouse-wheel-inhibit-click-time)

View file

@ -4331,7 +4331,7 @@ Falls back to normal file name handler if no tramp file name handler exists."
"Add tramp file name handlers to `file-name-handler-alist'."
(add-to-list 'file-name-handler-alist
(cons tramp-file-name-regexp 'tramp-file-name-handler))
(when partial-completion-mode
(when (or partial-completion-mode (featurep 'ido))
(add-to-list 'file-name-handler-alist
(cons tramp-completion-file-name-regexp
'tramp-completion-file-name-handler))

View file

@ -694,6 +694,7 @@ With arg, enter name of variable to be watched in the minibuffer."
(if (and transient-mark-mode mark-active)
(buffer-substring (region-beginning) (region-end))
(tooltip-identifier-from-point (point))))))
(speedbar 1)
(catch 'already-watched
(dolist (var gdb-var-list)
(unless (string-match "\\." (car var))
@ -725,7 +726,6 @@ With arg, enter name of variable to be watched in the minibuffer."
(match-string 3)
nil nil gdb-frame-address)))
(push var gdb-var-list)
(speedbar 1)
(unless (string-equal
speedbar-initial-expansion-list-name "GUD")
(speedbar-change-initial-expansion-list "GUD"))
@ -741,13 +741,26 @@ With arg, enter name of variable to be watched in the minibuffer."
(message-box "Watching expressions requires gdb 6.0 onwards")
(message-box "No symbol \"%s\" in current context." expr))))
(defun gdb-speedbar-update ()
(when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
;; Dummy command to update speedbar even when idle.
(gdb-enqueue-input (list "server pwd\n" 'gdb-speedbar-timer-fn))
;; Keep gdb-pending-triggers non-nil till end.
(push 'gdb-speedbar-timer gdb-pending-triggers)))
(defun gdb-speedbar-timer-fn ()
(setq gdb-pending-triggers
(delq 'gdb-speedbar-timer gdb-pending-triggers))
(speedbar-timer-fn))
(defun gdb-var-evaluate-expression-handler (varnum changed)
(goto-char (point-min))
(re-search-forward ".*value=\\(\".*\"\\)" nil t)
(let ((var (assoc varnum gdb-var-list)))
(when var
(if changed (setcar (nthcdr 5 var) 'changed))
(setcar (nthcdr 4 var) (read (match-string 1))))))
(setcar (nthcdr 4 var) (read (match-string 1)))))
(gdb-speedbar-update))
(defun gdb-var-list-children (varnum)
(gdb-enqueue-input
@ -811,21 +824,7 @@ type_changed=\".*?\".*?}")
varnum "\"\n")
`(lambda () (gdb-var-evaluate-expression-handler ,varnum t)))))))
(setq gdb-pending-triggers
(delq 'gdb-var-update gdb-pending-triggers))
(when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
;; Dummy command to update speedbar at right time.
(gdb-enqueue-input (list "server pwd\n" 'gdb-speedbar-refresh))
;; Keep gdb-pending-triggers non-nil till end.
(push 'gdb-speedbar-refresh gdb-pending-triggers)))
(defun gdb-speedbar-refresh ()
(setq gdb-pending-triggers
(delq 'gdb-speedbar-refresh gdb-pending-triggers))
(with-current-buffer gud-comint-buffer
(let ((speedbar-verbosity-level 0)
(speedbar-shown-directories nil))
(save-excursion
(speedbar-refresh)))))
(delq 'gdb-var-update gdb-pending-triggers)))
(defun gdb-var-delete ()
"Delete watch expression at point from the speedbar."
@ -1912,7 +1911,7 @@ static char *magick[] = {
(let* ((buffer (find-file-noselect
(if (file-exists-p file) file
(cdr (assoc bptno gdb-location-alist)))))
(window (unless (gdb-display-source-buffer buffer)
(window (or (gdb-display-source-buffer buffer)
(display-buffer buffer))))
(setq gdb-source-window window)
(with-current-buffer buffer
@ -2754,6 +2753,7 @@ corresponding to the mode line clicked."
;; Put buffer list in window if we
;; can't find a source file.
(list-buffers-noselect))))
(setq gdb-source-window (selected-window))
(when gdb-use-separate-io-buffer
(split-window-horizontally)
(other-window 1)
@ -2781,6 +2781,7 @@ This arrangement depends on the value of `gdb-many-windows'."
(if gud-last-last-frame
(gud-find-file (car gud-last-last-frame))
(gud-find-file gdb-main-file)))
(setq gdb-source-window (selected-window))
(other-window 1))))
(defun gdb-reset ()
@ -2802,8 +2803,6 @@ Kills the gdb buffers, and resets variables and the source buffers."
(setq overlay-arrow-variable-list
(delq 'gdb-overlay-arrow-position overlay-arrow-variable-list))
(setq fringe-indicator-alist '((overlay-arrow . right-triangle)))
(if (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
(speedbar-refresh))
(setq gud-running nil)
(setq gdb-active-process nil)
(setq gdb-var-list nil)
@ -3231,7 +3230,8 @@ numchild=\"\\(.+?\\)\",.*?value=\\(\".*?\"\\),.*?type=\"\\(.+?\\)\".*?}")
(throw 'child-already-watched nil))
(push varchild var-list))))
(push var var-list)))
(setq gdb-var-list (nreverse var-list)))))
(setq gdb-var-list (nreverse var-list))))
(gdb-speedbar-update))
; Uses "-var-update --all-values". Needs GDB 6.4 onwards.
(defun gdb-var-update-1 ()
@ -3264,11 +3264,7 @@ in_scope=\"\\(.*?\\)\".*?}")
(read (match-string 2)))))))
(setq gdb-pending-triggers
(delq 'gdb-var-update gdb-pending-triggers))
(when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
;; dummy command to update speedbar at right time
(gdb-enqueue-input (list "server pwd\n" 'gdb-speedbar-refresh))
;; keep gdb-pending-triggers non-nil till end
(push 'gdb-speedbar-refresh gdb-pending-triggers)))
(gdb-speedbar-update))
;; Registers buffer.
;;

View file

@ -639,9 +639,9 @@ The search is limited to file names matching shell pattern FILES.
FILES may use abbreviations defined in `grep-files-aliases', e.g.
entering `ch' is equivalent to `*.[ch]'.
With \\[universal-argument] prefix, allow user to edit the constructed
shell command line before it is executed.
With two \\[universal-argument] prefixes, edit and run grep shell command.
With \\[universal-argument] prefix, you can edit the constructed shell command line
before it is executed.
With two \\[universal-argument] prefixes, directly edit and run `grep-command'.
Collect output in a buffer. While grep runs asynchronously, you
can use \\[next-error] (M-x next-error), or \\<grep-mode-map>\\[compile-goto-error]
@ -676,7 +676,7 @@ This command shares argument histories with \\[rgrep] and \\[grep]."
(setq command
(read-from-minibuffer "Confirm: "
command nil nil 'grep-history))
(push command grep-history))))
(add-to-history 'grep-history command))))
(when command
;; Setting process-setup-function makes exit-message-function work
;; even when async processes aren't supported.
@ -687,14 +687,14 @@ This command shares argument histories with \\[rgrep] and \\[grep]."
;;;###autoload
(defun rgrep (regexp &optional files dir)
"Recusively grep for REGEXP in FILES in directory tree rooted at DIR.
"Recursively grep for REGEXP in FILES in directory tree rooted at DIR.
The search is limited to file names matching shell pattern FILES.
FILES may use abbreviations defined in `grep-files-aliases', e.g.
entering `ch' is equivalent to `*.[ch]'.
With \\[universal-argument] prefix, allow user to edit the constructed
shell command line before it is executed.
With two \\[universal-argument] prefixes, edit and run grep-find shell command.
With \\[universal-argument] prefix, you can edit the constructed shell command line
before it is executed.
With two \\[universal-argument] prefixes, directly edit and run `grep-find-command'.
Collect output in a buffer. While find runs asynchronously, you
can use \\[next-error] (M-x next-error), or \\<grep-mode-map>\\[compile-goto-error]
@ -721,16 +721,16 @@ This command shares argument histories with \\[lgrep] and \\[grep-find]."
(if (null files)
(if (not (string= regexp grep-find-command))
(compilation-start regexp 'grep-mode))
(let* ((default-directory (file-name-as-directory (expand-file-name dir)))
(command (grep-expand-template
grep-find-template
regexp
(concat "\\( -name "
(mapconcat #'shell-quote-argument
(split-string files)
" -o -name ")
" \\)")
default-directory
(setq dir (file-name-as-directory (expand-file-name dir)))
(let ((command (grep-expand-template
grep-find-template
regexp
(concat "\\( -name "
(mapconcat #'shell-quote-argument
(split-string files)
" -o -name ")
" \\)")
dir
(and grep-find-ignored-directories
(concat "\\( -path '*/"
(mapconcat #'identity
@ -742,8 +742,12 @@ This command shares argument histories with \\[lgrep] and \\[grep-find]."
(setq command
(read-from-minibuffer "Confirm: "
command nil nil 'grep-find-history))
(push command grep-find-history))
(compilation-start command 'grep-mode))))))
(add-to-history 'grep-find-history command))
(let ((default-directory dir))
(compilation-start command 'grep-mode))
;; Set default-directory if we started rgrep in the *grep* buffer.
(if (eq next-error-last-buffer (current-buffer))
(setq default-directory dir)))))))
(provide 'grep)

View file

@ -16723,8 +16723,7 @@ specified by a target."
(progn (save-buffer)
(kill-buffer (current-buffer))
(set-buffer orig-buffer)
(setq file-name-history
(cons makefile-path-name file-name-history)))
(add-to-history 'file-name-history makefile-path-name))
(vhdl-warning-when-idle
(format "File not writable: \"%s\""
(abbreviate-file-name makefile-path-name)))

View file

@ -580,12 +580,9 @@ The strings are concatenated and terminated by a newline."
;;;; Scheme expressions ring
(defun xscheme-insert-expression (string)
(setq xscheme-expressions-ring (cons string xscheme-expressions-ring))
(if (> (length xscheme-expressions-ring) xscheme-expressions-ring-max)
(setcdr (nthcdr (1- xscheme-expressions-ring-max)
xscheme-expressions-ring)
nil))
(setq xscheme-expressions-ring-yank-pointer xscheme-expressions-ring))
(setq xscheme-expressions-ring-yank-pointer
(add-to-history 'xscheme-expressions-ring string
xscheme-expressions-ring-max)))
(defun xscheme-rotate-yank-pointer (arg)
"Rotate the yanking point in the kill ring."

View file

@ -858,7 +858,7 @@ so don't mark these buffers specially, just visit them normally."
;; deleted file, offer to write it.
(let* ((filen (car file))
(obuf (get-file-buffer filen)))
(push filen file-name-history)
(add-to-history 'file-name-history filen)
(if (and obuf (set-buffer obuf))
(progn
(cond ((file-exists-p filen)

View file

@ -1144,7 +1144,7 @@ they are expressions; otherwise they are strings.
\(That convention is designed to do the right thing for
recursive uses of the minibuffer.)")
(setq minibuffer-history-variable 'minibuffer-history)
(setq minibuffer-history-position nil)
(setq minibuffer-history-position nil) ;; Defvar is in C code.
(defvar minibuffer-history-search-history nil)
(defvar minibuffer-text-before-history nil

View file

@ -2529,8 +2529,7 @@ name will have the function FIND-FUN and not token."
default-directory)
(speedbar-message nil))))
;; Else, we can do a short cut. No text cache.
(let ((cbd (expand-file-name default-directory))
)
(let ((cbd (expand-file-name default-directory)))
(set-buffer speedbar-buffer)
(speedbar-with-writable
(let* ((window (get-buffer-window speedbar-buffer 0))
@ -2542,8 +2541,7 @@ name will have the function FIND-FUN and not token."
(funcall func cbd 0))
(speedbar-reconfigure-keymaps)
(set-window-point window p)
(set-window-start window start)))
))))
(set-window-start window start)))))))
(defun speedbar-update-directory-contents ()
"Update the contents of the speedbar buffer based on the current directory."
@ -2677,7 +2675,6 @@ Also resets scanner functions."
(frame-visible-p (speedbar-current-frame))
(not (eq (frame-visible-p (speedbar-current-frame)) 'icon)))
(let ((af (selected-frame)))
(save-window-excursion
(dframe-select-attached-frame speedbar-frame)
;; make sure we at least choose a window to
;; get a good directory from
@ -2704,14 +2701,8 @@ Also resets scanner functions."
"Updating speedbar to special mode: %s...done"
major-mode)
(speedbar-message nil))))
;; Update all the contents if directories change!
(if (or (member major-mode speedbar-ignored-modes)
(eq af (speedbar-current-frame))
(not (buffer-file-name)))
nil
(speedbar-update-localized-contents)
))
(select-frame af)))
(speedbar-update-localized-contents))
(select-frame af))
;; Now run stealthy updates of time-consuming items
(speedbar-stealthy-updates)))))
(run-hooks 'speedbar-timer-hook))

View file

@ -827,7 +827,16 @@ opening the first frame (e.g. open a connection to an X server).")
(format "Invalid user name %s"
init-file-user)
:error)
(if (file-directory-p (expand-file-name (concat "~" init-file-user)))
(if (file-directory-p (expand-file-name
;; We don't support ~USER on MS-Windows except
;; for the current user, and always load .emacs
;; from the current user's home directory (see
;; below). So always check "~", even if invoked
;; with "-u USER", or if $USER or $LOGNAME are
;; set to something different.
(if (eq system-type 'windows-nt)
"~"
(concat "~" init-file-user))))
nil
(display-warning 'initialization
(format "User %s has no home directory"
@ -1282,7 +1291,9 @@ where FACE is a valid face specification, as it can be used with
(set-buffer buffer)
(erase-buffer)
(if pure-space-overflow
(insert "Warning Warning Pure space overflow Warning Warning\n"))
(insert "\
Warning Warning!!! Pure space overflow !!!Warning Warning
\(See the node Pure Storage in the Lisp manual for details.)\n"))
(fancy-splash-head)
(apply #'fancy-splash-insert text)
(fancy-splash-tail)
@ -1354,7 +1365,7 @@ mouse."
emulation-mode-map-alists nil
buffer-undo-list t
mode-line-format (propertize "---- %b %-"
'face '(:weight bold))
'face 'mode-line-buffer-id)
fancy-splash-stop-time (+ (float-time)
fancy-splash-max-time)
timer (run-with-timer 0 fancy-splash-delay
@ -1406,10 +1417,12 @@ we put it on this frame."
(with-current-buffer (get-buffer-create "GNU Emacs")
(set (make-local-variable 'tab-width) 8)
(set (make-local-variable 'mode-line-format)
(propertize "---- %b %-" 'face '(:weight bold)))
(propertize "---- %b %-" 'face 'mode-line-buffer-id))
(if pure-space-overflow
(insert "Warning Warning Pure space overflow Warning Warning\n"))
(insert "\
Warning Warning!!! Pure space overflow !!!Warning Warning
\(See the node Pure Storage in the Lisp manual for details.)\n"))
;; The convention for this piece of code is that
;; each piece of output starts with one or two newlines
@ -1623,9 +1636,7 @@ normal otherwise."
(not noninteractive))
(display-warning
'initialization
"Building Emacs overflowed pure space. See \"(elisp)Building Emacs\" for more information."
;; FIXME: Tell the user what kind of problems are possible and how to fix
;; the overflow.
"Building Emacs overflowed pure space. (See the node Pure Storage in the Lisp manual for details.)"
:warning))
(when command-line-args-left

View file

@ -1122,6 +1122,31 @@ The return value is the new value of LIST-VAR."
(if (and oa ob)
(< oa ob)
oa)))))))
(defun add-to-history (history-var newelt &optional maxelt)
"Add NEWELT to the history list stored in the variable HISTORY-VAR.
Return the new history list.
If MAXELT is non-nil, it specifies the maximum length of the history.
Otherwise, the maximum history length is the value of the `history-length'
property on symbol HISTORY-VAR, if set, or the value of the `history-length'
variable.
Remove duplicates of NEWELT unless `history-delete-duplicates' is nil."
(unless maxelt
(setq maxelt (or (get history-var 'history-length)
history-length)))
(let ((history (symbol-value history-var))
tail)
(if history-delete-duplicates
(setq history (delete newelt history)))
(setq history (cons newelt history))
(when (integerp maxelt)
(if (= 0 maxelt)
(setq history nil)
(setq tail (nthcdr (1- maxelt) history))
(when (consp tail)
(setcdr tail nil))))
(set history-var history)))
;;;; Mode hooks.
@ -1931,6 +1956,13 @@ Otherwise, return nil."
"Return non-nil if OBJECT is one of the two canonical boolean values: t or nil."
(memq object '(nil t)))
(defun field-at-pos (pos)
"Return the field at position POS, taking stickiness etc into account"
(let ((raw-field (get-char-property (field-beginning pos) 'field)))
(if (eq raw-field 'boundary)
(get-char-property (1- (field-end pos)) 'field)
raw-field)))
;;;; Support for yanking and text properties.

View file

@ -82,6 +82,8 @@
(defvar mac-services-selection)
(defvar mac-system-script-code)
(defvar mac-apple-event-map)
(defvar mac-atsu-font-table)
(defvar mac-font-panel-mode)
(defvar x-invocation-args)
(defvar x-command-line-resources nil)
@ -1128,6 +1130,107 @@ correspoinding TextEncodingBase value."
(mac-add-charset-info "mac-dingbats" 34)
(mac-add-charset-info "iso10646-1" 126) ; for ATSUI
(cp-make-coding-system
mac-centraleurroman
[?\,AD(B ?\$,1 (B ?\$,1 !(B ?\,AI(B ?\$,1 $(B ?\,AV(B ?\,A\(B ?\,Aa(B ?\$,1 %(B ?\$,1 ,(B ?\,Ad(B ?\$,1 -(B ?\$,1 &(B ?\$,1 '(B ?\,Ai(B ?\$,1!9(B
?\$,1!:(B ?\$,1 .(B ?\,Am(B ?\$,1 /(B ?\$,1 2(B ?\$,1 3(B ?\$,1 6(B ?\,As(B ?\$,1 7(B ?\,At(B ?\,Av(B ?\,Au(B ?\,Az(B ?\$,1 :(B ?\$,1 ;(B ?\,A|(B
?\$,1s (B ?\,A0(B ?\$,1 8(B ?\,A#(B ?\,A'(B ?\$,1s"(B ?\,A6(B ?\,A_(B ?\,A.(B ?\,A)(B ?\$,1ub(B ?\$,1 9(B ?\,A((B ?\$,1y (B ?\$,1 C(B ?\$,1 N(B
?\$,1 O(B ?\$,1 J(B ?\$,1y$(B ?\$,1y%(B ?\$,1 K(B ?\$,1 V(B ?\$,1x"(B ?\$,1x1(B ?\$,1 b(B ?\$,1 [(B ?\$,1 \(B ?\$,1 ](B ?\$,1 ^(B ?\$,1 Y(B ?\$,1 Z(B ?\$,1 e(B
?\$,1 f(B ?\$,1 c(B ?\,A,(B ?\$,1x:(B ?\$,1 d(B ?\$,1 g(B ?\$,1x&(B ?\,A+(B ?\,A;(B ?\$,1s&(B ?\,A (B ?\$,1 h(B ?\$,1 p(B ?\,AU(B ?\$,1 q(B ?\$,1 l(B
?\$,1rs(B ?\$,1rt(B ?\$,1r|(B ?\$,1r}(B ?\$,1rx(B ?\$,1ry(B ?\,Aw(B ?\$,2"*(B ?\$,1 m(B ?\$,1 t(B ?\$,1 u(B ?\$,1 x(B ?\$,1s9(B ?\$,1s:(B ?\$,1 y(B ?\$,1 v(B
?\$,1 w(B ?\$,1! (B ?\$,1rz(B ?\$,1r~(B ?\$,1!!(B ?\$,1 z(B ?\$,1 {(B ?\,AA(B ?\$,1!$(B ?\$,1!%(B ?\,AM(B ?\$,1!=(B ?\$,1!>(B ?\$,1!*(B ?\,AS(B ?\,AT(B
?\$,1!+(B ?\$,1!.(B ?\,AZ(B ?\$,1!/(B ?\$,1!0(B ?\$,1!1(B ?\$,1!2(B ?\$,1!3(B ?\,A](B ?\,A}(B ?\$,1 W(B ?\$,1!;(B ?\$,1 a(B ?\$,1!<(B ?\$,1 B(B ?\$,1$g(B]
"Mac Central European Roman Encoding (MIME:x-mac-centraleurroman).")
(coding-system-put 'mac-centraleurroman 'mime-charset 'x-mac-centraleurroman)
(cp-make-coding-system
mac-cyrillic
[?\$,1(0(B ?\$,1(1(B ?\$,1(2(B ?\$,1(3(B ?\$,1(4(B ?\$,1(5(B ?\$,1(6(B ?\$,1(7(B ?\$,1(8(B ?\$,1(9(B ?\$,1(:(B ?\$,1(;(B ?\$,1(<(B ?\$,1(=(B ?\$,1(>(B ?\$,1(?(B
?\$,1(@(B ?\$,1(A(B ?\$,1(B(B ?\$,1(C(B ?\$,1(D(B ?\$,1(E(B ?\$,1(F(B ?\$,1(G(B ?\$,1(H(B ?\$,1(I(B ?\$,1(J(B ?\$,1(K(B ?\$,1(L(B ?\$,1(M(B ?\$,1(N(B ?\$,1(O(B
?\$,1s (B ?\,A0(B ?\$,1)P(B ?\,A#(B ?\,A'(B ?\$,1s"(B ?\,A6(B ?\$,1(&(B ?\,A.(B ?\,A)(B ?\$,1ub(B ?\$,1("(B ?\$,1(r(B ?\$,1y (B ?\$,1(#(B ?\$,1(s(B
?\$,1x>(B ?\,A1(B ?\$,1y$(B ?\$,1y%(B ?\$,1(v(B ?\,A5(B ?\$,1)Q(B ?\$,1(((B ?\$,1($(B ?\$,1(t(B ?\$,1('(B ?\$,1(w(B ?\$,1()(B ?\$,1(y(B ?\$,1(*(B ?\$,1(z(B
?\$,1(x(B ?\$,1(%(B ?\,A,(B ?\$,1x:(B ?\$,1!R(B ?\$,1xh(B ?\$,1x&(B ?\,A+(B ?\,A;(B ?\$,1s&(B ?\,A (B ?\$,1(+(B ?\$,1({(B ?\$,1(,(B ?\$,1(|(B ?\$,1(u(B
?\$,1rs(B ?\$,1rt(B ?\$,1r|(B ?\$,1r}(B ?\$,1rx(B ?\$,1ry(B ?\,Aw(B ?\$,1r~(B ?\$,1(.(B ?\$,1(~(B ?\$,1(/(B ?\$,1((B ?\$,1uV(B ?\$,1(!(B ?\$,1(q(B ?\$,1(o(B
?\$,1(P(B ?\$,1(Q(B ?\$,1(R(B ?\$,1(S(B ?\$,1(T(B ?\$,1(U(B ?\$,1(V(B ?\$,1(W(B ?\$,1(X(B ?\$,1(Y(B ?\$,1(Z(B ?\$,1([(B ?\$,1(\(B ?\$,1(](B ?\$,1(^(B ?\$,1(_(B
?\$,1(`(B ?\$,1(a(B ?\$,1(b(B ?\$,1(c(B ?\$,1(d(B ?\$,1(e(B ?\$,1(f(B ?\$,1(g(B ?\$,1(h(B ?\$,1(i(B ?\$,1(j(B ?\$,1(k(B ?\$,1(l(B ?\$,1(m(B ?\$,1(n(B ?\$,1tL(B]
"Mac Cyrillic Encoding (MIME:x-mac-cyrillic).")
(coding-system-put 'mac-cyrillic 'mime-charset 'x-mac-cyrillic)
(let
((encoding-vector
(vconcat
(make-vector 32 nil)
;; mac-symbol (32..126) -> emacs-mule mapping
[?\ ?\! ?\$,1x (B ?\# ?\$,1x#(B ?\% ?\& ?\$,1x-(B ?\( ?\) ?\$,1x7(B ?\+ ?\, ?\$,1x2(B ?\. ?\/
?\0 ?\1 ?\2 ?\3 ?\4 ?\5 ?\6 ?\7 ?\8 ?\9 ?\: ?\; ?\< ?\= ?\> ?\?
?\$,1xe(B ?\$,1&q(B ?\$,1&r(B ?\$,1''(B ?\$,1&t(B ?\$,1&u(B ?\$,1'&(B ?\$,1&s(B ?\$,1&w(B ?\$,1&y(B ?\$,1'Q(B ?\$,1&z(B ?\$,1&{(B ?\$,1&|(B ?\$,1&}(B ?\$,1&(B
?\$,1' (B ?\$,1&x(B ?\$,1'!(B ?\$,1'#(B ?\$,1'$(B ?\$,1'%(B ?\$,1'B(B ?\$,1')(B ?\$,1&~(B ?\$,1'((B ?\$,1&v(B ?\[ ?\$,1xT(B ?\] ?\$,1ye(B ?\_
?\$,3bE(B ?\$,1'1(B ?\$,1'2(B ?\$,1'G(B ?\$,1'4(B ?\$,1'5(B ?\$,1'F(B ?\$,1'3(B ?\$,1'7(B ?\$,1'9(B ?\$,1'U(B ?\$,1':(B ?\$,1';(B ?\$,1'<(B ?\$,1'=(B ?\$,1'?(B
?\$,1'@(B ?\$,1'8(B ?\$,1'A(B ?\$,1'C(B ?\$,1'D(B ?\$,1'E(B ?\$,1'V(B ?\$,1'I(B ?\$,1'>(B ?\$,1'H(B ?\$,1'6(B ?\{ ?\| ?\} ?\$,1x\(B]
(make-vector (- 160 127) nil)
;; mac-symbol (160..254) -> emacs-mule mapping
;; Mapping of the following characters are changed from the
;; original one:
;; 0xE2 0x00AE+0xF87F -> 0x00AE # REGISTERED SIGN, alternate: sans serif
;; 0xE3 0x00A9+0xF87F -> 0x00A9 # COPYRIGHT SIGN, alternate: sans serif
;; 0xE4 0x2122+0xF87F -> 0x2122 # TRADE MARK SIGN, alternate: sans serif
[?\$,1tL(B ?\$,1'R(B ?\$,1s2(B ?\$,1y$(B ?\$,1sD(B ?\$,1x>(B ?\$,1!R(B ?\$,2#c(B ?\$,2#f(B ?\$,2#e(B ?\$,2#`(B ?\$,1vt(B ?\$,1vp(B ?\$,1vq(B ?\$,1vr(B ?\$,1vs(B
?\,A0(B ?\,A1(B ?\$,1s3(B ?\$,1y%(B ?\,AW(B ?\$,1x=(B ?\$,1x"(B ?\$,1s"(B ?\,Aw(B ?\$,1y (B ?\$,1y!(B ?\$,1xh(B ?\$,1s&(B ?\$,1|p(B ?\$,1|O(B ?\$,1w5(B
?\$,1uu(B ?\$,1uQ(B ?\$,1u\(B ?\$,1uX(B ?\$,1yW(B ?\$,1yU(B ?\$,1x%(B ?\$,1xI(B ?\$,1xJ(B ?\$,1yC(B ?\$,1yG(B ?\$,1yD(B ?\$,1yB(B ?\$,1yF(B ?\$,1x((B ?\$,1x)(B
?\$,1x@(B ?\$,1x'(B ?\,A.(B ?\,A)(B ?\$,1ub(B ?\$,1x/(B ?\$,1x:(B ?\$,1z%(B ?\,A,(B ?\$,1xG(B ?\$,1xH(B ?\$,1wT(B ?\$,1wP(B ?\$,1wQ(B ?\$,1wR(B ?\$,1wS(B
?\$,2"*(B ?\$,2=H(B ?\,A.(B ?\,A)(B ?\$,1ub(B ?\$,1x1(B ?\$,1|;(B ?\$,1|<(B ?\$,1|=(B ?\$,1|A(B ?\$,1|B(B ?\$,1|C(B ?\$,1|G(B ?\$,1|H(B ?\$,1|I(B ?\$,1|J(B
?\$,3b_(B ?\$,2=I(B ?\$,1xK(B ?\$,1{ (B ?\$,1|N(B ?\$,1{!(B ?\$,1|>(B ?\$,1|?(B ?\$,1|@(B ?\$,1|D(B ?\$,1|E(B ?\$,1|F(B ?\$,1|K(B ?\$,1|L(B ?\$,1|M(B
nil]))
translation-table)
(setq translation-table
(make-translation-table-from-vector encoding-vector))
;; (define-translation-table 'mac-symbol-decoder translation-table)
(define-translation-table 'mac-symbol-encoder
(char-table-extra-slot translation-table 0)))
(let
((encoding-vector
(vconcat
(make-vector 32 nil)
;; mac-dingbats (32..126) -> emacs-mule mapping
[?\ ?\$,2%A(B ?\$,2%B(B ?\$,2%C(B ?\$,2%D(B ?\$,2"n(B ?\$,2%F(B ?\$,2%G(B ?\$,2%H(B ?\$,2%I(B ?\$,2"{(B ?\$,2"~(B ?\$,2%L(B ?\$,2%M(B ?\$,2%N(B ?\$,2%O(B
?\$,2%P(B ?\$,2%Q(B ?\$,2%R(B ?\$,2%S(B ?\$,2%T(B ?\$,2%U(B ?\$,2%V(B ?\$,2%W(B ?\$,2%X(B ?\$,2%Y(B ?\$,2%Z(B ?\$,2%[(B ?\$,2%\(B ?\$,2%](B ?\$,2%^(B ?\$,2%_(B
?\$,2%`(B ?\$,2%a(B ?\$,2%b(B ?\$,2%c(B ?\$,2%d(B ?\$,2%e(B ?\$,2%f(B ?\$,2%g(B ?\$,2"e(B ?\$,2%i(B ?\$,2%j(B ?\$,2%k(B ?\$,2%l(B ?\$,2%m(B ?\$,2%n(B ?\$,2%o(B
?\$,2%p(B ?\$,2%q(B ?\$,2%r(B ?\$,2%s(B ?\$,2%t(B ?\$,2%u(B ?\$,2%v(B ?\$,2%w(B ?\$,2%x(B ?\$,2%y(B ?\$,2%z(B ?\$,2%{(B ?\$,2%|(B ?\$,2%}(B ?\$,2%~(B ?\$,2%(B
?\$,2& (B ?\$,2&!(B ?\$,2&"(B ?\$,2&#(B ?\$,2&$(B ?\$,2&%(B ?\$,2&&(B ?\$,2&'(B ?\$,2&((B ?\$,2&)(B ?\$,2&*(B ?\$,2&+(B ?\$,2"/(B ?\$,2&-(B ?\$,2!`(B ?\$,2&/(B
?\$,2&0(B ?\$,2&1(B ?\$,2&2(B ?\$,2!r(B ?\$,2!|(B ?\$,2"&(B ?\$,2&6(B ?\$,2"7(B ?\$,2&8(B ?\$,2&9(B ?\$,2&:(B ?\$,2&;(B ?\$,2&<(B ?\$,2&=(B ?\$,2&>(B
nil
;; mac-dingbats (128..141) -> emacs-mule mapping
?\$,2&H(B ?\$,2&I(B ?\$,2&J(B ?\$,2&K(B ?\$,2&L(B ?\$,2&M(B ?\$,2&N(B ?\$,2&O(B ?\$,2&P(B ?\$,2&Q(B ?\$,2&R(B ?\$,2&S(B ?\$,2&T(B ?\$,2&U(B]
(make-vector (- 161 142) nil)
;; mac-dingbats (161..239) -> emacs-mule mapping
[?\$,2&A(B ?\$,2&B(B ?\$,2&C(B ?\$,2&D(B ?\$,2&E(B ?\$,2&F(B ?\$,2&G(B ?\$,2#c(B ?\$,2#f(B ?\$,2#e(B ?\$,2#`(B ?\$,1~@(B ?\$,1~A(B ?\$,1~B(B ?\$,1~C(B
?\$,1~D(B ?\$,1~E(B ?\$,1~F(B ?\$,1~G(B ?\$,1~H(B ?\$,1~I(B ?\$,2&V(B ?\$,2&W(B ?\$,2&X(B ?\$,2&Y(B ?\$,2&Z(B ?\$,2&[(B ?\$,2&\(B ?\$,2&](B ?\$,2&^(B ?\$,2&_(B
?\$,2&`(B ?\$,2&a(B ?\$,2&b(B ?\$,2&c(B ?\$,2&d(B ?\$,2&e(B ?\$,2&f(B ?\$,2&g(B ?\$,2&h(B ?\$,2&i(B ?\$,2&j(B ?\$,2&k(B ?\$,2&l(B ?\$,2&m(B ?\$,2&n(B ?\$,2&o(B
?\$,2&p(B ?\$,2&q(B ?\$,2&r(B ?\$,2&s(B ?\$,2&t(B ?\$,1vr(B ?\$,1vt(B ?\$,1vu(B ?\$,2&x(B ?\$,2&y(B ?\$,2&z(B ?\$,2&{(B ?\$,2&|(B ?\$,2&}(B ?\$,2&~(B ?\$,2&(B
?\$,2' (B ?\$,2'!(B ?\$,2'"(B ?\$,2'#(B ?\$,2'$(B ?\$,2'%(B ?\$,2'&(B ?\$,2''(B ?\$,2'((B ?\$,2')(B ?\$,2'*(B ?\$,2'+(B ?\$,2',(B ?\$,2'-(B ?\$,2'.(B ?\$,2'/(B
nil
;; mac-dingbats (241..254) -> emacs-mule mapping
?\$,2'1(B ?\$,2'2(B ?\$,2'3(B ?\$,2'4(B ?\$,2'5(B ?\$,2'6(B ?\$,2'7(B ?\$,2'8(B ?\$,2'9(B ?\$,2':(B ?\$,2';(B ?\$,2'<(B ?\$,2'=(B ?\$,2'>(B
nil]))
translation-table)
(setq translation-table
(make-translation-table-from-vector encoding-vector))
;; (define-translation-table 'mac-dingbats-decoder translation-table)
(define-translation-table 'mac-dingbats-encoder
(char-table-extra-slot translation-table 0)))
(defconst mac-system-coding-system
(let ((base (or (cdr (assq mac-system-script-code
mac-script-code-coding-systems))
'mac-roman)))
(if (eq system-type 'darwin)
base
(coding-system-change-eol-conversion base 'mac)))
"Coding system derived from the system script code.")
(set-selection-coding-system mac-system-coding-system)
;;;; Keyboard layout/language change events
(defun mac-handle-language-change (event)
@ -1141,6 +1244,91 @@ correspoinding TextEncodingBase value."
(define-key key-translation-map [?\x80] "\\"))))
(define-key special-event-map [language-change] 'mac-handle-language-change)
;;;; Conversion between common flavors and Lisp string.
(defconst mac-text-encoding-mac-japanese-basic-variant #x20001
"MacJapanese text encoding without Apple double-byte extensions.")
(defun mac-utxt-to-string (data &optional coding-system)
(or coding-system (setq coding-system mac-system-coding-system))
(let* ((encoding
(and (eq system-type 'darwin)
(eq (coding-system-base coding-system) 'japanese-shift-jis)
mac-text-encoding-mac-japanese-basic-variant))
(str (and (fboundp 'mac-code-convert-string)
(mac-code-convert-string data nil
(or encoding coding-system)))))
(when str
(setq str (decode-coding-string str coding-system))
(if (eq encoding mac-text-encoding-mac-japanese-basic-variant)
;; Does it contain Apple one-byte extensions other than
;; reverse solidus?
(if (string-match "[\xa0\xfd-\xff]" str)
(setq str nil)
;; ASCII-only?
(unless (string-match "\\`[[:ascii:]]*\\'" str)
(subst-char-in-string ?\x5c ?\(J\(B str t)
(subst-char-in-string ?\x80 ?\\ str t)))))
(or str
(decode-coding-string data
(if (eq (byteorder) ?B) 'utf-16be 'utf-16le)))))
(defun mac-string-to-utxt (string &optional coding-system)
(or coding-system (setq coding-system mac-system-coding-system))
(let (data encoding)
(when (and (fboundp 'mac-code-convert-string)
(memq (coding-system-base coding-system)
(find-coding-systems-string string)))
(setq coding-system
(coding-system-change-eol-conversion coding-system 'mac))
(when (and (eq system-type 'darwin)
(eq coding-system 'japanese-shift-jis-mac))
(setq encoding mac-text-encoding-mac-japanese-basic-variant)
(setq string (subst-char-in-string ?\\ ?\x80 string))
(subst-char-in-string ?\(J\(B ?\x5c string t))
(setq data (mac-code-convert-string
(encode-coding-string string coding-system)
(or encoding coding-system) nil)))
(or data (encode-coding-string string (if (eq (byteorder) ?B)
'utf-16be-mac
'utf-16le-mac)))))
(defun mac-TEXT-to-string (data &optional coding-system)
(or coding-system (setq coding-system mac-system-coding-system))
(prog1 (setq data (decode-coding-string data coding-system))
(when (eq (coding-system-base coding-system) 'japanese-shift-jis)
;; (subst-char-in-string ?\x5c ?\(J\(B data t)
(subst-char-in-string ?\x80 ?\\ data t))))
(defun mac-string-to-TEXT (string &optional coding-system)
(or coding-system (setq coding-system mac-system-coding-system))
(let ((encodables (find-coding-systems-string string))
(rest mac-script-code-coding-systems))
(unless (memq (coding-system-base coding-system) encodables)
(while (and rest (not (memq (cdar rest) encodables)))
(setq rest (cdr rest)))
(if rest
(setq coding-system (cdar rest)))))
(setq coding-system
(coding-system-change-eol-conversion coding-system 'mac))
(when (eq coding-system 'japanese-shift-jis-mac)
;; (setq string (subst-char-in-string ?\\ ?\x80 string))
(setq string (subst-char-in-string ?\(J\(B ?\x5c string)))
(encode-coding-string string coding-system))
(defun mac-furl-to-string (data)
;; Remove a trailing nul character.
(let ((len (length data)))
(if (and (> len 0) (= (aref data (1- len)) ?\0))
(substring data 0 (1- len))
data)))
(defun mac-TIFF-to-string (data &optional text)
(prog1 (or text (setq text (copy-sequence " ")))
(put-text-property 0 (length text) 'display (create-image data 'tiff t)
text)))
;;;; Selections
@ -1190,22 +1378,11 @@ in `selection-converter-alist', which see."
(when (and (stringp data)
(setq data-type (get-text-property 0 'foreign-selection data)))
(cond ((eq data-type 'public.utf16-plain-text)
(let ((encoded (and (fboundp 'mac-code-convert-string)
(mac-code-convert-string data nil coding))))
(if encoded
(setq data (decode-coding-string encoded coding))
(setq data
(decode-coding-string data
(if (eq (byteorder) ?B)
'utf-16be 'utf-16le))))))
(setq data (mac-utxt-to-string data coding)))
((eq data-type 'com.apple.traditional-mac-plain-text)
(setq data (decode-coding-string data coding)))
(setq data (mac-TEXT-to-string data coding)))
((eq data-type 'public.file-url)
(setq data (decode-coding-string data 'utf-8))
;; Remove a trailing nul character.
(let ((len (length data)))
(if (and (> len 0) (= (aref data (1- len)) ?\0))
(setq data (substring data 0 (1- len)))))))
(setq data (mac-furl-to-string data))))
(put-text-property 0 (length data) 'foreign-selection data-type data))
data))
@ -1227,9 +1404,7 @@ in `selection-converter-alist', which see."
(when tiff-image
(remove-text-properties 0 (length tiff-image)
'(foreign-selection nil) tiff-image)
(setq tiff-image (create-image tiff-image 'tiff t))
(or text (setq text " "))
(put-text-property 0 (length text) 'display tiff-image text))
(setq text (mac-TIFF-to-string tiff-image text)))
text))
;;; Return the value of the current selection.
@ -1300,11 +1475,7 @@ in `selection-converter-alist', which see."
(defun mac-select-convert-to-string (selection type value)
(let ((str (cdr (xselect-convert-to-string selection nil value)))
coding)
(setq coding (or next-selection-coding-system selection-coding-system))
(if coding
(setq coding (coding-system-base coding))
(setq coding 'raw-text))
(coding (or next-selection-coding-system selection-coding-system)))
(when str
;; If TYPE is nil, this is a local request, thus return STR as
;; is. Otherwise, encode STR.
@ -1314,28 +1485,9 @@ in `selection-converter-alist', which see."
(remove-text-properties 0 (length str) '(composition nil) str)
(cond
((eq type 'public.utf16-plain-text)
(let (s)
(when (and (fboundp 'mac-code-convert-string)
(memq coding (find-coding-systems-string str)))
(setq coding (coding-system-change-eol-conversion coding 'mac))
(setq s (mac-code-convert-string
(encode-coding-string str coding)
coding nil)))
(setq str (or s
(encode-coding-string str
(if (eq (byteorder) ?B)
'utf-16be-mac
'utf-16le-mac))))))
(setq str (mac-string-to-utxt str coding)))
((eq type 'com.apple.traditional-mac-plain-text)
(let ((encodables (find-coding-systems-string str))
(rest mac-script-code-coding-systems))
(unless (memq coding encodables)
(while (and rest (not (memq (cdar rest) encodables)))
(setq rest (cdr rest)))
(if rest
(setq coding (cdar rest)))))
(setq coding (coding-system-change-eol-conversion coding 'mac))
(setq str (encode-coding-string str coding)))
(setq str (mac-string-to-TEXT str coding)))
(t
(error "Unknown selection type: %S" type))
)))
@ -1433,6 +1585,17 @@ in `selection-converter-alist', which see."
(ash (lsh result extended-sign-len) (- extended-sign-len))
result)))
(defun mac-bytes-to-digits (bytes &optional from to)
(or from (setq from 0))
(or to (setq to (length bytes)))
(let ((len (- to from))
(val 0.0))
(dotimes (i len)
(setq val (+ (* val 256.0)
(aref bytes (+ from (if (eq (byteorder) ?B) i
(- len i 1)))))))
(format "%.0f" val)))
(defun mac-ae-selection-range (ae)
;; #pragma options align=mac68k
;; typedef struct SelectionRange {
@ -1518,6 +1681,78 @@ Currently the `mailto' scheme is supported."
(define-key mac-apple-event-map [hicommand about] 'display-splash-screen)
;;; Converted Carbon Events
(defun mac-handle-toolbar-switch-mode (event)
"Toggle visibility of tool-bars in response to EVENT.
With no keyboard modifiers, it toggles the visibility of the
frame where the tool-bar toggle button was pressed. With some
modifiers, it changes global tool-bar visibility setting."
(interactive "e")
(let* ((ae (mac-event-ae event))
(modifiers (cdr (mac-ae-parameter ae "kmod"))))
(if (and modifiers (not (string= modifiers "\000\000\000\000")))
;; Globally toggle tool-bar-mode if some modifier key is pressed.
(tool-bar-mode)
(let ((window-id (mac-bytes-to-digits (cdr (mac-ae-parameter ae))))
(rest (frame-list))
frame)
(while (and (null frame) rest)
(if (string= (frame-parameter (car rest) 'window-id) window-id)
(setq frame (car rest)))
(setq rest (cdr rest)))
(set-frame-parameter frame 'tool-bar-lines
(if (= (frame-parameter frame 'tool-bar-lines) 0)
1 0))))))
;; kEventClassWindow/kEventWindowToolbarSwitchMode
(define-key mac-apple-event-map [window toolbar-switch-mode]
'mac-handle-toolbar-switch-mode)
;;; Font panel
(when (fboundp 'mac-set-font-panel-visibility)
(define-minor-mode mac-font-panel-mode
"Toggle use of the font panel.
With numeric ARG, display the panel bar if and only if ARG is positive."
:init-value nil
:global t
:group 'mac
(mac-set-font-panel-visibility mac-font-panel-mode))
(defun mac-handle-font-panel-closed (event)
"Update internal status in response to font panel closed EVENT."
(interactive "e")
;; Synchronize with the minor mode variable.
(mac-font-panel-mode 0))
(defun mac-handle-font-selection (event)
"Change default face attributes according to font selection EVENT."
(interactive "e")
(let* ((ae (mac-event-ae event))
(fm-font-size (cdr (mac-ae-parameter ae "fmsz")))
(atsu-font-id (cdr (mac-ae-parameter ae "auid")))
(attribute-values (gethash atsu-font-id mac-atsu-font-table)))
(if fm-font-size
(setq attribute-values
`(:height ,(* 10 (mac-bytes-to-integer fm-font-size))
,@attribute-values)))
(apply 'set-face-attribute 'default (selected-frame) attribute-values)))
;; kEventClassFont/kEventFontPanelClosed
(define-key mac-apple-event-map [font panel-closed]
'mac-handle-font-panel-closed)
;; kEventClassFont/kEventFontSelection
(define-key mac-apple-event-map [font selection] 'mac-handle-font-selection)
(define-key-after menu-bar-showhide-menu [mac-font-panel-mode]
(menu-bar-make-mm-toggle mac-font-panel-mode
"Font Panel"
"Show the font panel as a floating dialog")
'showhide-speedbar)
) ;; (fboundp 'mac-set-font-panel-visibility)
;;; Services
(defun mac-services-open-file ()
"Open the file specified by the selection value for Services."
(interactive)
@ -1589,6 +1824,83 @@ Currently the `mailto' scheme is supported."
;; processed when the initial frame has been created: this is where
;; the files should be opened.
(add-hook 'after-init-hook 'mac-process-deferred-apple-events)
;;;; Drag and drop
(defcustom mac-dnd-types-alist
'(("furl" . mac-dnd-handle-furl)
("hfs " . mac-dnd-handle-hfs)
("utxt" . mac-dnd-insert-utxt)
("TEXT" . mac-dnd-insert-TEXT)
("TIFF" . mac-dnd-insert-TIFF))
"Which function to call to handle a drop of that type.
The function takes three arguments, WINDOW, ACTION and DATA.
WINDOW is where the drop occured, ACTION is always `private' on
Mac. DATA is the drop data. Unlike the x-dnd counterpart, the
return value of the function is not significant.
See also `mac-dnd-known-types'."
:version "22.1"
:type 'alist
:group 'mac)
(defun mac-dnd-handle-furl (window action data)
(dnd-handle-one-url window action (mac-furl-to-string data)))
(defun mac-dnd-handle-hfs (window action data)
;; struct HFSFlavor {
;; OSType fileType;
;; OSType fileCreator;
;; UInt16 fdFlags;
;; FSSpec fileSpec;
;; };
(let* ((file-name (mac-coerce-ae-data "fss " (substring data 10)
'undecoded-file-name))
(url (concat "file://"
(mapconcat 'url-hexify-string
(split-string file-name "/") "/"))))
(dnd-handle-one-url window action url)))
(defun mac-dnd-insert-utxt (window action data)
(dnd-insert-text window action (mac-utxt-to-string data)))
(defun mac-dnd-insert-TEXT (window action data)
(dnd-insert-text window action (mac-TEXT-to-string data)))
(defun mac-dnd-insert-TIFF (window action data)
(dnd-insert-text window action (mac-TIFF-to-string data)))
(defun mac-dnd-drop-data (event frame window data type)
(let* ((type-info (assoc type mac-dnd-types-alist))
(handler (cdr type-info))
(action 'private)
(w (posn-window (event-start event))))
(when handler
(if (and (windowp w) (window-live-p w)
(not (window-minibuffer-p w))
(not (window-dedicated-p w)))
;; If dropping in an ordinary window which we could use,
;; let dnd-open-file-other-window specify what to do.
(progn
(goto-char (posn-point (event-start event)))
(funcall handler window action data))
;; If we can't display the file here,
;; make a new window for it.
(let ((dnd-open-file-other-window t))
(select-frame frame)
(funcall handler window action data))))))
(defun mac-dnd-handle-drag-n-drop-event (event)
"Receive drag and drop events."
(interactive "e")
(let ((window (posn-window (event-start event))))
(when (windowp window) (select-window window))
(dolist (item (mac-ae-list (mac-event-ae event)))
(if (not (equal (car item) "null"))
(mac-dnd-drop-data event (selected-frame) window
(cdr item) (car item)))))
(select-frame-set-input-focus (selected-frame)))
;;; Do the actual Windows setup here; the above code just defines
;;; functions and variables that we use now.
@ -1618,96 +1930,6 @@ Currently the `mailto' scheme is supported."
(setq frame-creation-function 'x-create-frame-with-faces)
(cp-make-coding-system
mac-centraleurroman
[?\,AD(B ?\$,1 (B ?\$,1 !(B ?\,AI(B ?\$,1 $(B ?\,AV(B ?\,A\(B ?\,Aa(B ?\$,1 %(B ?\$,1 ,(B ?\,Ad(B ?\$,1 -(B ?\$,1 &(B ?\$,1 '(B ?\,Ai(B ?\$,1!9(B
?\$,1!:(B ?\$,1 .(B ?\,Am(B ?\$,1 /(B ?\$,1 2(B ?\$,1 3(B ?\$,1 6(B ?\,As(B ?\$,1 7(B ?\,At(B ?\,Av(B ?\,Au(B ?\,Az(B ?\$,1 :(B ?\$,1 ;(B ?\,A|(B
?\$,1s (B ?\,A0(B ?\$,1 8(B ?\,A#(B ?\,A'(B ?\$,1s"(B ?\,A6(B ?\,A_(B ?\,A.(B ?\,A)(B ?\$,1ub(B ?\$,1 9(B ?\,A((B ?\$,1y (B ?\$,1 C(B ?\$,1 N(B
?\$,1 O(B ?\$,1 J(B ?\$,1y$(B ?\$,1y%(B ?\$,1 K(B ?\$,1 V(B ?\$,1x"(B ?\$,1x1(B ?\$,1 b(B ?\$,1 [(B ?\$,1 \(B ?\$,1 ](B ?\$,1 ^(B ?\$,1 Y(B ?\$,1 Z(B ?\$,1 e(B
?\$,1 f(B ?\$,1 c(B ?\,A,(B ?\$,1x:(B ?\$,1 d(B ?\$,1 g(B ?\$,1x&(B ?\,A+(B ?\,A;(B ?\$,1s&(B ?\,A (B ?\$,1 h(B ?\$,1 p(B ?\,AU(B ?\$,1 q(B ?\$,1 l(B
?\$,1rs(B ?\$,1rt(B ?\$,1r|(B ?\$,1r}(B ?\$,1rx(B ?\$,1ry(B ?\,Aw(B ?\$,2"*(B ?\$,1 m(B ?\$,1 t(B ?\$,1 u(B ?\$,1 x(B ?\$,1s9(B ?\$,1s:(B ?\$,1 y(B ?\$,1 v(B
?\$,1 w(B ?\$,1! (B ?\$,1rz(B ?\$,1r~(B ?\$,1!!(B ?\$,1 z(B ?\$,1 {(B ?\,AA(B ?\$,1!$(B ?\$,1!%(B ?\,AM(B ?\$,1!=(B ?\$,1!>(B ?\$,1!*(B ?\,AS(B ?\,AT(B
?\$,1!+(B ?\$,1!.(B ?\,AZ(B ?\$,1!/(B ?\$,1!0(B ?\$,1!1(B ?\$,1!2(B ?\$,1!3(B ?\,A](B ?\,A}(B ?\$,1 W(B ?\$,1!;(B ?\$,1 a(B ?\$,1!<(B ?\$,1 B(B ?\$,1$g(B]
"Mac Central European Roman Encoding (MIME:x-mac-centraleurroman).")
(coding-system-put 'mac-centraleurroman 'mime-charset 'x-mac-centraleurroman)
(cp-make-coding-system
mac-cyrillic
[?\$,1(0(B ?\$,1(1(B ?\$,1(2(B ?\$,1(3(B ?\$,1(4(B ?\$,1(5(B ?\$,1(6(B ?\$,1(7(B ?\$,1(8(B ?\$,1(9(B ?\$,1(:(B ?\$,1(;(B ?\$,1(<(B ?\$,1(=(B ?\$,1(>(B ?\$,1(?(B
?\$,1(@(B ?\$,1(A(B ?\$,1(B(B ?\$,1(C(B ?\$,1(D(B ?\$,1(E(B ?\$,1(F(B ?\$,1(G(B ?\$,1(H(B ?\$,1(I(B ?\$,1(J(B ?\$,1(K(B ?\$,1(L(B ?\$,1(M(B ?\$,1(N(B ?\$,1(O(B
?\$,1s (B ?\,A0(B ?\$,1)P(B ?\,A#(B ?\,A'(B ?\$,1s"(B ?\,A6(B ?\$,1(&(B ?\,A.(B ?\,A)(B ?\$,1ub(B ?\$,1("(B ?\$,1(r(B ?\$,1y (B ?\$,1(#(B ?\$,1(s(B
?\$,1x>(B ?\,A1(B ?\$,1y$(B ?\$,1y%(B ?\$,1(v(B ?\,A5(B ?\$,1)Q(B ?\$,1(((B ?\$,1($(B ?\$,1(t(B ?\$,1('(B ?\$,1(w(B ?\$,1()(B ?\$,1(y(B ?\$,1(*(B ?\$,1(z(B
?\$,1(x(B ?\$,1(%(B ?\,A,(B ?\$,1x:(B ?\$,1!R(B ?\$,1xh(B ?\$,1x&(B ?\,A+(B ?\,A;(B ?\$,1s&(B ?\,A (B ?\$,1(+(B ?\$,1({(B ?\$,1(,(B ?\$,1(|(B ?\$,1(u(B
?\$,1rs(B ?\$,1rt(B ?\$,1r|(B ?\$,1r}(B ?\$,1rx(B ?\$,1ry(B ?\,Aw(B ?\$,1r~(B ?\$,1(.(B ?\$,1(~(B ?\$,1(/(B ?\$,1((B ?\$,1uV(B ?\$,1(!(B ?\$,1(q(B ?\$,1(o(B
?\$,1(P(B ?\$,1(Q(B ?\$,1(R(B ?\$,1(S(B ?\$,1(T(B ?\$,1(U(B ?\$,1(V(B ?\$,1(W(B ?\$,1(X(B ?\$,1(Y(B ?\$,1(Z(B ?\$,1([(B ?\$,1(\(B ?\$,1(](B ?\$,1(^(B ?\$,1(_(B
?\$,1(`(B ?\$,1(a(B ?\$,1(b(B ?\$,1(c(B ?\$,1(d(B ?\$,1(e(B ?\$,1(f(B ?\$,1(g(B ?\$,1(h(B ?\$,1(i(B ?\$,1(j(B ?\$,1(k(B ?\$,1(l(B ?\$,1(m(B ?\$,1(n(B ?\$,1tL(B]
"Mac Cyrillic Encoding (MIME:x-mac-cyrillic).")
(coding-system-put 'mac-cyrillic 'mime-charset 'x-mac-cyrillic)
(let
((encoding-vector
(vconcat
(make-vector 32 nil)
;; mac-symbol (32..126) -> emacs-mule mapping
[?\ ?\! ?\$,1x (B ?\# ?\$,1x#(B ?\% ?\& ?\$,1x-(B ?\( ?\) ?\$,1x7(B ?\+ ?\, ?\$,1x2(B ?\. ?\/
?\0 ?\1 ?\2 ?\3 ?\4 ?\5 ?\6 ?\7 ?\8 ?\9 ?\: ?\; ?\< ?\= ?\> ?\?
?\$,1xe(B ?\$,1&q(B ?\$,1&r(B ?\$,1''(B ?\$,1&t(B ?\$,1&u(B ?\$,1'&(B ?\$,1&s(B ?\$,1&w(B ?\$,1&y(B ?\$,1'Q(B ?\$,1&z(B ?\$,1&{(B ?\$,1&|(B ?\$,1&}(B ?\$,1&(B
?\$,1' (B ?\$,1&x(B ?\$,1'!(B ?\$,1'#(B ?\$,1'$(B ?\$,1'%(B ?\$,1'B(B ?\$,1')(B ?\$,1&~(B ?\$,1'((B ?\$,1&v(B ?\[ ?\$,1xT(B ?\] ?\$,1ye(B ?\_
?\$,3bE(B ?\$,1'1(B ?\$,1'2(B ?\$,1'G(B ?\$,1'4(B ?\$,1'5(B ?\$,1'F(B ?\$,1'3(B ?\$,1'7(B ?\$,1'9(B ?\$,1'U(B ?\$,1':(B ?\$,1';(B ?\$,1'<(B ?\$,1'=(B ?\$,1'?(B
?\$,1'@(B ?\$,1'8(B ?\$,1'A(B ?\$,1'C(B ?\$,1'D(B ?\$,1'E(B ?\$,1'V(B ?\$,1'I(B ?\$,1'>(B ?\$,1'H(B ?\$,1'6(B ?\{ ?\| ?\} ?\$,1x\(B]
(make-vector (- 160 127) nil)
;; mac-symbol (160..254) -> emacs-mule mapping
;; Mapping of the following characters are changed from the
;; original one:
;; 0xE2 0x00AE+0xF87F -> 0x00AE # REGISTERED SIGN, alternate: sans serif
;; 0xE3 0x00A9+0xF87F -> 0x00A9 # COPYRIGHT SIGN, alternate: sans serif
;; 0xE4 0x2122+0xF87F -> 0x2122 # TRADE MARK SIGN, alternate: sans serif
[?\$,1tL(B ?\$,1'R(B ?\$,1s2(B ?\$,1y$(B ?\$,1sD(B ?\$,1x>(B ?\$,1!R(B ?\$,2#c(B ?\$,2#f(B ?\$,2#e(B ?\$,2#`(B ?\$,1vt(B ?\$,1vp(B ?\$,1vq(B ?\$,1vr(B ?\$,1vs(B
?\,A0(B ?\,A1(B ?\$,1s3(B ?\$,1y%(B ?\,AW(B ?\$,1x=(B ?\$,1x"(B ?\$,1s"(B ?\,Aw(B ?\$,1y (B ?\$,1y!(B ?\$,1xh(B ?\$,1s&(B ?\$,1|p(B ?\$,1|O(B ?\$,1w5(B
?\$,1uu(B ?\$,1uQ(B ?\$,1u\(B ?\$,1uX(B ?\$,1yW(B ?\$,1yU(B ?\$,1x%(B ?\$,1xI(B ?\$,1xJ(B ?\$,1yC(B ?\$,1yG(B ?\$,1yD(B ?\$,1yB(B ?\$,1yF(B ?\$,1x((B ?\$,1x)(B
?\$,1x@(B ?\$,1x'(B ?\,A.(B ?\,A)(B ?\$,1ub(B ?\$,1x/(B ?\$,1x:(B ?\$,1z%(B ?\,A,(B ?\$,1xG(B ?\$,1xH(B ?\$,1wT(B ?\$,1wP(B ?\$,1wQ(B ?\$,1wR(B ?\$,1wS(B
?\$,2"*(B ?\$,2=H(B ?\,A.(B ?\,A)(B ?\$,1ub(B ?\$,1x1(B ?\$,1|;(B ?\$,1|<(B ?\$,1|=(B ?\$,1|A(B ?\$,1|B(B ?\$,1|C(B ?\$,1|G(B ?\$,1|H(B ?\$,1|I(B ?\$,1|J(B
?\$,3b_(B ?\$,2=I(B ?\$,1xK(B ?\$,1{ (B ?\$,1|N(B ?\$,1{!(B ?\$,1|>(B ?\$,1|?(B ?\$,1|@(B ?\$,1|D(B ?\$,1|E(B ?\$,1|F(B ?\$,1|K(B ?\$,1|L(B ?\$,1|M(B
nil]))
translation-table)
(setq translation-table
(make-translation-table-from-vector encoding-vector))
;; (define-translation-table 'mac-symbol-decoder translation-table)
(define-translation-table 'mac-symbol-encoder
(char-table-extra-slot translation-table 0)))
(let
((encoding-vector
(vconcat
(make-vector 32 nil)
;; mac-dingbats (32..126) -> emacs-mule mapping
[?\ ?\$,2%A(B ?\$,2%B(B ?\$,2%C(B ?\$,2%D(B ?\$,2"n(B ?\$,2%F(B ?\$,2%G(B ?\$,2%H(B ?\$,2%I(B ?\$,2"{(B ?\$,2"~(B ?\$,2%L(B ?\$,2%M(B ?\$,2%N(B ?\$,2%O(B
?\$,2%P(B ?\$,2%Q(B ?\$,2%R(B ?\$,2%S(B ?\$,2%T(B ?\$,2%U(B ?\$,2%V(B ?\$,2%W(B ?\$,2%X(B ?\$,2%Y(B ?\$,2%Z(B ?\$,2%[(B ?\$,2%\(B ?\$,2%](B ?\$,2%^(B ?\$,2%_(B
?\$,2%`(B ?\$,2%a(B ?\$,2%b(B ?\$,2%c(B ?\$,2%d(B ?\$,2%e(B ?\$,2%f(B ?\$,2%g(B ?\$,2"e(B ?\$,2%i(B ?\$,2%j(B ?\$,2%k(B ?\$,2%l(B ?\$,2%m(B ?\$,2%n(B ?\$,2%o(B
?\$,2%p(B ?\$,2%q(B ?\$,2%r(B ?\$,2%s(B ?\$,2%t(B ?\$,2%u(B ?\$,2%v(B ?\$,2%w(B ?\$,2%x(B ?\$,2%y(B ?\$,2%z(B ?\$,2%{(B ?\$,2%|(B ?\$,2%}(B ?\$,2%~(B ?\$,2%(B
?\$,2& (B ?\$,2&!(B ?\$,2&"(B ?\$,2&#(B ?\$,2&$(B ?\$,2&%(B ?\$,2&&(B ?\$,2&'(B ?\$,2&((B ?\$,2&)(B ?\$,2&*(B ?\$,2&+(B ?\$,2"/(B ?\$,2&-(B ?\$,2!`(B ?\$,2&/(B
?\$,2&0(B ?\$,2&1(B ?\$,2&2(B ?\$,2!r(B ?\$,2!|(B ?\$,2"&(B ?\$,2&6(B ?\$,2"7(B ?\$,2&8(B ?\$,2&9(B ?\$,2&:(B ?\$,2&;(B ?\$,2&<(B ?\$,2&=(B ?\$,2&>(B
nil
;; mac-dingbats (128..141) -> emacs-mule mapping
?\$,2&H(B ?\$,2&I(B ?\$,2&J(B ?\$,2&K(B ?\$,2&L(B ?\$,2&M(B ?\$,2&N(B ?\$,2&O(B ?\$,2&P(B ?\$,2&Q(B ?\$,2&R(B ?\$,2&S(B ?\$,2&T(B ?\$,2&U(B]
(make-vector (- 161 142) nil)
;; mac-dingbats (161..239) -> emacs-mule mapping
[?\$,2&A(B ?\$,2&B(B ?\$,2&C(B ?\$,2&D(B ?\$,2&E(B ?\$,2&F(B ?\$,2&G(B ?\$,2#c(B ?\$,2#f(B ?\$,2#e(B ?\$,2#`(B ?\$,1~@(B ?\$,1~A(B ?\$,1~B(B ?\$,1~C(B
?\$,1~D(B ?\$,1~E(B ?\$,1~F(B ?\$,1~G(B ?\$,1~H(B ?\$,1~I(B ?\$,2&V(B ?\$,2&W(B ?\$,2&X(B ?\$,2&Y(B ?\$,2&Z(B ?\$,2&[(B ?\$,2&\(B ?\$,2&](B ?\$,2&^(B ?\$,2&_(B
?\$,2&`(B ?\$,2&a(B ?\$,2&b(B ?\$,2&c(B ?\$,2&d(B ?\$,2&e(B ?\$,2&f(B ?\$,2&g(B ?\$,2&h(B ?\$,2&i(B ?\$,2&j(B ?\$,2&k(B ?\$,2&l(B ?\$,2&m(B ?\$,2&n(B ?\$,2&o(B
?\$,2&p(B ?\$,2&q(B ?\$,2&r(B ?\$,2&s(B ?\$,2&t(B ?\$,1vr(B ?\$,1vt(B ?\$,1vu(B ?\$,2&x(B ?\$,2&y(B ?\$,2&z(B ?\$,2&{(B ?\$,2&|(B ?\$,2&}(B ?\$,2&~(B ?\$,2&(B
?\$,2' (B ?\$,2'!(B ?\$,2'"(B ?\$,2'#(B ?\$,2'$(B ?\$,2'%(B ?\$,2'&(B ?\$,2''(B ?\$,2'((B ?\$,2')(B ?\$,2'*(B ?\$,2'+(B ?\$,2',(B ?\$,2'-(B ?\$,2'.(B ?\$,2'/(B
nil
;; mac-dingbats (241..254) -> emacs-mule mapping
?\$,2'1(B ?\$,2'2(B ?\$,2'3(B ?\$,2'4(B ?\$,2'5(B ?\$,2'6(B ?\$,2'7(B ?\$,2'8(B ?\$,2'9(B ?\$,2':(B ?\$,2';(B ?\$,2'<(B ?\$,2'=(B ?\$,2'>(B
nil]))
translation-table)
(setq translation-table
(make-translation-table-from-vector encoding-vector))
;; (define-translation-table 'mac-dingbats-decoder translation-table)
(define-translation-table 'mac-dingbats-encoder
(char-table-extra-slot translation-table 0)))
(defvar mac-font-encoder-list
'(("mac-roman" mac-roman-encoder
ccl-encode-mac-roman-font "%s")
@ -2012,37 +2234,11 @@ ascii:-*-Monaco-*-*-*-*-12-*-*-*-*-*-mac-roman")
;; Enable CLIPBOARD copy/paste through menu bar commands.
(menu-bar-enable-clipboard)
(defconst mac-system-coding-system
(let ((base (or (cdr (assq mac-system-script-code
mac-script-code-coding-systems))
'mac-roman)))
(if (eq system-type 'darwin)
base
(coding-system-change-eol-conversion base 'mac)))
"Coding system derived from the system script code.")
;; Initiate drag and drop
(set-selection-coding-system mac-system-coding-system)
(global-set-key [drag-n-drop] 'mac-dnd-handle-drag-n-drop-event)
(global-set-key [M-drag-n-drop] 'mac-dnd-handle-drag-n-drop-event)
(defun mac-drag-n-drop (event)
"Edit the files listed in the drag-n-drop EVENT.
Switch to a buffer editing the last file dropped."
(interactive "e")
;; Make sure the drop target has positive co-ords
;; before setting the selected frame - otherwise it
;; won't work. <skx@tardis.ed.ac.uk>
(let* ((window (posn-window (event-start event)))
(coords (posn-x-y (event-start event)))
(x (car coords))
(y (cdr coords)))
(if (and (> x 0) (> y 0))
(set-frame-selected-window nil window))
(dolist (file-name (nth 2 event))
(dnd-handle-one-url window 'private
(concat "file:" file-name))))
(select-frame-set-input-focus (selected-frame)))
(global-set-key [drag-n-drop] 'mac-drag-n-drop)
(global-set-key [M-drag-n-drop] 'mac-drag-n-drop)
;;;; Non-toolkit Scroll bars
@ -2107,6 +2303,7 @@ Switch to a buffer editing the last file dropped."
(scroll-up 1)))
)
;;;; Others

View file

@ -162,6 +162,14 @@
(define-key xterm-function-map "\e[4~" [select])
(define-key xterm-function-map "\e[29~" [print])
;; These keys will be available xterm starting probably from
;; version 214.
(define-key xterm-function-map "\e[27;5;8~" [(control ?\t)])
(define-key xterm-function-map "\e[27;5;44~" [(control ?\,)])
(define-key xterm-function-map "\e[27;5;46~" [(control ?\.)])
(define-key xterm-function-map "\e[27;5;47~" [(control ?\/)])
(define-key xterm-function-map "\e[27;5;92~" [(control ?\\)])
;; Other versions of xterm might emit these.
(define-key xterm-function-map "\e[A" [up])
(define-key xterm-function-map "\e[B" [down])

View file

@ -2607,15 +2607,18 @@ By just answering RET you can find out what the current dictionary is."
(mapcar 'list (ispell-valid-dictionary-list)))
nil t)
current-prefix-arg))
(unless arg (ispell-buffer-local-dict))
(unless arg (ispell-buffer-local-dict 'no-reload))
(if (equal dict "default") (setq dict nil))
;; This relies on completing-read's bug of returning "" for no match
(cond ((equal dict "")
(ispell-internal-change-dictionary)
(message "Using %s dictionary"
(or ispell-local-dictionary ispell-dictionary "default")))
((equal dict (or ispell-local-dictionary
ispell-dictionary "default"))
;; Specified dictionary is the default already. No-op
;; Specified dictionary is the default already. Could reload
;; the dictionaries if needed.
(ispell-internal-change-dictionary)
(and (interactive-p)
(message "No change, using %s dictionary" dict)))
(t ; reset dictionary!
@ -2634,13 +2637,16 @@ By just answering RET you can find out what the current dictionary is."
dict))))
(defun ispell-internal-change-dictionary ()
"Update the dictionary actually used by Ispell.
"Update the dictionary and the personal dictionary used by Ispell.
This may kill the Ispell process; if so,
a new one will be started when needed."
(let ((dict (or ispell-local-dictionary ispell-dictionary)))
(unless (equal ispell-current-dictionary dict)
(let ((dict (or ispell-local-dictionary ispell-dictionary))
(pdict (or ispell-local-pdict ispell-personal-dictionary)))
(unless (and (equal ispell-current-dictionary dict)
(equal ispell-current-personal-dictionary pdict))
(ispell-kill-ispell t)
(setq ispell-current-dictionary dict))))
(setq ispell-current-dictionary dict
ispell-current-personal-dictionary pdict))))
;;; Spelling of comments are checked when ispell-check-comments is non-nil.
@ -3667,8 +3673,9 @@ Includes Latex/Nroff modes and extended character mode."
;;; Can kill the current ispell process
(defun ispell-buffer-local-dict ()
(defun ispell-buffer-local-dict (&optional no-reload)
"Initializes local dictionary and local personal dictionary.
If optional NO-RELOAD is non-nil, do not make any dictionary reloading.
When a dictionary is defined in the buffer (see variable
`ispell-dictionary-keyword'), it will override the local setting
from \\[ispell-change-dictionary].
@ -3695,12 +3702,9 @@ Both should not be used to define a buffer-local dictionary."
(if (re-search-forward " *\\([^ \"]+\\)" end t)
(setq ispell-local-pdict
(match-string-no-properties 1)))))))
;; Reload if new personal dictionary defined.
(if (not (equal ispell-current-personal-dictionary
(or ispell-local-pdict ispell-personal-dictionary)))
(ispell-kill-ispell t))
;; Reload if new dictionary defined.
(ispell-internal-change-dictionary))
(unless no-reload
;; Reload if new dictionary (maybe the personal one) defined.
(ispell-internal-change-dictionary)))
(defun ispell-buffer-local-words ()

View file

@ -1,3 +1,8 @@
2006-05-05 Andreas Seltenreich <seltenreich@gmx.de> (tiny change)
* url-http.el (url-http-parse-headers): Don't reuse connection if
"Connection: close" header was seen.
2006-04-26 Stefan Monnier <monnier@iro.umontreal.ca>
* url-gw.el (url-open-stream): Don't hide errors.

View file

@ -386,6 +386,10 @@ should be shown to the user."
(url-http-parse-response)
(mail-narrow-to-head)
;;(narrow-to-region (point-min) url-http-end-of-headers)
(let ((connection (mail-fetch-field "Connection")))
(if (and connection
(string= (downcase connection) "close"))
(delete-process url-http-process)))
(let ((class nil)
(success nil))
(setq class (/ url-http-response-status 100))

View file

@ -1,3 +1,43 @@
2006-05-09 Richard Stallman <rms@gnu.org>
* variables.texi (File Local Variables): Document
safe-local-eval-forms and safe-local-eval-function.
2006-05-07 Kim F. Storm <storm@cua.dk>
* minibuf.texi (Minibuffer History): Remove keep-dups arg
from add-to-history.
2006-05-07 Romain Francoise <romain@orebokech.com>
* commands.texi (Event Input Misc):
* compile.texi (Eval During Compile):
* internals.texi (Buffer Internals):
* minibuf.texi (Initial Input):
* nonascii.texi (Scanning Charsets):
* numbers.texi (Comparison of Numbers):
* windows.texi (Textual Scrolling, Vertical Scrolling):
Fix various typos.
2006-05-06 Eli Zaretskii <eliz@gnu.org>
* hooks.texi (Standard Hooks): Replace inforef to emacs-xtra by
conditional xref's to either emacs or emacs-xtra, depending on
@iftex/@ifnottex.
* minibuf.texi (Minibuffer History): Document add-to-history.
2006-05-05 Eli Zaretskii <eliz@gnu.org>
* internals.texi (Pure Storage): Mention the pure overflow message
at startup.
2006-05-05 Johan Bockg,Ae(Brd <bojohan@dd.chalmers.se>
* keymaps.texi (Active Keymaps): Fix pseudo-Lisp syntax.
(Searching Keymaps): Fix pseudo-Lisp description of keymap
search.
2006-05-01 Richard Stallman <rms@gnu.org>
* intro.texi (nil and t): Clarify.

View file

@ -2451,7 +2451,7 @@ If a part of @var{body} binds @code{inhibit-quit} to non-@code{nil},
arrival of input during those parts won't cause an abort until
the end of that part.
If you want to be able to distingish all possible values computed
If you want to be able to distinguish all possible values computed
by @var{body} from both kinds of abort conditions, write the code
like this:

View file

@ -412,7 +412,7 @@ automatically @code{eval-and-compile}, the package is loaded both when
compiling and executing.
@code{autoload} is also effectively @code{eval-and-compile} too. It's
recognised when compiling, so uses of such a function don't produce
recognized when compiling, so uses of such a function don't produce
``not known to be defined'' warnings.
Most uses of @code{eval-and-compile} are fairly sophisticated.
@ -456,7 +456,7 @@ used to load it for compiling, but not executing. For example,
The same sort of thing goes for macros or @code{defalias}es defined
locally and only for use within the file. They can be defined while
compiling, but then not needed when executing. This is good for code
that's only a fallback for compability with other versions of Emacs.
that's only a fallback for compatibility with other versions of Emacs.
For example.
@lisp

View file

@ -1602,7 +1602,7 @@ directory name (@pxref{Directory Names}), or @code{nil} if
@var{filename} does not include a directory part.
On GNU and Unix systems, a string returned by this function always
ends in a slash. On MSDOS it can also end in a colon. On VMS, it
ends in a slash. On MS-DOS it can also end in a colon. On VMS, it
returns a string ending in one of the three characters @samp{:},
@samp{]}, or @samp{>}.
@ -1809,7 +1809,7 @@ the directory name but not identical to it. (This is not quite the
same as the usual Unix terminology.) These two different names for
the same entity are related by a syntactic transformation. On GNU and
Unix systems, this is simple: a directory name ends in a slash,
whereas the directory's name as a file lacks that slash. On MSDOS and
whereas the directory's name as a file lacks that slash. On MS-DOS and
VMS, the relationship is more complicated.
The difference between a directory name and its name as a file is

View file

@ -87,7 +87,13 @@ or their values are used). The variables whose names end in
@xref{Lazy Properties}.
@item calendar-load-hook
@inforef{Calendar Customizing,, emacs-xtra}.
@iftex
@xref{Calendar Customizing,,, emacs-xtra}.
@end iftex
@ifnottex
@xref{Calendar Customizing,,, emacs}.
@end ifnottex
@item change-major-mode-hook
@xref{Creating Buffer-Local}.
@ -124,7 +130,12 @@ is useful for truncating history lists, for example. @xref{Saving
Emacs Sessions,, Saving Emacs Sessions, emacs, the GNU Emacs Manual}.
@item diary-display-hook
@inforef{Fancy Diary Display,, emacs-xtra}.
@iftex
@xref{Fancy Diary Display,,, emacs-xtra}.
@end iftex
@ifnottex
@xref{Fancy Diary Display,,, emacs}.
@end ifnottex
@item diary-hook
List of functions called after the display of the diary. Can be used
@ -170,7 +181,12 @@ for appointment notification.
@xref{Other Font Lock Variables}.
@item initial-calendar-window-hook
@inforef{Calendar Customizing,, emacs-xtra}.
@iftex
@xref{Calendar Customizing,,, emacs-xtra}.
@end iftex
@ifnottex
@xref{Calendar Customizing,,, emacs}.
@end ifnottex
@item kbd-macro-termination-hook
@xref{Keyboard Macros}.
@ -190,14 +206,24 @@ for appointment notification.
@item lisp-indent-function
@item list-diary-entries-hook
@inforef{Fancy Diary Display,, emacs-xtra}.
@iftex
@xref{Fancy Diary Display,,, emacs-xtra}.
@end iftex
@ifnottex
@xref{Fancy Diary Display,,, emacs}.
@end ifnottex
@item mail-setup-hook
@xref{Mail Mode Misc,, Mail Mode Miscellany, emacs, the GNU Emacs
Manual}.
@item mark-diary-entries-hook
@inforef{Fancy Diary Display,, emacs-xtra}.
@iftex
@xref{Fancy Diary Display,,, emacs-xtra}.
@end iftex
@ifnottex
@xref{Fancy Diary Display,,, emacs}.
@end ifnottex
@item menu-bar-update-hook
@xref{Menu Bar}.
@ -212,10 +238,20 @@ Manual}.
@xref{Mouse Position}.
@item nongregorian-diary-listing-hook
@inforef{Hebrew/Islamic Entries,, emacs-xtra}.
@iftex
@xref{Hebrew/Islamic Entries,,, emacs-xtra}.
@end iftex
@ifnottex
@xref{Hebrew/Islamic Entries,,, emacs}.
@end ifnottex
@item nongregorian-diary-marking-hook
@inforef{Hebrew/Islamic Entries,, emacs-xtra}.
@iftex
@xref{Hebrew/Islamic Entries,,, emacs-xtra}.
@end iftex
@ifnottex
@xref{Hebrew/Islamic Entries,,, emacs}.
@end ifnottex
@item occur-hook
@ -229,7 +265,12 @@ Manual}.
@xref{Command Overview}.
@item print-diary-entries-hook
@inforef{Diary Customizing,, emacs-xtra}.
@iftex
@xref{Diary Customizing,,, emacs-xtra}.
@end iftex
@ifnottex
@xref{Diary Customizing,,, emacs}.
@end ifnottex
@item redisplay-end-trigger-functions
@xref{Window Hooks}.
@ -255,10 +296,20 @@ Manual}.
@xref{Terminal-Specific}.
@item today-visible-calendar-hook
@inforef{Calendar Customizing,, emacs-xtra}.
@iftex
@xref{Calendar Customizing,,, emacs-xtra}.
@end iftex
@ifnottex
@xref{Calendar Customizing,,, emacs}.
@end ifnottex
@item today-invisible-calendar-hook
@inforef{Calendar Customizing,, emacs-xtra}.
@iftex
@xref{Calendar Customizing,,, emacs-xtra}.
@end iftex
@ifnottex
@xref{Calendar Customizing,,, emacs}.
@end ifnottex
@item window-configuration-change-hook
@xref{Window Hooks}.

View file

@ -155,11 +155,15 @@ standard preloaded Lisp libraries. In the file @file{emacs}, it is
marked as read-only (on operating systems that permit this), so that
the memory space can be shared by all the Emacs jobs running on the
machine at once. Pure storage is not expandable; a fixed amount is
allocated when Emacs is compiled, and if that is not sufficient for the
preloaded libraries, @file{temacs} crashes. If that happens, you must
increase the compilation parameter @code{PURESIZE} in the file
@file{src/puresize.h}. This normally won't happen unless you try to
preload additional libraries or add features to the standard ones.
allocated when Emacs is compiled, and if that is not sufficient for
the preloaded libraries, @file{temacs} allocates dynamic memory for
the part that didn't fit. If that happens, you should increase the
compilation parameter @code{PURESIZE} in the file
@file{src/puresize.h} and rebuild Emacs, even though the resulting
image will work. Such an overflow normally won't happen unless you
try to preload additional libraries or add features to the standard
ones. Emacs will display a warning about the overflow when it
starts.
@defun purecopy object
This function makes a copy in pure storage of @var{object}, and returns
@ -1015,7 +1019,7 @@ Mode line element that controls the format of the mode line. If this
is @code{nil}, no mode line will be displayed.
@item header_line_format
This field is analoguous to @code{mode_line_format} for the mode
This field is analogous to @code{mode_line_format} for the mode
line displayed at the top of windows.
@item keymap

View file

@ -561,7 +561,7 @@ pseudo-Lisp description of how this process works:
(@var{find-in-any} emulation-mode-map-alists)
(@var{find-in-any} minor-mode-overriding-map-alist)
(@var{find-in-any} minor-mode-map-alist)
(if (get-text-property (point) 'local-map))
(if (get-text-property (point) 'local-map)
(@var{find-in} (get-text-property (point) 'local-map))
(@var{find-in} (current-local-map))))))
(@var{find-in} (current-global-map)))
@ -670,14 +670,15 @@ description of the order in which the active keymaps are searched:
(@var{find-in-any} emulation-mode-map-alists)
(@var{find-in-any} minor-mode-overriding-map-alist)
(@var{find-in-any} minor-mode-map-alist)
(@var{find-in} (get-text-property (point) 'local-map))
(@var{find-in} (current-local-map)))))
(if (get-text-property (point) 'local-map)
(@var{find-in} (get-text-property (point) 'local-map))
(@var{find-in} (current-local-map))))))
(@var{find-in} (current-global-map)))
@end lisp
@noindent
The @var{find-in} and @var{find-in-any} are pseudo functions that
searches in one keymap respectively an alist of keymaps.
search in one keymap and in an alist of keymaps, respectively.
@enumerate
@item

View file

@ -449,11 +449,26 @@ list, put the length in the @code{history-length} property of the
history list symbol. The variable @code{history-delete-duplicates}
specifies whether to delete duplicates in history.
@defun add-to-history history-var newelt &optional maxelt
This function adds a new element @var{newelt} to the history list
stored in the variable @var{history-var}, and returns the updated
history list. By default, the list length is limited by the value
specified by @code{history-length} (described below), but the optional
argument @var{maxelt} overrides that. The possible values of
@var{maxelt} have the same meaning as the values of
@code{history-length}.
Duplicate members are removed from the history list, unless
@code{history-delete-duplicates} is @code{nil}.
@end defun
@defvar history-length
The value of this variable specifies the maximum length for all
history lists that don't specify their own maximum lengths. If the
value is @code{t}, that means there no maximum (don't delete old
elements).
elements). The value of @code{history-length} property of the history
list variable's symbol, if set, overrides this variable for that
particular history list.
@end defvar
@defvar history-delete-duplicates
@ -501,7 +516,7 @@ A history list for arguments that are Lisp expressions to evaluate.
Several of the functions for minibuffer input have an argument called
@var{initial} or @var{initial-contents}. This is a mostly-deprecated
feature for specifiying that the minibuffer should start out with
feature for specifying that the minibuffer should start out with
certain text, instead of empty as usual.
If @var{initial} is a string, the minibuffer starts out containing the

View file

@ -484,7 +484,7 @@ of the text in question.
@defun charset-after &optional pos
This function return the charset of a character in the current buffer
at position @var{pos}. If @var{pos} is omitted or @code{nil}, it
defauls to the current value of point. If @var{pos} is out of range,
defaults to the current value of point. If @var{pos} is out of range,
the value is @code{nil}.
@end defun

View file

@ -322,7 +322,7 @@ returns @code{t} if so, @code{nil} otherwise.
@defun eql value1 value2
This function acts like @code{eq} except when both arguments are
numbers. It compares numbers by type and numberic value, so that
numbers. It compares numbers by type and numeric value, so that
@code{(eql 1.0 1)} returns @code{nil}, but @code{(eql 1.0 1.0)} and
@code{(eql 1 1)} both return @code{t}.
@end defun

View file

@ -1844,6 +1844,19 @@ unconditionally; @code{nil} means ignore them; anything else means ask
the user what to do for each file. The default value is @code{maybe}.
@end defopt
@defopt safe-local-eval-forms
This variable holds a list of expressions that are safe to
evaluate when found in the @samp{Eval:} ``variable'' in a file
local variables list.
@end defopt
If the expression is a function call and the function has a
@code{safe-local-eval-function} property, the property value
determines whether the expression is safe to evaluate. The property
value can be a predicate to call to test the expression, a list of
such predicates (it's safe if any predicate succeeds), or @code{t}
(always safe provided the arguments are constant).
Text properties are also potential loopholes, since their values
could include functions to call. So Emacs discards all text
properties from string values specified for file local variables.

View file

@ -1419,7 +1419,7 @@ buffer is different from the buffer that is displayed in the selected
window. @xref{Current Buffer}.
If the window contains a row which is taller than the height of the
window (for example in the presense of a large image), the scroll
window (for example in the presence of a large image), the scroll
functions will adjust the window vscroll to scroll the partially
visible row. To disable this feature, Lisp code may bind the variable
`auto-window-vscroll' to @code{nil} (@pxref{Vertical Scrolling}).
@ -1656,7 +1656,7 @@ pixels. In this case, the return value is @var{lines}.
If this variable is non-@code{nil}, the line-move, scroll-up, and
scroll-down functions will automatically modify the window vscroll to
scroll through display rows that are taller that the height of the
window, for example in the presense of large images.
window, for example in the presence of large images.
@end defvar
@node Horizontal Scrolling

View file

@ -1,3 +1,205 @@
2006-05-09 Michael Albinus <michael.albinus@gmx.de>
* tramp.texi (Filename completion): Improve wording.
2006-05-07 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
* xresmini.texi (GTK resources): Inserted GTK description.
* xresources.texi (GTK resources): metafont should be menufont.
2006-05-07 Romain Francoise <romain@orebokech.com>
* faq.texi (Using regular expressions): Fix typo.
(Packages that do not come with Emacs): Fix capitalization.
(Replacing text across multiple files): Expand node to explain how
to use `dired-do-query-replace-regexp' in more detail, based on
suggestion by Eric Hanchrow <offby1@blarg.net>.
2006-05-06 Michael Albinus <michael.albinus@gmx.de>
* mini.texi (Completion Options):
* tramp.texi (Filename completion): Completion of remote files'
method, user name and host name is active only in partial
completion mode.
2006-05-06 Bill Wohler <wohler@newt.com>
Release MH-E manual version 8.0.
* mh-e.texi (VERSION, EDITION, UPDATED, UPDATE-MONTH): Update for
release 8.0.
2006-05-06 Bill Wohler <wohler@newt.com>
* mh-e.texi (MH-BOOK-HOME): Change from
http://www.ics.uci.edu/~mh/book/mh to
http://rand-mh.sourceforge.net/book/mh.
Replace .htm suffix with .html for MH book files.
(Using This Manual): Update key binding for getting relevant
chapter in Info from command key.
(Ranges): Fix itemx.
2006-05-06 Eli Zaretskii <eliz@gnu.org>
* makefile.w32-in (emacs.dvi):
* Makefile.in (emacs.dvi): Add xresmini.texi
* xresmini.texi (Table of Resources): Remove xref to non-existent
node "LessTif Resources".
* msdog.texi (Microsoft Windows):
* calendar.texi (Calendar/Diary, Displaying the Diary)
(Special Diary Entries, Importing Diary, Holidays):
* programs.texi (Program Modes):
* text.texi (Text):
* buffers.texi (Several Buffers):
* files.texi (Comparing Files): Fix cross-references to emacs-xtra.
2006-05-06 Eli Zaretskii <eliz@gnu.org>
The following changes merge the emacs-xtra manual into the main
manual, but only for on-line version of the manual.
* vc2-xtra.texi (Version Backups, Local Version Control)
(Making Snapshots, Change Logs and VC, Version Headers)
(Customizing VC, CVS Options) [ifnottex]: Conditional xref's for
on-line manual.
* vc1-xtra.texi (VC Dired Mode) [ifnottex]: Conditional xref's
for on-line manual.
* msdog-xtra.texi (MS-DOS, MS-DOS Keyboard, MS-DOS Mouse)
(MS-DOS Display, MS-DOS File Names, MS-DOS Printing)
(MS-DOS and MULE, MS-DOS Processes) [ifnottex]: Conditional xref's
for on-line manual.
* fortran-xtra.texi (Fortran, Fortran Autofill)
(Fortran Autofill, Fortran Abbrev) [ifnottex]: Conditional xref's
for on-line manual.
* picture-xtra.texi (Basic Picture, Rectangles in Picture) [ifnottex]:
Conditional xref's for on-line manual.
* emerge-xtra.texi (Emerge, Overview of Emerge)
(Fine Points of Emerge) [ifnottex]: Conditional xref's for on-line
manual.
* Makefile.in (INFO_TARGETS): Remove ../info/emacs-xtra.
(EMACS_XTRA): New variable, lists the new *-xtra.texi files.
(EMACSSOURCES): Use EMACS_XTRA.
(../info/emacs-xtra): Remove.
(emacs-xtra.dvi): Add EMACS_XTRA to prerequisites.
* makefile.w32-in (INFO_TARGETS): Remove $(infodir)/emacs-xtra.
(EMACS_XTRA): New variable, lists the new *-xtra.texi files.
(EMACSSOURCES): Use EMACS_XTRA.
($(infodir)/emacs-xtra): Remove.
(emacs-xtra.dvi): Add EMACS_XTRA to prerequisites.
* trouble.texi (Quitting):
* text.texi (Text):
* programs.texi (Program Modes):
* msdog.texi (Microsoft Windows):
* frames.texi (Frames):
* files.texi (Backup, Version Control, VC Concepts)
(Types of Log File, Advanced C-x v v, Log Buffer, Old Versions)
(Registering, VC Status, VC Undo, Multi-User Branching)
(Comparing Files):
* calendar.texi (Calendar/Diary, Holidays, Displaying the Diary)
(Displaying the Diary, Special Diary Entries, Importing Diary):
* buffers.texi (Several Buffers): Replace inforef to emacs-xtra by
conditional xref's, depending on @iftex/@ifnottex.
* msdog.texi (Microsoft Windows) [ifnottex]: Add menu entry for
"MS-DOS". @include msdog-xtra.texi.
* programs.texi (Programs) [ifnottex]: Add menu entry for "Fortran".
<Top Level> [ifnottex]: @include fortran-xtra.texi.
* files.texi (Secondary VC Commands) [ifnottex]: Add menu entries
for vc-xtra.texi subsections.
(VC Undo) [ifnottex]: @include vc1-xtra.texi and @lowersections it.
(Multi-User Branching) [ifnottex]: @include vc2-xtra.texi.
* sending.texi (Sending Mail): A @node line without explicit Prev,
Next, and Up links.
* abbrevs.texi (Abbrevs): A @node line without explicit Prev,
Next, and Up links.
* emacs.texi (Top) [ifnottex]: Add menu entries for "Picture Mode"
and its sections. @include picture-xtra.texi
* maintaining.texi (Maintaining) [ifnottex]: Add menu entry for
"Emerge".
(List Tags) [ifnottex]: @include emerge-xtra.texi.
* cal-xtra.texi (Daylight Savings): Remove this node: it is an
exact duplicate of its name-sake in calendar.texi.
* calendar.texi (Calendar/Diary) [ifnottex]: Add menu item for
"Advanced Calendar/Diary Usage".
(Time Intervals) [ifnottex]: @include cal-xtra.texi.
* dired.texi (Subdirectories in Dired) [ifnottex]: @include
dired-xtra.texi.
(Dired) [ifnottex]: Add menu entry for "Subdir Switches".
* files.texi (Reverting) [ifnottex]: @include arevert-xtra.texi.
(Files) [ifnottex]: Add menu entry for Autorevert.
* emacs-xtra.texi (Introduction): Reword to make consistent with
printed version only.
<Top level>: Remove the body of all chapters and move them to the
new *-xtra.texi files. Use @raisesections and @lowersections to
convert sections to chapters etc.
* msdog-xtra.texi:
* fortran-xtra.texi:
* vc-xtra.texi:
* vc1-xtra.texi:
* vc2-xtra.texi:
* emerge-xtra.texi:
* cal-xtra.texi:
* dired-xtra.texi:
* arevert-xtra.texi: New files, with text from respective chapters
of emacs-xtra.texi. Convert each @chapter into @section, @section
into @subsection, etc.
* emacs-xtra.texi (MS-DOS): Renamed from "MS-DOG". All references
updated.
* msdog.texi (Microsoft Windows): Rename from "Emacs and Microsoft
Windows". All references updated.
2006-05-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* macos.texi (Mac Input): Mention input from Character Palette.
(Mac Font Specs): Fix typo.
2006-05-05 Richard Stallman <rms@gnu.org>
* files.texi (Diff Mode): Minor cleanup.
2006-05-05 Karl Berry <karl@gnu.org>
* texinfo.tex (\definetextfonsizexi, \definetextfonsizex): new cmds.
(\fonttextsize): new user-level command to change text font size.
* emacs.texi: call @fonttextsize 10, inside @tex to avoid
errors from the current release of makeinfo (4.8).
* help.texi (Library Keywords): change widest word in multitable
template from `emulations' to `convenience'. (Not sure if this is
related to the font change.)
2006-05-05 Eli Zaretskii <eliz@gnu.org>
* files.texi (File Names): Add a footnote about limited support of
~USER on MS-Windows.
* cmdargs.texi (Initial Options): Add a footnote about limited
support of ~USER on MS-Windows.
2006-05-03 Richard Stallman <rms@gnu.org>
* files.texi (Diff Mode): Node moved here.
@ -23,7 +225,7 @@
* killing.texi (Killing): Say "graphical displays".
* display.texi: Say "graphical displays".
* cmdargs.texi (Misc X): Say "graphical displays".
2006-05-01 Richard Stallman <rms@gnu.org>
@ -61,7 +263,7 @@
* pgg.texi (Caching passphrase): Fix markup and typos. Simplify.
2006-04-26 Sascha Wilde <wilde@sha-bang.de>
2006-04-26 Sascha Wilde <wilde@sha-bang.de> (tiny change)
* pgg.texi (Caching passphrase): Add pgg-gpg-use-agent.

View file

@ -33,7 +33,7 @@ VPATH=@srcdir@
# The makeinfo program is part of the Texinfo distribution.
# Use --force so that it generates output even if there are errors.
MAKEINFO = makeinfo --force
INFO_TARGETS = ../info/emacs ../info/emacs-xtra ../info/ccmode ../info/cl \
INFO_TARGETS = ../info/emacs ../info/ccmode ../info/cl \
../info/dired-x ../info/ediff ../info/forms ../info/gnus \
../info/message ../info/sieve ../info/pgg ../info/emacs-mime \
../info/info ../info/mh-e ../info/reftex \
@ -61,6 +61,18 @@ INFOSOURCES = info.texi
TEXI2DVI = texi2dvi
ENVADD = TEXINPUTS="$(srcdir):$(TEXINPUTS)" MAKEINFO="$(MAKEINFO) -I$(srcdir)"
EMACS_XTRA=\
$(srcdir)/arevert-xtra.texi \
$(srcdir)/cal-xtra.texi \
$(srcdir)/dired-xtra.texi \
$(srcdir)/picture-xtra.texi \
$(srcdir)/emerge-xtra.texi \
$(srcdir)/vc-xtra.texi \
$(srcdir)/vc1-xtra.texi \
$(srcdir)/vc2-xtra.texi \
$(srcdir)/fortran-xtra.texi \
$(srcdir)/msdog-xtra.texi
EMACSSOURCES= \
${srcdir}/emacs.texi \
${srcdir}/doclicense.texi \
@ -104,7 +116,8 @@ EMACSSOURCES= \
${srcdir}/gnu.texi \
${srcdir}/glossary.texi \
${srcdir}/ack.texi \
${srcdir}/kmacro.texi
${srcdir}/kmacro.texi \
$(EMACS_XTRA)
info: $(top_srcdir)/info $(INFO_TARGETS)
@ -131,7 +144,7 @@ info.dvi: ${INFOSOURCES}
../info/emacs: ${EMACSSOURCES}
cd $(srcdir); $(MAKEINFO) emacs.texi
emacs.dvi: ${EMACSSOURCES}
emacs.dvi: ${EMACSSOURCES} $(srcdir)/xresmini.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/emacs.texi
# This target is here so you could easily get the list of the *.texi
@ -176,9 +189,7 @@ dired-x.dvi: dired-x.texi
ediff.dvi: ediff.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/ediff.texi
../info/emacs-xtra: emacs-xtra.texi
cd $(srcdir); $(MAKEINFO) emacs-xtra.texi
emacs-xtra.dvi: emacs-xtra.texi
emacs-xtra.dvi: emacs-xtra.texi $(EMACS_XTRA)
$(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-xtra.texi
../info/forms: forms.texi

View file

@ -2,7 +2,7 @@
@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2002, 2003,
@c 2004, 2005, 2006 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Abbrevs, Sending Mail, Maintaining, Top
@node Abbrevs
@chapter Abbrevs
@cindex abbrevs
@cindex expansion (of abbrevs)
@ -63,7 +63,7 @@ all major modes. The same abbrev can have a global definition and various
mode-specific definitions for different major modes. A mode-specific
definition for the current major mode overrides a global definition.
Yu can define abbrevs interactively during the editing session. You
You can define abbrevs interactively during the editing session. You
can also save lists of abbrev definitions in files for use in later
sessions. Some users keep extensive lists of abbrevs that they load
in every session.

191
man/arevert-xtra.texi Normal file
View file

@ -0,0 +1,191 @@
@c This is part of the Emacs manual.
@c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@c
@c This file is included either in emacs-xtra.texi (when producing the
@c printed version) or in the main Emacs manual (for the on-line version).
@node Autorevert
@section Auto Reverting non-file Buffers
Normally Global Auto Revert Mode only reverts file buffers. There are
two ways to auto-revert certain non-file buffers: enabling Auto Revert
Mode in those buffers (using @kbd{M-x auto-revert-mode}) and setting
@code{global-auto-revert-non-file-buffers} to @code{t}. The latter
enables Auto Reverting for all types of buffers for which it is
implemented, that is, for the types of buffers listed in the menu
below.
Like file buffers, non-file buffers should normally not revert while
you are working on them, or while they contain information that might
get lost after reverting. Therefore, they do not revert if they are
``modified''. This can get tricky, because deciding when a non-file
buffer should be marked modified is usually more difficult than for
file buffers.
Another tricky detail is that, for efficiency reasons, Auto Revert
often does not try to detect all possible changes in the buffer, only
changes that are ``major'' or easy to detect. Hence, enabling
auto-reverting for a non-file buffer does not always guarantee that
all information in the buffer is up to date and does not necessarily
make manual reverts useless.
At the other extreme, certain buffers automatically auto-revert every
@code{auto-revert-interval} seconds. (This currently only applies to
the Buffer Menu.) In this case, Auto Revert does not print any
messages while reverting, even when @code{auto-revert-verbose} is
non-@code{nil}.
The details depend on the particular types of buffers and are
explained in the corresponding sections.
@menu
* Auto Reverting the Buffer Menu::
* Auto Reverting Dired::
* Supporting additional buffers::
@end menu
@node Auto Reverting the Buffer Menu
@subsection Auto Reverting the Buffer Menu
If auto-reverting of non-file buffers is enabled, the Buffer Menu
automatically reverts every @code{auto-revert-interval} seconds,
whether there is a need for it or not. (It would probably take longer
to check whether there is a need than to actually revert.)
If the Buffer Menu inappropriately gets marked modified, just revert
it manually using @kbd{g} and auto-reverting will resume. However, if
you marked certain buffers to get deleted or to be displayed, you have
to be careful, because reverting erases all marks. The fact that
adding marks sets the buffer's modified flag prevents Auto Revert from
automatically erasing the marks.
@node Auto Reverting Dired
@subsection Auto Reverting Dired buffers
Auto-reverting Dired buffers currently works on GNU or Unix style
operating systems. It may not work satisfactorily on some other
systems.
Dired buffers only auto-revert when the file list of the buffer's main
directory changes. They do not auto-revert when information about a
particular file changes or when inserted subdirectories change. To be
sure that @emph{all} listed information is up to date, you have to
manually revert using @kbd{g}, @emph{even} if auto-reverting is
enabled in the Dired buffer. Sometimes, you might get the impression
that modifying or saving files listed in the main directory actually
does cause auto-reverting. This is because making changes to a file,
or saving it, very often causes changes in the directory itself, for
instance, through backup files or auto-save files. However, this is
not guaranteed.
If the Dired buffer is marked modified and there are no changes you
want to protect, then most of the time you can make auto-reverting
resume by manually reverting the buffer using @kbd{g}. There is one
exception. If you flag or mark files, you can safely revert the
buffer. This will not erase the flags or marks (unless the marked
file has been deleted, of course). However, the buffer will stay
modified, even after reverting, and auto-reverting will not resume.
This is because, if you flag or mark files, you may be working on the
buffer and you might not want the buffer to change without warning.
If you want auto-reverting to resume in the presence of marks and
flags, mark the buffer non-modified using @kbd{M-~}. However, adding,
deleting or changing marks or flags will mark it modified again.
Remote Dired buffers are not auto-reverted. Neither are Dired buffers
for which you used shell wildcards or file arguments to list only some
of the files. @samp{*Find*} and @samp{*Locate*} buffers do not
auto-revert either.
@node Supporting additional buffers
@subsection Adding Support for Auto-Reverting additional Buffers.
This section is intended for Elisp programmers who would like to add
support for auto-reverting new types of buffers.
To support auto-reverting the buffer must first of all have a
@code{revert-buffer-function}. @xref{Definition of
revert-buffer-function,, Reverting, elisp, the Emacs Lisp Reference Manual}.
In addition, it @emph{must} have a @code{buffer-stale-function}.
@defvar buffer-stale-function
The value of this variable is a function to check whether a non-file
buffer needs reverting. This should be a function with one optional
argument @var{noconfirm}. The function should return non-@code{nil}
if the buffer should be reverted. The buffer is current when this
function is called.
While this function is mainly intended for use in auto-reverting, it
could be used for other purposes as well. For instance, if
auto-reverting is not enabled, it could be used to warn the user that
the buffer needs reverting. The idea behind the @var{noconfirm}
argument is that it should be @code{t} if the buffer is going to be
reverted without asking the user and @code{nil} if the function is
just going to be used to warn the user that the buffer is out of date.
In particular, for use in auto-reverting, @var{noconfirm} is @code{t}.
If the function is only going to be used for auto-reverting, you can
ignore the @var{noconfirm} argument.
If you just want to automatically auto-revert every
@code{auto-revert-interval} seconds, use:
@example
(set (make-local-variable 'buffer-stale-function)
#'(lambda (&optional noconfirm) 'fast))
@end example
@noindent
in the buffer's mode function.
The special return value @samp{fast} tells the caller that the need
for reverting was not checked, but that reverting the buffer is fast.
It also tells Auto Revert not to print any revert messages, even if
@code{auto-revert-verbose} is non-@code{nil}. This is important, as
getting revert messages every @code{auto-revert-interval} seconds can
be very annoying. The information provided by this return value could
also be useful if the function is consulted for purposes other than
auto-reverting.
@end defvar
Once the buffer has a @code{revert-buffer-function} and a
@code{buffer-stale-function}, several problems usually remain.
The buffer will only auto-revert if it is marked unmodified. Hence,
you will have to make sure that various functions mark the buffer
modified if and only if either the buffer contains information that
might be lost by reverting or there is reason to believe that the user
might be inconvenienced by auto-reverting, because he is actively
working on the buffer. The user can always override this by manually
adjusting the modified status of the buffer. To support this, calling
the @code{revert-buffer-function} on a buffer that is marked
unmodified should always keep the buffer marked unmodified.
It is important to assure that point does not continuously jump around
as a consequence of auto-reverting. Of course, moving point might be
inevitable if the buffer radically changes.
You should make sure that the @code{revert-buffer-function} does not
print messages that unnecessarily duplicate Auto Revert's own messages
if @code{auto-revert-verbose} is @code{t} and effectively override a
@code{nil} value for @code{auto-revert-verbose}. Hence, adapting a
mode for auto-reverting often involves getting rid of such messages.
This is especially important for buffers that automatically
auto-revert every @code{auto-revert-interval} seconds.
Also, you may want to update the documentation string of
@code{global-auto-revert-non-file-buffers}.
@ifinfo
Finally, you should add a node to this chapter's menu. This node
@end ifinfo
@ifnotinfo
Finally, you should add a section to this chapter. This section
@end ifnotinfo
should at the very least make clear whether enabling auto-reverting
for the buffer reliably assures that all information in the buffer is
completely up to date (or will be after @code{auto-revert-interval}
seconds).
@ignore
arch-tag: 2983e613-a272-45f6-9593-3010ad7f865e
@end ignore

View file

@ -480,7 +480,13 @@ 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.
@iftex
@xref{Autorevert,,, emacs-xtra, Specialized Emacs Features}, for details.
@end iftex
@ifnottex
@xref{Autorevert, global-auto-revert-non-file-buffers}, for details.
@end ifnottex
The command @code{buffer-menu-other-window} works the same as
@code{buffer-menu}, except that it displays the buffers list in

View file

@ -381,7 +381,7 @@ the @code{find-grep-dired} command, in @ref{Dired and Find}.
(recursive grep) are more user-friendly versions of @code{grep} and
@code{grep-find}, which prompt separately for the regular expression
to match, the files to search, and the base directory for the search
(rgrep only). Case sensitivitivy of the search is controlled by the
(rgrep only). Case sensitivity of the search is controlled by the
current value of @code{case-fold-search}.
These commands build the shell commands based on the variables

838
man/cal-xtra.texi Normal file
View file

@ -0,0 +1,838 @@
@c This is part of the Emacs manual.
@c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@c
@c This file is included either in emacs-xtra.texi (when producing the
@c printed version) or in the main Emacs manual (for the on-line version).
@c Moved here from the Emacs Lisp Reference Manual, 2005-03-26.
@node Advanced Calendar/Diary Usage
@section Customizing the Calendar and Diary
There are many customizations that you can use to make the calendar and
diary suit your personal tastes.
@menu
* Calendar Customizing:: Defaults you can set.
* Holiday Customizing:: Defining your own holidays.
* Date Display Format:: Changing the format.
* Time Display Format:: Changing the format.
* Diary Customizing:: Defaults you can set.
* Hebrew/Islamic Entries:: How to obtain them.
* Fancy Diary Display:: Enhancing the diary display, sorting entries,
using included diary files.
* Sexp Diary Entries:: Fancy things you can do.
@end menu
@node Calendar Customizing
@subsection Customizing the Calendar
@vindex calendar-holiday-marker
@vindex diary-entry-marker
The variable @code{calendar-holiday-marker} specifies how to mark a
date as being a holiday. Its value may be a single-character string
to insert next to the date, or a face name to use for displaying the
date. Likewise, the variable @code{diary-entry-marker} specifies how
to mark a date that has diary entries. The calendar creates faces
named @code{holiday-face} and @code{diary-face} for these purposes;
those symbols are the default values of these variables.
@vindex calendar-load-hook
The variable @code{calendar-load-hook} is a normal hook run when the
calendar package is first loaded (before actually starting to display
the calendar).
@vindex initial-calendar-window-hook
Starting the calendar runs the normal hook
@code{initial-calendar-window-hook}. Recomputation of the calendar
display does not run this hook. But if you leave the calendar with the
@kbd{q} command and reenter it, the hook runs again.@refill
@vindex today-visible-calendar-hook
The variable @code{today-visible-calendar-hook} is a normal hook run
after the calendar buffer has been prepared with the calendar when the
current date is visible in the window. One use of this hook is to
replace today's date with asterisks; to do that, use the hook function
@code{calendar-star-date}.
@findex calendar-star-date
@example
(add-hook 'today-visible-calendar-hook 'calendar-star-date)
@end example
@noindent
Another standard hook function marks the current date, either by
changing its face or by adding an asterisk. Here's how to use it:
@findex calendar-mark-today
@example
(add-hook 'today-visible-calendar-hook 'calendar-mark-today)
@end example
@noindent
@vindex calendar-today-marker
The variable @code{calendar-today-marker} specifies how to mark
today's date. Its value should be a single-character string to insert
next to the date or a face name to use for displaying the date. A
face named @code{calendar-today-face} is provided for this purpose;
that symbol is the default for this variable.
@vindex today-invisible-calendar-hook
@noindent
A similar normal hook, @code{today-invisible-calendar-hook} is run if
the current date is @emph{not} visible in the window.
@vindex calendar-move-hook
Each of the calendar cursor motion commands runs the hook
@code{calendar-move-hook} after it moves the cursor.
@node Holiday Customizing
@subsection Customizing the Holidays
@vindex calendar-holidays
@vindex christian-holidays
@vindex hebrew-holidays
@vindex islamic-holidays
Emacs knows about holidays defined by entries on one of several lists.
You can customize these lists of holidays to your own needs, adding or
deleting holidays. The lists of holidays that Emacs uses are for
general holidays (@code{general-holidays}), local holidays
(@code{local-holidays}), Christian holidays (@code{christian-holidays}),
Hebrew (Jewish) holidays (@code{hebrew-holidays}), Islamic (Muslim)
holidays (@code{islamic-holidays}), and other holidays
(@code{other-holidays}).
@vindex general-holidays
The general holidays are, by default, holidays common throughout the
United States. To eliminate these holidays, set @code{general-holidays}
to @code{nil}.
@vindex local-holidays
There are no default local holidays (but sites may supply some). You
can set the variable @code{local-holidays} to any list of holidays, as
described below.
@vindex all-christian-calendar-holidays
@vindex all-hebrew-calendar-holidays
@vindex all-islamic-calendar-holidays
By default, Emacs does not include all the holidays of the religions
that it knows, only those commonly found in secular calendars. For a
more extensive collection of religious holidays, you can set any (or
all) of the variables @code{all-christian-calendar-holidays},
@code{all-hebrew-calendar-holidays}, or
@code{all-islamic-calendar-holidays} to @code{t}. If you want to
eliminate the religious holidays, set any or all of the corresponding
variables @code{christian-holidays}, @code{hebrew-holidays}, and
@code{islamic-holidays} to @code{nil}.@refill
@vindex other-holidays
You can set the variable @code{other-holidays} to any list of
holidays. This list, normally empty, is intended for individual use.
@cindex holiday forms
Each of the lists (@code{general-holidays}, @code{local-holidays},
@code{christian-holidays}, @code{hebrew-holidays},
@code{islamic-holidays}, and @code{other-holidays}) is a list of
@dfn{holiday forms}, each holiday form describing a holiday (or
sometimes a list of holidays).
Here is a table of the possible kinds of holiday form. Day numbers
and month numbers count starting from 1, but ``dayname'' numbers
count Sunday as 0. The element @var{string} is always the
name of the holiday, as a string.
@table @code
@item (holiday-fixed @var{month} @var{day} @var{string})
A fixed date on the Gregorian calendar.
@item (holiday-float @var{month} @var{dayname} @var{k} @var{string})
The @var{k}th @var{dayname} in @var{month} on the Gregorian calendar
(@var{dayname}=0 for Sunday, and so on); negative @var{k} means count back
from the end of the month.
@item (holiday-hebrew @var{month} @var{day} @var{string})
A fixed date on the Hebrew calendar.
@item (holiday-islamic @var{month} @var{day} @var{string})
A fixed date on the Islamic calendar.
@item (holiday-julian @var{month} @var{day} @var{string})
A fixed date on the Julian calendar.
@item (holiday-sexp @var{sexp} @var{string})
A date calculated by the Lisp expression @var{sexp}. The expression
should use the variable @code{year} to compute and return the date of a
holiday, or @code{nil} if the holiday doesn't happen this year. The
value of @var{sexp} must represent the date as a list of the form
@code{(@var{month} @var{day} @var{year})}.
@item (if @var{condition} @var{holiday-form})
A holiday that happens only if @var{condition} is true.
@item (@var{function} @r{[}@var{args}@r{]})
A list of dates calculated by the function @var{function}, called with
arguments @var{args}.
@end table
For example, suppose you want to add Bastille Day, celebrated in
France on July 14. You can do this as follows:
@smallexample
(setq other-holidays '((holiday-fixed 7 14 "Bastille Day")))
@end smallexample
@noindent
The holiday form @code{(holiday-fixed 7 14 "Bastille Day")} specifies the
fourteenth day of the seventh month (July).
Many holidays occur on a specific day of the week, at a specific time
of month. Here is a holiday form describing Hurricane Supplication Day,
celebrated in the Virgin Islands on the fourth Monday in August:
@smallexample
(holiday-float 8 1 4 "Hurricane Supplication Day")
@end smallexample
@noindent
Here the 8 specifies August, the 1 specifies Monday (Sunday is 0,
Tuesday is 2, and so on), and the 4 specifies the fourth occurrence in
the month (1 specifies the first occurrence, 2 the second occurrence,
@minus{}1 the last occurrence, @minus{}2 the second-to-last occurrence, and
so on).
You can specify holidays that occur on fixed days of the Hebrew,
Islamic, and Julian calendars too. For example,
@smallexample
(setq other-holidays
'((holiday-hebrew 10 2 "Last day of Hanukkah")
(holiday-islamic 3 12 "Mohammed's Birthday")
(holiday-julian 4 2 "Jefferson's Birthday")))
@end smallexample
@noindent
adds the last day of Hanukkah (since the Hebrew months are numbered with
1 starting from Nisan), the Islamic feast celebrating Mohammed's
birthday (since the Islamic months are numbered from 1 starting with
Muharram), and Thomas Jefferson's birthday, which is 2 April 1743 on the
Julian calendar.
To include a holiday conditionally, use either Emacs Lisp's @code{if} or the
@code{holiday-sexp} form. For example, American presidential elections
occur on the first Tuesday after the first Monday in November of years
divisible by 4:
@smallexample
(holiday-sexp '(if (= 0 (% year 4))
(calendar-gregorian-from-absolute
(1+ (calendar-dayname-on-or-before
1 (+ 6 (calendar-absolute-from-gregorian
(list 11 1 year)))))))
"US Presidential Election")
@end smallexample
@noindent
or
@smallexample
(if (= 0 (% displayed-year 4))
(fixed 11
(extract-calendar-day
(calendar-gregorian-from-absolute
(1+ (calendar-dayname-on-or-before
1 (+ 6 (calendar-absolute-from-gregorian
(list 11 1 displayed-year)))))))
"US Presidential Election"))
@end smallexample
Some holidays just don't fit into any of these forms because special
calculations are involved in their determination. In such cases you
must write a Lisp function to do the calculation. To include eclipses,
for example, add @code{(eclipses)} to @code{other-holidays}
and write an Emacs Lisp function @code{eclipses} that returns a
(possibly empty) list of the relevant Gregorian dates among the range
visible in the calendar window, with descriptive strings, like this:
@smallexample
(((6 27 1991) "Lunar Eclipse") ((7 11 1991) "Solar Eclipse") ... )
@end smallexample
@node Date Display Format
@subsection Date Display Format
@vindex calendar-date-display-form
You can customize the manner of displaying dates in the diary, in mode
lines, and in messages by setting @code{calendar-date-display-form}.
This variable holds a list of expressions that can involve the variables
@code{month}, @code{day}, and @code{year}, which are all numbers in
string form, and @code{monthname} and @code{dayname}, which are both
alphabetic strings. In the American style, the default value of this
list is as follows:
@smallexample
((if dayname (concat dayname ", ")) monthname " " day ", " year)
@end smallexample
@noindent
while in the European style this value is the default:
@smallexample
((if dayname (concat dayname ", ")) day " " monthname " " year)
@end smallexample
@noindent
The ISO standard date representation is this:
@smallexample
(year "-" month "-" day)
@end smallexample
@noindent
This specifies a typical American format:
@smallexample
(month "/" day "/" (substring year -2))
@end smallexample
@node Time Display Format
@subsection Time Display Format
@vindex calendar-time-display-form
The calendar and diary by default display times of day in the
conventional American style with the hours from 1 through 12, minutes,
and either @samp{am} or @samp{pm}. If you prefer the European style,
also known in the US as military, in which the hours go from 00 to 23,
you can alter the variable @code{calendar-time-display-form}. This
variable is a list of expressions that can involve the variables
@code{12-hours}, @code{24-hours}, and @code{minutes}, which are all
numbers in string form, and @code{am-pm} and @code{time-zone}, which are
both alphabetic strings. The default value of
@code{calendar-time-display-form} is as follows:
@smallexample
(12-hours ":" minutes am-pm
(if time-zone " (") time-zone (if time-zone ")"))
@end smallexample
@noindent
Here is a value that provides European style times:
@smallexample
(24-hours ":" minutes
(if time-zone " (") time-zone (if time-zone ")"))
@end smallexample
@node Diary Customizing
@subsection Customizing the Diary
@vindex holidays-in-diary-buffer
Ordinarily, the mode line of the diary buffer window indicates any
holidays that fall on the date of the diary entries. The process of
checking for holidays can take several seconds, so including holiday
information delays the display of the diary buffer noticeably. If you'd
prefer to have a faster display of the diary buffer but without the
holiday information, set the variable @code{holidays-in-diary-buffer} to
@code{nil}.@refill
@vindex number-of-diary-entries
The variable @code{number-of-diary-entries} controls the number of
days of diary entries to be displayed at one time. It affects the
initial display when @code{view-diary-entries-initially} is @code{t}, as
well as the command @kbd{M-x diary}. For example, the default value is
1, which says to display only the current day's diary entries. If the
value is 2, both the current day's and the next day's entries are
displayed. The value can also be a vector of seven elements: for
example, if the value is @code{[0 2 2 2 2 4 1]} then no diary entries
appear on Sunday, the current date's and the next day's diary entries
appear Monday through Thursday, Friday through Monday's entries appear
on Friday, while on Saturday only that day's entries appear.
@vindex print-diary-entries-hook
@findex print-diary-entries
The variable @code{print-diary-entries-hook} is a normal hook run
after preparation of a temporary buffer containing just the diary
entries currently visible in the diary buffer. (The other, irrelevant
diary entries are really absent from the temporary buffer; in the diary
buffer, they are merely hidden.) The default value of this hook does
the printing with the command @code{lpr-buffer}. If you want to use a
different command to do the printing, just change the value of this
hook. Other uses might include, for example, rearranging the lines into
order by day and time.
@vindex diary-date-forms
You can customize the form of dates in your diary file, if neither the
standard American nor European styles suits your needs, by setting the
variable @code{diary-date-forms}. This variable is a list of patterns
for recognizing a date. Each date pattern is a list whose elements may
be regular expressions (@pxref{Regular Expressions,,, elisp, the Emacs
Lisp Reference Manual}) or the symbols @code{month}, @code{day},
@code{year}, @code{monthname}, and @code{dayname}. All these elements
serve as patterns that match certain kinds of text in the diary file.
In order for the date pattern, as a whole, to match, all of its elements
must match consecutively.
A regular expression in a date pattern matches in its usual fashion,
using the standard syntax table altered so that @samp{*} is a word
constituent.
The symbols @code{month}, @code{day}, @code{year}, @code{monthname},
and @code{dayname} match the month number, day number, year number,
month name, and day name of the date being considered. The symbols that
match numbers allow leading zeros; those that match names allow
three-letter abbreviations and capitalization. All the symbols can
match @samp{*}; since @samp{*} in a diary entry means ``any day'', ``any
month'', and so on, it should match regardless of the date being
considered.
The default value of @code{diary-date-forms} in the American style is
this:
@example
((month "/" day "[^/0-9]")
(month "/" day "/" year "[^0-9]")
(monthname " *" day "[^,0-9]")
(monthname " *" day ", *" year "[^0-9]")
(dayname "\\W"))
@end example
The date patterns in the list must be @emph{mutually exclusive} and
must not match any portion of the diary entry itself, just the date and
one character of whitespace. If, to be mutually exclusive, the pattern
must match a portion of the diary entry text---beyond the whitespace
that ends the date---then the first element of the date pattern
@emph{must} be @code{backup}. This causes the date recognizer to back
up to the beginning of the current word of the diary entry, after
finishing the match. Even if you use @code{backup}, the date pattern
must absolutely not match more than a portion of the first word of the
diary entry. The default value of @code{diary-date-forms} in the
European style is this list:
@example
((day "/" month "[^/0-9]")
(day "/" month "/" year "[^0-9]")
(backup day " *" monthname "\\W+\\<[^*0-9]")
(day " *" monthname " *" year "[^0-9]")
(dayname "\\W"))
@end example
@noindent
Notice the use of @code{backup} in the third pattern, because it needs
to match part of a word beyond the date itself to distinguish it from
the fourth pattern.
@node Hebrew/Islamic Entries
@subsection Hebrew- and Islamic-Date Diary Entries
Your diary file can have entries based on Hebrew or Islamic dates, as
well as entries based on the world-standard Gregorian calendar.
However, because recognition of such entries is time-consuming and most
people don't use them, you must explicitly enable their use. If you
want the diary to recognize Hebrew-date diary entries, for example,
you must do this:
@vindex nongregorian-diary-listing-hook
@vindex nongregorian-diary-marking-hook
@findex list-hebrew-diary-entries
@findex mark-hebrew-diary-entries
@smallexample
(add-hook 'nongregorian-diary-listing-hook 'list-hebrew-diary-entries)
(add-hook 'nongregorian-diary-marking-hook 'mark-hebrew-diary-entries)
@end smallexample
@noindent
If you want Islamic-date entries, do this:
@findex list-islamic-diary-entries
@findex mark-islamic-diary-entries
@smallexample
(add-hook 'nongregorian-diary-listing-hook 'list-islamic-diary-entries)
(add-hook 'nongregorian-diary-marking-hook 'mark-islamic-diary-entries)
@end smallexample
Hebrew- and Islamic-date diary entries have the same formats as
Gregorian-date diary entries, except that @samp{H} precedes a Hebrew
date and @samp{I} precedes an Islamic date. Moreover, because the
Hebrew and Islamic month names are not uniquely specified by the first
three letters, you may not abbreviate them. For example, a diary entry
for the Hebrew date Heshvan 25 could look like this:
@smallexample
HHeshvan 25 Happy Hebrew birthday!
@end smallexample
@noindent
and would appear in the diary for any date that corresponds to Heshvan 25
on the Hebrew calendar. And here is an Islamic-date diary entry that matches
Dhu al-Qada 25:
@smallexample
IDhu al-Qada 25 Happy Islamic birthday!
@end smallexample
As with Gregorian-date diary entries, Hebrew- and Islamic-date entries
are nonmarking if they are preceded with an ampersand (@samp{&}).
Here is a table of commands used in the calendar to create diary entries
that match the selected date and other dates that are similar in the Hebrew
or Islamic calendar:
@table @kbd
@item i h d
Add a diary entry for the Hebrew date corresponding to the selected date
(@code{insert-hebrew-diary-entry}).
@item i h m
Add a diary entry for the day of the Hebrew month corresponding to the
selected date (@code{insert-monthly-hebrew-diary-entry}). This diary
entry matches any date that has the same Hebrew day-within-month as the
selected date.
@item i h y
Add a diary entry for the day of the Hebrew year corresponding to the
selected date (@code{insert-yearly-hebrew-diary-entry}). This diary
entry matches any date which has the same Hebrew month and day-within-month
as the selected date.
@item i i d
Add a diary entry for the Islamic date corresponding to the selected date
(@code{insert-islamic-diary-entry}).
@item i i m
Add a diary entry for the day of the Islamic month corresponding to the
selected date (@code{insert-monthly-islamic-diary-entry}).
@item i i y
Add a diary entry for the day of the Islamic year corresponding to the
selected date (@code{insert-yearly-islamic-diary-entry}).
@end table
@findex insert-hebrew-diary-entry
@findex insert-monthly-hebrew-diary-entry
@findex insert-yearly-hebrew-diary-entry
@findex insert-islamic-diary-entry
@findex insert-monthly-islamic-diary-entry
@findex insert-yearly-islamic-diary-entry
These commands work much like the corresponding commands for ordinary
diary entries: they apply to the date that point is on in the calendar
window, and what they do is insert just the date portion of a diary entry
at the end of your diary file. You must then insert the rest of the
diary entry.
@node Fancy Diary Display
@subsection Fancy Diary Display
@vindex diary-display-hook
@findex simple-diary-display
Diary display works by preparing the diary buffer and then running the
hook @code{diary-display-hook}. The default value of this hook
(@code{simple-diary-display}) hides the irrelevant diary entries and
then displays the buffer. However, if you specify the hook as follows,
@cindex diary buffer
@findex fancy-diary-display
@example
(add-hook 'diary-display-hook 'fancy-diary-display)
@end example
@noindent
this enables fancy diary display. It displays diary entries and
holidays by copying them into a special buffer that exists only for the
sake of display. Copying to a separate buffer provides an opportunity
to change the displayed text to make it prettier---for example, to sort
the entries by the dates they apply to.
As with simple diary display, you can print a hard copy of the buffer
with @code{print-diary-entries}. To print a hard copy of a day-by-day
diary for a week, position point on Sunday of that week, type
@kbd{7 d}, and then do @kbd{M-x print-diary-entries}. As usual, the
inclusion of the holidays slows down the display slightly; you can speed
things up by setting the variable @code{holidays-in-diary-buffer} to
@code{nil}.
@vindex diary-list-include-blanks
Ordinarily, the fancy diary buffer does not show days for which there are
no diary entries, even if that day is a holiday. If you want such days to be
shown in the fancy diary buffer, set the variable
@code{diary-list-include-blanks} to @code{t}.@refill
@cindex sorting diary entries
If you use the fancy diary display, you can use the normal hook
@code{list-diary-entries-hook} to sort each day's diary entries by their
time of day. Here's how:
@findex sort-diary-entries
@example
(add-hook 'list-diary-entries-hook 'sort-diary-entries t)
@end example
@noindent
For each day, this sorts diary entries that begin with a recognizable
time of day according to their times. Diary entries without times come
first within each day.
Fancy diary display also has the ability to process included diary
files. This permits a group of people to share a diary file for events
that apply to all of them. Lines in the diary file of this form:
@smallexample
#include "@var{filename}"
@end smallexample
@noindent
includes the diary entries from the file @var{filename} in the fancy
diary buffer. The include mechanism is recursive, so that included files
can include other files, and so on; you must be careful not to have a
cycle of inclusions, of course. Here is how to enable the include
facility:
@vindex list-diary-entries-hook
@vindex mark-diary-entries-hook
@findex include-other-diary-files
@findex mark-included-diary-files
@smallexample
(add-hook 'list-diary-entries-hook 'include-other-diary-files)
(add-hook 'mark-diary-entries-hook 'mark-included-diary-files)
@end smallexample
The include mechanism works only with the fancy diary display, because
ordinary diary display shows the entries directly from your diary file.
@node Sexp Diary Entries
@subsection Sexp Entries and the Fancy Diary Display
@cindex sexp diary entries
Sexp diary entries allow you to do more than just have complicated
conditions under which a diary entry applies. If you use the fancy
diary display, sexp entries can generate the text of the entry depending
on the date itself. For example, an anniversary diary entry can insert
the number of years since the anniversary date into the text of the
diary entry. Thus the @samp{%d} in this dairy entry:
@findex diary-anniversary
@smallexample
%%(diary-anniversary 10 31 1948) Arthur's birthday (%d years old)
@end smallexample
@noindent
gets replaced by the age, so on October 31, 1990 the entry appears in
the fancy diary buffer like this:
@smallexample
Arthur's birthday (42 years old)
@end smallexample
@noindent
If the diary file instead contains this entry:
@smallexample
%%(diary-anniversary 10 31 1948) Arthur's %d%s birthday
@end smallexample
@noindent
the entry in the fancy diary buffer for October 31, 1990 appears like this:
@smallexample
Arthur's 42nd birthday
@end smallexample
Similarly, cyclic diary entries can interpolate the number of repetitions
that have occurred:
@findex diary-cyclic
@smallexample
%%(diary-cyclic 50 1 1 1990) Renew medication (%d%s time)
@end smallexample
@noindent
looks like this:
@smallexample
Renew medication (5th time)
@end smallexample
@noindent
in the fancy diary display on September 8, 1990.
There is an early reminder diary sexp that includes its entry in the
diary not only on the date of occurrence, but also on earlier dates.
For example, if you want a reminder a week before your anniversary, you
can use
@findex diary-remind
@smallexample
%%(diary-remind '(diary-anniversary 12 22 1968) 7) Ed's anniversary
@end smallexample
@noindent
and the fancy diary will show
@smallexample
Ed's anniversary
@end smallexample
@noindent
both on December 15 and on December 22.
@findex diary-date
The function @code{diary-date} applies to dates described by a month,
day, year combination, each of which can be an integer, a list of
integers, or @code{t}. The value @code{t} means all values. For
example,
@smallexample
%%(diary-date '(10 11 12) 22 t) Rake leaves
@end smallexample
@noindent
causes the fancy diary to show
@smallexample
Rake leaves
@end smallexample
@noindent
on October 22, November 22, and December 22 of every year.
@findex diary-float
The function @code{diary-float} allows you to describe diary entries
that apply to dates like the third Friday of November, or the last
Tuesday in April. The parameters are the @var{month}, @var{dayname},
and an index @var{n}. The entry appears on the @var{n}th @var{dayname}
of @var{month}, where @var{dayname}=0 means Sunday, 1 means Monday, and
so on. If @var{n} is negative it counts backward from the end of
@var{month}. The value of @var{month} can be a list of months, a single
month, or @code{t} to specify all months. You can also use an optional
parameter @var{day} to specify the @var{n}th @var{dayname} of
@var{month} on or after/before @var{day}; the value of @var{day} defaults
to 1 if @var{n} is positive and to the last day of @var{month} if
@var{n} is negative. For example,
@smallexample
%%(diary-float t 1 -1) Pay rent
@end smallexample
@noindent
causes the fancy diary to show
@smallexample
Pay rent
@end smallexample
@noindent
on the last Monday of every month.
The generality of sexp diary entries lets you specify any diary
entry that you can describe algorithmically. A sexp diary entry
contains an expression that computes whether the entry applies to any
given date. If its value is non-@code{nil}, the entry applies to that
date; otherwise, it does not. The expression can use the variable
@code{date} to find the date being considered; its value is a list
(@var{month} @var{day} @var{year}) that refers to the Gregorian
calendar.
The sexp diary entry applies to a date when the expression's value
is non-@code{nil}, but some values have more specific meanings. If
the value is a string, that string is a description of the event which
occurs on that date. The value can also have the form
@code{(@var{mark} . @var{string})}; then @var{mark} specifies how to
mark the date in the calendar, and @var{string} is the description of
the event. If @var{mark} is a single-character string, that character
appears next to the date in the calendar. If @var{mark} is a face
name, the date is displayed in that face. If @var{mark} is
@code{nil}, that specifies no particular highlighting for the date.
Suppose you get paid on the 21st of the month if it is a weekday, and
on the Friday before if the 21st is on a weekend. Here is how to write
a sexp diary entry that matches those dates:
@smallexample
&%%(let ((dayname (calendar-day-of-week date))
(day (car (cdr date))))
(or (and (= day 21) (memq dayname '(1 2 3 4 5)))
(and (memq day '(19 20)) (= dayname 5)))
) Pay check deposited
@end smallexample
The following sexp diary entries take advantage of the ability (in the fancy
diary display) to concoct diary entries whose text varies based on the date:
@findex diary-sunrise-sunset
@findex diary-phases-of-moon
@findex diary-day-of-year
@findex diary-iso-date
@findex diary-julian-date
@findex diary-astro-day-number
@findex diary-hebrew-date
@findex diary-islamic-date
@findex diary-french-date
@findex diary-mayan-date
@table @code
@item %%(diary-sunrise-sunset)
Make a diary entry for the local times of today's sunrise and sunset.
@item %%(diary-phases-of-moon)
Make a diary entry for the phases (quarters) of the moon.
@item %%(diary-day-of-year)
Make a diary entry with today's day number in the current year and the number
of days remaining in the current year.
@item %%(diary-iso-date)
Make a diary entry with today's equivalent ISO commercial date.
@item %%(diary-julian-date)
Make a diary entry with today's equivalent date on the Julian calendar.
@item %%(diary-astro-day-number)
Make a diary entry with today's equivalent astronomical (Julian) day number.
@item %%(diary-hebrew-date)
Make a diary entry with today's equivalent date on the Hebrew calendar.
@item %%(diary-islamic-date)
Make a diary entry with today's equivalent date on the Islamic calendar.
@item %%(diary-french-date)
Make a diary entry with today's equivalent date on the French Revolutionary
calendar.
@item %%(diary-mayan-date)
Make a diary entry with today's equivalent date on the Mayan calendar.
@end table
@noindent
Thus including the diary entry
@example
&%%(diary-hebrew-date)
@end example
@noindent
causes every day's diary display to contain the equivalent date on the
Hebrew calendar, if you are using the fancy diary display. (With simple
diary display, the line @samp{&%%(diary-hebrew-date)} appears in the
diary for any date, but does nothing particularly useful.)
These functions can be used to construct sexp diary entries based on
the Hebrew calendar in certain standard ways:
@cindex rosh hodesh
@findex diary-rosh-hodesh
@cindex parasha, weekly
@findex diary-parasha
@cindex candle lighting times
@findex diary-sabbath-candles
@cindex omer count
@findex diary-omer
@cindex yahrzeits
@findex diary-yahrzeit
@table @code
@item %%(diary-rosh-hodesh)
Make a diary entry that tells the occurrence and ritual announcement of each
new Hebrew month.
@item %%(diary-parasha)
Make a Saturday diary entry that tells the weekly synagogue scripture reading.
@item %%(diary-sabbath-candles)
Make a Friday diary entry that tells the @emph{local time} of Sabbath
candle lighting.
@item %%(diary-omer)
Make a diary entry that gives the omer count, when appropriate.
@item %%(diary-yahrzeit @var{month} @var{day} @var{year}) @var{name}
Make a diary entry marking the anniversary of a date of death. The date
is the @emph{Gregorian} (civil) date of death. The diary entry appears
on the proper Hebrew calendar anniversary and on the day before. (In
the European style, the order of the parameters is changed to @var{day},
@var{month}, @var{year}.)
@end table
All the functions documented above take an optional argument
@var{mark} which specifies how to mark the date in the calendar display.
If one of these functions decides that it applies to a certain date,
it returns a value that contains @var{mark}.
@ignore
arch-tag: 52cb299f-fd1f-4616-bfe6-91b988669431
@end ignore

View file

@ -24,9 +24,11 @@ particular date; @kbd{Mouse-3} brings up a menu of commonly used
calendar features that are independent of any particular date. To exit
the calendar, type @kbd{q}.
@iftex
This chapter describes the basic calendar features.
@inforef{Advanced Calendar/Diary Usage,, emacs-xtra}, for information
about more specialized features.
@xref{Advanced Calendar/Diary Usage,,, emacs-xtra, Specialized Emacs
Features}, for information about more specialized features.
@end iftex
@menu
* Calendar Motion:: Moving through the calendar; selecting a date.
@ -43,6 +45,9 @@ about more specialized features.
* Importing Diary:: Converting diary events to/from other formats.
* Daylight Savings:: How to specify when daylight savings time is active.
* Time Intervals:: Keeping track of time intervals.
@ifnottex
* Advanced Calendar/Diary Usage:: Advanced Calendar/Diary customization.
@end ifnottex
@end menu
@node Calendar Motion
@ -444,14 +449,20 @@ window.
To view the distribution of holidays for all the dates shown in the
calendar, use the @kbd{x} command. This displays the dates that are
holidays in a different face (or places a @samp{*} after these dates, if
display with multiple faces is not available). @inforef{Calendar
Customizing, calendar-holiday-marker, emacs-xtra}. The command applies
both to the currently visible months and to other months that
subsequently become visible by scrolling. To turn marking off and erase
the current marks, type @kbd{u}, which also erases any diary marks
(@pxref{Diary}). If the variable @code{mark-holidays-in-calendar} is
non-@code{nil}, creating or updating the calendar marks holidays
automatically.
display with multiple faces is not available).
@iftex
@xref{Calendar Customizing, calendar-holiday-marker,, emacs-xtra,
Specialized Emacs Features}.
@end iftex
@ifnottex
@xref{Calendar Customizing, calendar-holiday-marker}.
@end ifnottex
The command applies both to the currently visible months and to
other months that subsequently become visible by scrolling. To turn
marking off and erase the current marks, type @kbd{u}, which also
erases any diary marks (@pxref{Diary}). If the variable
@code{mark-holidays-in-calendar} is non-@code{nil}, creating or
updating the calendar marks holidays automatically.
@kindex a @r{(Calendar mode)}
@findex list-calendar-holidays
@ -1029,14 +1040,20 @@ current date is visible).
To get a broader view of which days are mentioned in the diary, use
the @kbd{m} command. This displays the dates that have diary entries in
a different face (or places a @samp{+} after these dates, if display
with multiple faces is not available). @inforef{Calendar Customizing,
diary-entry-marker, emacs-xtra}. The command applies both to the
currently visible months and to other months that subsequently become
visible by scrolling. To turn marking off and erase the current marks,
type @kbd{u}, which also turns off holiday marks (@pxref{Holidays}).
If the variable @code{mark-diary-entries-in-calendar} is
non-@code{nil}, creating or updating the calendar marks diary dates
automatically.
with multiple faces is not available).
@iftex
@xref{Calendar Customizing, diary-entry-marker,, emacs-xtra,
Specialized Emacs Features}.
@end iftex
@ifnottex
@xref{Calendar Customizing, diary-entry-marker}.
@end ifnottex
The command applies both to the currently visible months and to
other months that subsequently become visible by scrolling. To turn
marking off and erase the current marks, type @kbd{u}, which also
turns off holiday marks (@pxref{Holidays}). If the variable
@code{mark-diary-entries-in-calendar} is non-@code{nil}, creating or
updating the calendar marks diary dates automatically.
@kindex s @r{(Calendar mode)}
@findex show-all-diary-entries
@ -1055,7 +1072,13 @@ can customize it like @code{lpr-region} (@pxref{Printing}).
The command @kbd{M-x diary} displays the diary entries for the current
date, independently of the calendar display, and optionally for the next
few days as well; the variable @code{number-of-diary-entries} specifies
how many days to include. @inforef{Diary Customizing,, emacs-xtra}.
how many days to include.
@iftex
@xref{Diary Customizing,,, emacs-xtra, Specialized Emacs Features}.
@end iftex
@ifnottex
@xref{Diary Customizing, number-of-diary-entries}.
@end ifnottex
If you put @code{(diary)} in your @file{.emacs} file, this
automatically displays a window with the day's diary entries, when you
@ -1360,7 +1383,12 @@ entry applies to all months of the year.@refill
specifying the name of a face or a single-character string to use when
marking the entry in the calendar. Most generally, sexp diary entries
can perform arbitrary computations to determine when they apply.
@inforef{Sexp Diary Entries,, emacs-xtra}.
@iftex
@xref{Sexp Diary Entries,,, emacs-xtra, Specialized Emacs Features}.
@end iftex
@ifnottex
@inforef{Sexp Diary Entries}.
@end ifnottex
@node Appointments
@section Appointments
@ -1479,8 +1507,14 @@ and adds the results to an Emacs diary file. For example:
@noindent
You can use an @code{#include} directive to add the import file contents
to the main diary file, if these are different files. @inforef{Fancy Diary
Display,, emacs-xtra}.
to the main diary file, if these are different files.
@iftex
@xref{Fancy Diary Display,,, emacs-xtra, Specialized Emacs Features}.
@end iftex
@ifnottex
@xref{Fancy Diary Display}.
@end ifnottex
@findex icalendar-export-file, icalendar-export-region
Use @code{icalendar-export-file} to interactively export an entire
@ -1608,6 +1642,10 @@ you change the value of any of timeclock's customizable variables, you
should run the command @kbd{M-x timeclock-reread-log} to update the
data in Emacs from the file.
@ifnottex
@include cal-xtra.texi
@end ifnottex
@ignore
arch-tag: 4531ef09-9df3-449d-9c52-2b5a4a337f92
@end ignore

View file

@ -293,7 +293,8 @@ Do not reload any saved desktop. @xref{Saving Emacs Sessions}.
@opindex --user
@cindex load init file of another user
Load @var{user}'s Emacs init file @file{~@var{user}/.emacs} instead of
your own.
your own@footnote{
This option has no effect on MS-Windows.}.
@item --debug-init
@opindex --debug-init

View file

@ -1977,11 +1977,12 @@ usual to do so.
@subsection Disabling Commands
@cindex disabled command
Disabling a command menas it requires confirmation before it can be
executed. The purpose of disabling a command is to prevent users from
executing it by accident and being confused.
Disabling a command means that invoking it interactively asks for
confirmation from the user. The purpose of disabling a command is to
prevent users from executing it by accident; we do this for commands
that might be confusing to the uninitiated.
An attempt to invoke a disabled command interactively in Emacs
Attempting to invoke a disabled command interactively in Emacs
displays a window containing the command's name, its documentation,
and some instructions on what to do immediately; then Emacs asks for
input saying whether to execute the command as requested, enable it
@ -2021,8 +2022,8 @@ because Emacs has not read your init file.
Whether a command is disabled is independent of what key is used to
invoke it; disabling also applies if the command is invoked using
@kbd{M-x}. Disabling a command has no effect on calling it as a
function from Lisp programs.
@kbd{M-x}. However, disabling a command has no effect on calling it
as a function from Lisp programs.
@node Syntax
@section The Syntax Table

49
man/dired-xtra.texi Normal file
View file

@ -0,0 +1,49 @@
@c This is part of the Emacs manual.
@c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@c
@c This file is included either in emacs-xtra.texi (when producing the
@c printed version) or in the main Emacs manual (for the on-line version).
@node Subdir Switches
@section Subdirectory Switches in Dired
You can insert subdirectories with specified @code{ls} switches in
Dired buffers, using @kbd{C-u i}. You can change the @code{ls}
switches of an already inserted subdirectory using @kbd{C-u l}.
In Emacs versions 22.1 and later, Dired remembers the switches, so
that reverting the buffer will not change them back to the main
directory's switches. Deleting a subdirectory forgets about its
switches.
Using @code{dired-undo} (usually bound to @kbd{C-_} and @kbd{C-x u})
to reinsert or delete subdirectories, that were inserted with explicit
switches, can bypass Dired's machinery for remembering (or forgetting)
switches. Deleting a subdirectory using @code{dired-undo} does not
forget its switches. When later reinserted using @kbd{i}, it will be
reinserted using its old switches. Using @code{dired-undo} to
reinsert a subdirectory that was deleted using the regular
Dired commands (not @code{dired-undo}) will originally insert it with
its old switches. However, reverting the buffer will relist it using
the buffer's default switches. If any of this yields problems, you
can easily correct the situation using @kbd{C-u i} or @kbd{C-u l}.
Dired does not remember the @code{R} switch. Inserting a subdirectory
with switches that include the @code{R} switch is equivalent with
inserting each of its subdirectories using all remaining switches.
For instance, updating or killing a subdirectory that was inserted
with the @code{R} switch will not update or kill its subdirectories.
The buffer's default switches do not affect subdirectories that were
inserted using explicitly specified switches. In particular,
commands such as @kbd{s}, that change the buffer's switches do not
affect such subdirectories. (They do affect subdirectories without
explicitly assigned switches, however.)
You can make Dired forget about all subdirectory switches and relist
all subdirectories with the buffer's default switches using
@kbd{M-x dired-reset-subdir-switches}. This also reverts the Dired buffer.
@ignore
arch-tag: e3865701-9179-4ffb-bc34-d321111c688d
@end ignore

View file

@ -36,6 +36,9 @@ on all of them with on command.
* Transforming File Names:: Using patterns to rename multiple files.
* Comparison in Dired:: Running `diff' by way of Dired.
* Subdirectories in Dired:: Adding subdirectories to the Dired buffer.
@ifnottex
* Subdir Switches:: Subdirectory switches in Dired.
@end ifnottex
* Subdirectory Motion:: Moving across subdirectories, and up and down.
* Hiding Subdirectories:: Making subdirectories visible or invisible.
* Updating: Dired Updating. Discarding lines for files of no interest.
@ -906,6 +909,10 @@ Use the @kbd{l} command (@code{dired-do-redisplay}) to update the
subdirectory's contents. Use @kbd{C-u k} on the subdirectory header
line to delete the subdirectory. @xref{Dired Updating}.
@ifnottex
@include dired-xtra.texi
@end ifnottex
@node Subdirectory Motion
@section Moving Over Subdirectories
@ -1198,7 +1205,7 @@ not appear in the other directory is ``different''. You can specify
more stringent comparisons by entering a Lisp expression, which can
refer to the variables @code{size1} and @code{size2}, the respective
file sizes; @code{mtime1} and @code{mtime2}, the last modification
times in seconds, as floating point numers; and @code{fa1} and
times in seconds, as floating point numbers; and @code{fa1} and
@code{fa2}, the respective file attribute lists (as returned by the
function @code{file-attributes}). This expression is evaluated for
each pair of like-named files, and if the expression's value is

View file

@ -1127,7 +1127,7 @@ fringe when positioned on that newline.
@vindex indicate-buffer-boundaries
On a graphical display, Emacs can indicate the buffer boundaries in
the fringes. It inddicates the first line and the last line with
the fringes. It indicates the first line and the last line with
angle images in the fringes. This can be combined with up and down
arrow images which say whether it is possible to scroll the window up
and down.

File diff suppressed because it is too large Load diff

View file

@ -42,7 +42,13 @@ Software Foundation raise funds for GNU development.''
@smallbook
@setchapternewpage odd
@c per rms and peterb, use 10pt fonts for the main text, mostly to
@c save on paper cost. Also do not declare @setchapternewpage odd.
@c Do this inside @tex for now, so current makeinfo does not complain.
@tex
@fonttextsize 10
@end tex
@defcodeindex op
@synindex pg cp
@ -127,7 +133,7 @@ and Sending Mail and Registers and Minibuffer.
* Glossary:: The glossary.
* Antinews:: Information about Emacs version 21.
* Mac OS:: Using Emacs in the Mac.
* Emacs and Microsoft Windows:: Using Emacs on Microsoft Windows.
* Microsoft Windows:: Using Emacs on Microsoft Windows and MS-DOS.
* Manifesto:: What's GNU? Gnu's Not Unix!
* Acknowledgments:: Major contributors to GNU Emacs.
@ -186,6 +192,10 @@ Advanced Features
* Maintaining:: Features for maintaining large programs.
* Abbrevs:: How to define text abbreviations to reduce
the number of characters you must type.
@ifnottex
* Picture Mode:: Editing pictures made up of characters using
the quarter-plane screen model.
@end ifnottex
* Sending Mail:: Sending mail in Emacs.
* Rmail:: Reading mail in Emacs.
* Dired:: You can ``edit'' a directory to manage files in it.
@ -626,6 +636,16 @@ Abbrevs
* Dynamic Abbrevs:: Abbreviations for words already in the buffer.
* Dabbrev Customization:: What is a word, for dynamic abbrevs. Case handling.
@ifnottex
Editing Pictures
* Basic Picture:: Basic concepts and simple commands of Picture Mode.
* Insert in Picture:: Controlling direction of cursor motion
after "self-inserting" characters.
* Tabs in Picture:: Various features for tab stops and indentation.
* Rectangles in Picture:: Clearing and superimposing rectangles.
@end ifnottex
Sending Mail
* Mail Format:: Format of the mail being composed.
@ -921,8 +941,8 @@ This edition of the manual is intended for use with GNU Emacs
installed on GNU and Unix systems. GNU Emacs can also be used on VMS,
MS-DOS (also called MS-DOG), Microsoft Windows, and Macintosh systems.
Those systems use different file name syntax; in addition, VMS and
MS-DOS do not support all GNU Emacs features. @xref{Emacs and
Microsoft Windows}, for information about using Emacs on Windows.
MS-DOS do not support all GNU Emacs features. @xref{Microsoft
Windows}, for information about using Emacs on Windows.
@xref{Mac OS}, for information about using Emacs on Macintosh. We
don't try to describe VMS usage in this manual.
@end iftex
@ -1131,6 +1151,9 @@ while running shell commands.
@include building.texi
@include maintaining.texi
@include abbrevs.texi
@ifnottex
@include picture-xtra.texi
@end ifnottex
@include sending.texi
@include rmail.texi
@include dired.texi

414
man/emerge-xtra.texi Normal file
View file

@ -0,0 +1,414 @@
@c This is part of the Emacs manual.
@c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@c
@c This file is included either in emacs-xtra.texi (when producing the
@c printed version) or in the main Emacs manual (for the on-line version).
@node Emerge
@section Merging Files with Emerge
@cindex Emerge
@cindex merging files
It's not unusual for programmers to get their signals crossed and
modify the same program in two different directions. To recover from
this confusion, you need to merge the two versions. Emerge makes this
easier. For other ways to compare files, see
@iftex
@ref{Comparing Files,,, emacs, the Emacs Manual},
@end iftex
@ifnottex
@ref{Comparing Files},
@end ifnottex
and @ref{Top, Ediff,, ediff, The Ediff Manual}.
@menu
* Overview of Emerge:: How to start Emerge. Basic concepts.
* Submodes of Emerge:: Fast mode vs. Edit mode.
Skip Prefers mode and Auto Advance mode.
* State of Difference:: You do the merge by specifying state A or B
for each difference.
* Merge Commands:: Commands for selecting a difference,
changing states of differences, etc.
* Exiting Emerge:: What to do when you've finished the merge.
* Combining in Emerge:: How to keep both alternatives for a difference.
* Fine Points of Emerge:: Misc.
@end menu
@node Overview of Emerge
@subsection Overview of Emerge
To start Emerge, run one of these four commands:
@table @kbd
@item M-x emerge-files
@findex emerge-files
Merge two specified files.
@item M-x emerge-files-with-ancestor
@findex emerge-files-with-ancestor
Merge two specified files, with reference to a common ancestor.
@item M-x emerge-buffers
@findex emerge-buffers
Merge two buffers.
@item M-x emerge-buffers-with-ancestor
@findex emerge-buffers-with-ancestor
Merge two buffers with reference to a common ancestor in a third
buffer.
@end table
@cindex merge buffer (Emerge)
@cindex A and B buffers (Emerge)
The Emerge commands compare two files or buffers, and display the
comparison in three buffers: one for each input text (the @dfn{A buffer}
and the @dfn{B buffer}), and one (the @dfn{merge buffer}) where merging
takes place. The merge buffer shows the full merged text, not just the
differences. Wherever the two input texts differ, you can choose which
one of them to include in the merge buffer.
The Emerge commands that take input from existing buffers use only
the accessible portions of those buffers, if they are narrowed.
@iftex
@xref{Narrowing,,, emacs, the Emacs Manual}.
@end iftex
@ifnottex
@xref{Narrowing}.
@end ifnottex
If a common ancestor version is available, from which the two texts to
be merged were both derived, Emerge can use it to guess which
alternative is right. Wherever one current version agrees with the
ancestor, Emerge presumes that the other current version is a deliberate
change which should be kept in the merged version. Use the
@samp{with-ancestor} commands if you want to specify a common ancestor
text. These commands read three file or buffer names---variant A,
variant B, and the common ancestor.
After the comparison is done and the buffers are prepared, the
interactive merging starts. You control the merging by typing special
@dfn{merge commands} in the merge buffer (@pxref{Merge Commands}).
For each run of differences between the input texts, you can choose
which one of them to keep, or edit them both together.
The merge buffer uses a special major mode, Emerge mode, with commands
for making these choices. But you can also edit the buffer with
ordinary Emacs commands.
At any given time, the attention of Emerge is focused on one
particular difference, called the @dfn{selected} difference. This
difference is marked off in the three buffers like this:
@example
vvvvvvvvvvvvvvvvvvvv
@var{text that differs}
^^^^^^^^^^^^^^^^^^^^
@end example
@noindent
Emerge numbers all the differences sequentially and the mode
line always shows the number of the selected difference.
Normally, the merge buffer starts out with the A version of the text.
But when the A version of a difference agrees with the common ancestor,
then the B version is initially preferred for that difference.
Emerge leaves the merged text in the merge buffer when you exit. At
that point, you can save it in a file with @kbd{C-x C-w}. If you give a
numeric argument to @code{emerge-files} or
@code{emerge-files-with-ancestor}, it reads the name of the output file
using the minibuffer. (This is the last file name those commands read.)
Then exiting from Emerge saves the merged text in the output file.
Normally, Emerge commands save the output buffer in its file when you
exit. If you abort Emerge with @kbd{C-]}, the Emerge command does not
save the output buffer, but you can save it yourself if you wish.
@node Submodes of Emerge
@subsection Submodes of Emerge
You can choose between two modes for giving merge commands: Fast mode
and Edit mode. In Fast mode, basic merge commands are single
characters, but ordinary Emacs commands are disabled. This is
convenient if you use only merge commands. In Edit mode, all merge
commands start with the prefix key @kbd{C-c C-c}, and the normal Emacs
commands are also available. This allows editing the merge buffer, but
slows down Emerge operations.
Use @kbd{e} to switch to Edit mode, and @kbd{C-c C-c f} to switch to
Fast mode. The mode line indicates Edit and Fast modes with @samp{E}
and @samp{F}.
Emerge has two additional submodes that affect how particular merge
commands work: Auto Advance mode and Skip Prefers mode.
If Auto Advance mode is in effect, the @kbd{a} and @kbd{b} commands
advance to the next difference. This lets you go through the merge
faster as long as you simply choose one of the alternatives from the
input. The mode line indicates Auto Advance mode with @samp{A}.
If Skip Prefers mode is in effect, the @kbd{n} and @kbd{p} commands
skip over differences in states prefer-A and prefer-B (@pxref{State of
Difference}). Thus you see only differences for which neither version
is presumed ``correct.'' The mode line indicates Skip Prefers mode with
@samp{S}.
@findex emerge-auto-advance-mode
@findex emerge-skip-prefers-mode
Use the command @kbd{s a} (@code{emerge-auto-advance-mode}) to set or
clear Auto Advance mode. Use @kbd{s s}
(@code{emerge-skip-prefers-mode}) to set or clear Skip Prefers mode.
These commands turn on the mode with a positive argument, turns it off
with a negative or zero argument, and toggle the mode with no argument.
@node State of Difference
@subsection State of a Difference
In the merge buffer, a difference is marked with lines of @samp{v} and
@samp{^} characters. Each difference has one of these seven states:
@table @asis
@item A
The difference is showing the A version. The @kbd{a} command always
produces this state; the mode line indicates it with @samp{A}.
@item B
The difference is showing the B version. The @kbd{b} command always
produces this state; the mode line indicates it with @samp{B}.
@item default-A
@itemx default-B
The difference is showing the A or the B state by default, because you
haven't made a choice. All differences start in the default-A state
(and thus the merge buffer is a copy of the A buffer), except those for
which one alternative is ``preferred'' (see below).
When you select a difference, its state changes from default-A or
default-B to plain A or B. Thus, the selected difference never has
state default-A or default-B, and these states are never displayed in
the mode line.
The command @kbd{d a} chooses default-A as the default state, and @kbd{d
b} chooses default-B. This chosen default applies to all differences
which you haven't ever selected and for which no alternative is preferred.
If you are moving through the merge sequentially, the differences you
haven't selected are those following the selected one. Thus, while
moving sequentially, you can effectively make the A version the default
for some sections of the merge buffer and the B version the default for
others by using @kbd{d a} and @kbd{d b} between sections.
@item prefer-A
@itemx prefer-B
The difference is showing the A or B state because it is
@dfn{preferred}. This means that you haven't made an explicit choice,
but one alternative seems likely to be right because the other
alternative agrees with the common ancestor. Thus, where the A buffer
agrees with the common ancestor, the B version is preferred, because
chances are it is the one that was actually changed.
These two states are displayed in the mode line as @samp{A*} and @samp{B*}.
@item combined
The difference is showing a combination of the A and B states, as a
result of the @kbd{x c} or @kbd{x C} commands.
Once a difference is in this state, the @kbd{a} and @kbd{b} commands
don't do anything to it unless you give them a numeric argument.
The mode line displays this state as @samp{comb}.
@end table
@node Merge Commands
@subsection Merge Commands
Here are the Merge commands for Fast mode; in Edit mode, precede them
with @kbd{C-c C-c}:
@table @kbd
@item p
Select the previous difference.
@item n
Select the next difference.
@item a
Choose the A version of this difference.
@item b
Choose the B version of this difference.
@item C-u @var{n} j
Select difference number @var{n}.
@item .
Select the difference containing point. You can use this command in the
merge buffer or in the A or B buffer.
@item q
Quit---finish the merge.
@item C-]
Abort---exit merging and do not save the output.
@item f
Go into Fast mode. (In Edit mode, this is actually @kbd{C-c C-c f}.)
@item e
Go into Edit mode.
@item l
Recenter (like @kbd{C-l}) all three windows.
@item -
Specify part of a prefix numeric argument.
@item @var{digit}
Also specify part of a prefix numeric argument.
@item d a
Choose the A version as the default from here down in
the merge buffer.
@item d b
Choose the B version as the default from here down in
the merge buffer.
@item c a
Copy the A version of this difference into the kill ring.
@item c b
Copy the B version of this difference into the kill ring.
@item i a
Insert the A version of this difference at point.
@item i b
Insert the B version of this difference at point.
@item m
Put point and mark around the difference.
@item ^
Scroll all three windows down (like @kbd{M-v}).
@item v
Scroll all three windows up (like @kbd{C-v}).
@item <
Scroll all three windows left (like @kbd{C-x <}).
@item >
Scroll all three windows right (like @kbd{C-x >}).
@item |
Reset horizontal scroll on all three windows.
@item x 1
Shrink the merge window to one line. (Use @kbd{C-u l} to restore it
to full size.)
@item x c
Combine the two versions of this difference (@pxref{Combining in
Emerge}).
@item x f
Show the names of the files/buffers Emerge is operating on, in a Help
window. (Use @kbd{C-u l} to restore windows.)
@item x j
Join this difference with the following one.
(@kbd{C-u x j} joins this difference with the previous one.)
@item x s
Split this difference into two differences. Before you use this
command, position point in each of the three buffers at the place where
you want to split the difference.
@item x t
Trim identical lines off the top and bottom of the difference.
Such lines occur when the A and B versions are
identical but differ from the ancestor version.
@end table
@node Exiting Emerge
@subsection Exiting Emerge
The @kbd{q} command (@code{emerge-quit}) finishes the merge, storing
the results into the output file if you specified one. It restores the
A and B buffers to their proper contents, or kills them if they were
created by Emerge and you haven't changed them. It also disables the
Emerge commands in the merge buffer, since executing them later could
damage the contents of the various buffers.
@kbd{C-]} aborts the merge. This means exiting without writing the
output file. If you didn't specify an output file, then there is no
real difference between aborting and finishing the merge.
If the Emerge command was called from another Lisp program, then its
return value is @code{t} for successful completion, or @code{nil} if you
abort.
@node Combining in Emerge
@subsection Combining the Two Versions
Sometimes you want to keep @emph{both} alternatives for a particular
difference. To do this, use @kbd{x c}, which edits the merge buffer
like this:
@example
@group
#ifdef NEW
@var{version from A buffer}
#else /* not NEW */
@var{version from B buffer}
#endif /* not NEW */
@end group
@end example
@noindent
@vindex emerge-combine-versions-template
While this example shows C preprocessor conditionals delimiting the two
alternative versions, you can specify the strings to use by setting
the variable @code{emerge-combine-versions-template} to a string of your
choice. In the string, @samp{%a} says where to put version A, and
@samp{%b} says where to put version B. The default setting, which
produces the results shown above, looks like this:
@example
@group
"#ifdef NEW\n%a#else /* not NEW */\n%b#endif /* not NEW */\n"
@end group
@end example
@node Fine Points of Emerge
@subsection Fine Points of Emerge
During the merge, you mustn't try to edit the A and B buffers yourself.
Emerge modifies them temporarily, but ultimately puts them back the way
they were.
You can have any number of merges going at once---just don't use any one
buffer as input to more than one merge at once, since the temporary
changes made in these buffers would get in each other's way.
Starting Emerge can take a long time because it needs to compare the
files fully. Emacs can't do anything else until @code{diff} finishes.
Perhaps in the future someone will change Emerge to do the comparison in
the background when the input files are large---then you could keep on
doing other things with Emacs until Emerge is ready to accept
commands.
@vindex emerge-startup-hook
After setting up the merge, Emerge runs the hook
@code{emerge-startup-hook}.
@iftex
@xref{Hooks,,, emacs, the Emacs Manual}.
@end iftex
@ifnottex
@xref{Hooks}.
@end ifnottex
@ignore
arch-tag: cda63f09-9c5f-4ea1-adb9-4a820fdfb24e
@end ignore

View file

@ -2229,7 +2229,7 @@ otherwise. @inforef{Frame Commands, Frame Commands, emacs}.
@cindex Regexps
@cindex Regular expressions
@cindex Differences between Unix and Emacs regexps
@cindex Unix regeps, differences from Emacs
@cindex Unix regexps, differences from Emacs
@cindex Text strings, putting regexps in
@inforef{Regexp Backslash, Regexp Backslash, emacs}.
@ -2261,15 +2261,35 @@ is actually typical for regexp syntax.)
@cindex Replacing strings across files
@cindex Multiple files, replacing across
@cindex Files, replacing strings across multiple
@cindex Recursive search/replace operations
The ``tags'' feature of Emacs includes the command
@code{tags-query-replace} which performs a query-replace across all the
files mentioned in the @file{TAGS} file. @inforef{Tags Search, Tags Search,
emacs}.
As of Emacs 19.29, Dired mode (@kbd{M-x dired @key{RET}}, or @kbd{C-x
d}) supports the command @code{dired-do-query-replace} (@kbd{Q}), which
allows users to replace regular expressions in multiple files.
As of Emacs 19.29, Dired mode (@kbd{M-x dired @key{RET}}, or @kbd{C-x d})
supports the command @code{dired-do-query-replace} (@kbd{Q}), which allows
users to replace regular expressions in multiple files.
You can use this command to perform search/replace operations on
multiple files by following the following steps:
@itemize @bullet
@item
Assemble a list of files you want to operate on with either
@code{find-dired}, @code{find-name-dired} or @code{find-grep-dired}.
@item
Mark all files in the resulting Dired buffer using @kbd{t}.
@item
Use @kbd{Q} to start a @code{query-replace-regexp} session on the marked
files.
@item
To accept all replacements in each file, hit @kbd{!}.
@end itemize
Another way to do the same thing is to use the ``tags'' feature of
Emacs: it includes the command @code{tags-query-replace} which performs
a query-replace across all the files mentioned in the @file{TAGS} file.
@inforef{Tags Search, Tags Search, emacs}.
@node Documentation for etags, Disabling backups, Replacing text across multiple files, Common requests
@section Where is the documentation for @code{etags}?
@ -3474,7 +3494,7 @@ see @ref{Packages that do not come with Emacs}.
@uref{http://www.anc.ed.ac.uk/~stephen/emacs/ell.html, The Emacs Lisp
List (ELL)}, maintained by @email{stephen@@anc.ed.ac.uk, Stephen Eglen},
aims to provide one compact list with links to all of the current Emacs
Lisp files on the internet. The ELL can be browsed over the web, or
Lisp files on the Internet. The ELL can be browsed over the web, or
from Emacs with @uref{http://www.anc.ed.ac.uk/~stephen/emacs/ell.el,
the @file{ell} package}.

View file

@ -25,6 +25,9 @@ on file directories.
* Visiting:: Visiting a file prepares Emacs to edit the file.
* Saving:: Saving makes your changes permanent.
* Reverting:: Reverting cancels all the changes not saved.
@ifnottex
* Autorevert:: Auto Reverting non-file buffers.
@end ifnottex
* Auto Save:: Auto Save periodically protects against loss of data.
* File Aliases:: Handling multiple names for one file.
* Version Control:: Version control systems (RCS, CVS and SCCS).
@ -107,10 +110,13 @@ first slash in the double slash; the result is @samp{/x1/rms/foo}.
@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}.)
login name is @code{user-id}@footnote{
On MS-Windows and MS-DOS 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}. The
@file{~@var{user-id}/} construct is supported on those systems only
for the current user, i.e., only if @var{user-id} is the current
user's login name.}.
@cindex environment variables in file names
@cindex expansion of environment variables
@ -518,8 +524,14 @@ value is @code{t}, so that Emacs does write backup files.
Control}), the variable @code{vc-make-backup-files} determines whether
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,,,emacs-xtra, Specialized
Emacs Features}.
control system.
@iftex
@xref{General VC Options,,,emacs-xtra, Specialized Emacs Features}.
@end iftex
@ifnottex
@xref{General VC Options}.
@end ifnottex
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.
@ -973,6 +985,10 @@ modes do not check or revert remote files.
@xref{VC Mode Line}, for Auto Revert peculiarities in buffers that
visit files under version control.
@ifnottex
@include arevert-xtra.texi
@end ifnottex
@node Auto Save
@section Auto-Saving: Protection Against Disasters
@cindex Auto Save mode
@ -1202,7 +1218,13 @@ RCS or CVS, you can switch to CSSC.
VC is enabled by default in Emacs. To disable it, set the
customizable variable @code{vc-handled-backends} to @code{nil}
@iftex
(@pxref{Customizing VC,,,emacs-xtra, Specialized Emacs Features}).
@end iftex
@ifnottex
(@pxref{Customizing VC}).
@end ifnottex
@menu
* Introduction to VC:: How version control works in general.
@ -1211,6 +1233,12 @@ customizable variable @code{vc-handled-backends} to @code{nil}
* Old Versions:: Examining and comparing old versions.
* Secondary VC Commands:: The commands used a little less frequently.
* Branches:: Multiple lines of development.
@ifnottex
* Remote Repositories:: Efficient access to remote CVS servers.
* Snapshots:: Sets of file versions treated as a unit.
* Miscellaneous VC:: Various other commands and features of VC.
* Customizing VC:: Variables that change VC's behavior.
@end ifnottex
@end menu
@node Introduction to VC
@ -1348,7 +1376,13 @@ permitted; check-in is still the way to record a new version.
CVS normally allows each user to modify his own copy of the work file
at any time, but requires merging with changes from other users at
check-in time. However, CVS can also be set up to require locking.
@iftex
(@pxref{CVS Options,,,emacs-xtra, Specialized Emacs Features}).
@end iftex
@ifnottex
(@pxref{CVS Options}).
@end ifnottex
@node Types of Log File
@subsubsection Types of Log File
@ -1380,8 +1414,14 @@ for each change just once, then put it into both logs. You can write
the entry in @file{ChangeLog}, then copy it to the log buffer when you
check in the change. Or you can write the entry in the log buffer
while checking in the change, and later use the @kbd{C-x v a} command
to copy it to @file{ChangeLog} (@pxref{Change Logs and
VC,,,emacs-xtra, Specialized Emacs Features}).
to copy it to @file{ChangeLog}
@iftex
(@pxref{Change Logs and VC,,,emacs-xtra, Specialized Emacs Features}).
@end iftex
@ifnottex
(@pxref{Change Logs and VC}).
@end ifnottex
@node VC Mode Line
@subsection Version Control and the Mode Line
@ -1545,8 +1585,15 @@ the repository.
@cindex specific version control system
Instead of the version number, you can also specify the name of a
version control system. This is useful when one file is being managed
with two version control systems at the same time (@pxref{Local
Version Control,,,emacs-xtra, Specialized Emacs Features}).
with two version control systems at the same time
@iftex
(@pxref{Local Version Control,,,emacs-xtra, Specialized Emacs
Features}).
@end iftex
@ifnottex
(@pxref{Local Version Control}).
@end ifnottex
@end itemize
@node Log Buffer
@ -1568,16 +1615,27 @@ control, you can generate the Log Edit text from the ChangeLog using
entries for the file(s) concerned in the top entry in the ChangeLog
and uses those paragraphs as the log text. This text is only inserted
if the top entry was made under your user name on the current date.
@iftex
@xref{Change Logs and VC,,,emacs-xtra, Specialized Emacs Features},
@end iftex
@ifnottex
@xref{Change Logs and VC},
@end ifnottex
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}) 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,,,emacs-xtra,
Specialized Emacs Features}, and @ref{Top, , About PCL-CVS, pcl-cvs,
PCL-CVS --- The Emacs Front-End to CVS}.)
you use VC Dired mode or PCL-CVS.
@iftex
@xref{VC Dired Mode,,,emacs-xtra, Specialized Emacs Features},
@end iftex
@ifnottex
@xref{VC Dired Mode},
@end ifnottex
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
exit the buffer and commit the change.
@ -1645,7 +1703,13 @@ Both forms display the output in a special buffer in another window.
You can specify a checked-in version by its number; an empty input
specifies the current contents of the work file (which may be different
from all the checked-in versions). You can also specify a snapshot name
(@pxref{Snapshots,,,emacs-xtra, Specialized Emacs Features}) instead of one or both version numbers.
@iftex
(@pxref{Snapshots,,,emacs-xtra, Specialized Emacs Features})
@end iftex
@ifnottex
(@pxref{Snapshots})
@end ifnottex
instead of one or both version numbers.
If you supply a directory name instead of the name of a registered
file, this command compares the two specified versions of all registered
@ -1734,6 +1798,10 @@ use once a day.
* Registering:: Putting a file under version control.
* VC Status:: Viewing the VC status of files.
* VC Undo:: Canceling changes before or after check-in.
@ifnottex
* VC Dired Mode:: Listing files managed by version control.
* VC Dired Commands:: Commands to use in a VC Dired buffer.
@end ifnottex
@end menu
@node Registering
@ -1754,8 +1822,13 @@ to use for it. If the file's directory already contains files
registered in a version control system, Emacs uses that system. If
there is more than one system in use for a directory, Emacs uses the
one that appears first in @code{vc-handled-backends}
(@pxref{Customizing VC,,,emacs-xtra, Specialized Emacs Features}). On
the other hand, if there are no files already registered, Emacs uses
@iftex
(@pxref{Customizing VC,,,emacs-xtra, Specialized Emacs Features}).
@end iftex
@ifnottex
(@pxref{Customizing VC}).
@end ifnottex
On the other hand, if there are no files already registered, Emacs uses
the first system from @code{vc-handled-backends} that could register
the file (for example, you cannot register a file under CVS if its
directory is not already part of a CVS tree); with the default value
@ -1815,16 +1888,27 @@ count.
@item P
Move to the log of the previous file, when the logs of multiple files
are in the log buffer (@pxref{VC Dired Mode,,,emacs-xtra, Specialized
Emacs Features}). Otherwise, just move to the beginning of the log. A
numeric prefix argument is a repeat count, so @kbd{C-u 10 P} would
move backward 10 files.
are in the log buffer
@iftex
(@pxref{VC Dired Mode,,,emacs-xtra, Specialized Emacs Features}).
@end iftex
@ifnottex
(@pxref{VC Dired Mode}).
@end ifnottex
Otherwise, just move to the beginning of the log. A numeric prefix
argument is a repeat count, so @kbd{C-u 10 P} would move backward 10
files.
@item N
Move to the log of the next file, when the logs of multiple files are
in the log buffer (@pxref{VC Dired Mode,,,emacs-xtra, Specialized
Emacs Features}). It also takes a numeric prefix argument as a repeat
count.
in the log buffer
@iftex
(@pxref{VC Dired Mode,,,emacs-xtra, Specialized Emacs Features}).
@end iftex
@ifnottex
(@pxref{VC Dired Mode}).
@end ifnottex
It also takes a numeric prefix argument as a repeat count.
@item f
Visit the revision indicated at the current line, like typing @kbd{C-x
@ -1878,11 +1962,16 @@ change and then discover a trivial error in it; you can cancel the
erroneous check-in, fix the error, and check the file in again.
When @kbd{C-x v c} does not revert the buffer, it unexpands all
version control headers in the buffer instead (@pxref{Version
Headers,,,emacs-xtra, Specialized Emacs Features}). This is because
the buffer no longer corresponds to any existing version. If you
check it in again, the check-in process will expand the headers
properly for the new version number.
version control headers in the buffer instead
@iftex
(@pxref{Version Headers,,,emacs-xtra, Specialized Emacs Features}).
@end iftex
@ifnottex
(@pxref{Version Headers}).
@end ifnottex
This is because the buffer no longer corresponds to any existing
version. If you check it in again, the check-in process will expand
the headers properly for the new version number.
However, it is impossible to unexpand the RCS @samp{@w{$}Log$} header
automatically. If you use that header feature, you have to unexpand it
@ -1894,6 +1983,13 @@ confirmation with @kbd{yes}. Note also that this command is disabled
under CVS, because canceling versions is very dangerous and discouraged
with CVS.
@ifnottex
@c vc1-xtra.texi needs extra level of lowering.
@lowersections
@include vc1-xtra.texi
@raisesections
@end ifnottex
@node Branches
@subsection Multiple Branches of a File
@cindex branch (version control)
@ -2072,10 +2168,15 @@ own choice of selected versions, but all share the same common RCS
records.
This technique works reliably and automatically, provided that the
source files contain RCS version headers (@pxref{Version
Headers,,,emacs-xtra, Specialized Emacs Features}). The headers enable
Emacs to be sure, at all times, which version number is present in the
work file.
source files contain RCS version headers
@iftex
(@pxref{Version Headers,,,emacs-xtra, Specialized Emacs Features}).
@end iftex
@ifnottex
(@pxref{Version Headers}).
@end ifnottex
The headers enable Emacs to be sure, at all times, which version
number is present in the work file.
If the files do not have version headers, you must instead tell Emacs
explicitly in each session which branch you are working on. To do this,
@ -2083,6 +2184,10 @@ first find the file, then type @kbd{C-u C-x v v} and specify the correct
branch number. This ensures that Emacs knows which branch it is using
during this particular editing session.
@ifnottex
@include vc2-xtra.texi
@end ifnottex
@node Directories
@section File Directories
@ -2205,8 +2310,14 @@ typically the result of a failed merge from a version control system
mode provides commands to resolve conflicts by selecting specific
changes.
@inforef{Emerge,, emacs-xtra} for the Emerge facility, which
provides a powerful interface for merging files.
@iftex
@xref{Emerge,,, emacs-xtra, Specialized Emacs Features},
@end iftex
@ifnottex
@xref{Emerge},
@end ifnottex
for the Emerge facility, which provides a powerful interface for
merging files.
@node Diff Mode
@section Diff Mode
@ -2214,10 +2325,10 @@ provides a powerful interface for merging files.
@findex diff-mode
@cindex patches, editing
The @samp{*diff*} buffer uses Diff mode (@pxref{Diff Mode}). Diff
mode is also useful for editing patches and comparisons produced by
the @command{diff} program. To select Diff mode manually, type
@kbd{M-x diff-mode}.
Diff mode is used for the output of @kbd{M-x diff}; it is also
useful for editing patches and comparisons produced by the
@command{diff} program. To select Diff mode manually, type @kbd{M-x
diff-mode}.
One general feature of Diff mode is that manual edits to the patch
automatically correct line numbers, including those in the hunk
@ -2397,7 +2508,7 @@ compiling it.
@findex auto-compression-mode
@vindex auto-compression-mode
To disable this feature, type the command @kbd{M-x
auto-compression-mode}. You can disenable it permanently by
auto-compression-mode}. You can disable it permanently by
customizing the variable @code{auto-compression-mode}.
@node File Archives

548
man/fortran-xtra.texi Normal file
View file

@ -0,0 +1,548 @@
@c This is part of the Emacs manual.
@c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@c
@c This file is included either in emacs-xtra.texi (when producing the
@c printed version) or in the main Emacs manual (for the on-line version).
@node Fortran
@section Fortran Mode
@cindex Fortran mode
@cindex mode, Fortran
Fortran mode provides special motion commands for Fortran statements
and subprograms, and indentation commands that understand Fortran
conventions of nesting, line numbers and continuation statements.
Fortran mode has support for Auto Fill mode that breaks long lines into
proper Fortran continuation lines.
Special commands for comments are provided because Fortran comments
are unlike those of other languages. Built-in abbrevs optionally save
typing when you insert Fortran keywords.
Use @kbd{M-x fortran-mode} to switch to this major mode. This
command runs the hook @code{fortran-mode-hook}.
@iftex
@xref{Hooks,,, emacs, the Emacs Manual}.
@end iftex
@ifnottex
@xref{Hooks}.
@end ifnottex
@cindex Fortran77 and Fortran90
@findex f90-mode
@findex fortran-mode
Fortran mode is meant for editing Fortran77 ``fixed format'' (and also
``tab format'') source code. For editing the modern Fortran90 or
Fortran95 ``free format'' source code, use F90 mode (@code{f90-mode}).
Emacs normally uses Fortran mode for files with extension @samp{.f},
@samp{.F} or @samp{.for}, and F90 mode for the extension @samp{.f90} and
@samp{.f95}. GNU Fortran supports both kinds of format.
@menu
* Motion: Fortran Motion. Moving point by statements or subprograms.
* Indent: Fortran Indent. Indentation commands for Fortran.
* Comments: Fortran Comments. Inserting and aligning comments.
* Autofill: Fortran Autofill. Auto fill support for Fortran.
* Columns: Fortran Columns. Measuring columns for valid Fortran.
* Abbrev: Fortran Abbrev. Built-in abbrevs for Fortran keywords.
@end menu
@node Fortran Motion
@subsection Motion Commands
In addition to the normal commands for moving by and operating on
``defuns'' (Fortran subprograms---functions and subroutines, as well as
modules for F90 mode), Fortran mode provides special commands to move by
statements and other program units.
@table @kbd
@kindex C-c C-n @r{(Fortran mode)}
@findex fortran-next-statement
@findex f90-next-statement
@item C-c C-n
Move to the beginning of the next statement
(@code{fortran-next-statement}/@code{f90-next-statement}).
@kindex C-c C-p @r{(Fortran mode)}
@findex fortran-previous-statement
@findex f90-previous-statement
@item C-c C-p
Move to the beginning of the previous statement
(@code{fortran-previous-statement}/@code{f90-previous-statement}).
If there is no previous statement (i.e. if called from the first
statement in the buffer), move to the start of the buffer.
@kindex C-c C-e @r{(F90 mode)}
@findex f90-next-block
@item C-c C-e
Move point forward to the start of the next code block
(@code{f90-next-block}). A code block is a subroutine,
@code{if}--@code{endif} statement, and so forth. This command exists
for F90 mode only, not Fortran mode. With a numeric argument, this
moves forward that many blocks.
@kindex C-c C-a @r{(F90 mode)}
@findex f90-previous-block
@item C-c C-a
Move point backward to the previous code block
(@code{f90-previous-block}). This is like @code{f90-next-block}, but
moves backwards.
@kindex C-M-n @r{(Fortran mode)}
@findex fortran-end-of-block
@findex f90-end-of-block
@item C-M-n
Move to the end of the current code block
(@code{fortran-end-of-block}/@code{f90-end-of-block}). With a numeric
argument, move forward that number of blocks. The mark is set before
moving point. The F90 mode version of this command checks for
consistency of block types and labels (if present), but it does not
check the outermost block since that may be incomplete.
@kindex C-M-p @r{(Fortran mode)}
@findex fortran-beginning-of-block
@findex f90-beginning-of-block
@item C-M-p
Move to the start of the current code block
(@code{fortran-beginning-of-block}/@code{f90-beginning-of-block}). This
is like @code{fortran-end-of-block}, but moves backwards.
@end table
@node Fortran Indent
@subsection Fortran Indentation
Special commands and features are needed for indenting Fortran code in
order to make sure various syntactic entities (line numbers, comment line
indicators and continuation line flags) appear in the columns that are
required for standard, fixed (or tab) format Fortran.
@menu
* Commands: ForIndent Commands. Commands for indenting and filling Fortran.
* Contline: ForIndent Cont. How continuation lines indent.
* Numbers: ForIndent Num. How line numbers auto-indent.
* Conv: ForIndent Conv. Conventions you must obey to avoid trouble.
* Vars: ForIndent Vars. Variables controlling Fortran indent style.
@end menu
@node ForIndent Commands
@subsubsection Fortran Indentation and Filling Commands
@table @kbd
@item C-M-j
Break the current line at point and set up a continuation line
(@code{fortran-split-line}).
@item M-^
Join this line to the previous line (@code{fortran-join-line}).
@item C-M-q
Indent all the lines of the subprogram point is in
(@code{fortran-indent-subprogram}).
@item M-q
Fill a comment block or statement.
@end table
@kindex C-M-q @r{(Fortran mode)}
@findex fortran-indent-subprogram
The key @kbd{C-M-q} runs @code{fortran-indent-subprogram}, a command
to reindent all the lines of the Fortran subprogram (function or
subroutine) containing point.
@kindex C-M-j @r{(Fortran mode)}
@findex fortran-split-line
The key @kbd{C-M-j} runs @code{fortran-split-line}, which splits
a line in the appropriate fashion for Fortran. In a non-comment line,
the second half becomes a continuation line and is indented
accordingly. In a comment line, both halves become separate comment
lines.
@kindex M-^ @r{(Fortran mode)}
@kindex C-c C-d @r{(Fortran mode)}
@findex fortran-join-line
@kbd{M-^} or @kbd{C-c C-d} runs the command @code{fortran-join-line},
which joins a continuation line back to the previous line, roughly as
the inverse of @code{fortran-split-line}. The point must be on a
continuation line when this command is invoked.
@kindex M-q @r{(Fortran mode)}
@kbd{M-q} in Fortran mode fills the comment block or statement that
point is in. This removes any excess statement continuations.
@node ForIndent Cont
@subsubsection Continuation Lines
@cindex Fortran continuation lines
@vindex fortran-continuation-string
Most Fortran77 compilers allow two ways of writing continuation lines.
If the first non-space character on a line is in column 5, then that
line is a continuation of the previous line. We call this @dfn{fixed
format}. (In GNU Emacs we always count columns from 0; but note that
the Fortran standard counts from 1.) The variable
@code{fortran-continuation-string} specifies what character to put in
column 5. A line that starts with a tab character followed by any digit
except @samp{0} is also a continuation line. We call this style of
continuation @dfn{tab format}. (Fortran90 introduced ``free format'',
with another style of continuation lines).
@vindex indent-tabs-mode @r{(Fortran mode)}
@vindex fortran-analyze-depth
@vindex fortran-tab-mode-default
Fortran mode can use either style of continuation line. When you
enter Fortran mode, it tries to deduce the proper continuation style
automatically from the buffer contents. It does this by scanning up to
@code{fortran-analyze-depth} (default 100) lines from the start of the
buffer. The first line that begins with either a tab character or six
spaces determines the choice. If the scan fails (for example, if the
buffer is new and therefore empty), the value of
@code{fortran-tab-mode-default} (@code{nil} for fixed format, and
non-@code{nil} for tab format) is used. @samp{/t} in the mode line
indicates tab format is selected. Fortran mode sets the value of
@code{indent-tabs-mode} accordingly.
If the text on a line starts with the Fortran continuation marker
@samp{$}, or if it begins with any non-whitespace character in column
5, Fortran mode treats it as a continuation line. When you indent a
continuation line with @key{TAB}, it converts the line to the current
continuation style. When you split a Fortran statement with
@kbd{C-M-j}, the continuation marker on the newline is created according
to the continuation style.
The setting of continuation style affects several other aspects of
editing in Fortran mode. In fixed format mode, the minimum column
number for the body of a statement is 6. Lines inside of Fortran
blocks that are indented to larger column numbers always use only the
space character for whitespace. In tab format mode, the minimum
column number for the statement body is 8, and the whitespace before
column 8 must always consist of one tab character.
@node ForIndent Num
@subsubsection Line Numbers
If a number is the first non-whitespace in the line, Fortran
indentation assumes it is a line number and moves it to columns 0
through 4. (Columns always count from 0 in GNU Emacs.)
@vindex fortran-line-number-indent
Line numbers of four digits or less are normally indented one space.
The variable @code{fortran-line-number-indent} controls this; it
specifies the maximum indentation a line number can have. The default
value of the variable is 1. Fortran mode tries to prevent line number
digits passing column 4, reducing the indentation below the specified
maximum if necessary. If @code{fortran-line-number-indent} has the
value 5, line numbers are right-justified to end in column 4.
@vindex fortran-electric-line-number
Simply inserting a line number is enough to indent it according to
these rules. As each digit is inserted, the indentation is recomputed.
To turn off this feature, set the variable
@code{fortran-electric-line-number} to @code{nil}.
@node ForIndent Conv
@subsubsection Syntactic Conventions
Fortran mode assumes that you follow certain conventions that simplify
the task of understanding a Fortran program well enough to indent it
properly:
@itemize @bullet
@item
Two nested @samp{do} loops never share a @samp{continue} statement.
@item
Fortran keywords such as @samp{if}, @samp{else}, @samp{then}, @samp{do}
and others are written without embedded whitespace or line breaks.
Fortran compilers generally ignore whitespace outside of string
constants, but Fortran mode does not recognize these keywords if they
are not contiguous. Constructs such as @samp{else if} or @samp{end do}
are acceptable, but the second word should be on the same line as the
first and not on a continuation line.
@end itemize
@noindent
If you fail to follow these conventions, the indentation commands may
indent some lines unaesthetically. However, a correct Fortran program
retains its meaning when reindented even if the conventions are not
followed.
@node ForIndent Vars
@subsubsection Variables for Fortran Indentation
@vindex fortran-do-indent
@vindex fortran-if-indent
@vindex fortran-structure-indent
@vindex fortran-continuation-indent
@vindex fortran-check-all-num@dots{}
@vindex fortran-minimum-statement-indent@dots{}
Several additional variables control how Fortran indentation works:
@table @code
@item fortran-do-indent
Extra indentation within each level of @samp{do} statement (default 3).
@item fortran-if-indent
Extra indentation within each level of @samp{if}, @samp{select case}, or
@samp{where} statements (default 3).
@item fortran-structure-indent
Extra indentation within each level of @samp{structure}, @samp{union},
@samp{map}, or @samp{interface} statements (default 3).
@item fortran-continuation-indent
Extra indentation for bodies of continuation lines (default 5).
@item fortran-check-all-num-for-matching-do
In Fortran77, a numbered @samp{do} statement is ended by any statement
with a matching line number. It is common (but not compulsory) to use a
@samp{continue} statement for this purpose. If this variable has a
non-@code{nil} value, indenting any numbered statement must check for a
@samp{do} that ends there. If you always end @samp{do} statements with
a @samp{continue} line (or if you use the more modern @samp{enddo}),
then you can speed up indentation by setting this variable to
@code{nil}. The default is @code{nil}.
@item fortran-blink-matching-if
If this is @code{t}, indenting an @samp{endif} (or @samp{enddo}
statement moves the cursor momentarily to the matching @samp{if} (or
@samp{do}) statement to show where it is. The default is @code{nil}.
@item fortran-minimum-statement-indent-fixed
Minimum indentation for Fortran statements when using fixed format
continuation line style. Statement bodies are never indented less than
this much. The default is 6.
@item fortran-minimum-statement-indent-tab
Minimum indentation for Fortran statements for tab format continuation line
style. Statement bodies are never indented less than this much. The
default is 8.
@end table
The variables controlling the indentation of comments are described in
the following section.
@node Fortran Comments
@subsection Fortran Comments
The usual Emacs comment commands assume that a comment can follow a
line of code. In Fortran77, the standard comment syntax requires an
entire line to be just a comment. Therefore, Fortran mode replaces the
standard Emacs comment commands and defines some new variables.
@vindex fortran-comment-line-start
Fortran mode can also handle the Fortran90 comment syntax where comments
start with @samp{!} and can follow other text. Because only some Fortran77
compilers accept this syntax, Fortran mode will not insert such comments
unless you have said in advance to do so. To do this, set the variable
@code{fortran-comment-line-start} to @samp{"!"}.
@table @kbd
@item M-;
Align comment or insert new comment (@code{fortran-indent-comment}).
@item C-x ;
Applies to nonstandard @samp{!} comments only.
@item C-c ;
Turn all lines of the region into comments, or (with argument) turn them back
into real code (@code{fortran-comment-region}).
@end table
@findex fortran-indent-comment
@kbd{M-;} in Fortran mode is redefined as the command
@code{fortran-indent-comment}. Like the usual @kbd{M-;} command, this
recognizes any kind of existing comment and aligns its text appropriately;
if there is no existing comment, a comment is inserted and aligned. But
inserting and aligning comments are not the same in Fortran mode as in
other modes.
When a new comment must be inserted, if the current line is blank, a
full-line comment is inserted. On a non-blank line, a nonstandard @samp{!}
comment is inserted if you have said you want to use them. Otherwise a
full-line comment is inserted on a new line before the current line.
Nonstandard @samp{!} comments are aligned like comments in other
languages, but full-line comments are different. In a standard full-line
comment, the comment delimiter itself must always appear in column zero.
What can be aligned is the text within the comment. You can choose from
three styles of alignment by setting the variable
@code{fortran-comment-indent-style} to one of these values:
@vindex fortran-comment-indent-style
@vindex fortran-comment-line-extra-indent
@table @code
@item fixed
Align the text at a fixed column, which is the sum of
@code{fortran-comment-line-extra-indent} and the minimum statement
indentation. This is the default.
The minimum statement indentation is
@code{fortran-minimum-statement-indent-fixed} for fixed format
continuation line style and @code{fortran-minimum-statement-indent-tab}
for tab format style.
@item relative
Align the text as if it were a line of code, but with an additional
@code{fortran-comment-line-extra-indent} columns of indentation.
@item nil
Don't move text in full-line comments automatically.
@end table
@vindex fortran-comment-indent-char
In addition, you can specify the character to be used to indent within
full-line comments by setting the variable
@code{fortran-comment-indent-char} to the single-character string you want
to use.
@vindex fortran-directive-re
Compiler directive lines, or preprocessor lines, have much the same
appearance as comment lines. It is important, though, that such lines
never be indented at all, no matter what the value of
@code{fortran-comment-indent-style}. The variable
@code{fortran-directive-re} is a regular expression that specifies which
lines are directives. Matching lines are never indented, and receive
distinctive font-locking.
The normal Emacs comment command @kbd{C-x ;} has not been redefined. If
you use @samp{!} comments, this command can be used with them. Otherwise
it is useless in Fortran mode.
@kindex C-c ; @r{(Fortran mode)}
@findex fortran-comment-region
@vindex fortran-comment-region
The command @kbd{C-c ;} (@code{fortran-comment-region}) turns all the
lines of the region into comments by inserting the string @samp{C$$$} at
the front of each one. With a numeric argument, it turns the region
back into live code by deleting @samp{C$$$} from the front of each line
in it. The string used for these comments can be controlled by setting
the variable @code{fortran-comment-region}. Note that here we have an
example of a command and a variable with the same name; these two uses
of the name never conflict because in Lisp and in Emacs it is always
clear from the context which one is meant.
@node Fortran Autofill
@subsection Auto Fill in Fortran Mode
Fortran mode has specialized support for Auto Fill mode, which is a
minor mode that automatically splits statements as you insert them
when they become too wide. Splitting a statement involves making
continuation lines using @code{fortran-continuation-string}
(@pxref{ForIndent Cont}). This splitting happens when you type
@key{SPC}, @key{RET}, or @key{TAB}, and also in the Fortran
indentation commands. You activate Auto Fill in Fortran mode in the
normal way.
@iftex
@xref{Auto Fill,,, emacs, the Emacs Manual}.
@end iftex
@ifnottex
@xref{Auto Fill}.
@end ifnottex
@vindex fortran-break-before-delimiters
Auto Fill breaks lines at spaces or delimiters when the lines get
longer than the desired width (the value of @code{fill-column}). The
delimiters (besides whitespace) that Auto Fill can break at are
@samp{+}, @samp{-}, @samp{/}, @samp{*}, @samp{=}, @samp{<}, @samp{>},
and @samp{,}. The line break comes after the delimiter if the
variable @code{fortran-break-before-delimiters} is @code{nil}.
Otherwise (and by default), the break comes before the delimiter.
To enable Auto Fill in all Fortran buffers, add
@code{turn-on-auto-fill} to @code{fortran-mode-hook}.
@iftex
@xref{Hooks,,, emacs, the Emacs Manual}.
@end iftex
@ifnottex
@xref{Hooks}.
@end ifnottex
@node Fortran Columns
@subsection Checking Columns in Fortran
@table @kbd
@item C-c C-r
Display a ``column ruler'' momentarily above the current line
(@code{fortran-column-ruler}).
@item C-c C-w
Split the current window horizontally temporarily so that it is 72
columns wide (@code{fortran-window-create-momentarily}). This may
help you avoid making lines longer than the 72-character limit that
some Fortran compilers impose.
@item C-u C-c C-w
Split the current window horizontally so that it is 72 columns wide
(@code{fortran-window-create}). You can then continue editing.
@item M-x fortran-strip-sequence-nos
Delete all text in column 72 and beyond.
@end table
@kindex C-c C-r @r{(Fortran mode)}
@findex fortran-column-ruler
The command @kbd{C-c C-r} (@code{fortran-column-ruler}) shows a column
ruler momentarily above the current line. The comment ruler is two lines
of text that show you the locations of columns with special significance in
Fortran programs. Square brackets show the limits of the columns for line
numbers, and curly brackets show the limits of the columns for the
statement body. Column numbers appear above them.
Note that the column numbers count from zero, as always in GNU Emacs.
As a result, the numbers may be one less than those you are familiar
with; but the positions they indicate in the line are standard for
Fortran.
@vindex fortran-column-ruler-fixed
@vindex fortran-column-ruler-tabs
The text used to display the column ruler depends on the value of the
variable @code{indent-tabs-mode}. If @code{indent-tabs-mode} is
@code{nil}, then the value of the variable
@code{fortran-column-ruler-fixed} is used as the column ruler.
Otherwise, the value of the variable @code{fortran-column-ruler-tab} is
displayed. By changing these variables, you can change the column ruler
display.
@kindex C-c C-w @r{(Fortran mode)}
@findex fortran-window-create-momentarily
@kbd{C-c C-w} (@code{fortran-window-create-momentarily}) temporarily
splits the current window horizontally, making a window 72 columns
wide, so you can see any lines that are too long. Type a space to
restore the normal width.
@kindex C-u C-c C-w @r{(Fortran mode)}
@findex fortran-window-create
You can also split the window horizontally and continue editing with
the split in place. To do this, use @kbd{C-u C-c C-w} (@code{M-x
fortran-window-create}). By editing in this window you can
immediately see when you make a line too wide to be correct Fortran.
@findex fortran-strip-sequence-nos
The command @kbd{M-x fortran-strip-sequence-nos} deletes all text in
column 72 and beyond, on all lines in the current buffer. This is the
easiest way to get rid of old sequence numbers.
@node Fortran Abbrev
@subsection Fortran Keyword Abbrevs
Fortran mode provides many built-in abbrevs for common keywords and
declarations. These are the same sort of abbrev that you can define
yourself. To use them, you must turn on Abbrev mode.
@iftex
@xref{Abbrevs,,, emacs, the Emacs Manual}.
@end iftex
@ifnottex
@xref{Abbrevs}.
@end ifnottex
The built-in abbrevs are unusual in one way: they all start with a
semicolon. You cannot normally use semicolon in an abbrev, but Fortran
mode makes this possible by changing the syntax of semicolon to ``word
constituent.''
For example, one built-in Fortran abbrev is @samp{;c} for
@samp{continue}. If you insert @samp{;c} and then insert a punctuation
character such as a space or a newline, the @samp{;c} expands automatically
to @samp{continue}, provided Abbrev mode is enabled.@refill
Type @samp{;?} or @samp{;C-h} to display a list of all the built-in
Fortran abbrevs and what they stand for.
@ignore
arch-tag: 23ed7c36-1517-4646-9235-2d5ade5f06f6
@end ignore

View file

@ -27,7 +27,13 @@ it terminates all the frames. To delete just one frame, use @kbd{C-x 5
Emacs compiled for MS-DOS emulates some windowing functionality,
so that you can use many of the features described in this chapter.
@iftex
@xref{MS-DOS Mouse,,,emacs-xtra,Specialized Emacs Features}.
@end iftex
@ifnottex
@xref{MS-DOS Mouse}.
@end ifnottex
@menu
* Mouse Commands:: Moving, cutting, and pasting, with the mouse.
@ -512,7 +518,7 @@ Here's a similar example for specifying a foreground color:
Iconify the selected Emacs frame (@code{iconify-or-deiconify-frame}).
The normal meaning of @kbd{C-z}, to suspend Emacs, is not useful under
a graphical display that allows multiple applications to operate
simultaneously in their own windies, so Emacs gives @kbd{C-z} a
simultaneously in their own windows, so Emacs gives @kbd{C-z} a
different binding in that case.
If you type this command on an Emacs frame's icon, it deiconifies the frame.

View file

@ -2,7 +2,7 @@
@c Copyright (C) 1985, 1986, 1987, 1993, 1995, 2002, 2003, 2004,
@c 2005, 2006 Free Software Foundation, Inc.
@ifclear justgnu
@node Manifesto,, Emacs and Microsoft Windows, Top
@node Manifesto,, Microsoft Windows, Top
@unnumbered The GNU Manifesto
@end ifclear
@ifset justgnu

View file

@ -401,7 +401,7 @@ The @kbd{C-h p} command lets you search the standard Emacs Lisp
libraries by topic keywords. Here is a partial list of keywords you can
use:
@multitable {emulations} {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}
@multitable {convenience} {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}
@item abbrev@tab abbreviation handling, typing shortcuts, macros.
@item bib@tab code related to the @code{bib} bibliography processor.
@item c@tab support for the C language and related languages.

View file

@ -2,7 +2,7 @@
@c Copyright (C) 2000, 2001, 2002, 2003, 2004,
@c 2005, 2006 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Mac OS, Emacs and Microsoft Windows, Antinews, Top
@node Mac OS, Microsoft Windows, Antinews, Top
@appendix Emacs and Mac OS
@cindex Mac OS
@cindex Macintosh
@ -67,7 +67,8 @@ Classic) or the International system preference pane (Mac OS X) and
supports international and alternative keyboard layouts (e.g., Dvorak)
if its script is either Roman, Japanese, Traditional Chinese, Korean,
Cyrillic, Simplified Chinese, or Central European. Keyboard layouts
based on Unicode may not work properly. Selecting one of the layouts
based on Unicode may not work properly. (Try drag-and-drop if input
from the Character Palette does not work.) Selecting one of the layouts
from the keyboard layout pull-down menu will affect how the keys typed
on the keyboard are interpreted.
@ -318,7 +319,7 @@ charset @code{iso10646-1}. For example 12-point Monaco can be specified
by the name
@samp{-apple-monaco-medium-r-normal--12-*-*-*-*-*-iso10646-1}. Note
that it must be specified in a format containing 14 @samp{-}s (i.e., not
by @samp{-apple-monaco-medium-r-normal-12-*-iso10646-1}) because every
by @samp{-apple-monaco-medium-r-normal--12-*-iso10646-1}) because every
@acronym{ATSUI}-compatible font is a scalable one.
QuickDraw Text fonts have maker name @code{apple} and various charset

View file

@ -14,6 +14,9 @@ also particularly useful for this purpose.
* Format of ChangeLog:: What the change log file looks like.
* Tags:: Go direct to any function in your program in one
command. Tags remembers which file it is in.
@ifnottex
* Emerge:: A convenient way of merging two versions of a program.
@end ifnottex
@end menu
@node Change Log
@ -845,6 +848,10 @@ details.
You can also use the collection of tag names to complete a symbol
name in the buffer. @xref{Symbol Completion}.
@ifnottex
@include emerge-xtra.texi
@end ifnottex
@ignore
arch-tag: b9d83dfb-82ea-4ff6-bab5-05a3617091fb
@end ignore

View file

@ -30,7 +30,7 @@ infodir = $(srcdir)/../info
# The makeinfo program is part of the Texinfo distribution.
MAKEINFO = makeinfo --force
MULTI_INSTALL_INFO = $(srcdir)\..\nt\multi-install-info.bat
INFO_TARGETS = $(infodir)/emacs $(infodir)/emacs-xtra $(infodir)/ccmode \
INFO_TARGETS = $(infodir)/emacs $(infodir)/ccmode \
$(infodir)/cl $(infodir)/dired-x $(infodir)/ediff \
$(infodir)/forms $(infodir)/gnus $(infodir)/message \
$(infodir)/sieve $(infodir)/pgg $(infodir)/emacs-mime \
@ -62,6 +62,18 @@ TEXI2DVI = texi2dvi
ENVADD = $(srcdir)\..\nt\envadd.bat "TEXINPUTS=$(srcdir);$(TEXINPUTS)" \
"MAKEINFO=$(MAKEINFO) -I$(srcdir)" /C
EMACS_XTRA=\
$(srcdir)/arevert-xtra.texi \
$(srcdir)/cal-xtra.texi \
$(srcdir)/dired-xtra.texi \
$(srcdir)/picture-xtra.texi \
$(srcdir)/emerge-xtra.texi \
$(srcdir)/vc-xtra.texi \
$(srcdir)/vc1-xtra.texi \
$(srcdir)/vc2-xtra.texi \
$(srcdir)/fortran-xtra.texi \
$(srcdir)/msdog-xtra.texi
EMACSSOURCES= \
$(srcdir)/emacs.texi \
$(srcdir)/doclicense.texi \
@ -105,7 +117,8 @@ EMACSSOURCES= \
$(srcdir)/gnu.texi \
$(srcdir)/glossary.texi \
$(srcdir)/ack.texi \
$(srcdir)/kmacro.texi
$(srcdir)/kmacro.texi \
$(EMACS_XTRA)
info: $(INFO_TARGETS)
@ -134,7 +147,7 @@ info.dvi: $(INFOSOURCES)
$(infodir)/emacs: $(EMACSSOURCES)
$(MAKEINFO) emacs.texi
emacs.dvi: $(EMACSSOURCES)
emacs.dvi: $(EMACSSOURCES) $(srcdir)/xresmini.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/emacs.texi
# This target is here so you could easily get the list of the *.texi
@ -309,10 +322,7 @@ $(infodir)/smtpmail: smtpmail.texi
smtpmail.dvi: smtpmail.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/smtpmail.texi
$(infodir)/emacs-xtra: emacs-xtra.texi
$(MAKEINFO) emacs-xtra.texi
emacs-xtra.dvi: emacs-xtra.texi
emacs-xtra.dvi: emacs-xtra.texi $(EMACS_XTRA)
$(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-xtra.texi
$(infodir)/org: org.texi

View file

@ -8,15 +8,15 @@
@c %**end of header
@c Version of the software and manual.
@set VERSION 7.94
@set VERSION 8.0
@c Edition of the manual. It is either empty for the first edition or
@c has the form ", nth Edition" (without the quotes).
@set EDITION , 2nd Edition
@set UPDATED 2006-04-24
@set UPDATE-MONTH April, 2006
@set EDITION
@set UPDATED 2006-05-06
@set UPDATE-MONTH May, 2006
@c Other variables.
@set MH-BOOK-HOME http://www.ics.uci.edu/~mh/book/mh
@set MH-BOOK-HOME http://rand-mh.sourceforge.net/book/mh
@set MH-E-HOME http://mh-e.sourceforge.net/
@c Copyright
@ -564,12 +564,12 @@ has packages for both of these.
If you've never run MH before, you need to run @command{install-mh}
from the shell before you continue. This sets up your personal MH
environment@footnote{See the section
@uref{@value{MH-BOOK-HOME}/../overall/setup.htm, Setting Up MH} in the
@uref{@value{MH-BOOK-HOME}/../overall/setup.html, Setting Up MH} in the
MH book.}. If you don't, you'll be greeted with the error message:
@samp{Install MH and run install-mh before running MH-E}. This is all
you need to know about MH to use MH-E, but the more you know about MH,
the more you can leverage its power. See the
@uref{@value{MH-BOOK-HOME}, MH book} to learn more about MH.
@uref{@value{MH-BOOK-HOME}/../, MH book} to learn more about MH.
@cindex @samp{Path:} MH profile component
@cindex MH profile
@ -763,10 +763,10 @@ message. Type @kbd{C-c C-c} now. That's all there is to it!
To read the mail you've just sent yourself, enter @kbd{M-x mh-rmail}.
This incorporates the new mail and puts the output from
@command{inc}@footnote{See the section
@uref{@value{MH-BOOK-HOME}/reapre.htm, Reading Mail: inc show next
@uref{@value{MH-BOOK-HOME}/reapre.html, Reading Mail: inc show next
prev} in the MH book.} (called @dfn{scan lines} after the MH program
@command{scan}@footnote{See the section
@uref{@value{MH-BOOK-HOME}/faswsprs.htm, Find and Specify with scan
@uref{@value{MH-BOOK-HOME}/faswsprs.html, Find and Specify with scan
pick Ranges Sequences} in the MH book.} which prints a one-line
summary of each message) into a buffer called @samp{+inbox} whose
major mode is MH-Folder.
@ -1088,7 +1088,7 @@ i} to read this manual via Info. The online help is quite good; try
running @kbd{C-h C-h}. This brings up a list of available help topics,
one of which displays the documentation for a given key (like @kbd{C-h
k C-n}). Another useful help feature is to view the manual section
that describes a given key (such as @kbd{C-h C-k i}). In addition,
that describes a given key (such as @kbd{C-h K i}). In addition,
review @ref{Conventions}, if any of the GNU Emacs conventions are
strange to you.
@ -1158,7 +1158,7 @@ mh-execute-commands @key{RET}}. If you write your own functions,
please do not prefix your symbols (variables and functions) with
@samp{mh-}. This prefix is reserved for the MH-E package. To avoid
conflicts with existing MH-E symbols, use a prefix like @samp{my-} or
your initials.
your initials. (Unless, of course, your initials happen to be @emph{mh}!)
@menu
* Options::
@ -1252,7 +1252,7 @@ Indicates all messages in the range <num1> to <num2>, inclusive. The
range must be nonempty.
@c -------------------------
@item <num>:N
@item <num>:+N
@itemx <num>:+N
@itemx <num>:-N
Up to N messages beginning with (or ending with) message num. Num may
be any of the predefined symbols: first, prev, cur, next or last.
@ -1459,8 +1459,8 @@ is an absolute pathname, the file is assumed to be in the
@code{mh-progs} directory (@pxref{Getting Started}). You may also link
a file to @command{inc} that uses a different format (see
@samp{mh-profile}(5), and sections
@uref{@value{MH-BOOK-HOME}/reapre.htm, Reading Mail: inc show next
prev} and @uref{@value{MH-BOOK-HOME}/mhstr.htm, MH Format Strings} in
@uref{@value{MH-BOOK-HOME}/reapre.html, Reading Mail: inc show next
prev} and @uref{@value{MH-BOOK-HOME}/mhstr.html, MH Format Strings} in
the MH book). You'll then need to modify several variables
appropriately (@pxref{Scan Line Formats}).
@ -2169,7 +2169,7 @@ Default mhl Format} to get the same output as you would get if you ran
@command{mhl} from the shell. If you have a format file that you want
MH-E to use, you can set this option to @samp{Specify an mhl Format
File} and enter the name of your format file (@command{mhl}(1) or
section @uref{@value{MH-BOOK-HOME}/shomes.htm#Usisho, Using mhl} in
section @uref{@value{MH-BOOK-HOME}/shomes.html#Usisho, Using mhl} in
the MH book tells you how to write one). Your format file should
specify a non-zero value for @samp{overflowoffset} to allow MH-E to
parse the header. Note that @command{mhl} is always used for printing
@ -2291,9 +2291,9 @@ MH has the ability to display @dfn{@sc{mime}} (Multipurpose Internet
Mail Extensions) messages which are simply messages with additional
@dfn{body parts} or @dfn{attachments}. You can use the MH commands
@command{show}@footnote{See the section
@uref{@value{MH-BOOK-HOME}/reapre.htm, Reading Mail: inc show next
@uref{@value{MH-BOOK-HOME}/reapre.html, Reading Mail: inc show next
prev} in the MH book.} or @command{mhshow}@footnote{See the section
@uref{@value{MH-BOOK-HOME}/usimim.htm#ReMIMa, Reading MIME Mail} in
@uref{@value{MH-BOOK-HOME}/usimim.html#ReMIMa, Reading MIME Mail} in
the MH book.} from the shell to read @sc{mime} messages@footnote{You
can call them directly from Emacs if you're running the X Window
System: type @kbd{M-! xterm -e mhshow @var{message-number}}. You can
@ -2656,7 +2656,7 @@ use @kbd{D @key{BS}} (@code{mh-page-digest-backwards}).
Another handy command is @kbd{D b} (@code{mh-burst-digest}). This
command uses the MH command @command{burst}@footnote{See the section
@uref{@value{MH-BOOK-HOME}/burdig.htm, Bursting Messages} in the MH
@uref{@value{MH-BOOK-HOME}/burdig.html, Bursting Messages} in the MH
book.} to break out each message in the digest into its own message.
Using this command, you can quickly delete unwanted messages, like
this: Once the digest is split up, toggle out of MH-Folder Show mode
@ -2867,7 +2867,7 @@ An alternative to using the @samp{ps-print} package is the command
@kbd{P l} (@code{mh-print-msg}) (the @i{l} is for @i{l}ine printer or
@i{l}pr). You can print all the messages in a range. The message is
formatted with @command{mhl}@footnote{See the section
@uref{@value{MH-BOOK-HOME}/shomes.htm#Usisho, Using mhl} in the MH
@uref{@value{MH-BOOK-HOME}/shomes.html#Usisho, Using mhl} in the MH
book.} and printed with the @command{lpr} command.
@kindex P f
@ -3471,8 +3471,8 @@ bindings, for example:
MH-E has analogies for each of the MH @command{folder} and
@command{refile} commands@footnote{See the sections
@uref{@value{MH-BOOK-HOME}/fol.htm#Youfol, Your Current Folder:
folder} and @uref{@value{MH-BOOK-HOME}/fol.htm#Movref, Moving and
@uref{@value{MH-BOOK-HOME}/fol.html#Youfol, Your Current Folder:
folder} and @uref{@value{MH-BOOK-HOME}/fol.html#Movref, Moving and
Linking Messages: refile} in the MH book.}. To refile a message in
another folder, use the command @kbd{o} (@code{mh-refile-msg})
(mnemonic: ``output''). You are prompted for the folder name
@ -3720,7 +3720,7 @@ Use this hook with care. If there is a bug in your hook which returns
The option @code{mh-sortm-args} holds extra arguments to pass on to
the command @command{sortm}@footnote{See the section
@uref{@value{MH-BOOK-HOME}/sorsor.htm, Sorting Messages: sortm} in the
@uref{@value{MH-BOOK-HOME}/sorsor.html, Sorting Messages: sortm} in the
MH book.} when a prefix argument is used with @kbd{F S}. Normally
default arguments to @command{sortm} are specified in the MH profile.
This option may be used to provide an alternate view. For example,
@ -4103,7 +4103,7 @@ recipients.
@vindex mh-reply-default-reply-to
Depending on your answer, @command{repl}@footnote{See the section
@uref{@value{MH-BOOK-HOME}/reprep.htm, Replying to Messages: repl} in
@uref{@value{MH-BOOK-HOME}/reprep.html, Replying to Messages: repl} in
the MH book.} is given a different argument to form your reply.
Specifically, a choice of @kbd{from} or none at all runs @samp{repl
-nocc all}, and a choice of @kbd{to} runs @samp{repl -cc to}. Finally,
@ -4133,7 +4133,7 @@ If you supply a prefix argument (as in @kbd{C-u r}), the message you
are replying to is inserted in your reply after having first been run
through @command{mhl} with the format file @file{mhl.reply}. See
@command{mhl}(1) or the section
@uref{@value{MH-BOOK-HOME}/shomes.htm#Usisho, Using mhl} in the MH
@uref{@value{MH-BOOK-HOME}/shomes.html#Usisho, Using mhl} in the MH
book to see how you can modify the default @file{mhl.reply} file.
@vindex mh-yank-behavior
@ -4169,7 +4169,7 @@ To forward a message, use the @kbd{f} (@code{mh-forward}) command. You
are prompted for the @samp{To:} and @samp{cc:} recipients. You are
given a draft to edit that looks like it would if you had run the MH
command @command{forw}@footnote{See the section
@uref{@value{MH-BOOK-HOME}/forfor.htm, Forwarding Messages: forw} in
@uref{@value{MH-BOOK-HOME}/forfor.html, Forwarding Messages: forw} in
the MH book.}. You can then add some text (@pxref{Editing Drafts}).
You can forward several messages by using a range (@pxref{Ranges}).
All of the messages in the range are inserted into your draft. The
@ -4243,10 +4243,10 @@ For more information on redistributing messages, see
The option @code{mh-redist-full-contents-flag} must be turned on if
@command{dist}@footnote{See the section
@uref{@value{MH-BOOK-HOME}/disdis.htm, Distributing Messages with
@uref{@value{MH-BOOK-HOME}/disdis.html, Distributing Messages with
dist} in the MH book.} requires the whole letter for redistribution,
which is the case if @command{send}@footnote{See the section
@uref{@value{MH-BOOK-HOME}/sensen.htm, Sending Some Mail: comp send}
@uref{@value{MH-BOOK-HOME}/sensen.html, Sending Some Mail: comp send}
in the MH book.} is compiled with the @sc{berk} option (which many
people abhor). If you find that MH will not allow you to redistribute
a message that has been redistributed before, turn off this option.
@ -5143,7 +5143,7 @@ although it provides a handful of commands prefixed with @kbd{C-c C-m}
to insert the directives so you don't need to remember the syntax of
them. Remember: you can always add MH-style directives by
hand@footnote{See the section
@uref{@value{MH-BOOK-HOME}/usimim.htm#SeMIMa, Sending MIME Mail} in
@uref{@value{MH-BOOK-HOME}/usimim.html#SeMIMa, Sending MIME Mail} in
the MH book.}.
@cindex MIME Meta Language (MML)
@ -5432,7 +5432,7 @@ If you're using MH-style directives, use @kbd{C-c C-e}
(@code{mh-mh-to-mime}) instead of @kbd{C-c C-m C-m}. This runs the
command @command{mhbuild} (@command{mhn}) on the message which expands
the tags@footnote{See the section
@uref{@value{MH-BOOK-HOME}/usimim.htm#SeMIMa, Sending MIME Mail} in
@uref{@value{MH-BOOK-HOME}/usimim.html#SeMIMa, Sending MIME Mail} in
the MH book.}. This action can be undone by running @kbd{C-c C-m C-u}
(@code{mh-mh-to-mime-undo}), which works by reverting to a backup
file. You are prompted to confirm this action, but you can avoid the
@ -5565,7 +5565,7 @@ The command @kbd{C-c C-w} (@code{mh-check-whom}) expands aliases so
you can check the actual address(es) in the alias. A new buffer named
@samp{*MH-E Recipients*} is created with the output of @command{whom}
(@pxref{Miscellaneous})@footnote{See the section
@uref{@value{MH-BOOK-HOME}/senove.htm#WhaPro, What now? -- and the
@uref{@value{MH-BOOK-HOME}/senove.html#WhaPro, What now? -- and the
whatnow Program} in the MH book.}.
@node Sending Message, Killing Draft, Checking Recipients, Editing Drafts
@ -5599,7 +5599,7 @@ spelling in your message before sending, add the function
@vindex mh-send-prog
In case the MH @command{send} program@footnote{See the section
@uref{@value{MH-BOOK-HOME}/sensen.htm, Sending Some Mail: comp send}
@uref{@value{MH-BOOK-HOME}/sensen.html, Sending Some Mail: comp send}
in the MH book.} is installed under a different name, use
@code{mh-send-prog} to tell MH-E the name.
@ -5780,7 +5780,7 @@ Recipients}.
MH-E loads aliases for completion and folder name hints from various
places. It uses the MH command @command{ali}@footnote{See the section
@uref{@value{MH-BOOK-HOME}/mh.htm, MH Aliases} in the MH book.} to
@uref{@value{MH-BOOK-HOME}/mh.html, MH Aliases} in the MH book.} to
read aliases from the files listed in the profile component
@samp{Aliasfile:} as well as system-wide aliases (for example,
@file{/etc/nmh/MailAliases}).
@ -6253,7 +6253,7 @@ contains these items. Dismiss the speedbar with @kbd{C-x 5 0}
@cindex customization group, @samp{mh-speedbar}
The MH-E speedbar uses the MH command @command{flists}@footnote{See
the section @uref{@value{MH-BOOK-HOME}/morseq.htm#flist, Searching for
the section @uref{@value{MH-BOOK-HOME}/morseq.html#flist, Searching for
Sequences with flist} in the MH book.} to generate the list of
folders. The @samp{mh-speedbar} customization group contains the
following option which controls how often the speedbar calls
@ -6951,7 +6951,7 @@ mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \
This search method does not require any setup.
Read @command{pick}(1) or the section
@uref{@value{MH-BOOK-HOME}/finpic.htm, Finding Messages with pick} in
@uref{@value{MH-BOOK-HOME}/finpic.html, Finding Messages with pick} in
the MH book to find out more about how to enter the criteria.
@subsection grep
@ -7180,7 +7180,7 @@ messages matching the content of the respective field in the current
message. However, you can give any of these a prefix argument to edit
the @command{pick} expression used to narrow the view@footnote{See
@command{pick}(1) or the section
@uref{@value{MH-BOOK-HOME}/finpic.htm, Finding Messages with pick} in
@uref{@value{MH-BOOK-HOME}/finpic.html, Finding Messages with pick} in
the MH book.}.
@cindex @samp{tick} sequence
@ -7212,7 +7212,7 @@ command. Give this command a prefix argument to remove all limits.
For the whole scoop on MH sequences, refer to
@samp{mh-sequence}(5)@footnote{See the section
@uref{@value{MH-BOOK-HOME}/morseq.htm, More About Sequences} in the MH
@uref{@value{MH-BOOK-HOME}/morseq.html, More About Sequences} in the MH
book.}. As you've read, several of the MH-E commands can operate on a
sequence, which is a shorthand for a range or group of messages. For
example, you might want to forward several messages to a friend or
@ -7452,7 +7452,7 @@ from the unseen sequence.
With the exceptions of @kbd{S n} and @kbd{S w}, the underlying MH
command dealing with sequences is @command{mark}@footnote{See the
section @uref{@value{MH-BOOK-HOME}/mmbwm.htm, Make Message Bookmarks
section @uref{@value{MH-BOOK-HOME}/mmbwm.html, Make Message Bookmarks
with mark} in the MH book.}.
@node Junk, Miscellaneous, Sequences, Top
@ -8050,7 +8050,7 @@ Unless this variable contains an absolute pathname, it is assumed to
be in the @code{mh-progs} directory (@pxref{Getting Started}). You may
link another program to @command{scan} (see @samp{mh-profile}(5)) to
produce a different type of listing@footnote{See the section
@uref{@value{MH-BOOK-HOME}/faswsprs.htm, Find and Specify with scan
@uref{@value{MH-BOOK-HOME}/faswsprs.html, Find and Specify with scan
pick Ranges Sequences} in the MH book.}.
@cindex regular expressions, scan line formats
@ -8087,7 +8087,7 @@ The first variable has to do with pruning out garbage.
This regular expression describes a valid scan line. This is used to
eliminate error messages that are occasionally produced by
@command{inc}@footnote{See the section
@uref{@value{MH-BOOK-HOME}/reapre.htm, Reading Mail: inc show next
@uref{@value{MH-BOOK-HOME}/reapre.html, Reading Mail: inc show next
prev} in the MH book.} or @command{scan} (default: @code{"^ *[0-9]"}).
@end vtable

View file

@ -415,6 +415,9 @@ whose initials are @samp{p} and @samp{b}.
indicate the places for completion; thus, @file{/u*/b*/f*} might
complete to @file{/usr/bin/foo}.
For remote files, partial completion enables completion of methods,
user names and host names. @xref{Remote Files}.
To enable this mode, use the command @kbd{M-x
partial-completion-mode}, or customize the variable
@code{partial-completion-mode}. This binds the partial completion

View file

@ -2383,7 +2383,7 @@ a buffer containing thumbnails, corresponding to the marked files.
(@code{tumme-display-thumbnail-original-image}) to display a sized
version of it in another window. This sizes the image to fit the
window. Use the arrow keys to move around in the buffer. For easy
browing, type @kbd{SPC} (@code{tumme-display-next-thumbnail-original})
browsing, type @kbd{SPC} (@code{tumme-display-next-thumbnail-original})
to advance and display the next image. Typing @kbd{DEL}
(@code{tumme-display-previous-thumbnail-original}) backs up to the
previous thumbnail and displays that instead.

687
man/msdog-xtra.texi Normal file
View file

@ -0,0 +1,687 @@
@c This is part of the Emacs manual.
@c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@c
@c This file is included either in emacs-xtra.texi (when producing the
@c printed version) or in the main Emacs manual (for the on-line version).
@node MS-DOS
@section Emacs and MS-DOS
@cindex MS-DOG
@cindex MS-DOS peculiarities
This section briefly describes the peculiarities of using Emacs on
the MS-DOS ``operating system'' (also known as ``MS-DOG'').
@iftex
Information about Emacs and Microsoft's current operating system
Windows (also known as ``Losedows) is in the main Emacs manual
(@pxref{Microsoft Systems,,, emacs, the Emacs Manual}).
@end iftex
@ifnottex
Information about peculiarities common to MS-DOS and Microsoft's
current operating systems Windows (also known as ``Losedows) is in
@ref{Microsoft Windows}.
@end ifnottex
If you build Emacs for MS-DOS, the binary will also run on Windows
3.X, Windows NT, Windows 9X/ME, Windows 2000/XP, or OS/2 as a DOS
application; all of this chapter applies for all of those systems, if
you use an Emacs that was built for MS-DOS.
@iftex
@xref{Text and Binary,,,emacs, the Emacs Manual}, for information
@end iftex
@ifnottex
@xref{Text and Binary}, for information
@end ifnottex
about Emacs' special handling of text files under MS-DOS (and Windows).
@menu
* Keyboard: MS-DOS Keyboard. Keyboard conventions on MS-DOS.
* Mouse: MS-DOS Mouse. Mouse conventions on MS-DOS.
* Display: MS-DOS Display. Fonts, frames and display size on MS-DOS.
* Files: MS-DOS File Names. File name conventions on MS-DOS.
* Printing: MS-DOS Printing. Printing specifics on MS-DOS.
* I18N: MS-DOS and MULE. Support for internationalization on MS-DOS.
* Processes: MS-DOS Processes. Running subprocesses on MS-DOS.
@end menu
@node MS-DOS Keyboard
@subsection Keyboard Usage on MS-DOS
@kindex DEL @r{(MS-DOS)}
@kindex BS @r{(MS-DOS)}
The key that is called @key{DEL} in Emacs (because that's how it is
designated on most workstations) is known as @key{BS} (backspace) on a
PC. That is why the PC-specific terminal initialization remaps the
@key{BS} key to act as @key{DEL}; the @key{DELETE} key is remapped to act
as @kbd{C-d} for the same reasons.
@kindex C-g @r{(MS-DOS)}
@kindex C-BREAK @r{(MS-DOS)}
@cindex quitting on MS-DOS
Emacs built for MS-DOS recognizes @kbd{C-@key{BREAK}} as a quit
character, just like @kbd{C-g}. This is because Emacs cannot detect
that you have typed @kbd{C-g} until it is ready for more input. As a
consequence, you cannot use @kbd{C-g} to stop a running command
@iftex
(@pxref{Quitting,,,emacs, the Emacs Manual}).
@end iftex
@ifnottex
(@pxref{Quitting}).
@end ifnottex
By contrast, @kbd{C-@key{BREAK}} @emph{is} detected as soon as you
type it (as @kbd{C-g} is on other systems), so it can be used to stop
a running command and for emergency escape
@iftex
(@pxref{Emergency Escape,,,emacs, the Emacs Manual}).
@end iftex
@ifnottex
(@pxref{Emergency Escape}).
@end ifnottex
@cindex Meta (under MS-DOS)
@cindex Hyper (under MS-DOS)
@cindex Super (under MS-DOS)
@vindex dos-super-key
@vindex dos-hyper-key
The PC keyboard maps use the left @key{ALT} key as the @key{META} key.
You have two choices for emulating the @key{SUPER} and @key{HYPER} keys:
choose either the right @key{CTRL} key or the right @key{ALT} key by
setting the variables @code{dos-hyper-key} and @code{dos-super-key} to 1
or 2 respectively. If neither @code{dos-super-key} nor
@code{dos-hyper-key} is 1, then by default the right @key{ALT} key is
also mapped to the @key{META} key. However, if the MS-DOS international
keyboard support program @file{KEYB.COM} is installed, Emacs will
@emph{not} map the right @key{ALT} to @key{META}, since it is used for
accessing characters like @kbd{~} and @kbd{@@} on non-US keyboard
layouts; in this case, you may only use the left @key{ALT} as @key{META}
key.
@kindex C-j @r{(MS-DOS)}
@vindex dos-keypad-mode
The variable @code{dos-keypad-mode} is a flag variable that controls
what key codes are returned by keys in the numeric keypad. You can also
define the keypad @key{ENTER} key to act like @kbd{C-j}, by putting the
following line into your @file{_emacs} file:
@smallexample
;; @r{Make the @key{ENTER} key from the numeric keypad act as @kbd{C-j}.}
(define-key function-key-map [kp-enter] [?\C-j])
@end smallexample
@node MS-DOS Mouse
@subsection Mouse Usage on MS-DOS
@cindex mouse support under MS-DOS
Emacs on MS-DOS supports a mouse (on the default terminal only).
The mouse commands work as documented, including those that use menus
and the menu bar
@iftex
(@pxref{Menu Bar,,,emacs, the Emacs Manual}).
@end iftex
@ifnottex
(@pxref{Menu Bar}).
@end ifnottex
Scroll bars don't work in MS-DOS Emacs. PC mice usually have only
two buttons; these act as @kbd{Mouse-1} and @kbd{Mouse-2}, but if you
press both of them together, that has the effect of @kbd{Mouse-3}. If
the mouse does have 3 buttons, Emacs detects that at startup, and all
the 3 buttons function normally, as on X.
Help strings for menu-bar and pop-up menus are displayed in the echo
area when the mouse pointer moves across the menu items. Highlighting
of mouse-sensitive text
@iftex
(@pxref{Mouse References,,,emacs, the Emacs Manual})
@end iftex
@ifnottex
(@pxref{Mouse References})
@end ifnottex
is also supported.
@cindex mouse, set number of buttons
@findex msdos-set-mouse-buttons
Some versions of mouse drivers don't report the number of mouse
buttons correctly. For example, mice with a wheel report that they
have 3 buttons, but only 2 of them are passed to Emacs; the clicks on
the wheel, which serves as the middle button, are not passed. In
these cases, you can use the @kbd{M-x msdos-set-mouse-buttons} command
to tell Emacs how many mouse buttons to expect. You could make such a
setting permanent by adding this fragment to your @file{_emacs} init
file:
@example
;; @r{Treat the mouse like a 2-button mouse.}
(msdos-set-mouse-buttons 2)
@end example
@cindex Windows clipboard support
Emacs built for MS-DOS supports clipboard operations when it runs on
Windows. Commands that put text on the kill ring, or yank text from
the ring, check the Windows clipboard first, just as Emacs does on the
X Window System
@iftex
(@pxref{Mouse Commands,,,emacs, the Emacs Manual}).
@end iftex
@ifnottex
(@pxref{Mouse Commands}).
@end ifnottex
Only the primary selection and the cut buffer are supported by MS-DOS
Emacs on Windows; the secondary selection always appears as empty.
Due to the way clipboard access is implemented by Windows, the
length of text you can put into the clipboard is limited by the amount
of free DOS memory that is available to Emacs. Usually, up to 620KB of
text can be put into the clipboard, but this limit depends on the system
configuration and is lower if you run Emacs as a subprocess of
another program. If the killed text does not fit, Emacs outputs a
message saying so, and does not put the text into the clipboard.
Null characters also cannot be put into the Windows clipboard. If the
killed text includes null characters, Emacs does not put such text into
the clipboard, and displays in the echo area a message to that effect.
@vindex dos-display-scancodes
The variable @code{dos-display-scancodes}, when non-@code{nil},
directs Emacs to display the @acronym{ASCII} value and the keyboard scan code of
each keystroke; this feature serves as a complement to the
@code{view-lossage} command, for debugging.
@node MS-DOS Display
@subsection Display on MS-DOS
@cindex faces under MS-DOS
@cindex fonts, emulating under MS-DOS
Display on MS-DOS cannot use font variants, like bold or italic, but
it does support multiple faces, each of which can specify a foreground
and a background color. Therefore, you can get the full functionality
of Emacs packages that use fonts (such as @code{font-lock}, Enriched
Text mode, and others) by defining the relevant faces to use different
colors. Use the @code{list-colors-display} command
@iftex
(@pxref{Frame Parameters,,,emacs, the Emacs Manual})
@end iftex
@ifnottex
(@pxref{Frame Parameters})
@end ifnottex
and the @code{list-faces-display} command
@iftex
(@pxref{Faces,,,emacs, the Emacs Manual})
@end iftex
@ifnottex
(@pxref{Faces})
@end ifnottex
to see what colors and faces are available and what they look like.
@xref{MS-DOS and MULE}, later in this chapter, for information on
how Emacs displays glyphs and characters that aren't supported by the
native font built into the DOS display.
@cindex cursor shape on MS-DOS
When Emacs starts, it changes the cursor shape to a solid box. This
is for compatibility with other systems, where the box cursor is the
default in Emacs. This default shape can be changed to a bar by
specifying the @code{cursor-type} parameter in the variable
@code{default-frame-alist}
@iftex
(@pxref{Creating Frames,,,emacs, the Emacs Manual}).
@end iftex
@ifnottex
(@pxref{Creating Frames}).
@end ifnottex
The MS-DOS terminal doesn't support a vertical-bar cursor,
so the bar cursor is horizontal, and the @code{@var{width}} parameter,
if specified by the frame parameters, actually determines its height.
For this reason, the @code{bar} and @code{hbar} cursor types produce
the same effect on MS-DOS. As an extension, the bar cursor
specification can include the starting scan line of the cursor as well
as its width, like this:
@example
'(cursor-type bar @var{width} . @var{start})
@end example
@noindent
In addition, if the @var{width} parameter is negative, the cursor bar
begins at the top of the character cell.
@cindex frames on MS-DOS
The MS-DOS terminal can only display a single frame at a time. The
Emacs frame facilities work on MS-DOS much as they do on text-only
terminals
@iftex
(@pxref{Frames,,,emacs, the Emacs Manual}).
@end iftex
@ifnottex
(@pxref{Frames}).
@end ifnottex
When you run Emacs from a DOS window on MS-Windows, you can make the
visible frame smaller than the full screen, but Emacs still cannot
display more than a single frame at a time.
@cindex frame size under MS-DOS
@findex mode4350
@findex mode25
The @code{mode4350} command switches the display to 43 or 50
lines, depending on your hardware; the @code{mode25} command switches
to the default 80x25 screen size.
By default, Emacs only knows how to set screen sizes of 80 columns by
25, 28, 35, 40, 43 or 50 rows. However, if your video adapter has
special video modes that will switch the display to other sizes, you can
have Emacs support those too. When you ask Emacs to switch the frame to
@var{n} rows by @var{m} columns dimensions, it checks if there is a
variable called @code{screen-dimensions-@var{n}x@var{m}}, and if so,
uses its value (which must be an integer) as the video mode to switch
to. (Emacs switches to that video mode by calling the BIOS @code{Set
Video Mode} function with the value of
@code{screen-dimensions-@var{n}x@var{m}} in the @code{AL} register.)
For example, suppose your adapter will switch to 66x80 dimensions when
put into video mode 85. Then you can make Emacs support this screen
size by putting the following into your @file{_emacs} file:
@example
(setq screen-dimensions-66x80 85)
@end example
Since Emacs on MS-DOS can only set the frame size to specific
supported dimensions, it cannot honor every possible frame resizing
request. When an unsupported size is requested, Emacs chooses the next
larger supported size beyond the specified size. For example, if you
ask for 36x80 frame, you will get 40x80 instead.
The variables @code{screen-dimensions-@var{n}x@var{m}} are used only
when they exactly match the specified size; the search for the next
larger supported size ignores them. In the above example, even if your
VGA supports 38x80 dimensions and you define a variable
@code{screen-dimensions-38x80} with a suitable value, you will still get
40x80 screen when you ask for a 36x80 frame. If you want to get the
38x80 size in this case, you can do it by setting the variable named
@code{screen-dimensions-36x80} with the same video mode value as
@code{screen-dimensions-38x80}.
Changing frame dimensions on MS-DOS has the effect of changing all the
other frames to the new dimensions.
@node MS-DOS File Names
@subsection File Names on MS-DOS
@cindex file names under MS-DOS
@cindex init file, default name under MS-DOS
On MS-DOS, file names are case-insensitive and limited to eight
characters, plus optionally a period and three more characters. Emacs
knows enough about these limitations to handle file names that were
meant for other operating systems. For instance, leading dots
@samp{.} in file names are invalid in MS-DOS, so Emacs transparently
converts them to underscores @samp{_}; thus your default init file
@iftex
(@pxref{Init File,,,emacs, the Emacs Manual})
@end iftex
@ifnottex
(@pxref{Init File})
@end ifnottex
is called @file{_emacs} on MS-DOS. Excess characters before or after
the period are generally ignored by MS-DOS itself; thus, if you visit
the file @file{LongFileName.EvenLongerExtension}, you will silently
get @file{longfile.eve}, but Emacs will still display the long file
name on the mode line. Other than that, it's up to you to specify
file names which are valid under MS-DOS; the transparent conversion as
described above only works on file names built into Emacs.
@cindex backup file names on MS-DOS
The above restrictions on the file names on MS-DOS make it almost
impossible to construct the name of a backup file
@iftex
(@pxref{Backup Names,,,emacs, the Emacs Manual})
@end iftex
@ifnottex
(@pxref{Backup Names})
@end ifnottex
without losing some of the original file name characters. For
example, the name of a backup file for @file{docs.txt} is
@file{docs.tx~} even if single backup is used.
@cindex file names under Windows 95/NT
@cindex long file names in DOS box under Windows 95/NT
If you run Emacs as a DOS application under Windows 9X, Windows ME, or
Windows 2000/XP, you can turn on support for long file names. If you do
that, Emacs doesn't truncate file names or convert them to lower case;
instead, it uses the file names that you specify, verbatim. To enable
long file name support, set the environment variable @env{LFN} to
@samp{y} before starting Emacs. Unfortunately, Windows NT doesn't allow
DOS programs to access long file names, so Emacs built for MS-DOS will
only see their short 8+3 aliases.
@cindex @env{HOME} directory under MS-DOS
MS-DOS has no notion of home directory, so Emacs on MS-DOS pretends
that the directory where it is installed is the value of the @env{HOME}
environment variable. That is, if your Emacs binary,
@file{emacs.exe}, is in the directory @file{c:/utils/emacs/bin}, then
Emacs acts as if @env{HOME} were set to @samp{c:/utils/emacs}. In
particular, that is where Emacs looks for the init file @file{_emacs}.
With this in mind, you can use @samp{~} in file names as an alias for
the home directory, as you would on GNU or Unix. You can also set
@env{HOME} variable in the environment before starting Emacs; its
value will then override the above default behavior.
Emacs on MS-DOS handles the directory name @file{/dev} specially,
because of a feature in the emulator libraries of DJGPP that pretends
I/O devices have names in that directory. We recommend that you avoid
using an actual directory named @file{/dev} on any disk.
@node MS-DOS Printing
@subsection Printing and MS-DOS
Printing commands, such as @code{lpr-buffer}
@iftex
(@pxref{Printing,,,emacs, the Emacs Manual}) and @code{ps-print-buffer}
(@pxref{PostScript,,,emacs, the Emacs Manual})
@end iftex
@ifnottex
(@pxref{Printing}) and @code{ps-print-buffer} (@pxref{PostScript})
@end ifnottex
can work on MS-DOS by sending the output to one of the printer ports,
if a Posix-style @code{lpr} program is unavailable. The same Emacs
variables control printing on all systems, but in some cases they have
different default values on MS-DOS.
@iftex
@xref{Windows Printing,,,emacs, the Emacs Manual},
@end iftex
@ifnottex
@xref{Windows Printing},
@end ifnottex
for details about setting up printing to a networked printer.
Some printers expect DOS codepage encoding of non-@acronym{ASCII} text, even
though they are connected to a Windows machine which uses a different
encoding for the same locale. For example, in the Latin-1 locale, DOS
uses codepage 850 whereas Windows uses codepage 1252. @xref{MS-DOS and
MULE}. When you print to such printers from Windows, you can use the
@kbd{C-x RET c} (@code{universal-coding-system-argument}) command before
@kbd{M-x lpr-buffer}; Emacs will then convert the text to the DOS
codepage that you specify. For example, @kbd{C-x RET c cp850-dos RET
M-x lpr-region RET} will print the region while converting it to the
codepage 850 encoding. You may need to create the @code{cp@var{nnn}}
coding system with @kbd{M-x codepage-setup}.
@vindex dos-printer
@vindex dos-ps-printer
For backwards compatibility, the value of @code{dos-printer}
(@code{dos-ps-printer}), if it has a value, overrides the value of
@code{printer-name} (@code{ps-printer-name}), on MS-DOS.
@node MS-DOS and MULE
@subsection International Support on MS-DOS
@cindex international support @r{(MS-DOS)}
Emacs on MS-DOS supports the same international character sets as it
does on GNU, Unix and other platforms
@iftex
(@pxref{International,,,emacs, the Emacs Manual}),
@end iftex
@ifnottex
(@pxref{International}),
@end ifnottex
including coding systems for converting between the different
character sets. However, due to incompatibilities between
MS-DOS/MS-Windows and other systems, there are several DOS-specific
aspects of this support that you should be aware of. This section
describes these aspects.
The description below is largely specific to the MS-DOS port of
Emacs, especially where it talks about practical implications for
Emacs users. For other operating systems, see the @file{code-pages.el}
package, which implements support for MS-DOS- and MS-Windows-specific
encodings for all platforms other than MS-DOS.
@table @kbd
@item M-x dos-codepage-setup
Set up Emacs display and coding systems as appropriate for the current
DOS codepage.
@item M-x codepage-setup
Create a coding system for a certain DOS codepage.
@end table
@cindex codepage, MS-DOS
@cindex DOS codepages
MS-DOS is designed to support one character set of 256 characters at
any given time, but gives you a variety of character sets to choose
from. The alternative character sets are known as @dfn{DOS codepages}.
Each codepage includes all 128 @acronym{ASCII} characters, but the other 128
characters (codes 128 through 255) vary from one codepage to another.
Each DOS codepage is identified by a 3-digit number, such as 850, 862,
etc.
In contrast to X, which lets you use several fonts at the same time,
MS-DOS normally doesn't allow use of several codepages in a single
session. MS-DOS was designed to load a single codepage at system
startup, and require you to reboot in order to change
it@footnote{Normally, one particular codepage is burnt into the
display memory, while other codepages can be installed by modifying
system configuration files, such as @file{CONFIG.SYS}, and rebooting.
While there is third-party software that allows changing the codepage
without rebooting, we describe here how a stock MS-DOS system
behaves.}. Much the same limitation applies when you run DOS
executables on other systems such as MS-Windows.
@cindex unibyte operation @r{(MS-DOS)}
If you invoke Emacs on MS-DOS with the @samp{--unibyte} option
@iftex
(@pxref{Initial Options,,,emacs, the Emacs Manual}),
@end iftex
@ifnottex
(@pxref{Initial Options}),
@end ifnottex
Emacs does not perform any conversion of non-@acronym{ASCII}
characters. Instead, it reads and writes any non-@acronym{ASCII}
characters verbatim, and sends their 8-bit codes to the display
verbatim. Thus, unibyte Emacs on MS-DOS supports the current
codepage, whatever it may be, but cannot even represent any other
characters.
@vindex dos-codepage
For multibyte operation on MS-DOS, Emacs needs to know which
characters the chosen DOS codepage can display. So it queries the
system shortly after startup to get the chosen codepage number, and
stores the number in the variable @code{dos-codepage}. Some systems
return the default value 437 for the current codepage, even though the
actual codepage is different. (This typically happens when you use the
codepage built into the display hardware.) You can specify a different
codepage for Emacs to use by setting the variable @code{dos-codepage} in
your init file.
@cindex language environment, automatic selection on @r{MS-DOS}
Multibyte Emacs supports only certain DOS codepages: those which can
display Far-Eastern scripts, like the Japanese codepage 932, and those
that encode a single ISO 8859 character set.
The Far-Eastern codepages can directly display one of the MULE
character sets for these countries, so Emacs simply sets up to use the
appropriate terminal coding system that is supported by the codepage.
The special features described in the rest of this section mostly
pertain to codepages that encode ISO 8859 character sets.
For the codepages which correspond to one of the ISO character sets,
Emacs knows the character set name based on the codepage number. Emacs
automatically creates a coding system to support reading and writing
files that use the current codepage, and uses this coding system by
default. The name of this coding system is @code{cp@var{nnn}}, where
@var{nnn} is the codepage number.@footnote{The standard Emacs coding
systems for ISO 8859 are not quite right for the purpose, because
typically the DOS codepage does not match the standard ISO character
codes. For example, the letter @samp{@,{c}} (@samp{c} with cedilla) has
code 231 in the standard Latin-1 character set, but the corresponding
DOS codepage 850 uses code 135 for this glyph.}
@cindex mode line @r{(MS-DOS)}
All the @code{cp@var{nnn}} coding systems use the letter @samp{D}
(for ``DOS'') as their mode-line mnemonic. Since both the terminal
coding system and the default coding system for file I/O are set to
the proper @code{cp@var{nnn}} coding system at startup, it is normal
for the mode line on MS-DOS to begin with @samp{-DD\-}.
@iftex
@xref{Mode Line,,,emacs, the Emacs Manual}.
@end iftex
@ifnottex
@xref{Mode Line}.
@end ifnottex
Far-Eastern DOS terminals do not use the @code{cp@var{nnn}} coding
systems, and thus their initial mode line looks like the Emacs
default.
Since the codepage number also indicates which script you are using,
Emacs automatically runs @code{set-language-environment} to select the
language environment for that script
@iftex
(@pxref{Language Environments,,,emacs, the Emacs Manual}).
@end iftex
@ifnottex
(@pxref{Language Environments}).
@end ifnottex
If a buffer contains a character belonging to some other ISO 8859
character set, not the one that the chosen DOS codepage supports, Emacs
displays it using a sequence of @acronym{ASCII} characters. For example, if the
current codepage doesn't have a glyph for the letter @samp{@`o} (small
@samp{o} with a grave accent), it is displayed as @samp{@{`o@}}, where
the braces serve as a visual indication that this is a single character.
(This may look awkward for some non-Latin characters, such as those from
Greek or Hebrew alphabets, but it is still readable by a person who
knows the language.) Even though the character may occupy several
columns on the screen, it is really still just a single character, and
all Emacs commands treat it as one.
@cindex IBM graphics characters (MS-DOS)
@cindex box-drawing characters (MS-DOS)
@cindex line-drawing characters (MS-DOS)
Not all characters in DOS codepages correspond to ISO 8859
characters---some are used for other purposes, such as box-drawing
characters and other graphics. Emacs maps these characters to two
special character sets called @code{eight-bit-control} and
@code{eight-bit-graphic}, and displays them as their IBM glyphs.
However, you should be aware that other systems might display these
characters differently, so you should avoid them in text that might be
copied to a different operating system, or even to another DOS machine
that uses a different codepage.
@vindex dos-unsupported-character-glyph
Emacs supports many other characters sets aside from ISO 8859, but it
cannot display them on MS-DOS. So if one of these multibyte characters
appears in a buffer, Emacs on MS-DOS displays them as specified by the
@code{dos-unsupported-character-glyph} variable; by default, this glyph
is an empty triangle. Use the @kbd{C-u C-x =} command to display the
actual code and character set of such characters.
@iftex
@xref{Position Info,,,emacs, the Emacs Manual}.
@end iftex
@ifnottex
@xref{Position Info}.
@end ifnottex
@findex codepage-setup
By default, Emacs defines a coding system to support the current
codepage. To define a coding system for some other codepage (e.g., to
visit a file written on a DOS machine in another country), use the
@kbd{M-x codepage-setup} command. It prompts for the 3-digit code of
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
@iftex
(@pxref{Text Coding,,,emacs, the Emacs Manual}).
@end iftex
@ifnottex
(@pxref{Text Coding}).
@end ifnottex
These coding systems are also useful for visiting a file encoded using
a DOS codepage, using Emacs running on some other operating system.
@cindex MS-Windows codepages
MS-Windows provides its own codepages, which are different from the
DOS codepages for the same locale. For example, DOS codepage 850
supports the same character set as Windows codepage 1252; DOS codepage
855 supports the same character set as Windows codepage 1251, etc.
The MS-Windows version of Emacs uses the current codepage for display
when invoked with the @samp{-nw} option. Support for codepages in the
Windows port of Emacs is part of the @file{code-pages.el} package.
@node MS-DOS Processes
@subsection Subprocesses on MS-DOS
@cindex compilation under MS-DOS
@cindex inferior processes under MS-DOS
@findex compile @r{(MS-DOS)}
@findex grep @r{(MS-DOS)}
Because MS-DOS is a single-process ``operating system,''
asynchronous subprocesses are not available. In particular, Shell
mode and its variants do not work. Most Emacs features that use
asynchronous subprocesses also don't work on MS-DOS, including
Shell mode and GUD. When in doubt, try and see; commands that
don't work output an error message saying that asynchronous processes
aren't supported.
Compilation under Emacs with @kbd{M-x compile}, searching files with
@kbd{M-x grep} and displaying differences between files with @kbd{M-x
diff} do work, by running the inferior processes synchronously. This
means you cannot do any more editing until the inferior process
finishes.
Spell checking also works, by means of special support for synchronous
invocation of the @code{ispell} program. This is slower than the
asynchronous invocation on other platforms
Instead of the Shell mode, which doesn't work on MS-DOS, you can use
the @kbd{M-x eshell} command. This invokes the Eshell package that
implements a Posix-like shell entirely in Emacs Lisp.
By contrast, Emacs compiled as a native Windows application
@strong{does} support asynchronous subprocesses.
@iftex
@xref{Windows Processes,,,emacs, the Emacs Manual}.
@end iftex
@ifnottex
@xref{Windows Processes}.
@end ifnottex
@cindex printing under MS-DOS
Printing commands, such as @code{lpr-buffer}
@iftex
(@pxref{Printing,,,emacs, the Emacs Manual}) and
@code{ps-print-buffer} (@pxref{PostScript,,,emacs, the Emacs Manual}),
work in MS-DOS by sending the output to one of the printer ports.
@xref{MS-DOS Printing,,,emacs, the Emacs Manual}.
@end iftex
@ifnottex
(@pxref{Printing}) and @code{ps-print-buffer} (@pxref{PostScript}),
work in MS-DOS by sending the output to one of the printer ports.
@xref{MS-DOS Printing}.
@end ifnottex
When you run a subprocess synchronously on MS-DOS, make sure the
program terminates and does not try to read keyboard input. If the
program does not terminate on its own, you will be unable to terminate
it, because MS-DOS provides no general way to terminate a process.
Pressing @kbd{C-c} or @kbd{C-@key{BREAK}} might sometimes help in these
cases.
Accessing files on other machines is not supported on MS-DOS. Other
network-oriented commands such as sending mail, Web browsing, remote
login, etc., don't work either, unless network access is built into
MS-DOS with some network redirector.
@cindex directory listing on MS-DOS
@vindex dired-listing-switches @r{(MS-DOS)}
Dired on MS-DOS uses the @code{ls-lisp} package where other
platforms use the system @code{ls} command. Therefore, Dired on
MS-DOS supports only some of the possible options you can mention in
the @code{dired-listing-switches} variable. The options that work are
@samp{-A}, @samp{-a}, @samp{-c}, @samp{-i}, @samp{-r}, @samp{-S},
@samp{-s}, @samp{-t}, and @samp{-u}.
@ignore
arch-tag: 868d50ff-07f8-4a13-a807-dab6f1cdb431
@end ignore

View file

@ -2,8 +2,8 @@
@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001,
@c 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Emacs and Microsoft Windows, Manifesto, Mac OS, Top
@appendix Emacs and Microsoft Windows
@node Microsoft Windows, Manifesto, Mac OS, Top
@appendix Emacs and Microsoft Windows/MS-DOS
@cindex Microsoft Windows
@cindex MS-Windows, Emacs peculiarities
@ -11,7 +11,14 @@
Windows. Some of these peculiarities are also relevant to Microsoft's
older MS-DOS ``operating system'' (also known as ``MS-DOG'').
However, Emacs features that are relevant @emph{only} to MS-DOS are
described in a separate manual (@inforef{MS-DOG,, emacs-xtra}).
described in a separate
@iftex
manual (@pxref{MS-DOS,,, emacs-xtra, Specialized Emacs Features}).
@end iftex
@ifnottex
section (@pxref{MS-DOS}).
@end ifnottex
The behavior of Emacs on MS-Windows is reasonably similar to what is
documented in the rest of the manual, including support for long file
@ -20,12 +27,15 @@ However, a few special considerations apply, and they are described
here.
@menu
* Text and Binary:: Text files use CRLF to terminate lines.
* Windows Files:: File-name conventions on Windows.
* Windows HOME:: Where Emacs looks for your @file{.emacs}.
* Windows Processes:: Running subprocesses on Windows.
* Windows Printing:: How to specify the printer on MS-Windows.
* Windows System Menu:: Controlling what the ALT key does.
* Text and Binary:: Text files use CRLF to terminate lines.
* Windows Files:: File-name conventions on Windows.
* Windows HOME:: Where Emacs looks for your @file{.emacs}.
* Windows Processes:: Running subprocesses on Windows.
* Windows Printing:: How to specify the printer on MS-Windows.
* Windows System Menu:: Controlling what the ALT key does.
@ifnottex
* MS-DOS:: Using Emacs on MS-DOS (otherwise known as @dfn{MS-DOG}).
@end ifnottex
@end menu
@node Text and Binary
@ -408,6 +418,10 @@ users find this frustrating.
You can re-enable Windows' default handling of tapping the @key{ALT} key
by setting @code{w32-pass-alt-to-system} to a non-@code{nil} value.
@ifnottex
@include msdog-xtra.texi
@end ifnottex
@ignore
arch-tag: f39d2590-5dcc-4318-88d9-0eb73ca10fa2
@end ignore

291
man/picture-xtra.texi Normal file
View file

@ -0,0 +1,291 @@
@c This is part of the Emacs manual.
@c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@c
@c This file is included either in emacs-xtra.texi (when producing the
@c printed version) or in the main Emacs manual (for the on-line version).
@node Picture Mode
@chapter Editing Pictures
@cindex pictures
@cindex making pictures out of text characters
@findex edit-picture
To edit a picture made out of text characters (for example, a picture
of the division of a register into fields, as a comment in a program),
use the command @kbd{M-x edit-picture} to enter Picture mode.
In Picture mode, editing is based on the @dfn{quarter-plane} model of
text, according to which the text characters lie studded on an area that
stretches infinitely far to the right and downward. The concept of the end
of a line does not exist in this model; the most you can say is where the
last nonblank character on the line is found.
Of course, Emacs really always considers text as a sequence of
characters, and lines really do have ends. But Picture mode replaces
the most frequently-used commands with variants that simulate the
quarter-plane model of text. They do this by inserting spaces or by
converting tabs to spaces.
Most of the basic editing commands of Emacs are redefined by Picture mode
to do essentially the same thing but in a quarter-plane way. In addition,
Picture mode defines various keys starting with the @kbd{C-c} prefix to
run special picture editing commands.
One of these keys, @kbd{C-c C-c}, is particularly important. Often a
picture is part of a larger file that is usually edited in some other
major mode. @kbd{M-x edit-picture} records the name of the previous
major mode so you can use the @kbd{C-c C-c} command
(@code{picture-mode-exit}) later to go back to that mode. @kbd{C-c C-c}
also deletes spaces from the ends of lines, unless given a numeric
argument.
The special commands of Picture mode all work in other modes (provided
the @file{picture} library is loaded), but are not bound to keys except
in Picture mode. The descriptions below talk of moving ``one column''
and so on, but all the picture mode commands handle numeric arguments as
their normal equivalents do.
@vindex picture-mode-hook
Turning on Picture mode runs the hook @code{picture-mode-hook}.
Additional extensions to Picture mode can be found in
@file{artist.el}.
@menu
* Basic Picture:: Basic concepts and simple commands of Picture Mode.
* Insert in Picture:: Controlling direction of cursor motion
after "self-inserting" characters.
* Tabs in Picture:: Various features for tab stops and indentation.
* Rectangles in Picture:: Clearing and superimposing rectangles.
@end menu
@node Basic Picture
@section Basic Editing in Picture Mode
@findex picture-forward-column
@findex picture-backward-column
@findex picture-move-down
@findex picture-move-up
@cindex editing in Picture mode
Most keys do the same thing in Picture mode that they usually do, but
do it in a quarter-plane style. For example, @kbd{C-f} is rebound to
run @code{picture-forward-column}, a command which moves point one
column to the right, inserting a space if necessary so that the actual
end of the line makes no difference. @kbd{C-b} is rebound to run
@code{picture-backward-column}, which always moves point left one
column, converting a tab to multiple spaces if necessary. @kbd{C-n} and
@kbd{C-p} are rebound to run @code{picture-move-down} and
@code{picture-move-up}, which can either insert spaces or convert tabs
as necessary to make sure that point stays in exactly the same column.
@kbd{C-e} runs @code{picture-end-of-line}, which moves to after the last
nonblank character on the line. There is no need to change @kbd{C-a},
as the choice of screen model does not affect beginnings of
lines.
@findex picture-newline
Insertion of text is adapted to the quarter-plane screen model
through the use of Overwrite mode
@iftex
(@pxref{Minor Modes,,, emacs, the Emacs Manual}.)
@end iftex
@ifnottex
(@pxref{Minor Modes}.)
@end ifnottex
Self-inserting characters replace existing text, column by column,
rather than pushing existing text to the right. @key{RET} runs
@code{picture-newline}, which just moves to the beginning of the
following line so that new text will replace that line.
@findex picture-backward-clear-column
@findex picture-clear-column
@findex picture-clear-line
In Picture mode, the commands that normally delete or kill text,
instead erase text (replacing it with spaces). @key{DEL}
(@code{picture-backward-clear-column}) replaces the preceding
character with a space rather than removing it; this moves point
backwards. @kbd{C-d} (@code{picture-clear-column}) replaces the next
character or characters with spaces, but does not move point. (If you
want to clear characters to spaces and move forward over them, use
@key{SPC}.) @kbd{C-k} (@code{picture-clear-line}) really kills the
contents of lines, but does not delete the newlines from the buffer.
@findex picture-open-line
To do actual insertion, you must use special commands. @kbd{C-o}
(@code{picture-open-line}) creates a blank line after the current
line; it never splits a line. @kbd{C-M-o} (@code{split-line}) makes
sense in Picture mode, so it is not changed. @kbd{C-j}
(@code{picture-duplicate-line}) inserts another line with the same
contents below the current line.
@kindex C-c C-d @r{(Picture mode)}
To do actual deletion in Picture mode, use @kbd{C-w}, @kbd{C-c C-d}
(which is defined as @code{delete-char}, as @kbd{C-d} is in other
modes), or one of the picture rectangle commands (@pxref{Rectangles in
Picture}).
@node Insert in Picture
@section Controlling Motion after Insert
@findex picture-movement-up
@findex picture-movement-down
@findex picture-movement-left
@findex picture-movement-right
@findex picture-movement-nw
@findex picture-movement-ne
@findex picture-movement-sw
@findex picture-movement-se
@kindex C-c < @r{(Picture mode)}
@kindex C-c > @r{(Picture mode)}
@kindex C-c ^ @r{(Picture mode)}
@kindex C-c . @r{(Picture mode)}
@kindex C-c ` @r{(Picture mode)}
@kindex C-c ' @r{(Picture mode)}
@kindex C-c / @r{(Picture mode)}
@kindex C-c \ @r{(Picture mode)}
Since ``self-inserting'' characters in Picture mode overwrite and move
point, there is no essential restriction on how point should be moved.
Normally point moves right, but you can specify any of the eight
orthogonal or diagonal directions for motion after a ``self-inserting''
character. This is useful for drawing lines in the buffer.
@table @kbd
@item C-c <
@itemx C-c @key{LEFT}
Move left after insertion (@code{picture-movement-left}).
@item C-c >
@itemx C-c @key{RIGHT}
Move right after insertion (@code{picture-movement-right}).
@item C-c ^
@itemx C-c @key{UP}
Move up after insertion (@code{picture-movement-up}).
@item C-c .
@itemx C-c @key{DOWN}
Move down after insertion (@code{picture-movement-down}).
@item C-c `
@itemx C-c @key{HOME}
Move up and left (``northwest'') after insertion (@code{picture-movement-nw}).
@item C-c '
@itemx C-c @key{PAGEUP}
Move up and right (``northeast'') after insertion
(@code{picture-movement-ne}).
@item C-c /
@itemx C-c @key{END}
Move down and left (``southwest'') after insertion
@*(@code{picture-movement-sw}).
@item C-c \
@itemx C-c @key{PAGEDOWN}
Move down and right (``southeast'') after insertion
@*(@code{picture-movement-se}).
@end table
@kindex C-c C-f @r{(Picture mode)}
@kindex C-c C-b @r{(Picture mode)}
@findex picture-motion
@findex picture-motion-reverse
Two motion commands move based on the current Picture insertion
direction. The command @kbd{C-c C-f} (@code{picture-motion}) moves in the
same direction as motion after ``insertion'' currently does, while @kbd{C-c
C-b} (@code{picture-motion-reverse}) moves in the opposite direction.
@node Tabs in Picture
@section Picture Mode Tabs
@kindex M-TAB @r{(Picture mode)}
@findex picture-tab-search
@vindex picture-tab-chars
Two kinds of tab-like action are provided in Picture mode. Use
@kbd{M-@key{TAB}} (@code{picture-tab-search}) for context-based tabbing.
With no argument, it moves to a point underneath the next
``interesting'' character that follows whitespace in the previous
nonblank line. ``Next'' here means ``appearing at a horizontal position
greater than the one point starts out at.'' With an argument, as in
@kbd{C-u M-@key{TAB}}, this command moves to the next such interesting
character in the current line. @kbd{M-@key{TAB}} does not change the
text; it only moves point. ``Interesting'' characters are defined by
the variable @code{picture-tab-chars}, which should define a set of
characters. The syntax for this variable is like the syntax used inside
of @samp{[@dots{}]} in a regular expression---but without the @samp{[}
and the @samp{]}. Its default value is @code{"!-~"}.
@findex picture-tab
@key{TAB} itself runs @code{picture-tab}, which operates based on the
current tab stop settings; it is the Picture mode equivalent of
@code{tab-to-tab-stop}. Normally it just moves point, but with a numeric
argument it clears the text that it moves over.
@kindex C-c TAB @r{(Picture mode)}
@findex picture-set-tab-stops
The context-based and tab-stop-based forms of tabbing are brought
together by the command @kbd{C-c @key{TAB}} (@code{picture-set-tab-stops}).
This command sets the tab stops to the positions which @kbd{M-@key{TAB}}
would consider significant in the current line. The use of this command,
together with @key{TAB}, can get the effect of context-based tabbing. But
@kbd{M-@key{TAB}} is more convenient in the cases where it is sufficient.
It may be convenient to prevent use of actual tab characters in
pictures. For example, this prevents @kbd{C-x @key{TAB}} from messing
up the picture. You can do this by setting the variable
@code{indent-tabs-mode} to @code{nil}.
@node Rectangles in Picture
@section Picture Mode Rectangle Commands
@cindex rectangles and Picture mode
@cindex Picture mode and rectangles
Picture mode defines commands for working on rectangular pieces of
the text in ways that fit with the quarter-plane model. The standard
rectangle commands may also be useful.
@iftex
@xref{Rectangles,,, emacs, the Emacs Manual}.
@end iftex
@ifnottex
@xref{Rectangles}.
@end ifnottex
@table @kbd
@item C-c C-k
Clear out the region-rectangle with spaces
(@code{picture-clear-rectangle}). With argument, delete the text.
@item C-c C-w @var{r}
Similar, but save rectangle contents in register @var{r} first
(@code{picture-clear-rectangle-to-register}).
@item C-c C-y
Copy last killed rectangle into the buffer by overwriting, with upper
left corner at point (@code{picture-yank-rectangle}). With argument,
insert instead.
@item C-c C-x @var{r}
Similar, but use the rectangle in register @var{r}
(@code{picture-yank-rectangle-from-register}).
@end table
@kindex C-c C-k @r{(Picture mode)}
@kindex C-c C-w @r{(Picture mode)}
@findex picture-clear-rectangle
@findex picture-clear-rectangle-to-register
The picture rectangle commands @kbd{C-c C-k}
(@code{picture-clear-rectangle}) and @kbd{C-c C-w}
(@code{picture-clear-rectangle-to-register}) differ from the standard
rectangle commands in that they normally clear the rectangle instead of
deleting it; this is analogous with the way @kbd{C-d} is changed in Picture
mode.
However, deletion of rectangles can be useful in Picture mode, so
these commands delete the rectangle if given a numeric argument.
@kbd{C-c C-k} either with or without a numeric argument saves the
rectangle for @kbd{C-c C-y}.
@kindex C-c C-y @r{(Picture mode)}
@kindex C-c C-x @r{(Picture mode)}
@findex picture-yank-rectangle
@findex picture-yank-rectangle-from-register
The Picture mode commands for yanking rectangles differ from the
standard ones in that they overwrite instead of inserting. This is
the same way that Picture mode insertion of other text differs from
other modes. @kbd{C-c C-y} (@code{picture-yank-rectangle}) inserts
(by overwriting) the rectangle that was most recently killed, while
@kbd{C-c C-x} (@code{picture-yank-rectangle-from-register}) does
likewise for the rectangle found in a specified register.
@ignore
arch-tag: 10e423ad-d896-42f2-a7e8-7018adeaf8c2
@end ignore

View file

@ -42,6 +42,9 @@ Highlight program syntax (@pxref{Font Lock}).
* C Modes:: Special commands of C, C++, Objective-C,
Java, and Pike modes.
* Asm Mode:: Asm mode and its special features.
@ifnottex
* Fortran:: Fortran mode and its special features.
@end ifnottex
@end menu
@node Program Modes
@ -109,7 +112,14 @@ tab character before point, in these modes.
Mode, ada-mode, Ada Mode}), C/C++/Objective C/Java/Corba IDL/Pike/AWK
(@pxref{Top, , CC Mode, ccmode, CC Mode}) and the IDLWAVE modes
(@pxref{Top, , IDLWAVE, idlwave, IDLWAVE User Manual}). For Fortran
mode, @inforef{Fortran,, emacs-xtra}.
mode, see
@iftex
@ref{Fortran,,, emacs-xtra, Specialized Emacs Features}.
@end iftex
@ifnottex
@ref{Fortran}.
@end ifnottex
@cindex mode hook
@vindex c-mode-hook
@ -1591,7 +1601,7 @@ hungry-delete feature is enabled.
@itemx M-x c-subword-mode
@findex c-subword-mode
Enable (or disable) @dfn{subword mode}. In subword mode, Emacs's word
commands then recognize upper case letters in
commands recognize upper case letters in
@samp{StudlyCapsIdentifiers} as word boundaries. This is indicated by
the flag @samp{/w} on the mode line after the mode name
(e.g. @samp{C/law}). You can even use @kbd{M-x c-subword-mode} in
@ -1742,6 +1752,10 @@ Insert or align a comment.
The variable @code{asm-comment-char} specifies which character
starts comments in assembler syntax.
@ifnottex
@include fortran-xtra.texi
@end ifnottex
@ignore
arch-tag: c7ee7409-40a4-45c7-bfb7-ae7f2c74d0c0
@end ignore

View file

@ -2,7 +2,7 @@
@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001, 2002,
@c 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Sending Mail, Rmail, Abbrevs, Top
@node Sending Mail
@chapter Sending Mail
@cindex sending mail
@cindex mail

View file

@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
\def\texinfoversion{2006-03-21.13}
\def\texinfoversion{2006-05-05.09}
%
% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
@ -1471,6 +1471,7 @@
% We don't need math for this font style.
\def\ttsl{\setfontstyle{ttsl}}
% Default leading.
\newdimen\textleading \textleading = 13.2pt
@ -1492,11 +1493,13 @@
}%
}
% Set the font macro #1 to the font named #2, adding on the
% specified font prefix (normally `cm').
% #3 is the font's design size, #4 is a scale factor
\def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4}
% Use cm as the default font prefix.
% To specify the font prefix, you must define \fontprefix
% before you read in texinfo.tex.
@ -1520,6 +1523,10 @@
\def\scshape{csc}
\def\scbshape{csc}
% Definitions for a main text size of 11pt. This is the default in
% Texinfo.
%
\def\definetextfontsizexi{
% Text fonts (11.2pt, magstep1).
\def\textnominalsize{11pt}
\edef\mainmagstep{\magstephalf}
@ -1633,6 +1640,165 @@
\font\reducedi=cmmi10
\font\reducedsy=cmsy10
% reset the current fonts
\textfonts
\rm
} % end of 11pt text font size definitions
% Definitions to make the main text be 10pt Computer Modern, with
% section, chapter, etc., sizes following suit. This is for the GNU
% Press printing of the Emacs 22 manual. Maybe other manuals in the
% future. Used with @smallbook, which sets the leading to 12pt.
%
\def\definetextfontsizex{%
% Text fonts (10pt).
\def\textnominalsize{10pt}
\edef\mainmagstep{1000}
\setfont\textrm\rmshape{10}{\mainmagstep}
\setfont\texttt\ttshape{10}{\mainmagstep}
\setfont\textbf\bfshape{10}{\mainmagstep}
\setfont\textit\itshape{10}{\mainmagstep}
\setfont\textsl\slshape{10}{\mainmagstep}
\setfont\textsf\sfshape{10}{\mainmagstep}
\setfont\textsc\scshape{10}{\mainmagstep}
\setfont\textttsl\ttslshape{10}{\mainmagstep}
\font\texti=cmmi10 scaled \mainmagstep
\font\textsy=cmsy10 scaled \mainmagstep
% A few fonts for @defun names and args.
\setfont\defbf\bfshape{10}{\magstephalf}
\setfont\deftt\ttshape{10}{\magstephalf}
\setfont\defttsl\ttslshape{10}{\magstephalf}
\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
% Fonts for indices, footnotes, small examples (9pt).
\def\smallnominalsize{9pt}
\setfont\smallrm\rmshape{9}{1000}
\setfont\smalltt\ttshape{9}{1000}
\setfont\smallbf\bfshape{10}{900}
\setfont\smallit\itshape{9}{1000}
\setfont\smallsl\slshape{9}{1000}
\setfont\smallsf\sfshape{9}{1000}
\setfont\smallsc\scshape{10}{900}
\setfont\smallttsl\ttslshape{10}{900}
\font\smalli=cmmi9
\font\smallsy=cmsy9
% Fonts for small examples (8pt).
\def\smallernominalsize{8pt}
\setfont\smallerrm\rmshape{8}{1000}
\setfont\smallertt\ttshape{8}{1000}
\setfont\smallerbf\bfshape{10}{800}
\setfont\smallerit\itshape{8}{1000}
\setfont\smallersl\slshape{8}{1000}
\setfont\smallersf\sfshape{8}{1000}
\setfont\smallersc\scshape{10}{800}
\setfont\smallerttsl\ttslshape{10}{800}
\font\smalleri=cmmi8
\font\smallersy=cmsy8
% Fonts for title page (20.4pt):
\def\titlenominalsize{20pt}
\setfont\titlerm\rmbshape{12}{\magstep3}
\setfont\titleit\itbshape{10}{\magstep4}
\setfont\titlesl\slbshape{10}{\magstep4}
\setfont\titlett\ttbshape{12}{\magstep3}
\setfont\titlettsl\ttslshape{10}{\magstep4}
\setfont\titlesf\sfbshape{17}{\magstep1}
\let\titlebf=\titlerm
\setfont\titlesc\scbshape{10}{\magstep4}
\font\titlei=cmmi12 scaled \magstep3
\font\titlesy=cmsy10 scaled \magstep4
\def\authorrm{\secrm}
\def\authortt{\sectt}
% Chapter fonts (14.4pt).
\def\chapnominalsize{14pt}
\setfont\chaprm\rmbshape{12}{\magstep1}
\setfont\chapit\itbshape{10}{\magstep2}
\setfont\chapsl\slbshape{10}{\magstep2}
\setfont\chaptt\ttbshape{12}{\magstep1}
\setfont\chapttsl\ttslshape{10}{\magstep2}
\setfont\chapsf\sfbshape{12}{\magstep1}
\let\chapbf\chaprm
\setfont\chapsc\scbshape{10}{\magstep2}
\font\chapi=cmmi12 scaled \magstep1
\font\chapsy=cmsy10 scaled \magstep2
% Section fonts (12pt).
\def\secnominalsize{12pt}
\setfont\secrm\rmbshape{12}{1000}
\setfont\secit\itbshape{10}{\magstep1}
\setfont\secsl\slbshape{10}{\magstep1}
\setfont\sectt\ttbshape{12}{1000}
\setfont\secttsl\ttslshape{10}{\magstep1}
\setfont\secsf\sfbshape{12}{1000}
\let\secbf\secrm
\setfont\secsc\scbshape{10}{\magstep1}
\font\seci=cmmi12
\font\secsy=cmsy10 scaled \magstep1
% Subsection fonts (10pt).
\def\ssecnominalsize{10pt}
\setfont\ssecrm\rmbshape{10}{1000}
\setfont\ssecit\itbshape{10}{1000}
\setfont\ssecsl\slbshape{10}{1000}
\setfont\ssectt\ttbshape{10}{1000}
\setfont\ssecttsl\ttslshape{10}{1000}
\setfont\ssecsf\sfbshape{10}{1000}
\let\ssecbf\ssecrm
\setfont\ssecsc\scbshape{10}{1000}
\font\sseci=cmmi10
\font\ssecsy=cmsy10
% Reduced fonts for @acro in text (9pt).
\def\reducednominalsize{9pt}
\setfont\reducedrm\rmshape{9}{1000}
\setfont\reducedtt\ttshape{9}{1000}
\setfont\reducedbf\bfshape{10}{900}
\setfont\reducedit\itshape{9}{1000}
\setfont\reducedsl\slshape{9}{1000}
\setfont\reducedsf\sfshape{9}{1000}
\setfont\reducedsc\scshape{10}{900}
\setfont\reducedttsl\ttslshape{10}{900}
\font\reducedi=cmmi9
\font\reducedsy=cmsy9
% reduce space between paragraphs
\divide\parskip by 2
% reset the current fonts
\textfonts
\rm
} % end of 10pt text font size definitions
% We provide the user-level command
% @fonttextsize 10
% (or 11) to redefine the text font size. pt is assumed.
%
\def\xword{10}
\def\xiword{11}
%
\parseargdef\fonttextsize{%
\def\textsizearg{#1}%
\wlog{doing @fonttextsize \textsizearg}%
%
% Set \globaldefs so that documents can use this inside @tex, since
% makeinfo 4.8 does not support it, but we need it nonetheless.
%
\begingroup \globaldefs=1
\ifx\textsizearg\xword \definetextfontsizex
\else \ifx\textsizearg\xiword \definetextfontsizexi
\else
\errhelp=\EMsimple
\errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'}
\fi\fi
\endgroup
}
% In order for the font changes to affect most math symbols and letters,
% we have to define the \textfont of the standard families. Since
% texinfo doesn't allow for producing subscripts and superscripts except
@ -1743,7 +1909,7 @@
% Set up the default fonts, so we can use them for creating boxes.
%
\textfonts \rm
\definetextfontsizexi
% Define these so they can be easily changed for other fonts.
\def\angleleft{$\langle$}

View file

@ -55,7 +55,13 @@ Then the formatting appears on the screen in Emacs while you edit.
If you need to edit pictures made out of text characters (commonly
referred to as ``ASCII art''), use @kbd{M-x edit-picture} to enter
Picture mode, a special major mode for editing such pictures.
@inforef{Picture Mode,, emacs-xtra}.
@iftex
@xref{Picture Mode,,, emacs-xtra, Specialized Emacs Features}.
@end iftex
@ifnottex
@xref{Picture Mode}.
@end ifnottex
@cindex skeletons
@cindex templates

View file

@ -1831,9 +1831,15 @@ should you want to add your own.
@section Filename completion
@cindex filename completion
Filename completion works with @value{tramp} for both completing methods,
user names and machine names (except multi hop methods) as well as for
files on remote machines.
Filename completion works with @value{tramp} for completion of method
names, of user names and of machine names (except multi-hop methods)
as well as for completion of file names on remote machines.
@ifset emacs
In order to enable this, Partial Completion mode must be set on.
@ifinfo
@xref{Completion Options, , , @value{emacsdir}}.
@end ifinfo
@end ifset
If you, for example, type @kbd{C-x C-f @value{prefix}t
@key{TAB}}, @value{tramp} might give you as result the choice for

View file

@ -58,8 +58,14 @@ Search}).
like @kbd{C-g}. The reason is that it is not feasible, on MS-DOS, to
recognize @kbd{C-g} while a command is running, between interactions
with the user. By contrast, it @emph{is} feasible to recognize
@kbd{C-@key{BREAK}} at all times. @xref{MS-DOS Keyboard,,,emacs-xtra,
Specialized Emacs Features}.
@kbd{C-@key{BREAK}} at all times.
@iftex
@xref{MS-DOS Keyboard,,,emacs-xtra, Specialized Emacs Features}.
@end iftex
@ifnottex
@xref{MS-DOS Keyboard}.
@end ifnottex
@findex keyboard-quit
@kbd{C-g} works by setting the variable @code{quit-flag} to @code{t}

32
man/vc-xtra.texi Normal file
View file

@ -0,0 +1,32 @@
@c This is part of the Emacs manual.
@c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@c
@c This file is included in emacs-xtra.texi when producing the printed
@c version.
@iftex
@node Advanced VC Usage
@section Advanced VC Usage
Commonly used features of Emacs' version control (VC) support are
described in the main Emacs manual (@pxref{Version Control,,,emacs,
the Emacs Manual}). This chapter describes more advanced VC usage.
@menu
* VC Dired Mode:: Listing files managed by version control.
* VC Dired Commands:: Commands to use in a VC Dired buffer.
* Remote Repositories:: Efficient access to remote CVS servers.
* Snapshots:: Sets of file versions treated as a unit.
* Miscellaneous VC:: Various other commands and features of VC.
* Customizing VC:: Variables that change VC's behavior.
@end menu
@end iftex
@iftex
@include vc1-xtra.texi
@include vc2-xtra.texi
@end iftex
@ignore
arch-tag: 11a18d0e-1baf-49da-8e38-f61195ae4dc3
@end ignore

151
man/vc1-xtra.texi Normal file
View file

@ -0,0 +1,151 @@
@c This is part of the Emacs manual.
@c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@c
@c This file is included either in vc-xtra.texi (when producing the
@c printed version) or in the main Emacs manual (for the on-line version).
@node VC Dired Mode
@subsection Dired under VC
@cindex PCL-CVS
@pindex cvs
@cindex CVS Dired Mode
The VC Dired Mode described here works with all the version control
systems that VC supports. Another more powerful facility, designed
specifically for CVS, is called PCL-CVS. @xref{Top, , About PCL-CVS,
pcl-cvs, PCL-CVS --- The Emacs Front-End to CVS}.
@kindex C-x v d
@findex vc-directory
When you are working on a large program, it is often useful to find
out which files have changed within an entire directory tree, or to view
the status of all files under version control at once, and to perform
version control operations on collections of files. You can use the
command @kbd{C-x v d} (@code{vc-directory}) to make a directory listing
that includes only files relevant for version control.
@vindex vc-dired-terse-display
@kbd{C-x v d} creates a buffer which uses VC Dired Mode. This looks
much like an ordinary Dired buffer
@iftex
(@pxref{Dired,,,emacs, the Emacs Manual});
@end iftex
@ifnottex
(@pxref{Dired});
@end ifnottex
however, normally it shows only the noteworthy files (those locked or
not up-to-date). This is called @dfn{terse display}. If you set the
variable @code{vc-dired-terse-display} to @code{nil}, then VC Dired
shows all relevant files---those managed under version control, plus
all subdirectories (@dfn{full display}). The command @kbd{v t} in a
VC Dired buffer toggles between terse display and full display
(@pxref{VC Dired Commands}).
@vindex vc-dired-recurse
By default, VC Dired produces a recursive listing of noteworthy or
relevant files at or below the given directory. You can change this by
setting the variable @code{vc-dired-recurse} to @code{nil}; then VC
Dired shows only the files in the given directory.
The line for an individual file shows the version control state in the
place of the hard link count, owner, group, and size of the file. If
the file is unmodified, in sync with the master file, the version
control state shown is blank. Otherwise it consists of text in
parentheses. Under RCS and SCCS, the name of the user locking the file
is shown; under CVS, an abbreviated version of the @samp{cvs status}
output is used. Here is an example using RCS:
@smallexample
@group
/home/jim/project:
-rw-r--r-- (jim) Apr 2 23:39 file1
-r--r--r-- Apr 5 20:21 file2
@end group
@end smallexample
@noindent
The files @samp{file1} and @samp{file2} are under version control,
@samp{file1} is locked by user jim, and @samp{file2} is unlocked.
Here is an example using CVS:
@smallexample
@group
/home/joe/develop:
-rw-r--r-- (modified) Aug 2 1997 file1.c
-rw-r--r-- Apr 4 20:09 file2.c
-rw-r--r-- (merge) Sep 13 1996 file3.c
@end group
@end smallexample
Here @samp{file1.c} is modified with respect to the repository, and
@samp{file2.c} is not. @samp{file3.c} is modified, but other changes
have also been checked in to the repository---you need to merge them
with the work file before you can check it in.
@vindex vc-stay-local
@vindex vc-cvs-stay-local
In the above, if the repository were on a remote machine, VC would
only contact it when the variable @code{vc-stay-local} (or
@code{vc-cvs-stay-local}) is nil (@pxref{CVS Options}). This is
because access to the repository may be slow, or you may be working
offline and not have access to the repository at all. As a
consequence, VC would not be able to tell you that @samp{file3.c} is
in the ``merge'' state; you would learn that only when you try to
check-in your modified copy of the file, or use a command such as
@kbd{C-x v m}.
In practice, this is not a problem because CVS handles this case
consistently whenever it arises. In VC, you'll simply get prompted to
merge the remote changes into your work file first. The benefits of
less network communication usually outweigh the disadvantage of not
seeing remote changes immediately.
@vindex vc-directory-exclusion-list
When VC Dired displays subdirectories (in the ``full'' display mode),
it omits some that should never contain any files under version control.
By default, this includes Version Control subdirectories such as
@samp{RCS} and @samp{CVS}; you can customize this by setting the
variable @code{vc-directory-exclusion-list}.
You can fine-tune VC Dired's format by typing @kbd{C-u C-x v d}---as in
ordinary Dired, that allows you to specify additional switches for the
@samp{ls} command.
@node VC Dired Commands
@subsection VC Dired Commands
All the usual Dired commands work normally in VC Dired mode, except
for @kbd{v}, which is redefined as the version control prefix. You can
invoke VC commands such as @code{vc-diff} and @code{vc-print-log} by
typing @kbd{v =}, or @kbd{v l}, and so on. Most of these commands apply
to the file name on the current line.
The command @kbd{v v} (@code{vc-next-action}) operates on all the
marked files, so that you can lock or check in several files at once.
If it operates on more than one file, it handles each file according to
its current state; thus, it might lock one file, but check in another
file. This could be confusing; it is up to you to avoid confusing
behavior by marking a set of files that are in a similar state. If no
files are marked, @kbd{v v} operates on the file in the current line.
If any files call for check-in, @kbd{v v} reads a single log entry,
then uses it for all the files being checked in. This is convenient for
registering or checking in several files at once, as part of the same
change.
@findex vc-dired-toggle-terse-mode
@findex vc-dired-mark-locked
You can toggle between terse display (only locked files, or files not
up-to-date) and full display at any time by typing @kbd{v t}
(@code{vc-dired-toggle-terse-mode}). There is also a special command
@kbd{* l} (@code{vc-dired-mark-locked}), which marks all files currently
locked (or, with CVS, all files not up-to-date). Thus, typing @kbd{* l
t k} is another way to delete from the buffer all files except those
currently locked.
@ignore
arch-tag: 8e8c2a01-ad41-4e61-a89a-60131ad67263
@end ignore

789
man/vc2-xtra.texi Normal file
View file

@ -0,0 +1,789 @@
@c This is part of the Emacs manual.
@c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@c
@c This file is included either in vc-xtra.texi (when producing the
@c printed version) or in the main Emacs manual (for the on-line version).
@node Remote Repositories
@subsection Remote Repositories
@cindex remote repositories (CVS)
A common way of using CVS is to set up a central CVS repository on
some Internet host, then have each developer check out a personal
working copy of the files on his local machine. Committing changes to
the repository, and picking up changes from other users into one's own
working area, then works by direct interactions with the CVS server.
One difficulty is that access to the CVS server is often slow, and
that developers might need to work off-line as well. VC is designed
to reduce the amount of network interaction necessary.
@menu
* Version Backups:: Keeping local copies of repository versions.
* Local Version Control:: Using another version system for local editing.
@end menu
@node Version Backups
@subsubsection Version Backups
@cindex version backups
@cindex automatic version backups
When VC sees that the CVS repository for a file is on a remote
machine, it automatically makes local backups of unmodified versions
of the file---@dfn{automatic version backups}. This means that you
can compare the file to the repository version (@kbd{C-x v =}), or
revert to that version (@kbd{C-x v u}), without any network
interactions.
The local copy of the unmodified file is called a @dfn{version
backup} to indicate that it corresponds exactly to a version that is
stored in the repository. Note that version backups are not the same
as ordinary Emacs backup files
@iftex
(@pxref{Backup,,,emacs, the Emacs Manual}).
@end iftex
@ifnottex
(@pxref{Backup}).
@end ifnottex
But they follow a similar naming convention.
For a file that comes from a remote CVS repository, VC makes a
version backup whenever you save the first changes to the file, and
removes it after you have committed your modified version to the
repository. You can disable the making of automatic version backups by
setting @code{vc-cvs-stay-local} to @code{nil} (@pxref{CVS Options}).
@cindex manual version backups
The name of the automatic version backup for version @var{version}
of file @var{file} is @code{@var{file}.~@var{version}.~}. This is
almost the same as the name used by @kbd{C-x v ~}
@iftex
(@pxref{Old Versions,,,emacs, the Emacs Manual}),
@end iftex
@ifnottex
(@pxref{Old Versions}),
@end ifnottex
the only difference being the additional dot (@samp{.}) after the
version number. This similarity is intentional, because both kinds of
files store the same kind of information. The file made by @kbd{C-x v
~} acts as a @dfn{manual version backup}.
All the VC commands that operate on old versions of a file can use
both kinds of version backups. For instance, @kbd{C-x v ~} uses
either an automatic or a manual version backup, if possible, to get
the contents of the version you request. Likewise, @kbd{C-x v =} and
@kbd{C-x v u} use either an automatic or a manual version backup, if
one of them exists, to get the contents of a version to compare or
revert to. If you changed a file outside of Emacs, so that no
automatic version backup was created for the previous text, you can
create a manual backup of that version using @kbd{C-x v ~}, and thus
obtain the benefit of the local copy for Emacs commands.
The only difference in Emacs's handling of manual and automatic
version backups, once they exist, is that Emacs deletes automatic
version backups when you commit to the repository. By contrast,
manual version backups remain until you delete them.
@node Local Version Control
@subsubsection Local Version Control
@cindex local version control
@cindex local back end (version control)
When you make many changes to a file that comes from a remote
repository, it can be convenient to have version control on your local
machine as well. You can then record intermediate versions, revert to
a previous state, etc., before you actually commit your changes to the
remote server.
VC lets you do this by putting a file under a second, local version
control system, so that the file is effectively registered in two
systems at the same time. For the description here, we will assume
that the remote system is CVS, and you use RCS locally, although the
mechanism works with any combination of version control systems
(@dfn{back ends}).
To make it work with other back ends, you must make sure that the
``more local'' back end comes before the ``more remote'' back end in
the setting of @code{vc-handled-backends} (@pxref{Customizing VC}). By
default, this variable is set up so that you can use remote CVS and
local RCS as described here.
To start using local RCS for a file that comes from a remote CVS
server, you must @emph{register the file in RCS}, by typing @kbd{C-u
C-x v v rcs @key{RET}}. (In other words, use @code{vc-next-action} with a
prefix argument, and specify RCS as the back end.)
You can do this at any time; it does not matter whether you have
already modified the file with respect to the version in the CVS
repository. If possible, VC tries to make the RCS master start with
the unmodified repository version, then checks in any local changes
as a new version. This works if you have not made any changes yet, or
if the unmodified repository version exists locally as a version
backup (@pxref{Version Backups}). If the unmodified version is not
available locally, the RCS master starts with the modified version;
the only drawback to this is that you cannot compare your changes
locally to what is stored in the repository.
The version number of the RCS master is derived from the current CVS
version, starting a branch from it. For example, if the current CVS
version is 1.23, the local RCS branch will be 1.23.1. Version 1.23 in
the RCS master will be identical to version 1.23 under CVS; your first
changes are checked in as 1.23.1.1. (If the unmodified file is not
available locally, VC will check in the modified file twice, both as
1.23 and 1.23.1.1, to make the revision numbers consistent.)
If you do not use locking under CVS (the default), locking is also
disabled for RCS, so that editing under RCS works exactly as under
CVS.
When you are done with local editing, you can commit the final version
back to the CVS repository by typing @kbd{C-u C-x v v cvs @key{RET}}.
This initializes the log entry buffer
@iftex
(@pxref{Log Buffer,,,emacs, the Emacs Manual})
@end iftex
@ifnottex
(@pxref{Log Buffer})
@end ifnottex
to contain all the log entries you have recorded in the RCS master;
you can edit them as you wish, and then commit in CVS by typing
@kbd{C-c C-c}. If the commit is successful, VC removes the RCS
master, so that the file is once again registered under CVS only.
(The RCS master is not actually deleted, just renamed by appending
@samp{~} to the name, so that you can refer to it later if you wish.)
While using local RCS, you can pick up recent changes from the CVS
repository into your local file, or commit some of your changes back
to CVS, without terminating local RCS version control. To do this,
switch to the CVS back end temporarily, with the @kbd{C-x v b} command:
@table @kbd
@item C-x v b
Switch to another back end that the current file is registered
under (@code{vc-switch-backend}).
@item C-u C-x v b @var{backend} @key{RET}
Switch to @var{backend} for the current file.
@end table
@kindex C-x v b
@findex vc-switch-backend
@kbd{C-x v b} does not change the buffer contents, or any files; it
only changes VC's perspective on how to handle the file. Any
subsequent VC commands for that file will operate on the back end that
is currently selected.
If the current file is registered in more than one back end, typing
@kbd{C-x v b} ``cycles'' through all of these back ends. With a
prefix argument, it asks for the back end to use in the minibuffer.
Thus, if you are using local RCS, and you want to pick up some recent
changes in the file from remote CVS, first visit the file, then type
@kbd{C-x v b} to switch to CVS, and finally use @kbd{C-x v m
@key{RET}} to merge the news
@iftex
(@pxref{Merging,,,emacs, the Emacs Manual}).
@end iftex
@ifnottex
(@pxref{Merging}).
@end ifnottex
You can then switch back to RCS by typing @kbd{C-x v b} again, and
continue to edit locally.
But if you do this, the revision numbers in the RCS master no longer
correspond to those of CVS. Technically, this is not a problem, but
it can become difficult to keep track of what is in the CVS repository
and what is not. So we suggest that you return from time to time to
CVS-only operation, by committing your local changes back to the
repository using @kbd{C-u C-x v v cvs @key{RET}}.
@node Snapshots
@subsection Snapshots
@cindex snapshots and version control
A @dfn{snapshot} is a named set of file versions (one for each
registered file) that you can treat as a unit. One important kind of
snapshot is a @dfn{release}, a (theoretically) stable version of the
system that is ready for distribution to users.
@menu
* Making Snapshots:: The snapshot facilities.
* Snapshot Caveats:: Things to be careful of when using snapshots.
@end menu
@node Making Snapshots
@subsubsection Making and Using Snapshots
There are two basic commands for snapshots; one makes a
snapshot with a given name, the other retrieves a named snapshot.
@table @code
@kindex C-x v s
@findex vc-create-snapshot
@item C-x v s @var{name} @key{RET}
Define the last saved versions of every registered file in or under the
current directory as a snapshot named @var{name}
(@code{vc-create-snapshot}).
@kindex C-x v r
@findex vc-retrieve-snapshot
@item C-x v r @var{name} @key{RET}
For all registered files at or below the current directory level, select
whatever versions correspond to the snapshot @var{name}
(@code{vc-retrieve-snapshot}).
This command reports an error if any files are locked at or below the
current directory, without changing anything; this is to avoid
overwriting work in progress.
@end table
A snapshot uses a very small amount of resources---just enough to record
the list of file names and which version belongs to the snapshot. Thus,
you need not hesitate to create snapshots whenever they are useful.
You can give a snapshot name as an argument to @kbd{C-x v =} or
@kbd{C-x v ~}
@iftex
(@pxref{Old Versions,,,emacs, the Emacs Manual}).
@end iftex
@ifnottex
(@pxref{Old Versions}).
@end ifnottex
Thus, you can use it to compare a snapshot against the current files,
or two snapshots against each other, or a snapshot against a named
version.
@node Snapshot Caveats
@subsubsection Snapshot Caveats
@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
snapshots made using RCS through VC are visible even when you bypass VC.
With CVS, Meta-CVS, and Subversion, VC also uses the native
mechanism provided by that back end to make snapshots and retrieve them
(@dfn{tags} for CVS and Meta-CVS, @dfn{copies} for Subversion).
@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.
There is no support for VC snapshots using GNU Arch yet.
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.
File renaming and deletion can create some difficulties with snapshots.
This is not a VC-specific problem, but a general design issue in version
control systems that no one has solved very well yet.
If you rename a registered file, you need to rename its master along
with it (the command @code{vc-rename-file} does this automatically). If
you are using SCCS, you must also update the records of the snapshot, to
mention the file by its new name (@code{vc-rename-file} does this,
too). An old snapshot that refers to a master file that no longer
exists under the recorded name is invalid; VC can no longer retrieve
it. It would be beyond the scope of this manual to explain enough about
RCS and SCCS to explain how to update the snapshots by hand.
Using @code{vc-rename-file} makes the snapshot remain valid for
retrieval, but it does not solve all problems. For example, some of the
files in your program probably refer to others by name. At the very
least, the makefile probably mentions the file that you renamed. If you
retrieve an old snapshot, the renamed file is retrieved under its new
name, which is not the name that the makefile expects. So the program
won't really work as retrieved.
@node Miscellaneous VC
@subsection Miscellaneous Commands and Features of VC
This section explains the less-frequently-used features of VC.
@menu
* Change Logs and VC:: Generating a change log file from log entries.
* Renaming and VC:: A command to rename both the source and master
file correctly.
* Version Headers:: Inserting version control headers into working files.
@end menu
@node Change Logs and VC
@subsubsection Change Logs and VC
If you use RCS or CVS for a program and also maintain a change log
file for it
@iftex
(@pxref{Change Log,,,emacs, the Emacs Manual}),
@end iftex
@ifnottex
(@pxref{Change Log}),
@end ifnottex
you can generate change log entries automatically from the version
control log entries:
@table @kbd
@item C-x v a
@kindex C-x v a
@findex vc-update-change-log
Visit the current directory's change log file and, for registered files
in that directory, create new entries for versions checked in since the
most recent entry in the change log file.
(@code{vc-update-change-log}).
This command works with RCS or CVS only, not with any of the other
back ends.
@item C-u C-x v a
As above, but only find entries for the current buffer's file.
@item M-1 C-x v a
As above, but find entries for all the currently visited files that are
maintained with version control. This works only with RCS, and it puts
all entries in the log for the default directory, which may not be
appropriate.
@end table
For example, suppose the first line of @file{ChangeLog} is dated
1999-04-10, and that the only check-in since then was by Nathaniel
Bowditch to @file{rcs2log} on 1999-05-22 with log text @samp{Ignore log
messages that start with `#'.}. Then @kbd{C-x v a} visits
@file{ChangeLog} and inserts text like this:
@iftex
@medbreak
@end iftex
@smallexample
@group
1999-05-22 Nathaniel Bowditch <nat@@apn.org>
* rcs2log: Ignore log messages that start with `#'.
@end group
@end smallexample
@iftex
@medbreak
@end iftex
@noindent
You can then edit the new change log entry further as you wish.
Some of the new change log entries may duplicate what's already in
ChangeLog. You will have to remove these duplicates by hand.
Normally, the log entry for file @file{foo} is displayed as @samp{*
foo: @var{text of log entry}}. The @samp{:} after @file{foo} is omitted
if the text of the log entry starts with @w{@samp{(@var{functionname}):
}}. For example, if the log entry for @file{vc.el} is
@samp{(vc-do-command): Check call-process status.}, then the text in
@file{ChangeLog} looks like this:
@iftex
@medbreak
@end iftex
@smallexample
@group
1999-05-06 Nathaniel Bowditch <nat@@apn.org>
* vc.el (vc-do-command): Check call-process status.
@end group
@end smallexample
@iftex
@medbreak
@end iftex
When @kbd{C-x v a} adds several change log entries at once, it groups
related log entries together if they all are checked in by the same
author at nearly the same time. If the log entries for several such
files all have the same text, it coalesces them into a single entry.
For example, suppose the most recent check-ins have the following log
entries:
@flushleft
@bullet{} For @file{vc.texinfo}: @samp{Fix expansion typos.}
@bullet{} For @file{vc.el}: @samp{Don't call expand-file-name.}
@bullet{} For @file{vc-hooks.el}: @samp{Don't call expand-file-name.}
@end flushleft
@noindent
They appear like this in @file{ChangeLog}:
@iftex
@medbreak
@end iftex
@smallexample
@group
1999-04-01 Nathaniel Bowditch <nat@@apn.org>
* vc.texinfo: Fix expansion typos.
* vc.el, vc-hooks.el: Don't call expand-file-name.
@end group
@end smallexample
@iftex
@medbreak
@end iftex
Normally, @kbd{C-x v a} separates log entries by a blank line, but you
can mark several related log entries to be clumped together (without an
intervening blank line) by starting the text of each related log entry
with a label of the form @w{@samp{@{@var{clumpname}@} }}. The label
itself is not copied to @file{ChangeLog}. For example, suppose the log
entries are:
@flushleft
@bullet{} For @file{vc.texinfo}: @samp{@{expand@} Fix expansion typos.}
@bullet{} For @file{vc.el}: @samp{@{expand@} Don't call expand-file-name.}
@bullet{} For @file{vc-hooks.el}: @samp{@{expand@} Don't call expand-file-name.}
@end flushleft
@noindent
Then the text in @file{ChangeLog} looks like this:
@iftex
@medbreak
@end iftex
@smallexample
@group
1999-04-01 Nathaniel Bowditch <nat@@apn.org>
* vc.texinfo: Fix expansion typos.
* vc.el, vc-hooks.el: Don't call expand-file-name.
@end group
@end smallexample
@iftex
@medbreak
@end iftex
A log entry whose text begins with @samp{#} is not copied to
@file{ChangeLog}. For example, if you merely fix some misspellings in
comments, you can log the change with an entry beginning with @samp{#}
to avoid putting such trivia into @file{ChangeLog}.
@node Renaming and VC
@subsubsection Renaming VC Work Files and Master Files
@findex vc-rename-file
When you rename a registered file, you must also rename its master
file correspondingly to get proper results. Use @code{vc-rename-file}
to rename the source file as you specify, and rename its master file
accordingly. It also updates any snapshots (@pxref{Snapshots}) that
mention the file, so that they use the new name; despite this, the
snapshot thus modified may not completely work (@pxref{Snapshot
Caveats}).
Some back ends do not provide an explicit rename operation to their
repositories. After issuing @code{vc-rename-file}, use @kbd{C-x v v}
on the original and renamed buffers and provide the necessary edit
log.
You cannot use @code{vc-rename-file} on a file that is locked by
someone else.
@node Version Headers
@subsubsection Inserting Version Control Headers
Sometimes it is convenient to put version identification strings
directly into working files. Certain special strings called
@dfn{version headers} are replaced in each successive version by the
number of that version, the name of the user who created it, and other
relevant information. All of the back ends that VC supports have such
a mechanism, except GNU Arch.
VC does not normally use the information contained in these headers.
The exception is RCS---with RCS, version headers are sometimes more
reliable than the master file to determine which version of the file
you are editing. Note that in a multi-branch environment, version
headers are necessary to make VC behave correctly
@iftex
(@pxref{Multi-User Branching,,,emacs, the Emacs Manual}).
@end iftex
@ifnottex
(@pxref{Multi-User Branching}).
@end ifnottex
Searching for RCS version headers is controlled by the variable
@code{vc-consult-headers}. If it is non-@code{nil} (the default),
Emacs searches for headers to determine the version number you are
editing. Setting it to @code{nil} disables this feature.
Note that although CVS uses the same kind of version headers as RCS
does, VC never searches for these headers if you are using CVS,
regardless of the above setting.
@kindex C-x v h
@findex vc-insert-headers
You can use the @kbd{C-x v h} command (@code{vc-insert-headers}) to
insert a suitable header string.
@table @kbd
@item C-x v h
Insert headers in a file for use with your version-control system.
@end table
@vindex vc-@var{backend}-header
The default header string is @samp{@w{$}Id$} for RCS and
@samp{@w{%}W%} for SCCS. You can specify other headers to insert by
setting the variables @code{vc-@var{backend}-header} where
@var{backend} is @code{rcs} or @code{sccs}.
Instead of a single string, you can specify a list of strings; then
each string in the list is inserted as a separate header on a line of
its own.
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
header, if the Emacs Lisp file containing it is maintained with
version control.
@vindex vc-comment-alist
Each header is inserted surrounded by tabs, inside comment delimiters,
on a new line at point. Normally the ordinary comment
start and comment end strings of the current mode are used, but for
certain modes, there are special comment delimiters for this purpose;
the variable @code{vc-comment-alist} specifies them. Each element of
this list has the form @code{(@var{mode} @var{starter} @var{ender})}.
@vindex vc-static-header-alist
The variable @code{vc-static-header-alist} specifies further strings
to add based on the name of the buffer. Its value should be a list of
elements of the form @code{(@var{regexp} . @var{format})}. Whenever
@var{regexp} matches the buffer name, @var{format} is inserted as part
of the header. A header line is inserted for each element that matches
the buffer name, and for each string specified by
@code{vc-@var{backend}-header}. The header line is made by processing the
string from @code{vc-@var{backend}-header} with the format taken from the
element. The default value for @code{vc-static-header-alist} is as follows:
@example
@group
(("\\.c$" .
"\n#ifndef lint\nstatic char vcid[] = \"\%s\";\n\
#endif /* lint */\n"))
@end group
@end example
@noindent
It specifies insertion of text of this form:
@example
@group
#ifndef lint
static char vcid[] = "@var{string}";
#endif /* lint */
@end group
@end example
@noindent
Note that the text above starts with a blank line.
If you use more than one version header in a file, put them close
together in the file. The mechanism in @code{revert-buffer} that
preserves markers may not handle markers positioned between two version
headers.
@node Customizing VC
@subsection Customizing VC
@vindex vc-handled-backends
The variable @code{vc-handled-backends} determines which version
control systems VC should handle. The default value is @code{(RCS CVS
SVN SCCS Arch MCVS)}, so it contains all six version systems that are
currently supported. If you want VC to ignore one or more of these
systems, exclude its name from the list. To disable VC entirely, set
this variable to @code{nil}.
The order of systems in the list is significant: when you visit a file
registered in more than one system (@pxref{Local Version Control}), VC
uses the system that comes first in @code{vc-handled-backends} by
default. The order is also significant when you register a file for
the first time, see
@iftex
@ref{Registering,,,emacs, the Emacs Manual},
@end iftex
@ifnottex
@ref{Registering},
@end ifnottex
for details.
@menu
* General VC Options:: Options that apply to multiple back ends.
* RCS and SCCS:: Options for RCS and SCCS.
* CVS Options:: Options for CVS.
@end menu
@node General VC Options
@subsubsection General Options
@vindex vc-make-backup-files
Emacs normally does not save backup files for source files that are
maintained with version control. If you want to make backup files even
for files that use version control, set the variable
@code{vc-make-backup-files} to a non-@code{nil} value.
@vindex vc-keep-workfiles
Normally the work file exists all the time, whether it is locked or
not. If you set @code{vc-keep-workfiles} to @code{nil}, then checking
in a new version with @kbd{C-x v v} deletes the work file; but any
attempt to visit the file with Emacs creates it again. (With CVS, work
files are always kept.)
@vindex vc-follow-symlinks
Editing a version-controlled file through a symbolic link can be
dangerous. It bypasses the version control system---you can edit the
file without locking it, and fail to check your changes in. Also,
your changes might overwrite those of another user. To protect against
this, VC checks each symbolic link that you visit, to see if it points
to a file under version control.
The variable @code{vc-follow-symlinks} controls what to do when a
symbolic link points to a version-controlled file. If it is @code{nil},
VC only displays a warning message. If it is @code{t}, VC automatically
follows the link, and visits the real file instead, telling you about
this in the echo area. If the value is @code{ask} (the default), VC
asks you each time whether to follow the link.
@vindex vc-suppress-confirm
If @code{vc-suppress-confirm} is non-@code{nil}, then @kbd{C-x v v}
and @kbd{C-x v i} can save the current buffer without asking, and
@kbd{C-x v u} also operates without asking for confirmation. (This
variable does not affect @kbd{C-x v c}; that operation is so drastic
that it should always ask for confirmation.)
@vindex vc-command-messages
VC mode does much of its work by running the shell commands for RCS,
CVS and SCCS. If @code{vc-command-messages} is non-@code{nil}, VC
displays messages to indicate which shell commands it runs, and
additional messages when the commands finish.
@vindex vc-path
You can specify additional directories to search for version control
programs by setting the variable @code{vc-path}. These directories
are searched before the usual search path. It is rarely necessary to
set this variable, because VC normally finds the proper files
automatically.
@node RCS and SCCS
@subsubsection Options for RCS and SCCS
@cindex non-strict locking (RCS)
@cindex locking, non-strict (RCS)
By default, RCS uses locking to coordinate the activities of several
users, but there is a mode called @dfn{non-strict locking} in which
you can check-in changes without locking the file first. Use
@samp{rcs -U} to switch to non-strict locking for a particular file,
see the @code{rcs} manual page for details.
When deducing the version control state of an RCS file, VC first
looks for an RCS version header string in the file (@pxref{Version
Headers}). If there is no header string, VC normally looks at the
file permissions of the work file; this is fast. But there might be
situations when the file permissions cannot be trusted. In this case
the master file has to be consulted, which is rather expensive. Also
the master file can only tell you @emph{if} there's any lock on the
file, but not whether your work file really contains that locked
version.
@vindex vc-consult-headers
You can tell VC not to use version headers to determine the file
status by setting @code{vc-consult-headers} to @code{nil}. VC then
always uses the file permissions (if it is supposed to trust them), or
else checks the master file.
@vindex vc-mistrust-permissions
You can specify the criterion for whether to trust the file
permissions by setting the variable @code{vc-mistrust-permissions}.
Its value can be @code{t} (always mistrust the file permissions and
check the master file), @code{nil} (always trust the file
permissions), or a function of one argument which makes the decision.
The argument is the directory name of the @file{RCS} subdirectory. A
non-@code{nil} value from the function says to mistrust the file
permissions. If you find that the file permissions of work files are
changed erroneously, set @code{vc-mistrust-permissions} to @code{t}.
Then VC always checks the master file to determine the file's status.
VC determines the version control state of files under SCCS much as
with RCS. It does not consider SCCS version headers, though. Thus,
the variable @code{vc-mistrust-permissions} affects SCCS use, but
@code{vc-consult-headers} does not.
@node CVS Options
@subsubsection Options specific for CVS
@cindex locking (CVS)
By default, CVS does not use locking to coordinate the activities of
several users; anyone can change a work file at any time. However,
there are ways to restrict this, resulting in behavior that resembles
locking.
@cindex CVSREAD environment variable (CVS)
For one thing, you can set the @env{CVSREAD} environment variable
(the value you use makes no difference). If this variable is defined,
CVS makes your work files read-only by default. In Emacs, you must
type @kbd{C-x v v} to make the file writable, so that editing works
in fact similar as if locking was used. Note however, that no actual
locking is performed, so several users can make their files writable
at the same time. When setting @env{CVSREAD} for the first time, make
sure to check out all your modules anew, so that the file protections
are set correctly.
@cindex cvs watch feature
@cindex watching files (CVS)
Another way to achieve something similar to locking is to use the
@dfn{watch} feature of CVS. If a file is being watched, CVS makes it
read-only by default, and you must also use @kbd{C-x v v} in Emacs to
make it writable. VC calls @code{cvs edit} to make the file writable,
and CVS takes care to notify other developers of the fact that you
intend to change the file. See the CVS documentation for details on
using the watch feature.
@vindex vc-stay-local
@vindex vc-cvs-stay-local
@cindex remote repositories (CVS)
When a file's repository is on a remote machine, VC tries to keep
network interactions to a minimum. This is controlled by the variable
@code{vc-cvs-stay-local}. There is another variable,
@code{vc-stay-local}, which enables the feature also for other back
ends that support it, including CVS. In the following, we will talk
only about @code{vc-cvs-stay-local}, but everything applies to
@code{vc-stay-local} as well.
If @code{vc-cvs-stay-local} is @code{t} (the default), then VC uses
only the entry in the local CVS subdirectory to determine the file's
state (and possibly information returned by previous CVS commands).
One consequence of this is that when you have modified a file, and
somebody else has already checked in other changes to the file, you
are not notified of it until you actually try to commit. (But you can
try to pick up any recent changes from the repository first, using
@kbd{C-x v m @key{RET}},
@iftex
@pxref{Merging,,,emacs, the Emacs Manual}).
@end iftex
@ifnottex
@pxref{Merging}).
@end ifnottex
When @code{vc-cvs-stay-local} is @code{t}, VC also makes local
version backups, so that simple diff and revert operations are
completely local (@pxref{Version Backups}).
On the other hand, if you set @code{vc-cvs-stay-local} to @code{nil},
then VC queries the remote repository @emph{before} it decides what to
do in @code{vc-next-action} (@kbd{C-x v v}), just as it does for local
repositories. It also does not make any version backups.
You can also set @code{vc-cvs-stay-local} to a regular expression
that is matched against the repository host name; VC then stays local
only for repositories from hosts that match the pattern.
@vindex vc-cvs-global-switches
You can specify additional command line options to pass to all CVS
operations in the variable @code{vc-cvs-global-switches}. These
switches are inserted immediately after the @code{cvs} command, before
the name of the operation to invoke.
@ignore
arch-tag: 140b8629-4339-4b5e-9e50-72453e51615e
@end ignore

Some files were not shown because too many files have changed in this diff Show more