Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-58
Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 239-258) - Update from CVS - (Ffield_beginning, find_field): Undo change of 2006-04-23. - Rcirc patch from Ryan Yeske - Merge from gnus--rel--5.10 - Clean up lisp/gnus/ChangeLog a bit * gnus--rel--5.10 (patch 91-98) - Merge from emacs--devo--0 - Update from CVS
This commit is contained in:
commit
fe682fb2f0
119 changed files with 4117 additions and 1934 deletions
|
@ -1,3 +1,15 @@
|
|||
2006-04-28 Bill Wohler <wohler@newt.com>
|
||||
|
||||
Release MH-E version 7.95.
|
||||
|
||||
* NEWS, MH-E-NEWS: Update for MH-E release 7.95.
|
||||
|
||||
2006-04-21 Bill Wohler <wohler@newt.com>
|
||||
|
||||
Release MH-E version 7.94.
|
||||
|
||||
* NEWS, MH-E-NEWS: Update for MH-E release 7.94.
|
||||
|
||||
2006-04-21 Nick Roberts <nickrob@snap.net.nz>
|
||||
|
||||
* NEWS: Mention t-mouse.el. Touch up description of gdb-ui.el.
|
||||
|
|
|
@ -6,6 +6,103 @@ Copying and distribution of this file, with or without modification,
|
|||
are permitted in any medium without royalty provided the copyright
|
||||
notice and this notice are preserved.
|
||||
|
||||
* Changes in MH-E 7.95
|
||||
|
||||
Version 7.95, the second 8.0 release candidate, fixes a single bug.
|
||||
It would be good to check this version ASAP since the Emacs pretest is
|
||||
coming in days: if no showstopper problems are found in this version
|
||||
it will be promoted to 8.0 before the pretest. Thanks for your help!
|
||||
|
||||
** Bug Fixes in MH-E 7.95
|
||||
|
||||
*** Folder Completion Fails in fcc: Field
|
||||
|
||||
This has been fixed (closes SF #1476270).
|
||||
|
||||
* Changes in MH-E 7.94
|
||||
|
||||
Version 7.94, the first 8.0 release candidate, fixes a bunch of bugs,
|
||||
incorporates new features introduced in Emacs 22.1, improves folder
|
||||
completion, and spruces up the tool bar.
|
||||
|
||||
** New Features in MH-E 7.94
|
||||
|
||||
*** Add :package-version Keyword to Options
|
||||
|
||||
This `defcustom', `defgroup', and `defface' keyword was introduced in
|
||||
Emacs 22.1. MH-E has been extended to take advantage of it. With this
|
||||
keyword, you can now use `M-x customize-changed-options' to see what
|
||||
options in MH-E have changed between versions of Emacs. In a future
|
||||
version of Emacs, you'll be able to see changes between MH-E versions
|
||||
as well (closes SF #1452724).
|
||||
|
||||
** Bug Fixes in MH-E 7.94
|
||||
|
||||
*** mhparam -components Fails on mailutils
|
||||
|
||||
This error prevented MH-E from loading when using GNU mailutils. GNU
|
||||
mailutils drops the `s' in this argument, so we did too since
|
||||
-component still works in nmh and MH (closes SF #1446985).
|
||||
|
||||
*** "/ s" Still Has Problems With []'d Mail
|
||||
|
||||
On XEmacs, subjects that had special characters would prevent `/ s'
|
||||
from narrowing to the given subject. These characters are now quoted
|
||||
correctly in XEmacs (closes SF #1447598).
|
||||
|
||||
*** Incorrect Example in mh-folder-list Docstring
|
||||
|
||||
This has been fixed (closes SF #1448498).
|
||||
|
||||
*** Variable mh-send-args Is a String, Not a List
|
||||
|
||||
This was causing errors when sending under GNU mailutils. The internal
|
||||
variable `mh-send-args' is now a list which fixes the problem (closes
|
||||
SF #1448604).
|
||||
|
||||
*** Update Icons
|
||||
|
||||
Most of the tool bar icons have been replaced by GTK or GNOME 2 icons
|
||||
(closes SF #1452715).
|
||||
|
||||
*** Can't customize tool bar for current session
|
||||
|
||||
If you customized `mh-tool-bar-folder-buttons' or
|
||||
`mh-tool-bar-letter-buttons', and clicked Set for Current Session, the
|
||||
tool bar was not updated. This has been fixed (closes SF #1452718).
|
||||
|
||||
*** Strip Build Number From emacs-version in X-Mailer
|
||||
|
||||
This has been done (closes SF #1466481).
|
||||
|
||||
*** mh-folder-completion-function Problems
|
||||
|
||||
One could not longer browse folders outside of the standard MH Mail
|
||||
directory. This has been fixed. As a beneficial side-effect, you can
|
||||
once again use SPC to complete folders (closes SF #1470518).
|
||||
|
||||
*** Rename Function and Variable Definers
|
||||
|
||||
If you had ever shown help for an MH-E symbol that was both a function
|
||||
or variable, you might have found that the hyperlink to the file
|
||||
brought you to the wrong definition. This has been fixed by renaming
|
||||
the macros `mh-defgroup', `mh-defcustom', `mh-defface',
|
||||
`mh-defun-compat', and `mh-defmacro-compat' to `defgroup-mh',
|
||||
`defcustom-mh', `defface-mh', `defun-mh', `defmacro-mh' respectively
|
||||
(closes SF #1472029).
|
||||
|
||||
*** mh-insert-letter Uses Wrong Default
|
||||
|
||||
If you had used `C-c TAB' (`mh-insert-letter') to insert a letter into
|
||||
your draft, specified a different folder, and chose the default
|
||||
message number, you got the wrong message. This has been fixed (closes
|
||||
SF #1473729).
|
||||
|
||||
*** "echo -e" in Makefile Causes Solaris 10 Problem
|
||||
|
||||
This construct has been replaced with printf, which is reputed to be
|
||||
more portable (closes SF #1467222, #1473908).
|
||||
|
||||
* Changes in MH-E 7.93
|
||||
|
||||
Version 7.93, the fourth 8.0 beta release, fixes a handful of bugs in
|
||||
|
|
57
etc/NEWS
57
etc/NEWS
|
@ -1479,20 +1479,35 @@ changes.
|
|||
There's a new separate package grep.el, with its own submenu and
|
||||
customization group.
|
||||
|
||||
---
|
||||
*** M-x grep provides highlighting support.
|
||||
|
||||
Hits are fontified in green, and hits in binary files in orange. Grep buffers
|
||||
can be saved and automatically revisited.
|
||||
|
||||
+++
|
||||
*** `grep-find' is now also available under the name `find-grep' where
|
||||
people knowing `find-grep-dired' would probably expect it.
|
||||
|
||||
+++
|
||||
*** New commands `lgrep' (local grep) and `rgrep' (recursive grep) are
|
||||
more user-friendly versions of `grep' and `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 current value of `case-fold-search'.
|
||||
|
||||
These commands build the shell commands based on the new variables
|
||||
`grep-template' (lgrep) and `grep-find-template' (rgrep).
|
||||
|
||||
The files to search can use aliases defined in `grep-files-aliases'.
|
||||
|
||||
Subdirectories listed in `grep-find-ignored-directories' such as those
|
||||
typically used by various version control systems, like CVS and arch,
|
||||
are automatically skipped by `rgrep'.
|
||||
|
||||
---
|
||||
*** The new variables `grep-window-height', `grep-auto-highlight', and
|
||||
`grep-scroll-output' override the corresponding compilation mode
|
||||
settings, for grep commands only.
|
||||
*** The grep commands provide highlighting support.
|
||||
|
||||
Hits are fontified in green, and hits in binary files in orange. Grep buffers
|
||||
can be saved and automatically revisited.
|
||||
|
||||
---
|
||||
*** The new variables `grep-window-height' and `grep-scroll-output' override
|
||||
the corresponding compilation mode settings, for grep commands only.
|
||||
|
||||
+++
|
||||
*** New option `grep-highlight-matches' highlights matches in *grep*
|
||||
|
@ -2026,6 +2041,21 @@ run most curses applications now.
|
|||
+++
|
||||
** M-x diff uses Diff mode instead of Compilation mode.
|
||||
|
||||
+++
|
||||
** Diff mode key bindings changed.
|
||||
|
||||
These are the new bindings:
|
||||
|
||||
C-c C-e diff-ediff-patch (old M-A)
|
||||
C-c C-n diff-restrict-view (old M-r)
|
||||
C-c C-r diff-reverse-direction (old M-R)
|
||||
C-c C-u diff-context->unified (old M-U)
|
||||
C-c C-w diff-refine-hunk (old C-c C-r)
|
||||
|
||||
To convert unified to context format, use C-u C-c C-u.
|
||||
In addition, C-c C-u now operates on the region
|
||||
in Transient Mark mode when the mark is active.
|
||||
|
||||
+++
|
||||
** You can now customize `fill-nobreak-predicate' to control where
|
||||
filling can break lines. The value is now normally a list of
|
||||
|
@ -3100,7 +3130,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.93. There have been major changes since
|
||||
Upgraded to MH-E version 7.95. There have been major changes since
|
||||
version 5.0.2; see MH-E-NEWS for details.
|
||||
|
||||
** Calendar changes:
|
||||
|
@ -3705,9 +3735,10 @@ This is useful in packages that can be preloaded.
|
|||
If it is non-nil, the function lists only faces matching this regexp.
|
||||
|
||||
+++
|
||||
*** New function `string-or-null-p'.
|
||||
*** New functions `string-or-null-p' and `booleanp'.
|
||||
|
||||
Return t if OBJECT is a string or nil. Otherwise, return nil.
|
||||
`string-or-null-p' returns non-nil iff OBJECT is a string or nil.
|
||||
`booleanp' returns non-nil iff OBJECT is a t or nil.
|
||||
|
||||
** Lisp code indentation features:
|
||||
|
||||
|
@ -5952,6 +5983,8 @@ Currently, the following actions have been defined:
|
|||
- Mouse-2 on the read-only or modified status in the mode line (`%' or
|
||||
`*') toggles the status.
|
||||
|
||||
- Mouse-3 on the major mode name displays a major mode menu.
|
||||
|
||||
- Mouse-3 on the mode name displays a minor-mode menu.
|
||||
|
||||
** Hourglass pointer
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
% Reference Card for Org Mode
|
||||
\def\orgversionnumber{4.25}
|
||||
\def\orgversionnumber{4.26}
|
||||
\def\year{2006}
|
||||
%
|
||||
%**start of header
|
||||
|
|
|
@ -1,3 +1,17 @@
|
|||
2006-04-29 Dan Nicolaescu <dann@ics.uci.edu>
|
||||
|
||||
* sorted-doc.c (main): Initialize docs to NULL.
|
||||
|
||||
* yow.c (yow): Free buf.
|
||||
|
||||
* etags.c: Delete c-indentation-style local variable.
|
||||
|
||||
2006-04-29 Richard Stallman <rms@gnu.org>
|
||||
|
||||
* movemail.c (main): Check for negative value from `read'.
|
||||
|
||||
* fakemail.c (read_header): Give fatal error if input has no header.
|
||||
|
||||
2006-04-02 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* b2m.c (main): Don't include <limits.h>.
|
||||
|
|
|
@ -6887,7 +6887,6 @@ xrealloc (ptr, size)
|
|||
|
||||
/*
|
||||
* Local Variables:
|
||||
* c-indentation-style: gnu
|
||||
* indent-tabs-mode: t
|
||||
* tab-width: 8
|
||||
* fill-column: 79
|
||||
|
|
|
@ -694,6 +694,8 @@ read_header ()
|
|||
|
||||
} while (true);
|
||||
|
||||
if (! the_header)
|
||||
fatal ("input message has no header");
|
||||
return the_header->next;
|
||||
}
|
||||
|
||||
|
|
|
@ -466,6 +466,8 @@ main (argc, argv)
|
|||
while (1)
|
||||
{
|
||||
nread = read (indesc, buf, sizeof buf);
|
||||
if (nread < 0)
|
||||
pfatal_with_name (inname);
|
||||
if (nread != write (outdesc, buf, nread))
|
||||
{
|
||||
int saved_errno = errno;
|
||||
|
|
|
@ -131,7 +131,7 @@ main ()
|
|||
register enum state state = WAITING; /* state at start */
|
||||
int cnt = 0; /* number of DOCSTRs read */
|
||||
|
||||
DOCSTR *docs; /* chain of allocated DOCSTRS */
|
||||
DOCSTR *docs = NULL; /* chain of allocated DOCSTRS */
|
||||
char buf[512]; /* line buffer */
|
||||
|
||||
while (1) /* process one char at a time */
|
||||
|
|
|
@ -176,6 +176,7 @@ yow (fp)
|
|||
}
|
||||
buf[i++] = 0;
|
||||
printf("%s\n", buf);
|
||||
free (buf);
|
||||
}
|
||||
|
||||
/* arch-tag: e40fc0df-bafb-4001-af24-5c883d1c685e
|
||||
|
|
367
lisp/ChangeLog
367
lisp/ChangeLog
|
@ -1,6 +1,303 @@
|
|||
2006-05-01 Richard Stallman <rms@gnu.org>
|
||||
|
||||
* diff-mode.el (diff-mode-shared-map): Don't bind M-W, M-U, M-C,
|
||||
M-r, M-R, M-A, M-SPC or M-DEL.
|
||||
(diff-mode-map): diff-refine-hunk now on C-c C-w
|
||||
(diff-mode-map): Bind C-c C-e, C-c C-n, C-c C-r, C-c C-u.
|
||||
|
||||
* help-mode.el (help-mode): view-exit-action calls delete-window
|
||||
only when it is safe and possible.
|
||||
|
||||
* simple.el (undo-outer-limit-truncate): Put quotes around buffer name
|
||||
in messages.
|
||||
|
||||
* emacs-lisp/warnings.el (display-warning, lwarn): Doc fixes.
|
||||
|
||||
* tool-bar.el (tool-bar-setup): Put Help and Preferences items
|
||||
in the default tool-bar-map.
|
||||
|
||||
2006-05-01 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
* net/tramp.el (tramp-completion-file-name-handler-alist)
|
||||
(tramp-run-real-handler, tramp-completion-run-real-handler)
|
||||
(tramp-completion-handle-file-name-all-completions)
|
||||
(tramp-completion-handle-file-name-completion): Autoload them.
|
||||
(tramp-completion-handle-file-exists-p)
|
||||
(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-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-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.
|
||||
|
||||
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.
|
||||
(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-format-command): Make match case sensitive. Match on %F.
|
||||
|
||||
2006-04-30 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* calendar/cal-tex.el (cal-tex-preamble-extra): New variable.
|
||||
(cal-tex-preamble): Use cal-tex-preamble-extra.
|
||||
(cal-tex-list-diary-entries): Refer to `diary-list-entries' rather
|
||||
than alias `list-diary-entries'.
|
||||
|
||||
2006-04-29 Dan Nicolaescu <dann@ics.uci.edu>
|
||||
|
||||
* help-fns.el (describe-variable): Add info about safe local variables.
|
||||
|
||||
2006-04-29 Richard Stallman <rms@gnu.org>
|
||||
|
||||
* bindings.el (mode-line-format): help-echo doc fixes.
|
||||
|
||||
* net/tramp.el (tramp-file-name-handler-alist): Delete
|
||||
expand-file-name and other operations that can cause spurious loading.
|
||||
|
||||
2006-04-29 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* files.el (safe-local-variable-p): Remove support for the special
|
||||
value t.
|
||||
|
||||
* textmodes/paragraphs.el (sentence-end-without-space):
|
||||
Fix safety predicate.
|
||||
(sentence-end-double-space, sentence-end-without-period)
|
||||
(paragraph-ignore-fill-prefix):
|
||||
* textmodes/fill.el (colon-double-space):
|
||||
* abbrev.el (abbrev-mode): Tighten the safety predicate.
|
||||
|
||||
* subr.el (booleanp): New fun.
|
||||
|
||||
* textmodes/reftex-vars.el (reftex-guess-label-type):
|
||||
Tighten the safety predicate.
|
||||
|
||||
2006-04-28 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
* progmodes/grep.el (defgroup grep): Doc fix.
|
||||
(grep-auto-highlight): Remove.
|
||||
(grep-template): New defcustom.
|
||||
(grep-find-template): Rename from grep-tree-template.
|
||||
(grep-files-aliases): Rename from grep-tree-files-aliases.
|
||||
Remove "all" alias, add "l" alias.
|
||||
(grep-tree-ignore-case, grep-tree-ignore-CVS-directories): Remove.
|
||||
(grep-find-ignored-directories): New defcustom to replace
|
||||
grep-tree-ignore-CVS-directories, to facilitate ignoring
|
||||
subdirectories for multiple version control systems.
|
||||
(grep-mode-map): Add Recursive grep item to GREP menu.
|
||||
(grep-regexp-history, grep-files-history): New defvars.
|
||||
(grep-probe): New helper function.
|
||||
(grep-compute-defaults): Use it to simplify code.
|
||||
Adapt to name changes.
|
||||
Use `.' as base in grep-find-template rather than <D>.
|
||||
(grep): Remove superfluous highlight-regexp arg. Fix doc.
|
||||
Call grep-compute-defaults unconditionally.
|
||||
(grep-expand-keywords): New defconst.
|
||||
(grep-expand-template): Rename from grep-expand-command-macros.
|
||||
Simplify via grep-expand-keywords. Look at case-fold-search instead
|
||||
of grep-tree-ignore-case to add -i option.
|
||||
Bind case-fold-search to nil while matching keywords.
|
||||
(grep-tree-last-regexp, grep-tree-last-files): Remove.
|
||||
(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.
|
||||
|
||||
2006-04-28 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
* net/tramp.el (tramp-completion-file-name-handler):
|
||||
Disable Tramp's functionality while loading Tramp itself.
|
||||
(tramp-register-file-name-handlers): That's a defsubst now.
|
||||
Code from `tramp-repair-jka-compr' moved here. Apply it via
|
||||
`after-init-hook'.
|
||||
(tramp-repair-jka-compr): Remove.
|
||||
|
||||
2006-04-27 Jay Belanger <belanger@truman.edu>
|
||||
|
||||
* calc-embed.el (calc-embedded-make-info): Use `math-read-expr' to
|
||||
read expression when `math-read-big-expr' doesn't work.
|
||||
|
||||
2006-04-27 Reiner Steib <Reiner.Steib@gmx.de>
|
||||
|
||||
* startup.el (command-line-1): Display warning when
|
||||
pure-space-overflow is non-nil.
|
||||
|
||||
2006-04-26 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>
|
||||
|
||||
* textmodes/bibtex.el (bibtex-user-optional-fields): Mark as
|
||||
risky.
|
||||
|
||||
2006-04-26 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>
|
||||
|
||||
* textmodes/bibtex.el (bibtex-url): New optional arg no-browse.
|
||||
Return the URL or nil if none can be generated.
|
||||
|
||||
2006-04-27 Nick Roberts <nickrob@snap.net.nz>
|
||||
|
||||
* progmodes/gud.el (gud-comint-buffer): Move forward to stop
|
||||
byte compiler warnings.
|
||||
(gud-basic-call, gud-find-expr): Let user select an expression
|
||||
for printing. Print expression as well as value in GUD buffer.
|
||||
|
||||
2006-04-17 Ken Manheimer <ken.manheimer@gmail.com>
|
||||
|
||||
* allout.el: Remove local autoload declaration for
|
||||
pgg-gpg-symmetric-key-p, since that's now done in pgg-gpg.el.
|
||||
(allout-show-bodies, allout-header-prefix, allout-primary-bullet)
|
||||
(allout-plain-bullets-string, allout-distinctive-bullets-string)
|
||||
(allout-use-mode-specific-leader, allout-old-style-prefixes)
|
||||
(allout-stylish-prefixes, allout-numbered-bullet)
|
||||
(allout-file-xref-bullet, allout-presentation-padding)
|
||||
(allout-use-hanging-indents, allout-reindent-bodies): Mark as
|
||||
safe-local-variable with suitable value spec, and add autoload
|
||||
cookie for loaddefs inclusion. We now use an explicit spec everywhere.
|
||||
(move-beginning-of-line, move-end-of-line): Repair so these compat
|
||||
functions now actually resituate the point, when appropriate.
|
||||
|
||||
2006-04-26 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* progmodes/cc-subword.el (c-subword-mode-map): Use command remapping.
|
||||
|
||||
* add-log.el (add-log-iso8601-time-zone): Make parameter optional.
|
||||
(add-log-iso8601-time-string): Fix call to format-time-string.
|
||||
|
||||
2006-04-26 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
* subr.el (posn-string, posn-image, posn-object): Doc fix.
|
||||
|
||||
2006-04-26 Masatake YAMATO <jet@gyve.org>
|
||||
|
||||
* progmodes/asm-mode.el (asm-mode, asm-mode-syntax-table):
|
||||
Add support for "//" style comments. Remove `b' flag
|
||||
from ?* in `asm-mode-syntax-table'.
|
||||
|
||||
2006-04-26 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* follow.el: Use (featurep 'xemacs) everywhere.
|
||||
(follow-mode): Use define-minor-mode.
|
||||
(follow-mode-map): Move initialization into the declaration.
|
||||
Use command remapping.
|
||||
(follow-emacs-version-xemacs-p): Remove.
|
||||
(follow-submit-feedback): Remove.
|
||||
|
||||
* allout.el (allout-layout, allout-passphrase-verifier-string)
|
||||
(allout-passphrase-hint-string): Tighten up a bit the safety predicate.
|
||||
|
||||
* textmodes/reftex-vars.el (reftex-vref-is-default)
|
||||
(reftex-fref-is-default, reftex-guess-label-type):
|
||||
Tighten up a bit the safety predicate.
|
||||
|
||||
* textmodes/paragraphs.el (sentence-end-double-space)
|
||||
(sentence-end-without-period, sentence-end-without-space)
|
||||
(page-delimiter, paragraph-ignore-fill-prefix):
|
||||
Tighten up a bit the safety predicate.
|
||||
|
||||
* textmodes/fill.el (colon-double-space): Tighten up the safety pred.
|
||||
|
||||
* progmodes/python.el (python-continuation-line-p)
|
||||
(python-beginning-of-statement): syntax-ppss may return
|
||||
a negative depth.
|
||||
(python-mode): Don't forcefully enable font-lock.
|
||||
|
||||
* time-stamp.el (time-stamp-start, time-stamp-end)
|
||||
(time-stamp-inserts-lines): Tighten up a bit the safety predicate.
|
||||
|
||||
* add-log.el: Remove spurious * in docstrings.
|
||||
(add-log-time-zone-rule): Rename from change-log-time-zone-rule.
|
||||
(add-change-log-entry): Use it here, since it's not specific
|
||||
to iso8601.
|
||||
(add-log-iso8601-time-string): Don't use it here any more.
|
||||
(change-log-indent-text, change-log-indent): Rename from add-log-*.
|
||||
|
||||
* abbrev.el (abbrev-mode): Tighten up a bit the safety predicate.
|
||||
|
||||
2006-04-25 Ryan Yeske <rcyeske@gmail.com>
|
||||
|
||||
* net/rcirc.el (rcirc-print): Revert last change with ignored nicks.
|
||||
(rcirc-toggle-low-priority): Doc fix.
|
||||
(rcirc-handler-NOTICE): Remove beginning of line anchor in
|
||||
ChanServ regexp.
|
||||
(rcirc-startup-channels-alist): Connect to #rcirc by default, not
|
||||
#emacs.
|
||||
(rcirc-bright-nick-regexp, rcirc-dim-nick-regexp): Add variables.
|
||||
(rcirc-decode-coding-system): Use utf-8 as the default.
|
||||
(rcirc-multiline-minor-mode): Set the fill-column.
|
||||
(rcirc-format-response-string): Display bright and dim nicks.
|
||||
(rcirc-browse-url): Update interactive spec to fill ARG.
|
||||
(rcirc-bright-nick, rcirc-dim-nick): Add faces.
|
||||
(rcirc-print): Ignore dim-nick messages wrt modeline-activity.
|
||||
|
||||
2006-04-24 J.D. Smith <jdsmith@as.arizona.edu>
|
||||
|
||||
* textmodes/bibtex.el (bibtex-find-entry): Don't demand matching
|
||||
case for @Article, etc.
|
||||
|
||||
2006-04-23 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
* net/tramp.el (tramp-register-file-name-handlers): New defun.
|
||||
Added with autoload cookie.
|
||||
(tramp-unload-file-name-handlers): Rename from
|
||||
`tramp-unload-file-name-handler-alist'.
|
||||
|
||||
2006-04-23 Romain Francoise <romain@orebokech.com>
|
||||
|
||||
* comint.el (comint-match-partial-filename): Doc fix.
|
||||
|
||||
2006-04-21 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* calendar/cal-menu.el (calendar-mode-map): Refer to
|
||||
`diary-view-entries' rather than alias `view-diary-entries'.
|
||||
* calendar/diary-lib.el (view-other-diary-entries): Ditto.
|
||||
|
||||
2006-04-21 Luc Teirlinck <teirllm@auburn.edu>
|
||||
|
||||
* progmodes/antlr-mode.el (antlr-default):
|
||||
* cus-edit.el (custom-documentation):
|
||||
* faces.el (scroll-bar, border, cursor, mouse): Avoid nil spec
|
||||
in defface.
|
||||
|
||||
2006-04-21 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
* image.el (image-type): New defun split out of create-image.
|
||||
(create-image): Use it.
|
||||
|
||||
2006-04-21 Carsten Dominik <dominik@science.uva.nl>
|
||||
|
||||
* textmodes/org.el (org-mode-map): Catch conflict with old allout.el.
|
||||
(org-open-at-point): Remove the "...done" message to keep output
|
||||
in the echo area visible.
|
||||
(org-export-as-xoxo): Fix call to `indent-region'.
|
||||
|
||||
2006-04-21 Kevin Ryde <user42@zip.com.au>
|
||||
|
||||
* international/mule.el (keyboard-coding-system): defcustom
|
||||
info-link fixes: "Specify Coding" has been split, keyboard now in
|
||||
"Terminal Coding", and "Single-Byte Character Support" is now
|
||||
"Unibyte Mode".
|
||||
|
||||
2006-04-21 Nick Roberts <nickrob@snap.net.nz>
|
||||
|
||||
* progmodes/gdb-ui.el (gdb-data-list-register-values-handler):
|
||||
* progmodes/gdb-ui.el (gdb-data-list-register-values-handler):
|
||||
Use font-lock-warning-face for any errors e.g. no stack.
|
||||
(gdb-stack-list-locals-handler): Display any errors e.g. no stack.
|
||||
|
||||
|
@ -13,26 +310,26 @@
|
|||
|
||||
2006-04-20 Carsten Dominik <dominik@science.uva.nl>
|
||||
|
||||
* textmodes/org.el: (org-deadline-announce): Face removed.
|
||||
(org-level-faces, org-n-levels): Converted to constant.
|
||||
(org-compatible-face): New function.
|
||||
(org-hide, org-level-1, org-level-2, org-level-3, org-level-4)
|
||||
(org-level-5, org-level-6, org-level-7, org-level-8)
|
||||
(org-special-keyword, org-warning, org-headline-done, org-link)
|
||||
(org-date, org-tag, org-todo, org-done, org-table, org-formula)
|
||||
(org-scheduled-today, org-scheduled-previously, org-time-grid):
|
||||
* textmodes/org.el (org-deadline-announce): Face removed.
|
||||
(org-level-faces, org-n-levels): Convert to constant.
|
||||
(org-compatible-face): New function.
|
||||
(org-hide, org-level-1, org-level-2, org-level-3, org-level-4)
|
||||
(org-level-5, org-level-6, org-level-7, org-level-8)
|
||||
(org-special-keyword, org-warning, org-headline-done, org-link)
|
||||
(org-date, org-tag, org-todo, org-done, org-table, org-formula)
|
||||
(org-scheduled-today, org-scheduled-previously, org-time-grid):
|
||||
Face definition revised for better color tty support.
|
||||
(org-bold-re, org-italic-re, org-underline-re): New constants.
|
||||
(org-set-font-lock-defaults): Use the new constants.
|
||||
(org-agenda-highlight-todo): New function.
|
||||
(org-agenda-todo): Fixed bug with point at end of line.
|
||||
(org-agenda-change-all-lines, org-finalize-agenda-entries):
|
||||
(org-bold-re, org-italic-re, org-underline-re): New constants.
|
||||
(org-set-font-lock-defaults): Use the new constants.
|
||||
(org-agenda-highlight-todo): New function.
|
||||
(org-agenda-todo): Fix bug with point at end of line.
|
||||
(org-agenda-change-all-lines, org-finalize-agenda-entries):
|
||||
Fontify TODO keywords.
|
||||
(org-insert-link): Preserve relative path in ../ links.
|
||||
(org-export-as-html): Convert links pointing to .org files into
|
||||
(org-insert-link): Preserve relative path in ../ links.
|
||||
(org-export-as-html): Convert links pointing to .org files into
|
||||
links that will work beteen the exported HTML files.
|
||||
(org-todo-list): Fix bug when arg=0.
|
||||
(org-insert-heading): More fine-tuning.
|
||||
(org-todo-list): Fix bug when arg=0.
|
||||
(org-insert-heading): More fine-tuning.
|
||||
|
||||
2006-04-19 Romain Francoise <romain@orebokech.com>
|
||||
|
||||
|
@ -49,12 +346,11 @@
|
|||
when moving off either end of the input history ring.
|
||||
(comint-delete-input): New function, used by
|
||||
`comint-previous-input' and others.
|
||||
(comint-previous-matching-input): Use
|
||||
`coming-delete-input'. Save the partial input if leaving the
|
||||
(comint-previous-matching-input):
|
||||
Use `coming-delete-input'. Save the partial input if leaving the
|
||||
edit line. Goto point-max before deleting input to avoid
|
||||
partial input fragments hanging around.
|
||||
(comint-restore-input): New function, used by
|
||||
`comint-previous-input', and bound to "C-c C-j".
|
||||
(comint-restore-input): New function, used by `comint-previous-input'.
|
||||
|
||||
2006-04-18 Luc Teirlinck <teirllm@auburn.edu>
|
||||
|
||||
|
@ -62,8 +358,7 @@
|
|||
|
||||
2006-04-18 Dan Nicolaescu <dann@ics.uci.edu>
|
||||
|
||||
* progmodes/python.el (python-mode): Add support for
|
||||
hs-minor-mode.
|
||||
* progmodes/python.el (python-mode): Add support for hs-minor-mode.
|
||||
|
||||
2006-04-19 Reiner Steib <Reiner.Steib@gmx.de>
|
||||
|
||||
|
@ -141,7 +436,7 @@
|
|||
(gdb-frame-address): Re-use to identify frame for watch expression.
|
||||
(gdb-var-list, gdb-var-create-handler): Add frame address for root
|
||||
variables.
|
||||
(gdb-init-1, gdb-source, gdb-post-prompt, )
|
||||
(gdb-init-1, gdb-source, gdb-post-prompt)
|
||||
(gdb-assembler-custom, gdb-invalidate-assembler): Use gdb-pc-address.
|
||||
(gdb-frame-handler): Get gdb-frame-address.
|
||||
|
||||
|
@ -222,7 +517,7 @@
|
|||
|
||||
2006-04-13 Carsten Dominik <dominik@science.uva.nl>
|
||||
|
||||
* textmodes/org.el: (org-set-regexps-and-options)
|
||||
* textmodes/org.el (org-set-regexps-and-options)
|
||||
(org-get-current-options): Better names for the startup folding
|
||||
options.
|
||||
|
||||
|
@ -231,7 +526,7 @@
|
|||
* vc.el (vc-annotate): Arrange for point to end up at the same
|
||||
line number as in the original, but only when using a new buffer.
|
||||
|
||||
2006-04-12 Davis Herring <herring@lanl.gov> (tiny change)
|
||||
2006-04-12 Stuart Herring <herring@lanl.gov> (tiny change)
|
||||
|
||||
* files.el (hack-one-local-variable-eval-safep):
|
||||
Recognize `edebug-form-spec' for `put', but only if it passes
|
||||
|
@ -245,7 +540,7 @@
|
|||
|
||||
2006-04-13 Carsten Dominik <dominik@science.uva.nl>
|
||||
|
||||
* textmodes/org.el: (org-ctrl-c-ctrl-c): Improve documentation string.
|
||||
* textmodes/org.el (org-ctrl-c-ctrl-c): Improve documentation string.
|
||||
(org-agenda-mouse-1-follows-link)
|
||||
(org-mouse-1-follows-link): New options.
|
||||
(org-format-agenda-item): Fix bug if TAGS is nil.
|
||||
|
@ -2437,7 +2732,7 @@
|
|||
(describe-key-briefly-internal, describe-key-internal):
|
||||
Functions merged back into their callers.
|
||||
|
||||
2006-02-13 Martin Rudalics <rudalics@gmx.at> (tiny change)
|
||||
2006-02-13 Martin Rudalics <rudalics@gmx.at>
|
||||
|
||||
* info.el (info-xref-visited): Inherit from info-xref too.
|
||||
(Info-set-mode-line): Replace occurrences of `%' by `%%'
|
||||
|
@ -3585,7 +3880,7 @@
|
|||
* add-log.el (add-change-log-entry, change-log-merge):
|
||||
Conditionally use `hard-newline'.
|
||||
|
||||
2006-01-13 Martin Rudalics <rudalics@gmx.at> (tiny change)
|
||||
2006-01-13 Martin Rudalics <rudalics@gmx.at>
|
||||
|
||||
* wid-edit.el (widget-field-end): If the overlay is no longer
|
||||
associated with a buffer, behave as if the overlay didn't exist.
|
||||
|
@ -4595,7 +4890,7 @@
|
|||
display-multi-frame-p, use selected-frame when menu-updating-frame
|
||||
is nil.
|
||||
|
||||
2005-12-20 Davis Herring <herring@lanl.gov> (tiny change)
|
||||
2005-12-20 Stuart Herring <herring@lanl.gov> (tiny change)
|
||||
|
||||
* align.el (align-rules-list): Use [ \t] instead of \s-
|
||||
for column separators in text mode.
|
||||
|
@ -4675,7 +4970,7 @@
|
|||
* emacs-lisp/edebug.el (edebug-safe-prin1-to-string):
|
||||
Capture error from printing circular structures.
|
||||
|
||||
2005-12-17 Martin Rudalics <rudalics@gmx.at> (tiny change)
|
||||
2005-12-17 Martin Rudalics <rudalics@gmx.at>
|
||||
|
||||
* wid-edit.el (widget-checkbox-action): Clear undo info.
|
||||
|
||||
|
@ -6658,7 +6953,7 @@
|
|||
scrolling the help window. Doc fix.
|
||||
(help-return-method): Doc fix.
|
||||
|
||||
2005-12-03 Martin Rudalics <rudalics@gmx.at> (tiny change)
|
||||
2005-12-03 Martin Rudalics <rudalics@gmx.at>
|
||||
|
||||
* emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression): Fix bug
|
||||
whereby names of length one or names starting with a
|
||||
|
@ -7212,7 +7507,7 @@
|
|||
|
||||
* custom.el (defcustom): Update link types in docstring.
|
||||
|
||||
2005-11-20 Martin Rudalics <rudalics@gmx.at> (tiny change)
|
||||
2005-11-20 Martin Rudalics <rudalics@gmx.at>
|
||||
|
||||
* custom.el (defgroup): Add doc-string-elt info.
|
||||
|
||||
|
@ -7485,7 +7780,7 @@
|
|||
|
||||
* apropos.el (apropos-calc-scores): Use apropos-pattern.
|
||||
|
||||
2005-11-16 Martin Rudalics <rudalics@gmx.at> (tiny change)
|
||||
2005-11-16 Martin Rudalics <rudalics@gmx.at>
|
||||
|
||||
* wid-edit.el (color): Enclose %t in %{...%}.
|
||||
|
||||
|
@ -14401,7 +14696,7 @@
|
|||
* emulation/edt-mapper.el (edt-save-function-key-map)
|
||||
(EDT-key-name): `defvar' to silence the byte-compiler.
|
||||
|
||||
2005-07-02 Martin Rudalics <rudalics@gmx.at> (tiny change)
|
||||
2005-07-02 Martin Rudalics <rudalics@gmx.at>
|
||||
|
||||
* font-lock.el (font-lock-regexp-grouping-backslash): Rename from
|
||||
font-lock-regexp-backslash. Doc fix.
|
||||
|
|
|
@ -5065,7 +5065,7 @@
|
|||
|
||||
* imenu.el: Several doc fixes: don't say variables are buffer-local.
|
||||
|
||||
2004-08-16 Davis Herring <herring@lanl.gov>
|
||||
2004-08-16 Stuart Herring <herring@lanl.gov>
|
||||
|
||||
* isearch.el (isearch-string, isearch-message-string, isearch-point)
|
||||
(isearch-success, isearch-forward-flag, isearch-other-end)
|
||||
|
@ -5082,7 +5082,7 @@
|
|||
* term/x-win.el (x-selection-value): If utf8 was successful but
|
||||
ctext was not, use utf8 string.
|
||||
|
||||
2004-08-14 Davis Herring <herring@lanl.gov>
|
||||
2004-08-14 Stuart Herring <herring@lanl.gov>
|
||||
|
||||
* isearch.el: Remove accidental changes of March 4. Fix backing
|
||||
up when a regexp isearch is made more general. Use symbolic
|
||||
|
@ -11471,7 +11471,7 @@
|
|||
|
||||
* files.el (kill-some-buffers): Doc fix.
|
||||
|
||||
2003-12-29 David Herring <sdh6@ra.msstate.edu> (tiny change)
|
||||
2003-12-29 Stuart Herring <herring@lanl.gov> (tiny change)
|
||||
|
||||
* comint.el (comint-watch-for-password-prompt): Pass `string' as
|
||||
arg to send-invisible
|
||||
|
|
|
@ -58,7 +58,7 @@ Interactively, use the command `abbrev-mode'
|
|||
to enable or disable Abbrev mode in the current buffer."
|
||||
:type 'boolean
|
||||
:group 'abbrev-mode)
|
||||
;;;###autoload(put 'abbrev-mode 'safe-local-variable t)
|
||||
;;;###autoload(put 'abbrev-mode 'safe-local-variable 'booleanp)
|
||||
|
||||
|
||||
(defvar edit-abbrevs-map
|
||||
|
@ -363,5 +363,5 @@ A prefix argument means don't query; expand all abbrevs."
|
|||
(if (or noquery (y-or-n-p (format "Expand `%s'? " string)))
|
||||
(expand-abbrev)))))))
|
||||
|
||||
;;; arch-tag: dbd6f3ae-dfe3-40ba-b00f-f9e3ff960df5
|
||||
;; arch-tag: dbd6f3ae-dfe3-40ba-b00f-f9e3ff960df5
|
||||
;;; abbrev.el ends here
|
||||
|
|
|
@ -72,7 +72,7 @@ This defaults to the value returned by the function `user-full-name'."
|
|||
|
||||
;;;###autoload
|
||||
(defcustom add-log-mailing-address nil
|
||||
"*Email addresses of user, for inclusion in ChangeLog headers.
|
||||
"Email addresses of user, for inclusion in ChangeLog headers.
|
||||
This defaults to the value of `user-mail-address'. In addition to
|
||||
being a simple string, this value can also be a list. All elements
|
||||
will be recognized as referring to the same user; when creating a new
|
||||
|
@ -83,7 +83,7 @@ ChangeLog entry, one element will be chosen at random."
|
|||
:group 'change-log)
|
||||
|
||||
(defcustom add-log-time-format 'add-log-iso8601-time-string
|
||||
"*Function that defines the time format.
|
||||
"Function that defines the time format.
|
||||
For example, `add-log-iso8601-time-string', which gives the
|
||||
date in international ISO 8601 format,
|
||||
and `current-time-string' are two valid values."
|
||||
|
@ -95,7 +95,7 @@ and `current-time-string' are two valid values."
|
|||
:group 'change-log)
|
||||
|
||||
(defcustom add-log-keep-changes-together nil
|
||||
"*If non-nil, normally keep day's log entries for one file together.
|
||||
"If non-nil, normally keep day's log entries for one file together.
|
||||
|
||||
Log entries for a given file made with \\[add-change-log-entry] or
|
||||
\\[add-change-log-entry-other-window] will only be added to others \
|
||||
|
@ -127,20 +127,20 @@ this variable."
|
|||
:group 'change-log)
|
||||
|
||||
(defcustom add-log-always-start-new-record nil
|
||||
"*If non-nil, `add-change-log-entry' will always start a new record."
|
||||
"If non-nil, `add-change-log-entry' will always start a new record."
|
||||
:version "22.1"
|
||||
:type 'boolean
|
||||
:group 'change-log)
|
||||
|
||||
(defcustom add-log-buffer-file-name-function nil
|
||||
"*If non-nil, function to call to identify the full filename of a buffer.
|
||||
"If non-nil, function to call to identify the full filename of a buffer.
|
||||
This function is called with no argument. If this is nil, the default is to
|
||||
use `buffer-file-name'."
|
||||
:type '(choice (const nil) function)
|
||||
:group 'change-log)
|
||||
|
||||
(defcustom add-log-file-name-function nil
|
||||
"*If non-nil, function to call to identify the filename for a ChangeLog entry.
|
||||
"If non-nil, function to call to identify the filename for a ChangeLog entry.
|
||||
This function is called with one argument, the value of variable
|
||||
`buffer-file-name' in that buffer. If this is nil, the default is to
|
||||
use the file's name relative to the directory of the change log file."
|
||||
|
@ -286,12 +286,16 @@ Note: The search is conducted only within 10%, at the beginning of the file."
|
|||
map)
|
||||
"Keymap for Change Log major mode.")
|
||||
|
||||
(defvar change-log-time-zone-rule nil
|
||||
;; It used to be called change-log-time-zone-rule but really should be
|
||||
;; called add-log-time-zone-rule since it's only used from add-log-* code.
|
||||
(defvaralias 'change-log-time-zone-rule 'add-log-time-zone-rule)
|
||||
(defvar add-log-time-zone-rule nil
|
||||
"Time zone used for calculating change log time stamps.
|
||||
It takes the same format as the TZ argument of `set-time-zone-rule'.
|
||||
If nil, use local time.")
|
||||
If nil, use local time.
|
||||
If t, use universal time.")
|
||||
|
||||
(defun add-log-iso8601-time-zone (time)
|
||||
(defun add-log-iso8601-time-zone (&optional time)
|
||||
(let* ((utc-offset (or (car (current-time-zone time)) 0))
|
||||
(sign (if (< utc-offset 0) ?- ?+))
|
||||
(sec (abs utc-offset))
|
||||
|
@ -304,18 +308,14 @@ If nil, use local time.")
|
|||
(t "%c%02d"))
|
||||
sign hh mm ss)))
|
||||
|
||||
(defvar add-log-iso8601-with-time-zone nil)
|
||||
|
||||
(defun add-log-iso8601-time-string ()
|
||||
(if change-log-time-zone-rule
|
||||
(let ((tz (getenv "TZ"))
|
||||
(now (current-time)))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(set-time-zone-rule change-log-time-zone-rule)
|
||||
(concat
|
||||
(format-time-string "%Y-%m-%d " now)
|
||||
(add-log-iso8601-time-zone now)))
|
||||
(set-time-zone-rule tz)))
|
||||
(format-time-string "%Y-%m-%d")))
|
||||
(let ((time (format-time-string "%Y-%m-%d"
|
||||
nil (eq t add-log-time-zone-rule))))
|
||||
(if add-log-iso8601-with-time-zone
|
||||
(concat time " " (add-log-iso8601-time-zone))
|
||||
time)))
|
||||
|
||||
(defun change-log-name ()
|
||||
"Return (system-dependent) default name for a change log file."
|
||||
|
@ -494,7 +494,7 @@ The change log file can start with a copyright notice and a copying
|
|||
permission notice. The first blank line indicates the end of these
|
||||
notices.
|
||||
|
||||
Today's date is calculated according to `change-log-time-zone-rule' if
|
||||
Today's date is calculated according to `add-log-time-zone-rule' if
|
||||
non-nil, otherwise in local time."
|
||||
(interactive (list current-prefix-arg
|
||||
(prompt-for-change-log-name)))
|
||||
|
@ -538,13 +538,22 @@ non-nil, otherwise in local time."
|
|||
(skip-chars-forward "\n"))
|
||||
|
||||
;; Advance into first entry if it is usable; else make new one.
|
||||
(let ((new-entries (mapcar (lambda (addr)
|
||||
(concat (funcall add-log-time-format)
|
||||
" " full-name
|
||||
" <" addr ">"))
|
||||
(if (consp mailing-address)
|
||||
mailing-address
|
||||
(list mailing-address)))))
|
||||
(let ((new-entries
|
||||
(mapcar (lambda (addr)
|
||||
(concat
|
||||
(if (stringp add-log-time-zone-rule)
|
||||
(let ((tz (getenv "TZ")))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(set-time-zone-rule add-log-time-zone-rule)
|
||||
(funcall add-log-time-format))
|
||||
(set-time-zone-rule tz)))
|
||||
(funcall add-log-time-format))
|
||||
" " full-name
|
||||
" <" addr ">"))
|
||||
(if (consp mailing-address)
|
||||
mailing-address
|
||||
(list mailing-address)))))
|
||||
(if (and (not add-log-always-start-new-record)
|
||||
(let ((hit nil))
|
||||
(dolist (entry new-entries hit)
|
||||
|
@ -652,21 +661,21 @@ the change log file in another window."
|
|||
(add-change-log-entry whoami file-name t))
|
||||
;;;###autoload (define-key ctl-x-4-map "a" 'add-change-log-entry-other-window)
|
||||
|
||||
(defvar add-log-indent-text 0)
|
||||
(defvar change-log-indent-text 0)
|
||||
|
||||
(defun add-log-indent ()
|
||||
(defun change-log-indent ()
|
||||
(let* ((indent
|
||||
(save-excursion
|
||||
(beginning-of-line)
|
||||
(skip-chars-forward " \t")
|
||||
(cond
|
||||
((and (looking-at "\\(.*\\) [^ \n].*[^ \n] <.*>$")
|
||||
((and (looking-at "\\(.*\\) [^ \n].*[^ \n] <.*>\\(?: +(.*)\\)? *$")
|
||||
;; Matching the output of add-log-time-format is difficult,
|
||||
;; but I'll get it has at least two adjacent digits.
|
||||
(string-match "[[:digit:]][[:digit:]]" (match-string 1)))
|
||||
0)
|
||||
((looking-at "[^*(]")
|
||||
(+ (current-left-margin) add-log-indent-text))
|
||||
(+ (current-left-margin) change-log-indent-text))
|
||||
(t (current-left-margin)))))
|
||||
(pos (save-excursion (indent-line-to indent) (point))))
|
||||
(if (> pos (point)) (goto-char pos))))
|
||||
|
@ -688,7 +697,7 @@ Runs `change-log-mode-hook'.
|
|||
tab-width 8)
|
||||
(set (make-local-variable 'fill-paragraph-function)
|
||||
'change-log-fill-paragraph)
|
||||
(set (make-local-variable 'indent-line-function) 'add-log-indent)
|
||||
(set (make-local-variable 'indent-line-function) 'change-log-indent)
|
||||
(set (make-local-variable 'tab-always-indent) nil)
|
||||
;; We really do want "^" in paragraph-start below: it is only the
|
||||
;; lines that begin at column 0 (despite the left-margin of 8) that
|
||||
|
@ -722,23 +731,23 @@ Prefix arg means justify as well."
|
|||
|
||||
(defcustom add-log-current-defun-header-regexp
|
||||
"^\\([[:upper:]][[:upper:]_ ]*[[:upper:]_]\\|[-_[:alpha:]]+\\)[ \t]*[:=]"
|
||||
"*Heuristic regexp used by `add-log-current-defun' for unknown major modes."
|
||||
"Heuristic regexp used by `add-log-current-defun' for unknown major modes."
|
||||
:type 'regexp
|
||||
:group 'change-log)
|
||||
|
||||
;;;###autoload
|
||||
(defvar add-log-lisp-like-modes
|
||||
'(emacs-lisp-mode lisp-mode scheme-mode dsssl-mode lisp-interaction-mode)
|
||||
'(emacs-lisp-mode lisp-mode scheme-mode dsssl-mode lisp-interaction-mode)
|
||||
"*Modes that look like Lisp to `add-log-current-defun'.")
|
||||
|
||||
;;;###autoload
|
||||
(defvar add-log-c-like-modes
|
||||
'(c-mode c++-mode c++-c-mode objc-mode)
|
||||
'(c-mode c++-mode c++-c-mode objc-mode)
|
||||
"*Modes that look like C to `add-log-current-defun'.")
|
||||
|
||||
;;;###autoload
|
||||
(defvar add-log-tex-like-modes
|
||||
'(TeX-mode plain-TeX-mode LaTeX-mode plain-tex-mode latex-mode)
|
||||
'(TeX-mode plain-TeX-mode LaTeX-mode plain-tex-mode latex-mode)
|
||||
"*Modes that look like TeX to `add-log-current-defun'.")
|
||||
|
||||
;;;###autoload
|
||||
|
@ -1103,5 +1112,5 @@ old-style time formats for entries are supported."
|
|||
|
||||
(provide 'add-log)
|
||||
|
||||
;;; arch-tag: 81eee6fc-088f-4372-a37f-80ad9620e762
|
||||
;; arch-tag: 81eee6fc-088f-4372-a37f-80ad9620e762
|
||||
;;; add-log.el ends here
|
||||
|
|
100
lisp/allout.el
100
lisp/allout.el
|
@ -84,8 +84,6 @@
|
|||
(require 'pgg-gpg)
|
||||
(require 'overlay)
|
||||
))
|
||||
(autoload 'pgg-gpg-symmetric-key-p "pgg-gpg"
|
||||
"True if decoded armor MESSAGE-KEYS has symmetric encryption indicator.")
|
||||
|
||||
;;;_* USER CUSTOMIZATION VARIABLES:
|
||||
|
||||
|
@ -199,6 +197,9 @@ just the header."
|
|||
:type 'boolean
|
||||
:group 'allout)
|
||||
(make-variable-buffer-local 'allout-show-bodies)
|
||||
;;;###autoload
|
||||
(put 'allout-show-bodies 'safe-local-variable
|
||||
(lambda (x) (member x '(t nil))))
|
||||
|
||||
;;;_ = allout-header-prefix
|
||||
(defcustom allout-header-prefix "."
|
||||
|
@ -212,6 +213,8 @@ outlines start at level 2 to avoid this discrepancy."
|
|||
:type 'string
|
||||
:group 'allout)
|
||||
(make-variable-buffer-local 'allout-header-prefix)
|
||||
;;;###autoload
|
||||
(put 'allout-header-prefix 'safe-local-variable 'stringp)
|
||||
;;;_ = allout-primary-bullet
|
||||
(defcustom allout-primary-bullet "*"
|
||||
"Bullet used for top-level outline topics.
|
||||
|
@ -227,6 +230,8 @@ bullets."
|
|||
:type 'string
|
||||
:group 'allout)
|
||||
(make-variable-buffer-local 'allout-primary-bullet)
|
||||
;;;###autoload
|
||||
(put 'allout-primary-bullet 'safe-local-variable 'stringp)
|
||||
;;;_ = allout-plain-bullets-string
|
||||
(defcustom allout-plain-bullets-string ".,"
|
||||
"*The bullets normally used in outline topic prefixes.
|
||||
|
@ -241,6 +246,8 @@ of this var to take effect."
|
|||
:type 'string
|
||||
:group 'allout)
|
||||
(make-variable-buffer-local 'allout-plain-bullets-string)
|
||||
;;;###autoload
|
||||
(put 'allout-plain-bullets-string 'safe-local-variable 'stringp)
|
||||
;;;_ = allout-distinctive-bullets-string
|
||||
(defcustom allout-distinctive-bullets-string "*+-=>()[{}&!?#%\"X@$~_\\:;^"
|
||||
"*Persistent outline header bullets used to distinguish special topics.
|
||||
|
@ -274,6 +281,8 @@ strings."
|
|||
:type 'string
|
||||
:group 'allout)
|
||||
(make-variable-buffer-local 'allout-distinctive-bullets-string)
|
||||
;;;###autoload
|
||||
(put 'allout-distinctive-bullets-string 'safe-local-variable 'stringp)
|
||||
|
||||
;;;_ = allout-use-mode-specific-leader
|
||||
(defcustom allout-use-mode-specific-leader t
|
||||
|
@ -305,6 +314,9 @@ incorrect.]"
|
|||
(const allout-mode-leaders)
|
||||
(const comment-start))
|
||||
:group 'allout)
|
||||
;;;###autoload
|
||||
(put 'allout-use-mode-specific-leader 'safe-local-variable
|
||||
(lambda (x) (or (member x '(t nil)) (stringp x))))
|
||||
;;;_ = allout-mode-leaders
|
||||
(defvar allout-mode-leaders '()
|
||||
"Specific allout-prefix leading strings per major modes.
|
||||
|
@ -330,6 +342,9 @@ are always respected by the topic maneuvering functions."
|
|||
:type 'boolean
|
||||
:group 'allout)
|
||||
(make-variable-buffer-local 'allout-old-style-prefixes)
|
||||
;;;###autoload
|
||||
(put 'allout-old-style-prefixes 'safe-local-variable
|
||||
(lambda (x) (member x '(t nil))))
|
||||
;;;_ = allout-stylish-prefixes - alternating bullets
|
||||
(defcustom allout-stylish-prefixes t
|
||||
"*Do fancy stuff with topic prefix bullets according to level, etc.
|
||||
|
@ -376,6 +391,9 @@ is non-nil."
|
|||
:type 'boolean
|
||||
:group 'allout)
|
||||
(make-variable-buffer-local 'allout-stylish-prefixes)
|
||||
;;;###autoload
|
||||
(put 'allout-stylish-prefixes 'safe-local-variable
|
||||
(lambda (x) (member x '(t nil))))
|
||||
|
||||
;;;_ = allout-numbered-bullet
|
||||
(defcustom allout-numbered-bullet "#"
|
||||
|
@ -388,6 +406,9 @@ disables numbering maintenance."
|
|||
:type '(choice (const nil) string)
|
||||
:group 'allout)
|
||||
(make-variable-buffer-local 'allout-numbered-bullet)
|
||||
;;;###autoload
|
||||
(put 'allout-numbered-bullet 'safe-local-variable
|
||||
(lambda (x) (or (not x) (stringp x))))
|
||||
;;;_ = allout-file-xref-bullet
|
||||
(defcustom allout-file-xref-bullet "@"
|
||||
"*Bullet signifying file cross-references, for `allout-resolve-xref'.
|
||||
|
@ -395,6 +416,9 @@ disables numbering maintenance."
|
|||
Set this var to the bullet you want to use for file cross-references."
|
||||
:type '(choice (const nil) string)
|
||||
:group 'allout)
|
||||
;;;###autoload
|
||||
(put 'allout-file-xref-bullet 'safe-local-variable
|
||||
(lambda (x) (or (not x) (stringp x))))
|
||||
;;;_ = allout-presentation-padding
|
||||
(defcustom allout-presentation-padding 2
|
||||
"*Presentation-format white-space padding factor, for greater indent."
|
||||
|
@ -402,6 +426,8 @@ Set this var to the bullet you want to use for file cross-references."
|
|||
:group 'allout)
|
||||
|
||||
(make-variable-buffer-local 'allout-presentation-padding)
|
||||
;;;###autoload
|
||||
(put 'allout-presentation-padding 'safe-local-variable 'integerp)
|
||||
|
||||
;;;_ = allout-abbreviate-flattened-numbering
|
||||
(defcustom allout-abbreviate-flattened-numbering nil
|
||||
|
@ -455,11 +481,16 @@ formatted copy."
|
|||
:group 'allout)
|
||||
|
||||
;;;_ + Topic encryption
|
||||
;;;_ = allout-encryption group
|
||||
(defgroup allout-encryption nil
|
||||
"Settings for topic encryption features of allout outliner."
|
||||
:group 'allout)
|
||||
;;;_ = allout-topic-encryption-bullet
|
||||
(defcustom allout-topic-encryption-bullet "~"
|
||||
"*Bullet signifying encryption of the entry's body."
|
||||
:type '(choice (const nil) string)
|
||||
:group 'allout)
|
||||
:version "22.0"
|
||||
:group 'allout-encryption)
|
||||
;;;_ = allout-passphrase-verifier-handling
|
||||
(defcustom allout-passphrase-verifier-handling t
|
||||
"*Enable use of symmetric encryption passphrase verifier if non-nil.
|
||||
|
@ -467,7 +498,8 @@ formatted copy."
|
|||
See the docstring for the `allout-enable-file-variable-adjustment'
|
||||
variable for details about allout ajustment of file variables."
|
||||
:type 'boolean
|
||||
:group 'allout)
|
||||
:version "22.0"
|
||||
:group 'allout-encryption)
|
||||
(make-variable-buffer-local 'allout-passphrase-verifier-handling)
|
||||
;;;_ = allout-passphrase-hint-handling
|
||||
(defcustom allout-passphrase-hint-handling 'always
|
||||
|
@ -482,7 +514,8 @@ variable for details about allout ajustment of file variables."
|
|||
:type '(choice (const always)
|
||||
(const needed)
|
||||
(const disabled))
|
||||
:group 'allout)
|
||||
:version "22.0"
|
||||
:group 'allout-encryption)
|
||||
(make-variable-buffer-local 'allout-passphrase-hint-handling)
|
||||
;;;_ = allout-encrypt-unencrypted-on-saves
|
||||
(defcustom allout-encrypt-unencrypted-on-saves t
|
||||
|
@ -514,7 +547,8 @@ disable auto-saves for that file."
|
|||
:type '(choice (const :tag "Yes" t)
|
||||
(const :tag "All except current topic" except-current)
|
||||
(const :tag "No" nil))
|
||||
:group 'allout)
|
||||
:version "22.0"
|
||||
:group 'allout-encryption)
|
||||
(make-variable-buffer-local 'allout-encrypt-unencrypted-on-saves)
|
||||
|
||||
;;;_ + Miscellaneous customization
|
||||
|
@ -585,6 +619,9 @@ where auto-fill occurs."
|
|||
:type 'boolean
|
||||
:group 'allout)
|
||||
(make-variable-buffer-local 'allout-use-hanging-indents)
|
||||
;;;###autoload
|
||||
(put 'allout-use-hanging-indents 'safe-local-variable
|
||||
(lambda (x) (member x '(t nil))))
|
||||
|
||||
;;;_ = allout-reindent-bodies
|
||||
(defcustom allout-reindent-bodies (if allout-use-hanging-indents
|
||||
|
@ -602,6 +639,9 @@ those that do not have the variable `comment-start' set. A value of
|
|||
:group 'allout)
|
||||
|
||||
(make-variable-buffer-local 'allout-reindent-bodies)
|
||||
;;;###autoload
|
||||
(put 'allout-reindent-bodies 'safe-local-variable
|
||||
(lambda (x) (member x '(nil t text force))))
|
||||
|
||||
;;;_ = allout-enable-file-variable-adjustment
|
||||
(defcustom allout-enable-file-variable-adjustment t
|
||||
|
@ -667,7 +707,9 @@ the layout used for the allout.el source file.)
|
|||
case the value of `allout-default-layout' is used.")
|
||||
(make-variable-buffer-local 'allout-layout)
|
||||
;;;###autoload
|
||||
(put 'allout-layout 'safe-local-variable t)
|
||||
(put 'allout-layout 'safe-local-variable
|
||||
(lambda (x) (or (numberp x) (listp x) (integerp x)
|
||||
(member x '(: * + -)))))
|
||||
|
||||
;;;_ : Topic header format
|
||||
;;;_ = allout-regexp
|
||||
|
@ -1053,7 +1095,8 @@ The verifier string is retained as an Emacs file variable, as well as in
|
|||
the emacs buffer state, if file variable adjustments are enabled. See
|
||||
`allout-enable-file-variable-adjustment' for details about that.")
|
||||
(make-variable-buffer-local 'allout-passphrase-verifier-string)
|
||||
(put 'allout-passphrase-verifier-string 'safe-local-variable t)
|
||||
;;;###autoload
|
||||
(put 'allout-passphrase-verifier-string 'safe-local-variable 'stringp)
|
||||
;;;_ = allout-passphrase-hint-string
|
||||
(defvar allout-passphrase-hint-string ""
|
||||
"Variable used to retain reminder string for file's encryption passphrase.
|
||||
|
@ -1065,8 +1108,9 @@ The hint is retained as an Emacs file variable, as well as in the emacs buffer
|
|||
state, if file variable adjustments are enabled. See
|
||||
`allout-enable-file-variable-adjustment' for details about that.")
|
||||
(make-variable-buffer-local 'allout-passphrase-hint-string)
|
||||
(put 'allout-passphrase-hint-string 'safe-local-variable t)
|
||||
(setq-default allout-passphrase-hint-string "")
|
||||
;;;###autoload
|
||||
(put 'allout-passphrase-hint-string 'safe-local-variable 'stringp)
|
||||
;;;_ = allout-after-save-decrypt
|
||||
(defvar allout-after-save-decrypt nil
|
||||
"Internal variable, is nil or has the value of two points:
|
||||
|
@ -1573,6 +1617,12 @@ OPEN: A topic that is not closed, though its offspring or body may be."
|
|||
; epoch, minor-mode key bindings:
|
||||
(setq allout-mode-map
|
||||
(produce-allout-mode-map allout-keybindings-list))
|
||||
(substitute-key-definition 'beginning-of-line
|
||||
'move-beginning-of-line
|
||||
allout-mode-map global-map)
|
||||
(substitute-key-definition 'end-of-line
|
||||
'move-end-of-line
|
||||
allout-mode-map global-map)
|
||||
(produce-allout-mode-menubar-entries)
|
||||
(fset 'allout-mode-map allout-mode-map)
|
||||
; Include on minor-mode-map-alist,
|
||||
|
@ -5778,17 +5828,14 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t."
|
|||
(if (/= arg 1)
|
||||
(condition-case nil (line-move (1- arg)) (error nil)))
|
||||
|
||||
(let ((orig (point)))
|
||||
;; Move to beginning-of-line, ignoring fields and invisibles.
|
||||
(skip-chars-backward "^\n")
|
||||
(while (and (not (bobp)) (line-move-invisible-p (1- (point))))
|
||||
(goto-char (if (featurep 'xemacs)
|
||||
(previous-property-change (point))
|
||||
(previous-char-property-change (point))))
|
||||
(skip-chars-backward "^\n"))
|
||||
(vertical-motion 0)
|
||||
(if (/= orig (point))
|
||||
(goto-char orig))))
|
||||
;; Move to beginning-of-line, ignoring fields and invisibles.
|
||||
(skip-chars-backward "^\n")
|
||||
(while (and (not (bobp)) (line-move-invisible-p (1- (point))))
|
||||
(goto-char (if (featurep 'xemacs)
|
||||
(previous-property-change (point))
|
||||
(previous-char-property-change (point))))
|
||||
(skip-chars-backward "^\n"))
|
||||
(vertical-motion 0))
|
||||
)
|
||||
;;;_ > move-end-of-line if necessary - older emacs, xemacs
|
||||
(if (not (fboundp 'move-end-of-line))
|
||||
|
@ -5802,8 +5849,7 @@ If point reaches the beginning or end of buffer, it stops there.
|
|||
To ignore intangibility, bind `inhibit-point-motion-hooks' to t."
|
||||
(interactive "p")
|
||||
(or arg (setq arg 1))
|
||||
(let ((orig (point))
|
||||
done)
|
||||
(let (done)
|
||||
(while (not done)
|
||||
(let ((newpos
|
||||
(save-excursion
|
||||
|
@ -5813,8 +5859,10 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t."
|
|||
(error nil))
|
||||
(not (bobp))
|
||||
(progn
|
||||
(while (and (not (bobp)) (line-move-invisible-p (1- (point))))
|
||||
(goto-char (previous-char-property-change (point))))
|
||||
(while (and (not (bobp))
|
||||
(line-move-invisible-p (1- (point))))
|
||||
(goto-char
|
||||
(previous-char-property-change (point))))
|
||||
(backward-char 1)))
|
||||
(point)))))
|
||||
(goto-char newpos)
|
||||
|
@ -5827,9 +5875,7 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t."
|
|||
;; and now we're not really at eol,
|
||||
;; keep going.
|
||||
(setq arg 1)
|
||||
(setq done t)))))
|
||||
(if (/= orig (point))
|
||||
(goto-char orig))))
|
||||
(setq done t)))))))
|
||||
)
|
||||
;;;_ > line-move-invisible-p if necessary
|
||||
(if (not (fboundp 'line-move-invisible-p))
|
||||
|
|
|
@ -310,13 +310,13 @@ Keymap to display on minor modes.")
|
|||
(list
|
||||
(propertize "%[(" 'help-echo help-echo)
|
||||
`(:propertize ("" mode-name)
|
||||
help-echo "mouse-1: major-mode-menu mouse-2: help for current major mode"
|
||||
help-echo "mouse-1: major mode, mouse-2: major mode help, mouse-3: toggle minor modes"
|
||||
mouse-face mode-line-highlight
|
||||
local-map ,mode-line-major-mode-keymap)
|
||||
'("" mode-line-process)
|
||||
`(:propertize ("" minor-mode-alist)
|
||||
mouse-face mode-line-highlight
|
||||
help-echo "mouse-2: help for minor modes, mouse-3: minor mode menu"
|
||||
help-echo "mouse-2: minor mode help, mouse-3: toggle minor modes"
|
||||
local-map ,mode-line-minor-mode-keymap)
|
||||
(propertize "%n" 'help-echo "mouse-2: widen"
|
||||
'mouse-face 'mode-line-highlight
|
||||
|
|
|
@ -932,7 +932,9 @@ The command \\[yank] can retrieve it from there."
|
|||
(substring str pref-len suff-pos)))
|
||||
(if (string-match "[^ \t\n]" str)
|
||||
(setq pref-len 0
|
||||
val (math-read-big-expr str))
|
||||
val (condition-case nil
|
||||
(math-read-big-expr str)
|
||||
(error (math-read-expr str))))
|
||||
(setq val nil))))
|
||||
(if (eq (car-safe val) 'error)
|
||||
(setq val (list 'error
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
(define-key calendar-mode-map [menu-bar diary mark]
|
||||
'("Mark All" . mark-diary-entries))
|
||||
(define-key calendar-mode-map [menu-bar diary view]
|
||||
'("Cursor Date" . view-diary-entries))
|
||||
'("Cursor Date" . diary-view-entries))
|
||||
(define-key calendar-mode-map [menu-bar diary view]
|
||||
'("Other File" . view-other-diary-entries))
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
|
||||
(require 'calendar)
|
||||
|
||||
(autoload 'list-diary-entries "diary-lib" nil t)
|
||||
(autoload 'diary-list-entries "diary-lib" nil t)
|
||||
(autoload 'calendar-holiday-list "holidays" nil t)
|
||||
(autoload 'calendar-iso-from-absolute "cal-iso" nil t)
|
||||
|
||||
|
@ -121,6 +121,14 @@ will put the Hebrew date at the bottom of each day."
|
|||
:type 'integer
|
||||
:group 'calendar-tex)
|
||||
|
||||
(defcustom cal-tex-preamble-extra nil
|
||||
"A string giving extra LaTeX commands to insert in the calendar preamble.
|
||||
For example, to include extra packages:
|
||||
\"\\\\usepackage{foo}\\n\\\\usepackage{bar}\\n\"."
|
||||
:type 'string
|
||||
:group 'calendar-tex
|
||||
:version "22.1")
|
||||
|
||||
(defcustom cal-tex-hook nil
|
||||
"*List of functions called after any LaTeX calendar buffer is generated.
|
||||
You can use this to do postprocessing on the buffer. For example, to change
|
||||
|
@ -240,7 +248,7 @@ This definition is the heart of the calendar!")
|
|||
"Generate a list of all diary-entries from absolute date D1 to D2."
|
||||
(let ((diary-list-include-blanks nil)
|
||||
(diary-display-hook 'ignore))
|
||||
(list-diary-entries
|
||||
(diary-list-entries
|
||||
(calendar-gregorian-from-absolute d1)
|
||||
(1+ (- d2 d1)))))
|
||||
|
||||
|
@ -253,8 +261,10 @@ Optional ARGS are included."
|
|||
(insert "\\documentclass")
|
||||
(if args
|
||||
(insert "[" args "]"))
|
||||
(insert "{article}\n"
|
||||
"\\hbadness 20000
|
||||
(insert "{article}\n")
|
||||
(if (stringp cal-tex-preamble-extra)
|
||||
(insert cal-tex-preamble-extra "\n"))
|
||||
(insert "\\hbadness 20000
|
||||
\\hfuzz=1000pt
|
||||
\\vbadness 20000
|
||||
\\lineskip 0pt
|
||||
|
@ -357,6 +367,8 @@ Optional parameter specifies number of years."
|
|||
(cal-tex-noindent)
|
||||
(cal-tex-nl)
|
||||
(let ((month-names; don't use default in case user changed it
|
||||
;; These are only used to define the command names, not
|
||||
;; the names of the months they insert.
|
||||
["January" "February" "March" "April" "May" "June"
|
||||
"July" "August" "September" "October" "November" "December"]))
|
||||
(calendar-for-loop i from 1 to 12 do
|
||||
|
|
|
@ -79,7 +79,7 @@ D-FILE specifies the file to use as the diary file."
|
|||
(list (prefix-numeric-value current-prefix-arg)
|
||||
(read-file-name "Enter diary file name: " default-directory nil t)))
|
||||
(let ((diary-file d-file))
|
||||
(view-diary-entries arg)))
|
||||
(diary-view-entries arg)))
|
||||
|
||||
(autoload 'check-calendar-holidays "holidays"
|
||||
"Check the list of holidays for any that occur on DATE.
|
||||
|
|
|
@ -2703,7 +2703,7 @@ interpreter (e.g., the percent notation of cmd.exe on NT)."
|
|||
name))
|
||||
|
||||
(defun comint-match-partial-filename ()
|
||||
"Return the filename at point, or nil if non is found.
|
||||
"Return the filename at point, or nil if none is found.
|
||||
Environment variables are substituted. See `comint-word'."
|
||||
(let ((filename (comint-word comint-file-name-chars)))
|
||||
(and filename (comint-substitute-in-file-name
|
||||
|
|
|
@ -2089,7 +2089,7 @@ and `face'."
|
|||
'custom-button-pressed
|
||||
'custom-button-pressed-unraised))
|
||||
|
||||
(defface custom-documentation nil
|
||||
(defface custom-documentation '((t nil))
|
||||
"Face used for documentation strings in customization buffers."
|
||||
:group 'custom-faces)
|
||||
;; backward-compatibility alias
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
;; Copyright (C) 1999, 2000, 2002, 2003, 2004,
|
||||
;; 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Stefan Monnier <monnier@cs.yale.edu>
|
||||
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
;; Keywords: pcl-cvs cvs status tree tools
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
;; 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Stefan Monnier <monnier@cs.yale.edu>
|
||||
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
;; Keywords: convenience patch diff
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
@ -118,7 +118,8 @@ when editing big diffs)."
|
|||
("\C-m" . diff-goto-source)
|
||||
([mouse-2] . diff-goto-source)
|
||||
;; From XEmacs' diff-mode.
|
||||
("W" . widen)
|
||||
;; Standard M-w is useful, so don't change M-W.
|
||||
;; ("W" . widen)
|
||||
;;("." . diff-goto-source) ;display-buffer
|
||||
;;("f" . diff-goto-source) ;find-file
|
||||
("o" . diff-goto-source) ;other-window
|
||||
|
@ -127,14 +128,14 @@ when editing big diffs)."
|
|||
;;("h" . diff-show-header)
|
||||
;;("j" . diff-show-difference) ;jump to Nth diff
|
||||
;;("q" . diff-quit)
|
||||
(" " . scroll-up)
|
||||
("\177" . scroll-down)
|
||||
;; Our very own bindings.
|
||||
("A" . diff-ediff-patch)
|
||||
("r" . diff-restrict-view)
|
||||
("R" . diff-reverse-direction)
|
||||
("U" . diff-context->unified)
|
||||
("C" . diff-unified->context)
|
||||
;; Not useful if you have to metafy them.
|
||||
;; (" " . scroll-up)
|
||||
;; ("\177" . scroll-down)
|
||||
;; Standard M-a is useful, so don't change M-A.
|
||||
;; ("A" . diff-ediff-patch)
|
||||
;; Standard M-r is useful, so don't change M-r or M-R.
|
||||
;; ("r" . diff-restrict-view)
|
||||
;; ("R" . diff-reverse-direction)
|
||||
("q" . quit-window))
|
||||
"Basic keymap for `diff-mode', bound to various prefix keys.")
|
||||
|
||||
|
@ -143,10 +144,14 @@ when editing big diffs)."
|
|||
;; From compilation-minor-mode.
|
||||
("\C-c\C-c" . diff-goto-source)
|
||||
;; Misc operations.
|
||||
("\C-c\C-r" . diff-refine-hunk)
|
||||
("\C-c\C-s" . diff-split-hunk)
|
||||
("\C-c\C-a" . diff-apply-hunk)
|
||||
("\C-c\C-e" . diff-ediff-patch)
|
||||
("\C-c\C-n" . diff-restrict-view)
|
||||
("\C-c\C-r" . diff-reverse-direction)
|
||||
("\C-c\C-s" . diff-split-hunk)
|
||||
("\C-c\C-t" . diff-test-hunk)
|
||||
("\C-c\C-u" . diff-context->unified)
|
||||
("\C-c\C-w" . diff-refine-hunk)
|
||||
("\C-c\C-f" . next-error-follow-minor-mode))
|
||||
"Keymap for `diff-mode'. See also `diff-mode-shared-map'.")
|
||||
|
||||
|
@ -711,77 +716,80 @@ else cover the whole bufer."
|
|||
(delete-region last-pt (point))
|
||||
(setq delete nil)))))))))))))))
|
||||
|
||||
(defun diff-context->unified (start end)
|
||||
(defun diff-context->unified (start end &optional to-context)
|
||||
"Convert context diffs to unified 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))
|
||||
(list (point-min) (point-max))))
|
||||
(unless (markerp end) (setq end (copy-marker end)))
|
||||
(let (;;(diff-inhibit-after-change t)
|
||||
(inhibit-read-only t))
|
||||
(save-excursion
|
||||
(goto-char start)
|
||||
(while (and (re-search-forward "^\\(\\(\\*\\*\\*\\) .+\n\\(---\\) .+\\|\\*\\{15\\}.*\n\\*\\*\\* \\([0-9]+\\),\\(-?[0-9]+\\) \\*\\*\\*\\*\\)$" nil t)
|
||||
(< (point) end))
|
||||
(combine-after-change-calls
|
||||
(if (match-beginning 2)
|
||||
;; we matched a file header
|
||||
(progn
|
||||
;; use reverse order to make sure the indices are kept valid
|
||||
(replace-match "+++" t t nil 3)
|
||||
(replace-match "---" t t nil 2))
|
||||
;; we matched a hunk header
|
||||
(let ((line1s (match-string 4))
|
||||
(line1e (match-string 5))
|
||||
(pt1 (match-beginning 0)))
|
||||
(replace-match "")
|
||||
(unless (re-search-forward
|
||||
"^--- \\([0-9]+\\),\\(-?[0-9]+\\) ----$" nil t)
|
||||
(error "Can't find matching `--- n1,n2 ----' line"))
|
||||
(let ((line2s (match-string 1))
|
||||
(line2e (match-string 2))
|
||||
(pt2 (progn
|
||||
(delete-region (progn (beginning-of-line) (point))
|
||||
(progn (forward-line 1) (point)))
|
||||
(point-marker))))
|
||||
(goto-char pt1)
|
||||
(forward-line 1)
|
||||
(while (< (point) pt2)
|
||||
(case (char-after)
|
||||
((?! ?-) (delete-char 2) (insert "-") (forward-line 1))
|
||||
(?\s ;merge with the other half of the chunk
|
||||
(let* ((endline2
|
||||
(save-excursion
|
||||
(goto-char pt2) (forward-line 1) (point)))
|
||||
(c (char-after pt2)))
|
||||
(case c
|
||||
((?! ?+)
|
||||
(insert "+"
|
||||
(prog1 (buffer-substring (+ pt2 2) endline2)
|
||||
(delete-region pt2 endline2))))
|
||||
(?\s ;FIXME: check consistency
|
||||
(delete-region pt2 endline2)
|
||||
(delete-char 1)
|
||||
(forward-line 1))
|
||||
(?\\ (forward-line 1))
|
||||
(t (delete-char 1) (forward-line 1)))))
|
||||
(t (forward-line 1))))
|
||||
(while (looking-at "[+! ] ")
|
||||
(if (/= (char-after) ?!) (forward-char 1)
|
||||
(delete-char 1) (insert "+"))
|
||||
(delete-char 1) (forward-line 1))
|
||||
(save-excursion
|
||||
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 (point-min) (point-max) current-prefix-arg)))
|
||||
(if to-context
|
||||
(diff-unified->context start end)
|
||||
(unless (markerp end) (setq end (copy-marker end)))
|
||||
(let ( ;;(diff-inhibit-after-change t)
|
||||
(inhibit-read-only t))
|
||||
(save-excursion
|
||||
(goto-char start)
|
||||
(while (and (re-search-forward "^\\(\\(\\*\\*\\*\\) .+\n\\(---\\) .+\\|\\*\\{15\\}.*\n\\*\\*\\* \\([0-9]+\\),\\(-?[0-9]+\\) \\*\\*\\*\\*\\)$" nil t)
|
||||
(< (point) end))
|
||||
(combine-after-change-calls
|
||||
(if (match-beginning 2)
|
||||
;; we matched a file header
|
||||
(progn
|
||||
;; use reverse order to make sure the indices are kept valid
|
||||
(replace-match "+++" t t nil 3)
|
||||
(replace-match "---" t t nil 2))
|
||||
;; we matched a hunk header
|
||||
(let ((line1s (match-string 4))
|
||||
(line1e (match-string 5))
|
||||
(pt1 (match-beginning 0)))
|
||||
(replace-match "")
|
||||
(unless (re-search-forward
|
||||
"^--- \\([0-9]+\\),\\(-?[0-9]+\\) ----$" nil t)
|
||||
(error "Can't find matching `--- n1,n2 ----' line"))
|
||||
(let ((line2s (match-string 1))
|
||||
(line2e (match-string 2))
|
||||
(pt2 (progn
|
||||
(delete-region (progn (beginning-of-line) (point))
|
||||
(progn (forward-line 1) (point)))
|
||||
(point-marker))))
|
||||
(goto-char pt1)
|
||||
(insert "@@ -" line1s ","
|
||||
(number-to-string (- (string-to-number line1e)
|
||||
(string-to-number line1s)
|
||||
-1))
|
||||
" +" line2s ","
|
||||
(number-to-string (- (string-to-number line2e)
|
||||
(string-to-number line2s)
|
||||
-1)) " @@"))))))))))
|
||||
(forward-line 1)
|
||||
(while (< (point) pt2)
|
||||
(case (char-after)
|
||||
((?! ?-) (delete-char 2) (insert "-") (forward-line 1))
|
||||
(?\s ;merge with the other half of the chunk
|
||||
(let* ((endline2
|
||||
(save-excursion
|
||||
(goto-char pt2) (forward-line 1) (point)))
|
||||
(c (char-after pt2)))
|
||||
(case c
|
||||
((?! ?+)
|
||||
(insert "+"
|
||||
(prog1 (buffer-substring (+ pt2 2) endline2)
|
||||
(delete-region pt2 endline2))))
|
||||
(?\s ;FIXME: check consistency
|
||||
(delete-region pt2 endline2)
|
||||
(delete-char 1)
|
||||
(forward-line 1))
|
||||
(?\\ (forward-line 1))
|
||||
(t (delete-char 1) (forward-line 1)))))
|
||||
(t (forward-line 1))))
|
||||
(while (looking-at "[+! ] ")
|
||||
(if (/= (char-after) ?!) (forward-char 1)
|
||||
(delete-char 1) (insert "+"))
|
||||
(delete-char 1) (forward-line 1))
|
||||
(save-excursion
|
||||
(goto-char pt1)
|
||||
(insert "@@ -" line1s ","
|
||||
(number-to-string (- (string-to-number line1e)
|
||||
(string-to-number line1s)
|
||||
-1))
|
||||
" +" line2s ","
|
||||
(number-to-string (- (string-to-number line2e)
|
||||
(string-to-number line2s)
|
||||
-1)) " @@")))))))))))
|
||||
|
||||
(defun diff-reverse-direction (start end)
|
||||
"Reverse the direction of the diffs.
|
||||
|
|
|
@ -209,6 +209,7 @@ only, and you can use whatever symbols you like.)
|
|||
|
||||
LEVEL should be either :debug, :warning, :error, or :emergency
|
||||
\(but see `warning-minimum-level' and `warning-minimum-log-level').
|
||||
Default is :warning.
|
||||
|
||||
:emergency -- a problem that will seriously impair Emacs operation soon
|
||||
if you do not attend to it promptly.
|
||||
|
@ -292,7 +293,7 @@ See also `warning-series', `warning-prefix-function' and
|
|||
Aside from generating the message with `format',
|
||||
this is equivalent to `display-warning'.
|
||||
|
||||
TYPE is the warning type: either a custom group name (a symbol).
|
||||
TYPE is the warning type: either a custom group name (a symbol),
|
||||
or a list of symbols whose first element is a custom group name.
|
||||
\(The rest of the symbols represent subcategories and
|
||||
can be whatever you like.)
|
||||
|
|
|
@ -2144,19 +2144,19 @@ used to display the prompt text."
|
|||
:group 'frames
|
||||
:group 'basic-faces)
|
||||
|
||||
(defface scroll-bar '()
|
||||
(defface scroll-bar '((t nil))
|
||||
"Basic face for the scroll bar colors under X."
|
||||
:version "21.1"
|
||||
:group 'frames
|
||||
:group 'basic-faces)
|
||||
|
||||
(defface border '()
|
||||
(defface border '((t nil))
|
||||
"Basic face for the frame border under X."
|
||||
:version "21.1"
|
||||
:group 'frames
|
||||
:group 'basic-faces)
|
||||
|
||||
(defface cursor '()
|
||||
(defface cursor '((t nil))
|
||||
"Basic face for the cursor color under X.
|
||||
Note: Other faces cannot inherit from the cursor face."
|
||||
:version "21.1"
|
||||
|
@ -2165,7 +2165,7 @@ Note: Other faces cannot inherit from the cursor face."
|
|||
|
||||
(put 'cursor 'face-no-inherit t)
|
||||
|
||||
(defface mouse '()
|
||||
(defface mouse '((t nil))
|
||||
"Basic face for the mouse color under X."
|
||||
:version "21.1"
|
||||
:group 'mouse
|
||||
|
|
|
@ -2652,15 +2652,11 @@ It is safe if any of these conditions are met:
|
|||
* There is a matching entry (SYM . VAL) in the
|
||||
`safe-local-variable-values' user option.
|
||||
|
||||
* The `safe-local-variable' property of SYM is t.
|
||||
|
||||
* The `safe-local-variable' property of SYM is a function that
|
||||
evaluates to a non-nil value with VAL as an argument."
|
||||
(or (member (cons sym val) safe-local-variable-values)
|
||||
(let ((safep (get sym 'safe-local-variable)))
|
||||
(or (eq safep t)
|
||||
(and (functionp safep)
|
||||
(funcall safep val))))))
|
||||
(and (functionp safep) (funcall safep val)))))
|
||||
|
||||
(defun risky-local-variable-p (sym &optional ignored)
|
||||
"Non-nil if SYM could be dangerous as a file-local variable.
|
||||
|
|
627
lisp/follow.el
627
lisp/follow.el
|
@ -7,7 +7,6 @@
|
|||
;; Maintainer: FSF (Anders' email bounces, Sep 2005)
|
||||
;; Created: 1995-05-25
|
||||
;; Keywords: display, window, minor-mode, convenience
|
||||
;; Last Changed: 1999-11-17
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||
|
@ -46,14 +45,14 @@
|
|||
;; movement commands.
|
||||
;;
|
||||
;; Follow mode comes to its prime when a large screen and two
|
||||
;; side-by-side window are used. The user can, with the help of Follow
|
||||
;; side-by-side window are used. The user can, with the help of Follow
|
||||
;; mode, use two full-height windows as though they would have been
|
||||
;; one. Imagine yourself editing a large function, or section of text,
|
||||
;; one. Imagine yourself editing a large function, or section of text,
|
||||
;; and being able to use 144 lines instead of the normal 72... (your
|
||||
;; mileage may vary).
|
||||
|
||||
;; To test this package, make sure `follow' is loaded, or will be
|
||||
;; autoloaded when activated (see below). Then do the following:
|
||||
;; autoloaded when activated (see below). Then do the following:
|
||||
;;
|
||||
;; * Find your favorite file (preferably a long one).
|
||||
;;
|
||||
|
@ -77,13 +76,13 @@
|
|||
;; +----------+----------+
|
||||
;;
|
||||
;; As you can see, the right-hand window starts at line 73, the line
|
||||
;; immediately below the end of the left-hand window. As long as
|
||||
;; immediately below the end of the left-hand window. As long as
|
||||
;; `follow-mode' is active, the two windows will follow eachother!
|
||||
;;
|
||||
;; * Play around and enjoy! Scroll one window and watch the other.
|
||||
;; Jump to the beginning or end. Press `Cursor down' at the last
|
||||
;; line of the left-hand window. Enter new lines into the
|
||||
;; text. Enter long lines spanning several lines, or several
|
||||
;; Jump to the beginning or end. Press `Cursor down' at the last
|
||||
;; line of the left-hand window. Enter new lines into the
|
||||
;; text. Enter long lines spanning several lines, or several
|
||||
;; windows.
|
||||
;;
|
||||
;; * Should you find `Follow' mode annoying, just type
|
||||
|
@ -146,7 +145,7 @@
|
|||
;; Usage:
|
||||
;;
|
||||
;; To activate issue the command "M-x follow-mode"
|
||||
;; and press return. To deactivate, do it again.
|
||||
;; and press return. To deactivate, do it again.
|
||||
;;
|
||||
;; The following is a list of commands useful when follow-mode is active.
|
||||
;;
|
||||
|
@ -197,7 +196,7 @@
|
|||
;; in the same frame. (My apoligies to you who can't use frames.)
|
||||
;;
|
||||
;; 2) Bind `follow-mode' to key so you can turn it off whenever
|
||||
;; you want to view two locations. Of course, `follow' mode can
|
||||
;; you want to view two locations. Of course, `follow' mode can
|
||||
;; be reactivated by hitting the same key again.
|
||||
;;
|
||||
;; Example from my ~/.emacs:
|
||||
|
@ -208,7 +207,7 @@
|
|||
;;
|
||||
;; In an ideal world, follow mode would have been implemented in the
|
||||
;; kernel of the display routines, making sure that the windows (using
|
||||
;; follow mode) ALWAYS are aligned. On planet earth, however, we must
|
||||
;; follow mode) ALWAYS are aligned. On planet earth, however, we must
|
||||
;; accept a solution where we ALMOST ALWAYS can make sure that the
|
||||
;; windows are aligned.
|
||||
;;
|
||||
|
@ -222,7 +221,7 @@
|
|||
;;
|
||||
;; Note that only the selected window is checked, for the reason of
|
||||
;; efficiency and code complexity. (I.e. it is possible to make a
|
||||
;; non-selected windows unaligned. It will, however, pop right back
|
||||
;; non-selected windows unaligned. It will, however, pop right back
|
||||
;; when it is selected.)
|
||||
|
||||
;;}}}
|
||||
|
@ -259,7 +258,7 @@
|
|||
(eval-when-compile
|
||||
(if (or (featurep 'bytecomp)
|
||||
(featurep 'byte-compile))
|
||||
(cond ((string-match "XEmacs" emacs-version)
|
||||
(cond ((featurep 'xemacs)
|
||||
;; Make XEmacs shut up! I'm using standard Emacs
|
||||
;; functions, they are NOT obsolete!
|
||||
(if (eq (get 'force-mode-line-update 'byte-compile)
|
||||
|
@ -278,53 +277,202 @@
|
|||
:group 'windows
|
||||
:group 'convenience)
|
||||
|
||||
(defvar follow-mode nil
|
||||
"Variable indicating if Follow mode is active.")
|
||||
|
||||
(defcustom follow-mode-hook nil
|
||||
"*Hooks to run when follow-mode is turned on."
|
||||
"Hooks to run when follow-mode is turned on."
|
||||
:type 'hook
|
||||
:group 'follow)
|
||||
|
||||
(defcustom follow-mode-off-hook nil
|
||||
"*Hooks to run when follow-mode is turned off."
|
||||
"Hooks to run when follow-mode is turned off."
|
||||
:type 'hook
|
||||
:group 'follow)
|
||||
|
||||
(defvar follow-mode-map nil
|
||||
"*Minor mode keymap for Follow mode.")
|
||||
|
||||
;;{{{ Keymap/Menu
|
||||
|
||||
;; Define keys for the follow-mode minor mode map and replace some
|
||||
;; functions in the global map. All `follow' mode special functions
|
||||
;; can be found on (the somewhat cumbersome) "C-c . <key>"
|
||||
;; (Control-C dot <key>). (As of Emacs 19.29 the keys
|
||||
;; C-c <punctuation character> are reserved for minor modes.)
|
||||
;;
|
||||
;; To change the prefix, redefine `follow-mode-prefix' before
|
||||
;; `follow' is loaded, or see the section on `follow-mode-hook'
|
||||
;; above for an example of how to bind the keys the way you like.
|
||||
;;
|
||||
;; Please note that the keymap is defined the first time this file is
|
||||
;; loaded. Also note that the only legal way to manipulate the
|
||||
;; keymap is to use `define-key'. Don't change it using `setq' or
|
||||
;; similar!
|
||||
|
||||
(defcustom follow-mode-prefix "\C-c."
|
||||
"Prefix key to use for follow commands in Follow mode.
|
||||
The value of this variable is checked as part of loading Follow mode.
|
||||
After that, changing the prefix key requires manipulating keymaps."
|
||||
:type 'string
|
||||
:group 'follow)
|
||||
|
||||
(defvar follow-mode-map
|
||||
(let ((mainmap (make-sparse-keymap))
|
||||
(map (make-sparse-keymap)))
|
||||
(define-key map "\C-v" 'follow-scroll-up)
|
||||
(define-key map "\M-v" 'follow-scroll-down)
|
||||
(define-key map "v" 'follow-scroll-down)
|
||||
(define-key map "1" 'follow-delete-other-windows-and-split)
|
||||
(define-key map "b" 'follow-switch-to-buffer)
|
||||
(define-key map "\C-b" 'follow-switch-to-buffer-all)
|
||||
(define-key map "\C-l" 'follow-recenter)
|
||||
(define-key map "<" 'follow-first-window)
|
||||
(define-key map ">" 'follow-last-window)
|
||||
(define-key map "n" 'follow-next-window)
|
||||
(define-key map "p" 'follow-previous-window)
|
||||
|
||||
(define-key mainmap follow-mode-prefix map)
|
||||
|
||||
;; Replace the standard `end-of-buffer', when in Follow Mode. (I
|
||||
;; don't see the point in trying to replace every function that
|
||||
;; could be enhanced in Follow mode. End-of-buffer is a special
|
||||
;; case since it is very simple to define and it greatly enhances
|
||||
;; the look and feel of Follow mode.)
|
||||
(define-key mainmap [remap end-of-buffer] 'follow-end-of-buffer)
|
||||
|
||||
;;
|
||||
;; The menu.
|
||||
;;
|
||||
|
||||
(if (not (featurep 'xemacs))
|
||||
|
||||
;;
|
||||
;; Emacs
|
||||
;;
|
||||
(let ((menumap (funcall (symbol-function 'make-sparse-keymap)
|
||||
"Follow"))
|
||||
(count 0)
|
||||
id)
|
||||
(mapcar
|
||||
(function
|
||||
(lambda (item)
|
||||
(setq id
|
||||
(or (cdr item)
|
||||
(progn
|
||||
(setq count (+ count 1))
|
||||
(intern (format "separator-%d" count)))))
|
||||
(define-key menumap (vector id) item)
|
||||
(or (eq id 'follow-mode)
|
||||
(put id 'menu-enable 'follow-mode))))
|
||||
;; In reverse order:
|
||||
'(("Toggle Follow mode" . follow-mode)
|
||||
("--")
|
||||
("Recenter" . follow-recenter)
|
||||
("--")
|
||||
("Previous Window" . follow-previous-window)
|
||||
("Next Windows" . follow-next-window)
|
||||
("Last Window" . follow-last-window)
|
||||
("First Window" . follow-first-window)
|
||||
("--")
|
||||
("Switch To Buffer (all windows)"
|
||||
. follow-switch-to-buffer-all)
|
||||
("Switch To Buffer" . follow-switch-to-buffer)
|
||||
("--")
|
||||
("Delete Other Windows and Split"
|
||||
. follow-delete-other-windows-and-split)
|
||||
("--")
|
||||
("Scroll Down" . follow-scroll-down)
|
||||
("Scroll Up" . follow-scroll-up)))
|
||||
|
||||
;; If there is a `tools' menu, we use it. However, we can't add a
|
||||
;; minor-mode specific item to it (it's broken), so we make the
|
||||
;; contents ghosted when not in use, and add ourselves to the
|
||||
;; global map. If no `tools' menu is present, just make a
|
||||
;; top-level menu visible when the mode is activated.
|
||||
|
||||
(let ((tools-map (lookup-key (current-global-map) [menu-bar tools]))
|
||||
(last nil))
|
||||
(if (sequencep tools-map)
|
||||
(progn
|
||||
;; Find the last entry in the menu and store it in `last'.
|
||||
(mapcar (function
|
||||
(lambda (x)
|
||||
(setq last (or (cdr-safe
|
||||
(cdr-safe
|
||||
(cdr-safe x)))
|
||||
last))))
|
||||
tools-map)
|
||||
(if last
|
||||
(progn
|
||||
(funcall (symbol-function 'define-key-after)
|
||||
tools-map [separator-follow] '("--") last)
|
||||
(funcall (symbol-function 'define-key-after)
|
||||
tools-map [follow] (cons "Follow" menumap)
|
||||
'separator-follow))
|
||||
;; Didn't find the last item, Adding to the top of
|
||||
;; tools. (This will probably never happend...)
|
||||
(define-key (current-global-map) [menu-bar tools follow]
|
||||
(cons "Follow" menumap))))
|
||||
;; No tools menu, add "Follow" to the menubar.
|
||||
(define-key mainmap [menu-bar follow]
|
||||
(cons "Follow" menumap)))))
|
||||
|
||||
;;
|
||||
;; XEmacs.
|
||||
;;
|
||||
|
||||
;; place the menu in the `Tools' menu.
|
||||
(let ((menu '("Follow"
|
||||
:filter follow-menu-filter
|
||||
["Scroll Up" follow-scroll-up t]
|
||||
["Scroll Down" follow-scroll-down t]
|
||||
["Delete Other Windows and Split"
|
||||
follow-delete-other-windows-and-split t]
|
||||
["Switch To Buffer" follow-switch-to-buffer t]
|
||||
["Switch To Buffer (all windows)"
|
||||
follow-switch-to-buffer-all t]
|
||||
["First Window" follow-first-window t]
|
||||
["Last Window" follow-last-window t]
|
||||
["Next Windows" follow-next-window t]
|
||||
["Previous Window" follow-previous-window t]
|
||||
["Recenter" follow-recenter t]
|
||||
["Deactivate" follow-mode t])))
|
||||
|
||||
;; Why not just `(set-buffer-menubar current-menubar)'? The
|
||||
;; question is a very good question. The reason is that under
|
||||
;; Emacs, neither `set-buffer-menubar' nor
|
||||
;; `current-menubar' is defined, hence the byte-compiler will
|
||||
;; warn.
|
||||
(funcall (symbol-function 'set-buffer-menubar)
|
||||
(symbol-value 'current-menubar))
|
||||
(funcall (symbol-function 'add-submenu) '("Tools") menu))
|
||||
|
||||
;; When the mode is not activated, only one item is visible:
|
||||
;; "Activate".
|
||||
(defun follow-menu-filter (menu)
|
||||
(if follow-mode
|
||||
menu
|
||||
'(["Activate " follow-mode t]))))
|
||||
|
||||
mainmap)
|
||||
"Minor mode keymap for Follow mode.")
|
||||
|
||||
;;}}}
|
||||
|
||||
(defcustom follow-mode-line-text " Follow"
|
||||
"*Text shown in the mode line when Follow mode is active.
|
||||
"Text shown in the mode line when Follow mode is active.
|
||||
Defaults to \" Follow\". Examples of other values
|
||||
are \" Fw\", or simply \"\"."
|
||||
:type 'string
|
||||
:group 'follow)
|
||||
|
||||
(defcustom follow-auto nil
|
||||
"*Non-nil activates Follow mode whenever a file is loaded."
|
||||
"Non-nil activates Follow mode whenever a file is loaded."
|
||||
:type 'boolean
|
||||
:group 'follow)
|
||||
|
||||
(defcustom follow-mode-prefix "\C-c."
|
||||
"*Prefix key to use for follow commands in Follow mode.
|
||||
The value of this variable is checked as part of loading Follow mode.
|
||||
After that, changing the prefix key requires manipulating keymaps."
|
||||
:type 'string
|
||||
:group 'follow)
|
||||
|
||||
(defcustom follow-intercept-processes
|
||||
(fboundp 'start-process)
|
||||
"*When non-nil, Follow Mode will monitor process output."
|
||||
(defcustom follow-intercept-processes (fboundp 'start-process)
|
||||
"When non-nil, Follow Mode will monitor process output."
|
||||
:type 'boolean
|
||||
:group 'follow)
|
||||
|
||||
(defvar follow-emacs-version-xemacs-p
|
||||
(string-match "XEmacs" emacs-version)
|
||||
"Non-nil when running under XEmacs.")
|
||||
|
||||
(defvar follow-avoid-tail-recenter-p
|
||||
(not follow-emacs-version-xemacs-p)
|
||||
(defvar follow-avoid-tail-recenter-p (not (featurep 'xemacs))
|
||||
"*When non-nil, patch emacs so that tail windows won't be recentered.
|
||||
|
||||
A \"tail window\" is a window that displays only the end of
|
||||
|
@ -380,38 +528,6 @@ Used by `follow-window-size-change'.")
|
|||
(defvar follow-windows-start-end-cache nil
|
||||
"Cache used by `follow-window-start-end'.")
|
||||
|
||||
;;}}}
|
||||
;;{{{ Bug report
|
||||
|
||||
(eval-when-compile (require 'reporter))
|
||||
|
||||
(defun follow-submit-feedback ()
|
||||
"Submit feedback on Follow mode to the author: andersl@andersl.com"
|
||||
(interactive)
|
||||
(require 'reporter)
|
||||
(and (y-or-n-p "Do you really want to submit a report on Follow mode? ")
|
||||
(reporter-submit-bug-report
|
||||
"Anders Lindgren <andersl@andersl.com>"
|
||||
"follow.el"
|
||||
'(post-command-hook
|
||||
pre-command-hook
|
||||
window-size-change-functions
|
||||
window-scroll-functions
|
||||
follow-mode-hook
|
||||
follow-mode-off-hook
|
||||
follow-auto
|
||||
follow-intercept-processes
|
||||
follow-avoid-tail-recenter-p
|
||||
follow-process-filter-alist)
|
||||
nil
|
||||
nil
|
||||
(concat
|
||||
"Hi Anders!\n\n"
|
||||
"(I have read the section on how to report bugs in the "
|
||||
"Emacs manual.)\n\n"
|
||||
"Even though I know you are busy, I thought you might "
|
||||
"want to know...\n\n"))))
|
||||
|
||||
;;}}}
|
||||
;;{{{ Debug messages
|
||||
|
||||
|
@ -424,190 +540,11 @@ Used by `follow-window-size-change'.")
|
|||
(if (and (boundp 'follow-debug) follow-debug)
|
||||
(apply 'message args)))
|
||||
|
||||
;;}}}
|
||||
|
||||
;;{{{ Keymap/Menu
|
||||
|
||||
;;; Define keys for the follow-mode minor mode map and replace some
|
||||
;;; functions in the global map. All `follow' mode special functions
|
||||
;;; can be found on (the somewhat cumbersome) "C-c . <key>"
|
||||
;;; (Control-C dot <key>). (As of Emacs 19.29 the keys
|
||||
;;; C-c <punctuation character> are reserved for minor modes.)
|
||||
;;;
|
||||
;;; To change the prefix, redefine `follow-mode-prefix' before
|
||||
;;; `follow' is loaded, or see the section on `follow-mode-hook'
|
||||
;;; above for an example of how to bind the keys the way you like.
|
||||
;;;
|
||||
;;; Please note that the keymap is defined the first time this file is
|
||||
;;; loaded. Also note that the only legal way to manipulate the
|
||||
;;; keymap is to use `define-key'. Don't change it using `setq' or
|
||||
;;; similar!
|
||||
|
||||
|
||||
(if follow-mode-map
|
||||
nil
|
||||
(setq follow-mode-map (make-sparse-keymap))
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map "\C-v" 'follow-scroll-up)
|
||||
(define-key map "\M-v" 'follow-scroll-down)
|
||||
(define-key map "v" 'follow-scroll-down)
|
||||
(define-key map "1" 'follow-delete-other-windows-and-split)
|
||||
(define-key map "b" 'follow-switch-to-buffer)
|
||||
(define-key map "\C-b" 'follow-switch-to-buffer-all)
|
||||
(define-key map "\C-l" 'follow-recenter)
|
||||
(define-key map "<" 'follow-first-window)
|
||||
(define-key map ">" 'follow-last-window)
|
||||
(define-key map "n" 'follow-next-window)
|
||||
(define-key map "p" 'follow-previous-window)
|
||||
|
||||
(define-key follow-mode-map follow-mode-prefix map)
|
||||
|
||||
;; Replace the standard `end-of-buffer', when in Follow Mode. (I
|
||||
;; don't see the point in trying to replace every function that
|
||||
;; could be enhanced in Follow mode. End-of-buffer is a special
|
||||
;; case since it is very simple to define and it greatly enhances
|
||||
;; the look and feel of Follow mode.)
|
||||
;;
|
||||
;; (The function `substitute-key-definition' does not work
|
||||
;; in all versions of Emacs.)
|
||||
(mapcar
|
||||
(function
|
||||
(lambda (pair)
|
||||
(let ((old (car pair))
|
||||
(new (cdr pair)))
|
||||
(mapcar (function (lambda (key)
|
||||
(define-key follow-mode-map key new)))
|
||||
(where-is-internal old global-map)))))
|
||||
'((end-of-buffer . follow-end-of-buffer)
|
||||
(fkey-end-of-buffer . follow-end-of-buffer)))
|
||||
|
||||
;;;
|
||||
;;; The menu.
|
||||
;;;
|
||||
|
||||
(if (not follow-emacs-version-xemacs-p)
|
||||
|
||||
;;
|
||||
;; Emacs
|
||||
;;
|
||||
(let ((menumap (funcall (symbol-function 'make-sparse-keymap)
|
||||
"Follow"))
|
||||
(count 0)
|
||||
id)
|
||||
(mapcar
|
||||
(function
|
||||
(lambda (item)
|
||||
(setq id
|
||||
(or (cdr item)
|
||||
(progn
|
||||
(setq count (+ count 1))
|
||||
(intern (format "separator-%d" count)))))
|
||||
(define-key menumap (vector id) item)
|
||||
(or (eq id 'follow-mode)
|
||||
(put id 'menu-enable 'follow-mode))))
|
||||
;; In reverse order:
|
||||
'(("Toggle Follow mode" . follow-mode)
|
||||
("--")
|
||||
("Recenter" . follow-recenter)
|
||||
("--")
|
||||
("Previous Window" . follow-previous-window)
|
||||
("Next Windows" . follow-next-window)
|
||||
("Last Window" . follow-last-window)
|
||||
("First Window" . follow-first-window)
|
||||
("--")
|
||||
("Switch To Buffer (all windows)"
|
||||
. follow-switch-to-buffer-all)
|
||||
("Switch To Buffer" . follow-switch-to-buffer)
|
||||
("--")
|
||||
("Delete Other Windows and Split"
|
||||
. follow-delete-other-windows-and-split)
|
||||
("--")
|
||||
("Scroll Down" . follow-scroll-down)
|
||||
("Scroll Up" . follow-scroll-up)))
|
||||
|
||||
;; If there is a `tools' meny, we use it. However, we can't add a
|
||||
;; minor-mode specific item to it (it's broken), so we make the
|
||||
;; contents ghosted when not in use, and add ourselves to the
|
||||
;; global map. If no `tools' menu is present, just make a
|
||||
;; top-level menu visible when the mode is activated.
|
||||
|
||||
(let ((tools-map (lookup-key (current-global-map) [menu-bar tools]))
|
||||
(last nil))
|
||||
(if (sequencep tools-map)
|
||||
(progn
|
||||
;; Find the last entry in the menu and store it in `last'.
|
||||
(mapcar (function
|
||||
(lambda (x)
|
||||
(setq last (or (cdr-safe
|
||||
(cdr-safe
|
||||
(cdr-safe x)))
|
||||
last))))
|
||||
tools-map)
|
||||
(if last
|
||||
(progn
|
||||
(funcall (symbol-function 'define-key-after)
|
||||
tools-map [separator-follow] '("--") last)
|
||||
(funcall (symbol-function 'define-key-after)
|
||||
tools-map [follow] (cons "Follow" menumap)
|
||||
'separator-follow))
|
||||
;; Didn't find the last item, Adding to the top of
|
||||
;; tools. (This will probably never happend...)
|
||||
(define-key (current-global-map) [menu-bar tools follow]
|
||||
(cons "Follow" menumap))))
|
||||
;; No tools menu, add "Follow" to the menubar.
|
||||
(define-key follow-mode-map [menu-bar follow]
|
||||
(cons "Follow" menumap)))))
|
||||
|
||||
;;
|
||||
;; XEmacs.
|
||||
;;
|
||||
|
||||
;; place the menu in the `Tools' menu.
|
||||
(let ((menu '("Follow"
|
||||
:filter follow-menu-filter
|
||||
["Scroll Up" follow-scroll-up t]
|
||||
["Scroll Down" follow-scroll-down t]
|
||||
["Delete Other Windows and Split"
|
||||
follow-delete-other-windows-and-split t]
|
||||
["Switch To Buffer" follow-switch-to-buffer t]
|
||||
["Switch To Buffer (all windows)"
|
||||
follow-switch-to-buffer-all t]
|
||||
["First Window" follow-first-window t]
|
||||
["Last Window" follow-last-window t]
|
||||
["Next Windows" follow-next-window t]
|
||||
["Previous Window" follow-previous-window t]
|
||||
["Recenter" follow-recenter t]
|
||||
["Deactivate" follow-mode t])))
|
||||
|
||||
;; Why not just `(set-buffer-menubar current-menubar)'? The
|
||||
;; question is a very good question. The reason is that under
|
||||
;; Emacs, neither `set-buffer-menubar' nor
|
||||
;; `current-menubar' is defined, hence the byte-compiler will
|
||||
;; warn.
|
||||
(funcall (symbol-function 'set-buffer-menubar)
|
||||
(symbol-value 'current-menubar))
|
||||
(funcall (symbol-function 'add-submenu) '("Tools") menu))
|
||||
|
||||
;; When the mode is not activated, only one item is visible:
|
||||
;; "Activate".
|
||||
(defun follow-menu-filter (menu)
|
||||
(if follow-mode
|
||||
menu
|
||||
'(["Activate " follow-mode t]))))))
|
||||
|
||||
|
||||
;;; Register the follow mode keymap.
|
||||
(or (assq 'follow-mode minor-mode-map-alist)
|
||||
(setq minor-mode-map-alist
|
||||
(cons (cons 'follow-mode follow-mode-map) minor-mode-map-alist)))
|
||||
|
||||
;;}}}
|
||||
;;{{{ Cache
|
||||
|
||||
(let ((cmds follow-cache-command-list))
|
||||
(while cmds
|
||||
(put (car cmds) 'follow-mode-use-cache t)
|
||||
(setq cmds (cdr cmds))))
|
||||
(dolist (cmd follow-cache-command-list)
|
||||
(put cmd 'follow-mode-use-cache t))
|
||||
|
||||
;;}}}
|
||||
|
||||
|
@ -615,20 +552,20 @@ Used by `follow-window-size-change'.")
|
|||
|
||||
;;;###autoload
|
||||
(defun turn-on-follow-mode ()
|
||||
"Turn on Follow mode. Please see the function `follow-mode'."
|
||||
"Turn on Follow mode. Please see the function `follow-mode'."
|
||||
(interactive)
|
||||
(follow-mode 1))
|
||||
|
||||
|
||||
;;;###autoload
|
||||
(defun turn-off-follow-mode ()
|
||||
"Turn off Follow mode. Please see the function `follow-mode'."
|
||||
"Turn off Follow mode. Please see the function `follow-mode'."
|
||||
(interactive)
|
||||
(follow-mode -1))
|
||||
|
||||
|
||||
(put 'follow-mode 'permanent-local t)
|
||||
;;;###autoload
|
||||
(defun follow-mode (arg)
|
||||
(define-minor-mode follow-mode
|
||||
"Minor mode that combines windows into one tall virtual window.
|
||||
|
||||
The feeling of a \"virtual window\" has been accomplished by the use
|
||||
|
@ -665,39 +602,21 @@ is called. When turned off, `follow-mode-off-hook' is called.
|
|||
|
||||
Keys specific to Follow mode:
|
||||
\\{follow-mode-map}"
|
||||
(interactive "P")
|
||||
(make-local-variable 'follow-mode)
|
||||
(put 'follow-mode 'permanent-local t)
|
||||
(let ((follow-mode-orig follow-mode))
|
||||
(setq follow-mode
|
||||
(if (null arg)
|
||||
(not follow-mode)
|
||||
(> (prefix-numeric-value arg) 0)))
|
||||
(if (and follow-mode follow-intercept-processes)
|
||||
(follow-intercept-process-output))
|
||||
(cond ((and follow-mode (not follow-mode-orig)) ; On
|
||||
;; XEmacs: If this is non-nil, the window will scroll before
|
||||
;; the point will have a chance to get into the next window.
|
||||
(if (boundp 'scroll-on-clipped-lines)
|
||||
(set 'scroll-on-clipped-lines nil))
|
||||
(force-mode-line-update)
|
||||
(add-hook 'post-command-hook 'follow-post-command-hook t)
|
||||
(run-hooks 'follow-mode-hook))
|
||||
:keymap follow-mode-map
|
||||
(if (and follow-mode follow-intercept-processes)
|
||||
(follow-intercept-process-output))
|
||||
(cond (follow-mode ; On
|
||||
;; XEmacs: If this is non-nil, the window will scroll before
|
||||
;; the point will have a chance to get into the next window.
|
||||
(if (boundp 'scroll-on-clipped-lines)
|
||||
(setq scroll-on-clipped-lines nil))
|
||||
(force-mode-line-update)
|
||||
(add-hook 'post-command-hook 'follow-post-command-hook t)
|
||||
(run-hooks 'follow-mode-hook))
|
||||
|
||||
((and (not follow-mode) follow-mode-orig) ; Off
|
||||
(force-mode-line-update)
|
||||
(run-hooks 'follow-mode-off-hook)))))
|
||||
|
||||
|
||||
;; Register follow-mode as a minor mode.
|
||||
|
||||
(if (fboundp 'add-minor-mode)
|
||||
;; XEmacs
|
||||
(funcall (symbol-function 'add-minor-mode)
|
||||
'follow-mode 'follow-mode-line-text)
|
||||
(or (assq 'follow-mode minor-mode-alist)
|
||||
(setq minor-mode-alist
|
||||
(cons '(follow-mode follow-mode-line-text) minor-mode-alist))))
|
||||
((not follow-mode) ; Off
|
||||
(force-mode-line-update)
|
||||
(run-hooks 'follow-mode-off-hook))))
|
||||
|
||||
;;}}}
|
||||
;;{{{ Find file hook
|
||||
|
@ -1033,7 +952,7 @@ window, normally is the end plus one.
|
|||
If WIN is nil, the selected window is used.
|
||||
|
||||
Returns (end-pos end-of-buffer-p)"
|
||||
(if follow-emacs-version-xemacs-p
|
||||
(if (featurep 'xemacs)
|
||||
;; XEmacs can calculate the end of the window by using
|
||||
;; the 'guarantee options. GOOD!
|
||||
(let ((end (window-end win t)))
|
||||
|
@ -1511,7 +1430,7 @@ non-first windows in Follow Mode."
|
|||
;;}}}
|
||||
;;{{{ Post Command Hook
|
||||
|
||||
;;; The magic little box. This function is called after every command.
|
||||
;; The magic little box. This function is called after every command.
|
||||
|
||||
;; This is not as complicated as it seems. It is simply a list of common
|
||||
;; display situations and the actions to take, plus commands for redrawing
|
||||
|
@ -1735,17 +1654,17 @@ non-first windows in Follow Mode."
|
|||
|
||||
;;;; Scroll-bar support code.
|
||||
|
||||
;;; Why is it needed? Well, if the selected window is in follow mode,
|
||||
;;; all its follower stick to it blindly. If one of them is scrolled,
|
||||
;;; it immediately returns to the original position when the mouse is
|
||||
;;; released. If the selected window is not a follower of the dragged
|
||||
;;; window the windows will be unaligned.
|
||||
;; Why is it needed? Well, if the selected window is in follow mode,
|
||||
;; all its follower stick to it blindly. If one of them is scrolled,
|
||||
;; it immediately returns to the original position when the mouse is
|
||||
;; released. If the selected window is not a follower of the dragged
|
||||
;; window the windows will be unaligned.
|
||||
|
||||
;;; The advices doesn't get compiled. Aestetically, this might be a
|
||||
;;; problem but in practical life it isn't.
|
||||
;; The advices doesn't get compiled. Aestetically, this might be a
|
||||
;; problem but in practical life it isn't.
|
||||
|
||||
;;; Discussion: Now when the other windows in the chain follow the
|
||||
;;; dragged, should we really select it?
|
||||
;; Discussion: Now when the other windows in the chain follow the
|
||||
;; dragged, should we really select it?
|
||||
|
||||
(cond ((fboundp 'scroll-bar-drag)
|
||||
;;;
|
||||
|
@ -1851,29 +1770,29 @@ WINDOW can be an object or a window."
|
|||
;;}}}
|
||||
;;{{{ Process output
|
||||
|
||||
;;; The following sections installs a spy that listens to process
|
||||
;;; output and tries to reposition the windows whose buffers are in
|
||||
;;; Follow mode. We play safe as much as possible...
|
||||
;;;
|
||||
;;; When follow-mode is activated all active processes are
|
||||
;;; intercepted. All new processes that change their filter function
|
||||
;;; using `set-process-filter' are also intercepted. The reason is
|
||||
;;; that a process can cause a redisplay recentering "tail" windows.
|
||||
;;; Note that it doesn't hurt to spy on more processes than needed.
|
||||
;;;
|
||||
;;; Technically, we set the process filter to `follow-generic-filter'.
|
||||
;;; The original filter is stored in `follow-process-filter-alist'.
|
||||
;;; Our generic filter calls the original filter, or inserts the
|
||||
;;; output into the buffer, if the buffer originally didn't have an
|
||||
;;; output filter. It also makes sure that the windows connected to
|
||||
;;; the buffer are aligned.
|
||||
;;;
|
||||
;;; Discussion: How do we find processes that don't call
|
||||
;;; `set-process-filter'? (How often are processes created in a
|
||||
;;; buffer after Follow mode are activated?)
|
||||
;;;
|
||||
;;; Discussion: Should we also advice `process-filter' to make our
|
||||
;;; filter invisible to others?
|
||||
;; The following sections installs a spy that listens to process
|
||||
;; output and tries to reposition the windows whose buffers are in
|
||||
;; Follow mode. We play safe as much as possible...
|
||||
;;
|
||||
;; When follow-mode is activated all active processes are
|
||||
;; intercepted. All new processes that change their filter function
|
||||
;; using `set-process-filter' are also intercepted. The reason is
|
||||
;; that a process can cause a redisplay recentering "tail" windows.
|
||||
;; Note that it doesn't hurt to spy on more processes than needed.
|
||||
;;
|
||||
;; Technically, we set the process filter to `follow-generic-filter'.
|
||||
;; The original filter is stored in `follow-process-filter-alist'.
|
||||
;; Our generic filter calls the original filter, or inserts the
|
||||
;; output into the buffer, if the buffer originally didn't have an
|
||||
;; output filter. It also makes sure that the windows connected to
|
||||
;; the buffer are aligned.
|
||||
;;
|
||||
;; Discussion: How do we find processes that don't call
|
||||
;; `set-process-filter'? (How often are processes created in a
|
||||
;; buffer after Follow mode are activated?)
|
||||
;;
|
||||
;; Discussion: Should we also advice `process-filter' to make our
|
||||
;; filter invisible to others?
|
||||
|
||||
;;{{{ Advice for `set-process-filter'
|
||||
|
||||
|
@ -1980,7 +1899,7 @@ connected to processes.
|
|||
|
||||
The only reason to call this function is if the Follow mode spy filter
|
||||
would interfere with some other package. If this happens, please
|
||||
report this using the `follow-submit-feedback' function."
|
||||
report this using the `report-emacs-bug' function."
|
||||
(interactive)
|
||||
(follow-tidy-process-filter-alist)
|
||||
(let ((list (process-list)))
|
||||
|
@ -1999,12 +1918,12 @@ report this using the `follow-submit-feedback' function."
|
|||
;;}}}
|
||||
;;{{{ The filter
|
||||
|
||||
;;; The following section is a naive method to make buffers with
|
||||
;;; process output to work with Follow mode. Whenever the start of the
|
||||
;;; window displaying the buffer is moved, we moves it back to its
|
||||
;;; original position and try to select a new window. (If we fail,
|
||||
;;; the normal redisplay functions of Emacs will scroll it right
|
||||
;;; back!)
|
||||
;; The following section is a naive method to make buffers with
|
||||
;; process output to work with Follow mode. Whenever the start of the
|
||||
;; window displaying the buffer is moved, we moves it back to its
|
||||
;; original position and try to select a new window. (If we fail,
|
||||
;; the normal redisplay functions of Emacs will scroll it right
|
||||
;; back!)
|
||||
|
||||
(defun follow-generic-filter (proc output)
|
||||
"Process output filter for process connected to buffers in Follow mode."
|
||||
|
@ -2219,7 +2138,7 @@ report this using the `follow-submit-feedback' function."
|
|||
;; unless we are in `slow-search-mode', i.e. only a few lines
|
||||
;; of text is visible.
|
||||
|
||||
(if follow-emacs-version-xemacs-p
|
||||
(if (featurep 'xemacs)
|
||||
(defadvice isearch-done (before follow-isearch-done activate)
|
||||
(if (and (boundp 'follow-mode)
|
||||
follow-mode
|
||||
|
@ -2235,28 +2154,28 @@ report this using the `follow-submit-feedback' function."
|
|||
;;}}}
|
||||
;;{{{ Tail window handling
|
||||
|
||||
;;; In Emacs (not XEmacs) windows showing nothing are sometimes
|
||||
;;; recentered. When in Follow Mode, this is not desireable for
|
||||
;;; non-first windows in the window chain. This section tries to
|
||||
;;; make the windows stay where they should be.
|
||||
;;;
|
||||
;;; If the display is updated, all windows starting at (point-max) are
|
||||
;;; going to be recentered at the next redisplay, unless we do a
|
||||
;;; read-and-write cycle to update the `force' flag inside the windows.
|
||||
;;;
|
||||
;;; In 19.30, a new varible `window-scroll-functions' is called every
|
||||
;;; time a window is recentered. It is not perfect for our situation,
|
||||
;;; since when it is called for a tail window, it is to late. However,
|
||||
;;; if it is called for another window, we can try to update our
|
||||
;;; windows.
|
||||
;;;
|
||||
;;; By patching `sit-for' we can make sure that to catch all explicit
|
||||
;;; updates initiated by lisp programs. Internal calls, on the other
|
||||
;;; hand, are not handled.
|
||||
;;;
|
||||
;;; Please note that the function `follow-avoid-tail-recenter' is also
|
||||
;;; called from other places, e.g. `post-command-hook' and
|
||||
;;; `post-command-idle-hook'.
|
||||
;; In Emacs (not XEmacs) windows showing nothing are sometimes
|
||||
;; recentered. When in Follow Mode, this is not desireable for
|
||||
;; non-first windows in the window chain. This section tries to
|
||||
;; make the windows stay where they should be.
|
||||
;;
|
||||
;; If the display is updated, all windows starting at (point-max) are
|
||||
;; going to be recentered at the next redisplay, unless we do a
|
||||
;; read-and-write cycle to update the `force' flag inside the windows.
|
||||
;;
|
||||
;; In 19.30, a new varible `window-scroll-functions' is called every
|
||||
;; time a window is recentered. It is not perfect for our situation,
|
||||
;; since when it is called for a tail window, it is to late. However,
|
||||
;; if it is called for another window, we can try to update our
|
||||
;; windows.
|
||||
;;
|
||||
;; By patching `sit-for' we can make sure that to catch all explicit
|
||||
;; updates initiated by lisp programs. Internal calls, on the other
|
||||
;; hand, are not handled.
|
||||
;;
|
||||
;; Please note that the function `follow-avoid-tail-recenter' is also
|
||||
;; called from other places, e.g. `post-command-hook' and
|
||||
;; `post-command-idle-hook'.
|
||||
|
||||
;; If this function is called it is too late for this window, but
|
||||
;; we might save other windows from being recentered.
|
||||
|
@ -2328,9 +2247,9 @@ This prevents `mouse-drag-region' from messing things up."
|
|||
|
||||
;;{{{ The end
|
||||
|
||||
;;;
|
||||
;;; We're done!
|
||||
;;;
|
||||
;;
|
||||
;; We're done!
|
||||
;;
|
||||
|
||||
(provide 'follow)
|
||||
|
||||
|
|
|
@ -1,3 +1,68 @@
|
|||
2006-04-28 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* mm-uu.el (mm-uu-pgp-encrypted-extract-1): Assume buffer is made
|
||||
unibyte after clear-decrypt function runs.
|
||||
|
||||
* mml2015.el (mml2015-pgg-clear-decrypt): Treat data which pgg
|
||||
returns as a unibyte string.
|
||||
|
||||
2006-04-27 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* mml1991.el (mml1991-pgg-sign): No need to load pgg.el, which is
|
||||
always loaded by way of gnus-art.el -> mm-uu.el -> mml2015.el.
|
||||
(mml1991-pgg-encrypt): Ditto.
|
||||
|
||||
2006-04-26 Reiner Steib <Reiner.Steib@gmx.de>
|
||||
|
||||
* deuglify.el (gnus-outlook-deuglify-unwrap-min)
|
||||
(gnus-outlook-deuglify-unwrap-max): Remove autoload.
|
||||
|
||||
* mml-sec.el (mml-secure-method): New internal variable.
|
||||
(mml-secure-sign, mml-secure-encrypt, mml-secure-message-sign)
|
||||
(mml-secure-message-sign-encrypt, mml-secure-message-encrypt): New
|
||||
functions using mml-secure-method. Sync from the trunk.
|
||||
|
||||
* mml.el (mml-mode-map): Add key bindings for those functions.
|
||||
(mml-menu): Simplify security menu entries. Suggested by Jesper
|
||||
Harder <harder@myrealbox.com>. Sync from the trunk.
|
||||
|
||||
* message.el (message-valid-fqdn-regexp): Add TLDs .cat, jobs,
|
||||
.mobi and .travel. Remove .nato, .bitnet and .uucp.
|
||||
(message-in-body-p): New function. Sync from the trunk.
|
||||
|
||||
* mml.el (mml-mode, mml-dnd-protocol-alist)
|
||||
(mml-dnd-attach-options, mml-dnd-attach-file)
|
||||
(mml-attach-file, mml-attach-buffer, mml-attach-external): Sync
|
||||
DND support and use of message-in-body-p from the trunk.
|
||||
|
||||
2006-04-26 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* mml1991.el (mml1991-pgg-sign): Make sure to load pgg.el before
|
||||
binding pgg-* variables; reimplement the section which prevents
|
||||
MIME header from being signed.
|
||||
(mml1991-pgg-encrypt): Make sure to load pgg.el before binding
|
||||
pgg-text-mode; remove a blank line at the top of body.
|
||||
|
||||
* mm-uu.el (mm-uu-pgp-encrypted-extract-1): Don't remove blank
|
||||
lines at the top of body; use gnus-newsgroup-charset if there's no
|
||||
Charset header.
|
||||
|
||||
2006-04-25 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
|
||||
|
||||
* nnweb.el (nnweb-google-wash-article): Sync up to new Google
|
||||
HTML.
|
||||
|
||||
2006-04-25 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* mm-uu.el (mm-uu-pgp-signed-test): Erase prompt.
|
||||
(mm-uu-pgp-encrypted-test): Ditto.
|
||||
(mm-uu-pgp-encrypted-extract-1): Make sure there's a blank line
|
||||
between header and body; return application/pgp-encrypted handle
|
||||
if decryption failed; decode decrypted body by charset.
|
||||
|
||||
* mm-decode.el (mm-automatic-display): Don't make application/pgp
|
||||
element match to application/pgp-*.
|
||||
|
||||
2006-04-20 Reiner Steib <Reiner.Steib@gmx.de>
|
||||
|
||||
* gnus-util.el (gnus-replace-in-string): Prefer
|
||||
|
@ -419,13 +484,6 @@
|
|||
|
||||
2006-02-09 Daiki Ueno <ueno@unixuser.org>
|
||||
|
||||
* pgg-gpg.el (pgg-gpg-encrypt-region): Don't convert line-endings
|
||||
in elisp.
|
||||
(pgg-gpg-encrypt-symmetric-region): Ditto.
|
||||
(pgg-gpg-sign-region): Ditto.
|
||||
|
||||
* pgg-def.el (pgg-text-mode): New variable.
|
||||
|
||||
* mml2015.el (mml2015-pgg-sign): Enable pgg-text-mode.
|
||||
(mml2015-pgg-encrypt): Ditto.
|
||||
|
||||
|
|
|
@ -234,14 +234,12 @@
|
|||
:version "22.1"
|
||||
:group 'gnus)
|
||||
|
||||
;;;###autoload
|
||||
(defcustom gnus-outlook-deuglify-unwrap-min 45
|
||||
"Minimum length of the cited line above the (possibly) wrapped line."
|
||||
:version "22.1"
|
||||
:type 'integer
|
||||
:group 'gnus-outlook-deuglify)
|
||||
|
||||
;;;###autoload
|
||||
(defcustom gnus-outlook-deuglify-unwrap-max 95
|
||||
"Maximum length of the cited line after unwrapping."
|
||||
:version "22.1"
|
||||
|
@ -288,7 +286,6 @@
|
|||
:type 'string
|
||||
:group 'gnus-outlook-deuglify)
|
||||
|
||||
;;;###autoload
|
||||
(defcustom gnus-outlook-display-hook nil
|
||||
"A hook called after an deuglified article has been prepared.
|
||||
It is run after `gnus-article-prepare-hook'."
|
||||
|
|
|
@ -1586,11 +1586,16 @@ functionality to work."
|
|||
(defcustom message-valid-fqdn-regexp
|
||||
(concat "[a-z0-9][-.a-z0-9]+\\." ;; [hostname.subdomain.]domain.
|
||||
;; valid TLDs:
|
||||
"\\([a-z][a-z]" ;; two letter country TDLs
|
||||
"\\|biz\\|com\\|edu\\|gov\\|int\\|mil\\|net\\|org"
|
||||
"\\|aero\\|coop\\|info\\|name\\|museum"
|
||||
"\\|arpa\\|pro\\|uucp\\|bitnet\\|bofh" ;; old style?
|
||||
"\\)")
|
||||
"\\([a-z][a-z]\\|" ;; two letter country TDLs
|
||||
"aero\\|arpa\\|bitnet\\|biz\\|bofh\\|"
|
||||
"cat\\|com\\|coop\\|edu\\|gov\\|"
|
||||
"info\\|int\\|jobs\\|"
|
||||
"mil\\|mobi\\|museum\\|name\\|net\\|"
|
||||
"org\\|pro\\|travel\\|uucp\\)")
|
||||
;; http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains
|
||||
;; http://en.wikipedia.org/wiki/GTLD
|
||||
;; `in the process of being approved': .asia .post .tel .sex
|
||||
;; "dead" nato bitnet uucp
|
||||
"Regular expression that matches a valid FQDN."
|
||||
;; see also: gnus-button-valid-fqdn-regexp
|
||||
:version "22.1"
|
||||
|
@ -2679,6 +2684,11 @@ M-RET `message-newline-and-reformat' (break the line and reformat)."
|
|||
(or (search-forward (concat "\n" mail-header-separator "\n") nil t)
|
||||
(search-forward-regexp "[^:]+:\\([^\n]\\|\n[ \t]\\)+\n\n" nil t)))
|
||||
|
||||
(defun message-in-body-p ()
|
||||
"Return t if point is in the message body."
|
||||
(let ((body (save-excursion (message-goto-body) (point))))
|
||||
(>= (point) body)))
|
||||
|
||||
(defun message-goto-eoh ()
|
||||
"Move point to the end of the headers."
|
||||
(interactive)
|
||||
|
|
|
@ -307,7 +307,7 @@ when selecting a different article."
|
|||
"application/pkcs7-signature" "application/x-pkcs7-mime"
|
||||
"application/pkcs7-mime"
|
||||
;; Mutt still uses this even though it has already been withdrawn.
|
||||
"application/pgp")
|
||||
"application/pgp\\'")
|
||||
"A list of MIME types to be displayed automatically."
|
||||
:type '(repeat regexp)
|
||||
:group 'mime-display)
|
||||
|
|
|
@ -352,7 +352,9 @@ Return that buffer."
|
|||
((eq mm-verify-option 'never) nil)
|
||||
((eq mm-verify-option 'always) t)
|
||||
((eq mm-verify-option 'known) t)
|
||||
(t (y-or-n-p "Verify pgp signed part? ")))))
|
||||
(t (prog1
|
||||
(y-or-n-p "Verify pgp signed part? ")
|
||||
(message ""))))))
|
||||
|
||||
(eval-when-compile
|
||||
(defvar gnus-newsgroup-charset))
|
||||
|
@ -403,15 +405,51 @@ Return that buffer."
|
|||
((eq mm-decrypt-option 'never) nil)
|
||||
((eq mm-decrypt-option 'always) t)
|
||||
((eq mm-decrypt-option 'known) t)
|
||||
(t (y-or-n-p "Decrypt pgp encrypted part? ")))))
|
||||
(t (prog1
|
||||
(y-or-n-p "Decrypt pgp encrypted part? ")
|
||||
(message ""))))))
|
||||
|
||||
(defun mm-uu-pgp-encrypted-extract-1 (handles ctl)
|
||||
(let ((buf (mm-uu-copy-to-buffer (point-min) (point-max))))
|
||||
(if (mm-uu-pgp-encrypted-test)
|
||||
(with-current-buffer buf
|
||||
(mml2015-clean-buffer)
|
||||
(funcall (mml2015-clear-decrypt-function))))
|
||||
(list (mm-make-handle buf mm-uu-text-plain-type))))
|
||||
(let ((buf (mm-uu-copy-to-buffer (point-min) (point-max)))
|
||||
(first t)
|
||||
charset)
|
||||
;; Make sure there's a blank line between header and body.
|
||||
(with-current-buffer buf
|
||||
(goto-char (point-min))
|
||||
(while (prog2
|
||||
(forward-line 1)
|
||||
(if first
|
||||
(looking-at "[^\t\n ]+:")
|
||||
(looking-at "[^\t\n ]+:\\|[\t ]"))
|
||||
(setq first nil)))
|
||||
(unless (memq (char-after) '(?\n nil))
|
||||
(insert "\n"))
|
||||
(save-restriction
|
||||
(narrow-to-region (point-min) (point))
|
||||
(setq charset (mail-fetch-field "charset")))
|
||||
(if (and (mm-uu-pgp-encrypted-test)
|
||||
(progn
|
||||
(mml2015-clean-buffer)
|
||||
(funcall (mml2015-clear-decrypt-function))
|
||||
(equal (mm-handle-multipart-ctl-parameter mm-security-handle
|
||||
'gnus-info)
|
||||
"OK")))
|
||||
(progn
|
||||
;; Decode charset.
|
||||
(if (and (or charset
|
||||
(setq charset gnus-newsgroup-charset))
|
||||
(setq charset (mm-charset-to-coding-system charset))
|
||||
(not (eq charset 'ascii)))
|
||||
;; Assume that buffer's multibyteness is turned off.
|
||||
;; See `mml2015-pgg-clear-decrypt'.
|
||||
(insert (mm-decode-coding-string (prog1
|
||||
(buffer-string)
|
||||
(erase-buffer)
|
||||
(mm-enable-multibyte))
|
||||
charset))
|
||||
(mm-enable-multibyte))
|
||||
(list (mm-make-handle buf mm-uu-text-plain-type)))
|
||||
(list (mm-make-handle buf '("application/pgp-encrypted")))))))
|
||||
|
||||
(defun mm-uu-pgp-encrypted-extract ()
|
||||
(let ((mm-security-handle (list (format "multipart/encrypted"))))
|
||||
|
|
|
@ -188,6 +188,29 @@ You can also customize or set `mml-signencrypt-style-alist' instead."
|
|||
(cons method tags))))
|
||||
(t (error "The message is corrupted. No mail header separator"))))))
|
||||
|
||||
(defvar mml-secure-method
|
||||
(if (equal mml-default-encrypt-method mml-default-sign-method)
|
||||
mml-default-sign-method
|
||||
"pgpmime")
|
||||
"Current security method. Internal variable.")
|
||||
|
||||
(defun mml-secure-sign (&optional method)
|
||||
"Add MML tags to sign this MML part.
|
||||
Use METHOD if given. Else use `mml-secure-method' or
|
||||
`mml-default-sign-method'."
|
||||
(interactive)
|
||||
(mml-secure-part
|
||||
(or method mml-secure-method mml-default-sign-method)
|
||||
'sign))
|
||||
|
||||
(defun mml-secure-encrypt (&optional method)
|
||||
"Add MML tags to encrypt this MML part.
|
||||
Use METHOD if given. Else use `mml-secure-method' or
|
||||
`mml-default-sign-method'."
|
||||
(interactive)
|
||||
(mml-secure-part
|
||||
(or method mml-secure-method mml-default-sign-method)))
|
||||
|
||||
(defun mml-secure-sign-pgp ()
|
||||
"Add MML tags to PGP sign this MML part."
|
||||
(interactive)
|
||||
|
@ -249,6 +272,34 @@ You can also customize or set `mml-signencrypt-style-alist' instead."
|
|||
(when (re-search-backward "^<#secure.*>\n" nil t)
|
||||
(delete-region (match-beginning 0) (match-end 0)))))
|
||||
|
||||
|
||||
(defun mml-secure-message-sign (&optional method)
|
||||
"Add MML tags to sign this MML part.
|
||||
Use METHOD if given. Else use `mml-secure-method' or
|
||||
`mml-default-sign-method'."
|
||||
(interactive)
|
||||
(mml-secure-part
|
||||
(or method mml-secure-method mml-default-sign-method)
|
||||
'sign))
|
||||
|
||||
(defun mml-secure-message-sign-encrypt (&optional method)
|
||||
"Add MML tag to sign and encrypt the entire message.
|
||||
Use METHOD if given. Else use `mml-secure-method' or
|
||||
`mml-default-sign-method'."
|
||||
(interactive)
|
||||
(mml-secure-message
|
||||
(or method mml-secure-method mml-default-sign-method)
|
||||
'signencrypt))
|
||||
|
||||
(defun mml-secure-message-encrypt (&optional method)
|
||||
"Add MML tag to encrypt the entire message.
|
||||
Use METHOD if given. Else use `mml-secure-method' or
|
||||
`mml-default-sign-method'."
|
||||
(interactive)
|
||||
(mml-secure-message
|
||||
(or method mml-secure-method mml-default-sign-method)
|
||||
'encrypt))
|
||||
|
||||
(defun mml-secure-message-sign-smime ()
|
||||
"Add MML tag to encrypt/sign the entire message."
|
||||
(interactive)
|
||||
|
|
159
lisp/gnus/mml.el
159
lisp/gnus/mml.el
|
@ -40,7 +40,8 @@
|
|||
(autoload 'message-fetch-field "message")
|
||||
(autoload 'message-info "message")
|
||||
(autoload 'fill-flowed-encode "flow-fill")
|
||||
(autoload 'message-posting-charset "message"))
|
||||
(autoload 'message-posting-charset "message")
|
||||
(autoload 'dnd-get-local-file-name "dnd"))
|
||||
|
||||
(defvar gnus-article-mime-handles)
|
||||
(defvar gnus-mouse-2)
|
||||
|
@ -51,6 +52,7 @@
|
|||
(defvar message-posting-charset)
|
||||
(defvar message-required-mail-headers)
|
||||
(defvar message-required-news-headers)
|
||||
(defvar dnd-protocol-alist)
|
||||
|
||||
(defcustom mml-content-type-parameters
|
||||
'(name access-type expiration size permission format)
|
||||
|
@ -877,6 +879,11 @@ If HANDLES is non-nil, use it instead reparsing the buffer."
|
|||
(encryptpart (make-sparse-keymap))
|
||||
(map (make-sparse-keymap))
|
||||
(main (make-sparse-keymap)))
|
||||
(define-key map "\C-s" 'mml-secure-message-sign)
|
||||
(define-key map "\C-c" 'mml-secure-message-encrypt)
|
||||
(define-key map "\C-e" 'mml-secure-message-sign-encrypt)
|
||||
(define-key map "\C-p\C-s" 'mml-secure-sign)
|
||||
(define-key map "\C-p\C-c" 'mml-secure-encrypt)
|
||||
(define-key sign "p" 'mml-secure-message-sign-pgpmime)
|
||||
(define-key sign "o" 'mml-secure-message-sign-pgp)
|
||||
(define-key sign "s" 'mml-secure-message-sign-smime)
|
||||
|
@ -914,26 +921,54 @@ If HANDLES is non-nil, use it instead reparsing the buffer."
|
|||
["Attach File..." mml-attach-file
|
||||
,@(if (featurep 'xemacs) '(t)
|
||||
'(:help "Attach a file at point"))]
|
||||
["Attach Buffer..." mml-attach-buffer t]
|
||||
["Attach External..." mml-attach-external t]
|
||||
["Insert Part..." mml-insert-part t]
|
||||
["Insert Multipart..." mml-insert-multipart t]
|
||||
["PGP/MIME Sign" mml-secure-message-sign-pgpmime t]
|
||||
["PGP/MIME Encrypt" mml-secure-message-encrypt-pgpmime t]
|
||||
["PGP Sign" mml-secure-message-sign-pgp t]
|
||||
["PGP Encrypt" mml-secure-message-encrypt-pgp t]
|
||||
["S/MIME Sign" mml-secure-message-sign-smime t]
|
||||
["S/MIME Encrypt" mml-secure-message-encrypt-smime t]
|
||||
("Secure MIME part"
|
||||
["PGP/MIME Sign Part" mml-secure-sign-pgpmime t]
|
||||
["PGP/MIME Encrypt Part" mml-secure-encrypt-pgpmime t]
|
||||
["PGP Sign Part" mml-secure-sign-pgp t]
|
||||
["PGP Encrypt Part" mml-secure-encrypt-pgp t]
|
||||
["S/MIME Sign Part" mml-secure-sign-smime t]
|
||||
["S/MIME Encrypt Part" mml-secure-encrypt-smime t])
|
||||
["Encrypt/Sign off" mml-unsecure-message t]
|
||||
["Attach Buffer..." mml-attach-buffer
|
||||
,@(if (featurep 'xemacs) '(t)
|
||||
'(:help "Attach a buffer to the outgoing MIME message"))]
|
||||
["Attach External..." mml-attach-external
|
||||
,@(if (featurep 'xemacs) '(t)
|
||||
'(:help "Attach reference to file"))]
|
||||
;;
|
||||
("Change Security Method"
|
||||
["PGP/MIME"
|
||||
(lambda () (interactive) (setq mml-secure-method "pgpmime"))
|
||||
,@(if (featurep 'xemacs) nil
|
||||
'(:help "Set Security Method to PGP/MIME"))
|
||||
:style radio
|
||||
:selected (equal mml-secure-method "pgpmime") ]
|
||||
["S/MIME"
|
||||
(lambda () (interactive) (setq mml-secure-method "smime"))
|
||||
,@(if (featurep 'xemacs) nil
|
||||
'(:help "Set Security Method to S/MIME"))
|
||||
:style radio
|
||||
:selected (equal mml-secure-method "smime") ]
|
||||
["Inline PGP"
|
||||
(lambda () (interactive) (setq mml-secure-method "pgp"))
|
||||
,@(if (featurep 'xemacs) nil
|
||||
'(:help "Set Security Method to inline PGP"))
|
||||
:style radio
|
||||
:selected (equal mml-secure-method "pgp") ] )
|
||||
;;
|
||||
["Sign Message" mml-secure-message-sign t]
|
||||
["Encrypt Message" mml-secure-message-encrypt t]
|
||||
["Sign and Encrypt Message" mml-secure-message-sign-encrypt t]
|
||||
["Encrypt/Sign off" mml-unsecure-message
|
||||
,@(if (featurep 'xemacs) '(t)
|
||||
'(:help "Don't Encrypt/Sign Message"))]
|
||||
;; Maybe we could remove these, because people who write MML most probably
|
||||
;; don't use the menu:
|
||||
["Insert Part..." mml-insert-part
|
||||
:active (message-in-body-p)]
|
||||
["Insert Multipart..." mml-insert-multipart
|
||||
:active (message-in-body-p)]
|
||||
;;
|
||||
;; Do we have separate encrypt and encrypt/sign commands for parts?
|
||||
["Sign Part" mml-secure-sign t]
|
||||
["Encrypt Part" mml-secure-encrypt t]
|
||||
;;["Narrow" mml-narrow-to-part t]
|
||||
["Quote MML" mml-quote-region t]
|
||||
["Quote MML in region" mml-quote-region
|
||||
:active (message-mark-active-p)
|
||||
,@(if (featurep 'xemacs) nil
|
||||
'(:help "Quote MML tags in region"))]
|
||||
["Validate MML" mml-validate t]
|
||||
["Preview" mml-preview t]
|
||||
"----"
|
||||
|
@ -957,8 +992,11 @@ See Info node `(emacs-mime)Composing'.
|
|||
(when (set (make-local-variable 'mml-mode)
|
||||
(if (null arg) (not mml-mode)
|
||||
(> (prefix-numeric-value arg) 0)))
|
||||
(gnus-add-minor-mode 'mml-mode " MML" mml-mode-map)
|
||||
(add-minor-mode 'mml-mode " MML" mml-mode-map)
|
||||
(easy-menu-add mml-menu mml-mode-map)
|
||||
(when (boundp 'dnd-protocol-alist)
|
||||
(set (make-local-variable 'dnd-protocol-alist)
|
||||
(append mml-dnd-protocol-alist dnd-protocol-alist)))
|
||||
(run-hooks 'mml-mode-hook)))
|
||||
|
||||
;;;
|
||||
|
@ -1056,6 +1094,36 @@ See Info node `(emacs-mime)Composing'.
|
|||
|
||||
;;; Attachment functions.
|
||||
|
||||
(defcustom mml-dnd-protocol-alist
|
||||
'(("^file:///" . mml-dnd-attach-file)
|
||||
("^file://" . dnd-open-file)
|
||||
("^file:" . mml-dnd-attach-file))
|
||||
"The functions to call when a drop in `mml-mode' is made.
|
||||
See `dnd-protocol-alist' for more information. When nil, behave
|
||||
as in other buffers."
|
||||
:type '(choice (repeat (cons (regexp) (function)))
|
||||
(const :tag "Behave as in other buffers" nil))
|
||||
:version "22.1" ;; Gnus 5.10.9
|
||||
:group 'message)
|
||||
|
||||
(defcustom mml-dnd-attach-options nil
|
||||
"Which options should be queried when attaching a file via drag and drop.
|
||||
|
||||
If it is a list, valid members are `type', `description' and
|
||||
`disposition'. `disposition' implies `type'. If it is nil,
|
||||
don't ask for options. If it is t, ask the user whether or not
|
||||
to specify options."
|
||||
:type '(choice
|
||||
(const :tag "Non" nil)
|
||||
(const :tag "Query" t)
|
||||
(list :value (type description disposition)
|
||||
(set :inline t
|
||||
(const type)
|
||||
(const description)
|
||||
(const disposition))))
|
||||
:version "22.1" ;; Gnus 5.10.9
|
||||
:group 'message)
|
||||
|
||||
(defun mml-attach-file (file &optional type description disposition)
|
||||
"Attach a file to the outgoing MIME message.
|
||||
The file is not inserted or encoded until you send the message with
|
||||
|
@ -1073,11 +1141,37 @@ body) or \"attachment\" (separate from the body)."
|
|||
(description (mml-minibuffer-read-description))
|
||||
(disposition (mml-minibuffer-read-disposition type)))
|
||||
(list file type description disposition)))
|
||||
(mml-insert-empty-tag 'part
|
||||
'type type
|
||||
'filename file
|
||||
'disposition (or disposition "attachment")
|
||||
'description description))
|
||||
(save-excursion
|
||||
(unless (message-in-body-p) (goto-char (point-max)))
|
||||
(mml-insert-empty-tag 'part
|
||||
'type type
|
||||
'filename file
|
||||
'disposition (or disposition "attachment")
|
||||
'description description)))
|
||||
|
||||
(defun mml-dnd-attach-file (uri action)
|
||||
"Attach a drag and drop file.
|
||||
|
||||
Ask for type, description or disposition according to
|
||||
`mml-dnd-attach-options'."
|
||||
(let ((file (dnd-get-local-file-name uri t)))
|
||||
(when (and file (file-regular-p file))
|
||||
(let ((mml-dnd-attach-options mml-dnd-attach-options)
|
||||
type description disposition)
|
||||
(setq mml-dnd-attach-options
|
||||
(when (and (eq mml-dnd-attach-options t)
|
||||
(not
|
||||
(y-or-n-p
|
||||
"Use default type, disposition and description? ")))
|
||||
'(type description disposition)))
|
||||
(when (or (memq 'type mml-dnd-attach-options)
|
||||
(memq 'disposition mml-dnd-attach-options))
|
||||
(setq type (mml-minibuffer-read-type file)))
|
||||
(when (memq 'description mml-dnd-attach-options)
|
||||
(setq description (mml-minibuffer-read-description)))
|
||||
(when (memq 'disposition mml-dnd-attach-options)
|
||||
(setq disposition (mml-minibuffer-read-disposition type)))
|
||||
(mml-attach-file file type description disposition)))))
|
||||
|
||||
(defun mml-attach-buffer (buffer &optional type description)
|
||||
"Attach a buffer to the outgoing MIME message.
|
||||
|
@ -1087,8 +1181,11 @@ See `mml-attach-file' for details of operation."
|
|||
(type (mml-minibuffer-read-type buffer "text/plain"))
|
||||
(description (mml-minibuffer-read-description)))
|
||||
(list buffer type description)))
|
||||
(mml-insert-empty-tag 'part 'type type 'buffer buffer
|
||||
'disposition "attachment" 'description description))
|
||||
(save-excursion
|
||||
(unless (message-in-body-p) (goto-char (point-max)))
|
||||
(mml-insert-empty-tag 'part 'type type 'buffer buffer
|
||||
'disposition "attachment"
|
||||
'description description)))
|
||||
|
||||
(defun mml-attach-external (file &optional type description)
|
||||
"Attach an external file into the buffer.
|
||||
|
@ -1099,8 +1196,10 @@ TYPE is the MIME type to use."
|
|||
(type (mml-minibuffer-read-type file))
|
||||
(description (mml-minibuffer-read-description)))
|
||||
(list file type description)))
|
||||
(mml-insert-empty-tag 'external 'type type 'name file
|
||||
'disposition "attachment" 'description description))
|
||||
(save-excursion
|
||||
(unless (message-in-body-p) (goto-char (point-max)))
|
||||
(mml-insert-empty-tag 'external 'type type 'name file
|
||||
'disposition "attachment" 'description description)))
|
||||
|
||||
(defun mml-insert-multipart (&optional type)
|
||||
(interactive (list (completing-read "Multipart type (default mixed): "
|
||||
|
|
|
@ -230,22 +230,22 @@
|
|||
|
||||
(defun mml1991-pgg-sign (cont)
|
||||
(let ((pgg-text-mode t)
|
||||
(pgg-default-user-id (or (message-options-get 'mml-sender)
|
||||
pgg-default-user-id))
|
||||
headers cte)
|
||||
;; Don't sign headers.
|
||||
(goto-char (point-min))
|
||||
(while (not (looking-at "^$"))
|
||||
(forward-line))
|
||||
(unless (eobp) ;; no headers?
|
||||
(when (re-search-forward "^$" nil t)
|
||||
(setq headers (buffer-substring (point-min) (point)))
|
||||
(forward-line) ;; skip header/body separator
|
||||
(delete-region (point-min) (point)))
|
||||
(when (string-match "^Content-Transfer-Encoding: \\(.+\\)" headers)
|
||||
(setq cte (intern (match-string 1 headers))))
|
||||
(mm-decode-content-transfer-encoding cte)
|
||||
(unless (let ((pgg-default-user-id
|
||||
(or (message-options-get 'mml-sender)
|
||||
pgg-default-user-id)))
|
||||
(pgg-sign-region (point-min) (point-max) t))
|
||||
(save-restriction
|
||||
(narrow-to-region (point-min) (point))
|
||||
(setq cte (mail-fetch-field "content-transfer-encoding")))
|
||||
(forward-line 1)
|
||||
(delete-region (point-min) (point))
|
||||
(when cte
|
||||
(setq cte (intern (downcase cte)))
|
||||
(mm-decode-content-transfer-encoding cte)))
|
||||
(unless (pgg-sign-region (point-min) (point-max) t)
|
||||
(pop-to-buffer pgg-errors-buffer)
|
||||
(error "Encrypt error"))
|
||||
(delete-region (point-min) (point-max))
|
||||
|
@ -254,7 +254,8 @@
|
|||
(goto-char (point-min))
|
||||
(while (re-search-forward "\r+$" nil t)
|
||||
(replace-match "" t t))
|
||||
(mm-encode-content-transfer-encoding cte)
|
||||
(when cte
|
||||
(mm-encode-content-transfer-encoding cte))
|
||||
(goto-char (point-min))
|
||||
(when headers
|
||||
(insert headers))
|
||||
|
@ -262,18 +263,18 @@
|
|||
t))
|
||||
|
||||
(defun mml1991-pgg-encrypt (cont &optional sign)
|
||||
(let ((pgg-text-mode t)
|
||||
cte)
|
||||
;; Strip MIME Content[^ ]: headers since it will be ASCII ARMOURED
|
||||
(goto-char (point-min))
|
||||
(while (looking-at "^Content[^ ]+:")
|
||||
(when (looking-at "^Content-Transfer-Encoding: \\(.+\\)")
|
||||
(setq cte (intern (match-string 1))))
|
||||
(forward-line))
|
||||
(unless (bobp)
|
||||
(delete-region (point-min) (point)))
|
||||
(mm-decode-content-transfer-encoding cte)
|
||||
(unless (pgg-encrypt-region
|
||||
(goto-char (point-min))
|
||||
(when (re-search-forward "^$" nil t)
|
||||
(let ((cte (save-restriction
|
||||
(narrow-to-region (point-min) (point))
|
||||
(mail-fetch-field "content-transfer-encoding"))))
|
||||
;; Strip MIME headers since it will be ASCII armoured.
|
||||
(forward-line 1)
|
||||
(delete-region (point-min) (point))
|
||||
(when cte
|
||||
(mm-decode-content-transfer-encoding (intern (downcase cte))))))
|
||||
(unless (let ((pgg-text-mode t))
|
||||
(pgg-encrypt-region
|
||||
(point-min) (point-max)
|
||||
(split-string
|
||||
(or
|
||||
|
@ -281,15 +282,13 @@
|
|||
(message-options-set 'message-recipients
|
||||
(read-string "Recipients: ")))
|
||||
"[ \f\t\n\r\v,]+")
|
||||
sign)
|
||||
(pop-to-buffer pgg-errors-buffer)
|
||||
(error "Encrypt error"))
|
||||
(delete-region (point-min) (point-max))
|
||||
;;(insert "Content-Type: application/pgp-encrypted\n\n")
|
||||
;;(insert "Version: 1\n\n")
|
||||
(insert "\n")
|
||||
(insert-buffer-substring pgg-output-buffer)
|
||||
t))
|
||||
sign))
|
||||
(pop-to-buffer pgg-errors-buffer)
|
||||
(error "Encrypt error"))
|
||||
(delete-region (point-min) (point-max))
|
||||
(insert "\n")
|
||||
(insert-buffer-substring pgg-output-buffer)
|
||||
t)
|
||||
|
||||
;;;###autoload
|
||||
(defun mml1991-encrypt (cont &optional sign)
|
||||
|
|
|
@ -707,6 +707,8 @@
|
|||
(buffer-string))))
|
||||
(progn
|
||||
(erase-buffer)
|
||||
;; Treat data which pgg returns as a unibyte string.
|
||||
(mm-disable-multibyte)
|
||||
(insert-buffer-substring pgg-output-buffer)
|
||||
(goto-char (point-min))
|
||||
(while (search-forward "\r\n" nil t)
|
||||
|
|
|
@ -307,8 +307,8 @@ Valid types include `google', `dejanews', and `gmane'.")
|
|||
(defun nnweb-google-wash-article ()
|
||||
;; We have Google's masked e-mail addresses here. :-/
|
||||
(let ((case-fold-search t)
|
||||
(start-re "<pre>\n *")
|
||||
(end-re "\n *</pre>"))
|
||||
(start-re "<pre>[\r\n ]*")
|
||||
(end-re "[\r\n ]*</pre>"))
|
||||
(goto-char (point-min))
|
||||
(if (save-excursion
|
||||
(or (re-search-forward "The requested message.*could not be found."
|
||||
|
|
|
@ -630,6 +630,7 @@ it is displayed along with the global value."
|
|||
(indirect-variable variable)
|
||||
(error variable)))
|
||||
(obsolete (get variable 'byte-obsolete-variable))
|
||||
(safe-var (get variable 'safe-local-variable))
|
||||
(doc (or (documentation-property variable 'variable-documentation)
|
||||
(documentation-property alias 'variable-documentation))))
|
||||
(unless (eq alias variable)
|
||||
|
@ -641,6 +642,11 @@ it is displayed along with the global value."
|
|||
(princ (if (stringp (car obsolete)) (car obsolete)
|
||||
(format "use `%s' instead." (car obsolete))))
|
||||
(terpri))
|
||||
(when safe-var
|
||||
(princ "This variable is safe to use as a file local variable")
|
||||
(princ (format " only if its value\nsatisfies the predicate `%s'.\n"
|
||||
safe-var))
|
||||
(terpri))
|
||||
(princ "Documentation:\n")
|
||||
(princ (or doc "Not documented as a variable.")))
|
||||
;; Make a link to customize if this variable can be customized.
|
||||
|
|
|
@ -197,7 +197,10 @@ Commands:
|
|||
(view-mode)
|
||||
(make-local-variable 'view-no-disable-on-exit)
|
||||
(setq view-no-disable-on-exit t)
|
||||
(setq view-exit-action (lambda (buffer) (delete-window)))
|
||||
(setq view-exit-action (lambda (buffer)
|
||||
(or (window-minibuffer-p (selected-window))
|
||||
(one-window-p t)
|
||||
(delete-window))))
|
||||
(run-mode-hooks 'help-mode-hook))
|
||||
|
||||
;;;###autoload
|
||||
|
|
|
@ -279,6 +279,35 @@ be determined."
|
|||
type))
|
||||
|
||||
|
||||
;;;###autoload
|
||||
(defun image-type (file-or-data &optional type data-p)
|
||||
"Determine and return image type.
|
||||
FILE-OR-DATA is an image file name or image data.
|
||||
Optional TYPE is a symbol describing the image type. If TYPE is omitted
|
||||
or nil, try to determine the image type from its first few bytes
|
||||
of image data. If that doesn't work, and FILE-OR-DATA is a file name,
|
||||
use its file extension as image type.
|
||||
Optional DATA-P non-nil means FILE-OR-DATA is a string containing image data."
|
||||
(when (and (not data-p) (not (stringp file-or-data)))
|
||||
(error "Invalid image file name `%s'" file-or-data))
|
||||
(cond ((null data-p)
|
||||
;; FILE-OR-DATA is a file name.
|
||||
(unless (or type
|
||||
(setq type (image-type-from-file-header file-or-data)))
|
||||
(let ((extension (file-name-extension file-or-data)))
|
||||
(unless extension
|
||||
(error "Cannot determine image type"))
|
||||
(setq type (intern extension)))))
|
||||
(t
|
||||
;; FILE-OR-DATA contains image data.
|
||||
(unless type
|
||||
(setq type (image-type-from-data file-or-data)))))
|
||||
(unless type
|
||||
(error "Cannot determine image type"))
|
||||
(unless (symbolp type)
|
||||
(error "Invalid image type `%s'" type))
|
||||
type)
|
||||
|
||||
;;;###autoload
|
||||
(defun image-type-available-p (type)
|
||||
"Return non-nil if image type TYPE is available.
|
||||
|
@ -301,24 +330,7 @@ like, e.g. `:mask MASK'.
|
|||
Value is the image created, or nil if images of type TYPE are not supported.
|
||||
|
||||
Images should not be larger than specified by `max-image-size'."
|
||||
(when (and (not data-p) (not (stringp file-or-data)))
|
||||
(error "Invalid image file name `%s'" file-or-data))
|
||||
(cond ((null data-p)
|
||||
;; FILE-OR-DATA is a file name.
|
||||
(unless (or type
|
||||
(setq type (image-type-from-file-header file-or-data)))
|
||||
(let ((extension (file-name-extension file-or-data)))
|
||||
(unless extension
|
||||
(error "Cannot determine image type"))
|
||||
(setq type (intern extension)))))
|
||||
(t
|
||||
;; FILE-OR-DATA contains image data.
|
||||
(unless type
|
||||
(setq type (image-type-from-data file-or-data)))))
|
||||
(unless type
|
||||
(error "Cannot determine image type"))
|
||||
(unless (symbolp type)
|
||||
(error "Invalid image type `%s'" type))
|
||||
(setq type (image-type file-or-data type data-p))
|
||||
(when (image-type-available-p type)
|
||||
(append (list 'image :type type (if data-p :data :file) file-or-data)
|
||||
props)))
|
||||
|
|
|
@ -1265,15 +1265,15 @@ or by the previous use of this command."
|
|||
"Specify coding system for keyboard input.
|
||||
If you set this on a terminal which can't distinguish Meta keys from
|
||||
8-bit characters, you will have to use ESC to type Meta characters.
|
||||
See Info node `Specify Coding' and Info node `Single-Byte Character Support'.
|
||||
See Info node `Terminal Coding' and Info node `Unibyte Mode'.
|
||||
|
||||
On non-windowing terminals, this is set from the locale by default.
|
||||
|
||||
Setting this variable directly does not take effect;
|
||||
use either \\[customize] or \\[set-keyboard-coding-system]."
|
||||
:type '(coding-system :tag "Coding system")
|
||||
:link '(info-link "(emacs)Specify Coding")
|
||||
:link '(info-link "(emacs)Single-Byte Character Support")
|
||||
:link '(info-link "(emacs)Terminal Coding")
|
||||
:link '(info-link "(emacs)Unibyte Mode")
|
||||
:set (lambda (symbol value)
|
||||
;; Don't load encoded-kbd-mode unnecessarily.
|
||||
(if (or value (boundp 'encoded-kbd-mode))
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
;; Copyright (C) 1999, 2000, 2002, 2003, 2004,
|
||||
;; 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Stefan Monnier <monnier@cs.yale.edu>
|
||||
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
;; Keywords: pcl-cvs cvs commit log
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
||||
;; 2006 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Stefan Monnier <monnier@cs.yale.edu>
|
||||
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
;; Keywords: rcs sccs cvs log version-control
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
|
|
@ -1,3 +1,40 @@
|
|||
2006-04-28 Bill Wohler <wohler@newt.com>
|
||||
|
||||
Release MH-E version 7.95.
|
||||
|
||||
* mh-e.el (Version, mh-version): Update for release 7.95.
|
||||
|
||||
2006-04-26 Eric Ding <ericding@alum.mit.edu>
|
||||
|
||||
* mh-e.el (mh-invisible-header-fields-internal): Add entry
|
||||
"X-Provags-ID:"
|
||||
|
||||
2006-04-25 Bill Wohler <wohler@newt.com>
|
||||
|
||||
* mh-letter.el (mh-folder-expand-at-point): Fix folder completion.
|
||||
Folders returned by mh-folder-completion-function no longer need
|
||||
adornment (closes SF #1476270).
|
||||
|
||||
2006-04-21 Bill Wohler <wohler@newt.com>
|
||||
|
||||
* mh-e.el (Version, mh-version): Add +cvs to version.
|
||||
|
||||
2006-04-21 Bill Wohler <wohler@newt.com>
|
||||
|
||||
Release MH-E version 7.94.
|
||||
|
||||
* mh-e.el (Version, mh-version): Update for release 7.94.
|
||||
|
||||
2006-04-21 Bill Wohler <wohler@newt.com>
|
||||
|
||||
* mh-letter.el (mh-insert-letter): If a message number isn't
|
||||
given, throw an error rather than using a potentially incorrect
|
||||
message number (closes SF #1473729). In addition, use the cur
|
||||
message if mh-sent-from-msg is nil (when sending a message, in
|
||||
contrast to replying). Move conversion of int to string into
|
||||
interactive stanza so body can assume variables are of proper
|
||||
type.
|
||||
|
||||
2006-04-20 Bill Wohler <wohler@newt.com>
|
||||
|
||||
* mh-tool-bar.el (image-load-path): Define to shush compiler.
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
;; Author: Bill Wohler <wohler@newt.com>
|
||||
;; Maintainer: Bill Wohler <wohler@newt.com>
|
||||
;; Version: 7.93+cvs
|
||||
;; Version: 7.95
|
||||
;; Keywords: mail
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
@ -136,7 +136,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.93+cvs" "Version number of MH-E.")
|
||||
(defconst mh-version "7.95" "Version number of MH-E.")
|
||||
|
||||
;; Variants
|
||||
|
||||
|
@ -2526,6 +2526,7 @@ of citations entirely, choose \"None\"."
|
|||
"X-Originating-IP:" ; Hotmail
|
||||
"X-Postfilter:"
|
||||
"X-Priority:" ; MS Outlook
|
||||
"X-Provags-ID:"
|
||||
"X-Qotd-" ; User added
|
||||
"X-RM"
|
||||
"X-Received-Date:"
|
||||
|
|
|
@ -393,24 +393,26 @@ message is not indented, and \"> \" is not inserted before each line.
|
|||
This command leaves the mark before the letter and point after it."
|
||||
(interactive
|
||||
(let* ((folder
|
||||
(mh-prompt-for-folder "Message from"
|
||||
mh-sent-from-folder nil))
|
||||
(mh-prompt-for-folder "Message from" mh-sent-from-folder nil))
|
||||
(default
|
||||
(if (and (equal folder mh-sent-from-folder)
|
||||
(numberp mh-sent-from-msg))
|
||||
mh-sent-from-msg
|
||||
(if (equal folder mh-sent-from-folder)
|
||||
(or mh-sent-from-msg (nth 0 (mh-translate-range folder "cur")))
|
||||
(nth 0 (mh-translate-range folder "cur"))))
|
||||
(message
|
||||
(read-string (concat "Message number"
|
||||
(or (and default
|
||||
(format " (default %d): " default))
|
||||
": ")))))
|
||||
": "))
|
||||
nil nil
|
||||
(if (numberp default)
|
||||
(int-to-string default)
|
||||
default))))
|
||||
(list folder message current-prefix-arg)))
|
||||
(if (equal message "")
|
||||
(error "No message number given"))
|
||||
(save-restriction
|
||||
(narrow-to-region (point) (point))
|
||||
(let ((start (point-min)))
|
||||
(if (and (equal message "") (numberp mh-sent-from-msg))
|
||||
(setq message (int-to-string mh-sent-from-msg)))
|
||||
(insert-file-contents
|
||||
(expand-file-name message (mh-expand-file-name folder)))
|
||||
(when (not verbatim)
|
||||
|
@ -864,15 +866,12 @@ downcasing the field name."
|
|||
"Do folder name completion in Fcc header field."
|
||||
(let* ((end (point))
|
||||
(beg (mh-beginning-of-word))
|
||||
(folder (buffer-substring beg end))
|
||||
(folder (buffer-substring-no-properties beg end))
|
||||
(leading-plus (and (> (length folder) 0) (equal (aref folder 0) ?+)))
|
||||
(last-slash (mh-search-from-end ?/ folder))
|
||||
(prefix (and last-slash (substring folder 0 last-slash)))
|
||||
(choices (mapcar #'(lambda (x)
|
||||
(list (cond (prefix (format "%s/%s" prefix x))
|
||||
(leading-plus (format "+%s" x))
|
||||
(t x))))
|
||||
(choices (mapcar (lambda (x) (list x))
|
||||
(mh-folder-completion-function folder nil t))))
|
||||
(unless leading-plus
|
||||
(setq folder (concat "+" folder)))
|
||||
(mh-complete-word folder choices beg end)))
|
||||
|
||||
;;;###mh-autoload
|
||||
|
|
|
@ -74,13 +74,13 @@
|
|||
:group 'rcirc)
|
||||
|
||||
(defcustom rcirc-default-user-full-name (if (string= (user-full-name) "")
|
||||
rcirc-user-name
|
||||
(user-full-name))
|
||||
rcirc-user-name
|
||||
(user-full-name))
|
||||
"The full name sent to the server when connecting."
|
||||
:type 'string
|
||||
:group 'rcirc)
|
||||
|
||||
(defcustom rcirc-startup-channels-alist '(("^irc.freenode.net$" "#emacs"))
|
||||
(defcustom rcirc-startup-channels-alist '(("^irc.freenode.net$" "#rcirc"))
|
||||
"Alist of channels to join at startup.
|
||||
Each element looks like (SERVER-REGEXP . CHANNEL-LIST)."
|
||||
:type '(alist :key-type string :value-type (repeat string))
|
||||
|
@ -206,6 +206,18 @@ When an ignored person renames, their nick is added to both lists.
|
|||
Nicks will be removed from the automatic list on follow-up renamings or
|
||||
parts.")
|
||||
|
||||
(defcustom rcirc-bright-nick-regexp nil
|
||||
"Regexp matching nicks to be emphasized.
|
||||
See `rcirc-bright-nick' face."
|
||||
:type 'regexp
|
||||
:group 'rcirc)
|
||||
|
||||
(defcustom rcirc-dim-nick-regexp nil
|
||||
"Regexp matching nicks to be deemphasized.
|
||||
See `rcirc-dim-nick' face."
|
||||
:type 'regexp
|
||||
:group 'rcirc)
|
||||
|
||||
(defcustom rcirc-print-hooks nil
|
||||
"Hook run after text is printed.
|
||||
Called with 5 arguments, PROCESS, SENDER, RESPONSE, TARGET and TEXT."
|
||||
|
@ -217,7 +229,7 @@ Called with 5 arguments, PROCESS, SENDER, RESPONSE, TARGET and TEXT."
|
|||
:type 'boolean
|
||||
:group 'rcirc)
|
||||
|
||||
(defcustom rcirc-decode-coding-system 'undecided
|
||||
(defcustom rcirc-decode-coding-system 'utf-8
|
||||
"Coding system used to decode incoming irc messages."
|
||||
:type 'coding-system
|
||||
:group 'rcirc)
|
||||
|
@ -546,7 +558,7 @@ With no argument or nil as argument, use the current buffer."
|
|||
(with-current-buffer rcirc-server-buffer
|
||||
(or rcirc-nick rcirc-default-nick))))
|
||||
|
||||
(defvar rcirc-max-message-length 450
|
||||
(defvar rcirc-max-message-length 420
|
||||
"Messages longer than this value will be split.")
|
||||
|
||||
(defun rcirc-send-message (process target message &optional noticep)
|
||||
|
@ -955,7 +967,8 @@ Create the buffer if it doesn't exist."
|
|||
:global nil
|
||||
:group 'rcirc
|
||||
(make-local-variable 'rcirc-parent-buffer)
|
||||
(put 'rcirc-parent-buffer 'permanent-local t))
|
||||
(put 'rcirc-parent-buffer 'permanent-local t)
|
||||
(setq fill-column rcirc-max-message-length))
|
||||
|
||||
(defun rcirc-multiline-minor-submit ()
|
||||
"Send the text in buffer back to parent buffer."
|
||||
|
@ -1029,6 +1042,7 @@ is found by looking up RESPONSE in `rcirc-response-formats'."
|
|||
(split-string (or (cdr (assoc response rcirc-response-formats))
|
||||
(cdr (assq t rcirc-response-formats)))
|
||||
"%"))
|
||||
(sender (or sender ""))
|
||||
(result "")
|
||||
(face nil)
|
||||
key face-key repl)
|
||||
|
@ -1054,9 +1068,16 @@ is found by looking up RESPONSE in `rcirc-response-formats'."
|
|||
(rcirc-facify nick
|
||||
(if (eq key ?n)
|
||||
face
|
||||
(if (string= sender (rcirc-nick process))
|
||||
'rcirc-my-nick
|
||||
'rcirc-other-nick)))))
|
||||
(cond ((string= sender (rcirc-nick process))
|
||||
'rcirc-my-nick)
|
||||
((and rcirc-bright-nick-regexp
|
||||
(string-match rcirc-bright-nick-regexp sender))
|
||||
'rcirc-bright-nick)
|
||||
((and rcirc-dim-nick-regexp
|
||||
(string-match rcirc-dim-nick-regexp sender))
|
||||
'rcirc-dim-nick)
|
||||
(t
|
||||
'rcirc-other-nick))))))
|
||||
((eq key ?T)
|
||||
;; %T -- timestamp
|
||||
(rcirc-facify
|
||||
|
@ -1130,8 +1151,9 @@ record activity."
|
|||
(or text (setq text ""))
|
||||
(unless (or (member sender rcirc-ignore-list)
|
||||
(member (with-syntax-table rcirc-nick-syntax-table
|
||||
(when (string-match "^\\([^/]\\w*\\)\\b" text)
|
||||
(match-string 1 text))) rcirc-ignore-list))
|
||||
(when (string-match "^\\([^/]\\w*\\)[:,]" text)
|
||||
(match-string 1 text)))
|
||||
rcirc-ignore-list))
|
||||
(let* ((buffer (rcirc-target-buffer process sender response target text))
|
||||
(inhibit-read-only t))
|
||||
(with-current-buffer buffer
|
||||
|
@ -1222,10 +1244,12 @@ record activity."
|
|||
(regexp-quote (rcirc-nick process))
|
||||
"\\b")
|
||||
text)))
|
||||
(when (or (not rcirc-ignore-buffer-activity-flag)
|
||||
;; always notice when our nick is mentioned, even
|
||||
;; if ignoring channel activity
|
||||
nick-match)
|
||||
(when (if rcirc-ignore-buffer-activity-flag
|
||||
;; - Always notice when our nick is mentioned
|
||||
nick-match
|
||||
;; - Never bother us if a dim-nick spoke
|
||||
(not (and rcirc-dim-nick-regexp sender
|
||||
(string-match rcirc-dim-nick-regexp sender))))
|
||||
(rcirc-record-activity
|
||||
(current-buffer)
|
||||
(when (or nick-match (and (not (rcirc-channel-p rcirc-target))
|
||||
|
@ -1375,7 +1399,7 @@ if NICK is also on `rcirc-ignore-list-automatic'."
|
|||
(force-mode-line-update))
|
||||
|
||||
(defun rcirc-toggle-low-priority ()
|
||||
"Toggle the value of `rcirc-ignore-buffer-activity-flag'."
|
||||
"Toggle the value of `rcirc-low-priority-flag'."
|
||||
(interactive)
|
||||
(setq rcirc-low-priority-flag
|
||||
(not rcirc-low-priority-flag))
|
||||
|
@ -1788,7 +1812,7 @@ ones added to the list automatically are marked with an asterisk."
|
|||
|
||||
(defun rcirc-browse-url (&optional arg)
|
||||
"Prompt for URL to browse based on URLs in buffer."
|
||||
(interactive)
|
||||
(interactive "P")
|
||||
(let ((completions (mapcar (lambda (x) (cons x nil)) rcirc-urls))
|
||||
(initial-input (car rcirc-urls))
|
||||
(history (cdr rcirc-urls)))
|
||||
|
@ -1910,7 +1934,7 @@ FUNCTION takes 3 arguments, MATCH-START, MATCH-END, and STRING."
|
|||
(cond ((rcirc-channel-p target)
|
||||
target)
|
||||
;;; -ChanServ- [#gnu] Welcome...
|
||||
((string-match "^\\[\\(#[^ ]+\\)\\]" message)
|
||||
((string-match "\\[\\(#[^\] ]+\\)\\]" message)
|
||||
(match-string 1 message))
|
||||
(sender
|
||||
(if (string= sender (rcirc-server-name process))
|
||||
|
@ -2211,6 +2235,25 @@ Passwords are stored in `rcirc-authinfo' (which see)."
|
|||
"The face used to highlight other messages."
|
||||
:group 'rcirc-faces)
|
||||
|
||||
(defface rcirc-bright-nick
|
||||
'((((class grayscale) (background light))
|
||||
(:foreground "LightGray" :weight bold :underline t))
|
||||
(((class grayscale) (background dark))
|
||||
(:foreground "Gray50" :weight bold :underline t))
|
||||
(((class color) (min-colors 88) (background light)) (:foreground "CadetBlue"))
|
||||
(((class color) (min-colors 88) (background dark)) (:foreground "Aquamarine"))
|
||||
(((class color) (min-colors 16) (background light)) (:foreground "CadetBlue"))
|
||||
(((class color) (min-colors 16) (background dark)) (:foreground "Aquamarine"))
|
||||
(((class color) (min-colors 8)) (:foreground "magenta"))
|
||||
(t (:weight bold :underline t)))
|
||||
"Face used for nicks matched by `rcirc-bright-nick-regexp'."
|
||||
:group 'rcirc-faces)
|
||||
|
||||
(defface rcirc-dim-nick
|
||||
'((t :inherit default))
|
||||
"Face used for nicks matched by `rcirc-dim-nick-regexp'."
|
||||
:group 'rcirc-faces)
|
||||
|
||||
(defface rcirc-server ; font-lock-comment-face
|
||||
'((((class grayscale) (background light))
|
||||
(:foreground "DimGray" :weight bold :slant italic))
|
||||
|
|
|
@ -1821,8 +1821,6 @@ while (my $data = <STDIN>) {
|
|||
Escape sequence %s is replaced with name of Perl binary.
|
||||
This string is passed to `format', so percent characters need to be doubled.")
|
||||
|
||||
; These values conform to `file-attributes' from XEmacs 21.2.
|
||||
; GNU Emacs and other tools not checked.
|
||||
(defconst tramp-file-mode-type-map '((0 . "-") ; Normal file (SVID-v2 and XPG2)
|
||||
(1 . "p") ; fifo
|
||||
(2 . "c") ; character device
|
||||
|
@ -1927,17 +1925,12 @@ on the FILENAME argument, even if VISIT was a string.")
|
|||
"Alist of handler functions.
|
||||
Operations not mentioned here will be handled by the normal Emacs functions.")
|
||||
|
||||
;; Handlers for partial tramp file names. For GNU Emacs just
|
||||
;; `file-name-all-completions' is needed. The other ones are necessary
|
||||
;; for XEmacs.
|
||||
;; Handlers for partial tramp file names. For Emacs just
|
||||
;; `file-name-all-completions' is needed.
|
||||
;;;###autoload
|
||||
(defconst tramp-completion-file-name-handler-alist
|
||||
'(
|
||||
(file-name-directory . tramp-completion-handle-file-name-directory)
|
||||
(file-name-nondirectory . tramp-completion-handle-file-name-nondirectory)
|
||||
(file-exists-p . tramp-completion-handle-file-exists-p)
|
||||
(file-name-all-completions . tramp-completion-handle-file-name-all-completions)
|
||||
(file-name-completion . tramp-completion-handle-file-name-completion)
|
||||
(expand-file-name . tramp-completion-handle-expand-file-name))
|
||||
'((file-name-all-completions . tramp-completion-handle-file-name-all-completions)
|
||||
(file-name-completion . tramp-completion-handle-file-name-completion))
|
||||
"Alist of completion handler functions.
|
||||
Used for file names matching `tramp-file-name-regexp'. Operations not
|
||||
mentioned here will be handled by `tramp-file-name-handler-alist' or the
|
||||
|
@ -2172,28 +2165,11 @@ target of the symlink differ."
|
|||
;; Localname manipulation functions that grok TRAMP localnames...
|
||||
(defun tramp-handle-file-name-directory (file)
|
||||
"Like `file-name-directory' but aware of TRAMP files."
|
||||
;; everything except the last filename thing is the directory
|
||||
;; Everything except the last filename thing is the directory.
|
||||
(with-parsed-tramp-file-name file nil
|
||||
;; For the following condition, two possibilities should be tried:
|
||||
;; (1) (string= localname "")
|
||||
;; (2) (or (string= localname "") (string= localname "/"))
|
||||
;; The second variant fails when completing a "/" directory on
|
||||
;; the remote host, that is a filename which looks like
|
||||
;; "/user@host:/". But maybe wildcards fail with the first variant.
|
||||
;; We should do some investigation.
|
||||
(if (string= localname "")
|
||||
;; For a filename like "/[foo]", we return "/". The `else'
|
||||
;; case would return "/[foo]" unchanged. But if we do that,
|
||||
;; then `file-expand-wildcards' ceases to work. It's not
|
||||
;; quite clear to me what's the intuition that tells that this
|
||||
;; behavior is the right behavior, but oh, well.
|
||||
"/"
|
||||
;; run the command on the localname portion only
|
||||
;; CCC: This should take into account the remote machine type, no?
|
||||
;; --daniel <daniel@danann.net>
|
||||
(tramp-make-tramp-file-name multi-method method user host
|
||||
;; This will not recurse...
|
||||
(or (file-name-directory localname) "")))))
|
||||
;; Run the command on the localname portion only.
|
||||
(tramp-make-tramp-file-name
|
||||
multi-method method user host (file-name-directory (or localname "")))))
|
||||
|
||||
(defun tramp-handle-file-name-nondirectory (file)
|
||||
"Like `file-name-nondirectory' but aware of TRAMP files."
|
||||
|
@ -4144,7 +4120,8 @@ Returns a file name in `tramp-auto-save-directory' for autosaving this file."
|
|||
;; (inhibit-file-name-operation operation))
|
||||
;; (apply operation args)))
|
||||
|
||||
(defun tramp-run-real-handler (operation args)
|
||||
;;;###autoload
|
||||
(progn (defun tramp-run-real-handler (operation args)
|
||||
"Invoke normal file name handler for OPERATION.
|
||||
First arg specifies the OPERATION, second arg is a list of arguments to
|
||||
pass to the OPERATION."
|
||||
|
@ -4157,13 +4134,14 @@ pass to the OPERATION."
|
|||
,(and (eq inhibit-file-name-operation operation)
|
||||
inhibit-file-name-handlers)))
|
||||
(inhibit-file-name-operation operation))
|
||||
(apply operation args)))
|
||||
(apply operation args))))
|
||||
|
||||
;; This function is used from `tramp-completion-file-name-handler' functions
|
||||
;; only, if `tramp-completion-mode' is true. But this cannot be checked here
|
||||
;; because the check is based on a full filename, not available for all
|
||||
;; basic I/O operations.
|
||||
(defun tramp-completion-run-real-handler (operation args)
|
||||
;;;###autoload
|
||||
(progn (defun tramp-completion-run-real-handler (operation args)
|
||||
"Invoke `tramp-file-name-handler' for OPERATION.
|
||||
First arg specifies the OPERATION, second arg is a list of arguments to
|
||||
pass to the OPERATION."
|
||||
|
@ -4175,7 +4153,7 @@ pass to the OPERATION."
|
|||
,(and (eq inhibit-file-name-operation operation)
|
||||
inhibit-file-name-handlers)))
|
||||
(inhibit-file-name-operation operation))
|
||||
(apply operation args)))
|
||||
(apply operation args))))
|
||||
|
||||
;; We handle here all file primitives. Most of them have the file
|
||||
;; name as first parameter; nevertheless we check for them explicitly
|
||||
|
@ -4272,12 +4250,25 @@ ARGS are the arguments OPERATION has been called with."
|
|||
(defun tramp-file-name-handler (operation &rest args)
|
||||
"Invoke Tramp file name handler.
|
||||
Falls back to normal file name handler if no tramp file name handler exists."
|
||||
;; (setq edebug-trace t)
|
||||
;; (edebug-trace "%s" (with-output-to-string (backtrace)))
|
||||
(save-match-data
|
||||
(let* ((filename (apply 'tramp-file-name-for-operation operation args))
|
||||
(completion (tramp-completion-mode filename))
|
||||
(foreign (tramp-find-foreign-file-name-handler filename)))
|
||||
(cond
|
||||
(foreign (apply foreign operation args))
|
||||
(t (tramp-run-real-handler operation args))))))
|
||||
(with-parsed-tramp-file-name filename nil
|
||||
(cond
|
||||
;; When we are in completion mode, some operations shouldn' be
|
||||
;; handled by backend.
|
||||
((and completion (memq operation '(expand-file-name)))
|
||||
(tramp-run-real-handler operation args))
|
||||
((and completion (zerop (length localname))
|
||||
(memq operation '(file-exists-p file-directory-p)))
|
||||
t)
|
||||
;; Call the backend function.
|
||||
(foreign (apply foreign operation args))
|
||||
;; Nothing to do for us.
|
||||
(t (tramp-run-real-handler operation args)))))))
|
||||
|
||||
|
||||
;; In Emacs, there is some concurrency due to timers. If a timer
|
||||
|
@ -4325,31 +4316,43 @@ Fall back to normal file name handler if no Tramp handler exists."
|
|||
(setq tramp-locked tl))))
|
||||
|
||||
;;;###autoload
|
||||
(defun tramp-completion-file-name-handler (operation &rest args)
|
||||
(progn (defun tramp-completion-file-name-handler (operation &rest args)
|
||||
"Invoke tramp file name completion handler.
|
||||
Falls back to normal file name handler if no tramp file name handler exists."
|
||||
;; (setq tramp-debug-buffer t)
|
||||
;; (tramp-message 1 "%s %s" operation args)
|
||||
;; (tramp-message 1 "%s %s\n%s"
|
||||
;; operation args (with-output-to-string (backtrace)))
|
||||
;; (setq edebug-trace t)
|
||||
;; (edebug-trace "%s" (with-output-to-string (backtrace)))
|
||||
(let ((fn (assoc operation tramp-completion-file-name-handler-alist)))
|
||||
(if fn
|
||||
(save-match-data (apply (cdr fn) args))
|
||||
(tramp-completion-run-real-handler operation args))))
|
||||
(tramp-completion-run-real-handler operation args)))))
|
||||
|
||||
;;;###autoload
|
||||
(put 'tramp-completion-file-name-handler 'safe-magic t)
|
||||
(defsubst tramp-register-file-name-handlers ()
|
||||
"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
|
||||
(add-to-list 'file-name-handler-alist
|
||||
(cons tramp-completion-file-name-regexp
|
||||
'tramp-completion-file-name-handler))
|
||||
(put 'tramp-completion-file-name-handler 'safe-magic t))
|
||||
;; If jka-compr is already loaded, move it to the front of
|
||||
;; `file-name-handler-alist'.
|
||||
(let ((jka (rassoc 'jka-compr-handler file-name-handler-alist)))
|
||||
(when jka
|
||||
(setq file-name-handler-alist
|
||||
(cons jka (delete jka file-name-handler-alist))))))
|
||||
|
||||
;; Register in file name handler alist
|
||||
;;;###autoload
|
||||
(add-to-list 'file-name-handler-alist
|
||||
(cons tramp-file-name-regexp 'tramp-file-name-handler))
|
||||
(add-to-list 'file-name-handler-alist
|
||||
(cons tramp-completion-file-name-regexp
|
||||
'tramp-completion-file-name-handler))
|
||||
;; During autoload, it shall be checked whether
|
||||
;; `partial-completion-mode' is active. Therefore registering will be
|
||||
;; delayed.
|
||||
;;;###autoload(add-hook
|
||||
;;;###autoload 'after-init-hook
|
||||
;;;###autoload '(lambda () (tramp-register-file-name-handlers)))
|
||||
(tramp-register-file-name-handlers)
|
||||
|
||||
;;;###autoload
|
||||
(defun tramp-unload-file-name-handler-alist ()
|
||||
(defun tramp-unload-file-name-handlers ()
|
||||
(setq file-name-handler-alist
|
||||
(delete (rassoc 'tramp-file-name-handler
|
||||
file-name-handler-alist)
|
||||
|
@ -4357,17 +4360,7 @@ Falls back to normal file name handler if no tramp file name handler exists."
|
|||
file-name-handler-alist)
|
||||
file-name-handler-alist))))
|
||||
|
||||
(add-hook 'tramp-unload-hook 'tramp-unload-file-name-handler-alist)
|
||||
|
||||
(defun tramp-repair-jka-compr ()
|
||||
"If jka-compr is already loaded, move it to the front of
|
||||
`file-name-handler-alist'. On Emacs 22 or so this will not be
|
||||
necessary anymore."
|
||||
(let ((jka (rassoc 'jka-compr-handler file-name-handler-alist)))
|
||||
(when jka
|
||||
(setq file-name-handler-alist
|
||||
(cons jka (delete jka file-name-handler-alist))))))
|
||||
(tramp-repair-jka-compr)
|
||||
(add-hook 'tramp-unload-hook 'tramp-unload-file-name-handlers)
|
||||
|
||||
|
||||
;;; Interactions with other packages:
|
||||
|
@ -4482,31 +4475,10 @@ necessary anymore."
|
|||
last-input-event) ?\ ))))))
|
||||
t)))
|
||||
|
||||
(defun tramp-completion-handle-file-exists-p (filename)
|
||||
"Like `file-exists-p' for tramp files."
|
||||
(if (tramp-completion-mode filename)
|
||||
(tramp-run-real-handler
|
||||
'file-exists-p (list filename))
|
||||
(tramp-completion-run-real-handler
|
||||
'file-exists-p (list filename))))
|
||||
|
||||
;; Localname manipulation in case of partial TRAMP file names.
|
||||
(defun tramp-completion-handle-file-name-directory (file)
|
||||
"Like `file-name-directory' but aware of TRAMP files."
|
||||
(if (tramp-completion-mode file)
|
||||
"/"
|
||||
(tramp-completion-run-real-handler
|
||||
'file-name-directory (list file))))
|
||||
|
||||
;; Localname manipulation in case of partial TRAMP file names.
|
||||
(defun tramp-completion-handle-file-name-nondirectory (file)
|
||||
"Like `file-name-nondirectory' but aware of TRAMP files."
|
||||
(substring
|
||||
file (length (tramp-completion-handle-file-name-directory file))))
|
||||
|
||||
;; Method, host name and user name completion.
|
||||
;; `tramp-completion-dissect-file-name' returns a list of
|
||||
;; tramp-file-name structures. For all of them we return possible completions.
|
||||
;;;###autoload
|
||||
(defun tramp-completion-handle-file-name-all-completions (filename directory)
|
||||
"Like `file-name-all-completions' for partial tramp files."
|
||||
|
||||
|
@ -4561,7 +4533,8 @@ necessary anymore."
|
|||
;; unify list, remove nil elements
|
||||
(while result
|
||||
(let ((car (car result)))
|
||||
(when car (add-to-list 'result1 car))
|
||||
(when car (add-to-list
|
||||
'result1 (substring car (length directory))))
|
||||
(setq result (cdr result))))
|
||||
|
||||
;; Complete local parts
|
||||
|
@ -4580,6 +4553,7 @@ necessary anymore."
|
|||
(setq tramp-completion-mode nil)))
|
||||
|
||||
;; Method, host name and user name completion for a file.
|
||||
;;;###autoload
|
||||
(defun tramp-completion-handle-file-name-completion (filename directory)
|
||||
"Like `file-name-completion' for tramp files."
|
||||
(try-completion filename
|
||||
|
@ -4706,8 +4680,7 @@ remote host and localname (filename on remote host)."
|
|||
(lambda (method)
|
||||
(and method
|
||||
(string-match (concat "^" (regexp-quote partial-method)) method)
|
||||
;; we must remove leading "/".
|
||||
(substring (tramp-make-tramp-file-name nil method nil nil nil) 1)))
|
||||
(tramp-make-tramp-file-name nil method nil nil nil)))
|
||||
(delete "multi" (mapcar 'car tramp-methods))))
|
||||
|
||||
;; Compares partial user and host names with possible completions.
|
||||
|
@ -4740,8 +4713,7 @@ PARTIAL-USER must match USER, PARTIAL-HOST must match HOST."
|
|||
host nil)))
|
||||
|
||||
(unless (zerop (+ (length user) (length host)))
|
||||
;; we must remove leading "/".
|
||||
(substring (tramp-make-tramp-file-name nil method user host nil) 1)))
|
||||
(tramp-make-tramp-file-name nil method user host nil)))
|
||||
|
||||
(defun tramp-parse-rhosts (filename)
|
||||
"Return a list of (user host) tuples allowed to access.
|
||||
|
@ -4960,15 +4932,6 @@ User may be nil."
|
|||
(forward-line 1)
|
||||
result))
|
||||
|
||||
(defun tramp-completion-handle-expand-file-name (name &optional dir)
|
||||
"Like `expand-file-name' for tramp files."
|
||||
(let ((fullname (concat (or dir default-directory) name)))
|
||||
(if (tramp-completion-mode fullname)
|
||||
(tramp-run-real-handler
|
||||
'expand-file-name (list name dir))
|
||||
(tramp-completion-run-real-handler
|
||||
'expand-file-name (list name dir)))))
|
||||
|
||||
;;; Internal Functions:
|
||||
|
||||
(defun tramp-maybe-send-perl-script (multi-method method user host script name)
|
||||
|
@ -7629,7 +7592,7 @@ Therefore, the contents of files might be included in the debug buffer(s).")
|
|||
(defun tramp-unload-tramp ()
|
||||
(interactive)
|
||||
;; When Tramp is not loaded yet, its autoloads are still active.
|
||||
(tramp-unload-file-name-handler-alist)
|
||||
(tramp-unload-file-name-handlers)
|
||||
;; ange-ftp settings must be enabled.
|
||||
(when (functionp 'tramp-ftp-enable-ange-ftp)
|
||||
(funcall (symbol-function 'tramp-ftp-enable-ange-ftp)))
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
;; 2000, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Stefan Monnier <monnier@cs.yale.edu>
|
||||
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
;; Keywords: pcl-cvs
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
;; 2000, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Stefan Monnier <monnier@cs.yale.edu>
|
||||
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
;; Keywords: pcl-cvs
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
;; 2000, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Stefan Monnier <monnier@cs.yale.edu>
|
||||
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
;; Keywords: pcl-cvs
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
;; 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Stefan Monnier <monnier@cs.yale.edu>
|
||||
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
;; Keywords: pcl-cvs
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
|
|
@ -829,7 +829,7 @@ in the grammar's actions and semantic predicates, see
|
|||
`antlr-font-lock-maximum-decoration'.")
|
||||
|
||||
(defvar antlr-default-face 'antlr-default)
|
||||
(defface antlr-default nil
|
||||
(defface antlr-default '((t nil))
|
||||
"Face to prevent strings from language dependent highlighting.
|
||||
Do not change."
|
||||
:group 'antlr)
|
||||
|
|
|
@ -62,9 +62,9 @@
|
|||
|
||||
(defvar asm-mode-syntax-table
|
||||
(let ((st (make-syntax-table)))
|
||||
(modify-syntax-entry ?\n ">" st)
|
||||
(modify-syntax-entry ?/ ". 14b" st)
|
||||
(modify-syntax-entry ?* ". 23b" st)
|
||||
(modify-syntax-entry ?\n "> b" st)
|
||||
(modify-syntax-entry ?/ ". 124b" st)
|
||||
(modify-syntax-entry ?* ". 23" st)
|
||||
st)
|
||||
"Syntax table used while in Asm mode.")
|
||||
|
||||
|
@ -136,14 +136,14 @@ Special commands:
|
|||
(use-local-map (nconc (make-sparse-keymap) asm-mode-map))
|
||||
(local-set-key (vector asm-comment-char) 'asm-comment)
|
||||
(set-syntax-table (make-syntax-table asm-mode-syntax-table))
|
||||
(modify-syntax-entry asm-comment-char "<")
|
||||
(modify-syntax-entry asm-comment-char "< b")
|
||||
|
||||
(make-local-variable 'comment-start)
|
||||
(setq comment-start (string asm-comment-char))
|
||||
(make-local-variable 'comment-add)
|
||||
(setq comment-add 1)
|
||||
(make-local-variable 'comment-start-skip)
|
||||
(setq comment-start-skip "\\(?:\\s<+\\|/\\*+\\)[ \t]*")
|
||||
(setq comment-start-skip "\\(?:\\s<+\\|/[/*]+\\)[ \t]*")
|
||||
(make-local-variable 'comment-end-skip)
|
||||
(setq comment-end-skip "[ \t]*\\(\\s>\\|\\*+/\\)")
|
||||
(make-local-variable 'comment-end)
|
||||
|
|
|
@ -91,8 +91,8 @@
|
|||
;; Don't complain about the `define-minor-mode' form if it isn't defined.
|
||||
(cc-bytecomp-defvar c-subword-mode)
|
||||
|
||||
;;; Autoload directives must be on the top level, so we construct an
|
||||
;;; autoload form instead.
|
||||
;; Autoload directives must be on the top level, so we construct an
|
||||
;; autoload form instead.
|
||||
;;;###autoload (autoload 'c-subword-mode "cc-subword" "Mode enabling subword movement and editing keys." t)
|
||||
|
||||
(if (not (fboundp 'define-minor-mode))
|
||||
|
@ -107,36 +107,19 @@ telling us which (X)Emacs version you're using."
|
|||
|
||||
(defvar c-subword-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(substitute-key-definition 'forward-word
|
||||
'c-forward-subword
|
||||
map global-map)
|
||||
(substitute-key-definition 'backward-word
|
||||
'c-backward-subword
|
||||
map global-map)
|
||||
(substitute-key-definition 'mark-word
|
||||
'c-mark-subword
|
||||
map global-map)
|
||||
|
||||
(substitute-key-definition 'kill-word
|
||||
'c-kill-subword
|
||||
map global-map)
|
||||
(substitute-key-definition 'backward-kill-word
|
||||
'c-backward-kill-subword
|
||||
map global-map)
|
||||
|
||||
(substitute-key-definition 'transpose-words
|
||||
'c-transpose-subwords
|
||||
map global-map)
|
||||
|
||||
(substitute-key-definition 'capitalize-word
|
||||
'c-capitalize-subword
|
||||
map global-map)
|
||||
(substitute-key-definition 'upcase-word
|
||||
'c-upcase-subword
|
||||
map global-map)
|
||||
(substitute-key-definition 'downcase-word
|
||||
'c-downcase-subword
|
||||
map global-map)
|
||||
(dolist (cmd '(forward-word backward-word mark-word
|
||||
kill-word backward-kill-word
|
||||
transpose-words
|
||||
capitalize-word upcase-word downcase-word))
|
||||
(let ((othercmd (let ((name (symbol-name cmd)))
|
||||
(string-match "\\(.*-\\)\\(word.*\\)" name)
|
||||
(intern (concat "c-"
|
||||
(match-string 1 name)
|
||||
"sub"
|
||||
(match-string 2 name))))))
|
||||
(if (fboundp 'command-remapping)
|
||||
(define-key map (vector 'remap cmd) othercmd)
|
||||
(substitute-key-definition cmd othercmd map global-map))))
|
||||
map)
|
||||
"Keymap used in command `c-subword-mode' minor mode.")
|
||||
|
||||
|
@ -308,5 +291,5 @@ Optional argument ARG is the same as for `upcase-word'."
|
|||
|
||||
(cc-provide 'cc-subword)
|
||||
|
||||
;;; arch-tag: 2be9d294-7f30-4626-95e6-9964bb93c7a3
|
||||
;; arch-tag: 2be9d294-7f30-4626-95e6-9964bb93c7a3
|
||||
;;; cc-subword.el ends here
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
|
||||
(defgroup grep nil
|
||||
"Run compiler as inferior of Emacs, parse error messages."
|
||||
"Run grep as inferior of Emacs, parse error messages."
|
||||
:group 'tools
|
||||
:group 'processes)
|
||||
|
||||
|
@ -48,23 +48,6 @@
|
|||
:version "22.1"
|
||||
:group 'grep)
|
||||
|
||||
(defcustom grep-auto-highlight t
|
||||
"*Specify how many grep matches to highlight (and parse) initially.
|
||||
\(Highlighting applies to an grep match when the mouse is over it.)
|
||||
If this is a number N, all grep matches in the first N lines
|
||||
are highlighted and parsed as soon as they arrive in Emacs.
|
||||
If t, highlight and parse the whole grep output as soon as it arrives.
|
||||
If nil, don't highlight or parse any of the grep buffer until you try to
|
||||
move to the error messages.
|
||||
|
||||
Those grep matches which are not parsed and highlighted initially
|
||||
will be parsed and highlighted as soon as you try to move to them."
|
||||
:type '(choice (const :tag "All" t)
|
||||
(const :tag "None" nil)
|
||||
(integer :tag "First N lines"))
|
||||
:version "22.1"
|
||||
:group 'grep)
|
||||
|
||||
(defcustom grep-highlight-matches 'auto-detect
|
||||
"If t, use special markers to highlight grep matches.
|
||||
|
||||
|
@ -108,6 +91,20 @@ call that function before using this variable in your program."
|
|||
(const :tag "Not Set" nil))
|
||||
:group 'grep)
|
||||
|
||||
(defcustom grep-template nil
|
||||
"The default command to run for \\[lgrep].
|
||||
The default value of this variable is set up by `grep-compute-defaults';
|
||||
call that function before using this variable in your program.
|
||||
The following place holders should be present in the string:
|
||||
<C> - place to put -i if case insensitive grep.
|
||||
<F> - file names and wildcards to search.
|
||||
<R> - the regular expression searched for.
|
||||
<N> - place to insert null-device."
|
||||
:type '(choice string
|
||||
(const :tag "Not Set" nil))
|
||||
:version "22.1"
|
||||
:group 'grep)
|
||||
|
||||
(defcustom grep-use-null-device 'auto-detect
|
||||
"If t, append the value of `null-device' to `grep' commands.
|
||||
This is done to ensure that the output of grep includes the filename of
|
||||
|
@ -130,8 +127,8 @@ call that function before using this variable in your program."
|
|||
(const :tag "Not Set" nil))
|
||||
:group 'grep)
|
||||
|
||||
(defcustom grep-tree-command nil
|
||||
"The default find command for \\[grep-tree].
|
||||
(defcustom grep-find-template nil
|
||||
"The default command to run for \\[rgrep].
|
||||
The default value of this variable is set up by `grep-compute-defaults';
|
||||
call that function before using this variable in your program.
|
||||
The following place holders should be present in the string:
|
||||
|
@ -145,27 +142,22 @@ The following place holders should be present in the string:
|
|||
:version "22.1"
|
||||
:group 'grep)
|
||||
|
||||
(defcustom grep-tree-files-aliases '(
|
||||
(defcustom grep-files-aliases '(
|
||||
("el" . "*.el")
|
||||
("ch" . "*.[ch]")
|
||||
("c" . "*.c")
|
||||
("h" . "*.h")
|
||||
("m" . "[Mm]akefile*")
|
||||
("asm" . "*.[sS]")
|
||||
("all" . "*")
|
||||
("el" . "*.el")
|
||||
("m" . "[Mm]akefile*")
|
||||
("l" . "[Cc]hange[Ll]og*")
|
||||
)
|
||||
"*Alist of aliases for the FILES argument to `grep-tree'."
|
||||
"*Alist of aliases for the FILES argument to `lgrep' and `rgrep'."
|
||||
:type 'alist
|
||||
:group 'grep)
|
||||
|
||||
(defcustom grep-tree-ignore-case t
|
||||
"*If non-nil, `grep-tree' ignores case in matches."
|
||||
:type 'boolean
|
||||
:group 'grep)
|
||||
|
||||
(defcustom grep-tree-ignore-CVS-directories t
|
||||
"*If non-nil, `grep-tree' does no recurse into CVS directories."
|
||||
:type 'boolean
|
||||
(defcustom grep-find-ignored-directories '("CVS" ".hg" "{arch}")
|
||||
"*List of names of sub-directories which `rgrep' shall not recurse into."
|
||||
:type '(repeat string)
|
||||
:group 'grep)
|
||||
|
||||
(defcustom grep-error-screen-columns nil
|
||||
|
@ -208,6 +200,8 @@ See `compilation-error-screen-columns'"
|
|||
'("Compile..." . compile))
|
||||
(define-key map [menu-bar grep compilation-grep]
|
||||
'("Another grep..." . grep))
|
||||
(define-key map [menu-bar grep compilation-grep-find]
|
||||
'("Recursive grep..." . grep-find))
|
||||
(define-key map [menu-bar grep compilation-recompile]
|
||||
'("Repeat grep" . recompile))
|
||||
(define-key map [menu-bar grep compilation-separator2]
|
||||
|
@ -353,6 +347,11 @@ This variable's value takes effect when `grep-compute-defaults' is called.")
|
|||
;;;###autoload
|
||||
(defvar grep-find-history nil)
|
||||
|
||||
;; History of lgrep and rgrep regexp and files args.
|
||||
(defvar grep-regexp-history nil)
|
||||
(defvar grep-files-history '("ch" "el"))
|
||||
|
||||
|
||||
;;;###autoload
|
||||
(defun grep-process-setup ()
|
||||
"Setup compilation variables and buffer for `grep'.
|
||||
|
@ -378,6 +377,12 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'."
|
|||
(cons msg code))))
|
||||
(run-hooks 'grep-setup-hook))
|
||||
|
||||
(defun grep-probe (command args &optional func result)
|
||||
(equal (condition-case nil
|
||||
(apply (or func 'call-process) command args)
|
||||
(error nil))
|
||||
(or result 0)))
|
||||
|
||||
;;;###autoload
|
||||
(defun grep-compute-defaults ()
|
||||
(unless (or (not grep-use-null-device) (eq grep-use-null-device t))
|
||||
|
@ -385,73 +390,67 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'."
|
|||
(with-temp-buffer
|
||||
(let ((hello-file (expand-file-name "HELLO" data-directory)))
|
||||
(not
|
||||
(and (equal (condition-case nil
|
||||
(if grep-command
|
||||
;; `grep-command' is already set, so
|
||||
;; use that for testing.
|
||||
(call-process-shell-command
|
||||
grep-command nil t nil
|
||||
"^English" hello-file)
|
||||
;; otherwise use `grep-program'
|
||||
(call-process grep-program nil t nil
|
||||
"-nH" "^English" hello-file))
|
||||
(error nil))
|
||||
0)
|
||||
(and (if grep-command
|
||||
;; `grep-command' is already set, so
|
||||
;; use that for testing.
|
||||
(grep-probe grep-command
|
||||
`(nil t nil "^English" ,hello-file)
|
||||
#'call-process-shell-command)
|
||||
;; otherwise use `grep-program'
|
||||
(grep-probe grep-program
|
||||
`(nil t nil "-nH" "^English" ,hello-file)))
|
||||
(progn
|
||||
(goto-char (point-min))
|
||||
(looking-at
|
||||
(concat (regexp-quote hello-file)
|
||||
":[0-9]+:English")))))))))
|
||||
(unless grep-command
|
||||
(setq grep-command
|
||||
(let ((required-options (if grep-use-null-device "-n" "-nH")))
|
||||
(if (equal (condition-case nil ; in case "grep" isn't in exec-path
|
||||
(call-process grep-program nil nil nil
|
||||
"-e" "foo" null-device)
|
||||
(error nil))
|
||||
1)
|
||||
(format "%s %s -e " grep-program required-options)
|
||||
(format "%s %s " grep-program required-options)))))
|
||||
(unless grep-find-use-xargs
|
||||
(setq grep-find-use-xargs
|
||||
(if (and
|
||||
(equal (call-process "find" nil nil nil
|
||||
null-device "-print0")
|
||||
0)
|
||||
(equal (call-process "xargs" nil nil nil
|
||||
"-0" "-e" "echo")
|
||||
0))
|
||||
'gnu)))
|
||||
(unless grep-find-command
|
||||
(setq grep-find-command
|
||||
(cond ((eq grep-find-use-xargs 'gnu)
|
||||
(format "%s . -type f -print0 | xargs -0 -e %s"
|
||||
find-program grep-command))
|
||||
(grep-find-use-xargs
|
||||
(format "%s . -type f -print | xargs %s"
|
||||
find-program grep-command))
|
||||
(t (cons (format "%s . -type f -exec %s {} %s \\;"
|
||||
find-program grep-command null-device)
|
||||
(+ 22 (length grep-command)))))))
|
||||
(unless grep-tree-command
|
||||
(setq grep-tree-command
|
||||
(let* ((glen (length grep-program))
|
||||
(gcmd (concat grep-program " <C>" (substring grep-command glen))))
|
||||
(cond ((eq grep-find-use-xargs 'gnu)
|
||||
(format "%s <D> <X> -type f <F> -print0 | xargs -0 -e %s <R>"
|
||||
find-program gcmd))
|
||||
(grep-find-use-xargs
|
||||
(format "%s <D> <X> -type f <F> -print | xargs %s <R>"
|
||||
find-program gcmd))
|
||||
(t (format "%s <D> <X> -type f <F> -exec %s <R> {} %s \\;"
|
||||
find-program gcmd null-device))))))
|
||||
(unless (and grep-command grep-find-command
|
||||
grep-template grep-find-template)
|
||||
(let ((grep-options
|
||||
(concat (if grep-use-null-device "-n" "-nH")
|
||||
(if (grep-probe grep-program
|
||||
`(nil nil nil "-e" "foo" ,null-device)
|
||||
nil 1)
|
||||
" -e"))))
|
||||
(unless grep-command
|
||||
(setq grep-command
|
||||
(format "%s %s " grep-program grep-options)))
|
||||
(unless grep-template
|
||||
(setq grep-template
|
||||
(format "%s <C> %s <R> <F>" grep-program grep-options)))
|
||||
(unless grep-find-use-xargs
|
||||
(setq grep-find-use-xargs
|
||||
(if (and
|
||||
(grep-probe find-program `(nil nil nil ,null-device "-print0"))
|
||||
(grep-probe "xargs" `(nil nil nil "-0" "-e" "echo")))
|
||||
'gnu)))
|
||||
(unless grep-find-command
|
||||
(setq grep-find-command
|
||||
(cond ((eq grep-find-use-xargs 'gnu)
|
||||
(format "%s . -type f -print0 | xargs -0 -e %s"
|
||||
find-program grep-command))
|
||||
(grep-find-use-xargs
|
||||
(format "%s . -type f -print | xargs %s"
|
||||
find-program grep-command))
|
||||
(t (cons (format "%s . -type f -exec %s {} %s \\;"
|
||||
find-program grep-command null-device)
|
||||
(+ 22 (length grep-command)))))))
|
||||
(unless grep-find-template
|
||||
(setq grep-find-template
|
||||
(let ((gcmd (format "%s <C> %s <R>"
|
||||
grep-program grep-options)))
|
||||
(cond ((eq grep-find-use-xargs 'gnu)
|
||||
(format "%s . <X> -type f <F> -print0 | xargs -0 -e %s"
|
||||
find-program gcmd))
|
||||
(grep-find-use-xargs
|
||||
(format "%s . <X> -type f <F> -print | xargs %s"
|
||||
find-program gcmd))
|
||||
(t (format "%s . <X> -type f <F> -exec %s {} %s \\;"
|
||||
find-program gcmd null-device))))))))
|
||||
(unless (or (not grep-highlight-matches) (eq grep-highlight-matches t))
|
||||
(setq grep-highlight-matches
|
||||
(with-temp-buffer
|
||||
(and (equal (condition-case nil
|
||||
(call-process grep-program nil t nil "--help")
|
||||
(error nil))
|
||||
0)
|
||||
(and (grep-probe grep-program '(nil t nil "--help"))
|
||||
(progn
|
||||
(goto-char (point-min))
|
||||
(search-forward "--color" nil t))
|
||||
|
@ -487,42 +486,6 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'."
|
|||
(file-name-extension buffer-file-name))))
|
||||
(replace-match tag-default t t grep-default 1))))
|
||||
|
||||
;;;###autoload
|
||||
(defun grep (command-args &optional highlight-regexp)
|
||||
"Run grep, with user-specified args, and 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] in the grep \
|
||||
output buffer, to go to the lines
|
||||
where grep found matches.
|
||||
|
||||
This command uses a special history list for its COMMAND-ARGS, so you can
|
||||
easily repeat a grep command.
|
||||
|
||||
A prefix argument says to default the argument based upon the current
|
||||
tag the cursor is over, substituting it into the last grep command
|
||||
in the grep command history (or into `grep-command'
|
||||
if that history list is empty).
|
||||
|
||||
If specified, optional second arg HIGHLIGHT-REGEXP is the regexp to
|
||||
temporarily highlight in visited source lines."
|
||||
(interactive
|
||||
(progn
|
||||
(unless (and grep-command
|
||||
(or (not grep-use-null-device) (eq grep-use-null-device t)))
|
||||
(grep-compute-defaults))
|
||||
(let ((default (grep-default-command)))
|
||||
(list (read-from-minibuffer "Run grep (like this): "
|
||||
(if current-prefix-arg
|
||||
default grep-command)
|
||||
nil nil 'grep-history
|
||||
(if current-prefix-arg nil default))))))
|
||||
|
||||
;; Setting process-setup-function makes exit-message-function work
|
||||
;; even when async processes aren't supported.
|
||||
(compilation-start (if (and grep-use-null-device null-device)
|
||||
(concat command-args " " null-device)
|
||||
command-args)
|
||||
'grep-mode nil highlight-regexp))
|
||||
|
||||
;;;###autoload
|
||||
(define-compilation-mode grep-mode "Grep"
|
||||
|
@ -536,6 +499,40 @@ temporarily highlight in visited source lines."
|
|||
'grep-process-setup)
|
||||
(set (make-local-variable 'compilation-disable-input) t))
|
||||
|
||||
|
||||
;;;###autoload
|
||||
(defun grep (command-args)
|
||||
"Run grep, with user-specified args, and 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] in the grep \
|
||||
output buffer, to go to the lines
|
||||
where grep found matches.
|
||||
|
||||
This command uses a special history list for its COMMAND-ARGS, so you can
|
||||
easily repeat a grep command.
|
||||
|
||||
A prefix argument says to default the argument based upon the current
|
||||
tag the cursor is over, substituting it into the last grep command
|
||||
in the grep command history (or into `grep-command'
|
||||
if that history list is empty)."
|
||||
(interactive
|
||||
(progn
|
||||
(grep-compute-defaults)
|
||||
(let ((default (grep-default-command)))
|
||||
(list (read-from-minibuffer "Run grep (like this): "
|
||||
(if current-prefix-arg
|
||||
default grep-command)
|
||||
nil nil 'grep-history
|
||||
(if current-prefix-arg nil default))))))
|
||||
|
||||
;; Setting process-setup-function makes exit-message-function work
|
||||
;; even when async processes aren't supported.
|
||||
(compilation-start (if (and grep-use-null-device null-device)
|
||||
(concat command-args " " null-device)
|
||||
command-args)
|
||||
'grep-mode))
|
||||
|
||||
|
||||
;;;###autoload
|
||||
(defun grep-find (command-args)
|
||||
"Run grep via find, with user-specified args COMMAND-ARGS.
|
||||
|
@ -547,9 +544,7 @@ This command uses a special history list for its arguments, so you can
|
|||
easily repeat a find command."
|
||||
(interactive
|
||||
(progn
|
||||
(unless (and grep-command
|
||||
(or (not grep-use-null-device) (eq grep-use-null-device t)))
|
||||
(grep-compute-defaults))
|
||||
(grep-compute-defaults)
|
||||
(if grep-find-command
|
||||
(list (read-from-minibuffer "Run find (like this): "
|
||||
grep-find-command nil nil
|
||||
|
@ -565,84 +560,190 @@ easily repeat a find command."
|
|||
;;;###autoload
|
||||
(defalias 'find-grep 'grep-find)
|
||||
|
||||
(defun grep-expand-command-macros (command &optional regexp files dir excl case-fold)
|
||||
"Patch grep COMMAND replacing <D>, etc."
|
||||
(setq command
|
||||
(replace-regexp-in-string "<D>"
|
||||
(or dir ".") command t t))
|
||||
(setq command
|
||||
(replace-regexp-in-string "<X>"
|
||||
(or excl "") command t t))
|
||||
(setq command
|
||||
(replace-regexp-in-string "<F>"
|
||||
(or files "") command t t))
|
||||
(setq command
|
||||
(replace-regexp-in-string "<C>"
|
||||
(if case-fold "-i" "") command t t))
|
||||
(setq command
|
||||
(replace-regexp-in-string "<R>"
|
||||
(or regexp "") command t t))
|
||||
command)
|
||||
|
||||
(defvar grep-tree-last-regexp "")
|
||||
(defvar grep-tree-last-files (car (car grep-tree-files-aliases)))
|
||||
;; User-friendly interactive API.
|
||||
|
||||
(defconst grep-expand-keywords
|
||||
'(("<C>" . (and cf (isearch-no-upper-case-p regexp t) "-i"))
|
||||
("<D>" . dir)
|
||||
("<F>" . files)
|
||||
("<N>" . null-device)
|
||||
("<X>" . excl)
|
||||
("<R>" . (shell-quote-argument (or regexp ""))))
|
||||
"List of substitutions performed by `grep-expand-template'.
|
||||
If car of an element matches, the cdr is evalled in to get the
|
||||
substitution string. Note dynamic scoping of variables.")
|
||||
|
||||
(defun grep-expand-template (template &optional regexp files dir excl)
|
||||
"Patch grep COMMAND string replacing <C>, <D>, <F>, <R>, and <X>."
|
||||
(let ((command template)
|
||||
(cf case-fold-search)
|
||||
(case-fold-search nil))
|
||||
(dolist (kw grep-expand-keywords command)
|
||||
(if (string-match (car kw) command)
|
||||
(setq command
|
||||
(replace-match
|
||||
(or (if (symbolp (cdr kw))
|
||||
(eval (cdr kw))
|
||||
(save-match-data (eval (cdr kw))))
|
||||
"")
|
||||
t t command))))))
|
||||
|
||||
(defun grep-read-regexp ()
|
||||
"Read regexp arg for interactive grep."
|
||||
(let ((default
|
||||
(or (funcall (or find-tag-default-function
|
||||
(get major-mode 'find-tag-default-function)
|
||||
'find-tag-default))
|
||||
"")))
|
||||
(read-string
|
||||
(concat "Search for"
|
||||
(if (and default (> (length default) 0))
|
||||
(format " (default %s): " default) ": "))
|
||||
nil 'grep-regexp-history default)))
|
||||
|
||||
(defun grep-read-files (regexp)
|
||||
"Read files arg for interactive grep."
|
||||
(let* ((bn (or (buffer-file-name) (buffer-name)))
|
||||
(fn (and bn
|
||||
(stringp bn)
|
||||
(file-name-nondirectory bn)))
|
||||
(default
|
||||
(or (and fn
|
||||
(let ((aliases grep-files-aliases)
|
||||
alias)
|
||||
(while aliases
|
||||
(setq alias (car aliases)
|
||||
aliases (cdr aliases))
|
||||
(if (string-match (wildcard-to-regexp (cdr alias)) fn)
|
||||
(setq aliases nil)
|
||||
(setq alias nil)))
|
||||
(cdr alias)))
|
||||
(and fn
|
||||
(let ((ext (file-name-extension fn)))
|
||||
(and ext (concat "*." ext))))))
|
||||
(files (read-string
|
||||
(concat "Search for \"" regexp
|
||||
"\" in files"
|
||||
(if default (concat " (default " default ")"))
|
||||
": ")
|
||||
nil 'grep-files-history default)))
|
||||
(and files
|
||||
(or (cdr (assoc files grep-files-aliases))
|
||||
files))))
|
||||
|
||||
;;;###autoload
|
||||
(defun grep-tree (regexp files dir &optional subdirs)
|
||||
"Grep for REGEXP in FILES in directory tree rooted at DIR.
|
||||
Collect output in a buffer.
|
||||
Interactively, prompt separately for each search parameter.
|
||||
With prefix arg, reuse previous REGEXP.
|
||||
(defun lgrep (regexp &optional files)
|
||||
"Run grep, searching for REGEXP in FILES in current directory.
|
||||
The search is limited to file names matching shell pattern FILES.
|
||||
FILES may use abbreviations defined in `grep-tree-files-aliases', e.g.
|
||||
FILES may use abbreviations defined in `grep-files-aliases', e.g.
|
||||
entering `ch' is equivalent to `*.[ch]'.
|
||||
|
||||
While find runs asynchronously, you can use the \\[next-error] command
|
||||
to find the text that grep hits refer to.
|
||||
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.
|
||||
|
||||
This command uses a special history list for its arguments, so you can
|
||||
easily repeat a find 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]
|
||||
in the grep output buffer, to go to the lines where grep found matches.
|
||||
|
||||
When used non-interactively, optional arg SUBDIRS limits the search to
|
||||
those sub directories of DIR."
|
||||
This command shares argument histories with \\[rgrep] and \\[grep]."
|
||||
(interactive
|
||||
(let* ((regexp
|
||||
(if current-prefix-arg
|
||||
grep-tree-last-regexp
|
||||
(let* ((default (current-word))
|
||||
(spec (read-string
|
||||
(concat "Search for"
|
||||
(if (and default (> (length default) 0))
|
||||
(format " (default %s): " default) ": ")))))
|
||||
(if (equal spec "") default spec))))
|
||||
(files
|
||||
(read-string (concat "Search for \"" regexp "\" in files (default " grep-tree-last-files "): ")))
|
||||
(dir
|
||||
(read-directory-name "Base directory: " nil default-directory t)))
|
||||
(list regexp files dir)))
|
||||
(unless grep-tree-command
|
||||
(grep-compute-defaults))
|
||||
(unless (and (stringp files) (> (length files) 0))
|
||||
(setq files grep-tree-last-files))
|
||||
(when files
|
||||
(setq grep-tree-last-files files)
|
||||
(let ((mf (assoc files grep-tree-files-aliases)))
|
||||
(if mf
|
||||
(setq files (cdr mf)))))
|
||||
(let ((command-args (grep-expand-command-macros
|
||||
grep-tree-command
|
||||
(setq grep-tree-last-regexp regexp)
|
||||
(and files (concat "-name '" files "'"))
|
||||
(if subdirs
|
||||
(if (stringp subdirs)
|
||||
subdirs
|
||||
(mapconcat 'identity subdirs " "))
|
||||
nil) ;; we change default-directory to dir
|
||||
(and grep-tree-ignore-CVS-directories "-path '*/CVS' -prune -o ")
|
||||
grep-tree-ignore-case))
|
||||
(default-directory (file-name-as-directory (expand-file-name dir)))
|
||||
(null-device nil)) ; see grep
|
||||
(grep command-args regexp)))
|
||||
(progn
|
||||
(grep-compute-defaults)
|
||||
(cond
|
||||
((and grep-command (equal current-prefix-arg '(16)))
|
||||
(list (read-from-minibuffer "Run: " grep-command
|
||||
nil nil 'grep-history)
|
||||
nil))
|
||||
((not grep-template)
|
||||
(list nil
|
||||
(read-string "grep.el: No `grep-template' available. Press RET.")))
|
||||
(t (let* ((regexp (grep-read-regexp))
|
||||
(files (grep-read-files regexp)))
|
||||
(list regexp files))))))
|
||||
(when (and (stringp regexp) (> (length regexp) 0))
|
||||
(let ((command regexp))
|
||||
(if (null files)
|
||||
(if (string= command grep-command)
|
||||
(setq command nil))
|
||||
(setq command (grep-expand-template
|
||||
grep-template
|
||||
regexp
|
||||
files))
|
||||
(when command
|
||||
(if (equal current-prefix-arg '(4))
|
||||
(setq command
|
||||
(read-from-minibuffer "Confirm: "
|
||||
command nil nil 'grep-history))
|
||||
(push command grep-history))))
|
||||
(when command
|
||||
;; Setting process-setup-function makes exit-message-function work
|
||||
;; even when async processes aren't supported.
|
||||
(compilation-start (if (and grep-use-null-device null-device)
|
||||
(concat command " " null-device)
|
||||
command) 'grep-mode)))))
|
||||
|
||||
|
||||
;;;###autoload
|
||||
(defun rgrep (regexp &optional files dir)
|
||||
"Recusively 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.
|
||||
|
||||
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]
|
||||
in the grep output buffer, to go to the lines where grep found matches.
|
||||
|
||||
This command shares argument histories with \\[lgrep] and \\[grep-find]."
|
||||
(interactive
|
||||
(progn
|
||||
(grep-compute-defaults)
|
||||
(cond
|
||||
((and grep-find-command (equal current-prefix-arg '(16)))
|
||||
(list (read-from-minibuffer "Run: " grep-find-command
|
||||
nil nil 'grep-find-history)
|
||||
nil))
|
||||
((not grep-find-template)
|
||||
(list nil nil
|
||||
(read-string "grep.el: No `grep-find-template' available. Press RET.")))
|
||||
(t (let* ((regexp (grep-read-regexp))
|
||||
(files (grep-read-files regexp))
|
||||
(dir (read-directory-name "Base directory: "
|
||||
nil default-directory t)))
|
||||
(list regexp files dir))))))
|
||||
(when (and (stringp regexp) (> (length regexp) 0))
|
||||
(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
|
||||
(and grep-find-ignored-directories
|
||||
(concat "\\( -path '*/"
|
||||
(mapconcat #'identity
|
||||
grep-find-ignored-directories
|
||||
"' -o -path '*/")
|
||||
"' \\) -prune -o ")))))
|
||||
(when command
|
||||
(if current-prefix-arg
|
||||
(setq command
|
||||
(read-from-minibuffer "Confirm: "
|
||||
command nil nil 'grep-find-history))
|
||||
(push command grep-find-history))
|
||||
(compilation-start command 'grep-mode))))))
|
||||
|
||||
|
||||
(provide 'grep)
|
||||
|
|
|
@ -83,6 +83,8 @@ Supported debuggers include gdb, sdb, dbx, xdb, perldb, pdb (Python), jdb, and b
|
|||
(defvar gud-minor-mode nil)
|
||||
(put 'gud-minor-mode 'permanent-local t)
|
||||
|
||||
(defvar gud-comint-buffer nil)
|
||||
|
||||
(defvar gud-keep-buffer nil)
|
||||
|
||||
(defun gud-symbol (sym &optional soft minor-mode)
|
||||
|
@ -301,13 +303,15 @@ Uses `gud-<MINOR-MODE>-directories' to find the source files."
|
|||
optional doc string DOC. Certain %-escapes in the string arguments
|
||||
are interpreted specially if present. These are:
|
||||
|
||||
%f name (without directory) of current source file.
|
||||
%F name (without directory or extension) of current source file.
|
||||
%d directory of current source file.
|
||||
%l number of current source line
|
||||
%e text of the C lvalue or function-call expression surrounding point.
|
||||
%a text of the hexadecimal address surrounding point
|
||||
%p prefix argument to the command (if any) as a number
|
||||
%f -- Name (without directory) of current source file.
|
||||
%F -- Name (without directory or extension) of current source file.
|
||||
%d -- Directory of current source file.
|
||||
%l -- Number of current source line.
|
||||
%e -- Text of the C lvalue or function-call expression surrounding point.
|
||||
%a -- Text of the hexadecimal address surrounding point.
|
||||
%p -- Prefix argument to the command (if any) as a number.
|
||||
%c -- Fully qualified class name derived from the expression
|
||||
surrounding point (jdb only).
|
||||
|
||||
The `current' source file is the file of the current buffer (if
|
||||
we're in a C file) or the source file current at the last break or
|
||||
|
@ -444,8 +448,7 @@ required by the caller."
|
|||
(when (or gdb-force-update
|
||||
(not (save-excursion
|
||||
(goto-char (point-min))
|
||||
(let ((case-fold-search t))
|
||||
(looking-at "Watch Expressions:")))))
|
||||
(looking-at "Watch Expressions:"))))
|
||||
(erase-buffer)
|
||||
(insert "Watch Expressions:\n")
|
||||
(if gdb-speedbar-auto-raise
|
||||
|
@ -740,8 +743,6 @@ To run GDB in text command mode, set `gud-gdb-command-name' to
|
|||
;; The completion list is constructed by the process filter.
|
||||
(defvar gud-gdb-fetched-lines)
|
||||
|
||||
(defvar gud-comint-buffer nil)
|
||||
|
||||
(defun gud-gdb-complete-command (&optional command a b)
|
||||
"Perform completion on the GDB command preceding point.
|
||||
This is implemented using the GDB `complete' command which isn't
|
||||
|
@ -2804,7 +2805,9 @@ Obeying it means displaying in another window the specified file and line."
|
|||
(let ((insource (not (eq (current-buffer) gud-comint-buffer)))
|
||||
(frame (or gud-last-frame gud-last-last-frame))
|
||||
result)
|
||||
(while (and str (string-match "\\([^%]*\\)%\\([adeflpc]\\)" str))
|
||||
(while (and str
|
||||
(let ((case-fold-search nil))
|
||||
(string-match "\\([^%]*\\)%\\([adefFlpc]\\)" str)))
|
||||
(let ((key (string-to-char (match-string 2 str)))
|
||||
subst)
|
||||
(cond
|
||||
|
@ -2889,8 +2892,11 @@ Obeying it means displaying in another window the specified file and line."
|
|||
(set-buffer gud-comint-buffer)
|
||||
(save-restriction
|
||||
(widen)
|
||||
(goto-char (process-mark proc))
|
||||
(forward-line 0)
|
||||
(if (marker-position gud-delete-prompt-marker)
|
||||
;; We get here when printing an expression.
|
||||
(goto-char gud-delete-prompt-marker)
|
||||
(goto-char (process-mark proc))
|
||||
(forward-line 0))
|
||||
(if (looking-at comint-prompt-regexp)
|
||||
(set-marker gud-delete-prompt-marker (point)))
|
||||
(if (memq gud-minor-mode '(gdbmi gdba))
|
||||
|
@ -2911,7 +2917,21 @@ Obeying it means displaying in another window the specified file and line."
|
|||
(defvar gud-find-expr-function 'gud-find-c-expr)
|
||||
|
||||
(defun gud-find-expr (&rest args)
|
||||
(apply gud-find-expr-function args))
|
||||
(let ((expr (if (and transient-mark-mode mark-active)
|
||||
(buffer-substring (region-beginning) (region-end))
|
||||
(apply gud-find-expr-function args))))
|
||||
(save-match-data
|
||||
(if (string-match "\n" expr)
|
||||
(error "Expression must not include a newline"))
|
||||
(with-current-buffer gud-comint-buffer
|
||||
(save-excursion
|
||||
(goto-char (process-mark (get-buffer-process gud-comint-buffer)))
|
||||
(forward-line 0)
|
||||
(when (looking-at comint-prompt-regexp)
|
||||
(set-marker gud-delete-prompt-marker (point))
|
||||
(set-marker-insertion-type gud-delete-prompt-marker t))
|
||||
(insert (concat expr " = ")))))
|
||||
expr))
|
||||
|
||||
;; The next eight functions are hacked from gdbsrc.el by
|
||||
;; Debby Ayers <ayers@asc.slb.com>,
|
||||
|
|
|
@ -292,9 +292,9 @@ The criteria are that the previous line ends in a backslash outside
|
|||
comments and strings, or that the bracket/paren nesting depth is nonzero."
|
||||
(or (and (eq ?\\ (char-before (line-end-position 0)))
|
||||
(not (syntax-ppss-context (syntax-ppss))))
|
||||
(/= 0 (syntax-ppss-depth
|
||||
(save-excursion ; syntax-ppss with arg changes point
|
||||
(syntax-ppss (line-beginning-position)))))))
|
||||
(< 0 (syntax-ppss-depth
|
||||
(save-excursion ; syntax-ppss with arg changes point
|
||||
(syntax-ppss (line-beginning-position)))))))
|
||||
|
||||
(defun python-comment-line-p ()
|
||||
"Return non-nil iff current line has only a comment."
|
||||
|
@ -719,7 +719,10 @@ expressions."
|
|||
(python-beginning-of-string)
|
||||
;; Skip forward out of nested brackets.
|
||||
(condition-case () ; beware invalid syntax
|
||||
(progn (backward-up-list (syntax-ppss-depth (syntax-ppss))) t)
|
||||
(let ((depth (syntax-ppss-depth (syntax-ppss))))
|
||||
;; Beware negative depths.
|
||||
(if (> depth 0) (backward-up-list depth))
|
||||
t)
|
||||
(error (throw 'foo nil))))))
|
||||
(back-to-indentation))
|
||||
|
||||
|
@ -1755,7 +1758,6 @@ lines count as headers.
|
|||
(if (featurep 'hippie-exp)
|
||||
(set (make-local-variable 'hippie-expand-try-functions-list)
|
||||
(cons 'python-try-complete hippie-expand-try-functions-list)))
|
||||
(unless font-lock-mode (font-lock-mode 1))
|
||||
(when python-guess-indent (python-guess-indent))
|
||||
(set (make-local-variable 'python-command) python-python-command)
|
||||
(unless (boundp 'python-mode-running) ; kill the recursion from jython-mode
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
;; Copyright (C) 2000, 2001, 2002, 2003, 2004,
|
||||
;; 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Stefan Monnier <monnier@cs.yale.edu>
|
||||
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
;; Keywords: outlines
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
|
|
@ -1709,7 +1709,7 @@ This variable only matters if `undo-ask-before-discard' is non-nil.")
|
|||
;; but we don't want to ask the question again.
|
||||
(setq undo-extra-outer-limit (+ size 50000))
|
||||
(if (let (use-dialog-box track-mouse executing-kbd-macro )
|
||||
(yes-or-no-p (format "Buffer %s undo info is %d bytes long; discard it? "
|
||||
(yes-or-no-p (format "Buffer `%s' undo info is %d bytes long; discard it? "
|
||||
(buffer-name) size)))
|
||||
(progn (setq buffer-undo-list nil)
|
||||
(setq undo-extra-outer-limit nil)
|
||||
|
@ -1717,7 +1717,7 @@ This variable only matters if `undo-ask-before-discard' is non-nil.")
|
|||
nil))
|
||||
(display-warning '(undo discard-info)
|
||||
(concat
|
||||
(format "Buffer %s undo info was %d bytes long.\n"
|
||||
(format "Buffer `%s' undo info was %d bytes long.\n"
|
||||
(buffer-name) size)
|
||||
"The undo info was discarded because it exceeded \
|
||||
`undo-outer-limit'.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
;; Copyright (C) 1999, 2000, 2001, 2002, 2003,
|
||||
;; 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Stefan Monnier <monnier@cs.yale.edu>
|
||||
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
;; Keywords: tools revision-control merge diff3 cvs conflict
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
|
|
@ -1620,6 +1620,15 @@ normal otherwise."
|
|||
(when init-file-had-error
|
||||
(sit-for 2))
|
||||
|
||||
(when (and pure-space-overflow
|
||||
(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.
|
||||
:warning))
|
||||
|
||||
(when command-line-args-left
|
||||
;; We have command args; process them.
|
||||
(let ((dir command-line-default-directory)
|
||||
|
|
48
lisp/subr.el
48
lisp/subr.el
|
@ -851,19 +851,23 @@ and `event-end' functions."
|
|||
(nth 3 position))
|
||||
|
||||
(defsubst posn-string (position)
|
||||
"Return the string object of POSITION, or nil if a buffer position.
|
||||
"Return the string object of POSITION.
|
||||
Value is a cons (STRING . STRING-POS), or nil if not a string.
|
||||
POSITION should be a list of the form returned by the `event-start'
|
||||
and `event-end' functions."
|
||||
(nth 4 position))
|
||||
|
||||
(defsubst posn-image (position)
|
||||
"Return the image object of POSITION, or nil if a not an image.
|
||||
"Return the image object of POSITION.
|
||||
Value is an list (image ...), or nil if not an image.
|
||||
POSITION should be a list of the form returned by the `event-start'
|
||||
and `event-end' functions."
|
||||
(nth 7 position))
|
||||
|
||||
(defsubst posn-object (position)
|
||||
"Return the object (image or string) of POSITION.
|
||||
Value is a list (image ...) for an image object, a cons cell
|
||||
\(STRING . STRING-POS) for a string object, and nil for a buffer position.
|
||||
POSITION should be a list of the form returned by the `event-start'
|
||||
and `event-end' functions."
|
||||
(or (posn-image position) (posn-string position)))
|
||||
|
@ -1258,25 +1262,25 @@ If TOGGLE has a `:menu-tag', that is used for the menu item's label."
|
|||
|
||||
;;; Load history
|
||||
|
||||
;;; (defvar symbol-file-load-history-loaded nil
|
||||
;;; "Non-nil means we have loaded the file `fns-VERSION.el' in `exec-directory'.
|
||||
;;; That file records the part of `load-history' for preloaded files,
|
||||
;;; which is cleared out before dumping to make Emacs smaller.")
|
||||
;; (defvar symbol-file-load-history-loaded nil
|
||||
;; "Non-nil means we have loaded the file `fns-VERSION.el' in `exec-directory'.
|
||||
;; That file records the part of `load-history' for preloaded files,
|
||||
;; which is cleared out before dumping to make Emacs smaller.")
|
||||
|
||||
;;; (defun load-symbol-file-load-history ()
|
||||
;;; "Load the file `fns-VERSION.el' in `exec-directory' if not already done.
|
||||
;;; That file records the part of `load-history' for preloaded files,
|
||||
;;; which is cleared out before dumping to make Emacs smaller."
|
||||
;;; (unless symbol-file-load-history-loaded
|
||||
;;; (load (expand-file-name
|
||||
;;; ;; fns-XX.YY.ZZ.el does not work on DOS filesystem.
|
||||
;;; (if (eq system-type 'ms-dos)
|
||||
;;; "fns.el"
|
||||
;;; (format "fns-%s.el" emacs-version))
|
||||
;;; exec-directory)
|
||||
;;; ;; The file name fns-%s.el already has a .el extension.
|
||||
;;; nil nil t)
|
||||
;;; (setq symbol-file-load-history-loaded t)))
|
||||
;; (defun load-symbol-file-load-history ()
|
||||
;; "Load the file `fns-VERSION.el' in `exec-directory' if not already done.
|
||||
;; That file records the part of `load-history' for preloaded files,
|
||||
;; which is cleared out before dumping to make Emacs smaller."
|
||||
;; (unless symbol-file-load-history-loaded
|
||||
;; (load (expand-file-name
|
||||
;; ;; fns-XX.YY.ZZ.el does not work on DOS filesystem.
|
||||
;; (if (eq system-type 'ms-dos)
|
||||
;; "fns.el"
|
||||
;; (format "fns-%s.el" emacs-version))
|
||||
;; exec-directory)
|
||||
;; ;; The file name fns-%s.el already has a .el extension.
|
||||
;; nil nil t)
|
||||
;; (setq symbol-file-load-history-loaded t)))
|
||||
|
||||
(defun symbol-file (symbol &optional type)
|
||||
"Return the input source in which SYMBOL was defined.
|
||||
|
@ -1923,6 +1927,10 @@ a system-dependent default device name is used."
|
|||
Otherwise, return nil."
|
||||
(or (stringp object) (null object)))
|
||||
|
||||
(defun booleanp (object)
|
||||
"Return non-nil if OBJECT is one of the two canonical boolean values: t or nil."
|
||||
(memq object '(nil t)))
|
||||
|
||||
|
||||
;;;; Support for yanking and text properties.
|
||||
|
||||
|
|
|
@ -1480,7 +1480,7 @@ in `selection-converter-alist', which see."
|
|||
(re-search-forward
|
||||
(mapconcat 'regexp-quote (split-string search-text) "\\|")
|
||||
nil t)))))
|
||||
(raise-frame))
|
||||
(select-frame-set-input-focus (selected-frame)))
|
||||
|
||||
(defun mac-ae-text (ae)
|
||||
(or (cdr (mac-ae-parameter ae nil "TEXT"))
|
||||
|
@ -1911,9 +1911,10 @@ Switch to a buffer editing the last file dropped."
|
|||
(dolist (file-name (nth 2 event))
|
||||
(dnd-handle-one-url window 'private
|
||||
(concat "file:" file-name))))
|
||||
(raise-frame))
|
||||
(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
|
||||
|
||||
|
|
|
@ -103,6 +103,7 @@ CROSSREF-OPTIONAL lists in `bibtex-entry-field-alist' (which see)."
|
|||
(choice :tag "Init" :value ""
|
||||
string
|
||||
function))))))
|
||||
(put 'bibtex-user-optional-fields 'risky-local-variable t)
|
||||
|
||||
(defcustom bibtex-entry-format
|
||||
'(opts-or-alts required-fields numerical-fields)
|
||||
|
@ -3303,7 +3304,7 @@ Otherwise, use `set-buffer'. DISPLAY is t when called interactively."
|
|||
(display (message "Key `%s' not found" key)))
|
||||
found)
|
||||
|
||||
(let* (case-fold-search
|
||||
(let* ((case-fold-search t)
|
||||
(pnt (save-excursion
|
||||
(goto-char (or start (point-min)))
|
||||
(if (re-search-forward (concat "^[ \t]*\\("
|
||||
|
@ -4330,11 +4331,12 @@ An error is signaled if point is outside key or BibTeX field."
|
|||
"\n")
|
||||
(goto-char endpos)))
|
||||
|
||||
(defun bibtex-url (&optional pos)
|
||||
(defun bibtex-url (&optional pos no-browse)
|
||||
"Browse a URL for the BibTeX entry at point.
|
||||
Optional POS is the location of the BibTeX entry.
|
||||
The URL is generated using the schemes defined in `bibtex-generate-url-list'
|
||||
\(see there\). Then the URL is passed to `browse-url'."
|
||||
\(see there\). Then the URL is passed to `browse-url' unless NO-BROWSE is nil.
|
||||
Return the URL or nil if none can be generated."
|
||||
(interactive)
|
||||
(save-excursion
|
||||
(if pos (goto-char pos))
|
||||
|
@ -4369,8 +4371,10 @@ The URL is generated using the schemes defined in `bibtex-generate-url-list'
|
|||
(error "Match failed: %s" field)))
|
||||
(if fmt (apply 'format fmt (nreverse obj))
|
||||
(apply 'concat (nreverse obj)))))
|
||||
(browse-url (message "%s" url))))
|
||||
(unless url (message "No URL known.")))))
|
||||
(if (interactive-p) (message "%s" url))
|
||||
(unless no-browse (browse-url url))))
|
||||
(if (and (not url) (interactive-p)) (message "No URL known."))
|
||||
url)))
|
||||
|
||||
|
||||
;; Make BibTeX a Feature
|
||||
|
|
|
@ -48,7 +48,7 @@ A value of nil means that any change in indentation starts a new paragraph."
|
|||
"*Non-nil means put two spaces after a colon when filling."
|
||||
:type 'boolean
|
||||
:group 'fill)
|
||||
;;;###autoload(put 'colon-double-space 'safe-local-variable t)
|
||||
;;;###autoload(put 'colon-double-space 'safe-local-variable 'booleanp)
|
||||
|
||||
(defvar fill-paragraph-function nil
|
||||
"Mode-specific function to fill a paragraph, or nil if there is none.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
;; Author: Carsten Dominik <dominik at science dot uva dot nl>
|
||||
;; Keywords: outlines, hypermedia, calendar, wp
|
||||
;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/
|
||||
;; Version: 4.25
|
||||
;; Version: 4.26
|
||||
;;
|
||||
;; This file is part of GNU Emacs.
|
||||
;;
|
||||
|
@ -79,8 +79,11 @@
|
|||
;; excellent reference card made by Philip Rooke. This card can be found
|
||||
;; in the etc/ directory of Emacs 22.
|
||||
;;
|
||||
;; Changes since version 4.00:
|
||||
;; Changes since version 4.10:
|
||||
;; ---------------------------
|
||||
;; Version 4.26
|
||||
;; - Bug fixes.
|
||||
;;
|
||||
;; Version 4.25
|
||||
;; - Revision of the font-lock faces section, with better tty support.
|
||||
;; - TODO keywords in Agenda buffer are fontified.
|
||||
|
@ -119,60 +122,6 @@
|
|||
;; `org-time-stamp-rounding-minutes'.
|
||||
;; - Bug fixes (there are *always* more bugs).
|
||||
;;
|
||||
;; Version 4.10
|
||||
;; - Bug fixes.
|
||||
;;
|
||||
;; Version 4.09
|
||||
;; - Bug fixes.
|
||||
;; - Small improvements to font-lock support.
|
||||
;; - MHE support finalized.
|
||||
;;
|
||||
;; Version 4.08
|
||||
;; - Bug fixes.
|
||||
;; - Improved MHE support
|
||||
;;
|
||||
;; Version 4.07
|
||||
;; - Bug fixes.
|
||||
;; - Leading stars in headlines can be hidden, so make the outline look
|
||||
;; cleaner.
|
||||
;; - Mouse-1 can be used to follow links.
|
||||
;;
|
||||
;; Version 4.06
|
||||
;; - HTML exporter treats targeted internal links.
|
||||
;; - Bug fixes.
|
||||
;;
|
||||
;; Version 4.05
|
||||
;; - Changes to internal link system (thanks to David Wainberg for ideas).
|
||||
;; - in-file links: [[Search String]] instead of <file:::Search String>
|
||||
;; - automatic links to "radio targets".
|
||||
;; - CamelCase not longer active by default, configure org-activate-camels
|
||||
;; if you want to turn it back on.
|
||||
;; - After following a link, `C-c &' jumps back to it.
|
||||
;; - MH-E link support (thanks to Thomas Baumann).
|
||||
;; - Special table lines are no longer exported.
|
||||
;; - Bug fixes and minor improvements.
|
||||
;;
|
||||
;; Version 4.04
|
||||
;; - Cleanup tags display in agenda.
|
||||
;; - Bug fixes.
|
||||
;;
|
||||
;; Version 4.03
|
||||
;; - Table alignment fixed for use with wide characters.
|
||||
;; - `C-c -' leaves cursor in current table line.
|
||||
;; - The current TAG can be incorporated into the agenda prefix.
|
||||
;; See option `org-agenda-prefix-format' for details.
|
||||
;;
|
||||
;; Version 4.02
|
||||
;; - Minor bug fixes and improvements around tag searches.
|
||||
;; - XEmacs compatibility fixes.
|
||||
;;
|
||||
;; Version 4.01
|
||||
;; - Tags can also be set remotely from agenda buffer.
|
||||
;; - Boolean logic for tag searches.
|
||||
;; - Additional agenda commands can be configured through the variable
|
||||
;; `org-agenda-custom-commands'.
|
||||
;; - Minor bug fixes.
|
||||
;;
|
||||
;;; Code:
|
||||
|
||||
(eval-when-compile
|
||||
|
@ -188,7 +137,7 @@
|
|||
|
||||
;;; Customization variables
|
||||
|
||||
(defvar org-version "4.25"
|
||||
(defvar org-version "4.26"
|
||||
"The version number of the file org.el.")
|
||||
(defun org-version ()
|
||||
(interactive)
|
||||
|
@ -198,7 +147,7 @@
|
|||
;; of outline.el.
|
||||
(defconst org-noutline-p (featurep 'noutline)
|
||||
"Are we using the new outline mode?")
|
||||
(defconst org-xemacs-p (featurep 'xemacs)) ;; FIXME: used by external code?
|
||||
(defconst org-xemacs-p (featurep 'xemacs)) ; not used by org.el itself
|
||||
(defconst org-format-transports-properties-p
|
||||
(let ((x "a"))
|
||||
(add-text-properties 0 1 '(test t) x)
|
||||
|
@ -2383,7 +2332,10 @@ This face is only used if `org-fontify-done-headline' is set."
|
|||
(defvar orgtbl-mode) ; defined later in this file
|
||||
;;; Define the mode
|
||||
|
||||
(defvar org-mode-map (copy-keymap outline-mode-map)
|
||||
(defvar org-mode-map
|
||||
(if (and (not (keymapp outline-mode-map)) (featurep 'allout))
|
||||
(error "Conflict with outdated version of allout.el. Load org.el before allout.el, or ugrade to newer allout, for example by switching to Emacs 22.")
|
||||
(copy-keymap outline-mode-map))
|
||||
"Keymap for Org-mode.")
|
||||
|
||||
(defvar org-struct-menu) ; defined later in this file
|
||||
|
@ -7448,9 +7400,8 @@ optional argument IN-EMACS is non-nil, Emacs will visit the file."
|
|||
(org-add-props cmd nil
|
||||
'face 'org-warning))))
|
||||
(progn
|
||||
(message "Executing %s..." cmd)
|
||||
(shell-command cmd)
|
||||
(message "Executing %s...done" cmd))
|
||||
(message "Executing %s" cmd)
|
||||
(shell-command cmd))
|
||||
(error "Abort"))))
|
||||
|
||||
(t
|
||||
|
@ -7904,8 +7855,7 @@ If the file does not exist, an error is thrown."
|
|||
(setq cmd 'emacs))))
|
||||
(cond
|
||||
((and (stringp cmd) (not (string-match "^\\s-*$" cmd)))
|
||||
; (setq cmd (format cmd (concat "\"" file "\"")))
|
||||
;; FIXME: normalize use of quotes
|
||||
;; Normalize use of quote, this can vary.
|
||||
(if (string-match "['\"]%s['\"]" cmd)
|
||||
(setq cmd (replace-match "'%s'" t t cmd)))
|
||||
(setq cmd (format cmd file))
|
||||
|
@ -8958,10 +8908,10 @@ Optional argument NEW may specify text to replace the current field content."
|
|||
e (not (= (match-beginning 2) (match-end 2))))
|
||||
(setq f (format (if num " %%%ds %s" " %%-%ds %s")
|
||||
l (if e "|" (setq org-table-may-need-update t) ""))
|
||||
n (format f s t t))
|
||||
n (format f s))
|
||||
(if new
|
||||
(if (<= (length new) l)
|
||||
(setq n (format f new t t)) ;; FIXME: why t t?????
|
||||
(if (<= (length new) l) ;; FIXME: length -> str-width?
|
||||
(setq n (format f new t t)) ;; FIXME: t t?
|
||||
(setq n (concat new "|") org-table-may-need-update t)))
|
||||
(or (equal n o)
|
||||
(let (org-table-may-need-update)
|
||||
|
@ -12277,16 +12227,6 @@ stacked delimiters is N. Escaping delimiters is not possible."
|
|||
(setq string (replace-match (match-string 1 string) t t string))))
|
||||
string)
|
||||
|
||||
;(defun org-export-html-convert-emphasize (string)
|
||||
; (let (c (s 0))
|
||||
; (while (string-match "\\(\\W\\|^\\)\\([*/_]\\)\\(\\w+\\)\\2\\(\\W\\|$\\)" string s)
|
||||
; (setq c (cdr (assoc (match-string 2 string)
|
||||
; '(("*" . "b") ("/" . "i") ("_" . "u"))))
|
||||
; s (+ (match-end 0) 3)
|
||||
; string (replace-match
|
||||
; (concat "\\1<" c ">\\3</" c ">\\4") t nil string)))
|
||||
; string))
|
||||
|
||||
(defun org-export-html-convert-emphasize (string)
|
||||
(while (string-match org-italic-re string)
|
||||
(setq string (replace-match "\\1<i>\\3</i>\\4" t nil string)))
|
||||
|
@ -12496,7 +12436,7 @@ The XOXO buffer is named *xoxo-<source buffer name>*"
|
|||
|
||||
;; Finish the buffer off and clean it up.
|
||||
(switch-to-buffer-other-window out)
|
||||
(indent-region (point-min) (point-max))
|
||||
(indent-region (point-min) (point-max) nil)
|
||||
(save-buffer)
|
||||
(goto-char (point-min))
|
||||
)))
|
||||
|
@ -12719,6 +12659,8 @@ a time), or the day by one (if it does not contain a time)."
|
|||
(define-key org-mode-map [?\C-c ?\C-x (right)] 'org-shiftright)
|
||||
|
||||
;; All the other keys
|
||||
|
||||
(define-key org-mode-map "\C-c\C-a" 'show-all) ; in case allout messed up.
|
||||
(define-key org-mode-map "\C-c$" 'org-archive-subtree)
|
||||
(define-key org-mode-map "\C-c\C-j" 'org-goto)
|
||||
(define-key org-mode-map "\C-c\C-t" 'org-todo)
|
||||
|
|
|
@ -81,7 +81,7 @@ to paragraphs. The fill functions insert and delete only soft newlines."
|
|||
(set-hard-newline-properties (point) (1+ (point)))))))))))
|
||||
|
||||
(defcustom paragraph-start "\f\\|[ \t]*$" "\
|
||||
*Regexp for beginning of a line that starts OR separates paragraphs.
|
||||
Regexp for beginning of a line that starts OR separates paragraphs.
|
||||
This regexp should match lines that separate paragraphs
|
||||
and should also match lines that start a paragraph
|
||||
\(and are part of that paragraph).
|
||||
|
@ -107,7 +107,7 @@ hard newline are considered to match."
|
|||
;; start a new paragraph).
|
||||
|
||||
(defcustom paragraph-separate "[ \t\f]*$"
|
||||
"*Regexp for beginning of a line that separates paragraphs.
|
||||
"Regexp for beginning of a line that separates paragraphs.
|
||||
If you change this, you may have to change `paragraph-start' also.
|
||||
|
||||
This is matched against the text at the left margin, which is not necessarily
|
||||
|
@ -119,7 +119,7 @@ text indented by a margin setting."
|
|||
;;;###autoload(put 'paragraph-separate 'safe-local-variable 'stringp)
|
||||
|
||||
(defcustom sentence-end-double-space t
|
||||
"*Non-nil means a single space does not end a sentence.
|
||||
"Non-nil means a single space does not end a sentence.
|
||||
This is relevant for filling. See also `sentence-end-without-period'
|
||||
and `colon-double-space'.
|
||||
|
||||
|
@ -128,10 +128,10 @@ regexp describing the end of a sentence, when the value of the variable
|
|||
`sentence-end' is nil. See Info node `(elisp)Standard Regexps'."
|
||||
:type 'boolean
|
||||
:group 'fill)
|
||||
;;;###autoload(put 'sentence-end-double-space 'safe-local-variable t)
|
||||
;;;###autoload(put 'sentence-end-double-space 'safe-local-variable 'booleanp)
|
||||
|
||||
(defcustom sentence-end-without-period nil
|
||||
"*Non-nil means a sentence will end without a period.
|
||||
"Non-nil means a sentence will end without a period.
|
||||
For example, a sentence in Thai text ends with double space but
|
||||
without a period.
|
||||
|
||||
|
@ -140,21 +140,21 @@ regexp describing the end of a sentence, when the value of the variable
|
|||
`sentence-end' is nil. See Info node `(elisp)Standard Regexps'."
|
||||
:type 'boolean
|
||||
:group 'fill)
|
||||
;;;###autoload(put 'sentence-end-without-period 'safe-local-variable t)
|
||||
;;;###autoload(put 'sentence-end-without-period 'safe-local-variable 'booleanp)
|
||||
|
||||
(defcustom sentence-end-without-space
|
||||
"$B!#!%!)!*$A!##.#?#!$(0!$!%!)!*$(G!$!%!)!*(B"
|
||||
"*String of characters that end sentence without following spaces.
|
||||
"String of characters that end sentence without following spaces.
|
||||
|
||||
This value is used by the function `sentence-end' to construct the
|
||||
regexp describing the end of a sentence, when the value of the variable
|
||||
`sentence-end' is nil. See Info node `(elisp)Standard Regexps'."
|
||||
:group 'paragraphs
|
||||
:type 'string)
|
||||
;;;###autoload(put 'sentence-end-without-space 'safe-local-variable t)
|
||||
;;;###autoload(put 'sentence-end-without-space 'safe-local-variable 'stringp)
|
||||
|
||||
(defcustom sentence-end nil
|
||||
"*Regexp describing the end of a sentence.
|
||||
"Regexp describing the end of a sentence.
|
||||
The value includes the whitespace following the sentence.
|
||||
All paragraph boundaries also end sentences, regardless.
|
||||
|
||||
|
@ -166,7 +166,7 @@ to obtain the value of this variable."
|
|||
;;;###autoload(put 'sentence-end 'safe-local-variable 'string-or-null-p)
|
||||
|
||||
(defcustom sentence-end-base "[.?!][]\"'$B!I$,1r}(B)}]*"
|
||||
"*Regexp matching the basic end of a sentence, not including following space."
|
||||
"Regexp matching the basic end of a sentence, not including following space."
|
||||
:group 'paragraphs
|
||||
:type 'string
|
||||
:version "22.1")
|
||||
|
@ -195,17 +195,17 @@ in between. See Info node `(elisp)Standard Regexps'."
|
|||
"[ \t\n]*")))
|
||||
|
||||
(defcustom page-delimiter "^\014"
|
||||
"*Regexp describing line-beginnings that separate pages."
|
||||
"Regexp describing line-beginnings that separate pages."
|
||||
:group 'paragraphs
|
||||
:type 'regexp)
|
||||
;;;###autoload(put 'page-delimiter 'safe-local-variable t)
|
||||
;;;###autoload(put 'page-delimiter 'safe-local-variable 'stringp)
|
||||
|
||||
(defcustom paragraph-ignore-fill-prefix nil
|
||||
"*Non-nil means the paragraph commands are not affected by `fill-prefix'.
|
||||
"Non-nil means the paragraph commands are not affected by `fill-prefix'.
|
||||
This is desirable in modes where blank lines are the paragraph delimiters."
|
||||
:group 'paragraphs
|
||||
:type 'boolean)
|
||||
;;;###autoload(put 'paragraph-ignore-fill-prefix 'safe-local-variable t)
|
||||
;;;###autoload(put 'paragraph-ignore-fill-prefix 'safe-local-variable 'booleanp)
|
||||
|
||||
(defun forward-paragraph (&optional arg)
|
||||
"Move forward to end of paragraph.
|
||||
|
|
|
@ -948,7 +948,7 @@ Instead of nil or t, this may also be a string of type letters indicating
|
|||
the label types for which it should be true."
|
||||
:group 'reftex-referencing-labels
|
||||
:type `(choice :tag "\\vref is default macro" ,@reftex-tmp))
|
||||
;;;###autoload(put 'reftex-vref-is-default 'safe-local-variable t)
|
||||
;;;###autoload(put 'reftex-vref-is-default 'safe-local-variable (lambda (x) (or (stringp x) (symbolp x))))
|
||||
|
||||
(defcustom reftex-fref-is-default nil
|
||||
"*Non-nil means, the fancyref macro \\fref is used as default.
|
||||
|
@ -959,7 +959,7 @@ Instead of nil or t, this may also be a string of type letters indicating
|
|||
the label types for which it should be true."
|
||||
:group 'reftex-referencing-labels
|
||||
:type `(choice :tag "\\fref is default macro" ,@reftex-tmp))
|
||||
;;;###autoload(put 'reftex-fref-is-default 'safe-local-variable t)
|
||||
;;;###autoload(put 'reftex-fref-is-default 'safe-local-variable (lambda (x) (or (stringp x) (symbolp x))))
|
||||
|
||||
(defcustom reftex-level-indent 2
|
||||
"*Number of spaces to be used for indentation per section level."
|
||||
|
@ -975,7 +975,7 @@ immediately offer the correct label menu - otherwise it will prompt you for
|
|||
a label type. If you set this variable to nil, RefTeX will always prompt."
|
||||
:group 'reftex-referencing-labels
|
||||
:type 'boolean)
|
||||
;;;###autoload(put 'reftex-guess-label-type 'safe-local-variable t)
|
||||
;;;###autoload(put 'reftex-guess-label-type 'safe-local-variable (lambda (x) (memq x '(nil t))))
|
||||
|
||||
(defcustom reftex-format-ref-function nil
|
||||
"Function which produces the string to insert as a reference.
|
||||
|
|
|
@ -164,7 +164,7 @@ Do not change `time-stamp-line-limit', `time-stamp-start',
|
|||
incompatible with other people's files! If you must change them for some
|
||||
application, do so in the local variables section of the time-stamped file
|
||||
itself.")
|
||||
;;;###autoload(put 'time-stamp-start 'safe-local-variable t)
|
||||
;;;###autoload(put 'time-stamp-start 'safe-local-variable 'stringp)
|
||||
|
||||
(defvar time-stamp-end "\\\\?[\">]" ;Do not change!
|
||||
"Regexp marking the text after the time stamp.
|
||||
|
@ -184,7 +184,7 @@ Do not change `time-stamp-start', `time-stamp-end', `time-stamp-pattern',
|
|||
or `time-stamp-inserts-lines' for yourself or you will be incompatible
|
||||
with other people's files! If you must change them for some application,
|
||||
do so in the local variables section of the time-stamped file itself.")
|
||||
;;;###autoload(put 'time-stamp-end 'safe-local-variable t)
|
||||
;;;###autoload(put 'time-stamp-end 'safe-local-variable 'stringp)
|
||||
|
||||
|
||||
(defvar time-stamp-inserts-lines nil ;Do not change!
|
||||
|
@ -201,7 +201,7 @@ Do not change `time-stamp-end' or `time-stamp-inserts-lines' for
|
|||
yourself or you will be incompatible with other people's files!
|
||||
If you must change them for some application, do so in the local
|
||||
variables section of the time-stamped file itself.")
|
||||
;;;###autoload(put 'time-stamp-inserts-lines 'safe-local-variable t)
|
||||
;;;###autoload(put 'time-stamp-inserts-lines 'safe-local-variable 'symbolp)
|
||||
|
||||
|
||||
(defvar time-stamp-count 1 ;Do not change!
|
||||
|
|
|
@ -267,14 +267,20 @@ holds a keymap."
|
|||
;;(tool-bar-add-item-from-menu 'compose-mail "mail/compose")
|
||||
|
||||
(tool-bar-add-item-from-menu 'print-buffer "print")
|
||||
(tool-bar-add-item "preferences" 'customize 'customize
|
||||
:help "Edit preferences (customize)")
|
||||
|
||||
(tool-bar-add-item "help" (lambda ()
|
||||
(interactive)
|
||||
(popup-menu menu-bar-help-menu))
|
||||
'help
|
||||
:help "Pop up the Help menu")
|
||||
;; tool-bar-add-item-from-menu itself operates on
|
||||
;; (default-value 'tool-bar-map), but when we don't use that function,
|
||||
;; we must explicitly operate on the default value.
|
||||
|
||||
(let ((tool-bar-map (default-value 'tool-bar-map)))
|
||||
(tool-bar-add-item "preferences" 'customize 'customize
|
||||
:help "Edit preferences (customize)")
|
||||
|
||||
(tool-bar-add-item "help" (lambda ()
|
||||
(interactive)
|
||||
(popup-menu menu-bar-help-menu))
|
||||
'help
|
||||
:help "Pop up the Help menu"))
|
||||
)
|
||||
|
||||
(provide 'tool-bar)
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
2006-04-26 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* url-gw.el (url-open-stream): Don't hide errors.
|
||||
(url-gateway-nslookup-host, url-open-telnet): Use with-current-buffer.
|
||||
|
||||
* url-handlers.el (url-insert): New function.
|
||||
(url-insert-file-contents): Use it.
|
||||
|
||||
2006-03-29 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* url-handlers.el (url-handler-directory-file-name): New handler.
|
||||
|
|
|
@ -118,8 +118,7 @@ linked Emacs under SunOS 4.x"
|
|||
url-gateway-nslookup-program host))
|
||||
(res host))
|
||||
(set-process-query-on-exit-flag proc nil)
|
||||
(save-excursion
|
||||
(set-buffer (process-buffer proc))
|
||||
(with-current-buffer (process-buffer proc)
|
||||
(while (memq (process-status proc) '(run open))
|
||||
(accept-process-output proc))
|
||||
(goto-char (point-min))
|
||||
|
@ -168,8 +167,7 @@ linked Emacs under SunOS 4.x"
|
|||
(defun url-open-telnet (name buffer host service)
|
||||
(if (not (stringp service))
|
||||
(setq service (int-to-string service)))
|
||||
(save-excursion
|
||||
(set-buffer (get-buffer-create buffer))
|
||||
(with-current-buffer (get-buffer-create buffer)
|
||||
(erase-buffer)
|
||||
(let ((proc (start-process name buffer "telnet" "-8"))
|
||||
(case-fold-search t))
|
||||
|
@ -261,11 +259,15 @@ Will not make a connection if `url-gateway-unplugged' is non-nil."
|
|||
(otherwise
|
||||
(error "Bad setting of url-gateway-method: %s"
|
||||
url-gateway-method)))))
|
||||
(error
|
||||
(setq conn nil)))
|
||||
;; Ignoring errors here seems wrong. E.g. it'll throw away the
|
||||
;; error signalled two lines above. It was also found inconvenient
|
||||
;; during debugging.
|
||||
;; (error
|
||||
;; (setq conn nil))
|
||||
)
|
||||
conn)))
|
||||
|
||||
(provide 'url-gw)
|
||||
|
||||
;;; arch-tag: 1c4c0317-6d03-45b8-b3f3-838bd8f9d838
|
||||
;; arch-tag: 1c4c0317-6d03-45b8-b3f3-838bd8f9d838
|
||||
;;; url-gw.el ends here
|
||||
|
|
|
@ -216,33 +216,47 @@ accessible."
|
|||
(url-copy-file url filename)
|
||||
filename))
|
||||
|
||||
(defun url-insert (buffer &optional beg end)
|
||||
"Insert the body of a URL object.
|
||||
BUFFER should be a complete URL buffer as returned by `url-retrieve'.
|
||||
If the headers specify a coding-system, it is applied to the body before it is inserted.
|
||||
Returns a list of the form (SIZE CHARSET), where SIZE is the size in bytes
|
||||
of the inserted text and CHARSET is the charset that was specified in the header,
|
||||
or nil if none was found.
|
||||
BEG and END can be used to only insert a subpart of the body.
|
||||
They count bytes from the beginning of the body."
|
||||
(let* ((handle (with-current-buffer buffer (mm-dissect-buffer t)))
|
||||
(data (with-current-buffer (mm-handle-buffer handle)
|
||||
(if beg
|
||||
(buffer-substring (+ (point-min) beg)
|
||||
(if end (+ (point-min) end) (point-max)))
|
||||
(buffer-string))))
|
||||
(charset (mail-content-type-get (mm-handle-type handle)
|
||||
'charset)))
|
||||
(mm-destroy-parts handle)
|
||||
(if charset
|
||||
(insert (mm-decode-string data (mm-charset-to-coding-system charset)))
|
||||
(insert data))
|
||||
(list (length data) charset)))
|
||||
|
||||
;;;###autoload
|
||||
(defun url-insert-file-contents (url &optional visit beg end replace)
|
||||
(let ((buffer (url-retrieve-synchronously url))
|
||||
(handle nil)
|
||||
(charset nil)
|
||||
(data nil))
|
||||
(let ((buffer (url-retrieve-synchronously url)))
|
||||
(if (not buffer)
|
||||
(error "Opening input file: No such file or directory, %s" url))
|
||||
(if visit (setq buffer-file-name url))
|
||||
(with-current-buffer buffer
|
||||
(setq handle (mm-dissect-buffer t))
|
||||
(set-buffer (mm-handle-buffer handle))
|
||||
(setq data (if beg (buffer-substring beg end)
|
||||
(buffer-string))))
|
||||
(kill-buffer buffer)
|
||||
(mm-destroy-parts handle)
|
||||
(if replace (delete-region (point-min) (point-max)))
|
||||
(save-excursion
|
||||
(setq charset (mail-content-type-get (mm-handle-type handle)
|
||||
'charset))
|
||||
(let ((start (point)))
|
||||
(if charset
|
||||
(insert (mm-decode-string data (mm-charset-to-coding-system charset)))
|
||||
(progn
|
||||
(insert data)
|
||||
(decode-coding-inserted-region start (point) url visit beg end replace)))))
|
||||
(list url (length data))))
|
||||
(let* ((start (point))
|
||||
(size-and-charset (url-insert buffer beg end)))
|
||||
(kill-buffer buffer)
|
||||
(when replace
|
||||
(delete-region (point-min) start)
|
||||
(delete-region (point) (point-max)))
|
||||
(unless (cadr size-and-charset)
|
||||
;; If the headers don't specify any particular charset, use the
|
||||
;; usual heuristic/rules that we apply to files.
|
||||
(decode-coding-inserted-region start (point) url visit beg end replace))
|
||||
(list url (car size-and-charset))))))
|
||||
|
||||
(defun url-file-name-completion (url directory)
|
||||
(error "Unimplemented"))
|
||||
|
|
|
@ -1,3 +1,35 @@
|
|||
2006-05-01 Richard Stallman <rms@gnu.org>
|
||||
|
||||
* intro.texi (nil and t): Clarify.
|
||||
|
||||
* variables.texi (File Local Variables): Suggest using booleanp.
|
||||
|
||||
2006-05-01 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* objects.texi (Type Predicates): Fix typos.
|
||||
|
||||
2006-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* intro.texi (nil and t): Add booleanp.
|
||||
|
||||
* objects.texi (Type Predicates): Add links for booleanp and
|
||||
string-or-null-p.
|
||||
|
||||
2006-04-29 Richard Stallman <rms@gnu.org>
|
||||
|
||||
* modes.texi (Multiline Font Lock): Rename from
|
||||
Multi line Font Lock Elements. Much clarification.
|
||||
(Font Lock Multiline, Region to Fontify): Much clarification.
|
||||
|
||||
2006-04-29 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* variables.texi (File Local Variables): Remove the special case t for
|
||||
safe-local-variable.
|
||||
|
||||
2006-04-26 Richard Stallman <rms@gnu.org>
|
||||
|
||||
* syntax.texi (Parsing Expressions): Minor cleanup.
|
||||
|
||||
2006-04-18 Richard Stallman <rms@gnu.org>
|
||||
|
||||
* tips.texi (Coding Conventions): Explain when the package's
|
||||
|
@ -60,7 +92,7 @@
|
|||
|
||||
2006-03-25 Karl Berry <karl@gnu.org>
|
||||
|
||||
* elisp.texi: use @copyright{} instead of (C), and do not indent
|
||||
* elisp.texi: Use @copyright{} instead of (C), and do not indent
|
||||
the year list.
|
||||
|
||||
2006-03-21 Nick Roberts <nickrob@snap.net.nz>
|
||||
|
@ -94,7 +126,7 @@
|
|||
|
||||
* display.texi (Defining Images): Fix example in
|
||||
image-load-path-for-library by not recommending that one binds
|
||||
image-load-path. Just defvar it to placate compiler and only use
|
||||
image-load-path. Just defvar it to placate compiler and only use
|
||||
it if previously defined.
|
||||
|
||||
2006-03-14 Bill Wohler <wohler@newt.com>
|
||||
|
@ -566,11 +598,11 @@
|
|||
|
||||
2005-09-26 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* errors.texi (Standard Errors): Corrected xrefs.
|
||||
* errors.texi (Standard Errors): Correct xrefs.
|
||||
|
||||
2005-09-18 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* display.texi (Defining Images): Updated documentation for
|
||||
* display.texi (Defining Images): Update documentation for
|
||||
`image-load-path'.
|
||||
|
||||
2005-09-17 Richard M. Stallman <rms@gnu.org>
|
||||
|
|
|
@ -163,7 +163,7 @@ person reading this manual, are thought of as ``the programmer'' and are
|
|||
addressed as ``you''. ``The user'' is the person who uses Lisp
|
||||
programs, including those you write.
|
||||
|
||||
@cindex fonts
|
||||
@cindex fonts in this manual
|
||||
Examples of Lisp code are formatted like this: @code{(list 1 2 3)}.
|
||||
Names that represent metasyntactic variables, or arguments to a function
|
||||
being described, are formatted like this: @var{first-number}.
|
||||
|
@ -187,14 +187,14 @@ readers. After the Lisp reader has read either @samp{()} or @samp{nil},
|
|||
there is no way to determine which representation was actually written
|
||||
by the programmer.
|
||||
|
||||
In this manual, we use @code{()} when we wish to emphasize that it
|
||||
means the empty list, and we use @code{nil} when we wish to emphasize
|
||||
In this manual, we write @code{()} when we wish to emphasize that it
|
||||
means the empty list, and we write @code{nil} when we wish to emphasize
|
||||
that it means the truth value @var{false}. That is a good convention to use
|
||||
in Lisp programs also.
|
||||
|
||||
@example
|
||||
(cons 'foo ()) ; @r{Emphasize the empty list}
|
||||
(not nil) ; @r{Emphasize the truth value @var{false}}
|
||||
(setq foo-flag nil) ; @r{Emphasize the truth value @var{false}}
|
||||
@end example
|
||||
|
||||
@cindex @code{t}, uses of
|
||||
|
@ -212,6 +212,11 @@ to use them as constants in a program. An attempt to change their
|
|||
values results in a @code{setting-constant} error. @xref{Constant
|
||||
Variables}.
|
||||
|
||||
@defun booleanp object
|
||||
Return non-nil iff @var{object} is one of the two canonical boolean
|
||||
values: @code{t} or @code{nil}.
|
||||
@end defun
|
||||
|
||||
@node Evaluation Notation
|
||||
@subsection Evaluation Notation
|
||||
@cindex evaluation notation
|
||||
|
|
|
@ -2336,8 +2336,6 @@ Search-based fontification happens second.
|
|||
* Font Lock Basics:: Overview of customizing Font Lock.
|
||||
* Search-based Fontification:: Fontification based on regexps.
|
||||
* Customizing Keywords:: Customizing search-based fontification.
|
||||
* Region to Fontify:: Controlling which region gets refontified
|
||||
after a buffer change.
|
||||
* Other Font Lock Variables:: Additional customization facilities.
|
||||
* Levels of Font Lock:: Each mode can define alternative levels
|
||||
so that the user can select more or less.
|
||||
|
@ -2347,6 +2345,8 @@ Search-based fontification happens second.
|
|||
* Syntactic Font Lock:: Fontification based on syntax tables.
|
||||
* Setting Syntax Properties:: Defining character syntax based on context
|
||||
using the Font Lock mechanism.
|
||||
* Multiline Font Lock:: How to coerce Font Lock into properly
|
||||
highlighting multiline constructs.
|
||||
@end menu
|
||||
|
||||
@node Font Lock Basics
|
||||
|
@ -2623,16 +2623,9 @@ this value of @code{font-lock-keywords} is used in a buffer.
|
|||
Its value should have one of the forms described in this table.
|
||||
@end table
|
||||
|
||||
@vindex font-lock-multiline
|
||||
@strong{Warning:} Do not design an element of @code{font-lock-keywords}
|
||||
to match text which spans lines; this does not work reliably. While
|
||||
@code{font-lock-fontify-buffer} handles multi-line patterns correctly,
|
||||
updating when you edit the buffer does not, since it considers text one
|
||||
line at a time. If you have patterns that typically only span one
|
||||
line but can occasionally span two or three, such as
|
||||
@samp{<title>...</title>}, you can ask Font Lock to be more careful by
|
||||
setting @code{font-lock-multiline} to @code{t}. But it still will not
|
||||
work in all cases.
|
||||
to match text which spans lines; this does not work reliably.
|
||||
For details, see @xref{Multiline Font Lock}.
|
||||
|
||||
You can use @var{case-fold} in @code{font-lock-defaults} to specify
|
||||
the value of @code{font-lock-keywords-case-fold-search} which says
|
||||
|
@ -2718,36 +2711,6 @@ C mode @emph{and} all modes derived from it, do this instead:
|
|||
font-lock-keyword-face)))))
|
||||
@end smallexample
|
||||
|
||||
@node Region to Fontify
|
||||
@subsection Region to Fontify after a Buffer Change
|
||||
|
||||
When a buffer is changed, the region that Font Lock refontifies is by
|
||||
default the smallest sequence of whole lines that spans the change.
|
||||
While this works well most of the time, sometimes it doesn't---for
|
||||
example, when a buffer change has changed the syntactic meaning of text
|
||||
on an earlier line.
|
||||
|
||||
You can enlarge (or even reduce) the region to fontify by setting either
|
||||
of the following variables:
|
||||
|
||||
@defvar font-lock-extend-region-function
|
||||
This buffer-local variable is either @code{nil} or is a function that
|
||||
determines the region to fontify, which Emacs then calls after each
|
||||
buffer change.
|
||||
|
||||
The function is given three parameters, the standard @var{beg},
|
||||
@var{end}, and @var{old-len} from after-change-functions (@pxref{Change
|
||||
Hooks}). It should return either a cons of the beginning and end buffer
|
||||
positions (in that order) of the region to fontify, or @code{nil} (which
|
||||
directs the caller to fontify the default region). This function need
|
||||
not preserve point or the match-data, but must preserve the current
|
||||
restriction. The region it returns may start or end in the middle of a
|
||||
line.
|
||||
|
||||
Since this function is called after every buffer change, it should be
|
||||
reasonably fast.
|
||||
@end defvar
|
||||
|
||||
@node Other Font Lock Variables
|
||||
@subsection Other Font Lock Variables
|
||||
|
||||
|
@ -2981,8 +2944,8 @@ value returns @code{font-lock-comment-face} for comments and
|
|||
|
||||
This can be used to highlighting different kinds of strings or
|
||||
comments differently. It is also sometimes abused together with
|
||||
@code{font-lock-syntactic-keywords} to highlight elements that span
|
||||
multiple lines, but this is too obscure to document in this manual.
|
||||
@code{font-lock-syntactic-keywords} to highlight constructs that span
|
||||
multiple lines, but this is too esoteric to document here.
|
||||
|
||||
Specify this variable using @var{other-vars} in
|
||||
@code{font-lock-defaults}.
|
||||
|
@ -3052,6 +3015,145 @@ Major modes normally set this variable with @var{other-vars} in
|
|||
@code{font-lock-defaults}.
|
||||
@end defvar
|
||||
|
||||
@node Multiline Font Lock
|
||||
@subsection Multiline Font Lock Constructs
|
||||
@cindex multiline font lock
|
||||
|
||||
Normally, elements of @code{font-lock-keywords} should not match
|
||||
across multiple lines; that doesn't work reliably, because Font Lock
|
||||
usually scans just part of the buffer, and it can miss a multi-line
|
||||
construct that crosses the line boundary where the scan starts. (The
|
||||
scan normally starts at the beginning of a line.)
|
||||
|
||||
Making elements that match multiline constructs work properly has
|
||||
two aspects: correct @emph{identification} and correct
|
||||
@emph{rehighlighting}. The first means that Font Lock finds all
|
||||
multiline constructs. The second means that Font Lock will correctly
|
||||
rehighlight all the relevant text when a multiline construct is
|
||||
changed---for example, if some of the text that was previously part of
|
||||
a multiline construct ceases to be part of it. The two aspects are
|
||||
closely related, and often getting one of them to work will appear to
|
||||
make the other also work. However, for reliable results you must
|
||||
attend explicitly to both aspects.
|
||||
|
||||
There are two ways to ensure correct identification of multiline
|
||||
constructs:
|
||||
|
||||
@itemize
|
||||
@item
|
||||
Place a @code{font-lock-multiline} or @code{jit-lock-defer-multiline}
|
||||
property on the construct when it is added to the buffer.
|
||||
@item
|
||||
Use @code{font-lock-fontify-region-function} hook to extend the scan
|
||||
so that the scanned text never starts or ends in the middle of a
|
||||
multiline construct.
|
||||
@end itemize
|
||||
|
||||
There are three ways to do rehighlighting of multiline constructs:
|
||||
|
||||
@itemize
|
||||
@item
|
||||
Place a @code{font-lock-multiline} property on the construct. This
|
||||
will rehighlight the whole construct if any part of it is changed. In
|
||||
some cases you can do this automatically by setting the
|
||||
@code{font-lock-multiline} variable.
|
||||
@item
|
||||
Use @code{jit-lock-contextually}. This will only rehighlight the part
|
||||
of the construct that follows the actual change, and will do it after
|
||||
a short delay. This only works if the highlighting of the various
|
||||
parts of your multiline construct never depends on text in subsequent
|
||||
lines. Since @code{jit-lock-contextually} is activated by default,
|
||||
this can be an attractive solution.
|
||||
@item
|
||||
Place a @code{jit-lock-defer-multiline} property on the construct.
|
||||
This works only if @code{jit-lock-contextually} is used, but it can
|
||||
handle the case where highlighting depends on subsequent lines.
|
||||
@item
|
||||
@end itemize
|
||||
|
||||
@menu
|
||||
* Font Lock Multiline:: Marking multiline chunks with a text property
|
||||
* Region to Fontify:: Controlling which region gets refontified
|
||||
after a buffer change.
|
||||
@end menu
|
||||
|
||||
@node Font Lock Multiline
|
||||
@subsubsection Font Lock Multiline
|
||||
|
||||
One way to ensure reliable rehighlighting of multiline Font Lock
|
||||
constructs is to put on the text property @code{font-lock-multiline}.
|
||||
It should be present and non-@code{nil} for text that is part of a
|
||||
multiline construct.
|
||||
|
||||
When Font Lock is about to highlight a range of text, it first
|
||||
extends the boundaries of the range as necessary so that they do not
|
||||
fall within text marked with the @code{font-lock-multiline} property.
|
||||
Then it removes any @code{font-lock-multiline} properties from the
|
||||
range, and highlights it. The highlighting specification (mostly
|
||||
@code{font-lock-keywords}) must reinstall this property each time,
|
||||
whenever it is appropriate.
|
||||
|
||||
@strong{Warning:} don't use the @code{font-lock-multiline} property
|
||||
on large ranges of text, because that will make rehighlighting slow.
|
||||
|
||||
@defvar font-lock-multiline
|
||||
If the @code{font-lock-multiline} variable is set to @code{t}, Font
|
||||
Lock will try to add the @code{font-lock-multiline} property
|
||||
automatically on multiline constructs. This is not a universal
|
||||
solution, however, since it slows down Font Lock somewhat. It can
|
||||
miss some multiline constructs, or make the property larger or smaller
|
||||
than necessary.
|
||||
|
||||
For elements whose @var{matcher} is a function, the function should
|
||||
ensure that submatch 0 covers the whole relevant multiline construct,
|
||||
even if only a small subpart will be highlighted. It is often just as
|
||||
easy to add the @code{font-lock-multiline} property by hand.
|
||||
@end defvar
|
||||
|
||||
The @code{font-lock-multiline} property is meant to ensure proper
|
||||
refontification; it does not automatically identify new multiline
|
||||
constructs. Identifying the requires that Font-Lock operate on large
|
||||
enough chunks at a time. This will happen by accident on many cases,
|
||||
which may give the impression that multiline constructs magically work.
|
||||
If you set the @code{font-lock-multiline} variable non-@code{nil},
|
||||
this impression will be even stronger, since the highlighting of those
|
||||
constructs which are found will be properly updated from then on.
|
||||
But that does not work reliably.
|
||||
|
||||
To find multiline constructs reliably, you must either manually
|
||||
place the @code{font-lock-multiline} property on the text before
|
||||
Font-Lock looks at it, or use
|
||||
@code{font-lock-fontify-region-function}.
|
||||
|
||||
@node Region to Fontify
|
||||
@subsubsection Region to Fontify after a Buffer Change
|
||||
|
||||
When a buffer is changed, the region that Font Lock refontifies is
|
||||
by default the smallest sequence of whole lines that spans the change.
|
||||
While this works well most of the time, sometimes it doesn't---for
|
||||
example, when a change alters the syntactic meaning of text on an
|
||||
earlier line.
|
||||
|
||||
You can enlarge (or even reduce) the region to fontify by setting
|
||||
one the following variables:
|
||||
|
||||
@defvar font-lock-extend-region-function
|
||||
This buffer-local variable is either @code{nil} or a function for
|
||||
Font-Lock to call to determine the region to scan and fontify.
|
||||
|
||||
The function is given three parameters, the standard @var{beg},
|
||||
@var{end}, and @var{old-len} from after-change-functions
|
||||
(@pxref{Change Hooks}). It should return either a cons of the
|
||||
beginning and end buffer positions (in that order) of the region to
|
||||
fontify, or @code{nil} (which means choose the region in the standard
|
||||
way). This function needs to preserve point, the match-data, and the
|
||||
current restriction. The region it returns may start or end in the
|
||||
middle of a line.
|
||||
|
||||
Since this function is called after every buffer change, it should be
|
||||
reasonably fast.
|
||||
@end defvar
|
||||
|
||||
@node Desktop Save Mode
|
||||
@section Desktop Save Mode
|
||||
@cindex desktop save mode
|
||||
|
|
|
@ -1779,6 +1779,12 @@ with references to further information.
|
|||
|
||||
@item windowp
|
||||
@xref{Basic Windows, windowp}.
|
||||
|
||||
@item booleanp
|
||||
@xref{nil and t, booleanp}.
|
||||
|
||||
@item string-or-null-p
|
||||
@xref{Predicates for Strings, string-or-null-p}.
|
||||
@end table
|
||||
|
||||
The most general way to check the type of an object is to call the
|
||||
|
|
|
@ -672,7 +672,9 @@ the parse:
|
|||
|
||||
@enumerate 0
|
||||
@item
|
||||
The depth in parentheses, counting from 0.
|
||||
The depth in parentheses, counting from 0. @strong{Warning:} this can
|
||||
be negative if there are more close parens than open parens between
|
||||
the start of the defun and point.
|
||||
|
||||
@item
|
||||
@cindex innermost containing parentheses
|
||||
|
|
|
@ -1778,13 +1778,13 @@ measures to prevent this.
|
|||
|
||||
@cindex safe local variable
|
||||
You can specify safe values for a variable with a
|
||||
@code{safe-local-variable} property. If the property is @code{t},
|
||||
setting that variable in a file is always considered safe, regardless
|
||||
of the value used. If the property is a function of one argument,
|
||||
then any value is safe if the function 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}.
|
||||
@code{safe-local-variable} property. The property has to be
|
||||
a function of one argument; any value is safe if the function
|
||||
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.
|
||||
|
||||
@defopt safe-local-variable-values
|
||||
This variable provides another way to mark some variable values as
|
||||
|
|
|
@ -1,3 +1,80 @@
|
|||
2006-05-01 Richard Stallman <rms@gnu.org>
|
||||
|
||||
* emacs.texi (Top): Add Diff Mode to menu.
|
||||
|
||||
2006-05-01 Aaron S. Hawley <Aaron.Hawley@uvm.edu>
|
||||
|
||||
* misc.texi (Diff Mode): New node.
|
||||
|
||||
2006-05-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
|
||||
|
||||
* macos.texi (Mac International): Now Carbon Emacs has ATSUI support.
|
||||
(Mac Environment Variables): Shorten example line.
|
||||
(Mac Font Specs): Shorten lisp lines. Add descriptions for ATSUI.
|
||||
|
||||
2006-05-01 Nick Roberts <nickrob@snap.net.nz>
|
||||
|
||||
* building.texi (GUD Customization): Describe cases %d and %c.
|
||||
Update description for %e.
|
||||
|
||||
2006-04-30 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* calendar.texi (LaTeX Calendar): Mention cal-tex-preamble-extra.
|
||||
|
||||
2006-04-29 Dan Nicolaescu <dann@ics.uci.edu>
|
||||
|
||||
* custom.texi (Examining): Update C-h v output example.
|
||||
|
||||
2006-04-29 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
* building.texi (Grep Searching): Add lgrep and rgrep.
|
||||
|
||||
2006-04-26 Reiner Steib <Reiner.Steib@gmx.de>
|
||||
|
||||
* pgg.texi (Caching passphrase): Fix markup and typos. Simplify.
|
||||
|
||||
2006-04-26 Sascha Wilde <wilde@sha-bang.de>
|
||||
|
||||
* pgg.texi (Caching passphrase): Add pgg-gpg-use-agent.
|
||||
|
||||
2006-04-24 Bill Wohler <wohler@newt.com>
|
||||
|
||||
* mh-e.texi (Getting Started): Make it more explicit that you need
|
||||
to install MH. Add pointers to current MH implementations.
|
||||
|
||||
2006-04-23 Richard Stallman <rms@gnu.org>
|
||||
|
||||
* emacs.texi [TeX]: Use xresmini.texi instead of xresources.texi.
|
||||
|
||||
* xresmini.texi: New file.
|
||||
|
||||
* xresources.texi (Face Resources): Split table into font resources
|
||||
and the rest. Combine similar attributes for brevity.
|
||||
|
||||
2006-04-21 Bill Wohler <wohler@newt.com>
|
||||
|
||||
Release MH-E manual version 7.94.
|
||||
|
||||
* mh-e.texi (VERSION, EDITION, UPDATED, UPDATE-MONTH): Update for
|
||||
release 7.94.
|
||||
|
||||
2006-04-21 Carsten Dominik <dominik@science.uva.nl>
|
||||
|
||||
* org.texi: Many small fixes.
|
||||
(Handling links): Rename from "Managing links".
|
||||
|
||||
2006-04-21 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* emacs-xtra.texi (MS-DOS File Names): Remove section about
|
||||
backslashes and case-insensitivity in file names (moved to the
|
||||
main manual).
|
||||
(MS-DOS Printing): Move most of the text to the main manual.
|
||||
|
||||
* msdog.texi (Windows Files, Windows HOME, MS-Windows Printing):
|
||||
New nodes.
|
||||
(Windows Processes, Windows System Menu): Add index entries and
|
||||
fix wording.
|
||||
|
||||
2006-04-20 Reiner Steib <Reiner.Steib@gmx.de>
|
||||
|
||||
* gnus.texi (Spam Statistics Package): Fix typo in @pxref.
|
||||
|
@ -10,7 +87,7 @@
|
|||
|
||||
2006-04-20 Carsten Dominik <dominik@science.uva.nl>
|
||||
|
||||
* org.texi: (Time stamps): Better explanation of the purpose of
|
||||
* org.texi (Time stamps): Better explanation of the purpose of
|
||||
different time stamps.
|
||||
(Structure editing, Plain lists): More details on how new items
|
||||
and headings are inserted.
|
||||
|
@ -27,7 +104,7 @@
|
|||
|
||||
2006-04-18 Carsten Dominik <dominik@science.uva.nl>
|
||||
|
||||
* org.texi: (Formula syntax): Fixed link to Calc Manual.
|
||||
* org.texi (Formula syntax): Fixed link to Calc Manual.
|
||||
|
||||
2006-04-17 Reiner Steib <Reiner.Steib@gmx.de>
|
||||
|
||||
|
@ -49,7 +126,7 @@
|
|||
|
||||
2006-04-13 Carsten Dominik <dominik@science.uva.nl>
|
||||
|
||||
* org.texi: (Updating settings): New section.
|
||||
* org.texi (Updating settings): New section.
|
||||
(Visibility cycling): Better names for the startup folding
|
||||
options.
|
||||
(Exporting): Completely restructured.
|
||||
|
|
|
@ -335,10 +335,12 @@ treating the matches reported by @code{grep} as if they were ``errors.''
|
|||
|
||||
@table @kbd
|
||||
@item M-x grep
|
||||
@item M-x lgrep
|
||||
Run @code{grep} asynchronously under Emacs, with matching lines
|
||||
listed in the buffer named @samp{*grep*}.
|
||||
@item M-x grep-find
|
||||
@itemx M-x find-grep
|
||||
@itemx M-x rgrep
|
||||
Run @code{grep} via @code{find}, with user-specified arguments, and
|
||||
collect output in the buffer named @samp{*grep*}.
|
||||
@item M-x kill-grep
|
||||
|
@ -373,6 +375,27 @@ initial default for the command---one that runs both @code{find} and
|
|||
@code{grep}, so as to search every file in a directory tree. See also
|
||||
the @code{find-grep-dired} command, in @ref{Dired and Find}.
|
||||
|
||||
@findex lgrep
|
||||
@findex rgrep
|
||||
The commands @kbd{M-x lgrep} (local grep) and @kbd{M-x rgrep}
|
||||
(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
|
||||
current value of @code{case-fold-search}.
|
||||
|
||||
These commands build the shell commands based on the variables
|
||||
@code{grep-template} (for @code{lgrep}) and @code{grep-find-template}
|
||||
(for @code{rgrep}).
|
||||
|
||||
The files to search can use aliases defined in the variable
|
||||
@code{grep-files-aliases}.
|
||||
|
||||
Subdirectories listed in the variable
|
||||
@code{grep-find-ignored-directories} such as those typically used by
|
||||
various version control systems, like CVS and arch, are automatically
|
||||
skipped by @code{rgrep}.
|
||||
|
||||
@node Flymake
|
||||
@section Finding Syntax Errors On The Fly
|
||||
@cindex checking syntax
|
||||
|
@ -676,7 +699,7 @@ This key is available only in the GUD interaction buffer.
|
|||
@kindex C-c C-f @r{(GUD)}
|
||||
@itemx C-x C-a C-f
|
||||
@findex gud-finish
|
||||
Run the program until the selected stack frame returns or
|
||||
Run the program until the selected stack frame returns or
|
||||
stops for some other reason (@code{gud-finish}).
|
||||
|
||||
@item C-x C-a C-j
|
||||
|
@ -743,8 +766,6 @@ the command to @kbd{C-c @var{binding}} in the GUD buffer's mode and to
|
|||
The name of the current source file. If the current buffer is the GUD
|
||||
buffer, then the ``current source file'' is the file that the program
|
||||
stopped in.
|
||||
@c This said, ``the name of the file the program counter was in at the last breakpoint.''
|
||||
@c But I suspect it is really the last stop file.
|
||||
|
||||
@item %l
|
||||
The number of the current source line. If the current buffer is the GUD
|
||||
|
@ -752,7 +773,9 @@ buffer, then the ``current source line'' is the line that the program
|
|||
stopped in.
|
||||
|
||||
@item %e
|
||||
The text of the C lvalue or function-call expression at or adjacent to point.
|
||||
In transient-mark-mode the text in the region, if it is active.
|
||||
Otherwise the text of the C lvalue or function-call expression at or
|
||||
adjacent to point.
|
||||
|
||||
@item %a
|
||||
The text of the hexadecimal address at or adjacent to point.
|
||||
|
@ -764,6 +787,13 @@ empty string.
|
|||
|
||||
If you don't use @samp{%p} in the command string, the command you define
|
||||
ignores any numeric argument.
|
||||
|
||||
@item %d
|
||||
The name of the directory of the current source file.
|
||||
|
||||
@item %c
|
||||
Fully qualified class name derived from the expression surrounding point
|
||||
(jdb only).
|
||||
@end table
|
||||
|
||||
@node GDB Graphical Interface
|
||||
|
|
|
@ -395,7 +395,9 @@ If the variable @code{cal-tex-diary} is non-@code{nil} (the default is
|
|||
@code{nil}), diary entries are included also (in weekly and monthly
|
||||
calendars only). If the variable @code{cal-tex-rules} is non-@code{nil}
|
||||
(the default is @code{nil}), the calendar displays ruled pages
|
||||
in styles that have sufficient room.
|
||||
in styles that have sufficient room. You can use the variable
|
||||
@code{cal-tex-preamble-extra} to insert extra LaTeX commands in the
|
||||
preamble of the generated document if you need to.
|
||||
|
||||
@node Holidays
|
||||
@section Holidays
|
||||
|
|
|
@ -822,6 +822,9 @@ fill-column's value is 70
|
|||
Local in buffer custom.texi; global value is 70
|
||||
Automatically becomes buffer-local when set in any fashion.
|
||||
|
||||
This variable is safe to use as a file local variable only if its value
|
||||
satisfies the predicate `integerp'.
|
||||
|
||||
Documentation:
|
||||
*Column beyond which automatic line-wrapping should happen.
|
||||
Interactively, you can set the buffer local value using C-x f.
|
||||
|
|
|
@ -3316,7 +3316,7 @@ Windows).
|
|||
* Mouse: MS-DOS Mouse. Mouse conventions on MS-DOS.
|
||||
* Display: MS-DOS Display. Fonts, frames and display size on MS-DOS.
|
||||
* Files: MS-DOS File Names. File name conventions on MS-DOS.
|
||||
* Printing: MS-DOS Printing. How to specify the printer on MS-DOS.
|
||||
* Printing: MS-DOS Printing. Printing specifics on MS-DOS.
|
||||
* I18N: MS-DOS and MULE. Support for internationalization on MS-DOS.
|
||||
* Processes: MS-DOS Processes. Running subprocesses on MS-DOS.
|
||||
@end menu
|
||||
|
@ -3534,11 +3534,6 @@ other frames to the new dimensions.
|
|||
@cindex file names under MS-DOS
|
||||
@cindex init file, default name under MS-DOS
|
||||
|
||||
MS-DOS normally uses a backslash, @samp{\}, to separate name units
|
||||
within a file name, instead of the slash used on other systems. Emacs
|
||||
on MS-DOS permits use of either slash or backslash, and also knows
|
||||
about drive letters in file names.
|
||||
|
||||
On MS-DOS, file names are case-insensitive and limited to eight
|
||||
characters, plus optionally a period and three more characters. Emacs
|
||||
knows enough about these limitations to handle file names that were
|
||||
|
@ -3593,55 +3588,14 @@ using an actual directory named @file{/dev} on any disk.
|
|||
@section Printing and MS-DOS
|
||||
|
||||
Printing commands, such as @code{lpr-buffer}
|
||||
(@pxref{Printing,,,emacs, the Emacs Manual }) and
|
||||
(@pxref{Printing,,,emacs, the Emacs Manual}) and
|
||||
@code{ps-print-buffer} (@pxref{PostScript,,,emacs, the Emacs Manual})
|
||||
can work in MS-DOS and MS-Windows by sending the output to one of the
|
||||
printer ports, if a Posix-style @code{lpr} program is unavailable.
|
||||
The same Emacs variables control printing on all systems, but in some
|
||||
cases they have different default values on MS-DOS and MS-Windows.
|
||||
can work on MS-DOS by sending the output to one of the printer ports,
|
||||
if a Posix-style @code{lpr} program is unavailable. The same Emacs
|
||||
variables control printing on all systems, but in some cases they have
|
||||
different default values on MS-DOS.
|
||||
|
||||
@vindex printer-name @r{(MS-DOS)}
|
||||
If you want to use your local printer, printing on it in the usual DOS
|
||||
manner, then set the Lisp variable @code{lpr-command} to @code{""} (its
|
||||
default value) and @code{printer-name} to the name of the printer
|
||||
port---for example, @code{"PRN"}, the usual local printer port (that's
|
||||
the default), or @code{"LPT2"}, or @code{"COM1"} for a serial printer.
|
||||
You can also set @code{printer-name} to a file name, in which case
|
||||
``printed'' output is actually appended to that file. If you set
|
||||
@code{printer-name} to @code{"NUL"}, printed output is silently
|
||||
discarded (sent to the system null device).
|
||||
|
||||
On MS-Windows, when the Windows network software is installed, you can
|
||||
also use a printer shared by another machine by setting
|
||||
@code{printer-name} to the UNC share name for that printer---for example,
|
||||
@code{"//joes_pc/hp4si"}. (It doesn't matter whether you use forward
|
||||
slashes or backslashes here.) To find out the names of shared printers,
|
||||
run the command @samp{net view} at a DOS command prompt to obtain a list
|
||||
of servers, and @samp{net view @var{server-name}} to see the names of printers
|
||||
(and directories) shared by that server. Alternatively, click the
|
||||
@samp{Network Neighborhood} icon on your desktop, and look for machines
|
||||
which share their printers via the network.
|
||||
|
||||
@cindex @samp{net use}, and printing on MS-Windows
|
||||
@cindex networked printers (MS-Windows)
|
||||
If the printer doesn't appear in the output of @samp{net view}, or
|
||||
if setting @code{printer-name} to the UNC share name doesn't produce a
|
||||
hardcopy on that printer, you can use the @samp{net use} command to
|
||||
connect a local print port such as @code{"LPT2"} to the networked
|
||||
printer. For example, typing @kbd{net use LPT2:
|
||||
\\joes_pc\hp4si}@footnote{
|
||||
Note that the @samp{net use} command requires the UNC share name to be
|
||||
typed with the Windows-style backslashes, while the value of
|
||||
@code{printer-name} can be set with either forward- or backslashes.}
|
||||
causes Windows to @dfn{capture} the LPT2 port and redirect the printed
|
||||
material to the printer connected to the machine @code{joes_pc}.
|
||||
After this command, setting @code{printer-name} to @code{"LPT2"}
|
||||
should produce the hardcopy on the networked printer.
|
||||
|
||||
With some varieties of Windows network software, you can instruct
|
||||
Windows to capture a specific printer port such as @code{"LPT2"}, and
|
||||
redirect it to a networked printer via the @w{@code{Control
|
||||
Panel->Printers}} applet instead of @samp{net use}.
|
||||
@xref{MS-Windows Printing,,,emacs, the Emacs Manual}, for details.
|
||||
|
||||
Some printers expect DOS codepage encoding of non-@acronym{ASCII} text, even
|
||||
though they are connected to a Windows machine which uses a different
|
||||
|
@ -3655,95 +3609,11 @@ M-x lpr-region RET} will print the region while converting it to the
|
|||
codepage 850 encoding. You may need to create the @code{cp@var{nnn}}
|
||||
coding system with @kbd{M-x codepage-setup}.
|
||||
|
||||
If you set @code{printer-name} to a file name, it's best to use an
|
||||
absolute file name. Emacs changes the working directory according to
|
||||
the default directory of the current buffer, so if the file name in
|
||||
@code{printer-name} is relative, you will end up with several such
|
||||
files, each one in the directory of the buffer from which the printing
|
||||
was done.
|
||||
|
||||
@findex print-buffer @r{(MS-DOS)}
|
||||
@findex print-region @r{(MS-DOS)}
|
||||
@vindex lpr-headers-switches @r{(MS-DOS)}
|
||||
The commands @code{print-buffer} and @code{print-region} call the
|
||||
@code{pr} program, or use special switches to the @code{lpr} program, to
|
||||
produce headers on each printed page. MS-DOS and MS-Windows don't
|
||||
normally have these programs, so by default, the variable
|
||||
@code{lpr-headers-switches} is set so that the requests to print page
|
||||
headers are silently ignored. Thus, @code{print-buffer} and
|
||||
@code{print-region} produce the same output as @code{lpr-buffer} and
|
||||
@code{lpr-region}, respectively. If you do have a suitable @code{pr}
|
||||
program (for example, from GNU Textutils), set
|
||||
@code{lpr-headers-switches} to @code{nil}; Emacs will then call
|
||||
@code{pr} to produce the page headers, and print the resulting output as
|
||||
specified by @code{printer-name}.
|
||||
|
||||
@vindex print-region-function @r{(MS-DOS)}
|
||||
@cindex lpr usage under MS-DOS
|
||||
@vindex lpr-command @r{(MS-DOS)}
|
||||
@vindex lpr-switches @r{(MS-DOS)}
|
||||
Finally, if you do have an @code{lpr} work-alike, you can set the
|
||||
variable @code{lpr-command} to @code{"lpr"}. Then Emacs will use
|
||||
@code{lpr} for printing, as on other systems. (If the name of the
|
||||
program isn't @code{lpr}, set @code{lpr-command} to specify where to
|
||||
find it.) The variable @code{lpr-switches} has its standard meaning
|
||||
when @code{lpr-command} is not @code{""}. If the variable
|
||||
@code{printer-name} has a string value, it is used as the value for the
|
||||
@code{-P} option to @code{lpr}, as on Unix.
|
||||
|
||||
@findex ps-print-buffer @r{(MS-DOS)}
|
||||
@findex ps-spool-buffer @r{(MS-DOS)}
|
||||
@vindex ps-printer-name @r{(MS-DOS)}
|
||||
@vindex ps-lpr-command @r{(MS-DOS)}
|
||||
@vindex ps-lpr-switches @r{(MS-DOS)}
|
||||
A parallel set of variables, @code{ps-lpr-command},
|
||||
@code{ps-lpr-switches}, and @code{ps-printer-name} (@pxref{PostScript
|
||||
Variables,,,emacs, the Emacs Manual}), defines how PostScript files
|
||||
should be printed. These variables are used in the same way as the
|
||||
corresponding variables described above for non-PostScript printing.
|
||||
Thus, the value of @code{ps-printer-name} is used as the name of the
|
||||
device (or file) to which PostScript output is sent, just as
|
||||
@code{printer-name} is used for non-PostScript printing. (There are
|
||||
two distinct sets of variables in case you have two printers attached
|
||||
to two different ports, and only one of them is a PostScript printer.)
|
||||
|
||||
The default value of the variable @code{ps-lpr-command} is @code{""},
|
||||
which causes PostScript output to be sent to the printer port specified
|
||||
by @code{ps-printer-name}, but @code{ps-lpr-command} can also be set to
|
||||
the name of a program which will accept PostScript files. Thus, if you
|
||||
have a non-PostScript printer, you can set this variable to the name of
|
||||
a PostScript interpreter program (such as Ghostscript). Any switches
|
||||
that need to be passed to the interpreter program are specified using
|
||||
@code{ps-lpr-switches}. (If the value of @code{ps-printer-name} is a
|
||||
string, it will be added to the list of switches as the value for the
|
||||
@code{-P} option. This is probably only useful if you are using
|
||||
@code{lpr}, so when using an interpreter typically you would set
|
||||
@code{ps-printer-name} to something other than a string so it is
|
||||
ignored.)
|
||||
|
||||
For example, to use Ghostscript for printing on an Epson printer
|
||||
connected to the @samp{LPT2} port, put this in your @file{_emacs} file:
|
||||
|
||||
@example
|
||||
(setq ps-printer-name t) ; Ghostscript doesn't understand -P
|
||||
(setq ps-lpr-command "c:/gs/gs386")
|
||||
(setq ps-lpr-switches '("-q" "-dNOPAUSE"
|
||||
"-sDEVICE=epson"
|
||||
"-r240x72"
|
||||
"-sOutputFile=LPT2"
|
||||
"-Ic:/gs"))
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
(This assumes that Ghostscript is installed in the @file{"c:/gs"}
|
||||
directory.)
|
||||
|
||||
@vindex dos-printer
|
||||
@vindex dos-ps-printer
|
||||
For backwards compatibility, the value of @code{dos-printer}
|
||||
(@code{dos-ps-printer}), if it has a value, overrides the value of
|
||||
@code{printer-name} (@code{ps-printer-name}), on MS-DOS and MS-Windows
|
||||
only.
|
||||
@code{printer-name} (@code{ps-printer-name}), on MS-DOS.
|
||||
|
||||
|
||||
@node MS-DOS and MULE
|
||||
|
|
140
man/emacs.texi
140
man/emacs.texi
|
@ -89,9 +89,9 @@ some of how to customize it; it corresponds to GNU Emacs version
|
|||
@value{EMACSVER}.
|
||||
|
||||
@ifinfo
|
||||
If you never before used the Info documentation system, type @kbd{h},
|
||||
and Emacs will take you to a programmed instruction sequence for the
|
||||
Info commands.
|
||||
To learn more about the Info documentation system, type @kbd{h}, and
|
||||
Emacs will take you to a programmed instruction sequence for the Info
|
||||
commands.
|
||||
@end ifinfo
|
||||
|
||||
For information on extending Emacs, see @ref{Top, Emacs Lisp,, elisp, The
|
||||
|
@ -197,6 +197,7 @@ 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.
|
||||
|
@ -286,7 +287,7 @@ Killing and Moving Text
|
|||
* 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.
|
||||
* CUA Bindings:: Using @kbd{C-x}, @kbd{C-c}, @kbd{C-v} for copy
|
||||
and paste, with enhanced rectangle support.
|
||||
|
@ -867,47 +868,47 @@ Emacs and Microsoft Windows
|
|||
@unnumbered Preface
|
||||
|
||||
This manual documents the use and simple customization of the Emacs
|
||||
editor. The reader is not expected to be a programmer; simple
|
||||
customizations do not require programming skill. The user who is not
|
||||
interested in customizing can ignore the scattered customization hints.
|
||||
editor. Simple Emacs customizations do not require you to be a
|
||||
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. For complete beginners, it is a good idea to 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}. This way you can learn
|
||||
Emacs by using Emacs on a specially designed file which describes
|
||||
commands, tells you when to try them, and then explains the results you
|
||||
see.
|
||||
primer. If you are a complete beginner, 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
|
||||
results.
|
||||
|
||||
On first reading, just skim chapters 1 and 2, which describe the
|
||||
notational conventions of the manual and the general appearance of the
|
||||
Emacs display screen. Note which questions are answered in these
|
||||
chapters, so you can refer back later. After reading chapter 4, you
|
||||
should practice the commands there. The next few chapters describe
|
||||
fundamental techniques and concepts that are used constantly. You need
|
||||
to understand them thoroughly, experimenting with them if necessary.
|
||||
should practice the commands shown there. The next few chapters
|
||||
describe fundamental techniques and concepts that are used constantly.
|
||||
You need to understand them thoroughly, so experiment with them
|
||||
until you are fluent.
|
||||
|
||||
Chapters 14 through 19 describe intermediate-level features that are
|
||||
useful for all kinds of editing. Chapter 20 and following chapters
|
||||
describe features that you may or may not want to use; read those
|
||||
chapters when you need them.
|
||||
useful for many kinds of editing. Chapter 20 and following chapters
|
||||
describe optional but useful features; read those chapters when you
|
||||
need them.
|
||||
|
||||
Read the Trouble chapter if Emacs does not seem to be working
|
||||
properly. It explains how to cope with some common problems
|
||||
properly. It explains how to cope with several common problems
|
||||
(@pxref{Lossage}), as well as when and how to report Emacs bugs
|
||||
(@pxref{Bugs}).
|
||||
|
||||
To find the documentation on a particular command, look in the index.
|
||||
Keys (character commands) and command names have separate indexes. There
|
||||
is also a glossary, with a cross reference for each term.
|
||||
To find the documentation of a particular command, look in the index.
|
||||
Keys (character commands) and command names have separate indexes.
|
||||
There is also a glossary, with a cross reference for each term.
|
||||
|
||||
This manual is available as a printed book and also as an Info file.
|
||||
The Info file is for on-line perusal with the Info program, which will
|
||||
be the principal way of viewing documentation on-line in the GNU system.
|
||||
Both the Info file and the Info program itself are distributed along
|
||||
with GNU Emacs. The Info file and the printed book contain
|
||||
substantially the same text and are generated from the same source
|
||||
files, which are also distributed along with GNU Emacs.
|
||||
The Info file is for on-line perusal with the Info program, which is
|
||||
the principal means of accessing on-line documentation in the GNU
|
||||
system. Both the Emacs Info file and an Info reader are included with
|
||||
GNU Emacs. The Info file and the printed book contain substantially
|
||||
the same text and are generated from the same source files, which are
|
||||
also distributed with GNU Emacs.
|
||||
|
||||
GNU Emacs is a member of the Emacs editor family. There are many
|
||||
Emacs editors, all sharing common principles of organization. For
|
||||
|
@ -1058,59 +1059,51 @@ T.@: Zimmermann, Reto Zimmermann, Neal Ziring, and Detlev Zundel.
|
|||
@node Intro, Glossary, Distrib, Top
|
||||
@unnumbered Introduction
|
||||
|
||||
You are reading about GNU Emacs, the GNU incarnation of the advanced,
|
||||
self-documenting, customizable, extensible real-time display editor Emacs.
|
||||
You are reading about GNU Emacs, the GNU incarnation of the
|
||||
advanced, self-documenting, customizable, extensible editor Emacs.
|
||||
(The `G' in `GNU' is not silent.)
|
||||
|
||||
We say that Emacs is a @dfn{display} editor because normally the text
|
||||
being edited is visible on the screen and is updated automatically as you
|
||||
type your commands. @xref{Screen,Display}.
|
||||
|
||||
We call it a @dfn{real-time} editor because the display is updated very
|
||||
frequently, usually after each character or pair of characters you
|
||||
type. This minimizes the amount of information you must keep in your
|
||||
head as you edit. @xref{Basic,Real-time,Basic Editing}.
|
||||
|
||||
We call Emacs advanced because it provides facilities that go beyond
|
||||
simple insertion and deletion: controlling subprocesses; automatic
|
||||
indentation of programs; viewing two or more files at once; editing
|
||||
formatted text; and dealing in terms of characters, words, lines,
|
||||
sentences, paragraphs, and pages, as well as expressions and comments in
|
||||
several different programming languages.
|
||||
We call Emacs advanced because it provides much more than simple
|
||||
insertion and deletion. It can control subprocesses, indent programs
|
||||
automatically, show two or more files at once, and edit formatted
|
||||
text. Emacs editing commands operate in terms of characters, words,
|
||||
lines, sentences, paragraphs, and pages, as well as expressions and
|
||||
comments in various programming languages.
|
||||
|
||||
@dfn{Self-documenting} means that at any time you can type a special
|
||||
character, @kbd{Control-h}, to find out what your options are. You can
|
||||
also use it to find out what any command does, or to find all the commands
|
||||
that pertain to a topic. @xref{Help}.
|
||||
|
||||
@dfn{Customizable} means that you can change the definitions of Emacs
|
||||
commands in little ways. For example, if you use a programming language in
|
||||
which comments start with @samp{<**} and end with @samp{**>}, you can tell
|
||||
the Emacs comment manipulation commands to use those strings
|
||||
(@pxref{Comments}). Another sort of customization is rearrangement of the
|
||||
command set. For example, if you prefer the four basic cursor motion
|
||||
commands (up, down, left and right) on keys in a diamond pattern on the
|
||||
keyboard, you can rebind the keys that way. @xref{Customization}.
|
||||
@dfn{Customizable} means that you can alter Emacs commands' behavior
|
||||
in simple ways. For example, if you use a programming language in
|
||||
which comments start with @samp{<**} and end with @samp{**>}, you can
|
||||
tell the Emacs comment manipulation commands to use those strings
|
||||
(@pxref{Comments}). Another sort of customization is rearrangement of
|
||||
the command set. For example, you can rebind the basic cursor motion
|
||||
commands (up, down, left and right) to any keys on the keyboard that
|
||||
you find comfortable. @xref{Customization}.
|
||||
|
||||
@dfn{Extensible} means that you can go beyond simple customization and
|
||||
write entirely new commands, programs in the Lisp language to be run by
|
||||
Emacs's own Lisp interpreter. Emacs is an ``on-line extensible''
|
||||
system, which means that it is divided into many functions that call
|
||||
each other, any of which can be redefined in the middle of an editing
|
||||
session. Almost any part of Emacs can be replaced without making a
|
||||
separate copy of all of Emacs. Most of the editing commands of Emacs
|
||||
are written in Lisp; the few exceptions could have been written
|
||||
in Lisp but are written in C for efficiency. Although only a programmer
|
||||
can write an extension, anybody can use it afterward. @xref{Top,
|
||||
Emacs Lisp Intro, Preface, eintr, An Introduction to Programming in
|
||||
Emacs Lisp}, if you want to learn Emacs Lisp programming.
|
||||
@dfn{Extensible} means that you can go beyond simple customization
|
||||
and write entirely new commands---programs in the Lisp language to be
|
||||
run by Emacs's own Lisp interpreter. Emacs is an ``on-line
|
||||
extensible'' system, which means that it is divided into many
|
||||
functions that call each other, any of which can be redefined in the
|
||||
middle of an editing session. Almost any part of Emacs can be
|
||||
replaced without making a separate copy of all of Emacs. Most of the
|
||||
editing commands of Emacs are written in Lisp; the few exceptions
|
||||
could have been written in Lisp but use C instead for efficiency.
|
||||
Writing an extension is programming, but non-programmers can use it
|
||||
afterwards. @xref{Top, Emacs Lisp Intro, Preface, eintr, An
|
||||
Introduction to Programming in Emacs Lisp}, if you want to learn Emacs
|
||||
Lisp programming.
|
||||
|
||||
When running on a graphical display, Emacs provides its own menus
|
||||
and convenient handling of mouse buttons. But Emacs provides many of
|
||||
the benefits of a graphical display even on a text-only terminal. For
|
||||
instance, it can highlight parts of a file, display and edit several
|
||||
files at once, move text between files, and edit files while running
|
||||
shell commands.
|
||||
and convenient handling of mouse buttons. In addition, Emacs provides
|
||||
many of the benefits of a graphical display even on a text-only
|
||||
terminal. For instance, it can highlight parts of a file, display and
|
||||
edit several files at once, move text between files, and edit files
|
||||
while running shell commands.
|
||||
|
||||
@include screen.texi
|
||||
@include commands.texi
|
||||
|
@ -1544,7 +1537,12 @@ Public License instead of this License.
|
|||
|
||||
@include doclicense.texi
|
||||
@include cmdargs.texi
|
||||
@iftex
|
||||
@include xresmini.texi
|
||||
@end iftex
|
||||
@ifnottex
|
||||
@include xresources.texi
|
||||
@end ifnottex
|
||||
|
||||
@include anti.texi
|
||||
@include macos.texi
|
||||
|
|
|
@ -104,13 +104,6 @@ character codes in the range 128-159. The coding systems
|
|||
@code{mac-roman}, @code{mac-centraleurroman}, and @code{mac-cyrillic}
|
||||
are used to represent these Mac encodings.
|
||||
|
||||
The fontset @code{fontset-standard} is created automatically when
|
||||
Emacs is run on Mac, and used by default. It displays as many kinds
|
||||
of characters as possible using 12-point Monaco as a base font. If
|
||||
you see some character as a hollow box with this fontset, then it's
|
||||
almost impossible to display it only by customizing font settings
|
||||
(@pxref{Mac Font Specs}).
|
||||
|
||||
You can use input methods provided either by LEIM (@pxref{Input
|
||||
Methods}) or Mac OS to enter international characters. To use the
|
||||
former, see the International Character Set Support section of the
|
||||
|
@ -195,7 +188,7 @@ invoked from the Finder or the @command{open} command.
|
|||
Command line arguments are specified like
|
||||
|
||||
@example
|
||||
/Applications/Emacs.app/Contents/MacOS/Emacs -geometry 80x25 &
|
||||
/Applications/Emacs.app/Contents/MacOS/Emacs -g 80x25 &
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
|
@ -295,7 +288,8 @@ you specify face attributes instead. For example, you can use 14pt
|
|||
Courier by customizing the default face attributes for all frames:
|
||||
|
||||
@lisp
|
||||
(set-face-attribute 'default nil :family "courier" :height 140)
|
||||
(set-face-attribute 'default nil
|
||||
:family "courier" :height 140)
|
||||
@end lisp
|
||||
|
||||
@noindent
|
||||
|
@ -313,21 +307,30 @@ standard X font name:
|
|||
@noindent
|
||||
@xref{Font X}. Wildcards are supported as they are on X.
|
||||
|
||||
Native Apple fonts in Mac Roman encoding has maker name @code{apple}
|
||||
and charset @code{mac-roman}. For example 12-point Monaco can be
|
||||
specified by the name @samp{-apple-monaco-*-12-*-mac-roman}. When
|
||||
using a particular size of scalable fonts, it must be specified in a
|
||||
format containing 14 @samp{-}s like
|
||||
@samp{-apple-monaco-medium-r-normal--13-*-*-*-*-*-mac-roman}.
|
||||
Emacs on Mac OS Classic uses QuickDraw Text routines for drawing texts
|
||||
by default. Emacs on Mac OS X uses @acronym{ATSUI, Apple Type Services
|
||||
for Unicode Imaging} as well as QuickDraw Text, and most of the
|
||||
characters other than Chinese, Japanese, and Korean ones are drawn using
|
||||
the former by default.
|
||||
|
||||
You can specify a @code{mac-roman} font for @acronym{ASCII}
|
||||
characters like
|
||||
@acronym{ATSUI}-compatible fonts have maker name @code{apple} and
|
||||
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
|
||||
@acronym{ATSUI}-compatible font is a scalable one.
|
||||
|
||||
@lisp
|
||||
QuickDraw Text fonts have maker name @code{apple} and various charset
|
||||
names other than @code{iso10646-1}. Native Apple fonts in Mac Roman
|
||||
encoding has charset @code{mac-roman}. You can specify a
|
||||
@code{mac-roman} font for @acronym{ASCII} characters like
|
||||
|
||||
@smalllisp
|
||||
(add-to-list
|
||||
'default-frame-alist
|
||||
'(font . "-apple-monaco-medium-r-normal--13-*-*-*-*-*-mac-roman"))
|
||||
@end lisp
|
||||
@end smalllisp
|
||||
|
||||
@noindent
|
||||
but that does not extend to ISO-8859-1: specifying a @code{mac-roman}
|
||||
|
@ -341,16 +344,11 @@ charsets @samp{big5-0}, @samp{gb2312.1980-0},
|
|||
@samp{mac-cyrillic}, @samp{mac-symbol}, and @samp{mac-dingbats},
|
||||
respectively.
|
||||
|
||||
Since Emacs as of the current version uses QuickDraw Text routines
|
||||
for drawing texts, only characters in the charsets listed above can be
|
||||
displayed with the OS-bundled fonts, even if other applications that
|
||||
use @acronym{ATSUI} or Cocoa can display variety of characters with
|
||||
them.
|
||||
|
||||
The use of @code{create-fontset-from-fontset-spec} (@pxref{Defining
|
||||
Fontsets}) for defining fontsets often results in wrong ones
|
||||
especially when using only OS-bundled fonts. The recommended way is
|
||||
to create a fontset using @code{create-fontset-from-mac-roman-font}:
|
||||
Fontsets}) for defining fontsets often results in wrong ones especially
|
||||
when using only OS-bundled QuickDraw Text fonts. The recommended way to
|
||||
use them is to create a fontset using
|
||||
@code{create-fontset-from-mac-roman-font}:
|
||||
|
||||
@lisp
|
||||
(create-fontset-from-mac-roman-font
|
||||
|
@ -374,11 +372,13 @@ encoded in the names of their font suitcases. E.g., the font suitcase
|
|||
the name @samp{-ETL-fixed-*-iso8859-1}.
|
||||
|
||||
@vindex mac-allow-anti-aliasing
|
||||
Emacs uses the QuickDraw text rendering by default. On Mac OS X
|
||||
10.2 and later, it can be changed so that it uses the Quartz 2D text
|
||||
rendering (aka CG text rendering) by setting
|
||||
@code{mac-allow-anti-aliasing} to @code{t}. However, it is reported
|
||||
to sometimes leave some garbages.
|
||||
Mac OS X 10.2 or later can use two types of text renderings: Quartz 2D
|
||||
(aka Core Graphics) and QuickDraw. By default, Emacs uses the former on
|
||||
such versions. It can be changed by setting
|
||||
@code{mac-allow-anti-aliasing} to @code{t} (Quartz 2D) or @code{nil}
|
||||
(QuickDraw). Both @acronym{ATSUI} and QuickDraw Text drawings are
|
||||
affected by the value of this variable.
|
||||
|
||||
|
||||
@node Mac Functions
|
||||
@section Mac-Specific Lisp Functions
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
@c %**end of header
|
||||
|
||||
@c Version of the software and manual.
|
||||
@set VERSION 7.93
|
||||
@set VERSION 7.94
|
||||
@c Edition of the manual. It is either empty for the first edition or
|
||||
@c has the form ", nth Edition" (without the quotes).
|
||||
@set EDITION , 7th Edition
|
||||
@set UPDATED 2006-04-17
|
||||
@set EDITION , 2nd Edition
|
||||
@set UPDATED 2006-04-24
|
||||
@set UPDATE-MONTH April, 2006
|
||||
|
||||
@c Other variables.
|
||||
|
@ -245,6 +245,8 @@ If more information is needed, you can go to the Unix manual pages of
|
|||
the individual MH commands. When the name is not obvious, I'll guide
|
||||
you to a relevant MH manual page that describes the action more fully.
|
||||
|
||||
@cindex @cite{MH & nmh: Email for Users & Programmers}
|
||||
@cindex MH book
|
||||
@cindex info
|
||||
@kindex C-h i
|
||||
|
||||
|
@ -536,12 +538,49 @@ quite easy. @xref{Getting MH-E}, for instructions for getting and
|
|||
installing MH-E.
|
||||
|
||||
If the @code{mh-version} command displays @samp{No MH variant
|
||||
detected}, then you need to install MH or tell MH-E where to find
|
||||
MH@footnote{In very old versions of MH-E, you may get the error
|
||||
detected}@footnote{In very old versions of MH-E, you may get the error
|
||||
message, @samp{Cannot find the commands `inc' and `mhl' and the file
|
||||
`components'} if MH-E can't find MH. In this case, you need to update
|
||||
MH-E, and you may need to install MH too. However, newer versions of
|
||||
MH-E are better at finding MH if it is on your system.}.
|
||||
MH-E are better at finding MH if it is on your system.}, then you need
|
||||
to install MH or tell MH-E where to find MH.
|
||||
|
||||
@cindex Debian
|
||||
@cindex nmh
|
||||
@cindex GNU mailutils
|
||||
|
||||
If you don't have MH on your system already, you must install a
|
||||
variant of MH. The Debian mh-e package does this for you automatically
|
||||
(@pxref{Getting MH-E}). Most people use
|
||||
@uref{http://www.nongnu.org/nmh/, nmh}, but you may be interested in
|
||||
trying out @uref{http://www.gnu.org/software/mailutils/, GNU
|
||||
mailutils}, which supports IMAP. Your GNU/Linux distribution probably
|
||||
has packages for both of these.
|
||||
|
||||
@cindex @command{install-mh}
|
||||
@cindex MH commands, @command{install-mh}
|
||||
@cindex MH book
|
||||
|
||||
If you've never run MH before, you need to run @command{install-mh}
|
||||
from the shell before you continue. This sets up your personal MH
|
||||
environment@footnote{See the section
|
||||
@uref{@value{MH-BOOK-HOME}/../overall/setup.htm, Setting Up MH} in the
|
||||
MH book.}. If you don't, you'll be greeted with the error message:
|
||||
@samp{Install MH and run install-mh before running MH-E}. This is all
|
||||
you need to know about MH to use MH-E, but the more you know about MH,
|
||||
the more you can leverage its power. See the
|
||||
@uref{@value{MH-BOOK-HOME}, MH book} to learn more about MH.
|
||||
|
||||
@cindex @samp{Path:} MH profile component
|
||||
@cindex MH profile
|
||||
@cindex MH profile component
|
||||
@cindex MH profile component, @samp{Path:}
|
||||
|
||||
Your MH environment includes your @dfn{MH profile} which is found in
|
||||
the file @file{~/.mh_profile}. This file contains a number of @dfn{MH
|
||||
profile components}. For example, the @samp{Path:} MH profile
|
||||
component contains the path to your mail directory, which is
|
||||
@file{~/Mail} by default.
|
||||
|
||||
@cindex @command{mhparam}
|
||||
@cindex MH commands, @command{mhparam}
|
||||
|
@ -551,8 +590,9 @@ MH-E are better at finding MH if it is on your system.}.
|
|||
@vindex mh-variant
|
||||
@vindex mh-variant-in-use
|
||||
|
||||
The option @code{mh-variant} specifies the variant used by MH-E
|
||||
(@pxref{Options}). The default setting of this option is
|
||||
There are several options MH-E uses to interact with your MH
|
||||
installation. The option @code{mh-variant} specifies the variant used
|
||||
by MH-E (@pxref{Options}). The default setting of this option is
|
||||
@samp{Auto-detect} which means that MH-E will automatically choose the
|
||||
first of nmh, MH, or GNU mailutils that it finds in the directories
|
||||
listed in @code{mh-path} (which you can customize),
|
||||
|
@ -585,27 +625,6 @@ actually cause problems.
|
|||
@end quotation
|
||||
@sp 1
|
||||
|
||||
@cindex @command{install-mh}
|
||||
@cindex MH commands, @command{install-mh}
|
||||
|
||||
If you've never run MH before, you need to run @command{install-mh}
|
||||
from the shell before you continue. This sets up your personal MH
|
||||
environment@footnote{See the section
|
||||
@uref{@value{MH-BOOK-HOME}/../overall/setup.htm, Setting Up MH} in the
|
||||
MH book.}. If you don't, you'll be greeted with the error message:
|
||||
@samp{Install MH and run install-mh before running MH-E}.
|
||||
|
||||
@cindex @samp{Path:} MH profile component
|
||||
@cindex MH profile
|
||||
@cindex MH profile component
|
||||
@cindex MH profile component, @samp{Path:}
|
||||
|
||||
Your MH environment includes your @dfn{MH profile} which is found in
|
||||
the file @file{~/.mh_profile}. This file contains a number of @dfn{MH
|
||||
profile components}. For example, the @samp{Path:} MH profile
|
||||
component contains the path to your mail directory, which is
|
||||
@file{~/Mail} by default.
|
||||
|
||||
@cindex MH profile component, @samp{Draft-Folder:}
|
||||
@cindex MH profile component, @samp{Path:}
|
||||
@cindex MH profile component, @samp{Previous-Sequence:}
|
||||
|
@ -8609,6 +8628,12 @@ change log to see if you are interested in what the given release of
|
|||
MH-E has to offer (although we have no doubt that you will be
|
||||
extremely interested in all new releases).
|
||||
|
||||
@cindex Debian
|
||||
|
||||
If you use Debian, you can install the Debian
|
||||
@uref{http://packages.debian.org/unstable/mail/mh-e, mh-e package}
|
||||
instead.
|
||||
|
||||
@cindex files, @samp{MH-E-NEWS}
|
||||
@cindex files, @samp{README}
|
||||
@cindex news
|
||||
|
|
|
@ -1761,7 +1761,7 @@ rectangle moves along with the text inside the rectangle.
|
|||
Many of the sort commands ignore case differences when comparing, if
|
||||
@code{sort-fold-case} is non-@code{nil}.
|
||||
|
||||
@node Narrowing, Two-Column, Sorting, Top
|
||||
@node Narrowing, Diff Mode, Sorting, Top
|
||||
@section Narrowing
|
||||
@cindex widening
|
||||
@cindex restriction
|
||||
|
@ -1827,7 +1827,86 @@ this command asks for confirmation and gives you the option of enabling it;
|
|||
if you enable the command, confirmation will no longer be required for
|
||||
it. @xref{Disabling}.
|
||||
|
||||
@node Two-Column, Editing Binary Files, Narrowing, Top
|
||||
@node Diff Mode, Two-Column, Narrowing, Top
|
||||
@section Diff Mode
|
||||
@cindex Diff mode
|
||||
|
||||
Diff mode is useful for editing patches and comparisons produced by
|
||||
the @command{diff} program. You can select Diff mode by typing
|
||||
@kbd{M-x diff-mode}; Emacs commands that compare files automatically
|
||||
select Diff mode. @xref{Top,, Diff, diff, Comparing and Merging Files},
|
||||
for more information about @command{diff} output formats.
|
||||
|
||||
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 Two-Column, Editing Binary Files, Diff Mode, Top
|
||||
@section Two-Column Editing
|
||||
@cindex two-column editing
|
||||
@cindex splitting columns
|
||||
|
|
288
man/msdog.texi
288
man/msdog.texi
|
@ -5,22 +5,26 @@
|
|||
@node Emacs and Microsoft Windows, Manifesto, Mac OS, Top
|
||||
@appendix Emacs and Microsoft Windows
|
||||
@cindex Microsoft Windows
|
||||
@cindex MS-Windows, Emacs peculiarities
|
||||
|
||||
This section describes peculiarities of using Emacs on Microsoft
|
||||
Windows. Information about Emacs and Microsoft's older MS-DOS
|
||||
``operating system'' (also known as ``MS-DOG'') is now in a separate
|
||||
manual (@inforef{MS-DOG,, emacs-xtra}).
|
||||
Windows. Some of these peculiarities are also relevant to Microsoft's
|
||||
older MS-DOS ``operating system'' (also known as ``MS-DOG'').
|
||||
However, Emacs features that are relevant @emph{only} to MS-DOS are
|
||||
described in a separate manual (@inforef{MS-DOG,, emacs-xtra}).
|
||||
|
||||
Iif you want to use Emacs on Windows, you would normally build Emacs
|
||||
specifically for Windows. If you do that, the behavior is reasonably
|
||||
similar to what is documented in the rest of the manual, including
|
||||
support for long file names, multiple frames, scroll bars, mouse
|
||||
menus, and subprocesses. However, a few special considerations apply,
|
||||
and they are described here.
|
||||
The behavior of Emacs on MS-Windows is reasonably similar to what is
|
||||
documented in the rest of the manual, including support for long file
|
||||
names, multiple frames, scroll bars, mouse menus, and subprocesses.
|
||||
However, a few special considerations apply, and they are described
|
||||
here.
|
||||
|
||||
@menu
|
||||
* Text and Binary:: Text files use CRLF to terminate lines.
|
||||
* Windows Files:: File-name conventions on Windows.
|
||||
* Windows HOME:: Where Emacs looks for your @file{.emacs}.
|
||||
* Windows Processes:: Running subprocesses on Windows.
|
||||
* Windows Printing:: How to specify the printer on MS-Windows.
|
||||
* Windows System Menu:: Controlling what the ALT key does.
|
||||
@end menu
|
||||
|
||||
|
@ -29,11 +33,11 @@ and they are described here.
|
|||
@cindex text and binary files on MS-DOS/MS-Windows
|
||||
|
||||
GNU Emacs uses newline characters to separate text lines. This is the
|
||||
convention used on GNU and Unix.
|
||||
convention used on GNU, Unix, and other Posix-compliant systems.
|
||||
|
||||
@cindex end-of-line conversion on MS-DOS/MS-Windows
|
||||
MS-DOS and MS-Windows normally use carriage-return linefeed, a
|
||||
two-character sequence, to separate text lines. (Linefeed is the same
|
||||
By contrast, MS-DOS and MS-Windows normally use carriage-return linefeed,
|
||||
a two-character sequence, to separate text lines. (Linefeed is the same
|
||||
character as newline.) Therefore, convenient editing of typical files
|
||||
with Emacs requires conversion of these end-of-line (EOL) sequences.
|
||||
And that is what Emacs normally does: it converts carriage-return
|
||||
|
@ -57,11 +61,11 @@ end-of-line convention after you edit them.
|
|||
|
||||
The mode line indicates whether end-of-line translation was used for
|
||||
the current buffer. If MS-DOS end-of-line translation is in use for the
|
||||
buffer, a backslash @samp{\} is displayed after the coding system
|
||||
mnemonic near the beginning of the mode line (@pxref{Mode Line}). If no
|
||||
EOL translation was performed, the string @samp{(Unix)} is displayed
|
||||
instead of the backslash, to alert you that the file's EOL format is not
|
||||
the usual carriage-return linefeed.
|
||||
buffer, the MS-Windows build of Emacs displays a backslash @samp{\} after
|
||||
the coding system mnemonic near the beginning of the mode line
|
||||
(@pxref{Mode Line}). If no EOL translation was performed, the string
|
||||
@samp{(Unix)} is displayed instead of the backslash, to alert you that the
|
||||
file's EOL format is not the usual carriage-return linefeed.
|
||||
|
||||
@cindex DOS-to-Unix conversion of files
|
||||
To visit a file and specify whether it uses DOS-style or Unix-style
|
||||
|
@ -78,14 +82,14 @@ effectively converts the file to Unix EOL style, like @code{dos2unix}.
|
|||
|
||||
@cindex untranslated file system
|
||||
@findex add-untranslated-filesystem
|
||||
When you use NFS or Samba to access file systems that reside on
|
||||
computers using GNU or Unix systems, Emacs should not perform
|
||||
end-of-line translation on any files in these file systems---not even
|
||||
when you create a new file. To request this, designate these file
|
||||
systems as @dfn{untranslated} file systems by calling the function
|
||||
@code{add-untranslated-filesystem}. It takes one argument: the file
|
||||
system name, including a drive letter and optionally a directory. For
|
||||
example,
|
||||
When you use NFS, Samba, or some other similar method to access file
|
||||
systems that reside on computers using GNU or Unix systems, Emacs
|
||||
should not perform end-of-line translation on any files in these file
|
||||
systems---not even when you create a new file. To request this,
|
||||
designate these file systems as @dfn{untranslated} file systems by
|
||||
calling the function @code{add-untranslated-filesystem}. It takes one
|
||||
argument: the file system name, including a drive letter and
|
||||
optionally a directory. For example,
|
||||
|
||||
@example
|
||||
(add-untranslated-filesystem "Z:")
|
||||
|
@ -103,7 +107,7 @@ designates directory @file{\foo} on drive Z as an untranslated file
|
|||
system.
|
||||
|
||||
Most often you would use @code{add-untranslated-filesystem} in your
|
||||
@file{_emacs} file, or in @file{site-start.el} so that all the users at
|
||||
@file{.emacs} file, or in @file{site-start.el} so that all the users at
|
||||
your site get the benefit of it.
|
||||
|
||||
@findex remove-untranslated-filesystem
|
||||
|
@ -120,9 +124,9 @@ newline at the end of a line. @xref{Coding Systems}.
|
|||
@vindex file-name-buffer-file-type-alist
|
||||
@cindex binary files, on MS-DOS/MS-Windows
|
||||
Some kinds of files should not be converted at all, because their
|
||||
contents are not really text. Therefore, Emacs on MS-DOS distinguishes
|
||||
contents are not really text. Therefore, Emacs on MS-Windows distinguishes
|
||||
certain files as @dfn{binary files}. (This distinction is not part of
|
||||
MS-DOS; it is made by Emacs only.) Binary files include executable
|
||||
MS-Windows; it is made by Emacs only.) Binary files include executable
|
||||
programs, compressed archives, etc. Emacs uses the file name to decide
|
||||
whether to treat a file as binary: the variable
|
||||
@code{file-name-buffer-file-type-alist} defines the file-name patterns
|
||||
|
@ -132,29 +136,88 @@ for binary files (those whose associations are of the type
|
|||
@code{no-conversion} coding system (@pxref{Coding Systems}) which turns
|
||||
off @emph{all} coding-system conversions, not only the EOL conversion.
|
||||
@code{file-name-buffer-file-type-alist} also includes file-name patterns
|
||||
for files which are known to be DOS-style text files with
|
||||
for files which are known to be Windows-style text files with
|
||||
carriage-return linefeed EOL format, such as @file{CONFIG.SYS}; Emacs
|
||||
always writes those files with DOS-style EOLs.
|
||||
always writes those files with Windows-style EOLs.
|
||||
|
||||
If a file which belongs to an untranslated file system matches one of
|
||||
the file-name patterns in @code{file-name-buffer-file-type-alist}, the
|
||||
EOL conversion is determined by @code{file-name-buffer-file-type-alist}.
|
||||
|
||||
@node Windows Processes
|
||||
@section Subprocesses on Windows 9X/ME and Windows NT/2K
|
||||
@node Windows Files
|
||||
@section File Names on MS-Windows
|
||||
@cindex file names on MS-Windows
|
||||
|
||||
MS-Windows and MS-DOS normally use a backslash, @samp{\}, to
|
||||
separate name units within a file name, instead of the slash used on
|
||||
other systems. Emacs on MS-DOS/MS-Windows permits use of either slash or
|
||||
backslash, and also knows about drive letters in file names.
|
||||
|
||||
@cindex file-name completion, on MS-Windows
|
||||
On MS-DOS/MS-Windows, file names are case-insensitive, so Emacs by
|
||||
default ignores letter-case in file names during completion.
|
||||
|
||||
@node Windows HOME
|
||||
@section HOME Directory on MS-Windows
|
||||
@cindex @code{HOME} directory on MS-Windows
|
||||
|
||||
The MS-Windows equivalent of the @code{HOME} directory is the
|
||||
@dfn{user-specific application data directory}. The actual location
|
||||
depends on your Windows version and system configuration; typical values
|
||||
are @file{C:\Documents and Settings\@var{username}\Application Data} on
|
||||
Windows 2K/XP and later, and either @file{C:\WINDOWS\Application Data}
|
||||
or @file{C:\WINDOWS\Profiles\@var{username}\Application Data} on the
|
||||
older Windows 9X/ME systems.
|
||||
|
||||
@cindex init file @file{.emacs} on MS-Windows
|
||||
The home directory is where your init file @file{.emacs} is stored.
|
||||
When Emacs starts, it first checks whether the environment variable
|
||||
@env{HOME} is set. If it is, it looks for the init file in the
|
||||
directory pointed by @env{HOME}. If @env{HOME} is not defined, Emacs
|
||||
checks for an existing @file{.emacs} file in @file{C:\}, the root
|
||||
directory of drive @file{C:}@footnote{
|
||||
The check in @file{C:\} is in preference to the application data
|
||||
directory for compatibility with older versions of Emacs, which didn't
|
||||
check the application data directory.
|
||||
}. If there's no such file in @file{C:\}, Emacs next uses the Windows
|
||||
system calls to find out the exact location of your application data
|
||||
directory. If that fails as well, Emacs falls back to @file{C:\}.
|
||||
|
||||
Whatever the final place is, Emacs sets the value of the @env{HOME}
|
||||
environment variable to point to it, and it will use that location for
|
||||
other files and directories it normally creates in the user's home
|
||||
directory.
|
||||
|
||||
You can always find out where Emacs thinks is your home directory's
|
||||
location by typing @kbd{C-x d ~/ @key{RET}}. This should present the
|
||||
list of files in the home directory, and show its full name on the
|
||||
first line. Likewise, to visit your init file, type @kbd{C-x C-f
|
||||
~/.emacs @key{RET}}.
|
||||
|
||||
@cindex @file{_emacs} init file, MS-Windows
|
||||
Because MS-DOS does not allow file names with leading dots, and
|
||||
because older Windows systems made it hard to create files with such
|
||||
names, the Windows port of Emacs supports an alternative name
|
||||
@file{_emacs} as a fallback, if such a file exists in the home
|
||||
directory, whereas @file{.emacs} does not.
|
||||
|
||||
@node Windows Processes
|
||||
@section Subprocesses on Windows 9X/ME and Windows NT/2K/XP
|
||||
@cindex subprocesses on MS-Windows
|
||||
|
||||
@cindex DOS applications, running from Emacs
|
||||
Emacs compiled as a native Windows application (as opposed to the DOS
|
||||
version) includes full support for asynchronous subprocesses.
|
||||
In the Windows version, synchronous and asynchronous subprocesses work
|
||||
fine on both
|
||||
Windows 9X and Windows NT/2K as long as you run only 32-bit Windows
|
||||
Windows 9X/ME and Windows NT/2K/XP as long as you run only 32-bit Windows
|
||||
applications. However, when you run a DOS application in a subprocess,
|
||||
you may encounter problems or be unable to run the application at all;
|
||||
and if you run two DOS applications at the same time in two
|
||||
subprocesses, you may have to reboot your system.
|
||||
|
||||
Since the standard command interpreter (and most command line utilities)
|
||||
on Windows 95 are DOS applications, these problems are significant when
|
||||
on Windows 9X are DOS applications, these problems are significant when
|
||||
using that system. But there's nothing we can do about them; only
|
||||
Microsoft can fix them.
|
||||
|
||||
|
@ -174,13 +237,14 @@ If you attempt to run two DOS applications at the same time in separate
|
|||
subprocesses, the second one that is started will be suspended until the
|
||||
first one finishes, even if either or both of them are asynchronous.
|
||||
|
||||
@cindex kill DOS application
|
||||
If you can go to the first subprocess, and tell it to exit, the second
|
||||
subprocess should continue normally. However, if the second subprocess
|
||||
is synchronous, Emacs itself will be hung until the first subprocess
|
||||
finishes. If it will not finish without user input, then you have no
|
||||
choice but to reboot if you are running on Windows 9X. If you are
|
||||
running on Windows NT/2K, you can use a process viewer application to kill
|
||||
the appropriate instance of ntvdm instead (this will terminate both DOS
|
||||
running on Windows NT/2K/XP, you can use a process viewer application to kill
|
||||
the appropriate instance of NTVDM instead (this will terminate both DOS
|
||||
subprocesses).
|
||||
|
||||
If you have to reboot Windows 9X in this situation, do not use the
|
||||
|
@ -189,16 +253,156 @@ system. Instead, type @kbd{CTL-ALT-@key{DEL}} and then choose
|
|||
@code{Shutdown}. That usually works, although it may take a few minutes
|
||||
to do its job.
|
||||
|
||||
@node Windows Printing
|
||||
@section Printing and MS-Windows
|
||||
|
||||
Printing commands, such as @code{lpr-buffer} (@pxref{Printing}) and
|
||||
@code{ps-print-buffer} (@pxref{PostScript}) work in MS-DOS and
|
||||
MS-Windows by sending the output to one of the printer ports, if a
|
||||
Posix-style @code{lpr} program is unavailable. The same Emacs
|
||||
variables control printing on all systems, but in some cases they have
|
||||
different default values on MS-DOS and MS-Windows.
|
||||
|
||||
Emacs on Windows automatically determines your default printer and
|
||||
sets the variable @var{printer-name} to that printer's name. But in
|
||||
some rare cases this can fail, or you may wish to use a different
|
||||
printer from within Emacs. The rest of this section explains how to
|
||||
tell Emacs which printer to use.
|
||||
|
||||
@vindex printer-name@r{, (MS-DOS/MW-Windows)}
|
||||
If you want to use your local printer, then set the Lisp variable
|
||||
@code{lpr-command} to @code{""} (its default value on Windows) and
|
||||
@code{printer-name} to the name of the printer port---for example,
|
||||
@code{"PRN"}, the usual local printer port or @code{"LPT2"}, or
|
||||
@code{"COM1"} for a serial printer. You can also set
|
||||
@code{printer-name} to a file name, in which case ``printed'' output
|
||||
is actually appended to that file. If you set @code{printer-name} to
|
||||
@code{"NUL"}, printed output is silently discarded (sent to the system
|
||||
null device).
|
||||
|
||||
You can also use a printer shared by another machine by setting
|
||||
@code{printer-name} to the UNC share name for that printer---for
|
||||
example, @code{"//joes_pc/hp4si"}. (It doesn't matter whether you use
|
||||
forward slashes or backslashes here.) To find out the names of shared
|
||||
printers, run the command @samp{net view} from the command prompt to
|
||||
obtain a list of servers, and @samp{net view @var{server-name}} to see
|
||||
the names of printers (and directories) shared by that server.
|
||||
Alternatively, click the @samp{Network Neighborhood} icon on your
|
||||
desktop, and look for machines which share their printers via the
|
||||
network.
|
||||
|
||||
@cindex @samp{net use}, and printing on MS-Windows
|
||||
@cindex networked printers (MS-Windows)
|
||||
If the printer doesn't appear in the output of @samp{net view}, or
|
||||
if setting @code{printer-name} to the UNC share name doesn't produce a
|
||||
hardcopy on that printer, you can use the @samp{net use} command to
|
||||
connect a local print port such as @code{"LPT2"} to the networked
|
||||
printer. For example, typing @kbd{net use LPT2: \\joes_pc\hp4si}@footnote{
|
||||
Note that the @samp{net use} command requires the UNC share name to be
|
||||
typed with the Windows-style backslashes, while the value of
|
||||
@code{printer-name} can be set with either forward- or backslashes.}
|
||||
causes Windows to @dfn{capture} the @code{LPT2} port and redirect the
|
||||
printed material to the printer connected to the machine @code{joes_pc}.
|
||||
After this command, setting @code{printer-name} to @code{"LPT2"}
|
||||
should produce the hardcopy on the networked printer.
|
||||
|
||||
With some varieties of Windows network software, you can instruct
|
||||
Windows to capture a specific printer port such as @code{"LPT2"}, and
|
||||
redirect it to a networked printer via the @w{@code{Control
|
||||
Panel->Printers}} applet instead of @samp{net use}.
|
||||
|
||||
If you set @code{printer-name} to a file name, it's best to use an
|
||||
absolute file name. Emacs changes the working directory according to
|
||||
the default directory of the current buffer, so if the file name in
|
||||
@code{printer-name} is relative, you will end up with several such
|
||||
files, each one in the directory of the buffer from which the printing
|
||||
was done.
|
||||
|
||||
@findex print-buffer @r{(MS-DOS)}
|
||||
@findex print-region @r{(MS-DOS)}
|
||||
@vindex lpr-headers-switches @r{(MS-DOS)}
|
||||
The commands @code{print-buffer} and @code{print-region} call the
|
||||
@code{pr} program, or use special switches to the @code{lpr} program, to
|
||||
produce headers on each printed page. MS-DOS and MS-Windows don't
|
||||
normally have these programs, so by default, the variable
|
||||
@code{lpr-headers-switches} is set so that the requests to print page
|
||||
headers are silently ignored. Thus, @code{print-buffer} and
|
||||
@code{print-region} produce the same output as @code{lpr-buffer} and
|
||||
@code{lpr-region}, respectively. If you do have a suitable @code{pr}
|
||||
program (for example, from GNU Coreutils), set
|
||||
@code{lpr-headers-switches} to @code{nil}; Emacs will then call
|
||||
@code{pr} to produce the page headers, and print the resulting output as
|
||||
specified by @code{printer-name}.
|
||||
|
||||
@vindex print-region-function @r{(MS-DOS)}
|
||||
@cindex lpr usage under MS-DOS
|
||||
@vindex lpr-command @r{(MS-DOS)}
|
||||
@vindex lpr-switches @r{(MS-DOS)}
|
||||
Finally, if you do have an @code{lpr} work-alike, you can set the
|
||||
variable @code{lpr-command} to @code{"lpr"}. Then Emacs will use
|
||||
@code{lpr} for printing, as on other systems. (If the name of the
|
||||
program isn't @code{lpr}, set @code{lpr-command} to specify where to
|
||||
find it.) The variable @code{lpr-switches} has its standard meaning
|
||||
when @code{lpr-command} is not @code{""}. If the variable
|
||||
@code{printer-name} has a string value, it is used as the value for the
|
||||
@code{-P} option to @code{lpr}, as on Unix.
|
||||
|
||||
@findex ps-print-buffer @r{(MS-DOS)}
|
||||
@findex ps-spool-buffer @r{(MS-DOS)}
|
||||
@vindex ps-printer-name @r{(MS-DOS)}
|
||||
@vindex ps-lpr-command @r{(MS-DOS)}
|
||||
@vindex ps-lpr-switches @r{(MS-DOS)}
|
||||
A parallel set of variables, @code{ps-lpr-command},
|
||||
@code{ps-lpr-switches}, and @code{ps-printer-name} (@pxref{PostScript
|
||||
Variables}), defines how PostScript files should be printed. These
|
||||
variables are used in the same way as the corresponding variables
|
||||
described above for non-PostScript printing. Thus, the value of
|
||||
@code{ps-printer-name} is used as the name of the device (or file) to
|
||||
which PostScript output is sent, just as @code{printer-name} is used
|
||||
for non-PostScript printing. (There are two distinct sets of
|
||||
variables in case you have two printers attached to two different
|
||||
ports, and only one of them is a PostScript printer.)
|
||||
|
||||
The default value of the variable @code{ps-lpr-command} is @code{""},
|
||||
which causes PostScript output to be sent to the printer port specified
|
||||
by @code{ps-printer-name}, but @code{ps-lpr-command} can also be set to
|
||||
the name of a program which will accept PostScript files. Thus, if you
|
||||
have a non-PostScript printer, you can set this variable to the name of
|
||||
a PostScript interpreter program (such as Ghostscript). Any switches
|
||||
that need to be passed to the interpreter program are specified using
|
||||
@code{ps-lpr-switches}. (If the value of @code{ps-printer-name} is a
|
||||
string, it will be added to the list of switches as the value for the
|
||||
@code{-P} option. This is probably only useful if you are using
|
||||
@code{lpr}, so when using an interpreter typically you would set
|
||||
@code{ps-printer-name} to something other than a string so it is
|
||||
ignored.)
|
||||
|
||||
For example, to use Ghostscript for printing on the system's default
|
||||
printer, put this in your @file{.emacs} file:
|
||||
|
||||
@example
|
||||
(setq ps-printer-name t)
|
||||
(setq ps-lpr-command "D:/gs6.01/bin/gswin32c.exe")
|
||||
(setq ps-lpr-switches '("-q" "-dNOPAUSE" "-dBATCH"
|
||||
"-sDEVICE=mswinpr2"
|
||||
"-sPAPERSIZE=a4"))
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
(This assumes that Ghostscript is installed in the
|
||||
@file{D:/gs6.01} directory.)
|
||||
|
||||
@node Windows System Menu
|
||||
@section Using the System Menu on Windows
|
||||
@cindex @code{Alt} key invokes menu (Windows)
|
||||
|
||||
Emacs compiled as a native Windows application normally turns off the
|
||||
Windows feature that tapping the @key{ALT}
|
||||
key invokes the Windows menu. The reason is that the @key{ALT} also
|
||||
serves as @key{META} in Emacs. When using Emacs, users often press the
|
||||
@key{META} key temporarily and then change their minds; if this has the
|
||||
effect of bringing up the Windows menu, it alters the meaning of
|
||||
subsequent commands. Many users find this frustrating.
|
||||
Windows feature that tapping the @key{ALT} key invokes the Windows
|
||||
menu. The reason is that the @key{ALT} serves as @key{META} in Emacs.
|
||||
When using Emacs, users often press the @key{META} key temporarily and
|
||||
then change their minds; if this has the effect of bringing up the
|
||||
Windows menu, it alters the meaning of subsequent commands. Many
|
||||
users find this frustrating.
|
||||
|
||||
@vindex w32-pass-alt-to-system
|
||||
You can re-enable Windows' default handling of tapping the @key{ALT} key
|
||||
|
|
132
man/org.texi
132
man/org.texi
|
@ -4,7 +4,7 @@
|
|||
@setfilename ../info/org
|
||||
@settitle Org Mode Manual
|
||||
|
||||
@set VERSION 4.25
|
||||
@set VERSION 4.26
|
||||
@set DATE April 2006
|
||||
|
||||
@dircategory Emacs
|
||||
|
@ -130,7 +130,7 @@ Hyperlinks
|
|||
* Link format:: How links in Org-mode are formatted
|
||||
* Internal links:: Links to other places in the current file
|
||||
* External links:: URL-like links to the world
|
||||
* Managing links:: Creating, inserting and following
|
||||
* Handling links:: Creating, inserting and following
|
||||
* Search Options:: Linking to a specific location
|
||||
* Remember:: Org-trees store quick notes
|
||||
|
||||
|
@ -242,10 +242,10 @@ structured ASCII file, as HTML, or (todo and agenda items only) as an
|
|||
iCalendar file.
|
||||
|
||||
Org-mode keeps simple things simple. When first fired up, it should
|
||||
feel like a simple but easy to use outliner. Complexity is not
|
||||
imposed, but a large amount of functionality is available when you
|
||||
need it. Org-mode can be used on different levels and in different
|
||||
ways, for example:
|
||||
feel like a simple, easy to use outliner. Complexity is not imposed,
|
||||
but a large amount of functionality is available when you need it.
|
||||
Org-mode can be used on different levels and in different ways, for
|
||||
example:
|
||||
|
||||
@example
|
||||
@r{@bullet{} as an outline extension with visibility cycling and structure editing}
|
||||
|
@ -642,7 +642,7 @@ C-v} creates a sparse TODO tree (@pxref{TODO basics}).
|
|||
To print a sparse tree, you can use the Emacs command
|
||||
@code{ps-print-buffer-with-faces} which does not print invisible parts
|
||||
of the document @footnote{This does not work under XEmacs, because
|
||||
XEmacs uses selective display for outlining, not text properties}.
|
||||
XEmacs uses selective display for outlining, not text properties.}.
|
||||
Or you can use the command @kbd{C-c C-x v} to copy the visible part of
|
||||
the document to another file (extension @file{.txt}) which can then be
|
||||
printed in any desired way.
|
||||
|
@ -678,6 +678,7 @@ ends before the next line that is indented like the bullet/number, or
|
|||
less. For example:
|
||||
|
||||
@example
|
||||
@group
|
||||
** Lord of the Rings
|
||||
My favorite scenes are (in this order)
|
||||
1. Eowyns fight with the witch king
|
||||
|
@ -687,6 +688,8 @@ My favorite scenes are (in this order)
|
|||
3. Peter Jackson being shot by Legolas
|
||||
- on DVD only
|
||||
He makes a really funny face when it happens.
|
||||
But in the end, not individual scenes matter but the film as a whole.
|
||||
@end group
|
||||
@end example
|
||||
|
||||
Org-mode supports these lists by tuning filling and wrapping commands
|
||||
|
@ -998,9 +1001,10 @@ The width of columns is automatically determined by the table editor.
|
|||
Sometimes a single field or a few fields need to carry more text,
|
||||
leading to inconveniently wide columns. To limit@footnote{This feature
|
||||
does not work on XEmacs.} the width of a column, one field anywhere in
|
||||
the column must carry the string @samp{<N>} where @samp{N} is an integer
|
||||
specifying the width of the column in characters. The next re-align
|
||||
will then set the width of this column to no more than this value.
|
||||
the column may contain just the string @samp{<N>} where @samp{N} is an
|
||||
integer specifying the width of the column in characters. The next
|
||||
re-align will then set the width of this column to no more than this
|
||||
value.
|
||||
|
||||
@example
|
||||
|---+------------------------------| |---+--------|
|
||||
|
@ -1372,7 +1376,7 @@ links to other files, Usenet articles, emails and much more.
|
|||
* Link format:: How links in Org-mode are formatted
|
||||
* Internal links:: Links to other places in the current file
|
||||
* External links:: URL-like links to the world
|
||||
* Managing links:: Creating, inserting and following
|
||||
* Handling links:: Creating, inserting and following
|
||||
* Search Options:: Linking to a specific location
|
||||
* Remember:: Org-trees store quick notes
|
||||
@end menu
|
||||
|
@ -1413,29 +1417,28 @@ internal structure of all links, use the menu entry
|
|||
@cindex links, internal
|
||||
@cindex CamelCase links
|
||||
|
||||
If the link text does not look like a URL, links are considered to be
|
||||
internal in the current file. Links such as @samp{[[My Target]]} or
|
||||
@samp{[[My Target][Find my target]]} lead to a text search in the
|
||||
current file. The link can be followed with @kbd{C-c C-o} when the
|
||||
cursor is on the link, or with a mouse click (@pxref{Managing links}).
|
||||
The preferred match for such a link is a dedicated target: The same
|
||||
string in double angular brackets. Targets may be located anywhere,
|
||||
often it is convenient to put them into a comment line, for example
|
||||
If the link does not look like a URL, it is considered to be internal in
|
||||
the current file. Links such as @samp{[[My Target]]} or @samp{[[My
|
||||
Target][Find my target]]} lead to a text search in the current file.
|
||||
The link can be followed with @kbd{C-c C-o} when the cursor is on the
|
||||
link, or with a mouse click (@pxref{Handling links}). The preferred
|
||||
match for such a link is a dedicated target: The same string in double
|
||||
angular brackets. Targets may be located anywhere, often it is
|
||||
convenient to put them into a comment line, for example
|
||||
|
||||
@example
|
||||
# <<My Target>>
|
||||
@end example
|
||||
|
||||
@noindent In HTML export (@pxref{HTML export}), such targets will become
|
||||
named anchors for direct access through http links.
|
||||
named anchors for direct access through @samp{http} links.
|
||||
|
||||
If no dedicated target exists, Org-mode will search for the words in the
|
||||
link, often removing the need for a dedicated target. In the above
|
||||
example the search would be for @samp{my target}. Links starting with a
|
||||
star like @samp{*My Target} restrict the search to headlines. When
|
||||
searching, Org-mode will first try an exact match, but then move on to
|
||||
more and more lenient searches. For example, the link @samp{[[*My
|
||||
Targets]]} will find any of the following:
|
||||
link. In the above example the search would be for @samp{my target}.
|
||||
Links starting with a star like @samp{*My Target} restrict the search to
|
||||
headlines. When searching, Org-mode will first try an exact match, but
|
||||
then move on to more and more lenient searches. For example, the link
|
||||
@samp{[[*My Targets]]} will find any of the following:
|
||||
|
||||
@example
|
||||
** My targets
|
||||
|
@ -1446,7 +1449,7 @@ Targets]]} will find any of the following:
|
|||
To insert a link targeting a headline, in-buffer completion can be used.
|
||||
Just type a star followed by a few optional letters into the buffer and
|
||||
press @kbd{M-@key{TAB}}. All headlines in the current buffer will be
|
||||
offered as completions. @xref{Managing links}, for more commands
|
||||
offered as completions. @xref{Handling links}, for more commands
|
||||
creating links.
|
||||
|
||||
Following a link pushes a mark onto Org-mode's own mark ring. You can
|
||||
|
@ -1484,7 +1487,7 @@ the option @code{org-activate-links}. A CamelCase word then leads to a
|
|||
text search such that @samp{CamelCaseLink} is equivalent to
|
||||
@samp{[[camel case link]]}.
|
||||
|
||||
@node External links, Managing links, Internal links, Hyperlinks
|
||||
@node External links, Handling links, Internal links, Hyperlinks
|
||||
@section External links
|
||||
@cindex links, external
|
||||
@cindex external links
|
||||
|
@ -1540,8 +1543,8 @@ as links. If spaces must be part of the link (for example in
|
|||
@samp{bbdb:Richard Stallman}) or to remove ambiguities about the end of
|
||||
the link, enclose them in angular brackets.
|
||||
|
||||
@node Managing links, Search Options, External links, Hyperlinks
|
||||
@section Managing links
|
||||
@node Handling links, Search Options, External links, Hyperlinks
|
||||
@section Handling links
|
||||
|
||||
Org-mode provides methods to create a link in the correct syntax, to
|
||||
insert it into an org-mode file, and to follow the link.
|
||||
|
@ -1552,15 +1555,17 @@ insert it into an org-mode file, and to follow the link.
|
|||
@item C-c l
|
||||
Store a link to the current location. This is a @emph{global} command
|
||||
which can be used in any buffer to create a link. The link will be
|
||||
stored for later insertion into an Org-mode buffer (see below). For VM,
|
||||
RMAIL, WANDERLUST, MH-E, GNUS and BBDB buffers, the link will point to
|
||||
the current article/entry. For W3 and W3M buffers, the link goes to the
|
||||
current URL. For Org-mode files, the current headline is targeted. For
|
||||
any other files, the link will point to the file, with a search string
|
||||
(@pxref{Search Options}) pointing to the contents of the current line.
|
||||
If there is an active region, the selected words will form the basis of
|
||||
the search string. The key binding @kbd{C-c l} is only a suggestion -
|
||||
see @ref{Installation and activation}.
|
||||
stored for later insertion into an Org-mode buffer (see below). For
|
||||
Org-mode files, if there is a @samp{<<target>>} at the cursor, the link
|
||||
points to the target. Otherwise it points to the current headline. For
|
||||
VM, RMAIL, WANDERLUST, MH-E, GNUS and BBDB buffers, the link will
|
||||
indicate to the current article/entry. For W3 and W3M buffers, the link
|
||||
goes to the current URL. For any other files, the link will point to
|
||||
the file, with a search string (@pxref{Search Options}) pointing to the
|
||||
contents of the current line. If there is an active region, the
|
||||
selected words will form the basis of the search string. The key
|
||||
binding @kbd{C-c l} is only a suggestion - see @ref{Installation and
|
||||
activation}.
|
||||
|
||||
@kindex C-c C-l
|
||||
@cindex link completion
|
||||
|
@ -1571,12 +1576,12 @@ Insert a link. This prompts for a link to be inserted into the buffer.
|
|||
You can just type a link, using text for an internal link, or one of the
|
||||
link type prefixes mentioned in the examples above. Through completion,
|
||||
all links stored during the current session can be accessed. The link
|
||||
will be formatted as given in the variable @code{org-link-format} and
|
||||
inserted into the buffer, along with a descriptive text. Note that you
|
||||
don't have to use this command to insert a link. Links in Org-mode are
|
||||
plain text, and you can type or paste them straight into the buffer.
|
||||
By using this command, the links are automatically enclosed in double
|
||||
brackets, and you will be asked for the optional descriptive text.
|
||||
will be inserted into the buffer, along with a descriptive text. Note
|
||||
that you don't have to use this command to insert a link. Links in
|
||||
Org-mode are plain text, and you can type or paste them straight into
|
||||
the buffer. By using this command, the links are automatically enclosed
|
||||
in double brackets, and you will be asked for the optional descriptive
|
||||
text.
|
||||
|
||||
@kindex C-u C-c C-l
|
||||
@cindex file name completion
|
||||
|
@ -1638,7 +1643,7 @@ previously recorded positions.
|
|||
@end table
|
||||
|
||||
|
||||
@node Search Options, Remember, Managing links, Hyperlinks
|
||||
@node Search Options, Remember, Handling links, Hyperlinks
|
||||
@section Search options in file links
|
||||
@cindex search option in file links
|
||||
@cindex file links, searching
|
||||
|
@ -1843,9 +1848,9 @@ agenda files (@pxref{Agenda views}) into a single buffer. The buffer is in
|
|||
@code{agenda-mode}, so there are commands to examine and manipulate
|
||||
the TODO entries directly from that buffer (@pxref{Agenda commands}).
|
||||
@xref{Global TODO list}, for more information.
|
||||
@item @code{org-agenda-include-all-todo}
|
||||
If you would like to have all your TODO items listed as part of your
|
||||
agenda, customize the variable @code{org-agenda-include-all-todo}.
|
||||
@c @item @code{org-agenda-include-all-todo}
|
||||
@c If you would like to have all your TODO items listed as part of your
|
||||
@c agenda, customize the variable @code{org-agenda-include-all-todo}.
|
||||
@end table
|
||||
|
||||
@node Progress logging, TODO extensions, TODO basics, TODO items
|
||||
|
@ -2086,7 +2091,7 @@ for @emph{today}, until the entry is marked DONE. I.e., the task will
|
|||
automatically be forwarded until completed.
|
||||
|
||||
@example
|
||||
*** TODO Call Trillian to ask her out for a date on New Years Eve.
|
||||
*** TODO Call Trillian for a date on New Years Eve.
|
||||
SCHEDULED: <2004-12-25 Sat>
|
||||
@end example
|
||||
|
||||
|
@ -3352,7 +3357,7 @@ variable is @code{org-startup-align-all-tables}, with a default value
|
|||
@code{nil}.
|
||||
@example
|
||||
align @r{align all tables}
|
||||
noalign @r{don't align table on startup}
|
||||
noalign @r{don't align tables on startup}
|
||||
@end example
|
||||
Here are the options for hiding leading stars in outline headings. The
|
||||
corresponding variables are @code{org-hide-leading-stars} and
|
||||
|
@ -3375,7 +3380,7 @@ end of the file.
|
|||
@item #+TBLFM:
|
||||
This line contains the formulas for the table directly above the line.
|
||||
@item #+TITLE:, #+AUTHOR:, #+EMAIL:, #+LANGUAGE:, #+TEXT:, #+OPTIONS:
|
||||
These line provide setting for exporting files. For more details see
|
||||
These lines provide setting for exporting files. For more details see
|
||||
@ref{Export options}.
|
||||
@end table
|
||||
|
||||
|
@ -3563,10 +3568,24 @@ rather use @kbd{C-c .} to re-insert the timestamp.
|
|||
@cindex FAQ
|
||||
|
||||
@enumerate
|
||||
|
||||
@cindex allout.el, conflict with
|
||||
@cindex @code{keymapp nil} error
|
||||
@item @b{When I try to use Org-mode, I always get
|
||||
@code{(wrong-type-argument keymapp nil)}}.@*
|
||||
This is a conflict with an outdated version of the @file{allout.el}
|
||||
package which pretends to be also the standard outline-mode but is not.
|
||||
This happens with older versions of @file{allout.el}, for example the
|
||||
one distributed with Emacs 21. Upgrade to Emacs 22 and this problem
|
||||
will disappear. If for some reason you cannot do this, make sure that
|
||||
org.el is loaded @emph{before} @file{allout.el}, for example by putting
|
||||
@code{(require 'org)} early enough into your @file{.emacs} file.
|
||||
|
||||
@item @b{Org-mode seems to be a useful default mode for the various
|
||||
@file{README} files I have scattered through my directories. How do I
|
||||
turn it on for all @file{README} files?}@*
|
||||
@c
|
||||
turn it on for all @file{README} files?}
|
||||
@c @*
|
||||
|
||||
@example
|
||||
(add-to-list 'auto-mode-alist '("README$" . org-mode))
|
||||
@end example
|
||||
|
@ -3584,7 +3603,7 @@ convention that hides the link part and the brackets, only showing the
|
|||
description part. How can I convert my old links to this new format?}@*
|
||||
@c
|
||||
Execute once in each Org-mode file: @kbd{M-x org-upgrade-old-links}.
|
||||
The replaces angular brackets with the link format.
|
||||
This replaces angular brackets with the new link format.
|
||||
|
||||
@item @b{I don't care if you find the new bracket links great, I am
|
||||
attached to the old style using angular brackets and no hiding of the
|
||||
|
@ -3890,6 +3909,9 @@ control.
|
|||
@item
|
||||
Kevin Rogers contributed code to access VM files on remote hosts.
|
||||
@item
|
||||
Frank Ruell solved the mystery of the @code{keymapp nil} bug, a conflict
|
||||
with @file{allout.el}.
|
||||
@item
|
||||
Philip Rooke created the Org-mode reference card and provided lots of feedback.
|
||||
@item
|
||||
Christian Schlauer proposed angular brackets around links, among other
|
||||
|
|
|
@ -234,6 +234,14 @@ variable to @code{nil}.
|
|||
Elapsed time for expiration in seconds.
|
||||
@end defvar
|
||||
|
||||
@defvar pgg-gpg-use-agent
|
||||
When using GnuPG (gpg) as PGP scheme you can use @code{gpg-agent} for
|
||||
caching@footnote{Actually @code{gpg-agent} does not cache passphrases
|
||||
but private keys. On the other hand, from a users point of view this
|
||||
technical difference isn't visible.}. If non-@code{nil} try to use a
|
||||
running @code{gpg-agent}. It defaults to @code{nil}.
|
||||
@end defvar
|
||||
|
||||
@node Default user identity
|
||||
@section Default user identity
|
||||
|
||||
|
|
303
man/xresmini.texi
Normal file
303
man/xresmini.texi
Normal file
|
@ -0,0 +1,303 @@
|
|||
@c This is part of the Emacs manual.
|
||||
@c Copyright (C) 1987, 1993, 1994, 1995, 1997, 2001, 2002, 2003,
|
||||
@c 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
@c See file emacs.texi for copying conditions.
|
||||
@node X Resources, Antinews, Emacs Invocation, Top
|
||||
@appendix X Options and Resources
|
||||
|
||||
You can customize some X-related aspects of Emacs behavior using X
|
||||
resources, as is usual for programs that use X. On MS-Windows, you
|
||||
can customize some of the same aspects using the system registry.
|
||||
@xref{MS-Windows Registry}. Likewise, Emacs on MacOS Carbon emulates X
|
||||
resources using the Preferences system. @xref{Mac Environment Variables}.
|
||||
|
||||
When Emacs is built using an ``X toolkit'', such as Lucid or
|
||||
LessTif, you need to use X resources to customize the appearance of
|
||||
the widgets, including the menu-bar, scroll-bar, and dialog boxes.
|
||||
This is because the libraries that implement these don't provide for
|
||||
customization through Emacs. GTK+ widgets use a separate system of
|
||||
``GTK resources''. In this chapter we describe the most commonly used
|
||||
resource specifications. For full documentation, see the online
|
||||
manual.
|
||||
|
||||
@c Add xref for LessTif/Motif menu resources.
|
||||
|
||||
@menu
|
||||
* Resources:: Using X resources with Emacs (in general).
|
||||
* Table of Resources:: Table of specific X resources that affect Emacs.
|
||||
* Face Resources:: X resources for customizing faces.
|
||||
* Lucid Resources:: X resources for Lucid menus.
|
||||
* GTK resources:: Resources for GTK widgets.
|
||||
@end menu
|
||||
|
||||
@node Resources
|
||||
@appendixsec X Resources
|
||||
@cindex resources
|
||||
@cindex X resources
|
||||
@cindex @file{~/.Xdefaults} file
|
||||
@cindex @file{~/.Xresources} file
|
||||
|
||||
Programs running under the X Window System organize their user
|
||||
options under a hierarchy of classes and resources. You can specify
|
||||
default values for these options in your X resources file, usually
|
||||
named @file{~/.Xdefaults} or @file{~/.Xresources}.
|
||||
If changes in @file{~/.Xdefaults} do not
|
||||
take effect, it is because your X server stores its own list of
|
||||
resources; to update them, use the shell command @command{xrdb}---for
|
||||
instance, @samp{xrdb ~/.Xdefaults}.
|
||||
|
||||
Each line in the file specifies a value for one option or for a
|
||||
collection of related options, for one program or for several programs
|
||||
(optionally even for all programs).
|
||||
|
||||
@cindex Registry (MS-Windows)
|
||||
MS-Windows systems don't support @file{~/.Xdefaults} files, but
|
||||
Emacs compiled for Windows looks for X resources in the Windows
|
||||
Registry, under the key @samp{HKEY_CURRENT_USER\SOFTWARE\GNU\Emacs}
|
||||
and then under the key @samp{HKEY_LOCAL_MACHINE\SOFTWARE\GNU\Emacs}.
|
||||
The menu and scrollbars are native widgets on MS-Windows, so they are
|
||||
only customizable via the system-wide settings in the Display Control
|
||||
Panel. You can also set resources using the @samp{-xrm} command line
|
||||
option (see below.)
|
||||
|
||||
Applications such as Emacs look for resources with specific names
|
||||
and their particular meanings. Case distinctions are significant in
|
||||
these names. Each resource specification in @file{~/.Xdefaults}
|
||||
states the name of the program and the name of the resource. For
|
||||
Emacs, the program name is @samp{Emacs}. It looks like this:
|
||||
|
||||
@example
|
||||
Emacs.borderWidth: 2
|
||||
@end example
|
||||
|
||||
The order in which the lines appear in the file does not matter.
|
||||
Also, command-line options always override the X resources file.
|
||||
|
||||
You can experiment with the effect of different resource settings
|
||||
with the @code{editres} program. Select @samp{Get Tree} from the
|
||||
@samp{Commands} menu, then click on an Emacs frame. This will display
|
||||
a tree showing the structure of X toolkit widgets used in an Emacs
|
||||
frame. Select one of them, such as @samp{menubar}, then select
|
||||
@samp{Show Resource Box} from the @samp{Commands} menu. This displays
|
||||
a list of all the meaningful X resources for that widget, and allows
|
||||
you to edit them. Changes take effect when you click on the
|
||||
@samp{Apply} button. (See the @code{editres} man page for more
|
||||
details.)
|
||||
|
||||
@node Table of Resources
|
||||
@appendixsec Table of X Resources for Emacs
|
||||
|
||||
This table lists the resource names that designate options for
|
||||
Emacs, not counting those for the appearance of the menu bar, each
|
||||
with the class that it belongs to:
|
||||
|
||||
@table @asis
|
||||
@item @code{background} (class @code{Background})
|
||||
Background color name.
|
||||
|
||||
@item @code{borderColor} (class @code{BorderColor})
|
||||
Color name for the external border.
|
||||
|
||||
@item @code{cursorColor} (class @code{Foreground})
|
||||
Color name for text cursor (point).
|
||||
|
||||
@item @code{font} (class @code{Font})
|
||||
Font name (or fontset name, @pxref{Fontsets}) for @code{default} font.
|
||||
|
||||
@item @code{foreground} (class @code{Foreground})
|
||||
Color name for text.
|
||||
|
||||
@item @code{geometry} (class @code{Geometry})
|
||||
Window size and position. Be careful not to specify this resource as
|
||||
@samp{emacs*geometry}, because that may affect individual menus as well
|
||||
as the Emacs frame itself.
|
||||
|
||||
If this resource specifies a position, that position applies only to the
|
||||
initial Emacs frame (or, in the case of a resource for a specific frame
|
||||
name, only that frame). However, the size, if specified here, applies to
|
||||
all frames.
|
||||
|
||||
@item @code{iconName} (class @code{Title})
|
||||
Name to display in the icon.
|
||||
|
||||
@item @code{internalBorder} (class @code{BorderWidth})
|
||||
Width in pixels of the internal border.
|
||||
|
||||
@item @code{lineSpacing} (class @code{LineSpacing})
|
||||
@cindex line spacing
|
||||
@cindex leading
|
||||
Additional space (@dfn{leading}) between lines, in pixels.
|
||||
|
||||
@item @code{menuBar} (class @code{MenuBar})
|
||||
@cindex menu bar
|
||||
Give frames menu bars if @samp{on}; don't have menu bars if
|
||||
@samp{off}. @xref{Lucid Resources}, and @ref{LessTif Resources}, for
|
||||
how to control the appearance of the menu bar if you have one.
|
||||
|
||||
@item @code{pointerColor} (class @code{Foreground})
|
||||
Color of the mouse cursor.
|
||||
|
||||
@item @code{screenGamma} (class @code{ScreenGamma})
|
||||
@cindex gamma correction
|
||||
Gamma correction for colors, equivalent to the frame parameter
|
||||
@code{screen-gamma}.
|
||||
|
||||
@item @code{title} (class @code{Title})
|
||||
Name to display in the title bar of the initial Emacs frame.
|
||||
|
||||
@item @code{toolBar} (class @code{ToolBar})
|
||||
@cindex tool bar
|
||||
Number of lines to reserve for the tool bar. A zero value suppresses
|
||||
the tool bar. If the value is non-zero and
|
||||
@code{auto-resize-tool-bars} is non-@code{nil}, the tool bar's size
|
||||
will be changed automatically so that all tool bar items are visible.
|
||||
|
||||
@item @code{useXIM} (class @code{UseXIM})
|
||||
@cindex XIM
|
||||
@cindex X input methods
|
||||
@cindex input methods, X
|
||||
Turn off use of X input methods (XIM) if @samp{false} or @samp{off}.
|
||||
This is only relevant if your Emacs is actually built with XIM
|
||||
support. It is potentially useful to turn off XIM for efficiency,
|
||||
especially slow X client/server links.
|
||||
|
||||
@item @code{verticalScrollBars} (class @code{ScrollBars})
|
||||
Give frames scroll bars if @samp{on}; don't have scroll bars if
|
||||
@samp{off}.
|
||||
@end table
|
||||
|
||||
@node Face Resources
|
||||
@appendixsec X Resources for Faces
|
||||
|
||||
You can use resources to customize the appearance of particular
|
||||
faces (@pxref{Faces}):
|
||||
|
||||
@table @code
|
||||
@item @var{face}.attributeForeground
|
||||
Foreground color for face @var{face}.
|
||||
@item @var{face}.attributeBackground
|
||||
Background color for face @var{face}.
|
||||
@item @var{face}.attributeUnderline
|
||||
Underline flag for face @var{face}. Use @samp{on} or @samp{true} for
|
||||
yes.
|
||||
@item @var{face}.attributeStrikeThrough
|
||||
@itemx @var{face}.attributeOverline
|
||||
@itemx @var{face}.attributeBox
|
||||
@itemx @var{face}.attributeInverse
|
||||
Likewise, for other boolean font attributes.
|
||||
@item @var{face}.attributeStipple
|
||||
The name of a pixmap data file to use for the stipple pattern, or
|
||||
@code{false} to not use stipple for the face @var{face}.
|
||||
@item @var{face}.attributeBackgroundPixmap
|
||||
The background pixmap for the face @var{face}. Should be a name of a
|
||||
pixmap file or @code{false}.
|
||||
@item @var{face}.attributeFont
|
||||
Font name (full XFD name or valid X abbreviation) for face @var{face}.
|
||||
Instead of this, you can specify the font through separate attributes.
|
||||
@end table
|
||||
|
||||
Instead of using @code{attributeFont} to specify a font name, you can
|
||||
select a font through these separate attributes:
|
||||
|
||||
@table @code
|
||||
@item @var{face}.attributeFamily
|
||||
Font family for face @var{face}.
|
||||
@item @var{face}.attributeHeight
|
||||
Height of the font to use for face @var{face}: either an integer
|
||||
specifying the height in units of 1/10@dmn{pt}, or a floating point
|
||||
number that specifies a scale factor to scale the underlying face's
|
||||
default font, or a function to be called with the default height which
|
||||
will return a new height.
|
||||
@item @var{face}.attributeWidth
|
||||
@itemx @var{face}.attributeWeight
|
||||
@itemx @var{face}.attributeSlant
|
||||
Each of these resources corresponds to a like-named font attribute,
|
||||
and you write the resource value the same as the symbol you would use
|
||||
for the font attribute value.
|
||||
@item @var{face}.attributeBold
|
||||
Bold flag for face @var{face}---instead of @code{attributeWeight}. Use @samp{on} or @samp{true} for
|
||||
yes.
|
||||
@item @var{face}.attributeItalic
|
||||
Italic flag for face @var{face}---instead of @code{attributeSlant}.
|
||||
@end table
|
||||
|
||||
@node Lucid Resources
|
||||
@appendixsec Lucid Menu X Resources
|
||||
@cindex Menu X Resources (Lucid widgets)
|
||||
@cindex Lucid Widget X Resources
|
||||
|
||||
If the Emacs installed at your site was built to use the X toolkit
|
||||
with the Lucid menu widgets, then the menu bar is a separate widget
|
||||
and has its own resources. The resource specifications start with
|
||||
@samp{Emacs.pane.menubar}---for instance, to specify the font
|
||||
@samp{8x16} for the menu-bar items, write this:
|
||||
|
||||
@example
|
||||
Emacs.pane.menubar.font: 8x16
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
Resources for @emph{non-menubar} toolkit pop-up menus have
|
||||
@samp{menu*} instead of @samp{pane.menubar}. For example, to specify
|
||||
the font @samp{8x16} for the pop-up menu items, write this:
|
||||
|
||||
@example
|
||||
Emacs.menu*.font: 8x16
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
For dialog boxes, use @samp{dialog*}:
|
||||
|
||||
@example
|
||||
Emacs.dialog*.font: 8x16
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
The Lucid menus can display multilingual text in your locale. For
|
||||
more information about fontsets see the man page for
|
||||
@code{XCreateFontSet}. To enable multilingual menu text you specify a
|
||||
@code{fontSet} resource instead of the font resource. If both
|
||||
@code{font} and @code{fontSet} resources are specified, the
|
||||
@code{fontSet} resource is used.
|
||||
|
||||
Thus, to specify @samp{-*-helvetica-medium-r-*--*-120-*-*-*-*-*-*,*}
|
||||
for both the popup and menu bar menus, write this:
|
||||
|
||||
@example
|
||||
Emacs*menu*fontSet: -*-helvetica-medium-r-*--*-120-*-*-*-*-*-*,*
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
The @samp{*menu*} as a wildcard matches @samp{pane.menubar} and
|
||||
@samp{menu@dots{}}.
|
||||
|
||||
Experience shows that on some systems you may need to add
|
||||
@samp{shell.}@: before the @samp{pane.menubar} or @samp{menu*}. On
|
||||
some other systems, you must not add @samp{shell.}. The generic wildcard
|
||||
approach should work on both kinds of systems.
|
||||
|
||||
Here is a list of the specific resources for menu bars and pop-up menus:
|
||||
|
||||
@table @code
|
||||
@item font
|
||||
Font for menu item text.
|
||||
@item fontSet
|
||||
Fontset for menu item text.
|
||||
@item foreground
|
||||
Color of the foreground.
|
||||
@item background
|
||||
Color of the background.
|
||||
@item buttonForeground
|
||||
In the menu bar, the color of the foreground for a selected item.
|
||||
@item margin
|
||||
The margin of the menu bar, in characters. Default is 1.
|
||||
@end table
|
||||
|
||||
@node GTK resources
|
||||
@appendixsec GTK resources
|
||||
|
||||
@c Waiting for contents
|
||||
|
||||
@ignore
|
||||
arch-tag: e1856f29-2482-42c0-a990-233cdccd1f21
|
||||
@end ignore
|
|
@ -301,12 +301,10 @@ program outputs information saying which ones.
|
|||
@node Face Resources
|
||||
@appendixsec X Resources for Faces
|
||||
|
||||
You can also use resources to customize the appearance of particular
|
||||
You can use resources to customize the appearance of particular
|
||||
faces (@pxref{Faces}):
|
||||
|
||||
@table @code
|
||||
@item @var{face}.attributeFont
|
||||
Font for face @var{face}.
|
||||
@item @var{face}.attributeForeground
|
||||
Foreground color for face @var{face}.
|
||||
@item @var{face}.attributeBackground
|
||||
|
@ -314,49 +312,45 @@ Background color for face @var{face}.
|
|||
@item @var{face}.attributeUnderline
|
||||
Underline flag for face @var{face}. Use @samp{on} or @samp{true} for
|
||||
yes.
|
||||
@item @var{face}.attributeFamily
|
||||
Font family for face @var{face}.
|
||||
@item @var{face}.attributeWidth
|
||||
Relative proportional width of the font to use for face @var{face}.
|
||||
It should be one of @code{ultra-condensed}, @code{extra-condensed},
|
||||
@code{condensed}, @code{semi-condensed}, @code{normal},
|
||||
@code{semi-expanded}, @code{expanded}, @code{extra-expanded}, or
|
||||
@code{ultra-expanded}.
|
||||
@item @var{face}.attributeHeight
|
||||
Height of the font to use for face @var{face}: either an integer
|
||||
specifying the height in units of 1/10@dmn{pt}, or a floating point
|
||||
number that specifies a scale factor to scale the underlying face's
|
||||
default font, or a function to be called with the default height which
|
||||
will return a new height.
|
||||
@item @var{face}.attributeWeight
|
||||
A weight to use for the face @var{face}. It must be one of
|
||||
@code{ultra-bold}, @code{extra-bold}, @code{bold},
|
||||
@code{semi-bold}, @code{normal}, @code{semi-light}, @code{light},
|
||||
@code{extra-light}, @code{ultra-light}.
|
||||
@item @var{face}.attributeSlant
|
||||
The slant to use for the font of face @var{face}. It must be one of
|
||||
@code{italic}, @code{oblique}, @code{normal},
|
||||
@code{reverse-italic}, or @code{reverse-oblique}.
|
||||
@item @var{face}.attributeStrikeThrough
|
||||
Whether the face @var{face} should be drawn with a line striking
|
||||
through the characters.
|
||||
@item @var{face}.attributeOverline
|
||||
Whether the characters in the face @var{face} should be overlined.
|
||||
@item @var{face}.attributeBox
|
||||
Whether to draw a box around the characters in face @var{face}.
|
||||
@item @var{face}.attributeInverse
|
||||
Whether to display the characters in face @var{face} in inverse
|
||||
video.
|
||||
@itemx @var{face}.attributeOverline
|
||||
@itemx @var{face}.attributeBox
|
||||
@itemx @var{face}.attributeInverse
|
||||
Likewise, for other boolean font attributes.
|
||||
@item @var{face}.attributeStipple
|
||||
The name of a pixmap data file to use for the stipple pattern, or
|
||||
@code{false} to not use stipple for the face @var{face}.
|
||||
@item @var{face}.attributeBackgroundPixmap
|
||||
The background pixmap for the face @var{face}. Should be a name of a
|
||||
pixmap file or @code{false}.
|
||||
@item @var{face}.attributeFont
|
||||
Font name (full XFD name or valid X abbreviation) for face @var{face}.
|
||||
Instead of this, you can specify the font through separate attributes.
|
||||
@end table
|
||||
|
||||
Instead of using @code{attributeFont} to specify a font name, you can
|
||||
select a font through these separate attributes:
|
||||
|
||||
@table @code
|
||||
@item @var{face}.attributeFamily
|
||||
Font family for face @var{face}.
|
||||
@item @var{face}.attributeHeight
|
||||
Height of the font to use for face @var{face}: either an integer
|
||||
specifying the height in units of 1/10@dmn{pt}, or a floating point
|
||||
number that specifies a scale factor to scale the underlying face's
|
||||
default font, or a function to be called with the default height which
|
||||
will return a new height.
|
||||
@item @var{face}.attributeWidth
|
||||
@itemx @var{face}.attributeWeight
|
||||
@itemx @var{face}.attributeSlant
|
||||
Each of these resources corresponds to a like-named font attribute,
|
||||
and you write the resource value the same as the symbol you would use
|
||||
for the font attribute value.
|
||||
@item @var{face}.attributeBold
|
||||
Whether to draw the characters in the face @var{face} as bold.
|
||||
Bold flag for face @var{face}---instead of @code{attributeWeight}. Use @samp{on} or @samp{true} for
|
||||
yes.
|
||||
@item @var{face}.attributeItalic
|
||||
Whether to draw the characters in the face @var{face} as italic.
|
||||
Italic flag for face @var{face}---instead of @code{attributeSlant}.
|
||||
@end table
|
||||
|
||||
@node Lucid Resources
|
||||
|
|
11
src/.gdbinit
11
src/.gdbinit
|
@ -88,15 +88,13 @@ end
|
|||
# Print out s-expressions from tool bar
|
||||
define pp1
|
||||
set $tmp = $arg0
|
||||
echo $arg0
|
||||
printf " = "
|
||||
set $output_debug = print_output_debug_flag
|
||||
set print_output_debug_flag = 0
|
||||
set safe_debug_print ($tmp)
|
||||
set print_output_debug_flag = $output_debug
|
||||
end
|
||||
document pp1
|
||||
Print the argument as an emacs s-expression
|
||||
Print the argument as an emacs s-expression.
|
||||
Works only when an inferior emacs is executing.
|
||||
For use on tool bar when debugging in Emacs
|
||||
where the variable name would not otherwise
|
||||
|
@ -119,8 +117,6 @@ end
|
|||
# Print value of lisp variable
|
||||
define pv1
|
||||
set $tmp = "$arg0"
|
||||
echo $arg0
|
||||
printf " = "
|
||||
set $output_debug = print_output_debug_flag
|
||||
set print_output_debug_flag = 0
|
||||
set safe_debug_print (find_symbol_value (intern ($tmp)))
|
||||
|
@ -129,9 +125,8 @@ end
|
|||
document pv1
|
||||
Print the value of the lisp variable given as argument.
|
||||
Works only when an inferior emacs is executing.
|
||||
For use on tool bar when debugging in Emacs
|
||||
where the variable name would not otherwise
|
||||
be recorded in the GUD buffer.
|
||||
For use when debugging in Emacs where the variable
|
||||
name would not otherwise be recorded in the GUD buffer.
|
||||
end
|
||||
|
||||
# Print out current buffer point and boundaries
|
||||
|
|
187
src/ChangeLog
187
src/ChangeLog
|
@ -1,11 +1,172 @@
|
|||
2006-05-02 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* xmenu.c (restore_menu_items): Return a value.
|
||||
|
||||
2006-05-01 Martin Rudalics <rudalics@gmx.at>
|
||||
|
||||
* syntax.c (Fforward_comment): Detect generic comment at beginning of
|
||||
buffer when moving backwards.
|
||||
|
||||
2006-05-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
|
||||
|
||||
* dispnew.c (update_window): Don't set changed_p when mode/header
|
||||
line is updated.
|
||||
|
||||
* xdisp.c (prepare_menu_bars) [MAC_OS]: Call mac_update_title_bar.
|
||||
(get_glyph_face_and_encoding, get_char_face_and_encoding):
|
||||
Don't distinguish known faces from others.
|
||||
|
||||
* mac.c (mac_coerce_file_name_ptr): Try typeFSRef if coercion
|
||||
through typeFileURL failed.
|
||||
|
||||
* macfns.c (mac_update_title_bar): New function.
|
||||
[TARGET_API_MAC_CARBON] (mac_update_proxy_icon): New function.
|
||||
(show_hourglass, hide_hourglass) [USE_CG_DRAWING]:
|
||||
Call mac_prepare_for_quickdraw.
|
||||
|
||||
* macgui.h (USE_ATSUI): Set default to 1 if MAC_OSX is defined.
|
||||
(USE_CG_DRAWING): Don't define if compiled on Mac OS X 10.1.
|
||||
(enum pcm_status): New enum.
|
||||
(XCHARSTRUCTROW_CHAR_VALID_P, XCHARSTRUCTROW_SET_CHAR_VALID)
|
||||
(XCharStructRow): Remove. Now validity is represented by
|
||||
non-negativeness of sum of ascent and descent.
|
||||
(struct MacFontStruct): Change type of member `rows'.
|
||||
(struct _XGC) [USE_CG_DRAWING]: Add member `clip_rects'.
|
||||
|
||||
* macterm.c (mac_draw_line, mac_draw_line_to_pixmap):
|
||||
Adjust endpoints of strictly horizontal/vertical lines.
|
||||
(mac_set_clip_rectangles) [USE_CG_DRAWING]: Set clip_rects.
|
||||
(pcm_init, pcm_get_status): New functions.
|
||||
(x_per_char_metric, XLoadQueryFont): Use them instead of
|
||||
XCharStructRow and related macros.
|
||||
(x_draw_relief_rect): Don't adjust arguments of mac_draw_line.
|
||||
(x_free_frame_resources) [TARGET_API_MAC_CARBON]: Free FRAME_FILE_NAME.
|
||||
(XTread_socket) [TARGET_API_MAC_CARBON]: Handle proxy icon drag
|
||||
and window path pop-up menu on title bar.
|
||||
(mac_use_core_graphics) [USE_CG_DRAWING]: Set default to 1.
|
||||
|
||||
* macterm.h (mac_update_title_bar): Add extern.
|
||||
(struct mac_output) [TARGET_API_MAC_CARBON]: New member `file_name'.
|
||||
(FRAME_FILE_NAME): New macro.
|
||||
|
||||
* unexmacosx.c (unexec): Error if trying unexec from dumped executable.
|
||||
|
||||
2006-04-30 Richard Stallman <rms@gnu.org>
|
||||
|
||||
* keymap.c (Fdefine_key): Improve error message
|
||||
when KEY begins with a non-prefix key.
|
||||
|
||||
2006-04-30 Martin Rudalics <rudalics@gmx.at>
|
||||
|
||||
* syntax.c (Fforward_comment): Don't forget to break out of the loop
|
||||
when we skipped backward over a generic comment.
|
||||
|
||||
2006-04-27 Nick Roberts <nickrob@snap.net.nz>
|
||||
|
||||
* .gdbinit (pp1, pv1): Only print value as expression is now
|
||||
printed out by gud-print.
|
||||
(pv1): Correct doc string.
|
||||
|
||||
2006-04-26 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* keymap.c (store_in_keymap): Change `def' arg to not be `register'.
|
||||
Seems to trigger a bug in gcc-amd64 4.0.2 20051125 (Red Hat 4.0.2-8):
|
||||
keymap.c:895: error: address of register variable `def' requested.
|
||||
|
||||
2006-04-26 Jason Rumney <jasonr@gnu.org>
|
||||
|
||||
* w32term.c (construct_mouse_wheel): Handle negative coordinates.
|
||||
|
||||
* w32fns.c (w32_wnd_proc) <WM_LBUTTONDOWN, WM_RBUTTONDOWN>:
|
||||
<WM_LBUTTONUP, WM_RBUTTONUP>: Call signal_user_input in the cases
|
||||
where we preempt mouse_button_timer.
|
||||
|
||||
2006-04-25 Miles Bader <miles@gnu.org>
|
||||
|
||||
* editfns.c (Ffield_beginning, find_field): Undo change of 2006-04-23.
|
||||
|
||||
2006-04-24 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* process.h: Include headers for pid_t.
|
||||
|
||||
2006-04-24 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
* xdisp.c (fill_stretch_glyph_string): Set s->nchars = 1 for code which
|
||||
does last_glyph=s->first_glyph+s->nchars-1, e.g. if stretch has relief.
|
||||
(produce_stretch_glyph): Assume that face box height and width is
|
||||
already included in stretch glyph size so caller doesn't have to
|
||||
consider the extra space otherwise added (fixes problem in ses.el).
|
||||
|
||||
* frame.c (x_set_font): Clear f->n_tool_bar_rows and current frame
|
||||
matrices to force recalculation of tool-bar height after font change.
|
||||
|
||||
* xdisp.c (tool_bar_lines_needed): New local `temp_row' for clarity.
|
||||
Clear it when done, so we don't accidentally draw a second copy of
|
||||
the tool-bar after resetting f->n_tool_bar_rows.
|
||||
(redisplay_tool_bar): Update tool-bar-lines frame parameter whenever
|
||||
we recalculate f->n_tool_bar_rows.
|
||||
|
||||
2006-04-23 Lars Hansen <larsh@soem.dk>
|
||||
|
||||
* editfns.c (find_field): Fix comment.
|
||||
(Ffield_beginning): Fix bug when POS is at field beginning.
|
||||
|
||||
2006-04-22 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* puresize.h (BASE_PURESIZE): Increase to 1205000.
|
||||
|
||||
2006-04-21 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
* xdisp.c (redisplay_window): Fix last change. Don't recenter if
|
||||
window start is at BEGV.
|
||||
|
||||
* dispextern.h (struct image): New member `corners'.
|
||||
(TOP_CORNER, LEFT_CORNER, BOT_CORNER, RIGHT_CORNER): New macros.
|
||||
|
||||
* image.c (four_corners_best): New arg CORNERS specifies what pixels
|
||||
to look at in case image has margin.
|
||||
(x_create_bitmap_mask): Pass NULL for CORNERS to four_corners_best.
|
||||
(image_background, image_background_transparent)
|
||||
(x_build_heuristic_mask): Pass img->corners to four_corners_best.
|
||||
(gif_load): Set img->corners according to image's margin spec.
|
||||
Use img->corners values directly where applicable.
|
||||
Save image extension data in img->data.lisp_val.
|
||||
(gif_clear_image): New function to free img->data.lisp_val.
|
||||
(gif_type): Use it instead of generic x_clear_image.
|
||||
(Fimage_extension_data): New defun.
|
||||
(syms_of_image): Defsubr it.
|
||||
|
||||
2006-04-21 John Sullivan <john@wjsullivan.net> (tiny change)
|
||||
|
||||
* window.c (Fdisplay_buffer): Doc fix.
|
||||
|
||||
2006-04-21 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* s/ms-w32.h (SYSTEM_PURESIZE_EXTRA): Increase to 25000.
|
||||
|
||||
2006-04-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
|
||||
|
||||
* image.c [MAC_OS] (xpm_load_image): Fill in background field
|
||||
while we have ximg handy.
|
||||
|
||||
* macmenu.c (restore_menu_items, save_menu_items): New functions
|
||||
from xmenu.c.
|
||||
(set_frame_menubar, digest_single_submenu): Apply 2006-04-18
|
||||
changes for xmenu.c.
|
||||
|
||||
* macterm.c (x_per_char_metric): Return NULL if glyph width is 0.
|
||||
(add_mac_font_name): New function.
|
||||
(init_font_name_table): Use it. Adopt the first found font from
|
||||
those having the same family name.
|
||||
|
||||
2006-04-21 Nick Roberts <nickrob@snap.net.nz>
|
||||
|
||||
* xdisp.c (note_mouse_highlight): Use build_string.
|
||||
|
||||
2006-04-20 Lars Hansen <larsh@soem.dk>
|
||||
|
||||
* textprop.c (Fremove_list_of_text_properties): Ensure
|
||||
modify_region is called only when buffer is modified and that
|
||||
* textprop.c (Fremove_list_of_text_properties):
|
||||
Ensure modify_region is called only when buffer is modified and that
|
||||
signal_after_change is allways called in that case.
|
||||
|
||||
* print.c (PRINTFINISH): Call signal_after_change.
|
||||
|
@ -23,8 +184,8 @@
|
|||
|
||||
* xmenu.c (restore_menu_items, save_menu_items): New fns.
|
||||
(set_frame_menubar): Use save_menu_items. Save updated vector in
|
||||
the frame before unwinding it. Don't use unuse_menu_items. Don't
|
||||
use discard_menu_items.
|
||||
the frame before unwinding it. Don't use unuse_menu_items.
|
||||
Don't use discard_menu_items.
|
||||
(digest_single_submenu): Abort if an item is not in a pane.
|
||||
(init_menu_items): Put the error check at the top.
|
||||
|
||||
|
@ -51,8 +212,8 @@
|
|||
|
||||
* macterm.c (XCreateGC, x_per_char_metric, xlfdpat_create)
|
||||
(init_font_name_table, init_font_name_table, mac_do_list_fonts)
|
||||
(XLoadQueryFont, mac_store_apple_event): Don't check
|
||||
return value of xmalloc.
|
||||
(XLoadQueryFont, mac_store_apple_event): Don't check return value
|
||||
of xmalloc.
|
||||
|
||||
2006-04-17 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
|
@ -96,8 +257,7 @@
|
|||
2006-04-13 Kenichi Handa <handa@m17n.org>
|
||||
|
||||
* coding.c (setup_coding_system): Fix previous change.
|
||||
(encode_coding): If eol_type is not yet decided, use
|
||||
system_eol_type.
|
||||
(encode_coding): If eol_type is not yet decided, use system_eol_type.
|
||||
(shrink_encoding_region): If eol_type is not yet decided and
|
||||
system_eol_type is not LF, don't shrink.
|
||||
|
||||
|
@ -197,8 +357,8 @@
|
|||
within ||. Add explicit braces to avoid ambiguous `else'.
|
||||
(dump_glyph_row): Remove label for `inverse_p' from legend.
|
||||
|
||||
* xfaces.c (Finternal_merge_in_global_face, try_font_list): Add
|
||||
explicit braces to avoid ambiguous `else'.
|
||||
* xfaces.c (Finternal_merge_in_global_face, try_font_list):
|
||||
Add explicit braces to avoid ambiguous `else'.
|
||||
|
||||
2006-04-11 Micha,Ak(Bl Cadilhac <michael.cadilhac@lrde.org> (tiny change)
|
||||
|
||||
|
@ -907,11 +1067,6 @@
|
|||
(mac_set_clip_rectangles): When resetting clip region, make it
|
||||
empty instead of disposing of it.
|
||||
|
||||
2006-02-20 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* keymap.c (store_in_keymap): Change `def' arg to not be `register'.
|
||||
Seems to trigger a bug in gcc-amd64 4.0.2 20051125 (Red Hat 4.0.2-8).
|
||||
|
||||
2006-02-20 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
* Makefile.in: Add fringe.elc to WINDOW_SUPPORT.
|
||||
|
@ -1586,7 +1741,7 @@
|
|||
|
||||
* image.c [MAC_OS] (find_image_fsspec): Likewise.
|
||||
|
||||
2005-12-23 Martin Rudalics <rudalics@gmx.at> (tiny change)
|
||||
2005-12-23 Martin Rudalics <rudalics@gmx.at>
|
||||
|
||||
* insdel.c (insert, insert_and_inherit, insert_before_markers)
|
||||
(insert_before_markers_and_inherit): Make sure FROM is correct
|
||||
|
|
|
@ -2417,6 +2417,15 @@ struct image
|
|||
#define DEFAULT_IMAGE_WIDTH 30
|
||||
#define DEFAULT_IMAGE_HEIGHT 30
|
||||
|
||||
/* Top/left and bottom/right corner pixel of actual image data.
|
||||
Used by four_corners_best to consider the real image data,
|
||||
rather than looking at the optional image margin. */
|
||||
int corners[4];
|
||||
#define TOP_CORNER 0
|
||||
#define LEFT_CORNER 1
|
||||
#define BOT_CORNER 2
|
||||
#define RIGHT_CORNER 3
|
||||
|
||||
/* Percent of image height used as ascent. A value of
|
||||
CENTERED_IMAGE_ASCENT means draw the image centered on the
|
||||
line. */
|
||||
|
|
|
@ -4142,7 +4142,6 @@ update_window (w, force_p)
|
|||
update_window_line (w, MATRIX_ROW_VPOS (mode_line_row,
|
||||
desired_matrix),
|
||||
&mouse_face_overwritten_p);
|
||||
changed_p = 1;
|
||||
}
|
||||
|
||||
/* Find first enabled row. Optimizations in redisplay_internal
|
||||
|
@ -4212,7 +4211,6 @@ update_window (w, force_p)
|
|||
{
|
||||
header_line_row->y = 0;
|
||||
update_window_line (w, 0, &mouse_face_overwritten_p);
|
||||
changed_p = 1;
|
||||
}
|
||||
|
||||
/* Fix the appearance of overlapping/overlapped rows. */
|
||||
|
|
|
@ -489,7 +489,7 @@ get_pos_property (position, prop, object)
|
|||
}
|
||||
|
||||
/* Find the field surrounding POS in *BEG and *END. If POS is nil,
|
||||
the value of point is used instead. If BEG or END null,
|
||||
the value of point is used instead. If BEG or END is null,
|
||||
means don't store the beginning or end of the field.
|
||||
|
||||
BEG_LIMIT and END_LIMIT serve to limit the ranged of the returned
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue