mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-01 11:14:55 +00:00
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-60
Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 259-273) - Update from CVS - lisp/replace.el (occur-engine): Bind `inhibit-field-text-motion' to t - Merge from gnus--rel--5.10 - Rename "field-at-point" to "field-at-pos" - (comint-insert-input): Remove redundant calls to setq and goto-char * gnus--rel--5.10 (patch 99-100) - Merge from emacs--devo--0 - Update from CVS
This commit is contained in:
commit
3bcf2b084a
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -23,23 +23,19 @@ face name prefixes should be in it for good results.
|
||||
|
||||
** Ask maintainers of refcard translations to update them.
|
||||
|
||||
** Check what should be deleted or updated in MORE.STUFF.
|
||||
|
||||
** 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
|
||||
|
||||
** Stefan Monnier's March 20 bug report about 3d boxes in header line.
|
||||
** JD Smith's 17 Apr 2006 bug report that CVS operations
|
||||
get mysterious unreproducible failures.
|
||||
|
||||
** David Hansen's bug report on 16 Apr 2006 about point-entered and
|
||||
point-left text properties.
|
||||
|
||||
** Is there a basic problem with cl-byte-compile-compiler-macro?
|
||||
|
||||
** Recalculate the tool bar height after changing the default font.
|
||||
(Bug report by Yamamoto Mistuharu, 31 Mar 2006)
|
||||
|
||||
** Markus Gritsch's report about Emacs looping on Windoze with the following
|
||||
.emacs file, and then reduce Emacs frame width to "something quite narrow":
|
||||
(setq-default truncate-lines t)
|
||||
@ -71,97 +67,6 @@ Lisp point of view.
|
||||
|
||||
** Check man/info.texi.
|
||||
|
||||
** Add missing years in copyright notices of all files.
|
||||
|
||||
Please record your name here and say which part of the distribution
|
||||
you're going to handle.
|
||||
|
||||
DIRECTORY STATUS IN CHARGE
|
||||
--------- ------ ---------
|
||||
etc (and subdirs) done Thien-Thi Nguyen (ttn(@gnu.org))
|
||||
leim done Kenichi Handa
|
||||
lib-src done ttn
|
||||
lisp done ttn
|
||||
lisp/calc done Jay Belanger
|
||||
lisp/calendar done Glenn Morris
|
||||
lisp/emacs-lisp done ttn
|
||||
lisp/emulation done ttn
|
||||
lisp/eshell done ttn
|
||||
lisp/gnus done Romain Francoise
|
||||
lisp/international done Kenichi Handa
|
||||
lisp/language done Kenichi Handa
|
||||
lisp/mail done ttn
|
||||
lisp/mh-e done Bill Wohler
|
||||
lisp/net done ttn
|
||||
lisp/obsolete done ttn
|
||||
lisp/play done Romain Francoise
|
||||
lisp/progmodes done Nick Roberts
|
||||
lisp/term done ttn
|
||||
lisp/textmodes done ttn
|
||||
lisp/url done ttn
|
||||
lispintro done ttn
|
||||
lispref done ttn
|
||||
lwlib done ttn
|
||||
m4 done ttn
|
||||
mac (and subdirs) done ttn
|
||||
man done ttn
|
||||
msdos done ttn
|
||||
nt (and subdirs) done ttn
|
||||
oldXMenu done ttn
|
||||
src (and subdirs) done ttn
|
||||
vms done ttn
|
||||
|
||||
** Check the Emacs manual.
|
||||
|
||||
Each manual section should be checked for factual correctness
|
||||
regarding recent changes by at least two people. After each file
|
||||
name, on the same line or the following line, come the names of the
|
||||
people who have checked it.
|
||||
|
||||
SECTION READERS
|
||||
-----------------------------
|
||||
man/abbrevs.texi Chong Yidong Joakim Verona
|
||||
man/anti.texi Chong Yidong
|
||||
man/basic.texi "Luc Teirlinck" Chong Yidong
|
||||
man/buffers.texi "Luc Teirlinck" Chong Yidong
|
||||
man/building.texi "Ted Zlatanov" <tzz@lifelogs.com>
|
||||
man/calendar.texi joakim@verona.se Chong Yidong
|
||||
man/cmdargs.texi Chong Yidong "Luc Teirlinck"
|
||||
man/commands.texi "Luc Teirlinck" Chong Yidong
|
||||
man/custom.texi Chong Yidong "Luc Teirlinck"
|
||||
man/dired.texi Chong Yidong joakim@verona.se
|
||||
man/display.texi "Luc Teirlinck" Chong Yidong
|
||||
man/emacs.texi "Luc Teirlinck" Lute Kamstra
|
||||
man/entering.texi "Luc Teirlinck" Chong Yidong
|
||||
man/files.texi "Luc Teirlinck" Chong Yidong
|
||||
man/fixit.texi "Luc Teirlinck" Chong Yidong
|
||||
man/frames.texi "Luc Teirlinck" Chong Yidong
|
||||
man/glossary.texi Chong Yidong
|
||||
man/help.texi "Luc Teirlinck" Chong Yidong
|
||||
man/indent.texi "Luc Teirlinck" Chong Yidong
|
||||
man/killing.texi "Luc Teirlinck" Chong Yidong
|
||||
man/kmacro.texi "Luc Teirlinck" Chong Yidong
|
||||
man/macos.texi Chong Yidong
|
||||
man/maintaining.texi Chong Yidong
|
||||
man/major.texi "Luc Teirlinck" Chong Yidong
|
||||
man/mark.texi "Luc Teirlinck" Chong Yidong
|
||||
man/mini.texi "Luc Teirlinck" Chong Yidong
|
||||
man/misc.texi Chong Yidong
|
||||
man/msdog.texi Chong Yidong
|
||||
man/mule.texi "Luc Teirlinck" Kenichi Handa
|
||||
man/m-x.texi "Luc Teirlinck" Chong Yidong
|
||||
man/picture.texi Joakim Verona <joakim@verona.se> Chong Yidong
|
||||
man/programs.texi "Stephen Eglen" Chong Yidong
|
||||
man/regs.texi "Luc Teirlinck" Chong Yidong
|
||||
man/rmail.texi Chong Yidong "Luc Teirlinck"
|
||||
man/screen.texi "Luc Teirlinck" Chong Yidong
|
||||
man/search.texi "Luc Teirlinck" Chong Yidong
|
||||
man/sending.texi Chong Yidong "Luc Teirlinck"
|
||||
man/text.texi "Luc Teirlinck" Chong Yidong
|
||||
man/trouble.texi Chong Yidong
|
||||
man/windows.texi "Luc Teirlinck" Chong Yidong
|
||||
man/xresources.texi
|
||||
|
||||
** Check the Emacs Lisp manual.
|
||||
|
||||
Each manual section should be checked for factual correctness
|
||||
|
@ -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.
|
||||
|
1672
etc/MH-E-NEWS
1672
etc/MH-E-NEWS
File diff suppressed because it is too large
Load Diff
91
etc/NEWS
91
etc/NEWS
@ -646,18 +646,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
|
||||
@ -665,7 +665,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
|
||||
@ -673,6 +673,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.
|
||||
@ -3130,7 +3162,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:
|
||||
@ -3632,6 +3664,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'.
|
||||
|
||||
@ -4069,38 +4110,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:
|
||||
|
||||
+++
|
||||
|
1
info/dir
1
info/dir
@ -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.
|
||||
|
@ -1,3 +1,9 @@
|
||||
2006-05-02 Francesco Potort,Al(B <pot@gnu.org>
|
||||
|
||||
* etags.c (Perl_functions): Free space allocated for var package.
|
||||
(Erlang_functions): Possibly free space allocated for var last.
|
||||
(Prolog_functions): Possibly free space allocated for var last.
|
||||
|
||||
2006-04-29 Dan Nicolaescu <dann@ics.uci.edu>
|
||||
|
||||
* sorted-doc.c (main): Initialize docs to NULL.
|
||||
|
@ -41,7 +41,7 @@
|
||||
* configuration file containing regexp definitions for etags.
|
||||
*/
|
||||
|
||||
char pot_etags_version[] = "@(#) pot revision number is 17.15";
|
||||
char pot_etags_version[] = "@(#) pot revision number is 17.17";
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
@ -4543,6 +4543,7 @@ Perl_functions (inf)
|
||||
lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
|
||||
}
|
||||
}
|
||||
free (package);
|
||||
}
|
||||
|
||||
|
||||
@ -5441,6 +5442,8 @@ Prolog_functions (inf)
|
||||
last[len] = '\0';
|
||||
}
|
||||
}
|
||||
if (last != NULL)
|
||||
free (last);
|
||||
}
|
||||
|
||||
|
||||
@ -5597,7 +5600,11 @@ Erlang_functions (inf)
|
||||
else if (cp[0] == '-') /* attribute, e.g. "-define" */
|
||||
{
|
||||
erlang_attribute (cp);
|
||||
last = NULL;
|
||||
if (last != NULL)
|
||||
{
|
||||
free (last);
|
||||
last = NULL;
|
||||
}
|
||||
}
|
||||
else if ((len = erlang_func (cp, last)) > 0)
|
||||
{
|
||||
@ -5614,6 +5621,8 @@ Erlang_functions (inf)
|
||||
last[len] = '\0';
|
||||
}
|
||||
}
|
||||
if (last != NULL)
|
||||
free (last);
|
||||
}
|
||||
|
||||
|
||||
|
364
lisp/ChangeLog
364
lisp/ChangeLog
@ -1,3 +1,339 @@
|
||||
2006-05-10 J.D. Smith <jdsmith@as.arizona.edu>
|
||||
|
||||
* progmodes/idlw-shell.el (idlwave-shell-move-or-history):
|
||||
Remove spurious move to point-max (new comint behavior fixes).
|
||||
|
||||
* progmodes/idlwave.el (idlwave-push-mark): Removed obsolete
|
||||
compatibility function (Emacs 18/19).
|
||||
(idlwave-is-continuation-line): Always return point at start of
|
||||
previous non-blank continuation line.
|
||||
`keyword-parameters': Fix continued comment font-lock matcher.
|
||||
(idlwave-font-lock-fontify-region): Written, use as
|
||||
font-lock-fontify-region-function, to fix continued keyword
|
||||
fontification issues.
|
||||
|
||||
2006-05-10 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
|
||||
|
||||
* term/mac-win.el (mac-font-panel-mode): Doc fix.
|
||||
(mac-service-selection, mac-service-open-file)
|
||||
(mac-service-open-selection, mac-service-mail-selection)
|
||||
(mac-service-mail-to, mac-service-insert-text): Rename from
|
||||
mac-services-*. All uses changed.
|
||||
(mac-apple-event-map): Rename event symbol `services' to `service'.
|
||||
|
||||
2006-05-10 Thien-Thi Nguyen <ttn@gnu.org>
|
||||
|
||||
* emacs-lisp/ewoc.el (ewoc--dll-create, ewoc--node-delete)
|
||||
(ewoc--node-enter-first, ewoc--node-enter-last)
|
||||
(ewoc--delete-node-internal): Merge funcs into unique callers.
|
||||
|
||||
2006-05-09 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* emacs-lisp/crm.el (completing-read-multiple): Properly handle
|
||||
return value of read-from-minibuffer for empty input.
|
||||
|
||||
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):
|
||||
Skip anonymous subs.
|
||||
|
||||
2006-05-04 Dan Nicolaescu <dann@ics.uci.edu>
|
||||
|
||||
* ibuffer.el (ibuffer-compressed-file-name-regexp): Avoid loading
|
||||
regexp-opt at run time.
|
||||
|
||||
* term.el (term-handle-ansi-escape): Fix off by one error.
|
||||
|
||||
2006-05-04 Nick Roberts <nickrob@snap.net.nz>
|
||||
|
||||
* progmodes/gdb-ui.el (gdb-force-update): Delete variable...
|
||||
(gdb-init-1, gdb-post-prompt): ...and references to it.
|
||||
(gdb-frame-handler): Strip directory name from filename if present.
|
||||
|
||||
* progmodes/gud.el (gdb-force-update): Delete defvar
|
||||
(gud-speedbar-buttons): ...and references to it. Use window-start
|
||||
to try to keep positon in watch expression.
|
||||
|
||||
2006-05-03 Richard Stallman <rms@gnu.org>
|
||||
|
||||
* simple.el (next-history-element, previous-history-element): Doc fix.
|
||||
|
||||
* isearch.el (isearch-update-ring): Doc fix.
|
||||
|
||||
2006-05-03 Dan Nicolaescu <dann@ics.uci.edu>
|
||||
|
||||
* isearch.el (isearch-update-ring): Take history-delete-duplicates
|
||||
into consideration. Replace one arm ifs with whens.
|
||||
|
||||
2006-05-03 Nick Roberts <nickrob@snap.net.nz>
|
||||
|
||||
* progmodes/gdb-ui.el (gud-watch): Let user select an expression.
|
||||
(menu): Fix typo.
|
||||
|
||||
2006-05-02 Miles Bader <miles@gnu.org>
|
||||
|
||||
* replace.el (occur-engine): Bind `inhibit-field-text-motion' to t.
|
||||
|
||||
2006-05-02 Jay Belanger <belanger@truman.edu>
|
||||
|
||||
* calc/calc-embed.el: (calc-override-minor-modes-map)
|
||||
(calc-override-minor-modes): New variables.
|
||||
(calc-do-embedded): Make sure that Calc keystrokes aren't
|
||||
overwritten by minor modes.
|
||||
|
||||
2006-05-02 Chong Yidong <cyd@mit.edu>
|
||||
|
||||
* msb.el (msb): If EVENT is a down event, read and discard the up event.
|
||||
|
||||
2006-05-02 Reiner Steib <Reiner.Steib@gmx.de>
|
||||
|
||||
* startup.el (command-line-1): Refer to Lisp manual when
|
||||
pure-space-overflow occurs.
|
||||
|
||||
* files.el (byte-compile-dynamic, byte-compile-dynamic-docstrings)
|
||||
(byte-compile-warnings, find-file-visit-truename, indent-tabs-mode)
|
||||
(left-margin, no-byte-compile, no-update-autoloads, truncate-lines)
|
||||
(version-control): Don't use `t' for safe-local-variable declarations.
|
||||
|
||||
2006-05-01 Richard Stallman <rms@gnu.org>
|
||||
|
||||
* diff-mode.el (diff-mode-shared-map): Don't bind M-W, M-U, M-C,
|
||||
@ -26,35 +362,35 @@
|
||||
(tramp-completion-handle-file-name-directory)
|
||||
(tramp-completion-handle-file-name-nondirectory)
|
||||
(tramp-completion-handle-expand-file-name): Remove them.
|
||||
(tramp-handle-file-name-directory): Return the real directory
|
||||
name. Returning "/" only doesn't need to be necessary any longer.
|
||||
(tramp-handle-file-name-directory): Return the real directory name.
|
||||
Returning "/" only doesn't need to be necessary any longer.
|
||||
(tramp-file-name-handler): Make special attention when in hostname
|
||||
completion mode.
|
||||
(tramp-completion-file-name-handler): Revert patch from
|
||||
2006-04-28.
|
||||
(tramp-register-file-name-handlers): Register
|
||||
`tramp-completion-file-name-handler' only when
|
||||
`partial-completion-mode is enabled.
|
||||
(tramp-completion-handle-file-name-all-completions): Delete
|
||||
directory part from results.
|
||||
(tramp-completion-file-name-handler): Revert patch from 2006-04-28.
|
||||
(tramp-register-file-name-handlers):
|
||||
Register `tramp-completion-file-name-handler' only when
|
||||
`partial-completion-mode' is enabled.
|
||||
(tramp-completion-handle-file-name-all-completions):
|
||||
Delete directory part from results.
|
||||
(tramp-get-completion-methods, tramp-get-completion-user-host):
|
||||
Discard deleting "/", it doesn't work after the change of
|
||||
`tramp-handle-file-name-directory' above.
|
||||
|
||||
2006-05-01 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
* progmodes/grep.el (grep-expand-template): Use save-match-data.
|
||||
* progmodes/grep.el (grep-expand-template): Use save-match-data
|
||||
and symbol-value.
|
||||
|
||||
2006-05-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
|
||||
|
||||
* term/mac-win.el (mac-ae-open-documents, mac-drag-n-drop): Use
|
||||
select-frame-set-input-focus instead of raise-frame.
|
||||
* term/mac-win.el (mac-ae-open-documents, mac-drag-n-drop):
|
||||
Use select-frame-set-input-focus instead of raise-frame.
|
||||
(global-map): Bind M-drag-n-drop to mac-drag-n-drop.
|
||||
|
||||
2006-05-01 Nick Roberts <nickrob@snap.net.nz>
|
||||
|
||||
* progmodes/gud.el (gud-def): Add %c case.
|
||||
(gud-speedbar-buttons): Don'bind case-fold-search unnecessarily.
|
||||
(gud-speedbar-buttons): Don't bind case-fold-search unnecessarily.
|
||||
(gud-format-command): Make match case sensitive. Match on %F.
|
||||
|
||||
2006-04-30 Glenn Morris <rgm@gnu.org>
|
||||
@ -121,7 +457,7 @@
|
||||
(grep-read-regexp, grep-read-files): New helper functions.
|
||||
(rgrep): Rename from grep-tree. Rework to use proper histories.
|
||||
Adapt to changes in defcustoms and functions above.
|
||||
(lgrep): New command, as grep, but using same interactive api as rgrep.
|
||||
(lgrep): New command, as grep, but using same interactive UI as rgrep.
|
||||
|
||||
2006-04-28 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
|
@ -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'."
|
||||
|
@ -480,10 +480,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))))
|
||||
@ -492,7 +494,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)
|
||||
@ -882,7 +885,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
|
||||
@ -1355,13 +1359,14 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
|
||||
(fnlen (or (string-match "\0" namefld) 13))
|
||||
(efnname (decode-coding-string (substring namefld 0 fnlen)
|
||||
archive-file-name-coding-system))
|
||||
(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)
|
||||
@ -1383,7 +1388,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"))
|
||||
@ -1416,9 +1421,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 (byte-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 (byte-after (+ p 20))) ;header level
|
||||
@ -1493,12 +1499,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
|
||||
@ -1527,8 +1533,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
|
||||
@ -1622,7 +1628,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))
|
||||
@ -1647,7 +1654,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)
|
||||
@ -1673,7 +1680,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"))
|
||||
@ -1726,7 +1733,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 (byte-after (+ p 4)))
|
||||
(lfnlen (if (= dirtype 2) (byte-after (+ p 56)) 0))
|
||||
@ -1749,7 +1757,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)
|
||||
@ -1771,7 +1779,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"))
|
||||
|
@ -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."
|
||||
|
@ -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)
|
||||
|
@ -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"))
|
||||
|
@ -206,6 +206,18 @@
|
||||
(defvar calc-embedded-firsttime-buf)
|
||||
(defvar calc-embedded-firsttime-formula)
|
||||
|
||||
;; The following is to take care of any minor modes which override
|
||||
;; a Calc command.
|
||||
(defvar calc-override-minor-modes-map
|
||||
(make-sparse-keymap)
|
||||
"A list of keybindings that might be overwritten by minor modes.")
|
||||
|
||||
;; Add any keys that might be overwritten here.
|
||||
(define-key calc-override-minor-modes-map "`" 'calc-edit)
|
||||
|
||||
(defvar calc-override-minor-modes
|
||||
(cons t calc-override-minor-modes-map))
|
||||
|
||||
(defun calc-do-embedded (calc-embed-arg end obeg oend)
|
||||
(if calc-embedded-info
|
||||
|
||||
@ -237,6 +249,8 @@
|
||||
truncate-lines (nth 2 mode)
|
||||
buffer-read-only nil)
|
||||
(use-local-map (nth 1 mode))
|
||||
(setq minor-mode-overriding-map-alist
|
||||
(remq calc-override-minor-modes minor-mode-overriding-map-alist))
|
||||
(set-buffer-modified-p (buffer-modified-p))
|
||||
(calc-embedded-restore-original-modes)
|
||||
(or calc-embedded-quiet
|
||||
@ -297,6 +311,9 @@
|
||||
buffer-read-only t)
|
||||
(set-buffer-modified-p (buffer-modified-p))
|
||||
(use-local-map calc-mode-map)
|
||||
(setq minor-mode-overriding-map-alist
|
||||
(cons calc-override-minor-modes
|
||||
minor-mode-overriding-map-alist))
|
||||
(setq calc-no-refresh-evaltos nil)
|
||||
(and chg calc-any-evaltos (calc-wrapper (calc-refresh-evaltos)))
|
||||
(let (str)
|
||||
|
@ -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
|
||||
|
@ -196,6 +196,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)
|
||||
|
@ -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).
|
||||
|
@ -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
|
||||
|
@ -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))
|
||||
|
@ -592,25 +592,28 @@ The return value of this function is a list of the read strings.
|
||||
See the documentation for `completing-read' for details on the arguments:
|
||||
PROMPT, TABLE, PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HIST, DEF, and
|
||||
INHERIT-INPUT-METHOD."
|
||||
(let ((minibuffer-completion-table (function crm-collection-fn))
|
||||
(minibuffer-completion-predicate predicate)
|
||||
;; see completing_read in src/minibuf.c
|
||||
(minibuffer-completion-confirm
|
||||
(unless (eq require-match t) require-match))
|
||||
(crm-completion-table table)
|
||||
crm-last-exact-completion
|
||||
crm-current-element
|
||||
crm-left-of-element
|
||||
crm-right-of-element
|
||||
crm-beginning-of-element
|
||||
crm-end-of-element
|
||||
(map (if require-match
|
||||
crm-local-must-match-map
|
||||
crm-local-completion-map)))
|
||||
(split-string (read-from-minibuffer
|
||||
prompt initial-input map
|
||||
nil hist def inherit-input-method)
|
||||
crm-separator)))
|
||||
(let* ((minibuffer-completion-table (function crm-collection-fn))
|
||||
(minibuffer-completion-predicate predicate)
|
||||
;; see completing_read in src/minibuf.c
|
||||
(minibuffer-completion-confirm
|
||||
(unless (eq require-match t) require-match))
|
||||
(crm-completion-table table)
|
||||
crm-last-exact-completion
|
||||
crm-current-element
|
||||
crm-left-of-element
|
||||
crm-right-of-element
|
||||
crm-beginning-of-element
|
||||
crm-end-of-element
|
||||
(map (if require-match
|
||||
crm-local-must-match-map
|
||||
crm-local-completion-map))
|
||||
;; If the user enters empty input, read-from-minibuffer returns
|
||||
;; the empty string, not DEF.
|
||||
(input (read-from-minibuffer
|
||||
prompt initial-input map
|
||||
nil hist def inherit-input-method)))
|
||||
(and def (string-equal input "") (setq input def))
|
||||
(split-string input crm-separator)))
|
||||
|
||||
;; testing and debugging
|
||||
;; (defun crm-init-test-environ ()
|
||||
|
@ -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)
|
||||
|
@ -144,13 +144,6 @@
|
||||
|
||||
\(fn NODE CHILD)")
|
||||
|
||||
(defun ewoc--dll-create ()
|
||||
"Create an empty doubly linked list."
|
||||
(let ((dummy-node (ewoc--node-create 'DL-LIST 'DL-LIST)))
|
||||
(setf (ewoc--node-right dummy-node) dummy-node)
|
||||
(setf (ewoc--node-left dummy-node) dummy-node)
|
||||
dummy-node))
|
||||
|
||||
(defun ewoc--node-enter-before (node elemnode)
|
||||
"Insert ELEMNODE before NODE in a DLL."
|
||||
(assert (and (null (ewoc--node-left elemnode)) (null (ewoc--node-right elemnode))))
|
||||
@ -159,14 +152,6 @@
|
||||
(setf (ewoc--node-right (ewoc--node-left node)) elemnode)
|
||||
(setf (ewoc--node-left node) elemnode))
|
||||
|
||||
(defun ewoc--node-enter-first (dll node)
|
||||
"Add a free floating NODE first in DLL."
|
||||
(ewoc--node-enter-before (ewoc--node-right dll) node))
|
||||
|
||||
(defun ewoc--node-enter-last (dll node)
|
||||
"Add a free floating NODE last in DLL."
|
||||
(ewoc--node-enter-before dll node))
|
||||
|
||||
(defun ewoc--node-next (dll node)
|
||||
"Return the node after NODE, or nil if NODE is the last node."
|
||||
(unless (eq (ewoc--node-right node) dll) (ewoc--node-right node)))
|
||||
@ -175,16 +160,6 @@
|
||||
"Return the node before NODE, or nil if NODE is the first node."
|
||||
(unless (eq (ewoc--node-left node) dll) (ewoc--node-left node)))
|
||||
|
||||
(defun ewoc--node-delete (node)
|
||||
"Unbind NODE from its doubly linked list and return it."
|
||||
;; This is a no-op when applied to the dummy node. This will return
|
||||
;; nil if applied to the dummy node since it always contains nil.
|
||||
(setf (ewoc--node-right (ewoc--node-left node)) (ewoc--node-right node))
|
||||
(setf (ewoc--node-left (ewoc--node-right node)) (ewoc--node-left node))
|
||||
(setf (ewoc--node-left node) nil)
|
||||
(setf (ewoc--node-right node) nil)
|
||||
node)
|
||||
|
||||
(defun ewoc--node-nth (dll n)
|
||||
"Return the Nth node from the doubly linked list DLL.
|
||||
N counts from zero. If DLL is not that long, nil is returned.
|
||||
@ -221,16 +196,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))
|
||||
@ -261,26 +232,6 @@ start position and the element DATA."
|
||||
(funcall pretty-printer data)
|
||||
(ewoc--node-create (copy-marker pos) data))))
|
||||
|
||||
|
||||
(defun ewoc--delete-node-internal (ewoc node)
|
||||
"Delete a data string from EWOC.
|
||||
Can not be used on the footer. Return the wrapper that is deleted.
|
||||
The start-marker in the wrapper is set to nil, so that it doesn't
|
||||
consume any more resources."
|
||||
(let ((dll (ewoc--dll ewoc))
|
||||
(inhibit-read-only t))
|
||||
;; If we are about to delete the node pointed at by last-node,
|
||||
;; set last-node to nil.
|
||||
(if (eq (ewoc--last-node ewoc) node)
|
||||
(setf (ewoc--last-node ewoc) nil))
|
||||
|
||||
(delete-region (ewoc--node-start-marker node)
|
||||
(ewoc--node-start-marker (ewoc--node-next dll node)))
|
||||
(set-marker (ewoc--node-start-marker node) nil)
|
||||
;; Delete the node, and return the wrapper.
|
||||
(ewoc--node-delete node)))
|
||||
|
||||
|
||||
(defun ewoc--refresh-node (pp node)
|
||||
"Redisplay the element represented by NODE using the pretty-printer PP."
|
||||
(let ((inhibit-read-only t))
|
||||
@ -313,19 +264,23 @@ Optional second argument HEADER is a string that will always be
|
||||
present at the top of the ewoc. HEADER should end with a
|
||||
newline. Optional third argument FOOTER is similar, and will
|
||||
be inserted at the bottom of the ewoc."
|
||||
(let ((new-ewoc
|
||||
(ewoc--create (current-buffer)
|
||||
pretty-printer nil nil (ewoc--dll-create)))
|
||||
(pos (point)))
|
||||
(let* ((dummy-node (ewoc--node-create 'DL-LIST 'DL-LIST))
|
||||
(dll (progn (setf (ewoc--node-right dummy-node) dummy-node)
|
||||
(setf (ewoc--node-left dummy-node) dummy-node)
|
||||
dummy-node))
|
||||
(new-ewoc
|
||||
(ewoc--create (current-buffer)
|
||||
pretty-printer nil nil dll))
|
||||
(pos (point)))
|
||||
(ewoc--set-buffer-bind-dll new-ewoc
|
||||
;; Set default values
|
||||
(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)))
|
||||
(ewoc--node-enter-first dll head)
|
||||
(ewoc--node-enter-last dll foot)
|
||||
(let ((foot (ewoc--create-node footer 'insert pos))
|
||||
(head (ewoc--create-node header 'insert pos)))
|
||||
(ewoc--node-enter-before (ewoc--node-right dll) head)
|
||||
(ewoc--node-enter-before dll foot)
|
||||
(setf (ewoc--header new-ewoc) head)
|
||||
(setf (ewoc--footer new-ewoc) foot)))
|
||||
;; Return the ewoc
|
||||
@ -421,11 +376,27 @@ ARGS are given they will be passed to the PREDICATE."
|
||||
(ewoc--set-buffer-bind-dll-let* ewoc
|
||||
((node (ewoc--node-nth dll 1))
|
||||
(footer (ewoc--footer ewoc))
|
||||
(next nil))
|
||||
(next nil)
|
||||
(L nil) (R nil)
|
||||
(inhibit-read-only t))
|
||||
(while (not (eq node footer))
|
||||
(setq next (ewoc--node-next dll node))
|
||||
(unless (apply predicate (ewoc--node-data node) args)
|
||||
(ewoc--delete-node-internal ewoc node))
|
||||
;; If we are about to delete the node pointed at by last-node,
|
||||
;; set last-node to nil.
|
||||
(if (eq (ewoc--last-node ewoc) node)
|
||||
(setf (ewoc--last-node ewoc) nil))
|
||||
(delete-region (ewoc--node-start-marker node)
|
||||
(ewoc--node-start-marker (ewoc--node-next dll node)))
|
||||
(set-marker (ewoc--node-start-marker node) nil)
|
||||
(setf L (ewoc--node-left node)
|
||||
R (ewoc--node-right node)
|
||||
;; Link neighbors to each other.
|
||||
(ewoc--node-right L) R
|
||||
(ewoc--node-left R) L
|
||||
;; Forget neighbors.
|
||||
(ewoc--node-left node) nil
|
||||
(ewoc--node-right node) nil))
|
||||
(setq node next))))
|
||||
|
||||
(defun ewoc-locate (ewoc &optional pos guess)
|
||||
@ -601,8 +572,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)
|
||||
|
@ -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)))
|
||||
|
@ -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))
|
||||
|
@ -117,7 +117,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)
|
||||
|
@ -2349,31 +2349,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 . t)
|
||||
(byte-compile-dynamic-docstrings . t)
|
||||
(byte-compile-warnings . t)
|
||||
(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 . t)
|
||||
(fill-column . integerp)
|
||||
(fill-prefix . string-or-null-p)
|
||||
(indent-tabs-mode . t)
|
||||
(kept-old-versions . integerp)
|
||||
(kept-new-versions . integerp)
|
||||
(left-margin . t)
|
||||
(no-byte-compile . t)
|
||||
(no-update-autoloads . t)
|
||||
(outline-regexp . string-or-null-p)
|
||||
(tab-width . integerp) ;; C source code
|
||||
(truncate-lines . t) ;; C source code
|
||||
(version-control . t)))))
|
||||
(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)
|
||||
|
||||
@ -3931,7 +3929,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.
|
||||
|
@ -1975,17 +1975,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'.
|
||||
@ -1997,7 +1997,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]*>?\\)"
|
||||
|
@ -1,3 +1,24 @@
|
||||
2006-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* mm-decode.el (mm-dissect-buffer): Remove spurious double assignment.
|
||||
(mm-copy-to-buffer): Use with-current-buffer.
|
||||
(mm-display-part): Simplify.
|
||||
(mm-inlinable-p): Add optional arg `type'.
|
||||
|
||||
* gnus-art.el (gnus-mime-view-part-as-type): Add optional PRED
|
||||
argument.
|
||||
(gnus-mime-view-part-externally, gnus-mime-view-part-internally):
|
||||
Try harder to show the attachment internally or externally using
|
||||
gnus-mime-view-part-as-type.
|
||||
|
||||
2006-05-04 Reiner Steib <Reiner.Steib@gmx.de>
|
||||
|
||||
* gnus-art.el (gnus-mime-view-part-as-type-internal): Try to fetch
|
||||
`filename' from Content-Disposition if Content-Type doesn't
|
||||
provide `name'.
|
||||
(gnus-mime-view-part-as-type): Set default instead of
|
||||
initial-input.
|
||||
|
||||
2006-04-28 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* mm-uu.el (mm-uu-pgp-encrypted-extract-1): Assume buffer is made
|
||||
|
@ -4317,21 +4317,29 @@ Deleting parts may malfunction or destroy the article; continue? ")
|
||||
|
||||
(defun gnus-mime-view-part-as-type-internal ()
|
||||
(gnus-article-check-buffer)
|
||||
(let* ((name (mail-content-type-get
|
||||
(mm-handle-type (get-text-property (point) 'gnus-data))
|
||||
'name))
|
||||
(let* ((handle (get-text-property (point) 'gnus-data))
|
||||
(name (or
|
||||
;; Content-Type: foo/bar; name=...
|
||||
(mail-content-type-get (mm-handle-type handle) 'name)
|
||||
;; Content-Disposition: attachment; filename=...
|
||||
(cdr (assq 'filename (cdr (mm-handle-disposition handle))))))
|
||||
(def-type (and name (mm-default-file-encoding name))))
|
||||
(and def-type (cons def-type 0))))
|
||||
|
||||
(defun gnus-mime-view-part-as-type (&optional mime-type)
|
||||
"Choose a MIME media type, and view the part as such."
|
||||
(defun gnus-mime-view-part-as-type (&optional mime-type pred)
|
||||
"Choose a MIME media type, and view the part as such.
|
||||
If non-nil, PRED is a predicate to use during completion to limit the
|
||||
available media-types."
|
||||
(interactive)
|
||||
(unless mime-type
|
||||
(setq mime-type (completing-read
|
||||
"View as MIME type: "
|
||||
(mapcar #'list (mailcap-mime-types))
|
||||
nil nil
|
||||
(gnus-mime-view-part-as-type-internal))))
|
||||
(setq mime-type
|
||||
(let ((default (gnus-mime-view-part-as-type-internal)))
|
||||
(completing-read
|
||||
(format "View as MIME type (default %s): "
|
||||
(car default))
|
||||
(mapcar #'list (mailcap-mime-types))
|
||||
pred nil nil nil
|
||||
(car default)))))
|
||||
(gnus-article-check-buffer)
|
||||
(let ((handle (get-text-property (point) 'gnus-data)))
|
||||
(when handle
|
||||
@ -4511,12 +4519,18 @@ specified charset."
|
||||
(mm-inlined-types nil)
|
||||
(mail-parse-charset gnus-newsgroup-charset)
|
||||
(mail-parse-ignored-charsets
|
||||
(save-excursion (set-buffer gnus-summary-buffer)
|
||||
gnus-newsgroup-ignored-charsets)))
|
||||
(when handle
|
||||
(if (mm-handle-undisplayer handle)
|
||||
(mm-remove-part handle)
|
||||
(mm-display-part handle)))))
|
||||
(with-current-buffer gnus-summary-buffer
|
||||
gnus-newsgroup-ignored-charsets))
|
||||
(type (mm-handle-media-type handle))
|
||||
(method (mailcap-mime-info type))
|
||||
(mm-enable-external t))
|
||||
(if (not (stringp method))
|
||||
(gnus-mime-view-part-as-type
|
||||
nil (lambda (type) (stringp (mailcap-mime-info type))))
|
||||
(when handle
|
||||
(if (mm-handle-undisplayer handle)
|
||||
(mm-remove-part handle)
|
||||
(mm-display-part handle))))))
|
||||
|
||||
(defun gnus-mime-view-part-internally (&optional handle)
|
||||
"View the MIME part under point with an internal viewer.
|
||||
@ -4528,13 +4542,16 @@ If no internal viewer is available, use an external viewer."
|
||||
(mm-inline-large-images t)
|
||||
(mail-parse-charset gnus-newsgroup-charset)
|
||||
(mail-parse-ignored-charsets
|
||||
(save-excursion (set-buffer gnus-summary-buffer)
|
||||
gnus-newsgroup-ignored-charsets))
|
||||
(with-current-buffer gnus-summary-buffer
|
||||
gnus-newsgroup-ignored-charsets))
|
||||
(inhibit-read-only t))
|
||||
(when handle
|
||||
(if (mm-handle-undisplayer handle)
|
||||
(mm-remove-part handle)
|
||||
(mm-display-part handle)))))
|
||||
(if (not (mm-inlinable-p handle))
|
||||
(gnus-mime-view-part-as-type
|
||||
nil (lambda (type) (mm-inlinable-p handle type)))
|
||||
(when handle
|
||||
(if (mm-handle-undisplayer handle)
|
||||
(mm-remove-part handle)
|
||||
(mm-display-part handle))))))
|
||||
|
||||
(defun gnus-mime-action-on-part (&optional action)
|
||||
"Do something with the MIME attachment at \(point\)."
|
||||
|
@ -562,7 +562,7 @@ Postpone undisplaying of viewers for types in
|
||||
description)
|
||||
(setq type (split-string (car ctl) "/"))
|
||||
(setq subtype (cadr type)
|
||||
type (pop type))
|
||||
type (car type))
|
||||
(setq
|
||||
result
|
||||
(cond
|
||||
@ -641,16 +641,15 @@ Postpone undisplaying of viewers for types in
|
||||
|
||||
(defun mm-copy-to-buffer ()
|
||||
"Copy the contents of the current buffer to a fresh buffer."
|
||||
(save-excursion
|
||||
(let ((obuf (current-buffer))
|
||||
beg)
|
||||
(goto-char (point-min))
|
||||
(search-forward-regexp "^\n" nil t)
|
||||
(setq beg (point))
|
||||
(set-buffer
|
||||
(with-current-buffer
|
||||
;; Preserve the data's unibyteness (for url-insert-file-contents).
|
||||
(let ((default-enable-multibyte-characters (mm-multibyte-p)))
|
||||
(generate-new-buffer " *mm*")))
|
||||
(generate-new-buffer " *mm*"))
|
||||
(insert-buffer-substring obuf beg)
|
||||
(current-buffer))))
|
||||
|
||||
@ -701,7 +700,8 @@ external if displayed external."
|
||||
(forward-line 1)
|
||||
(mm-insert-inline handle (mm-get-part handle))
|
||||
'inline)
|
||||
(if (and method ;; If nil, we always use "save".
|
||||
(setq external
|
||||
(and method ;; If nil, we always use "save".
|
||||
(stringp method) ;; 'mailcap-save-binary-file
|
||||
(or (eq mm-enable-external t)
|
||||
(and (eq mm-enable-external 'ask)
|
||||
@ -714,9 +714,7 @@ external if displayed external."
|
||||
(concat
|
||||
" \"" (format method filename) "\"")
|
||||
"")
|
||||
"? ")))))
|
||||
(setq external t)
|
||||
(setq external nil))
|
||||
"? "))))))
|
||||
(if external
|
||||
(mm-display-external
|
||||
handle (or method 'mailcap-save-binary-file))
|
||||
@ -1019,10 +1017,12 @@ external if displayed external."
|
||||
methods nil)))
|
||||
result))
|
||||
|
||||
(defun mm-inlinable-p (handle)
|
||||
"Say whether HANDLE can be displayed inline."
|
||||
(defun mm-inlinable-p (handle &optional type)
|
||||
"Say whether HANDLE can be displayed inline.
|
||||
TYPE is the mime-type of the object; it defaults to the one given
|
||||
in HANDLE."
|
||||
(unless type (setq type (mm-handle-media-type handle)))
|
||||
(let ((alist mm-inline-media-tests)
|
||||
(type (mm-handle-media-type handle))
|
||||
test)
|
||||
(while alist
|
||||
(when (string-match (caar alist) type)
|
||||
|
@ -325,9 +325,7 @@ directory, like `default-directory'."
|
||||
:group 'ibuffer)
|
||||
|
||||
(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)
|
||||
|
@ -826,21 +826,11 @@ NOPUSH is t and EDIT is t."
|
||||
|
||||
(defun isearch-update-ring (string &optional regexp)
|
||||
"Add STRING to the beginning of the search ring.
|
||||
REGEXP says which ring to use."
|
||||
(if regexp
|
||||
(if (or (null regexp-search-ring)
|
||||
(not (string= string (car regexp-search-ring))))
|
||||
(progn
|
||||
(push string regexp-search-ring)
|
||||
(if (> (length regexp-search-ring) regexp-search-ring-max)
|
||||
(setcdr (nthcdr (1- search-ring-max) regexp-search-ring)
|
||||
nil))))
|
||||
(if (or (null search-ring)
|
||||
(not (string= string (car search-ring))))
|
||||
(progn
|
||||
(push string search-ring)
|
||||
(if (> (length search-ring) search-ring-max)
|
||||
(setcdr (nthcdr (1- search-ring-max) search-ring) nil))))))
|
||||
REGEXP if non-nil says use the regexp search ring."
|
||||
(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.
|
||||
|
@ -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)
|
||||
|
@ -6978,7 +6978,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)
|
||||
|
||||
@ -7116,7 +7116,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)
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
||||
|
@ -473,6 +473,11 @@ selects that window.
|
||||
See the function `mouse-select-buffer' and the variable
|
||||
`msb-menu-cond' for more information about how the menus are split."
|
||||
(interactive "e")
|
||||
;; If EVENT is a down-event, read and discard the
|
||||
;; corresponding up-event.
|
||||
(and (eventp event)
|
||||
(memq 'down (event-modifiers event))
|
||||
(read-event))
|
||||
(let ((old-window (selected-window))
|
||||
(window (posn-window (event-start event))))
|
||||
(unless (framep window) (select-window window))
|
||||
|
@ -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)
|
||||
|
@ -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))
|
||||
|
@ -114,8 +114,6 @@ Set to \"main\" at start if gdb-show-main is t.")
|
||||
Each element has the form (VARNUM EXPRESSION NUMCHILD TYPE VALUE STATUS FP)
|
||||
where STATUS is nil (unchanged), `changed' or `out-of-scope', FP the frame
|
||||
address for root variables.")
|
||||
(defvar gdb-force-update t
|
||||
"Non-nil means that view of watch expressions will be updated in the speedbar.")
|
||||
(defvar gdb-main-file nil "Source file from which program execution begins.")
|
||||
(defvar gdb-overlay-arrow-position nil)
|
||||
(defvar gdb-server-prefix nil)
|
||||
@ -527,7 +525,6 @@ With arg, use separate IO iff arg is positive."
|
||||
gdb-current-language nil
|
||||
gdb-frame-number nil
|
||||
gdb-var-list nil
|
||||
gdb-force-update t
|
||||
gdb-main-file nil
|
||||
gdb-first-post-prompt t
|
||||
gdb-prompting nil
|
||||
@ -690,10 +687,14 @@ With arg, enter name of variable to be watched in the minibuffer."
|
||||
(if event (posn-set-point (event-end event)))
|
||||
(require 'tooltip)
|
||||
(save-selected-window
|
||||
(let ((expr (if arg
|
||||
(completing-read "Name of variable: "
|
||||
'gud-gdb-complete-command)
|
||||
(tooltip-identifier-from-point (point)))))
|
||||
(let ((expr
|
||||
(if arg
|
||||
(completing-read "Name of variable: "
|
||||
'gud-gdb-complete-command)
|
||||
(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."
|
||||
@ -1378,7 +1377,6 @@ happens to be appropriate."
|
||||
;; FIXME: with GDB-6 on Darwin, this might very well work.
|
||||
;; Only needed/used with speedbar/watch expressions.
|
||||
(when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
|
||||
(setq gdb-force-update t)
|
||||
(if (string-equal gdb-version "pre-6.4")
|
||||
(gdb-var-update)
|
||||
(gdb-var-update-1)))))
|
||||
@ -1913,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
|
||||
@ -2691,7 +2689,7 @@ corresponding to the mode line clicked."
|
||||
'(menu-item "Inferior IO" gdb-frame-separate-io-buffer
|
||||
:enable gdb-use-separate-io-buffer))
|
||||
(define-key menu [registers] '("Registers" . gdb-frame-registers-buffer))
|
||||
(define-key menu [disassembly] '("Disassembiy" . gdb-frame-assembler-buffer))
|
||||
(define-key menu [disassembly] '("Disassembly" . gdb-frame-assembler-buffer))
|
||||
(define-key menu [breakpoints]
|
||||
'("Breakpoints" . gdb-frame-breakpoints-buffer))
|
||||
(define-key menu [locals] '("Locals" . gdb-frame-locals-buffer))
|
||||
@ -2755,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)
|
||||
@ -2782,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 ()
|
||||
@ -2803,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)
|
||||
@ -3163,7 +3161,9 @@ BUFFER nil or omitted means use the current buffer."
|
||||
(if (and (match-string 3) gud-overlay-arrow-position)
|
||||
(let ((buffer (marker-buffer gud-overlay-arrow-position))
|
||||
(position (marker-position gud-overlay-arrow-position)))
|
||||
(when (and buffer (string-equal (buffer-name buffer) (match-string 3)))
|
||||
(when (and buffer
|
||||
(string-equal (buffer-name buffer)
|
||||
(file-name-nondirectory (match-string 3))))
|
||||
(with-current-buffer buffer
|
||||
(setq fringe-indicator-alist
|
||||
(if (string-equal gdb-frame-number "0")
|
||||
@ -3230,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 ()
|
||||
@ -3263,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.
|
||||
;;
|
||||
|
@ -584,7 +584,7 @@ substitution string. Note dynamic scoping of variables.")
|
||||
(setq command
|
||||
(replace-match
|
||||
(or (if (symbolp (cdr kw))
|
||||
(eval (cdr kw))
|
||||
(symbol-value (cdr kw))
|
||||
(save-match-data (eval (cdr kw))))
|
||||
"")
|
||||
t t command))))))
|
||||
@ -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)
|
||||
|
@ -49,7 +49,6 @@
|
||||
(defvar gdb-macro-info)
|
||||
(defvar gdb-server-prefix)
|
||||
(defvar gdb-show-changed-values)
|
||||
(defvar gdb-force-update)
|
||||
(defvar gdb-var-list)
|
||||
(defvar gdb-speedbar-auto-raise)
|
||||
(defvar tool-bar-map)
|
||||
@ -442,37 +441,55 @@ required by the caller."
|
||||
(buffer-name gud-comint-buffer))
|
||||
(let* ((minor-mode (with-current-buffer buffer gud-minor-mode))
|
||||
(window (get-buffer-window (current-buffer) 0))
|
||||
(start (window-start window))
|
||||
(p (window-point window)))
|
||||
(cond
|
||||
((memq minor-mode '(gdbmi gdba))
|
||||
(when (or gdb-force-update
|
||||
(not (save-excursion
|
||||
(goto-char (point-min))
|
||||
(looking-at "Watch Expressions:"))))
|
||||
(erase-buffer)
|
||||
(insert "Watch Expressions:\n")
|
||||
(if gdb-speedbar-auto-raise
|
||||
(raise-frame speedbar-frame))
|
||||
(let ((var-list gdb-var-list) parent)
|
||||
(while var-list
|
||||
(let* (char (depth 0) (start 0) (var (car var-list))
|
||||
(varnum (car var)) (expr (nth 1 var))
|
||||
(type (nth 3 var)) (value (nth 4 var))
|
||||
(status (nth 5 var)))
|
||||
(put-text-property
|
||||
0 (length expr) 'face font-lock-variable-name-face expr)
|
||||
(put-text-property
|
||||
0 (length type) 'face font-lock-type-face type)
|
||||
(while (string-match "\\." varnum start)
|
||||
(setq depth (1+ depth)
|
||||
start (1+ (match-beginning 0))))
|
||||
(if (eq depth 0) (setq parent nil))
|
||||
(if (or (equal (nth 2 var) "0")
|
||||
(and (equal (nth 2 var) "1")
|
||||
(string-match "char \\*$" type)))
|
||||
(erase-buffer)
|
||||
(insert "Watch Expressions:\n")
|
||||
(if gdb-speedbar-auto-raise
|
||||
(raise-frame speedbar-frame))
|
||||
(let ((var-list gdb-var-list) parent)
|
||||
(while var-list
|
||||
(let* (char (depth 0) (start 0) (var (car var-list))
|
||||
(varnum (car var)) (expr (nth 1 var))
|
||||
(type (nth 3 var)) (value (nth 4 var))
|
||||
(status (nth 5 var)))
|
||||
(put-text-property
|
||||
0 (length expr) 'face font-lock-variable-name-face expr)
|
||||
(put-text-property
|
||||
0 (length type) 'face font-lock-type-face type)
|
||||
(while (string-match "\\." varnum start)
|
||||
(setq depth (1+ depth)
|
||||
start (1+ (match-beginning 0))))
|
||||
(if (eq depth 0) (setq parent nil))
|
||||
(if (or (equal (nth 2 var) "0")
|
||||
(and (equal (nth 2 var) "1")
|
||||
(string-match "char \\*$" type)))
|
||||
(speedbar-make-tag-line
|
||||
'bracket ?? nil nil
|
||||
(concat expr "\t" value)
|
||||
(if (or parent (eq status 'out-of-scope))
|
||||
nil 'gdb-edit-value)
|
||||
nil
|
||||
(if gdb-show-changed-values
|
||||
(or parent (case status
|
||||
(changed 'font-lock-warning-face)
|
||||
(out-of-scope 'shadow)
|
||||
(t t)))
|
||||
t)
|
||||
depth)
|
||||
(if (eq status 'out-of-scope) (setq parent 'shadow))
|
||||
(if (and (nth 1 var-list)
|
||||
(string-match (concat varnum "\\.")
|
||||
(car (nth 1 var-list))))
|
||||
(setq char ?-)
|
||||
(setq char ?+))
|
||||
(if (string-match "\\*$" type)
|
||||
(speedbar-make-tag-line
|
||||
'bracket ?? nil nil
|
||||
(concat expr "\t" value)
|
||||
'bracket char
|
||||
'gdb-speedbar-expand-node varnum
|
||||
(concat expr "\t" type "\t" value)
|
||||
(if (or parent (eq status 'out-of-scope))
|
||||
nil 'gdb-edit-value)
|
||||
nil
|
||||
@ -483,37 +500,15 @@ required by the caller."
|
||||
(t t)))
|
||||
t)
|
||||
depth)
|
||||
(if (eq status 'out-of-scope) (setq parent 'shadow))
|
||||
(if (and (nth 1 var-list)
|
||||
(string-match (concat varnum "\\.")
|
||||
(car (nth 1 var-list))))
|
||||
(setq char ?-)
|
||||
(setq char ?+))
|
||||
(if (string-match "\\*$" type)
|
||||
(speedbar-make-tag-line
|
||||
'bracket char
|
||||
'gdb-speedbar-expand-node varnum
|
||||
(concat expr "\t" type "\t" value)
|
||||
(if (or parent (eq status 'out-of-scope))
|
||||
nil 'gdb-edit-value)
|
||||
nil
|
||||
(if gdb-show-changed-values
|
||||
(or parent (case status
|
||||
(changed 'font-lock-warning-face)
|
||||
(out-of-scope 'shadow)
|
||||
(t t)))
|
||||
t)
|
||||
depth)
|
||||
(speedbar-make-tag-line
|
||||
'bracket char
|
||||
'gdb-speedbar-expand-node varnum
|
||||
(concat expr "\t" type)
|
||||
nil nil
|
||||
(if (and (or parent status) gdb-show-changed-values)
|
||||
'shadow t)
|
||||
depth))))
|
||||
(setq var-list (cdr var-list))))
|
||||
(setq gdb-force-update nil)))
|
||||
(speedbar-make-tag-line
|
||||
'bracket char
|
||||
'gdb-speedbar-expand-node varnum
|
||||
(concat expr "\t" type)
|
||||
nil nil
|
||||
(if (and (or parent status) gdb-show-changed-values)
|
||||
'shadow t)
|
||||
depth))))
|
||||
(setq var-list (cdr var-list)))))
|
||||
(t (unless (and (save-excursion
|
||||
(goto-char (point-min))
|
||||
(looking-at "Current Stack:"))
|
||||
@ -544,6 +539,7 @@ required by the caller."
|
||||
(t (error "Should never be here")))
|
||||
frame t))))
|
||||
(setq gud-last-speedbar-stackframe gud-last-last-frame))))
|
||||
(set-window-start window start)
|
||||
(set-window-point window p))))
|
||||
|
||||
|
||||
|
@ -1471,11 +1471,7 @@ Otherwise just move the line. Move down unless UP is non-nil."
|
||||
(if (eq t idlwave-shell-arrows-do-history) (goto-char proc-pos))
|
||||
(if (and idlwave-shell-arrows-do-history
|
||||
(>= (1+ (save-excursion (end-of-line) (point))) proc-pos))
|
||||
(progn
|
||||
;;(goto-char proc-pos)
|
||||
(goto-char (point-max))
|
||||
;;(and (not (eolp)) (kill-line nil))
|
||||
(comint-previous-input arg))
|
||||
(comint-previous-input arg)
|
||||
(previous-line arg))))
|
||||
|
||||
(defun idlwave-shell-up-or-history (&optional arg)
|
||||
|
@ -1208,8 +1208,8 @@ As a user, you should not set this to t.")
|
||||
;; Treats continuation lines, works only during whole buffer
|
||||
;; fontification. Slow, use it only in fancy fontification.
|
||||
(keyword-parameters
|
||||
'("\\(,\\|[a-zA-Z0-9_](\\)[ \t]*\\(\\$[ \t]*\\(;.*\\)?\\(\n[ \t]*;.*\\)*\n[ \t]*\\)?\\(/[a-zA-Z_]\\sw*\\|[a-zA-Z_]\\sw*[ \t]*=\\)"
|
||||
(5 font-lock-reference-face)))
|
||||
'("\\(,\\|[a-zA-Z0-9_](\\)[ \t]*\\(\\$[ \t]*\\(;.*\\)?\n\\([ \t]*\\(;.*\\)?\n\\)*[ \t]*\\)?\\(/[a-zA-Z_]\\sw*\\|[a-zA-Z_]\\sw*[ \t]*=\\)"
|
||||
(6 font-lock-reference-face)))
|
||||
|
||||
;; System variables start with a bang.
|
||||
(system-variables
|
||||
@ -1915,6 +1915,7 @@ The main features of this mode are
|
||||
|
||||
(set (make-local-variable 'comment-start-skip) ";+[ \t]*")
|
||||
(set (make-local-variable 'comment-start) ";")
|
||||
(set (make-local-variable 'comment-add) 1) ; ";;" for new and regions
|
||||
(set (make-local-variable 'require-final-newline) t)
|
||||
(set (make-local-variable 'abbrev-all-caps) t)
|
||||
(set (make-local-variable 'indent-tabs-mode) nil)
|
||||
@ -1947,6 +1948,10 @@ The main features of this mode are
|
||||
;; Following line is for Emacs - XEmacs uses the corresponding property
|
||||
;; on the `idlwave-mode' symbol.
|
||||
(set (make-local-variable 'font-lock-defaults) idlwave-font-lock-defaults)
|
||||
(set (make-local-variable 'font-lock-mark-block-function)
|
||||
'idlwave-mark-subprogram)
|
||||
(set (make-local-variable 'font-lock-fontify-region-function)
|
||||
'idlwave-font-lock-fontify-region)
|
||||
|
||||
;; Imenu setup
|
||||
(set (make-local-variable 'imenu-create-index-function)
|
||||
@ -1956,6 +1961,15 @@ The main features of this mode are
|
||||
(set (make-local-variable 'imenu-prev-index-position-function)
|
||||
'idlwave-prev-index-position)
|
||||
|
||||
;; HideShow setup
|
||||
(add-to-list 'hs-special-modes-alist
|
||||
(list 'idlwave-mode
|
||||
idlwave-begin-block-reg
|
||||
idlwave-end-block-reg
|
||||
";"
|
||||
'idlwave-forward-block nil))
|
||||
|
||||
|
||||
;; Make a local post-command-hook and add our hook to it
|
||||
;; NB: `make-local-hook' needed for older/alternative Emacs compatibility
|
||||
;; (make-local-hook 'post-command-hook)
|
||||
@ -2000,16 +2014,22 @@ The main features of this mode are
|
||||
(idlwave-read-paths) ; we may need these early
|
||||
(setq idlwave-setup-done t)))
|
||||
|
||||
(defun idlwave-font-lock-fontify-region (beg end &optional verbose)
|
||||
"Fontify continuation lines correctly."
|
||||
(let (pos)
|
||||
(save-excursion
|
||||
(goto-char beg)
|
||||
(forward-line -1)
|
||||
(when (setq pos (idlwave-is-continuation-line))
|
||||
(goto-char pos)
|
||||
(idlwave-beginning-of-statement)
|
||||
(setq beg (point)))))
|
||||
(font-lock-default-fontify-region beg end verbose))
|
||||
|
||||
;;
|
||||
;; Code Formatting ----------------------------------------------------
|
||||
;;
|
||||
|
||||
(defun idlwave-push-mark (&rest rest)
|
||||
"Push mark for compatibility with Emacs 18/19."
|
||||
(if (fboundp 'iconify-frame)
|
||||
(apply 'push-mark rest)
|
||||
(push-mark)))
|
||||
|
||||
(defun idlwave-hard-tab ()
|
||||
"Inserts TAB in buffer in current position."
|
||||
(interactive)
|
||||
@ -2403,7 +2423,7 @@ non-nil."
|
||||
(idlwave-end-of-statement)
|
||||
(let ((end (point)))
|
||||
(idlwave-beginning-of-statement)
|
||||
(idlwave-push-mark end nil t)))
|
||||
(push-mark end nil t)))
|
||||
|
||||
(defun idlwave-mark-block ()
|
||||
"Mark containing block."
|
||||
@ -2414,7 +2434,7 @@ non-nil."
|
||||
(let ((end (point)))
|
||||
(idlwave-backward-block)
|
||||
(idlwave-beginning-of-statement)
|
||||
(idlwave-push-mark end nil t)))
|
||||
(push-mark end nil t)))
|
||||
|
||||
|
||||
(defun idlwave-mark-subprogram ()
|
||||
@ -2425,7 +2445,7 @@ The marks are pushed."
|
||||
(idlwave-beginning-of-subprogram)
|
||||
(let ((beg (point)))
|
||||
(idlwave-forward-block)
|
||||
(idlwave-push-mark beg nil t))
|
||||
(push-mark beg nil t))
|
||||
(exchange-point-and-mark))
|
||||
|
||||
(defun idlwave-backward-up-block (&optional arg)
|
||||
@ -2446,11 +2466,12 @@ If prefix ARG < 0 then move forward to enclosing block end."
|
||||
(idlwave-block-jump-out 1 'nomark)
|
||||
(backward-word 1))
|
||||
|
||||
(defun idlwave-forward-block ()
|
||||
(defun idlwave-forward-block (&optional arg)
|
||||
"Move across next nested block."
|
||||
(interactive)
|
||||
(if (idlwave-down-block 1)
|
||||
(idlwave-block-jump-out 1 'nomark)))
|
||||
(let ((arg (or arg 1)))
|
||||
(if (idlwave-down-block arg)
|
||||
(idlwave-block-jump-out arg 'nomark))))
|
||||
|
||||
(defun idlwave-backward-block ()
|
||||
"Move backward across previous nested block."
|
||||
@ -2496,12 +2517,11 @@ The marks are pushed."
|
||||
(if (re-search-forward idlwave-doclib-end nil t)
|
||||
(progn
|
||||
(forward-line 1)
|
||||
(idlwave-push-mark beg nil t)
|
||||
(push-mark beg nil t)
|
||||
(message "Could not find end of doc library header.")))
|
||||
(message "Could not find doc library header start.")
|
||||
(goto-char here)))))
|
||||
|
||||
|
||||
(defun idlwave-current-routine ()
|
||||
"Return (NAME TYPE CLASS) of current routine."
|
||||
(idlwave-routines)
|
||||
@ -3194,13 +3214,14 @@ Skips any whitespace. Returns 0 if the end-of-line follows the whitespace."
|
||||
"Tests if current line is continuation line.
|
||||
Blank or comment-only lines following regular continuation lines (with
|
||||
`$') count as continuations too."
|
||||
(save-excursion
|
||||
(or
|
||||
(idlwave-look-at "\\<\\$")
|
||||
(catch 'loop
|
||||
(while (and (looking-at "^[ \t]*\\(;.*\\)?$")
|
||||
(eq (forward-line -1) 0))
|
||||
(if (idlwave-look-at "\\<\\$") (throw 'loop t)))))))
|
||||
(let (p)
|
||||
(save-excursion
|
||||
(or
|
||||
(idlwave-look-at "\\<\\$")
|
||||
(catch 'loop
|
||||
(while (and (looking-at "^[ \t]*\\(;.*\\)?$")
|
||||
(eq (forward-line -1) 0))
|
||||
(if (setq p (idlwave-look-at "\\<\\$")) (throw 'loop p))))))))
|
||||
|
||||
(defun idlwave-is-comment-line ()
|
||||
"Tests if the current line is a comment line."
|
||||
|
@ -923,8 +923,9 @@ Returns new value of point in all cases."
|
||||
(or arg (setq arg 1))
|
||||
(if (< arg 0) (forward-char 1))
|
||||
(and (/= arg 0)
|
||||
(re-search-backward "^\\s(\\|^\\s-*sub\\b[^{]+{\\|^\\s-*format\\b[^=]*=\\|^\\."
|
||||
nil 'move arg)
|
||||
(re-search-backward
|
||||
"^\\s(\\|^\\s-*sub\\b[ \t\n]*\\_<[^{]+{\\|^\\s-*format\\b[^=]*=\\|^\\."
|
||||
nil 'move arg)
|
||||
(goto-char (1- (match-end 0))))
|
||||
(point))
|
||||
|
||||
|
@ -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)))
|
||||
|
@ -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."
|
||||
|
@ -1098,6 +1098,7 @@ See also `multi-occur'."
|
||||
(endpt nil)
|
||||
(marker nil)
|
||||
(curstring "")
|
||||
(inhibit-field-text-motion t)
|
||||
(headerpt (with-current-buffer out-buf (point))))
|
||||
(with-current-buffer buf
|
||||
(or coding
|
||||
|
@ -411,7 +411,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)
|
||||
|
@ -1156,7 +1156,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
|
||||
@ -1281,7 +1281,8 @@ makes the search case-sensitive."
|
||||
(defvar minibuffer-temporary-goal-position nil)
|
||||
|
||||
(defun next-history-element (n)
|
||||
"Insert the next element of the minibuffer history into the minibuffer."
|
||||
"Puts next element of the minibuffer history in the minibuffer.
|
||||
With argument N, it uses the Nth following element."
|
||||
(interactive "p")
|
||||
(or (zerop n)
|
||||
(let ((narg (- minibuffer-history-position n))
|
||||
@ -1324,7 +1325,8 @@ makes the search case-sensitive."
|
||||
(goto-char (or minibuffer-temporary-goal-position (point-max))))))
|
||||
|
||||
(defun previous-history-element (n)
|
||||
"Inserts the previous element of the minibuffer history into the minibuffer."
|
||||
"Puts previous element of the minibuffer history in the minibuffer.
|
||||
With argument N, it uses the Nth previous element."
|
||||
(interactive "p")
|
||||
(next-history-element (- n)))
|
||||
|
||||
|
@ -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))
|
||||
|
@ -821,7 +821,16 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
|
||||
(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"
|
||||
@ -1302,7 +1311,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)
|
||||
@ -1359,7 +1370,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
|
||||
@ -1408,10 +1419,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
|
||||
@ -1624,9 +1637,7 @@ normal otherwise."
|
||||
(not noninteractive))
|
||||
(display-warning
|
||||
'initialization
|
||||
"Building Emacs overflowed pure space."
|
||||
;; 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
|
||||
|
32
lisp/subr.el
32
lisp/subr.el
@ -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.
|
||||
|
||||
|
@ -3318,7 +3318,7 @@ See `term-prompt-regexp'."
|
||||
((eq char ?r)
|
||||
(term-set-scroll-region
|
||||
(1- term-terminal-previous-parameter)
|
||||
term-terminal-parameter))
|
||||
(1- term-terminal-parameter)))
|
||||
(t)))
|
||||
|
||||
(defun term-set-scroll-region (top bottom)
|
||||
|
@ -79,9 +79,11 @@
|
||||
(eval-when-compile (require 'url))
|
||||
|
||||
(defvar mac-charset-info-alist)
|
||||
(defvar mac-services-selection)
|
||||
(defvar mac-service-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,17 @@ correspoinding TextEncodingBase value."
|
||||
(mac-add-charset-info "mac-dingbats" 34)
|
||||
(mac-add-charset-info "iso10646-1" 126) ; for ATSUI
|
||||
|
||||
(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 +1154,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 +1288,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 +1314,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 +1385,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 +1395,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 +1495,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,37 +1591,109 @@ Currently the `mailto' scheme is supported."
|
||||
|
||||
(define-key mac-apple-event-map [hicommand about] 'display-splash-screen)
|
||||
|
||||
(defun mac-services-open-file ()
|
||||
;;; 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 font panel 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-service-open-file ()
|
||||
"Open the file specified by the selection value for Services."
|
||||
(interactive)
|
||||
(find-file-existing (x-selection-value mac-services-selection)))
|
||||
(find-file-existing (x-selection-value mac-service-selection)))
|
||||
|
||||
(defun mac-services-open-selection ()
|
||||
(defun mac-service-open-selection ()
|
||||
"Create a new buffer containing the selection value for Services."
|
||||
(interactive)
|
||||
(switch-to-buffer (generate-new-buffer "*untitled*"))
|
||||
(insert (x-selection-value mac-services-selection))
|
||||
(insert (x-selection-value mac-service-selection))
|
||||
(sit-for 0)
|
||||
(save-buffer) ; It pops up the save dialog.
|
||||
)
|
||||
|
||||
(defun mac-services-mail-selection ()
|
||||
(defun mac-service-mail-selection ()
|
||||
"Prepare a mail buffer containing the selection value for Services."
|
||||
(interactive)
|
||||
(compose-mail)
|
||||
(rfc822-goto-eoh)
|
||||
(forward-line 1)
|
||||
(insert (x-selection-value mac-services-selection) "\n"))
|
||||
(insert (x-selection-value mac-service-selection) "\n"))
|
||||
|
||||
(defun mac-services-mail-to ()
|
||||
(defun mac-service-mail-to ()
|
||||
"Prepare a mail buffer to be sent to the selection value for Services."
|
||||
(interactive)
|
||||
(compose-mail (x-selection-value mac-services-selection)))
|
||||
(compose-mail (x-selection-value mac-service-selection)))
|
||||
|
||||
(defun mac-services-insert-text ()
|
||||
(defun mac-service-insert-text ()
|
||||
"Insert the selection value for Services."
|
||||
(interactive)
|
||||
(let ((text (x-selection-value mac-services-selection)))
|
||||
(let ((text (x-selection-value mac-service-selection)))
|
||||
(if (not buffer-read-only)
|
||||
(insert text)
|
||||
(kill-new text)
|
||||
@ -1556,15 +1701,17 @@ Currently the `mailto' scheme is supported."
|
||||
(substitute-command-keys
|
||||
"The text from the Services menu can be accessed with \\[yank]")))))
|
||||
|
||||
(define-key mac-apple-event-map [services paste] 'mac-services-insert-text)
|
||||
(define-key mac-apple-event-map [services perform open-file]
|
||||
'mac-services-open-file)
|
||||
(define-key mac-apple-event-map [services perform open-selection]
|
||||
'mac-services-open-selection)
|
||||
(define-key mac-apple-event-map [services perform mail-selection]
|
||||
'mac-services-mail-selection)
|
||||
(define-key mac-apple-event-map [services perform mail-to]
|
||||
'mac-services-mail-to)
|
||||
;; kEventClassService/kEventServicePaste
|
||||
(define-key mac-apple-event-map [service paste] 'mac-service-insert-text)
|
||||
;; kEventClassService/kEventServicePerform
|
||||
(define-key mac-apple-event-map [service perform open-file]
|
||||
'mac-service-open-file)
|
||||
(define-key mac-apple-event-map [service perform open-selection]
|
||||
'mac-service-open-selection)
|
||||
(define-key mac-apple-event-map [service perform mail-selection]
|
||||
'mac-service-mail-selection)
|
||||
(define-key mac-apple-event-map [service perform mail-to]
|
||||
'mac-service-mail-to)
|
||||
|
||||
(defun mac-dispatch-apple-event (event)
|
||||
"Dispatch EVENT according to the keymap `mac-apple-event-map'."
|
||||
@ -1589,6 +1736,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.
|
||||
@ -1884,37 +2108,11 @@ It returns a name of the created fontset."
|
||||
;; 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
|
||||
|
||||
@ -1979,6 +2177,7 @@ Switch to a buffer editing the last file dropped."
|
||||
(scroll-up 1)))
|
||||
|
||||
)
|
||||
|
||||
|
||||
;;;; Others
|
||||
|
||||
|
@ -227,6 +227,14 @@
|
||||
|
||||
(define-key map "\e[4~" [select])
|
||||
(define-key map "\e[29~" [print])
|
||||
|
||||
;; These keys will be available xterm starting probably from
|
||||
;; version 214.
|
||||
(define-key map "\e[27;5;8~" [(control ?\t)])
|
||||
(define-key map "\e[27;5;44~" [(control ?\,)])
|
||||
(define-key map "\e[27;5;46~" [(control ?\.)])
|
||||
(define-key map "\e[27;5;47~" [(control ?\/)])
|
||||
(define-key map "\e[27;5;92~" [(control ?\\)])
|
||||
|
||||
;; Other versions of xterm might emit these.
|
||||
(define-key map "\e[A" [up])
|
||||
|
@ -2577,15 +2577,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!
|
||||
@ -2604,13 +2607,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.
|
||||
|
||||
@ -3637,8 +3643,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].
|
||||
@ -3665,12 +3672,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 ()
|
||||
|
@ -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.
|
||||
|
@ -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))
|
||||
|
@ -1,3 +1,48 @@
|
||||
2006-05-10 Reiner Steib <Reiner.Steib@gmx.de>
|
||||
|
||||
* variables.texi (File Local Variables): Recommend to quote lambda
|
||||
expressions in safe-local-variable property.
|
||||
|
||||
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.
|
||||
|
@ -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:
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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}.
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -1784,7 +1784,8 @@ returns non-@code{nil} given that value. Many commonly encountered
|
||||
file variables standardly have @code{safe-local-variable} properties,
|
||||
including @code{fill-column}, @code{fill-prefix}, and
|
||||
@code{indent-tabs-mode}. For boolean-valued variables that are safe,
|
||||
use @code{booleanp} as the property value.
|
||||
use @code{booleanp} as the property value. Lambda expressions should
|
||||
be quoted so that @code{describe-variable} can display the predicate.
|
||||
|
||||
@defopt safe-local-variable-values
|
||||
This variable provides another way to mark some variable values as
|
||||
@ -1844,6 +1845,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.
|
||||
|
@ -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
|
||||
|
232
man/ChangeLog
232
man/ChangeLog
@ -1,3 +1,233 @@
|
||||
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.
|
||||
(Comparing Files): Delete what duplicates new node.
|
||||
(Files): Put Diff Mode in menu.
|
||||
|
||||
* misc.texi (Diff Mode): Moved to files.texi.
|
||||
|
||||
* emacs.texi (Top): Update menu for Diff Mode.
|
||||
|
||||
* trouble.texi (Emergency Escape): Simplify.
|
||||
|
||||
* emacs.texi (Top): Minor clarification.
|
||||
|
||||
2006-05-03 Teodor Zlatanov <tzz@lifelogs.com>
|
||||
|
||||
* commands.texi, entering.texi, screen.texi: Many simplifications.
|
||||
|
||||
2006-05-03 Richard Stallman <rms@gnu.org>
|
||||
|
||||
* commands.texi (Text Characters): Delete paragraph about unibyte
|
||||
non-ASCII printing chars.
|
||||
|
||||
* 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>
|
||||
|
||||
* emacs.texi (Top): Add Diff Mode to menu.
|
||||
@ -33,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.
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
191
man/arevert-xtra.texi
Normal 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
|
@ -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
|
||||
|
@ -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
838
man/cal-xtra.texi
Normal 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
|
@ -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
|
||||
|
@ -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
|
||||
@ -1227,7 +1228,7 @@ Specify @var{pixels} as additional space to put between lines, in pixels.
|
||||
@itemx --no-blinking-cursor
|
||||
@opindex --no-blinking-cursor
|
||||
@cindex blinking cursor disable, command-line argument
|
||||
Disable the blinking cursor on graphical terminals.
|
||||
Disable the blinking cursor on graphical displays.
|
||||
|
||||
@item -D
|
||||
@opindex -D
|
||||
|
@ -6,9 +6,9 @@
|
||||
@chapter Characters, Keys and Commands
|
||||
|
||||
This chapter explains the character sets used by Emacs for input
|
||||
commands and for the contents of files, and also explains the concepts
|
||||
of @dfn{keys} and @dfn{commands}, which are fundamental for understanding
|
||||
how Emacs interprets your keyboard and mouse input.
|
||||
commands and for the contents of files, and the fundamental concepts of
|
||||
@dfn{keys} and @dfn{commands}, whereby Emacs interprets your keyboard
|
||||
and mouse input.
|
||||
@end iftex
|
||||
|
||||
@ifnottex
|
||||
@ -35,11 +35,11 @@ control characters, such as @kbd{Control-a} (usually written @kbd{C-a}
|
||||
for short). @kbd{C-a} gets its name from the fact that you type it by
|
||||
holding down the @key{CTRL} key while pressing @kbd{a}.
|
||||
|
||||
Some @acronym{ASCII} control characters have special names, and most terminals
|
||||
have special keys you can type them with: for example, @key{RET},
|
||||
@key{TAB}, @key{DEL} and @key{ESC}. The space character is usually
|
||||
referred to below as @key{SPC}, even though strictly speaking it is a
|
||||
graphic character whose graphic happens to be blank.
|
||||
Some @acronym{ASCII} control characters have special names, and most
|
||||
terminals have special keys you can type them with: for example,
|
||||
@key{RET}, @key{TAB}, @key{DEL} and @key{ESC}. The space character is
|
||||
usually known as @key{SPC}, even though strictly speaking it is a
|
||||
graphic character that is blank.
|
||||
|
||||
Emacs extends the @acronym{ASCII} character set with thousands more printing
|
||||
characters (@pxref{International}), additional control characters, and a
|
||||
@ -51,11 +51,11 @@ addition, the shift key is meaningless with control characters:
|
||||
@kbd{C-a} and @kbd{C-A} are the same character, and Emacs cannot
|
||||
distinguish them.
|
||||
|
||||
But the Emacs character set has room for control variants of all
|
||||
printing characters, and for distinguishing between @kbd{C-a} and
|
||||
@kbd{C-A}. Graphical terminals make it possible to enter all these
|
||||
characters. For example, @kbd{C--} (that's Control-Minus) and
|
||||
@kbd{C-5} are meaningful Emacs commands on a graphical terminal.
|
||||
The Emacs character set has room for control variants of all
|
||||
printing characters, and distinguishes @kbd{C-A} from @kbd{C-a}.
|
||||
Graphical terminals make it possible to enter all these characters.
|
||||
For example, @kbd{C--} (that's Control-Minus) and @kbd{C-5} are
|
||||
meaningful Emacs commands on a graphical terminal.
|
||||
|
||||
Another Emacs character-set extension is additional modifier bits.
|
||||
Only one modifier bit is commonly used; it is called Meta. Every
|
||||
@ -106,10 +106,10 @@ two modifiers by using @kbd{C-x @@} twice for the same character,
|
||||
because the first one goes to work on the @kbd{C-x}.)
|
||||
|
||||
Keyboard input includes keyboard keys that are not characters at
|
||||
all: for example function keys and arrow keys. Mouse buttons are also
|
||||
outside the gamut of characters. However, you can modify these events
|
||||
with the modifier keys @key{CTRL}, @key{META}, @key{SUPER},
|
||||
@key{HYPER} and @key{ALT}, just as you can modify keyboard characters.
|
||||
all, such as function keys and arrow keys. Mouse buttons are also not
|
||||
characters. However, you can modify these events with the modifier
|
||||
keys @key{CTRL}, @key{META}, @key{SUPER}, @key{HYPER} and @key{ALT},
|
||||
just like keyboard characters.
|
||||
|
||||
@cindex input event
|
||||
Input characters and non-character inputs are collectively called
|
||||
@ -121,7 +121,7 @@ some characters or non-character events, see @ref{Customization}.
|
||||
@acronym{ASCII} terminals cannot really send anything to the computer except
|
||||
@acronym{ASCII} characters. These terminals use a sequence of characters to
|
||||
represent each function key. But that is invisible to the Emacs user,
|
||||
because the keyboard input routines recognize these special sequences
|
||||
because the keyboard input routines catch these special sequences
|
||||
and convert them to function key events before any other part of Emacs
|
||||
gets to see them.
|
||||
|
||||
@ -131,9 +131,9 @@ gets to see them.
|
||||
@cindex key sequence
|
||||
@cindex key
|
||||
A @dfn{key sequence} (@dfn{key}, for short) is a sequence of input
|
||||
events that are meaningful as a unit---as ``a single command.'' Some
|
||||
Emacs command sequences are just one character or one event; for
|
||||
example, just @kbd{C-f} is enough to move forward one character in the
|
||||
events that is meaningful as a unit---a ``single command.'' Some
|
||||
Emacs command sequences are invoked by just one character or one
|
||||
event; for example, just @kbd{C-f} moves forward one character in the
|
||||
buffer. But Emacs also has commands that take two or more events to
|
||||
invoke.
|
||||
|
||||
@ -158,33 +158,33 @@ r}, are themselves prefix keys that lead to three-event key
|
||||
sequences. There's no limit to the length of a key sequence, but in
|
||||
practice people rarely use sequences longer than four events.
|
||||
|
||||
By contrast, you can't add more events onto a complete key. For
|
||||
example, the two-event sequence @kbd{C-f C-k} is not a key, because
|
||||
the @kbd{C-f} is a complete key in itself. It's impossible to give
|
||||
@kbd{C-f C-k} an independent meaning as a command. @kbd{C-f C-k} is two
|
||||
key sequences, not one.@refill
|
||||
You can't add input events onto a complete key. For example, the
|
||||
two-event sequence @kbd{C-f C-k} is not a key, because the @kbd{C-f}
|
||||
is a complete key in itself. It's impossible to give @kbd{C-f C-k} an
|
||||
independent meaning as a command. @kbd{C-f C-k} is two key sequences,
|
||||
not one.@refill
|
||||
|
||||
All told, the prefix keys in Emacs are @kbd{C-c}, @kbd{C-h},
|
||||
@kbd{C-x}, @kbd{C-x @key{RET}}, @kbd{C-x @@}, @kbd{C-x a}, @kbd{C-x
|
||||
n}, @w{@kbd{C-x r}}, @kbd{C-x v}, @kbd{C-x 4}, @kbd{C-x 5}, @kbd{C-x
|
||||
6}, @key{ESC}, @kbd{M-g}, and @kbd{M-o}. (@key{F1} and @key{F2} are
|
||||
aliases for @kbd{C-h} and @kbd{C-x 6}.) But this list is not cast in
|
||||
concrete; it is just a matter of Emacs's standard key bindings. If
|
||||
you customize Emacs, you can make new prefix keys, or eliminate some
|
||||
of the standard ones. @xref{Key Bindings}.
|
||||
aliases for @kbd{C-h} and @kbd{C-x 6}.) This list is not cast in stone;
|
||||
it describes the standard key bindings. If you customize Emacs, you can make
|
||||
new prefix keys, or eliminate some of the standard ones (not
|
||||
recommended for most users). @xref{Key Bindings}.
|
||||
|
||||
If you do make or eliminate prefix keys, that changes the set of
|
||||
If you make or eliminate prefix keys, that changes the set of
|
||||
possible key sequences. For example, if you redefine @kbd{C-f} as a
|
||||
prefix, @kbd{C-f C-k} automatically becomes a key (complete, unless you
|
||||
define that too as a prefix). Conversely, if you remove the prefix
|
||||
definition of @kbd{C-x 4}, then @kbd{C-x 4 f} (or @kbd{C-x 4
|
||||
@var{anything}}) is no longer a key.
|
||||
prefix, @kbd{C-f C-k} automatically becomes a key (complete, unless
|
||||
you define that too as a prefix). Conversely, if you remove the
|
||||
prefix definition of @kbd{C-x 4}, then @kbd{C-x 4 f} and @kbd{C-x 4
|
||||
@var{anything}} are no longer keys.
|
||||
|
||||
Typing the help character (@kbd{C-h} or @key{F1}) after a prefix key
|
||||
displays a list of the commands starting with that prefix. There are
|
||||
a few prefix keys for which @kbd{C-h} does not work---for historical
|
||||
a few prefix keys after which @kbd{C-h} does not work---for historical
|
||||
reasons, they define other meanings for @kbd{C-h} which are painful to
|
||||
change. But @key{F1} should work for all prefix keys.
|
||||
change. @key{F1} works after all prefix keys.
|
||||
|
||||
@node Commands, Text Characters, Keys, Top
|
||||
@section Keys and Commands
|
||||
@ -197,61 +197,65 @@ do. But Emacs does not assign meanings to keys directly. Instead,
|
||||
Emacs assigns meanings to named @dfn{commands}, and then gives keys
|
||||
their meanings by @dfn{binding} them to commands.
|
||||
|
||||
Every command has a name chosen by a programmer. The name is usually
|
||||
made of a few English words separated by dashes; for example,
|
||||
Every command has a name chosen by a programmer. The name is
|
||||
usually made of a few English words separated by dashes; for example,
|
||||
@code{next-line} or @code{forward-word}. A command also has a
|
||||
@dfn{function definition} which is a Lisp program; this is what makes
|
||||
the command do what it does. In Emacs Lisp, a command is actually a
|
||||
special kind of Lisp function; one which specifies how to read arguments
|
||||
for it and call it interactively. For more information on commands and
|
||||
functions, see @ref{What Is a Function,, What Is a Function, elisp, The
|
||||
Emacs Lisp Reference Manual}. (The definition we use in this manual is
|
||||
simplified slightly.)
|
||||
@dfn{function definition} which is a Lisp program; this is how the
|
||||
command does its work. In Emacs Lisp, a command is a Lisp function with
|
||||
special options to read arguments and for interactive use. For more
|
||||
information on commands and functions, see @ref{What Is a Function,,
|
||||
What Is a Function, elisp, The Emacs Lisp Reference Manual}. (The
|
||||
definition here is simplified slightly.)
|
||||
|
||||
The bindings between keys and commands are recorded in various tables
|
||||
called @dfn{keymaps}. @xref{Keymaps}.
|
||||
The bindings between keys and commands are recorded in tables called
|
||||
@dfn{keymaps}. @xref{Keymaps}.
|
||||
|
||||
When we say that ``@kbd{C-n} moves down vertically one line'' we are
|
||||
glossing over a distinction that is irrelevant in ordinary use but is vital
|
||||
in understanding how to customize Emacs. It is the command
|
||||
@code{next-line} that is programmed to move down vertically. @kbd{C-n} has
|
||||
this effect @emph{because} it is bound to that command. If you rebind
|
||||
@kbd{C-n} to the command @code{forward-word} then @kbd{C-n} will move
|
||||
forward by words instead. Rebinding keys is a common method of
|
||||
customization.@refill
|
||||
glossing over a subtle distinction that is irrelevant in ordinary use,
|
||||
but vital for Emacs customization. The command @code{next-line} does
|
||||
a vertical move downward. @kbd{C-n} has this effect @emph{because} it
|
||||
is bound to @code{next-line}. If you rebind @kbd{C-n} to the command
|
||||
@code{forward-word}, @kbd{C-n} will move forward one word instead.
|
||||
Rebinding keys is an important method of customization.
|
||||
|
||||
In the rest of this manual, we usually ignore this distinction to
|
||||
keep things simple. We will often speak of keys like @kbd{C-n} as
|
||||
commands, even though strictly speaking a key is bound to some
|
||||
command. To give the information needed for customization, we state
|
||||
the name of the command which really does the work in parentheses
|
||||
after mentioning the key that runs it. For example, we will say that
|
||||
``The command @kbd{C-n} (@code{next-line}) moves point vertically
|
||||
down,'' meaning that @code{next-line} is a command that moves
|
||||
vertically down, and @kbd{C-n} is a key that is normally bound to it.
|
||||
commands, even though strictly speaking the key is bound to a command.
|
||||
Usually we state the name of the command which really does the work in
|
||||
parentheses after mentioning the key that runs it. For example, we
|
||||
will say that ``The command @kbd{C-n} (@code{next-line}) moves point
|
||||
vertically down,'' meaning that the command @code{next-line} moves
|
||||
vertically down, and the key @kbd{C-n} is normally bound to it.
|
||||
|
||||
While we are on the subject of information for customization only,
|
||||
it's a good time to tell you about @dfn{variables}. Often the
|
||||
description of a command will say, ``To change this, set the variable
|
||||
@code{mumble-foo}.'' A variable is a name used to remember a value.
|
||||
Most of the variables documented in this manual exist just to facilitate
|
||||
customization: some command or other part of Emacs examines the variable
|
||||
and behaves differently according to the value that you set. Until you
|
||||
are interested in customizing, you can ignore the information about
|
||||
variables. When you are ready to be interested, read the basic
|
||||
information on variables, and then the information on individual
|
||||
variables will make sense. @xref{Variables}.
|
||||
Since we are discussing customization, we should tell you about
|
||||
@dfn{variables}. Often the description of a command will say, ``To
|
||||
change this, set the variable @code{mumble-foo}.'' A variable is a
|
||||
name used to store a value. Most of the variables documented in this
|
||||
manual are meant for customization: some command or other part of
|
||||
Emacs examines the variable and behaves differently according to the
|
||||
value that you set. You can ignore the information about variables
|
||||
until you are interested in customizing them. Then read the basic
|
||||
information on variables (@pxref{Variables}) and the information about
|
||||
specific variables will make sense.
|
||||
|
||||
@node Text Characters, Entering Emacs, Commands, Top
|
||||
@section Character Set for Text
|
||||
@cindex characters (in text)
|
||||
|
||||
Text in Emacs buffers is a sequence of 8-bit bytes. Each byte can
|
||||
hold a single @acronym{ASCII} character. Both @acronym{ASCII} control characters (octal
|
||||
codes 000 through 037, and 0177) and @acronym{ASCII} printing characters (codes
|
||||
040 through 0176) are allowed; however, non-@acronym{ASCII} control characters
|
||||
cannot appear in a buffer. The other modifier flags used in keyboard
|
||||
input, such as Meta, are not allowed in buffers either.
|
||||
Text in Emacs buffers is a sequence of characters. In the simplest
|
||||
case, these are @acronym{ASCII} characters, each stored in one 8-bit
|
||||
byte. Both @acronym{ASCII} control characters (octal codes 000
|
||||
through 037, and 0177) and @acronym{ASCII} printing characters (codes
|
||||
040 through 0176) are allowed. The other modifier flags used in
|
||||
keyboard input, such as Meta, are not allowed in buffers.
|
||||
|
||||
Non-@acronym{ASCII} printing characters can also appear in buffers,
|
||||
when multibyte characters are enabled. They have character codes
|
||||
starting at 256, octal 0400, and each one is represented as a sequence
|
||||
of two or more bytes. @xref{International}. Single-byte characters
|
||||
with codes 128 through 255 can also appear in multibyte buffers.
|
||||
However, non-@acronym{ASCII} control characters cannot appear in a
|
||||
buffer.
|
||||
|
||||
Some @acronym{ASCII} control characters serve special purposes in text, and have
|
||||
special names. For example, the newline character (octal code 012) is
|
||||
@ -259,16 +263,9 @@ used in the buffer to end a line, and the tab character (octal code 011)
|
||||
is used for indenting to the next tab stop column (normally every 8
|
||||
columns). @xref{Text Display}.
|
||||
|
||||
Non-@acronym{ASCII} printing characters can also appear in buffers. When
|
||||
multibyte characters are enabled, you can use any of the non-@acronym{ASCII}
|
||||
printing characters that Emacs supports. They have character codes
|
||||
starting at 256, octal 0400, and each one is represented as a sequence
|
||||
of two or more bytes. @xref{International}. Single-byte characters
|
||||
with codes 128 through 255 can also appear in multibyte buffers.
|
||||
|
||||
If you disable multibyte characters, then you can use only one
|
||||
alphabet of non-@acronym{ASCII} characters, but they all fit in one byte. They
|
||||
use codes 0200 through 0377. @xref{Unibyte Mode}.
|
||||
alphabet of non-@acronym{ASCII} characters, which all fit in one byte.
|
||||
They use octal codes 0200 through 0377. @xref{Unibyte Mode}.
|
||||
|
||||
@ifnottex
|
||||
@lowersections
|
||||
|
@ -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
49
man/dired-xtra.texi
Normal 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
|
@ -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
|
||||
|
@ -1026,7 +1026,7 @@ elisp, The Emacs Lisp Reference Manual}.
|
||||
@cindex cursor, blinking
|
||||
You can customize the cursor's color, and whether it blinks, using
|
||||
the @code{cursor} Custom group (@pxref{Easy Customization}). On
|
||||
graphical terminals, the command @kbd{M-x blink-cursor-mode} enables
|
||||
a graphical display, the command @kbd{M-x blink-cursor-mode} enables
|
||||
or disables the blinking of the cursor. (On text terminals, the
|
||||
terminal itself blinks the cursor, and Emacs has no control over it.)
|
||||
You can control how the cursor appears when it blinks off by setting
|
||||
@ -1050,7 +1050,7 @@ it a @code{nil} value.
|
||||
|
||||
@vindex x-stretch-cursor
|
||||
@cindex wide block cursor
|
||||
On graphical terminals, Emacs can optionally draw the block cursor
|
||||
On graphical displays, Emacs can optionally draw the block cursor
|
||||
as wide as the character under the cursor---for example, if the cursor
|
||||
is on a tab character, it would cover the full width occupied by that
|
||||
tab character. To enable this feature, set the variable
|
||||
@ -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.
|
||||
|
3803
man/emacs-xtra.texi
3803
man/emacs-xtra.texi
File diff suppressed because it is too large
Load Diff
@ -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.
|
||||
@ -197,7 +207,6 @@ Advanced Features
|
||||
* Sorting:: Sorting lines, paragraphs or pages within Emacs.
|
||||
* Narrowing:: Restricting display and editing to a portion
|
||||
of the buffer.
|
||||
* Diff Mode:: Editing diff output.
|
||||
* Two-Column:: Splitting apart columns to edit them
|
||||
in side-by-side windows.
|
||||
* Editing Binary Files::Using Hexl mode to edit binary files.
|
||||
@ -373,6 +382,7 @@ File Handling
|
||||
* Version Control:: Version control systems (RCS, CVS and SCCS).
|
||||
* Directories:: Creating, deleting, and listing file directories.
|
||||
* Comparing Files:: Finding where two files differ.
|
||||
* Diff Mode:: Editing diff output.
|
||||
* Misc File Ops:: Other things you can do on files.
|
||||
* Compressed Files:: Accessing compressed files.
|
||||
* File Archives:: Operating on tar, zip, jar etc. archive files.
|
||||
@ -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.
|
||||
@ -873,7 +893,7 @@ programmer, but if you are not interested in customizing, you can
|
||||
ignore the customization hints.
|
||||
|
||||
This is primarily a reference manual, but can also be used as a
|
||||
primer. If you are a complete beginner, we recommend you start with
|
||||
primer. If you are new to Emacs, we recommend you start with
|
||||
the on-line, learn-by-doing tutorial, before reading the manual. To
|
||||
run the tutorial, start Emacs and type @kbd{C-h t}. The tutorial
|
||||
describes commands, tells you when to try them, and explains the
|
||||
@ -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
414
man/emerge-xtra.texi
Normal 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
|
@ -8,58 +8,54 @@
|
||||
@cindex starting Emacs
|
||||
|
||||
The usual way to invoke Emacs is with the shell command
|
||||
@command{emacs}. Emacs clears the screen and then displays an initial
|
||||
help message and copyright notice. Some operating systems discard all
|
||||
type-ahead when Emacs starts up; they give Emacs no way to prevent
|
||||
this. If you ever use those systems, learn the habit of waiting for
|
||||
Emacs to clear the screen before typing your first editing command.
|
||||
@command{emacs}. Emacs clears the screen, then displays an initial
|
||||
help message and copyright notice. Some operating systems discard
|
||||
your type-ahead when Emacs starts up; they give Emacs no way to
|
||||
prevent this. On those systems, wait for Emacs to clear the screen
|
||||
before you start typing.
|
||||
|
||||
If you run Emacs from a shell window under the X Window System, run it
|
||||
in the background with @command{emacs&}. This way, Emacs does not tie up
|
||||
the shell window, so you can use that to run other shell commands while
|
||||
Emacs operates its own X windows. You can begin typing Emacs commands
|
||||
as soon as you direct your keyboard input to the Emacs frame.
|
||||
From a shell window under the X Window System, run Emacs in the
|
||||
background with @command{emacs&}. This way, Emacs won't tie up the
|
||||
shell window, so you can use it to run other shell commands while
|
||||
Emacs is running. You can type Emacs commands as soon as you direct
|
||||
your keyboard input to an Emacs frame.
|
||||
|
||||
@vindex initial-major-mode
|
||||
When Emacs starts up, it creates a buffer named @samp{*scratch*}.
|
||||
That's the buffer you start out in. The @samp{*scratch*} buffer uses
|
||||
Lisp Interaction mode; you can use it to type Lisp expressions and
|
||||
evaluate them, or you can ignore that capability and just write notes
|
||||
in it. (You can specify a different major mode for this buffer by
|
||||
evaluate them. You can also ignore that capability and just write notes
|
||||
there. You can specify a different major mode for this buffer by
|
||||
setting the variable @code{initial-major-mode} in your init file.
|
||||
@xref{Init File}.)
|
||||
@xref{Init File}.
|
||||
|
||||
It is possible to specify files to be visited, Lisp files to be
|
||||
loaded, and functions to be called, by giving Emacs arguments in the
|
||||
shell command line. @xref{Emacs Invocation}. But we don't recommend
|
||||
doing this. The feature exists mainly for compatibility with other
|
||||
editors.
|
||||
loaded, and functions to be called through Emacs command-line
|
||||
arguments. @xref{Emacs Invocation}. The feature exists mainly for
|
||||
compatibility with other editors, and for scripts.
|
||||
|
||||
Many other editors are designed to be started afresh each time you
|
||||
want to edit. You edit one file and then exit the editor. The next
|
||||
time you want to edit either another file or the same one, you must run
|
||||
the editor again. With these editors, it makes sense to use a
|
||||
command-line argument to say which file to edit.
|
||||
Many editors are designed to edit one file. When done with that
|
||||
file, you exit the editor. The next time you want to edit a file, you
|
||||
must start the editor again. Working this way, it is convenient to
|
||||
use a command-line argument to say which file to edit.
|
||||
|
||||
But starting a new Emacs each time you want to edit a different file
|
||||
does not make sense. This would fail to take advantage of Emacs's
|
||||
ability to visit more than one file in a single editing session, and
|
||||
it would lose the other accumulated context, such as the kill ring,
|
||||
registers, undo history, and mark ring, that are useful for operating
|
||||
on multiple files or even one.
|
||||
It's not smart to start Emacs afresh for every file you edit. Emacs
|
||||
can visit more than one file in a single editing session, and upon
|
||||
exit Emacs loses valuable accumulated context, such as the kill ring,
|
||||
registers, undo history, and mark ring. These features are useful for
|
||||
operating on multiple files, or even one. If you kill Emacs after
|
||||
each file, you don't take advantage of them.
|
||||
|
||||
The recommended way to use GNU Emacs is to start it only once, just
|
||||
after you log in, and do all your editing in the same Emacs session.
|
||||
Each time you want to edit a different file, you visit it with the
|
||||
existing Emacs, which eventually comes to have many files in it ready
|
||||
for editing. Usually you do not kill the Emacs until you are about to
|
||||
log out. @xref{Files}, for more information on visiting more than one
|
||||
file.
|
||||
Each time you edit a file, you visit it with the existing Emacs, which
|
||||
eventually has many files in it ready for editing. Usually you do not
|
||||
kill Emacs until you are about to log out. @xref{Files}, for more
|
||||
information on visiting more than one file.
|
||||
|
||||
If you want to edit a file from another program and already have
|
||||
Emacs running, you can use the @command{emacsclient} program to open a
|
||||
file in the already running Emacs. @xref{Emacs Server}, for more
|
||||
information on editing files with Emacs from other programs.
|
||||
To edit a file from another program while Emacs is running, you can
|
||||
use the @command{emacsclient} helper program to open a file in the
|
||||
already running Emacs. @xref{Emacs Server}.
|
||||
|
||||
@ifnottex
|
||||
@raisesections
|
||||
@ -73,9 +69,9 @@ information on editing files with Emacs from other programs.
|
||||
@cindex leaving Emacs
|
||||
@cindex quitting Emacs
|
||||
|
||||
There are two commands for exiting Emacs because there are three
|
||||
kinds of exiting: @dfn{suspending} Emacs, @dfn{Iconifying} Emacs, and
|
||||
@dfn{killing} Emacs.
|
||||
There are two commands for exiting Emacs, and three kinds of exiting:
|
||||
@dfn{suspending} Emacs, @dfn{Iconifying} Emacs, and @dfn{killing}
|
||||
Emacs.
|
||||
|
||||
@dfn{Suspending} means stopping Emacs temporarily and returning
|
||||
control to its parent process (usually a shell), allowing you to resume
|
||||
@ -110,11 +106,11 @@ it iconifies the Emacs frame.
|
||||
Emacs. You can resume Emacs with the shell command @command{%emacs}
|
||||
in most common shells. On systems that don't support suspending
|
||||
programs, @kbd{C-z} starts an inferior shell that communicates
|
||||
directly with the terminal, and Emacs waits until you exit the subshell.
|
||||
(The way to do that is probably with @kbd{C-d} or @command{exit}, but
|
||||
it depends on which shell you use.) The only way on these systems to
|
||||
get back to the shell from which Emacs was run (to log out, for
|
||||
example) is to kill Emacs.
|
||||
directly with the terminal, and Emacs waits until you exit the
|
||||
subshell. (The way to do that is probably with @kbd{C-d} or
|
||||
@command{exit}, but it depends on which shell you use.) On these
|
||||
systems, you can only get back to the shell from which Emacs was run
|
||||
(to log out, for example) when you kill Emacs.
|
||||
|
||||
Suspending can fail if you run Emacs under a shell that doesn't
|
||||
support suspending programs, even if the system itself does support
|
||||
@ -133,13 +129,13 @@ a shell window.
|
||||
@kindex C-x C-c
|
||||
@findex save-buffers-kill-emacs
|
||||
To exit and kill Emacs, type @kbd{C-x C-c}
|
||||
(@code{save-buffers-kill-emacs}). A two-character key is used for
|
||||
this to make it harder to type by accident. This command first offers
|
||||
to save any modified file-visiting buffers. If you do not save them
|
||||
all, it asks for reconfirmation with @kbd{yes} before killing Emacs,
|
||||
since any changes not saved will be lost forever. Also, if any
|
||||
subprocesses are still running, @kbd{C-x C-c} asks for confirmation
|
||||
about them, since killing Emacs will also kill the subprocesses.
|
||||
(@code{save-buffers-kill-emacs}). A two-character key is used to make
|
||||
it harder to type by accident. This command first offers to save any
|
||||
modified file-visiting buffers. If you do not save them all, it asks
|
||||
for confirmation with @kbd{yes} before killing Emacs, since any
|
||||
changes not saved now will be lost forever. Also, if any subprocesses are
|
||||
still running, @kbd{C-x C-c} asks for confirmation about them, since
|
||||
killing Emacs will also kill the subprocesses.
|
||||
|
||||
@vindex confirm-kill-emacs
|
||||
If the value of the variable @code{confirm-kill-emacs} is
|
||||
@ -150,11 +146,10 @@ function to use as the value of @code{confirm-kill-emacs} is the
|
||||
function @code{yes-or-no-p}. The default value of
|
||||
@code{confirm-kill-emacs} is @code{nil}.
|
||||
|
||||
There is no way to resume an Emacs session once you have killed it.
|
||||
You can, however, arrange for Emacs to record certain session
|
||||
information when you kill it, such as which files are visited, so that
|
||||
the next time you start Emacs it will try to visit the same files and
|
||||
so on. @xref{Saving Emacs Sessions}.
|
||||
You can't resume an Emacs session after killing it. Emacs can,
|
||||
however, record certain session information when you kill it, such as
|
||||
which files you visited, so the next time you start Emacs it will try
|
||||
to visit the same files. @xref{Saving Emacs Sessions}.
|
||||
|
||||
The operating system usually listens for certain special characters
|
||||
whose meaning is to kill or suspend the program you are running.
|
||||
|
38
man/faq.texi
38
man/faq.texi
@ -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}.
|
||||
|
||||
|
278
man/files.texi
278
man/files.texi
@ -25,11 +25,15 @@ 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).
|
||||
* Directories:: Creating, deleting, and listing file directories.
|
||||
* Comparing Files:: Finding where two files differ.
|
||||
* Diff Mode:: Mode for editing file differences.
|
||||
* Misc File Ops:: Other things you can do on files.
|
||||
* Compressed Files:: Accessing compressed files.
|
||||
* File Archives:: Operating on tar, zip, jar etc. archive files.
|
||||
@ -106,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
|
||||
@ -517,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.
|
||||
@ -972,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
|
||||
@ -1201,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.
|
||||
@ -1210,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
|
||||
@ -1347,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
|
||||
@ -1379,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
|
||||
@ -1544,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
|
||||
@ -1567,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.
|
||||
@ -1644,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
|
||||
@ -1733,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
|
||||
@ -1753,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
|
||||
@ -1814,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
|
||||
@ -1877,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
|
||||
@ -1893,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)
|
||||
@ -2071,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,
|
||||
@ -2082,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
|
||||
|
||||
@ -2159,6 +2265,8 @@ differences in an Emacs buffer named @samp{*diff*}. It works by
|
||||
running the @code{diff} program, using options taken from the variable
|
||||
@code{diff-switches}. The value of @code{diff-switches} should be a
|
||||
string; the default is @code{"-c"} to specify a context diff.
|
||||
@xref{Top,, Diff, diff, Comparing and Merging Files}, for more
|
||||
information about @command{diff} output formats.
|
||||
|
||||
@findex diff-backup
|
||||
The command @kbd{M-x diff-backup} compares a specified file with its most
|
||||
@ -2166,20 +2274,6 @@ recent backup. If you specify the name of a backup file,
|
||||
@code{diff-backup} compares it with the source file that it is a backup
|
||||
of.
|
||||
|
||||
@findex diff-goto-source
|
||||
@findex diff-mode
|
||||
@cindex Diff mode
|
||||
The @samp{*diff*} buffer uses Diff mode, which enables you to use
|
||||
@kbd{C-x `} to visit successive changed locations in the two source
|
||||
files, as in Compilation mode (@pxref{Compilation Mode}.) You can
|
||||
also move to a particular hunk of changes and type @kbd{C-c C-c}
|
||||
(@code{diff-goto-source}) to visit the corresponding source location.
|
||||
|
||||
@cindex patches
|
||||
Differences between versions of files are often distributed as
|
||||
patches, which are the output from the @command{diff} program. You
|
||||
can use Diff mode to operate on a patch by typing @kbd{M-x diff-mode}.
|
||||
|
||||
@findex compare-windows
|
||||
The command @kbd{M-x compare-windows} compares the text in the
|
||||
current window with that in the next window. (For more information
|
||||
@ -2216,8 +2310,94 @@ 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
|
||||
@cindex Diff mode
|
||||
@findex diff-mode
|
||||
@cindex patches, editing
|
||||
|
||||
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
|
||||
header, so that you can actually apply the edited patch. Diff mode
|
||||
also provides the following commands to navigate, manipulate and apply
|
||||
parts of patches:
|
||||
|
||||
@table @kbd
|
||||
@item M-n
|
||||
Move to the next hunk-start (@code{diff-hunk-next}).
|
||||
|
||||
@item M-p
|
||||
Move to the previous hunk-start (@code{diff-hunk-prev}).
|
||||
|
||||
@item M-@}
|
||||
Move to the next file-start, in a multi-file patch
|
||||
(@code{diff-file-next}).
|
||||
|
||||
@item M-@{
|
||||
Move to the previous file-start, in a multi-file patch
|
||||
(@code{diff-file-prev}).
|
||||
|
||||
@item M-k
|
||||
Kill the hunk at point (@code{diff-hunk-kill}).
|
||||
|
||||
@item M-K
|
||||
In a multi-file patch, kill the current file part.
|
||||
(@code{diff-file-kill}).
|
||||
|
||||
@item C-c C-a
|
||||
Apply this hunk to its target file (@code{diff-apply-hunk}). With a
|
||||
prefix argument of @kbd{C-u}, revert this hunk.
|
||||
|
||||
@item C-c C-c
|
||||
Go to the source corresponding to this hunk (@code{diff-goto-source}).
|
||||
|
||||
@item C-c C-e
|
||||
Start an Ediff session with the patch (@code{diff-ediff-patch}).
|
||||
@xref{Top, Ediff, Ediff, ediff, The Ediff Manual}.
|
||||
|
||||
@item C-c C-n
|
||||
Restrict the view to the current hunk (@code{diff-restrict-view}).
|
||||
@xref{Narrowing}. With a prefix argument of @kbd{C-u}, restrict the
|
||||
view to the current patch of a multiple file patch. To widen again,
|
||||
use @kbd{C-x n w}.
|
||||
|
||||
@item C-c C-r
|
||||
Reverse the direction of comparison for the entire buffer
|
||||
(@code{diff-reverse-direction}).
|
||||
|
||||
@item C-c C-s
|
||||
Split the hunk at point (@code{diff-split-hunk}). This is for
|
||||
manually editing patches, and only works with the unified diff format.
|
||||
|
||||
@item C-c C-u
|
||||
Convert the entire buffer to unified format
|
||||
(@code{diff-context->unified}). With a prefix argument, convert
|
||||
unified format to context format. In Transient Mark mode, when the
|
||||
mark is active, this command operates only on the region.
|
||||
|
||||
@item C-c C-w
|
||||
Refine the current hunk so that it disregards changes in whitespace
|
||||
(@code{diff-refine-hunk}).
|
||||
@end table
|
||||
|
||||
@kbd{C-x 4 a} in Diff mode operates on behalf of the target file,
|
||||
but gets the function name from the patch itself. @xref{Change Log}.
|
||||
This is useful for making log entries for functions that are deleted
|
||||
by the patch.
|
||||
|
||||
@node Misc File Ops
|
||||
@section Miscellaneous File Operations
|
||||
@ -2328,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
548
man/fortran-xtra.texi
Normal 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
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -62,7 +62,7 @@ message in the echo area to explain why the text has not been erased.
|
||||
* Killing by Lines:: How to kill entire lines of text at one time.
|
||||
* Other Kill Commands:: Commands to kill large regions of text and
|
||||
syntactic units such as words and sentences.
|
||||
* Graphical Kill:: The kill ring on graphical terminals:
|
||||
* Graphical Kill:: The kill ring on graphical displays:
|
||||
yanking between applications.
|
||||
@end menu
|
||||
|
||||
|
@ -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
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user