Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-46

Merge from emacs--devo--0

Patches applied:

 * emacs--devo--0  (patch 157-163)

   - Update from CVS
   - Merge from gnus--rel--5.10

 * gnus--rel--5.10  (patch 58-61)

   - Update from CVS
This commit is contained in:
Miles Bader 2006-03-19 19:43:57 +00:00
commit 292203c9ef
76 changed files with 4005 additions and 2163 deletions

View file

@ -1,3 +1,11 @@
2006-03-18 Claudio Fontana <claudio@gnu.org>
* Makefile.in (INFO_FILES): New variable, contains all Info file names.
(install-arch-indep, uninstall): Use $(INFO_FILES) to specify files
to be installed/uninstalled.
(uninstall): Invoke "$(INSTALL_INFO) --remove" to remove references
to Info files installed by Emacs.
2006-03-03 Claudio Fontana <claudio@gnu.org>
* Makefile.in (install, uninstall): Add DESTDIR variable to

View file

@ -134,6 +134,11 @@ man1dir=$(mandir)/man1
# since there are now many packages documented with the texinfo
# system, it is inappropriate to imply that it is part of Emacs.
infodir=@infodir@
INFO_FILES=ada-mode autotype calc ccmode cl dired-x ebrowse ediff efaq \
elisp eintr emacs emacs-mime emacs-xtra eshell eudc flymake \
forms gnus idlwave info message mh-e newsticker org pcl-cvs \
pgg reftex sc ses sieve speedbar tramp vip viper widget \
woman smtpmail url rcirc erc
# Directory for local state files for all programs.
localstatedir=@localstatedir@
@ -497,19 +502,20 @@ install-arch-indep: mkdir info
chmod a+r $(DESTDIR)${infodir}/dir); \
fi; \
cd ${srcdir}/info ; \
for f in ada-mode* autotype* calc* ccmode* cl* dired-x* ebrowse* ediff* efaq* eintr* elisp* emacs* emacs-mime* emacs-xtra* eshell* eudc* flymake* forms* gnus* idlwave* info* message* mh-e* newsticker* org* pcl-cvs* pgg* reftex* sc* ses* sieve* speedbar* tramp* vip* widget* woman* smtpmail* url* rcirc* erc*; do \
(cd $${thisdir}; \
${INSTALL_DATA} ${srcdir}/info/$$f $(DESTDIR)${infodir}/$$f; \
chmod a+r $(DESTDIR)${infodir}/$$f); \
for elt in $(INFO_FILES); do \
for f in `ls $$elt $$elt-[1-9] $$elt-[1-9][0-9] 2>/dev/null`; do \
${INSTALL_DATA} $$f $(DESTDIR)${infodir}/$$f; \
chmod a+r $(DESTDIR)${infodir}/$$f; \
done; \
done); \
else true; fi
-unset CDPATH; \
thisdir=`/bin/pwd`; \
if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd $(DESTDIR)${infodir} && /bin/pwd)` ]; \
then \
for f in ada-mode autotype calc ccmode cl dired-x ebrowse ediff efaq elisp eintr emacs emacs-mime emacs-xtra eshell eudc flymake forms gnus idlwave info message mh-e newsticker org pcl-cvs pgg reftex sc ses sieve speedbar tramp vip viper widget woman smtpmail url rcirc erc; do \
for elt in $(INFO_FILES); do \
(cd $${thisdir}; \
${INSTALL_INFO} --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$f); \
${INSTALL_INFO} --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$elt); \
done; \
else true; fi
-chmod -R a+r $(DESTDIR)${datadir}/emacs ${COPYDESTS} $(DESTDIR)${infodir}
@ -573,7 +579,13 @@ uninstall:
done
(cd $(DESTDIR)${archlibdir} && rm -f fns-*)
-rm -rf $(DESTDIR)${libexecdir}/emacs/${version}
(cd $(DESTDIR)${infodir} && rm -f cl* ada-mode* autotype* calc* ccmode* ebrowse* efaq* eintr elisp* eshell* eudc* idlwave* message* pcl-cvs* reftex* speedbar* tramp* widget* woman* dired-x* ediff* emacs* emacs-xtra* flymake* forms* gnus* info* mh-e* newsticker* org* sc* ses* vip* smtpmail* url* rcirc* erc*)
(cd $(DESTDIR)${infodir} && \
for elt in $(INFO_FILES); do \
$(INSTALL_INFO) --remove --info-dir=. $$elt; \
for f in `ls $$elt $$elt-[1-9] $$elt-[1-9][0-9] 2>/dev/null`; do \
rm -f $$f; \
done; \
done;)
(cd $(DESTDIR)${man1dir} && rm -f emacs${manext} emacsclient${manext} etags${manext} ctags${manext})
(cd $(DESTDIR)${bindir} && rm -f $(EMACSFULL) $(EMACS))

View file

@ -1,3 +1,11 @@
2006-03-15 Carsten Dominik <dominik@science.uva.nl>
* orgcard.tex: Version number change only.
2006-03-15 Nick Roberts <nickrob@snap.net.nz>
* DEBUG (Note): Describe features for debugging with GDB in Emacs.
2006-03-11 Miles Bader <miles@gnu.org>
* images/mail: New directory.

View file

@ -245,6 +245,25 @@ and, assuming that "xtype" says that args[0] is a symbol:
xsymbol
** Using GDB in Emacs
Debugging with GDB in Emacs offers some advantages over the command line (See
the GDB Graphical Interface node of the Emacs manual). There are also some
features available just for debugging Emacs:
1) The command gud-pp isavailable on the tool bar (the `pp' icon) and allows
the user to print the s-expression of the variable at point, in the GUD
buffer.
2) Pressing `p' on a component of a watch expression that is a lisp object
in the speedbar prints its s-expression in the GUD buffer.
3) The STOP button on the tool bar is adjusted so that it sends SIGTSTP
instead of the usual SIGINT.
4) The command gud-pv has the global binding 'C-x C-a C-v' and prints the
value of the lisp variable at point.
** Debugging what happens while preloading and dumping Emacs
Type `gdb temacs' and start it with `r -batch -l loadup dump'.
@ -487,22 +506,44 @@ the machine where you started GDB and use the debugger from there.
The array `last_marked' (defined on alloc.c) can be used to display up
to 500 last objects marked by the garbage collection process.
Whenever the garbage collector marks a Lisp object, it records the
pointer to that object in the `last_marked' array. The variable
`last_marked_index' holds the index into the `last_marked' array one
place beyond where the pointer to the very last marked object is
stored.
pointer to that object in the `last_marked' array, which is maintained
as a circular buffer. The variable `last_marked_index' holds the
index into the `last_marked' array one place beyond where the pointer
to the very last marked object is stored.
The single most important goal in debugging GC problems is to find the
Lisp data structure that got corrupted. This is not easy since GC
changes the tag bits and relocates strings which make it hard to look
at Lisp objects with commands such as `pr'. It is sometimes necessary
to convert Lisp_Object variables into pointers to C struct's manually.
Use the `last_marked' array and the source to reconstruct the sequence
that objects were marked.
Once you discover the corrupted Lisp object or data structure, it is
useful to look at it in a fresh Emacs session and compare its contents
with a session that you are debugging.
Use the `last_marked' array and the source to reconstruct the sequence
that objects were marked. In general, you need to correlate the
values recorded in the `last_marked' array with the corresponding
stack frames in the backtrace, beginning with the innermost frame.
Some subroutines of `mark_object' are invoked recursively, others loop
over portions of the data structure and mark them as they go. By
looking at the code of those routines and comparing the frames in the
backtrace with the values in `last_marked', you will be able to find
connections between the values in `last_marked'. E.g., when GC finds
a cons cell, it recursively marks its car and its cdr. Similar things
happen with properties of symbols, elements of vectors, etc. Use
these connections to reconstruct the data structure that was being
marked, paying special attention to the strings and names of symbols
that you encounter: these strings and symbol names can be used to grep
the sources to find out what high-level symbols and global variables
are involved in the crash.
Once you discover the corrupted Lisp object or data structure, grep
the sources for its uses and try to figure out what could cause the
corruption. If looking at the sources doesn;t help, you could try
setting a watchpoint on the corrupted data, and see what code modifies
it in some invalid way. (Obviously, this technique is only useful for
data that is modified only very rarely.)
It is also useful to look at the corrupted object or data structure in
a fresh Emacs session and compare its contents with a session that you
are debugging.
** Debugging problems with non-ASCII characters

View file

@ -234,6 +234,10 @@ in the other directories in `load-path'. (-L is short for --directory.)
** The command line option --no-windows has been changed to
--no-window-system. The old one still works, but is deprecated.
---
** If the environment variable DISPLAY specifies an unreachable X display,
Emacs will now startup as if invoked with the --no-window-system option.
+++
** The -f option, used from the command line to call a function,
now reads arguments for the function interactively if it is
@ -947,11 +951,6 @@ The variable `Info-fontify' is no longer applicable; to disable
fontification in Info, remove `turn-on-font-lock' from
`Info-mode-hook'.
+++
*** font-lock-lines-before specifies a number of lines before the
current line that should be refontified when you change the buffer.
The default value is 1.
+++
*** font-lock: in modes like C and Lisp where the fontification assumes that
an open-paren in column 0 is always outside of any string or comment,

View file

@ -1,4 +1,4 @@
% Reference Card for Org Mode 4.09
% Reference Card for Org Mode 4.10
%
%**start of header
\newcount\columnsperpage
@ -58,7 +58,7 @@
% Thanks to Paul Rubin, Bob Chassell, Len Tower, and Richard Mlynarik
% for their many good ideas.
\def\orgversionnumber{4.09}
\def\orgversionnumber{4.10}
\def\year{2006}
\def\shortcopyrightnotice{\vskip 1ex plus 2 fill

View file

@ -1,3 +1,8 @@
2006-03-18 Andre Spiegel <spiegel@gnu.org>
* vcdiff: Use "echo" as a default for $echo, otherwise we'll
execute $DIFF twice, and once with the wrong options.
2006-02-23 Claudio Fontana <claudio@gnu.org>
* Makefile.in (install, uninstall): Add DESTDIR variable to

View file

@ -29,7 +29,7 @@ usage="$0: Usage: vcdiff [--brief] [-q] [-r<sid1>] [-r<sid2>] [diffopts] sccsfil
PATH=$PATH:/usr/ccs/bin:/usr/sccs:/usr/xpg4/bin # common SCCS hangouts
echo=
echo="echo"
sid1= sid2=
for f
@ -96,7 +96,7 @@ do
workfile=$rev2
esac
then
$echo $DIFF $options $sid1 $sid2 $workfile >&2
$echo $DIFF $options $rev1 $workfile >&2
$DIFF $options $rev1 $workfile
s=$?
fi

View file

@ -1,3 +1,199 @@
2006-03-18 Ben North <ben@redfrontdoor.org> (tiny change)
* isearch.el (isearch-other-meta-char): Handle user bindings for
shifted control characters.
2006-03-18 Agustin Martin <agustin.martin@hispalinux.es>
* textmodes/ispell.el (ispell-skip-region-alist): Add "_+" to the
part that matches email addresses, file names, etc.
2006-03-18 Eli Zaretskii <eliz@gnu.org>
* term/w32-win.el (mouse-set-font): Mention
w32-list-proportional-fonts in the doc string.
2006-03-18 Kim F. Storm <storm@cua.dk>
* ido.el (ido-cache-ftp-work-directory-time): Doc fix.
(ido-unc-hosts): New user option to explicitly define list of know
UNC-style hosts for completion.
(ido-cache-unc-host-shares-time): New user option.
(ido-is-unc-root, ido-is-unc-host, ido-cache-unc-valid): New
helper functions for UNC file-name support.
(ido-may-cache-directory): Check for UNC host. Simplify.
(ido-wash-history): Clean out old UNC hosts.
(ido-nonreadable-directory-p): UNC hosts are always readable.
(ido-directory-too-big-p): UNC hosts are never too big.
(ido-set-current-directory): Handle UNC root path.
(ido-file-name-all-completions): Complete UNC host names from
ido-unc-hosts list. Cache UNC host shares.
(ido-make-file-list-1): Don't filter UNC root.
(ido-exhibit): Check for // in root directory, and switch to UNC
mode by setting ido-current-directory to //.
2006-03-17 Luc Teirlinck <teirllm@auburn.edu>
* cus-edit.el (customize-changed-options): Mention explicit
version number as default in prompt.
2006-03-17 Bill Wohler <wohler@newt.com>
* image.el (image-load-path-for-library): Minor docstring fix.
2006-03-17 Carsten Dominik <dominik@science.uva.nl>
* textmodes/org.el (org-read-date): Include subgroup 5 into
replacement text.
(org-popup-calendar-for-date-prompt): Fix customization type.
2006-03-17 Nick Roberts <nickrob@snap.net.nz>
* progmodes/gdb-ui.el (gud-watch): Provide completion.
(gdb-continuation): New variable.
(gdb-send): Deal with continuation lines.
* progmodes/gud.el (gud-gdb-complete-command)
(gud-gdb-run-command-fetch-lines): Adapt for use with watch
expressions.
(gud-tooltip-mode): Use buffer-local value.
2006-03-16 Kim F. Storm <storm@cua.dk>
* ido.el (ido-edit-input): Use selected match, if any.
2006-03-16 Bill Wohler <wohler@newt.com>
* image.el (image-load-path-for-library): Prefer user's images in
image-load-path.
2006-03-16 Martin Rudalics <rudalics@gmx.at>
* mouse.el (mouse-drag-vertical-line): Use window-inside-edges
when checking for attempt to drag leftmost or rightmost scrollbar.
2006-03-16 Nick Roberts <nickrob@snap.net.nz>
* progmodes/gdb-ui.el (gdb-inferior-status): New variable.
(gdb-force-mode-line-update): New function.
(gdb-resync, gdb-starting, gdb-signal, gdb-exited, gdb-stopped)
(gdb-exited): Use them.
(gdb-signal): New fuction.
(gdb-annotation-rules): Provide a rule for it.
2006-03-16 Kenichi Handa <handa@m17n.org>
* international/mule.el (auto-coding-regexp-alist): Add entries
for Unicode BOM.
* sort.el (sort-build-lists): Temporarily bind
inhibit-field-text-motion to t.
2006-03-15 Luc Teirlinck <teirllm@auburn.edu>
* locate.el (locate-command, locate-make-command-line)
(locate-fcodes-file, locate-update-command)
(locate-prompt-for-command, locate, locate-with-filter)
(locate-get-file-positions): Doc fixes.
(locate-buffer-name, locate-header-face): Remove leading `*' in
defcustom.
(locate-filter-output): Use `keep-lines' instead of its alias
`delete-non-matching-lines'.
(locate-get-filename, locate-get-dirname): Add introductory comment.
(locate-find-directory-other-window): Give appropriate error
message if used outside main listing.
2006-03-15 Stefan Monnier <monnier@iro.umontreal.ca>
* font-lock.el (font-lock-lines-before): Delete variable, subsumed by
the new extend-region feature.
(font-lock-after-change-function): Update correspondingly.
* jit-lock.el (jit-lock-after-change): Update correspondingly.
* progmodes/grep.el (font-lock-lines-before): Don't disable.
2006-03-15 Bill Wohler <wohler@newt.com>
* image.el (image-load-path-for-library): Fix example by not
recommending that one binds image-load-path. Just defvar it to
placate compiler and only use it if previously defined.
2006-03-15 Carsten Dominik <dominik@science.uva.nl>
* textmodes/org.el (org-insert-centered): Use `string-width' to
make underlining work for wide characters.
(org-goto-map, org-agenda-mode-map, org-mode-map): Explicitly bind
TAB to `org-cycle', to make sure that no binding in
`outline-mode-map' can supercede it.
2006-03-14 Ken Manheimer <ken.manheimer@gmail.com>
* allout.el: Increment version to 2.2.1 in file commentary.
(allout-version): Increment to 2.2.1.
(allout-default-layout): New customization variable, used when the
file lacks a specific allout-layout. Uses allout-layout-type for
recursively nested definition.
(allout-layout-type): Widget defining allout layouts, necessary for
self-recursive definition.
(allout-mode): Incorporate allout-default-layout as fallback for
allout-layout.
(allout-layout): Mark as 'safe-local-variable', and refer mention
fallback to `allout-default-layout' in absence of a specified value.
(allout-passphrase-verifier-string)
(allout-passphrase-hint-string): Mark as 'safe-local-variable'.
(allout-file-passphrase-verifier-string): Obsolete variable, removed.
(allout-get-encryption-passphrase-verifier): Use correct name of
passphrase verifier in docstring.
2006-03-15 Nick Roberts <nickrob@snap.net.nz>
* progmodes/gdb-ui.el (gdb-var-list): Change order of first two
elements.
(gdb-find-watch-expression): Make it work for arrays too. Follow
change to gdb-var-list.
(gud-watch): Allow the user to enter variable name with a prexix
arg. Create keybindings.
(gdb-var-create-handler, gdb-var-evaluate-expression-handler)
(gdb-var-list-children-handler, gdb-var-update-handler)
(gdb-var-delete, gdb-edit-value, gdb-speedbar-expand-node)
(gdb-var-list-children-handler-1, gdb-var-update-handler-1):
Follow change to gdb-var-list.
(gdb-starting): Don't show the overlay arrows when program is
running.
* progmodes/gud.el (gud-speedbar-buttons): Follow change to
gdb-var-list.
2006-03-14 Bill Wohler <wohler@newt.com>
* image.el (image-load-path-for-library): Pass value of path
rather than symbol. Always return list of directories. Guarantee
that image directory comes first.
2006-03-14 Alan Mackenzie <acm@muc.de>
* font-core.el: New function/variable
font-lock-extend-region\(-function\)?.
* font-lock.el (font-lock-after-change-function): Call
font-lock-extend-region. Obey font-lock-lines-before.
(font-lock-default-fontify-region): Remove reference to
font-lock-lines-before.
* jit-lock.el (jit-lock-after-change): Call
font-lock-extend-region. Obey font-lock-lines-before.
2006-03-14 David Ponce <david@dponce.com>
* tree-widget.el (tree-widget-themes-load-path)
(tree-widget-themes-directory, tree-widget-theme): Doc fix.
2006-03-13 Ryan Yeske <rcyeske@gmail.com>
* net/rcirc.el (rcirc) <defgroup>: Add link to manual.
@ -8,8 +204,8 @@
2006-03-13 Miles Bader <miles@gnu.org>
* net/rcirc.el (rcirc-nick-abbrevs): Variable removed.
(rcirc-abbrev-nick): Function removed.
* net/rcirc.el (rcirc-nick-abbrevs): Remove variable.
(rcirc-abbrev-nick): Remove function.
(rcirc-format-response-string): Don't call `rcirc-abbrev-nick'.
2006-03-13 David Ponce <david@dponce.com>
@ -25,11 +221,11 @@
2006-03-13 Carsten Dominik <dominik@science.uva.nl>
* textmodes/org.el: (org-link-search): Avoid self-matching of
* textmodes/org.el (org-link-search): Avoid self-matching of
links, allow target text to be distributed over several lines.
(org-search-not-link): New function.
(org-set-regexps-and-options, org-get-current-options): New
startup options.
(org-set-regexps-and-options, org-get-current-options):
New startup options.
(org-export-as-html): Take odd-level setting from local variable.
(org-fontify-emphasized-text): New option.
(org-set-font-lock-defaults): Include emphasized text.
@ -100,8 +296,8 @@
2006-03-11 Kurt Hornik <Kurt.Hornik@wu-wien.ac.at>
* progmodes/octave-mod.el (octave-indent-for-comment): Behave
according to do string.
* progmodes/octave-mod.el (octave-indent-for-comment):
Behave according to do string.
2006-03-11 Agustin Martin <agustin.martin@hispalinux.es>
@ -139,7 +335,7 @@
* progmodes/gdb-ui.el (gdb-remove-text-properties): Rename from
gdb-remove-mouse-face and remove help-echo too.
(gdb-enqueue-input): Correct conditional clause.
2006-03-10 Glenn Morris <rgm@gnu.org>
* calendar/calendar.el (calendar-holidays): Doc fix.

View file

@ -6,7 +6,7 @@
;; Author: Ken Manheimer <ken dot manheimer at gmail dot com>
;; Maintainer: Ken Manheimer <ken dot manheimer at gmail dot com>
;; Created: Dec 1991 - first release to usenet
;; Version: 2.2
;; Version: 2.2.1
;; Keywords: outlines wp languages
;; This file is part of GNU Emacs.
@ -126,38 +126,72 @@ this variable."
(const :tag "Mode only" "activate")
(const :tag "Off" nil))
:group 'allout)
;;;_ = allout-layout
(defvar allout-layout nil
"*Layout specification and provisional mode trigger for allout outlines.
;;;_ = allout-default-layout
(defcustom allout-default-layout '(-2 : 0)
"*Default allout outline layout specification.
Buffer-specific.
This setting specifies the outline exposure to use when
`allout-layout' has the local value `t'. This docstring describes the
layout specifications.
A list value specifies a default layout for the current buffer, to be
applied upon activation of `allout-mode'. Any non-nil value will
automatically trigger `allout-mode' \(provided `allout-init' has been called
to enable this behavior).
A list value specifies a default layout for the current buffer,
to be applied upon activation of `allout-mode'. Any non-nil
value will automatically trigger `allout-mode', provided
`allout-init' has been called to enable this behavior.
See the docstring for `allout-init' for details on setting up for
auto-mode-activation, and for `allout-expose-topic' for the format of
the layout specification.
The types of elements in the layout specification are:
You can associate a particular outline layout with a file by setting
this var via the file's local variables. For example, the following
lines at the bottom of an Emacs Lisp file:
integer - dictate the relative depth to open the corresponding topic(s),
where:
- negative numbers force the topic to be closed before opening
to the absolute value of the number, so all siblings are open
only to that level.
- positive numbers open to the relative depth indicated by the
number, but do not force already opened subtopics to be closed.
- 0 means to close topic - hide all subitems.
: - repeat spec - apply the preceeding element to all siblings at
current level, *up to* those siblings that would be covered by specs
following the `:' on the list. Ie, apply to all topics at level but
trailing ones accounted for by trailing specs. \(Only the first of
multiple colons at the same level is honored - later ones are ignored.)
* - completely exposes the topic, including bodies
+ - exposes all subtopics, but not the bodies
- - exposes the body of the corresponding topic, but not subtopics
list - a nested layout spec, to be applied intricately to its
corresponding item(s)
;;;Local variables:
;;;allout-layout: \(0 : -1 -1 0)
;;;End:
Examples:
'(-2 : 0)
Collapse the top-level topics to show their children and
grandchildren, but completely collapse the final top-level topic.
'(-1 () : 1 0)
Close the first topic so only the immediate subtopics are shown,
leave the subsequent topics exposed as they are until the second
second to last topic, which is exposed at least one level, and
completely close the last topic.
'(-2 : -1 *)
Expose children and grandchildren of all topics at current
level except the last two; expose children of the second to
last and completely expose the last one, including its subtopics.
will, modulo the above-mentioned conditions, cause the mode to be
activated when the file is visited, followed by the equivalent of
`\(allout-expose-topic 0 : -1 -1 0)'. \(This is the layout used for
the allout.el source file.)
See `allout-expose-topic' for more about the exposure process.
Also, allout's mode-specific provisions will make topic prefixes default
to the comment-start string, if any, of the language of the file. This
is modulo the setting of `allout-use-mode-specific-leader', which see.")
(make-variable-buffer-local 'allout-layout)
is modulo the setting of `allout-use-mode-specific-leader', which see."
:type 'allout-layout-type
:group 'allout)
;;;_ : allout-layout-type
(define-widget 'allout-layout-type 'lazy
"Allout layout format customization basic building blocks."
:type '(repeat
(choice (integer :tag "integer (<= zero is strict)")
(const :tag ": (repeat prior)" :)
(const :tag "* (completely expose)" *)
(const :tag "+ (expose all offspring, headlines only)" +)
(const :tag "- (expose topic body but not offspring)" -)
(allout-layout-type :tag "<Nested layout>"))))
;;;_ = allout-show-bodies
(defcustom allout-show-bodies nil
"*If non-nil, show entire body when exposing a topic, rather than
@ -590,7 +624,7 @@ For details, see `allout-toggle-current-subtree-encryption's docstring."
;;;_ #1 Internal Outline Formatting and Configuration
;;;_ : Version
;;;_ = allout-version
(defvar allout-version "2.2"
(defvar allout-version "2.2.1"
"Version of currently loaded outline package. \(allout.el)")
;;;_ > allout-version
(defun allout-version (&optional here)
@ -604,6 +638,36 @@ For details, see `allout-toggle-current-subtree-encryption's docstring."
;;;_ = allout-mode
(defvar allout-mode nil "Allout outline mode minor-mode flag.")
(make-variable-buffer-local 'allout-mode)
;;;_ = allout-layout nil
(defvar allout-layout nil ; LEAVE GLOBAL VALUE NIL - see docstring.
"Buffer-specific setting for allout layout.
In buffers where this is non-nil \(and if `allout-init' has been run, to
enable this behavior), `allout-mode' will be automatically activated. The
layout dictated by the value will be used to set the initial exposure when
`allout-mode' is activated.
\*You should not setq-default this variable non-nil unless you want every
visited file to be treated as an allout file.*
The value would typically be set by a file local variable. For
example, the following lines at the bottom of an Emacs Lisp file:
;;;Local variables:
;;;allout-layout: \(0 : -1 -1 0)
;;;End:
dictate activation of `allout-mode' mode when the file is visited
\(presuming allout-init was already run), followed by the
equivalent of `\(allout-expose-topic 0 : -1 -1 0)'. \(This is
the layout used for the allout.el source file.)
`allout-default-layout' describes the specification format.
`allout-layout' can additionally have the value `t', in which
case the value of `allout-default-layout' is used.")
(make-variable-buffer-local 'allout-layout)
(put 'allout-layout 'safe-local-variable t)
;;;_ : Topic header format
;;;_ = allout-regexp
(defvar allout-regexp ""
@ -973,11 +1037,6 @@ wrapped within allout's automatic fill-prefix setting.")
"Horrible hack used to prevent invalid multiple triggering of outline
mode from prop-line file-var activation. Used by `allout-mode' function
to track repeats.")
;;;_ = allout-file-passphrase-verifier-string
(defvar allout-file-passphrase-verifier-string nil
"Name for use as a file variable for verifying encryption passphrase
across sessions.")
(make-variable-buffer-local 'allout-file-passphrase-verifier-string)
;;;_ = allout-passphrase-verifier-string
(defvar allout-passphrase-verifier-string nil
"Setting used to test solicited encryption passphrases against the one
@ -993,6 +1052,7 @@ 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)
;;;_ = allout-passphrase-hint-string
(defvar allout-passphrase-hint-string ""
"Variable used to retain reminder string for file's encryption passphrase.
@ -1004,6 +1064,7 @@ 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 "")
;;;_ = allout-after-save-decrypt
(defvar allout-after-save-decrypt nil
@ -1578,30 +1639,33 @@ OPEN: A topic that is not closed, though its offspring or body may be."
(allout-infer-body-reindent))
) ; cond
(if (and do-layout
allout-auto-activation
(listp allout-layout)
(and (not (eq allout-auto-activation 'activate))
(if (eq allout-auto-activation 'ask)
(if (y-or-n-p (format "Expose %s with layout '%s'? "
(buffer-name)
allout-layout))
t
(message "Skipped %s layout." (buffer-name))
nil)
t)))
(save-excursion
(message "Adjusting '%s' exposure..." (buffer-name))
(goto-char 0)
(allout-this-or-next-heading)
(condition-case err
(progn
(apply 'allout-expose-topic (list allout-layout))
(message "Adjusting '%s' exposure... done." (buffer-name)))
;; Problem applying exposure - notify user, but don't
;; interrupt, eg, file visit:
(error (message "%s" (car (cdr err)))
(sit-for 1)))))
(let ((use-layout (if (listp allout-layout)
allout-layout
allout-default-layout)))
(if (and do-layout
allout-auto-activation
use-layout
(and (not (eq allout-auto-activation 'activate))
(if (eq allout-auto-activation 'ask)
(if (y-or-n-p (format "Expose %s with layout '%s'? "
(buffer-name)
use-layout))
t
(message "Skipped %s layout." (buffer-name))
nil)
t)))
(save-excursion
(message "Adjusting '%s' exposure..." (buffer-name))
(goto-char 0)
(allout-this-or-next-heading)
(condition-case err
(progn
(apply 'allout-expose-topic (list use-layout))
(message "Adjusting '%s' exposure... done." (buffer-name)))
;; Problem applying exposure - notify user, but don't
;; interrupt, eg, file visit:
(error (message "%s" (car (cdr err)))
(sit-for 1))))))
allout-mode
) ; let*
) ; defun
@ -1660,7 +1724,7 @@ internal functions use this feature cohesively bunch changes."
(if (not
(yes-or-no-p
(substitute-command-keys
(concat "Modify this concealed text? (\"no\" aborts,"
(concat "Modify concealed text? (\"no\" just aborts,"
" \\[keyboard-quit] also reconceals) "))))
(progn (goto-char start)
(error "Concealed-text change refused.")))
@ -1676,7 +1740,7 @@ See allout-overlay-interior-modification-handler for details.
This before-change handler is used only where modification-hooks
overlay property is not supported."
(if (not allout-mode)
(if (not (allout-mode-p))
nil
(allout-overlay-interior-modification-handler nil nil beg end nil)))
;;;_ > allout-isearch-end-handler (&optional overlay)
@ -2561,7 +2625,6 @@ command/keystrokes to relocate the cursor off of a bullet character to
return to regular interpretation of self-insert characters."
(if (not (allout-mode-p))
;; Shouldn't be invoked if not in allout-mode, but just in case:
nil
;; Hot-spot navigation provisions:
(if (and (eq this-command 'self-insert-command)
@ -2595,7 +2658,7 @@ return to regular interpretation of self-insert characters."
this-command mapped-binding)))))))
;;;_ > allout-find-file-hook ()
(defun allout-find-file-hook ()
"Activate `allout-mode' when `allout-auto-activation', `allout-layout' non-nil.
"Activate `allout-mode' on non-nil `allout-auto-activation', `allout-layout'.
See `allout-init' for setup instructions."
(if (and allout-auto-activation
@ -3415,7 +3478,7 @@ depth, however."
(if (or (not (allout-mode-p))
(not (bolp))
(not (looking-at allout-regexp)))
;; Above conditions do not obtain - just do a regular kill:
;; Just do a regular kill:
(kill-line arg)
;; Ah, have to watch out for adjustments:
(let* ((beg (point))
@ -3889,7 +3952,7 @@ If optional INCLUDE-SINGLE-LINERS is true, then include single-line
topics \(which intrinsically can be considered both collapsed and
not\), as collapsed. Otherwise they are considered uncollapsed."
(save-excursion
(and
(and
(= (progn (allout-back-to-current-heading)
(move-end-of-line 1)
(point))
@ -5068,7 +5131,7 @@ Returns the resulting string, or nil if the transformation fails."
)
;;;_ > allout-obtain-passphrase (for-key cache-id prompt-id key-type
;;; allout-buffer retried fetch-pass)
(defun allout-obtain-passphrase (for-key cache-id prompt-id key-type
(defun allout-obtain-passphrase (for-key cache-id prompt-id key-type
allout-buffer retried fetch-pass)
"Obtain passphrase for a key from the cache or else from the user.
@ -5242,7 +5305,7 @@ An error is raised if the text is not encrypted."
nil nil 0 passphrase))
)
;;;_ > allout-update-passphrase-mnemonic-aids (for-key passphrase
;;; outline-buffer)
;;; outline-buffer)
(defun allout-update-passphrase-mnemonic-aids (for-key passphrase
outline-buffer)
"Update passphrase verifier and hint strings if necessary.
@ -5298,7 +5361,7 @@ are preserved on Emacs local file variables,
(defun allout-get-encryption-passphrase-verifier ()
"Return text of the encrypt passphrase verifier, unmassaged, or nil if none.
Derived from value of `allout-file-passphrase-verifier-string'."
Derived from value of `allout-passphrase-verifier-string'."
(let ((verifier-string (and (boundp 'allout-passphrase-verifier-string)
allout-passphrase-verifier-string)))
@ -5457,7 +5520,7 @@ setup for auto-startup."
(insert (concat "Dummy outline topic header - see"
"`allout-mode' docstring: `^Hm'."))
(allout-adjust-file-variable
"allout-layout" (format "%s" (or allout-layout '(-1 : 0)))))))
"allout-layout" (or allout-layout '(-1 : 0))))))
;;;_ > allout-file-vars-section-data ()
(defun allout-file-vars-section-data ()
"Return data identifying the file-vars section, or nil if none.
@ -5708,13 +5771,7 @@ which are part of the text that an image rests on.)
With argument ARG not nil or 1, move forward ARG - 1 lines first.
If point reaches the beginning or end of buffer, it stops there.
To ignore intangibility, bind `inhibit-point-motion-hooks' to t.
This function does not move point across a field boundary unless that
would move point to a different line than the original, unconstrained
result. If N is nil or 1, and a front-sticky field starts at point,
the point does not move. To ignore field boundaries bind
`inhibit-field-text-motion' to t."
To ignore intangibility, bind `inhibit-point-motion-hooks' to t."
(interactive "p")
(or arg (setq arg 1))
(if (/= arg 1)
@ -5730,7 +5787,7 @@ the point does not move. To ignore field boundaries bind
(skip-chars-backward "^\n"))
(vertical-motion 0)
(if (/= orig (point))
(goto-char (constrain-to-field (point) orig (/= arg 1) t nil)))))
(goto-char orig))))
)
;;;_ > move-end-of-line if necessary - older emacs, xemacs
(if (not (fboundp 'move-end-of-line))
@ -5741,13 +5798,7 @@ which are part of the text that an image rests on.)
With argument ARG not nil or 1, move forward ARG - 1 lines first.
If point reaches the beginning or end of buffer, it stops there.
To ignore intangibility, bind `inhibit-point-motion-hooks' to t.
This function does not move point across a field boundary unless that
would move point to a different line than the original, unconstrained
result. If N is nil or 1, and a rear-sticky field ends at point,
the point does not move. To ignore field boundaries bind
`inhibit-field-text-motion' to t."
To ignore intangibility, bind `inhibit-point-motion-hooks' to t."
(interactive "p")
(or arg (setq arg 1))
(let ((orig (point))
@ -5777,8 +5828,7 @@ the point does not move. To ignore field boundaries bind
(setq arg 1)
(setq done t)))))
(if (/= orig (point))
(goto-char (constrain-to-field (point) orig (/= arg 1) t
nil)))))
(goto-char orig))))
)
;;;_ > line-move-invisible-p if necessary
(if (not (fboundp 'line-move-invisible-p))

View file

@ -1092,7 +1092,11 @@ or default values have changed since the previous major Emacs release.
With argument SINCE-VERSION (a string), customize all settings
that were added or redefined since that version."
(interactive "sCustomize options changed, since version (default all versions): ")
(interactive
(list
(read-from-minibuffer
(format "Customize options changed, since version (default %s): "
customize-changed-options-previous-release))))
(if (equal since-version "")
(setq since-version nil)
(unless (condition-case nil

View file

@ -83,6 +83,34 @@ where MAJOR-MODE is a symbol and FONT-LOCK-DEFAULTS is a list of default
settings. See the variable `font-lock-defaults', which takes precedence.")
(make-obsolete-variable 'font-lock-defaults-alist 'font-lock-defaults)
(defvar font-lock-extend-region-function nil
"A function that determines the region to fontify after a change.
This buffer-local variable is either nil, or is a function that determines the
region to fontify. It is usually set by the major mode. The currently active
font-lock after-change function calls this function after each buffer change.
The function is given three parameters, the standard BEG, END, and OLD-LEN
from after-change-functions. It should return either a cons of the beginning
and end buffer positions \(in that order) of the region to fontify, or nil
\(which directs the caller to fontify a 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.")
(make-variable-buffer-local 'font-lock-extend-region-function)
(defun font-lock-extend-region (beg end old-len)
"Determine the region to fontify after a buffer change.
BEG END and OLD-LEN are the standard parameters from after-change-functions.
The return value is either nil \(which directs the caller to chose the region
itself), or a cons of the beginning and end \(in that order) of the region.
The region returned may start or end in the middle of a line."
(if font-lock-extend-region-function
(save-match-data
(save-excursion
(funcall font-lock-extend-region-function beg end old-len)))))
(defvar font-lock-function 'font-lock-default-function
"A function which is called when `font-lock-mode' is toggled.
It will be passed one argument, which is the current value of

View file

@ -281,12 +281,6 @@ If a number, only buffers greater than this size have fontification messages."
(other :tag "always" t)
(integer :tag "size"))
:group 'font-lock)
(defcustom font-lock-lines-before 0
"*Number of lines before the changed text to include in refontification."
:type 'integer
:group 'font-lock
:version "22.1")
;; Originally these variable values were face names such as `bold' etc.
@ -1039,7 +1033,7 @@ a very meaningful entity to highlight.")
(when font-lock-syntax-table
(set-syntax-table font-lock-syntax-table))
(goto-char beg)
(setq beg (line-beginning-position (- 1 font-lock-lines-before)))
(setq beg (line-beginning-position))
;; check to see if we should expand the beg/end area for
;; proper multiline matches
(when (and (> beg (point-min))
@ -1090,13 +1084,17 @@ what properties to clear before refontifying a region.")
;; Called when any modification is made to buffer text.
(defun font-lock-after-change-function (beg end old-len)
(let ((inhibit-point-motion-hooks t)
(inhibit-quit t))
(inhibit-quit t)
(region (font-lock-extend-region beg end old-len)))
(save-excursion
(save-match-data
;; Rescan between start of lines enclosing the region.
(font-lock-fontify-region
(progn (goto-char beg) (forward-line 0) (point))
(progn (goto-char end) (forward-line 1) (point)))))))
(if region
;; Fontify the region the major mode has specified.
(setq beg (car region) end (cdr region))
;; Fontify the whole lines which enclose the region.
(setq beg (progn (goto-char beg) (line-beginning-position))
end (progn (goto-char end) (line-beginning-position 2))))
(font-lock-fontify-region beg end)))))
(defun font-lock-fontify-block (&optional arg)
"Fontify some lines the way `font-lock-fontify-buffer' would.

View file

@ -1,3 +1,38 @@
2006-03-17 Katsumi Yamaoka <yamaoka@jpl.org>
* mm-decode.el (mm-with-part): New macro.
(mm-get-part): Use it; work with message/external-body as well.
(mm-save-part): Treat name and filename equally.
* mm-extern.el (mm-extern-cache-contents): New function.
(mm-inline-external-body): Use it; force the part to be displayed;
move undisplayer added to the cached handle to the parent.
* gnus-art.el (gnus-mime-save-part-and-strip): Add name parameter.
(gnus-mime-view-part-as-type): Work with message/external-body.
* gnus-util.el (gnus-tool-bar-update): Bind tool-bar-mode.
2006-03-15 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
* gnus-art.el (gnus-article-only-boring-p): Bind
inhibit-point-motion-hooks to avoid infinite loop when entering
intangible text. Reported by Ralf Wachinger
<rwnewsmampfer@geekmail.de>.
2006-03-14 Simon Josefsson <jas@extundo.com>
* message.el (message-unique-id): Don't use message-number-base36
if (user-uid) is a float. Reported by Bjorn Solberg
<bjorn_ding1@hekneby.org>.
2006-03-13 Katsumi Yamaoka <yamaoka@jpl.org>
* mm-uu.el (mm-uu-dissect): Dissect all parts correctly.
* gnus-art.el (gnus-mime-display-single): Make sure there is an
empty line between a part and a message part.
2006-03-10 Reiner Steib <Reiner.Steib@gmx.de>
* smiley.el: Add more test smileys.

View file

@ -49,6 +49,7 @@
(autoload 'gnus-button-mailto "gnus-msg")
(autoload 'gnus-button-reply "gnus-msg" nil t)
(autoload 'parse-time-string "parse-time" nil nil)
(autoload 'mm-extern-cache-contents "mm-extern")
(defgroup gnus-article nil
"Article display."
@ -4151,6 +4152,9 @@ Deleting parts may malfunction or destroy the article; continue? ")
(insert "Content-Type: " (mm-handle-media-type data))
(mml-insert-parameter-string (cdr (mm-handle-type data))
'(charset))
;; Add a filename for the sake of saving the part again.
(mml-insert-parameter
(mail-header-encode-parameter "name" (file-name-nondirectory file)))
(insert "\n")
(insert "Content-ID: " (message-make-message-id) "\n")
(insert "Content-Transfer-Encoding: binary\n")
@ -4330,6 +4334,10 @@ Deleting parts may malfunction or destroy the article; continue? ")
(gnus-article-check-buffer)
(let ((handle (get-text-property (point) 'gnus-data)))
(when handle
(when (equal (mm-handle-media-type handle) "message/external-body")
(unless (mm-handle-cache handle)
(mm-extern-cache-contents handle))
(setq handle (mm-handle-cache handle)))
(setq handle
(mm-make-handle (mm-handle-buffer handle)
(cons mime-type (cdr (mm-handle-type handle)))
@ -4889,13 +4897,18 @@ If displaying \"text/html\" is discouraged \(see
(let ((id (1+ (length gnus-article-mime-handle-alist)))
beg)
(push (cons id handle) gnus-article-mime-handle-alist)
(when (and display
(equal (mm-handle-media-supertype handle) "message"))
(insert-char
?\n
(cond ((not (bolp)) 2)
((or (bobp) (eq (char-before (1- (point))) ?\n)) 0)
(t 1))))
(when (or (not display)
(not (gnus-unbuttonized-mime-type-p type)))
;(gnus-article-insert-newline)
(gnus-insert-mime-button
handle id (list (or display (and not-attachment text))))
(gnus-article-insert-newline)
;(gnus-article-insert-newline)
;; Remember modify the number of forward lines.
(setq move t))
(setq beg (point))
@ -5313,14 +5326,15 @@ not have a face in `gnus-article-boring-faces'."
(boundp 'gnus-article-boring-faces)
(symbol-value 'gnus-article-boring-faces))
(save-excursion
(catch 'only-boring
(while (re-search-forward "\\b\\w\\w" nil t)
(forward-char -1)
(when (not (gnus-intersection
(gnus-faces-at (point))
(symbol-value 'gnus-article-boring-faces)))
(throw 'only-boring nil)))
(throw 'only-boring t)))))
(let ((inhibit-point-motion-hooks t))
(catch 'only-boring
(while (re-search-forward "\\b\\w\\w" nil t)
(forward-char -1)
(when (not (gnus-intersection
(gnus-faces-at (point))
(symbol-value 'gnus-article-boring-faces)))
(throw 'only-boring nil)))
(throw 'only-boring t))))))
(defun gnus-article-refer-article ()
"Read article specified by message-id around point."

View file

@ -1459,6 +1459,9 @@ Return nil otherwise."
display))
display)))))
(eval-when-compile
(defvar tool-bar-mode))
(defun gnus-tool-bar-update (&rest ignore)
"Update the tool bar."
(when (and (boundp 'tool-bar-mode)

View file

@ -4671,7 +4671,9 @@ If NOW, use that time instead."
(* 25 25)))
(let ((tm (current-time)))
(concat
(if (memq system-type '(ms-dos emx vax-vms))
(if (or (memq system-type '(ms-dos emx vax-vms))
;; message-number-base36 doesn't handle bigints.
(floatp (user-uid)))
(let ((user (downcase (user-login-name))))
(while (string-match "[^a-z0-9_]" user)
(aset user (match-beginning 0) ?_))

View file

@ -36,6 +36,7 @@
(autoload 'executable-find "executable")
(autoload 'mm-inline-partial "mm-partial")
(autoload 'mm-inline-external-body "mm-extern")
(autoload 'mm-extern-cache-contents "mm-extern")
(autoload 'mm-insert-inline "mm-view"))
(defvar gnus-current-window-configuration)
@ -1082,17 +1083,35 @@ external if displayed external."
;;; Functions for outputting parts
;;;
(defmacro mm-with-part (handle &rest forms)
"Run FORMS in the temp buffer containing the contents of HANDLE."
`(let* ((handle ,handle)
;; The multibyteness of the temp buffer should be turned on
;; if inserting a multibyte string. Contrarily, the buffer's
;; multibyteness should be off if inserting a unibyte string,
;; especially if a string contains 8bit data.
(default-enable-multibyte-characters
(with-current-buffer (mm-handle-buffer handle)
(mm-multibyte-p))))
(with-temp-buffer
(insert-buffer-substring (mm-handle-buffer handle))
(mm-disable-multibyte)
(mm-decode-content-transfer-encoding
(mm-handle-encoding handle)
(mm-handle-media-type handle))
,@forms)))
(put 'mm-with-part 'lisp-indent-function 1)
(put 'mm-with-part 'edebug-form-spec '(body))
(defun mm-get-part (handle)
"Return the contents of HANDLE as a string."
(let ((default-enable-multibyte-characters
(with-current-buffer (mm-handle-buffer handle)
(mm-multibyte-p))))
(with-temp-buffer
(insert-buffer-substring (mm-handle-buffer handle))
(mm-disable-multibyte)
(mm-decode-content-transfer-encoding
(mm-handle-encoding handle)
(mm-handle-media-type handle))
(if (equal (mm-handle-media-type handle) "message/external-body")
(progn
(unless (mm-handle-cache handle)
(mm-extern-cache-contents handle))
(with-current-buffer (mm-handle-buffer (mm-handle-cache handle))
(buffer-string)))
(mm-with-part handle
(buffer-string))))
(defun mm-insert-part (handle)
@ -1148,18 +1167,19 @@ string if you do not like underscores."
(defun mm-save-part (handle)
"Write HANDLE to a file."
(let* ((name (mail-content-type-get (mm-handle-type handle) 'name))
(filename (mail-content-type-get
(mm-handle-disposition handle) 'filename))
file)
(let ((filename (or (mail-content-type-get
(mm-handle-disposition handle) 'filename)
(mail-content-type-get
(mm-handle-type handle) 'name)))
file)
(when filename
(setq filename (gnus-map-function mm-file-name-rewrite-functions
(file-name-nondirectory filename))))
(setq file
(mm-with-multibyte
(read-file-name "Save MIME part to: "
(or mm-default-directory default-directory)
nil nil (or filename name ""))))
(read-file-name "Save MIME part to: "
(or mm-default-directory default-directory)
nil nil (or filename ""))))
(setq mm-default-directory (file-name-directory file))
(and (or (not (file-exists-p file))
(yes-or-no-p (format "File %s already exists; overwrite? "

View file

@ -112,11 +112,8 @@
(insert "[" info "]\n\n")))
;;;###autoload
(defun mm-inline-external-body (handle &optional no-display)
"Show the external-body part of HANDLE.
This function replaces the buffer of HANDLE with a buffer contains
the entire message.
If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing."
(defun mm-extern-cache-contents (handle)
"Put the external-body part of HANDLE into its cache."
(let* ((access-type (cdr (assq 'access-type
(cdr (mm-handle-type handle)))))
(func (cdr (assq (intern
@ -124,48 +121,61 @@ If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing."
(or access-type
(error "Couldn't find access type"))))
mm-extern-function-alist)))
gnus-displaying-mime buf
handles)
(unless (mm-handle-cache handle)
(unless func
(error "Access type (%s) is not supported" access-type))
(with-temp-buffer
(mm-insert-part handle)
(goto-char (point-max))
(insert "\n\n")
(setq handles (mm-dissect-buffer t)))
(unless (bufferp (car handles))
(mm-destroy-parts handles)
(error "Multipart external body is not supported"))
(save-excursion ;; single part
(set-buffer (setq buf (mm-handle-buffer handles)))
(let (good)
(unwind-protect
(progn
(funcall func handle)
(setq good t))
(unless good
(mm-destroy-parts handles))))
(mm-handle-set-cache handle handles))
(setq gnus-article-mime-handles
(mm-merge-handles gnus-article-mime-handles handles)))
(unless no-display
(save-excursion
(save-restriction
(narrow-to-region (point) (point))
(gnus-display-mime (mm-handle-cache handle))
(mm-handle-set-undisplayer
handle
`(lambda ()
(let (buffer-read-only)
(condition-case nil
;; This is only valid on XEmacs.
(mapcar (lambda (prop)
(remove-specifier
(face-property 'default prop) (current-buffer)))
'(background background-pixmap foreground))
(error nil))
(delete-region ,(point-min-marker) ,(point-max-marker))))))))))
buf handles)
(unless func
(error "Access type (%s) is not supported" access-type))
(mm-with-part handle
(goto-char (point-max))
(insert "\n\n")
;; It should be just a single MIME handle.
(setq handles (mm-dissect-buffer t)))
(unless (bufferp (car handles))
(mm-destroy-parts handles)
(error "Multipart external body is not supported"))
(save-excursion
(set-buffer (setq buf (mm-handle-buffer handles)))
(let (good)
(unwind-protect
(progn
(funcall func handle)
(setq good t))
(unless good
(mm-destroy-parts handles))))
(mm-handle-set-cache handle handles))
(setq gnus-article-mime-handles
(mm-merge-handles gnus-article-mime-handles handles))))
;;;###autoload
(defun mm-inline-external-body (handle &optional no-display)
"Show the external-body part of HANDLE.
This function replaces the buffer of HANDLE with a buffer contains
the entire message.
If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing."
(unless (mm-handle-cache handle)
(mm-extern-cache-contents handle))
(unless no-display
(save-excursion
(save-restriction
(narrow-to-region (point) (point))
(let* ((type (regexp-quote
(mm-handle-media-type (mm-handle-cache handle))))
;; Force the part to be displayed (but if there is no
;; method to display, a user will be prompted to save).
;; See `gnus-mime-display-single'.
(mm-inline-override-types nil)
(mm-attachment-override-types
(cons type mm-attachment-override-types))
(mm-automatic-display (cons type mm-automatic-display))
(mm-automatic-external-display
(cons type mm-automatic-external-display))
;; Suppress adding of button to the cached part.
(gnus-inhibit-mime-unbuttonizing nil))
(gnus-display-mime (mm-handle-cache handle)))
;; Move undisplayer added to the cached handle to the parent.
(mm-handle-set-undisplayer
handle
(mm-handle-undisplayer (mm-handle-cache handle)))
(mm-handle-set-undisplayer (mm-handle-cache handle) nil)))))
(provide 'mm-extern)

View file

@ -464,7 +464,8 @@ value of `mm-uu-text-plain-type'."
(t (goto-char (point-max))))
(setq text-start (point))
(while (re-search-forward mm-uu-beginning-regexp nil t)
(setq start-point (match-beginning 0))
(setq start-point (match-beginning 0)
entry nil)
(let ((alist mm-uu-type-alist)
(beginning-regexp (match-string 0)))
(while (not entry)

View file

@ -613,6 +613,7 @@ A tramp file name uses the following syntax: /method:user@host:filename."
(defcustom ido-cache-ftp-work-directory-time 1.0
"*Maximum time to cache contents of an ftp directory (in hours).
Use C-l in prompt to refresh list.
If zero, ftp directories are not cached."
:type 'number
:group 'ido)
@ -629,6 +630,18 @@ equivalent function, e.g. `find-file' rather than `ido-find-file'."
:type '(repeat regexp)
:group 'ido)
(defcustom ido-unc-hosts nil
"*List of known UNC host names to complete after initial //."
:type '(repeat string)
:group 'ido)
(defcustom ido-cache-unc-host-shares-time 8.0
"*Maximum time to cache shares of an UNC host (in hours).
Use C-l in prompt to refresh list.
If zero, unc host shares are not cached."
:type 'number
:group 'ido)
(defcustom ido-max-work-file-list 10
"*Maximum number of names of recently opened files to record.
This is the list the file names (sans directory) which have most recently
@ -1103,6 +1116,16 @@ it doesn't interfere with other minibuffer usage.")
(string-match "\\`/[^/]+[@:]\\'"
(or dir ido-current-directory))))
(defun ido-is-unc-root (&optional dir)
(and ido-unc-hosts
(string-equal "//"
(or dir ido-current-directory))))
(defun ido-is-unc-host (&optional dir)
(and ido-unc-hosts
(string-match "\\`//[^/]+/\\'"
(or dir ido-current-directory))))
(defun ido-is-root-directory (&optional dir)
(setq dir (or dir ido-current-directory))
(or
@ -1148,6 +1171,12 @@ it doesn't interfere with other minibuffer usage.")
(or (not time)
(< (- (ido-time-stamp) time) ido-cache-ftp-work-directory-time))))
(defun ido-cache-unc-valid (&optional time)
(and (numberp ido-cache-unc-host-shares-time)
(> ido-cache-unc-host-shares-time 0)
(or (not time)
(< (- (ido-time-stamp) time) ido-cache-unc-host-shares-time))))
(defun ido-may-cache-directory (&optional dir)
(setq dir (or dir ido-current-directory))
(cond
@ -1157,10 +1186,11 @@ it doesn't interfere with other minibuffer usage.")
(or ido-enable-tramp-completion
(memq system-type '(windows-nt ms-dos))))
nil)
((not (ido-is-ftp-directory dir))
t)
((ido-cache-ftp-valid)
t)))
((ido-is-unc-host dir)
(ido-cache-unc-valid))
((ido-is-ftp-directory dir)
(ido-cache-ftp-valid))
(t t)))
(defun ido-pp (list &optional sep)
(let ((print-level nil) (eval-expression-print-level nil)
@ -1262,15 +1292,21 @@ Removes badly formatted data and ignored directories."
(and
(stringp dir)
(consp time)
(if (integerp (car time))
(and (/= (car time) 0)
(integerp (car (cdr time)))
(/= (car (cdr time)) 0)
(ido-may-cache-directory dir))
(and (eq (car time) 'ftp)
(numberp (cdr time))
(cond
((integerp (car time))
(and (/= (car time) 0)
(integerp (car (cdr time)))
(/= (car (cdr time)) 0)
(ido-may-cache-directory dir)))
((eq (car time) 'ftp)
(and (numberp (cdr time))
(ido-is-ftp-directory dir)
(ido-cache-ftp-valid (cdr time))))
((eq (car time) 'unc)
(and (numberp (cdr time))
(ido-is-unc-host dir)
(ido-cache-unc-valid (cdr time))))
(t nil))
(let ((s files) (ok t))
(while s
(if (stringp (car s))
@ -1535,6 +1571,7 @@ With ARG, turn ido speed-up on if arg is positive, off otherwise."
;; connect on incomplete tramp paths (after entring just method:).
(let ((ido-enable-tramp-completion nil))
(and (ido-final-slash dir)
(not (ido-is-unc-host dir))
(file-directory-p dir)
(not (file-readable-p dir)))))
@ -1545,6 +1582,7 @@ With ARG, turn ido speed-up on if arg is positive, off otherwise."
(let ((ido-enable-tramp-completion nil))
(and (numberp ido-max-directory-size)
(ido-final-slash dir)
(not (ido-is-unc-host dir))
(file-directory-p dir)
(> (nth 7 (file-attributes dir)) ido-max-directory-size))))
@ -1560,8 +1598,18 @@ With ARG, turn ido speed-up on if arg is positive, off otherwise."
(unless (and ido-enable-tramp-completion
(string-match "\\`/[^/]*@\\'" dir))
(setq dir (ido-final-slash dir t))))
(if (equal dir ido-current-directory)
nil
(if (get-buffer ido-completion-buffer)
(kill-buffer ido-completion-buffer))
(cond
((equal dir ido-current-directory)
nil)
((ido-is-unc-root dir)
(ido-trace "unc" dir)
(setq ido-current-directory dir)
(setq ido-directory-nonreadable nil)
(setq ido-directory-too-big nil)
t)
(t
(ido-trace "cd" dir)
(setq ido-current-directory dir)
(if (get-buffer ido-completion-buffer)
@ -1569,7 +1617,7 @@ With ARG, turn ido speed-up on if arg is positive, off otherwise."
(setq ido-directory-nonreadable (ido-nonreadable-directory-p dir))
(setq ido-directory-too-big (and (not ido-directory-nonreadable)
(ido-directory-too-big-p dir)))
t))
t)))
(defun ido-set-current-home (&optional dir)
;; Set ido's current directory to user's home directory
@ -1940,6 +1988,7 @@ If INITIAL is non-nil, it specifies the initial input string."
(setq ido-exit 'fallback
done t)
(setq ido-set-default-item t)))
((or (string-match "[/\\][^/\\]" ido-selected)
(and (memq system-type '(windows-nt ms-dos))
(string-match "\\`.:" ido-selected)))
@ -1973,7 +2022,7 @@ If INITIAL is non-nil, it specifies the initial input string."
(defun ido-edit-input ()
"Edit absolute file name entered so far with ido; terminate by RET."
(interactive)
(setq ido-text-init ido-text)
(setq ido-text-init (if ido-matches (car ido-matches) ido-text))
(setq ido-exit 'edit)
(exit-minibuffer))
@ -3184,36 +3233,52 @@ for first matching file."
(defun ido-file-name-all-completions (dir)
;; Return name of all files in DIR
;; Uses and updates ido-dir-file-cache
(if (and (numberp ido-max-dir-file-cache) (> ido-max-dir-file-cache 0)
(stringp dir) (> (length dir) 0)
(ido-may-cache-directory dir))
(let* ((cached (assoc dir ido-dir-file-cache))
(cond
((ido-is-unc-root dir)
(mapcar
(lambda (host)
(if (string-match "/\\'" host) host (concat host "/")))
ido-unc-hosts))
((and (numberp ido-max-dir-file-cache) (> ido-max-dir-file-cache 0)
(stringp dir) (> (length dir) 0)
(ido-may-cache-directory dir))
(let* ((cached (assoc dir ido-dir-file-cache))
(ctime (nth 1 cached))
(ftp (ido-is-ftp-directory dir))
(attr (if ftp nil (file-attributes dir)))
(unc (ido-is-unc-host dir))
(attr (if (or ftp unc) nil (file-attributes dir)))
(mtime (nth 5 attr))
valid)
(when cached ; should we use the cached entry ?
(if ftp
(setq valid (and (eq (car ctime) 'ftp)
(ido-cache-ftp-valid (cdr ctime))))
(cond
(ftp
(setq valid (and (eq (car ctime) 'ftp)
(ido-cache-ftp-valid (cdr ctime)))))
(unc
(setq valid (and (eq (car ctime) 'unc)
(ido-cache-unc-valid (cdr ctime)))))
(t
(if attr
(setq valid (and (= (car ctime) (car mtime))
(= (car (cdr ctime)) (car (cdr mtime)))))))
(if (not valid)
(setq ido-dir-file-cache (delq cached ido-dir-file-cache)
cached nil)))
(= (car (cdr ctime)) (car (cdr mtime))))))))
(unless valid
(setq ido-dir-file-cache (delq cached ido-dir-file-cache)
cached nil)))
(unless cached
(if (and ftp (file-readable-p dir))
(setq mtime (cons 'ftp (ido-time-stamp))))
(cond
(unc
(setq mtime (cons 'unc (ido-time-stamp))))
((and ftp (file-readable-p dir))
(setq mtime (cons 'ftp (ido-time-stamp)))))
(if mtime
(setq cached (cons dir (cons mtime (ido-file-name-all-completions-1 dir)))
ido-dir-file-cache (cons cached ido-dir-file-cache)))
(if (> (length ido-dir-file-cache) ido-max-dir-file-cache)
(setcdr (nthcdr (1- ido-max-dir-file-cache) ido-dir-file-cache) nil)))
(and cached
(cdr (cdr cached))))
(ido-file-name-all-completions-1 dir)))
(cdr (cdr cached)))))
(t
(ido-file-name-all-completions-1 dir))))
(defun ido-remove-cached-dir (dir)
;; Remove dir from ido-dir-file-cache
@ -3227,7 +3292,8 @@ for first matching file."
(defun ido-make-file-list-1 (dir &optional merged)
;; Return list of non-ignored files in DIR
;; If MERGED is non-nil, each file is cons'ed with DIR
(and (or (ido-is-tramp-root dir) (file-directory-p dir))
(and (or (ido-is-tramp-root dir) (ido-is-unc-root dir)
(file-directory-p dir))
(delq nil
(mapcar
(lambda (name)
@ -3956,10 +4022,16 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
)
((= (length contents) 1)
(when (and (ido-is-tramp-root) (string-equal contents "/"))
(cond
((and (ido-is-tramp-root) (string-equal contents "/"))
(ido-set-current-directory ido-current-directory contents)
(setq refresh t))
)
((and ido-unc-hosts (string-equal contents "/")
(let ((ido-enable-tramp-completion nil))
(ido-is-root-directory)))
(ido-set-current-directory "//")
(setq refresh t))
))
((and (string-match (if ido-enable-tramp-completion "..[:@]\\'" "..:\\'") contents)
(ido-is-root-directory)) ;; Ange-ftp or tramp

View file

@ -77,34 +77,69 @@ value is used as a list of directories to search.")
(list (file-name-as-directory (expand-file-name "images" data-directory))
'data-directory 'load-path)))
(defun image-load-path-for-library (library image &optional path no-error)
"Return a suitable search path for images relative to LIBRARY.
"Return a suitable search path for images used by the Lisp package LIBRARY.
Images for LIBRARY are searched for in \"../../etc/images\" and
\"../etc/images\" relative to the files in \"lisp/LIBRARY\" as
well as in `image-load-path' and `load-path'.
It searches for IMAGE in `image-load-path' (excluding
\"`data-directory'/images\") and `load-path', followed by a path
suitable for LIBRARY, which includes \"../../etc/images\" and
\"../etc/images\" relative to the library file itself, and then
in \"`data-directory'/images\".
This function returns the value of `load-path' augmented with the
directory containing IMAGE. If PATH is given, it is used instead
of `load-path'. If PATH is t, just return the directory that
contains IMAGE.
Then this function returns a list of directories which contains
first the directory in which IMAGE was found, followed by the
value of `load-path'. If PATH is given, it is used instead of
`load-path'.
If NO-ERROR is non-nil, return nil if a suitable path can't be
found rather than signaling an error.
If NO-ERROR is non-nil and a suitable path can't be found, don't
signal an error. Instead, return a list of directories as before,
except that nil appears in place of the image directory.
Here is an example that uses a common idiom to provide
compatibility with versions of Emacs that lack the variable
`image-load-path':
(let ((load-path
(image-load-path-for-library \"mh-e\" \"mh-logo.xpm\"))
(image-load-path
(image-load-path-for-library \"mh-e\" \"mh-logo.xpm\" 'image-load-path)))
(mh-tool-bar-folder-buttons-init))"
;; Shush compiler.
(defvar image-load-path)
(let* ((load-path (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\"))
(image-load-path (cons (car load-path)
(when (boundp 'image-load-path)
image-load-path))))
(mh-tool-bar-folder-buttons-init))"
(unless library (error "No library specified"))
(unless image (error "No image specified"))
(let ((image-directory))
(let (image-directory image-directory-load-path)
;; Check for images in image-load-path or load-path.
(let ((img image)
(dir (or
;; Images in image-load-path.
(image-search-load-path image)
;; Images in load-path.
(locate-library image)))
parent)
;; Since the image might be in a nested directory (for
;; example, mail/attach.pbm), adjust `image-directory'
;; accordingly.
(when dir
(setq dir (file-name-directory dir))
(while (setq parent (file-name-directory img))
(setq img (directory-file-name parent)
dir (expand-file-name "../" dir))))
(setq image-directory-load-path dir))
;; If `image-directory-load-path' isn't Emacs' image directory,
;; it's probably a user preference, so use it. Then use a
;; relative setting if possible; otherwise, use
;; `image-directory-load-path'.
(cond
;; User-modified image-load-path?
((and image-directory-load-path
(not (equal image-directory-load-path
(file-name-as-directory
(expand-file-name "images" data-directory)))))
(setq image-directory image-directory-load-path))
;; Try relative setting.
((let (library-name d1ei d2ei)
;; First, find library in the load-path.
@ -114,54 +149,29 @@ compatibility with versions of Emacs that lack the variable
;; And then set image-directory relative to that.
(setq
;; Go down 2 levels.
d2ei (expand-file-name
(concat (file-name-directory library-name) "../../etc/images"))
d2ei (file-name-as-directory
(expand-file-name
(concat (file-name-directory library-name) "../../etc/images")))
;; Go down 1 level.
d1ei (expand-file-name
(concat (file-name-directory library-name) "../etc/images")))
d1ei (file-name-as-directory
(expand-file-name
(concat (file-name-directory library-name) "../etc/images"))))
(setq image-directory
;; Set it to nil if image is not found.
(cond ((file-exists-p (expand-file-name image d2ei)) d2ei)
((file-exists-p (expand-file-name image d1ei)) d1ei)))))
;; Check for images in image-load-path or load-path.
((let ((img image)
(dir (or
;; Images in image-load-path.
(image-search-load-path image)
;; Images in load-path.
(locate-library image)))
parent)
;; Since the image might be in a nested directory (for
;; example, mail/attach.pbm), adjust `image-directory'
;; accordingly.
(and dir
(setq dir (file-name-directory dir))
(progn
(while (setq parent (file-name-directory img))
(setq img (directory-file-name parent)
dir (expand-file-name "../" dir)))
(setq image-directory dir)))))
;; Use Emacs' image directory.
(image-directory-load-path
(setq image-directory image-directory-load-path))
(no-error
;; In this case we will return nil.
(message "Could not find image %s for library %s" image library))
(t
(error "Could not find image %s for library %s" image library)))
;; Return the directory, nil if no-error was non-nil and a
;; suitable path could not be found, or an augmented
;; `image-load-path' or `load-path'.
(cond ((or (null image-directory)
(eq path t))
image-directory)
((and path (symbolp path))
(nconc (list image-directory)
(delete image-directory
(if (boundp path)
(copy-sequence (symbol-value path))
nil))))
(t
(nconc (list image-directory)
(delete image-directory (copy-sequence load-path)))))))
;; Return an augmented `path' or `load-path'.
(nconc (list image-directory)
(delete image-directory (copy-sequence (or path load-path))))))
(defun image-jpeg-p (data)
"Value is non-nil if DATA, a string, consists of JFIF image data.

View file

@ -1580,6 +1580,9 @@ and the contents of `file-coding-system-alist'."
(defcustom auto-coding-regexp-alist
'(("^BABYL OPTIONS:[ \t]*-\\*-[ \t]*rmail[ \t]*-\\*-" . no-conversion)
("\\`\xFE\xFF" . utf-16be-with-signature)
("\\`\xFF\xFE" . utf-16le-with-signature)
("\\`\xEF\xBB\xBF" . utf-8)
("\\`;ELC\024\0\0\0" . emacs-mule)) ; Emacs 20-compiled
"Alist of patterns vs corresponding coding systems.
Each element looks like (REGEXP . CODING-SYSTEM).

View file

@ -1692,12 +1692,15 @@ Isearch mode."
(and (integerp main-event)
(memq 'shift mods)
(memq 'control mods)
(lookup-key isearch-mode-map
(let ((copy (copy-sequence key)))
(aset copy 0
(- main-event (- ?\C-\S-a ?\C-a)))
copy)
nil)))
(not (memq (lookup-key isearch-mode-map
(let ((copy (copy-sequence key)))
(aset copy 0
(- main-event
(- ?\C-\S-a ?\C-a)))
copy)
nil)
'(nil
isearch-other-control-char)))))
(setcar keylist (- main-event (- ?\C-\S-a ?\C-a)))
(cancel-kbd-macro-events)
(apply 'isearch-unread keylist))

View file

@ -6,7 +6,6 @@
;; Author: Stephen Eglen <stephen@gnu.org>
;; Maintainer: Stephen Eglen <stephen@gnu.org>
;; Keywords: completion convenience
;; location: http://www.anc.ed.ac.uk/~stephen/emacs/
;; This file is part of GNU Emacs.

View file

@ -557,36 +557,44 @@ This function ensures that lines following the change will be refontified
in case the syntax of those lines has changed. Refontification
will take place when text is fontified stealthily."
(when (and jit-lock-mode (not memory-full))
(save-excursion
(with-buffer-prepared-for-jit-lock
;; It's important that the `fontified' property be set from the
;; beginning of the line, else font-lock will properly change the
;; text's face, but the display will have been done already and will
;; be inconsistent with the buffer's content.
(goto-char start)
(setq start (line-beginning-position))
(let ((region (font-lock-extend-region start end old-len)))
(save-excursion
(with-buffer-prepared-for-jit-lock
;; It's important that the `fontified' property be set from the
;; beginning of the line, else font-lock will properly change the
;; text's face, but the display will have been done already and will
;; be inconsistent with the buffer's content.
;;
;; FIXME!!! (Alan Mackenzie, 2006-03-14): If start isn't at a BOL,
;; expanding the region to BOL might mis-fontify, should the BOL not
;; be at a "safe" position.
(setq start (if region
(car region)
(goto-char start)
(line-beginning-position)))
;; If we're in text that matches a multi-line font-lock pattern,
;; make sure the whole text will be redisplayed.
;; I'm not sure this is ever necessary and/or sufficient. -stef
(when (get-text-property start 'font-lock-multiline)
(setq start (or (previous-single-property-change
start 'font-lock-multiline)
(point-min))))
;; If we're in text that matches a multi-line font-lock pattern,
;; make sure the whole text will be redisplayed.
;; I'm not sure this is ever necessary and/or sufficient. -stef
(when (get-text-property start 'font-lock-multiline)
(setq start (or (previous-single-property-change
start 'font-lock-multiline)
(point-min))))
;; Make sure we change at least one char (in case of deletions).
(setq end (min (max end (1+ start)) (point-max)))
;; Request refontification.
(put-text-property start end 'fontified nil))
;; Mark the change for deferred contextual refontification.
(when jit-lock-context-unfontify-pos
(setq jit-lock-context-unfontify-pos
;; Here we use `start' because nothing guarantees that the
;; text between start and end will be otherwise refontified:
;; usually it will be refontified by virtue of being
;; displayed, but if it's outside of any displayed area in the
;; buffer, only jit-lock-context-* will re-fontify it.
(min jit-lock-context-unfontify-pos start))))))
(if region (setq end (cdr region)))
;; Make sure we change at least one char (in case of deletions).
(setq end (min (max end (1+ start)) (point-max)))
;; Request refontification.
(put-text-property start end 'fontified nil))
;; Mark the change for deferred contextual refontification.
(when jit-lock-context-unfontify-pos
(setq jit-lock-context-unfontify-pos
;; Here we use `start' because nothing guarantees that the
;; text between start and end will be otherwise refontified:
;; usually it will be refontified by virtue of being
;; displayed, but if it's outside of any displayed area in the
;; buffer, only jit-lock-context-* will re-fontify it.
(min jit-lock-context-unfontify-pos start)))))))
(provide 'jit-lock)

View file

@ -122,7 +122,26 @@
:group 'external)
(defcustom locate-command "locate"
"*The executable program used to search a database of files."
"Executable program for searching a database of files.
The Emacs commands `locate' and `locate-with-filter' use this.
The value should be a program that can be called from a shell
with one argument, SEARCH-STRING. The program determines which
database it searches. The output of the program should consist
of those file names in the database that match SEARCH-STRING,
listed one per line, possibly with leading or trailing
whitespace. If the output is in another form, you may have to
redefine the function `locate-get-file-positions'.
The program may interpret SEARCH-STRING as a literal string, a
shell pattern or a regular expression. The exact rules of what
constitutes a match may also depend on the program.
The standard value of this variable is \"locate\".
This program normally searches a database of all files on your
system, or of all files that you have access to. Consult the
documentation of that program for the details about how it determines
which file names match SEARCH-STRING. (Those details vary highly with
the version.)"
:type 'string
:group 'locate)
@ -133,22 +152,34 @@
"The history list used by the \\[locate-with-filter] command.")
(defcustom locate-make-command-line 'locate-default-make-command-line
"*Function used to create the locate command line."
"Function used to create the locate command line.
The Emacs commands `locate' and `locate-with-filter' use this.
This function should take one argument, a string (the name to find)
and return a list of strings. The first element of the list should be
the name of a command to be executed by a shell, the remaining elements
should be the arguments to that command (including the name to find)."
:type 'function
:group 'locate)
(defcustom locate-buffer-name "*Locate*"
"*Name of the buffer to show results from the \\[locate] command."
"Name of the buffer to show results from the \\[locate] command."
:type 'string
:group 'locate)
(defcustom locate-fcodes-file nil
"*File name for the database of file names."
"File name for the database of file names used by `locate'.
If non-nil, `locate' uses this name in the header of the `*Locate*'
buffer. If nil, it mentions no file name in that header.
Just setting this variable does not actually change the database
that `locate' searches. The executive program that the Emacs
function `locate' uses, as given by the variables `locate-command'
or `locate-make-command-line', determines the database."
:type '(choice (const :tag "None" nil) file)
:group 'locate)
(defcustom locate-header-face nil
"*Face used to highlight the locate header."
"Face used to highlight the locate header."
:type '(choice (const :tag "None" nil) face)
:group 'locate)
@ -161,12 +192,12 @@ This should contain the \"-l\" switch, but not the \"-F\" or \"-b\" switches."
:version "22.1")
(defcustom locate-update-command "updatedb"
"The command used to update the locate database."
"The executable program used to update the locate database."
:type 'string
:group 'locate)
(defcustom locate-prompt-for-command nil
"If non-nil, the locate command prompts for a command to run.
"If non-nil, the `locate' command prompts for a command to run.
Otherwise, that behavior is invoked via a prefix argument."
:group 'locate
:type 'boolean
@ -191,7 +222,22 @@ Otherwise, that behavior is invoked via a prefix argument."
;;;###autoload
(defun locate (search-string &optional filter)
"Run the program `locate', putting results in `*Locate*' buffer.
With prefix arg, prompt for the locate command to run."
Pass it SEARCH-STRING as argument. Interactively, prompt for SEARCH-STRING.
With prefix arg, prompt for the exact shell command to run instead.
This program searches for those file names in a database that match
SEARCH-STRING and normally outputs all matching absolute file names,
one per line. The database normally consists of all files on your
system, or of all files that you have access to. Consult the
documentation of the program for the details about how it determines
which file names match SEARCH-STRING. (Those details vary highly with
the version.)
You can specify another program for this command to run by customizing
the variables `locate-command' or `locate-make-command-line'.
The main use of FILTER is to implement `locate-with-filter'. See
the docstring of that function for its meaning."
(interactive
(list
(if (or (and current-prefix-arg
@ -255,10 +301,17 @@ With prefix arg, prompt for the locate command to run."
;;;###autoload
(defun locate-with-filter (search-string filter)
"Run the locate command with a filter.
"Run the executable program `locate' with a filter.
This function is similar to the function `locate', which see.
The difference is that, when invoked interactively, the present function
prompts for both SEARCH-STRING and FILTER. It passes SEARCH-STRING
to the locate executable program. It produces a `*Locate*' buffer
that lists only those lines in the output of the locate program that
contain a match for the regular expression FILTER; this is often useful
to constrain a big search.
The filter is a regular expression. Only results matching the filter are
shown; this is often useful to constrain a big search."
When called from Lisp, this function is identical with `locate',
except that FILTER is not optional."
(interactive
(list (read-from-minibuffer "Locate: " nil nil
nil 'locate-history-list)
@ -269,7 +322,7 @@ shown; this is often useful to constrain a big search."
(defun locate-filter-output (filter)
"Filter output from the locate command."
(goto-char (point-min))
(delete-non-matching-lines filter))
(keep-lines filter))
(defvar locate-mode-map nil
"Local keymap for Locate mode buffers.")
@ -303,6 +356,15 @@ shown; this is often useful to constrain a big search."
"The amount of indentation for each file.")
(defun locate-get-file-positions ()
"Return list of start and end of the file name on the current line.
This is a list of two buffer positions.
You should only call this function on lines that contain a file name
listed by the locate program. Inside inserted subdirectories, or if
there is no file name on the current line, the return value is
meaningless. You can check whether the current line contains a file
listed by the locate program, using the function
`locate-main-listing-line-p'."
(save-excursion
(end-of-line)
(let ((eol (point)))
@ -320,6 +382,12 @@ shown; this is often useful to constrain a big search."
1
0)))
;; You should only call this function on lines that contain a file name
;; listed by the locate program. Inside inserted subdirectories, or if
;; there is no file name on the current line, the return value is
;; meaningless. You can check whether the current line contains a file
;; listed by the locate program, using the function
;; `locate-main-listing-line-p'.
(defun locate-get-filename ()
(let ((pos (locate-get-file-positions))
(lineno (locate-current-line-number)))
@ -516,8 +584,16 @@ Database is updated using the shell command in `locate-update-command'."
(defun locate-find-directory-other-window ()
"Visit the directory of the file named on this line in other window."
(interactive)
(find-file-other-window (locate-get-dirname)))
(if (locate-main-listing-line-p)
(find-file-other-window (locate-get-dirname))
(message "This command only works inside main listing.")))
;; You should only call this function on lines that contain a file name
;; listed by the locate program. Inside inserted subdirectories, or if
;; there is no file name on the current line, the return value is
;; meaningless. You can check whether the current line contains a file
;; listed by the locate program, using the function
;; `locate-main-listing-line-p'.
(defun locate-get-dirname ()
"Return the directory name of the file mentioned on this line."
(let (file (filepos (locate-get-file-positions)))

View file

@ -453,10 +453,10 @@ examples:
"String to prepend to Subject line when replying to a message.")
;; Some mailers use "Re(2):" or "Re^2:" or "Re: Re:" or "Re[2]:".
;; This pattern should catch all the common variants. The pattern
;; also ignores mailing list identifiers sometimes added in square
;; brackets at the beginning of subject lines.
(defvar rmail-reply-regexp "\\`\\(\\[.+?\\] \\)?\\(Re\\(([0-9]+)\\|\\[[0-9]+\\]\\|\\^[0-9]+\\)?: *\\)*"
;; This pattern should catch all the common variants.
;; rms: I deleted the change to delete tags in square brackets
;; because they mess up RT tags.
(defvar rmail-reply-regexp "\\`\\(Re\\(([0-9]+)\\|\\[[0-9]+\\]\\|\\^[0-9]+\\)?: *\\)*"
"Regexp to delete from Subject line before inserting `rmail-reply-prefix'.")
(defcustom rmail-display-summary nil

View file

@ -1,3 +1,53 @@
2006-03-17 Bill Wohler <wohler@newt.com>
* mh-compat.el (mh-image-load-path-for-library): Minor docstring
fix.
2006-03-16 Bill Wohler <wohler@newt.com>
* mh-comp.el (mh-send-letter): Use split-string to break up
mh-send-args (closes SF #1448604).
(mh-compose-and-send-mail): Use run-hook-with-args for
mh-compose-letter-function.
* mh-e.el (mh-list-to-string-1): Use dolist.
* mh-compat.el (mh-image-load-path-for-library): Prefer user's
images.
2006-03-15 Bill Wohler <wohler@newt.com>
* mh-compat.el (mh-image-load-path-for-library): Fix example by
not recommending that one binds image-load-path. Just defvar it to
placate compiler and only use it if previously defined.
* mh-e.el (image-load-path): Don't bind!
* mh-folder.el (mh-folder-mode): Only use image-load-path if
previously defined.
* mh-letter.el (mh-letter-mode): Ditto.
* mh-utils.el (mh-logo-display): Ditto.
2006-03-14 Bill Wohler <wohler@newt.com>
* mh-compat.el (mh-image-load-path-for-library): Incorporate
changes from image-load-path-for-library, which are:
(image-load-path-for-library): Pass value of path rather than
symbol. Always return list of directories. Guarantee that image
directory comes first.
* mh-e.el (image-load-path): Define on those Emacsen that lack it
to avoid compile and run-time errors.
* mh-folder.el (mh-folder-mode): Use new idiom for setting
image-load-path.
* mh-letter.el (mh-letter-mode): Ditto.
* mh-utils.el (mh-logo-display): Ditto.
2006-03-12 Bill Wohler <wohler@newt.com>
* mh-utils.el (mh-folder-list): Fix docstring (closes SF

View file

@ -287,7 +287,7 @@ use `mh-send-prog' to tell MH-E the name."
(set-buffer draft-buffer)) ; for annotation below
(t
(mh-exec-cmd-daemon mh-send-prog nil "-nodraftfolder" "-noverbose"
mh-send-args file-name)))
(split-string mh-send-args) file-name)))
(if mh-annotate-char
(mh-annotate-msg mh-sent-from-msg
mh-sent-from-folder
@ -895,15 +895,7 @@ letter."
(mh-logo-display)
(mh-make-local-hook 'kill-buffer-hook)
(add-hook 'kill-buffer-hook 'mh-tidy-draft-buffer nil t)
(if (and (boundp 'mh-compose-letter-function)
mh-compose-letter-function)
;; run-hooks will not pass arguments.
(let ((value mh-compose-letter-function))
(if (and (listp value) (not (eq (car value) 'lambda)))
(while value
(funcall (car value) to subject cc)
(setq value (cdr value)))
(funcall mh-compose-letter-function to subject cc)))))
(run-hook-with-args 'mh-compose-letter-function to subject cc))
(defun mh-insert-x-mailer ()
"Append an X-Mailer field to the header.

View file

@ -117,36 +117,67 @@ introduced in Emacs 22."
(mh-defun-compat mh-image-load-path-for-library
image-load-path-for-library (library image &optional path no-error)
"Return a suitable search path for images relative to LIBRARY.
"Return a suitable search path for images used by the Lisp package LIBRARY.
Images for LIBRARY are searched for in \"../../etc/images\" and
\"../etc/images\" relative to the files in \"lisp/LIBRARY\" as
well as in `image-load-path' and `load-path'.
It searches for IMAGE in `image-load-path' (excluding
\"`data-directory'/images\") and `load-path', followed by a path
suitable for LIBRARY, which includes \"../../etc/images\" and
\"../etc/images\" relative to the library file itself, and then
in \"`data-directory'/images\".
This function returns the value of `load-path' augmented with the
directory containing IMAGE. If PATH is given, it is used instead
of `load-path'. If PATH is t, just return the directory that
contains IMAGE.
Then this function returns a list of directories which contains
first the directory in which IMAGE was found, followed by the
value of `load-path'. If PATH is given, it is used instead of
`load-path'.
If NO-ERROR is non-nil, return nil if a suitable path can't be
found rather than signaling an error.
If NO-ERROR is non-nil and a suitable path can't be found, don't
signal an error. Instead, return a list of directories as before,
except that nil appears in place of the image directory.
Here is an example that uses a common idiom to provide
compatibility with versions of Emacs that lack the variable
`image-load-path':
(let ((load-path
(image-load-path-for-library \"mh-e\" \"mh-logo.xpm\"))
(image-load-path
(image-load-path-for-library \"mh-e\" \"mh-logo.xpm\" 'image-load-path)))
(mh-tool-bar-folder-buttons-init))
;; Shush compiler.
(defvar image-load-path)
This function is used by Emacs versions that don't have
`image-load-path-for-library'."
(let* ((load-path (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\"))
(image-load-path (cons (car load-path)
(when (boundp 'image-load-path)
image-load-path))))
(mh-tool-bar-folder-buttons-init))"
(unless library (error "No library specified"))
(unless image (error "No image specified"))
(let ((image-directory))
(let (image-directory image-directory-load-path)
;; Check for images in image-load-path or load-path.
(let ((img image)
(dir (or
;; Images in image-load-path.
(mh-image-search-load-path image)
;; Images in load-path.
(locate-library image)))
parent)
;; Since the image might be in a nested directory (for
;; example, mail/attach.pbm), adjust `image-directory'
;; accordingly.
(when dir
(setq dir (file-name-directory dir))
(while (setq parent (file-name-directory img))
(setq img (directory-file-name parent)
dir (expand-file-name "../" dir))))
(setq image-directory-load-path dir))
;; If `image-directory-load-path' isn't Emacs' image directory,
;; it's probably a user preference, so use it. Then use a
;; relative setting if possible; otherwise, use
;; `image-directory-load-path'.
(cond
;; User-modified image-load-path?
((and image-directory-load-path
(not (equal image-directory-load-path
(file-name-as-directory
(expand-file-name "images" data-directory)))))
(setq image-directory image-directory-load-path))
;; Try relative setting.
((let (library-name d1ei d2ei)
;; First, find library in the load-path.
@ -156,54 +187,28 @@ This function is used by Emacs versions that don't have
;; And then set image-directory relative to that.
(setq
;; Go down 2 levels.
d2ei (expand-file-name
(concat (file-name-directory library-name) "../../etc/images"))
d2ei (file-name-as-directory
(expand-file-name
(concat (file-name-directory library-name) "../../etc/images")))
;; Go down 1 level.
d1ei (expand-file-name
(concat (file-name-directory library-name) "../etc/images")))
d1ei (file-name-as-directory
(expand-file-name
(concat (file-name-directory library-name) "../etc/images"))))
(setq image-directory
;; Set it to nil if image is not found.
(cond ((file-exists-p (expand-file-name image d2ei)) d2ei)
((file-exists-p (expand-file-name image d1ei)) d1ei)))))
;; Check for images in image-load-path or load-path.
((let ((img image)
(dir (or
;; Images in image-load-path.
(mh-image-search-load-path image)
;; Images in load-path.
(locate-library image)))
parent)
;; Since the image might be in a nested directory (for
;; example, mail/attach.pbm), adjust `image-directory'
;; accordingly.
(and dir
(setq dir (file-name-directory dir))
(progn
(while (setq parent (file-name-directory img))
(setq img (directory-file-name parent)
dir (expand-file-name "../" dir)))
(setq image-directory dir)))))
;; Use Emacs' image directory.
(image-directory-load-path
(setq image-directory image-directory-load-path))
(no-error
;; In this case we will return nil.
(message "Could not find image %s for library %s" image library))
(t
(error "Could not find image %s for library %s" image library)))
;; Return the directory, nil if no-error was non-nil and a
;; suitable path could not be found, or an augmented
;; `image-load-path' or `load-path'.
(cond ((or (null image-directory)
(eq path t))
image-directory)
((and path (symbolp path))
(nconc (list image-directory)
(delete image-directory
(if (boundp path)
(copy-sequence (symbol-value path))
nil))))
(t
(nconc (list image-directory)
(delete image-directory (copy-sequence load-path)))))))
;; Return an augmented `path' or `load-path'.
(nconc (list image-directory)
(delete image-directory (copy-sequence (or path load-path))))))
(mh-defun-compat mh-image-search-load-path
image-search-load-path (file &optional path)

View file

@ -427,20 +427,20 @@ gnus-version)
(defun mh-list-to-string-1 (l)
"Flatten the list L and make every element of the new list into a string."
(let ((new-list nil))
(while l
(cond ((null (car l)))
((symbolp (car l))
(setq new-list (cons (symbol-name (car l)) new-list)))
((numberp (car l))
(setq new-list (cons (int-to-string (car l)) new-list)))
((equal (car l) ""))
((stringp (car l)) (setq new-list (cons (car l) new-list)))
((listp (car l))
(setq new-list (nconc (mh-list-to-string-1 (car l))
new-list)))
(t (error "Bad element in `mh-list-to-string': %s" (car l))))
(setq l (cdr l)))
(let (new-list)
(dolist (element l)
(cond ((null element))
((symbolp element)
(push (symbol-name element) new-list))
((numberp element)
(push (int-to-string element) new-list))
((equal element ""))
((stringp element)
(push element new-list))
((listp element)
(setq new-list (nconc (mh-list-to-string-1 element) new-list)))
(t
(error "Bad element: %s" element))))
new-list))

View file

@ -525,6 +525,7 @@ font-lock is done highlighting.")
(eval-when-compile
(defvar desktop-save-buffer)
(defvar font-lock-auto-fontify)
(defvar image-load-path)
(mh-do-in-xemacs (defvar font-lock-defaults)))
(defvar mh-folder-buttons-init-flag nil)
@ -591,9 +592,10 @@ perform the operation on all messages in that region.
\\{mh-folder-mode-map}"
(mh-do-in-gnu-emacs
(unless mh-folder-buttons-init-flag
(let ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm"))
(image-load-path (mh-image-load-path-for-library
"mh-e" "mh-logo.xpm" 'image-load-path)))
(let* ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm"))
(image-load-path (cons (car load-path)
(when (boundp 'image-load-path)
image-load-path))))
(mh-tool-bar-folder-buttons-init)
(setq mh-folder-buttons-init-flag t)))
(set (make-local-variable 'tool-bar-map) mh-folder-tool-bar-map))

View file

@ -278,7 +278,9 @@ searching for `mh-mail-header-separator' in the buffer."
(defvar mh-letter-buttons-init-flag nil)
;; Shush compiler.
(eval-when-compile (mh-do-in-xemacs (defvar font-lock-defaults)))
(eval-when-compile
(defvar image-load-path)
(mh-do-in-xemacs (defvar font-lock-defaults)))
;; Ensure new buffers won't get this mode if default-major-mode is nil.
(put 'mh-letter-mode 'mode-class 'special)
@ -313,9 +315,10 @@ order).
(make-local-variable 'mh-sent-from-msg)
(mh-do-in-gnu-emacs
(unless mh-letter-buttons-init-flag
(let ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm"))
(image-load-path (mh-image-load-path-for-library
"mh-e" "mh-logo.xpm" 'image-load-path)))
(let* ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm"))
(image-load-path (cons (car load-path)
(when (boundp 'image-load-path)
image-load-path))))
(mh-tool-bar-letter-buttons-init)
(setq mh-letter-buttons-init-flag t)))
(set (make-local-variable 'tool-bar-map) mh-letter-tool-bar-map))

View file

@ -127,13 +127,17 @@ Ignores case when searching for OLD."
(defvar mh-logo-cache nil)
;; Shush compiler.
(defvar image-load-path)
;;;###mh-autoload
(defun mh-logo-display ()
"Modify mode line to display MH-E logo."
(mh-do-in-gnu-emacs
(let ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm"))
(image-load-path (mh-image-load-path-for-library
"mh-e" "mh-logo.xpm" 'image-load-path)))
(let* ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm"))
(image-load-path (cons (car load-path)
(when (boundp 'image-load-path)
image-load-path))))
(add-text-properties
0 2
`(display ,(or mh-logo-cache

View file

@ -538,19 +538,20 @@ resized by dragging their header-line."
(echo-keystrokes 0)
(start-event-frame (window-frame (car (car (cdr start-event)))))
(start-event-window (car (car (cdr start-event))))
(start-nwindows (count-windows t))
event mouse x left right edges wconfig growth
(which-side
(or (cdr (assq 'vertical-scroll-bars (frame-parameters start-event-frame)))
'right)))
(if (one-window-p t)
(error "Attempt to resize sole ordinary window"))
(if (eq which-side 'right)
(if (= (nth 2 (window-edges start-event-window))
(frame-width start-event-frame))
(error "Attempt to drag rightmost scrollbar"))
(if (= (nth 0 (window-edges start-event-window)) 0)
(error "Attempt to drag leftmost scrollbar")))
(cond
((one-window-p t)
(error "Attempt to resize sole ordinary window"))
((and (eq which-side 'right)
(>= (nth 2 (window-inside-edges start-event-window))
(frame-width start-event-frame)))
(error "Attempt to drag rightmost scrollbar"))
((and (eq which-side 'left)
(= (nth 0 (window-inside-edges start-event-window)) 0))
(error "Attempt to drag leftmost scrollbar")))
(track-mouse
(progn
;; enlarge-window only works on the selected window, so

View file

@ -81,7 +81,7 @@
;; 1) They go out of scope when the inferior is re-run.
;; 2) -stack-list-locals has a type field but also prints type in values field.
;; 3) VARNUM increments even when vairable object is not created (maybe trivial).
;; 3) VARNUM increments even when variable object is not created (maybe trivial).
;;; TODO:
@ -107,7 +107,7 @@
(defvar gdb-current-language nil)
(defvar gdb-var-list nil
"List of variables in watch window.
Each element has the form (EXPRESSION VARNUM NUMCHILD TYPE VALUE STATUS) where
Each element has the form (VARNUM EXPRESSION NUMCHILD TYPE VALUE STATUS) where
STATUS is nil (unchanged), `changed' or `out-of-scope'.")
(defvar gdb-force-update t
"Non-nil means that view of watch expressions will be updated in the speedbar.")
@ -125,6 +125,7 @@ and #define directives otherwise.")
(defvar gdb-buffer-fringe-width nil)
(defvar gdb-signalled nil)
(defvar gdb-source-window nil)
(defvar gdb-inferior-status nil)
(defvar gdb-buffer-type nil
"One of the symbols bound in `gdb-buffer-rules'.")
@ -317,6 +318,16 @@ of the inferior. Non-nil means display the layout shown for
:group 'gud
:version "22.1")
(defun gdb-force-mode-line-update (status)
(let ((buffer gud-comint-buffer))
(if (and buffer (buffer-name buffer))
(with-current-buffer buffer
(setq mode-line-process
(format ":%s [%s]"
(process-status (get-buffer-process buffer)) status))
;; Force mode line redisplay soon.
(force-mode-line-update)))))
(defun gdb-many-windows (arg)
"Toggle the number of windows in the basic arrangement.
With arg, display additional buffers iff arg is positive."
@ -417,12 +428,20 @@ With arg, use separate IO iff arg is positive."
(defun gdb-find-watch-expression ()
(let* ((var (nth (- (line-number-at-pos (point)) 2) gdb-var-list))
(varno (nth 1 var)) (expr))
(string-match "\\(var[0-9]+\\)\\.\\(.*\\)" varno)
(dolist (var1 gdb-var-list)
(if (string-equal (nth 1 var1) (match-string 1 varno))
(setq expr (concat (car var1) "." (match-string 2 varno)))))
expr))
(varnum (car var)) expr array)
(string-match "\\(var[0-9]+\\)\\.\\(.*\\)" varnum)
(let ((var1 (assoc (match-string 1 varnum) gdb-var-list)) var2 varnumlet
(component-list (split-string (match-string 2 varnum) "\\." t)))
(setq expr (nth 1 var1))
(setq varnumlet (car var1))
(dolist (component component-list)
(setq var2 (assoc varnumlet gdb-var-list))
(setq expr (concat expr
(if (string-match ".*\\[[0-9]+\\]$" (nth 3 var2))
(concat "[" component "]")
(concat "." component))))
(setq varnumlet (concat varnumlet "." component)))
expr)))
(defun gdb-init-1 ()
(set (make-local-variable 'gud-minor-mode) 'gdba)
@ -516,7 +535,9 @@ With arg, use separate IO iff arg is positive."
gdb-buffer-fringe-width (car (window-fringes))
gdb-debug-ring nil
gdb-signalled nil
gdb-source-window nil)
gdb-source-window nil
gdb-inferior-status nil
gdb-continuation nil)
(setq gdb-buffer-type 'gdba)
@ -648,24 +669,37 @@ With arg, automatically raise speedbar iff arg is positive."
:group 'gud
:version "22.1")
(defun gud-watch (&optional event)
"Watch expression at point."
(interactive (list last-input-event))
(if event (posn-set-point (event-end event)))
(require 'tooltip)
(save-selected-window
(let ((expr (tooltip-identifier-from-point (point))))
(catch 'already-watched
(dolist (var gdb-var-list)
(unless (string-match "\\." (nth 1 var))
(if (string-equal expr (car var)) (throw 'already-watched nil))))
(set-text-properties 0 (length expr) nil expr)
(gdb-enqueue-input
(list
(if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
(concat "server interpreter mi \"-var-create - * " expr "\"\n")
(concat"-var-create - * " expr "\n"))
`(lambda () (gdb-var-create-handler ,expr))))))))
(define-key gud-minor-mode-map "\C-c\C-w" 'gud-watch)
(define-key global-map (concat gud-key-prefix "\C-w") 'gud-watch)
(defun gud-watch (&optional arg event)
"Watch expression at point.
With arg, enter name of variable to be watched in the minibuffer."
(interactive (list current-prefix-arg last-input-event))
(let ((minor-mode (buffer-local-value 'gud-minor-mode gud-comint-buffer)))
(if (memq minor-mode '(gdbmi gdba))
(progn
(if event (posn-set-point (event-end event)))
(require 'tooltip)
(save-selected-window
(let ((expr (if arg
(completing-read "Name of variable: "
'gud-gdb-complete-command)
(tooltip-identifier-from-point (point)))))
(catch 'already-watched
(dolist (var gdb-var-list)
(unless (string-match "\\." (car var))
(if (string-equal expr (nth 1 var))
(throw 'already-watched nil))))
(set-text-properties 0 (length expr) nil expr)
(gdb-enqueue-input
(list
(if (eq minor-mode 'gdba)
(concat
"server interpreter mi \"-var-create - * " expr "\"\n")
(concat"-var-create - * " expr "\n"))
`(lambda () (gdb-var-create-handler ,expr))))))))
(message "gud-watch is a no-op in this mode."))))
(defconst gdb-var-create-regexp
"name=\"\\(.*?\\)\",numchild=\"\\(.*?\\)\",type=\"\\(.*?\\)\"")
@ -674,11 +708,11 @@ With arg, automatically raise speedbar iff arg is positive."
(goto-char (point-min))
(if (re-search-forward gdb-var-create-regexp nil t)
(let ((var (list
(match-string 1)
(if (and (string-equal gdb-current-language "c")
gdb-use-colon-colon-notation gdb-selected-frame)
(setq expr (concat gdb-selected-frame "::" expr))
expr)
(match-string 1)
(match-string 2)
(match-string 3)
nil nil)))
@ -691,10 +725,10 @@ With arg, automatically raise speedbar iff arg is positive."
(list
(if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
(concat "server interpreter mi \"-var-evaluate-expression "
(nth 1 var) "\"\n")
(concat "-var-evaluate-expression " (nth 1 var) "\n"))
(car var) "\"\n")
(concat "-var-evaluate-expression " (car var) "\n"))
`(lambda () (gdb-var-evaluate-expression-handler
,(nth 1 var) nil)))))
,(car var) nil)))))
(if (search-forward "Undefined command" nil t)
(message-box "Watching expressions requires gdb 6.0 onwards")
(message-box "No symbol \"%s\" in current context." expr))))
@ -702,12 +736,10 @@ With arg, automatically raise speedbar iff arg is positive."
(defun gdb-var-evaluate-expression-handler (varnum changed)
(goto-char (point-min))
(re-search-forward ".*value=\\(\".*\"\\)" nil t)
(catch 'var-found
(dolist (var gdb-var-list)
(when (string-equal varnum (cadr var))
(if changed (setcar (nthcdr 5 var) 'changed))
(setcar (nthcdr 4 var) (read (match-string 1)))
(throw 'var-found nil)))))
(let ((var (assoc varnum gdb-var-list)))
(when var
(if changed (setcar (nthcdr 5 var) 'changed))
(setcar (nthcdr 4 var) (read (match-string 1))))))
(defun gdb-var-list-children (varnum)
(gdb-enqueue-input
@ -723,26 +755,25 @@ type=\"\\(.*?\\)\"")
(let ((var-list nil))
(catch 'child-already-watched
(dolist (var gdb-var-list)
(if (string-equal varnum (cadr var))
(if (string-equal varnum (car var))
(progn
(push var var-list)
(while (re-search-forward gdb-var-list-children-regexp nil t)
(let ((varchild (list (match-string 2)
(match-string 1)
(let ((varchild (list (match-string 1)
(match-string 2)
(match-string 3)
(match-string 4)
nil nil)))
(dolist (var1 gdb-var-list)
(if (string-equal (cadr var1) (cadr varchild))
(throw 'child-already-watched nil)))
(if (assoc (car varchild) gdb-var-list)
(throw 'child-already-watched nil))
(push varchild var-list)
(gdb-enqueue-input
(list
(concat
"server interpreter mi \"-var-evaluate-expression "
(nth 1 varchild) "\"\n")
(car varchild) "\"\n")
`(lambda () (gdb-var-evaluate-expression-handler
,(nth 1 varchild) nil)))))))
,(car varchild) nil)))))))
(push var var-list)))
(setq gdb-var-list (nreverse var-list)))))
@ -762,11 +793,8 @@ type=\"\\(.*?\\)\"")
(while (re-search-forward gdb-var-update-regexp nil t)
(let ((varnum (match-string 1)))
(if (string-equal (match-string 2) "false")
(catch 'var-found
(dolist (var gdb-var-list)
(when (string-equal varnum (cadr var))
(setcar (nthcdr 5 var) 'out-of-scope)
(throw 'var-found nil))))
(let ((var (assoc varnum gdb-var-list)))
(if var (setcar (nthcdr 5 var) 'out-of-scope)))
(gdb-enqueue-input
(list
(concat "server interpreter mi \"-var-evaluate-expression "
@ -796,10 +824,14 @@ type=\"\\(.*?\\)\"")
'(gdbmi gdba))
(let ((text (speedbar-line-text)))
(string-match "\\(\\S-+\\)" text)
(let* ((expr (match-string 1 text))
(var (assoc expr gdb-var-list))
(varnum (cadr var)))
(unless (string-match "\\." varnum)
(let ((expr (match-string 1 text)) var varnum)
(catch 'expr-found
(dolist (var1 gdb-var-list)
(when (string-equal expr (nth 1 var1))
(setq var var1)
(setq varnum (car var1))
(throw 'expr-found nil))))
(unless (string-match "\\." (car var))
(gdb-enqueue-input
(list
(if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer)
@ -809,13 +841,13 @@ type=\"\\(.*?\\)\"")
'ignore))
(setq gdb-var-list (delq var gdb-var-list))
(dolist (varchild gdb-var-list)
(if (string-match (concat (nth 1 var) "\\.") (nth 1 varchild))
(if (string-match (concat (car var) "\\.") (car varchild))
(setq gdb-var-list (delq varchild gdb-var-list)))))))))
(defun gdb-edit-value (text token indent)
"Assign a value to a variable displayed in the speedbar."
(let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list))
(varnum (cadr var)) (value))
(varnum (car var)) (value))
(setq value (read-string "New value: "))
(gdb-enqueue-input
(list
@ -851,7 +883,7 @@ INDENT is the current indentation depth."
(gdb-var-list-children-1 token)))
((string-match "-" text) ;contract this node
(dolist (var gdb-var-list)
(if (string-match (concat token "\\.") (nth 1 var))
(if (string-match (concat token "\\.") (car var))
(setq gdb-var-list (delq var gdb-var-list))))
(speedbar-change-expand-button-char ?+)
(speedbar-delete-subblock indent))
@ -1046,6 +1078,7 @@ The key should be one of the cars in `gdb-buffer-rules-assoc'."
;;
;; These lists are consumed tail first.
;;
(defvar gdb-continuation nil)
(defun gdb-send (proc string)
"A comint send filter for gdb.
@ -1053,12 +1086,15 @@ This filter may simply queue input for a later time."
(with-current-buffer gud-comint-buffer
(let ((inhibit-read-only t))
(remove-text-properties (point-min) (point-max) '(face))))
(let ((item (concat string "\n")))
(if gud-running
(progn
(if gdb-enable-debug (push (cons 'send item) gdb-debug-ring))
(process-send-string proc item))
(gdb-enqueue-input item))))
(if (string-match "\\\\$" string)
(setq gdb-continuation (concat gdb-continuation string "\n"))
(let ((item (concat gdb-continuation string "\n")))
(if gud-running
(progn
(if gdb-enable-debug (push (cons 'send item) gdb-debug-ring))
(process-send-string proc item))
(gdb-enqueue-input item)))
(setq gdb-continuation nil)))
;; Note: Stuff enqueued here will be sent to the next prompt, even if it
;; is a query, or other non-top-level prompt.
@ -1134,7 +1170,7 @@ This filter may simply queue input for a later time."
("starting" gdb-starting)
("exited" gdb-exited)
("signalled" gdb-signalled)
("signal" gdb-stopping)
("signal" gdb-signal)
("breakpoint" gdb-stopping)
("watchpoint" gdb-stopping)
("frame-begin" gdb-frame-begin)
@ -1146,6 +1182,7 @@ This filter may simply queue input for a later time."
(defun gdb-resync()
(setq gdb-flush-pending-output t)
(setq gud-running nil)
(gdb-force-mode-line-update "stopped")
(setq gdb-output-sink 'user)
(setq gdb-input-queue nil)
(setq gdb-pending-triggers nil)
@ -1220,13 +1257,22 @@ not GDB."
((eq sink 'user)
(progn
(setq gud-running t)
(setq gdb-inferior-status "running")
(gdb-force-mode-line-update gdb-inferior-status)
(gdb-remove-text-properties)
(setq gud-overlay-arrow-position nil)
(setq gdb-overlay-arrow-position nil)
(if gdb-use-separate-io-buffer
(setq gdb-output-sink 'inferior))))
(t
(gdb-resync)
(error "Unexpected `starting' annotation")))))
(defun gdb-signal (ignored)
(setq gdb-inferior-status "signal")
(gdb-force-mode-line-update gdb-inferior-status)
(gdb-stopping ignored))
(defun gdb-stopping (ignored)
"An annotation handler for `breakpoint' and other annotations.
They say that I/O for the subprocess is now GDB, not the program
@ -1249,6 +1295,8 @@ directives."
(setq gdb-active-process nil)
(setq gud-overlay-arrow-position nil)
(setq gdb-overlay-arrow-position nil)
(setq gdb-inferior-status "exited")
(gdb-force-mode-line-update gdb-inferior-status)
(gdb-stopping ignored))
(defun gdb-signalled (ignored)
@ -1270,6 +1318,9 @@ directives."
It is just like `gdb-stopping', except that if we already set the output
sink to `user' in `gdb-stopping', that is fine."
(setq gud-running nil)
(unless (member gdb-inferior-status '("exited" "signal"))
(setq gdb-inferior-status "stopped")
(gdb-force-mode-line-update gdb-inferior-status))
(let ((sink gdb-output-sink))
(cond
((eq sink 'inferior)
@ -3117,19 +3168,18 @@ value=\\(\".*?\"\\),type=\"\\(.+?\\)\"}")
(let ((var-list nil))
(catch 'child-already-watched
(dolist (var gdb-var-list)
(if (string-equal varnum (cadr var))
(if (string-equal varnum (car var))
(progn
(push var var-list)
(while (re-search-forward gdb-var-list-children-regexp-1 nil t)
(let ((varchild (list (match-string 2)
(match-string 1)
(let ((varchild (list (match-string 1)
(match-string 2)
(match-string 3)
(match-string 5)
(read (match-string 4))
nil)))
(dolist (var1 gdb-var-list)
(if (string-equal (cadr var1) (cadr varchild))
(throw 'child-already-watched nil)))
(if (assoc (car varchild) gdb-var-list)
(throw 'child-already-watched nil))
(push varchild var-list))))
(push var var-list)))
(setq gdb-var-list (nreverse var-list)))))
@ -3154,16 +3204,14 @@ value=\\(\".*?\"\\),type=\"\\(.+?\\)\"}")
(setcar (nthcdr 5 var) nil))
(goto-char (point-min))
(while (re-search-forward gdb-var-update-regexp-1 nil t)
(let ((varnum (match-string 1)))
(catch 'var-found
(dolist (var gdb-var-list)
(when (string-equal varnum (cadr var))
(if (string-equal (match-string 3) "false")
(setcar (nthcdr 5 var) 'out-of-scope)
(setcar (nthcdr 5 var) 'changed)
(setcar (nthcdr 4 var)
(read (match-string 2))))
(throw 'var-found nil))))))
(let* ((varnum (match-string 1))
(var (assoc varnum gdb-var-list)))
(when var
(if (string-equal (match-string 3) "false")
(setcar (nthcdr 5 var) 'out-of-scope)
(setcar (nthcdr 5 var) 'changed)
(setcar (nthcdr 4 var)
(read (match-string 2)))))))
(setq gdb-pending-triggers
(delq 'gdb-var-update gdb-pending-triggers))
(when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))

View file

@ -33,8 +33,6 @@
(require 'compile)
(defvar font-lock-lines-before)
(defgroup grep nil
"Run compiler as inferior of Emacs, parse error messages."
@ -536,10 +534,7 @@ temporarily highlight in visited source lines."
grep-regexp-alist)
(set (make-local-variable 'compilation-process-setup-function)
'grep-process-setup)
(set (make-local-variable 'compilation-disable-input) t)
;; Set `font-lock-lines-before' to 0 to not refontify the previous
;; line where grep markers may be already removed.
(set (make-local-variable 'font-lock-lines-before) 0))
(set (make-local-variable 'compilation-disable-input) t))
;;;###autoload
(defun grep-find (command-args)

View file

@ -174,7 +174,7 @@ Used to grey out relevant togolbar icons.")
:enable (and (not gud-running)
(memq gud-minor-mode
'(gdbmi gdba gdb dbx xdb jdb pdb bashdb))))
([pp] menu-item "Print the emacs s-expression" gud-pp
([pp] menu-item "Print S-expression" gud-pp
:enable (and (not gud-running)
gdb-active-process)
:visible (and (string-equal
@ -234,9 +234,6 @@ Used to grey out relevant togolbar icons.")
(gud-run . "gud/run")
(gud-go . "gud/go")
(gud-stop-subjob . "gud/stop")
;; gud-s, gud-si etc. instead of gud-step,
;; gud-stepi, to avoid file-name clashes on DOS
;; 8+3 filesystems.
(gud-cont . "gud/cont")
(gud-until . "gud/until")
(gud-next . "gud/next")
@ -455,7 +452,7 @@ required by the caller."
(let ((var-list gdb-var-list) parent)
(while var-list
(let* (char (depth 0) (start 0) (var (car var-list))
(expr (car var)) (varnum (nth 1 var))
(varnum (car var)) (expr (nth 1 var))
(type (nth 3 var)) (value (nth 4 var))
(status (nth 5 var)))
(put-text-property
@ -483,9 +480,9 @@ required by the caller."
t)
depth)
(if (eq status 'out-of-scope) (setq parent 'shadow))
(if (and (cadr var-list)
(if (and (nth 1 var-list)
(string-match (concat varnum "\\.")
(cadr (cadr var-list))))
(car (nth 1 var-list))))
(setq char ?-)
(setq char ?+))
(if (string-match "\\*$" type)
@ -743,14 +740,18 @@ To run GDB in text command mode, set `gud-gdb-command-name' to
(defvar gud-comint-buffer nil)
(defun gud-gdb-complete-command ()
(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
available with older versions of GDB."
(interactive)
(let* ((end (point))
(command (buffer-substring (comint-line-beginning-position) end))
(command-word
(if command
;; Used by gud-watch in mini-buffer.
(setq command (concat "p " command))
;; Used in GUD buffer.
(let ((end (point)))
(setq command (buffer-substring (comint-line-beginning-position) end))))
(let* ((command-word
;; Find the word break. This match will always succeed.
(and (string-match "\\(\\`\\| \\)\\([^ ]*\\)\\'" command)
(substring command (match-beginning 2))))
@ -869,13 +870,14 @@ It is passed through FILTER before we look at it."
(defun gud-gdb-run-command-fetch-lines (command buffer &optional skip)
"Run COMMAND, and return the list of lines it outputs.
BUFFER is the GUD buffer in which to run the command.
BUFFER is the current buffer which may be the GUD buffer in which to run.
SKIP is the number of chars to skip on each lines, it defaults to 0."
(with-current-buffer buffer
(if (save-excursion
(goto-char (point-max))
(forward-line 0)
(not (looking-at comint-prompt-regexp)))
(with-current-buffer gud-comint-buffer
(if (and (eq gud-comint-buffer buffer)
(save-excursion
(goto-char (point-max))
(forward-line 0)
(not (looking-at comint-prompt-regexp))))
nil
;; Much of this copied from GDB complete, but I'm grabbing the stack
;; frame instead.
@ -884,12 +886,13 @@ SKIP is the number of chars to skip on each lines, it defaults to 0."
(gud-gdb-fetch-lines-string nil)
(gud-gdb-fetch-lines-break (or skip 0))
(gud-marker-filter
`(lambda (string) (gud-gdb-fetch-lines-filter string ',gud-marker-filter))))
`(lambda (string)
(gud-gdb-fetch-lines-filter string ',gud-marker-filter))))
;; Issue the command to GDB.
(gud-basic-call command)
;; Slurp the output.
(while gud-gdb-fetch-lines-in-progress
(accept-process-output (get-buffer-process buffer)))
(accept-process-output (get-buffer-process gud-comint-buffer)))
(nreverse gud-gdb-fetched-lines)))))
@ -3273,11 +3276,10 @@ Treats actions as defuns."
(remove-hook 'tooltip-hook 'gud-tooltip-tips)
(define-key global-map [mouse-movement] 'ignore)))
(gud-tooltip-activate-mouse-motions-if-enabled)
(if (and
gud-comint-buffer
(buffer-name gud-comint-buffer); gud-comint-buffer might be killed
(with-current-buffer gud-comint-buffer
(memq gud-minor-mode '(gdbmi gdba))))
(if (and gud-comint-buffer
(buffer-name gud-comint-buffer); gud-comint-buffer might be killed
(memq (buffer-local-value 'gud-minor-mode gud-comint-buffer)
'(gdbmi gdba)))
(if gud-tooltip-mode
(progn
(dolist (buffer (buffer-list))

View file

@ -121,6 +121,9 @@ it defaults to `<', otherwise it defaults to `string<'."
(defun sort-build-lists (nextrecfun endrecfun startkeyfun endkeyfun)
(let ((sort-lists ())
(start-rec nil)
;; To avoid such functins as `end-of-line' being affected by
;; fields.
(inhibit-field-text-motion t)
done key)
;; Loop over sort records.
;(goto-char (point-min)) -- it is the caller's responsibility to

View file

@ -1198,11 +1198,15 @@ See the documentation of `create-fontset-from-fontset-spec for the format.")
;; (set-fontset-font nil (make-char 'japanese-jisx0208-1978) '("*" . "JISX0208-SJIS"))
(defun mouse-set-font (&rest fonts)
"Select a font.
"Select an Emacs font from a list of known good fonts and fontsets.
If `w32-use-w32-font-dialog' is non-nil (the default), use the Windows
font dialog to get the matching FONTS. Otherwise use a pop-up menu
\(like Emacs on other platforms) initialized with the fonts in
`w32-fixed-font-alist'."
font dialog to display the list of possible fonts. Otherwise use a
pop-up menu (like Emacs does on other platforms) initialized with
the fonts in `w32-fixed-font-alist'.
If `w32-list-proportional-fonts' is non-nil, add proportional fonts
to the list in the font selection dialog (the fonts listed by the
pop-up menu are unaffected by `w32-list-proportional-fonts')."
(interactive
(if w32-use-w32-font-dialog
(let ((chosen-font (w32-select-font (selected-frame)

View file

@ -1295,9 +1295,10 @@ The last occurring definition in the buffer will be used.")
("^%!PS-Adobe-[123].0" . "\n%%EOF\n")
("^---* \\(Start of \\)?[Ff]orwarded [Mm]essage"
. "^---* End of [Ff]orwarded [Mm]essage")
;; Matches e-mail addresses, file names, http addresses, etc. The `-+'
;; pattern necessary for performance reasons when `-' part of word syntax.
("\\(--+\\|\\(/\\w\\|\\(\\(\\w\\|[-_]\\)+[.:@]\\)\\)\\(\\w\\|[-_]\\)*\\([.:/@]+\\(\\w\\|[-_~=?&]\\)+\\)+\\)")
;; Matches e-mail addresses, file names, http addresses, etc. The
;; `-+' `_+' patterns are necessary for performance reasons when
;; `-' or `_' part of word syntax.
("\\(--+\\|_+\\|\\(/\\w\\|\\(\\(\\w\\|[-_]\\)+[.:@]\\)\\)\\(\\w\\|[-_]\\)*\\([.:/@]+\\(\\w\\|[-_~=?&]\\)+\\)+\\)")
;; above checks /.\w sequences
;;("\\(--+\\|\\(/\\|\\(\\(\\w\\|[-_]\\)+[.:@]\\)\\)\\(\\w\\|[-_]\\)*\\([.:/@]+\\(\\w\\|[-_~=?&]\\)+\\)+\\)")
;; This is a pretty complex regexp. It can be simplified to the following:

View file

@ -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.09
;; Version: 4.10
;;
;; This file is part of GNU Emacs.
;;
@ -81,6 +81,9 @@
;;
;; Changes since version 4.00:
;; ---------------------------
;; Version 4.10
;; - Bug fixes.
;;
;; Version 4.09
;; - Bug fixes.
;; - Small improvements to font-lock support.
@ -145,7 +148,7 @@
;;; Customization variables
(defvar org-version "4.09"
(defvar org-version "4.10"
"The version number of the file org.el.")
(defun org-version ()
(interactive)
@ -445,7 +448,7 @@ In the calendar, the date can be selected with mouse-1. However, the
minibuffer will also be active, and you can simply enter the date as well.
When nil, only the minibuffer will be available."
:group 'org-time
:type 'number)
:type 'boolean)
(defcustom org-calendar-follow-timestamp-change t
"Non-nil means, make the calendar window follow timestamp changes.
@ -1739,7 +1742,8 @@ Changing this variable requires a restart of Emacs to take effect."
:type 'boolean)
(defface org-hide
'((((type tty) (class color)) (:foreground "blue" :weight bold))
'(
(((type tty) (class color)) (:foreground "white"))
(((class color) (background light)) (:foreground "white"))
(((class color) (background dark)) (:foreground "black"))
; (((class color) (background light)) (:foreground "grey90"))
@ -2589,6 +2593,7 @@ Optional argument N means, put the headline into the Nth line of the window."
(define-key org-goto-map [(?q)] 'org-goto-quit)
(define-key org-goto-map [(control ?g)] 'org-goto-quit)
(define-key org-goto-map "\C-i" 'org-cycle)
(define-key org-goto-map [(tab)] 'org-cycle)
(define-key org-goto-map [(down)] 'outline-next-visible-heading)
(define-key org-goto-map [(up)] 'outline-previous-visible-heading)
(define-key org-goto-map "n" 'outline-next-visible-heading)
@ -4001,8 +4006,8 @@ used to insert the time stamp into the buffer to include the time."
month (string-to-number (match-string 3 ans))
day (string-to-number (match-string 4 ans)))
(if (< year 100) (setq year (+ 2000 year)))
(setq ans (replace-match (format "%04d-%02d-%02d" year month day)
t t ans))))
(setq ans (replace-match (format "%04d-%02d-%02d\\5" year month day)
t nil ans))))
(setq tl (parse-time-string ans)
year (or (nth 5 tl) (string-to-number (format-time-string "%Y")))
month (or (nth 4 tl) (string-to-number (format-time-string "%m")))
@ -4377,6 +4382,7 @@ The following commands are available:
(list 'org-agenda-mode-hook)))
(define-key org-agenda-mode-map "\C-i" 'org-agenda-goto)
(define-key org-agenda-mode-map [(tab)] 'org-agenda-goto)
(define-key org-agenda-mode-map "\C-m" 'org-agenda-switch-to)
(define-key org-agenda-mode-map " " 'org-agenda-show)
(define-key org-agenda-mode-map "\C-c\C-t" 'org-agenda-todo)
@ -10801,11 +10807,11 @@ underlined headlines. The default is 3."
(defun org-insert-centered (s &optional underline)
"Insert the string S centered and underline it with character UNDERLINE."
(let ((ind (max (/ (- 80 (length s)) 2) 0)))
(let ((ind (max (/ (- 80 (string-width s)) 2) 0)))
(insert (make-string ind ?\ ) s "\n")
(if underline
(insert (make-string ind ?\ )
(make-string (length s) underline)
(make-string (string-width s) underline)
"\n"))))
(defun org-ascii-level-start (level title umax)
@ -11915,6 +11921,7 @@ a time), or the day by one (if it does not contain a time)."
;; TAB key with modifiers
(define-key org-mode-map "\C-i" 'org-cycle)
(define-key org-mode-map [(tab)] 'org-cycle)
(define-key org-mode-map [(meta tab)] 'org-complete)
(define-key org-mode-map "\M-\C-i" 'org-complete) ; for tty emacs
;; The following line is necessary under Suse GNU/Linux
@ -12925,4 +12932,3 @@ Show the heading too, if it is currently invisible."
;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd
;;; org.el ends here

View file

@ -140,10 +140,9 @@
data-directory)))
(and dir (list dir (expand-file-name "images" dir))))
)
"List of locations where to search for the themes sub-directory.
Each element is an expression that will be evaluated to return a
single directory or a list of directories to search.
"List of locations in which to search for the themes sub-directory.
Each element is an expression that will be recursively evaluated until
it returns a single directory or a list of directories.
The default is to search in the `load-path' first, then in the
\"images\" sub directory in the data directory, then in the data
directory.
@ -152,23 +151,22 @@ Emacs, and what `(locate-data-directory \"tree-widget\")' returns on
XEmacs.")
(defcustom tree-widget-themes-directory "tree-widget"
"*Name of the directory where to look up for image themes.
"*Name of the directory in which to look for an image theme.
When nil use the directory where the tree-widget library is located.
When a relative name is specified, search in all occurrences of that
sub directory found in the locations specified in
`tree-widget-themes-load-path'.
When it is a relative name, search in all occurrences of that sub
directory in the path specified by `tree-widget-themes-load-path'.
The default is to use the \"tree-widget\" relative name."
:type '(choice (const :tag "Default" "tree-widget")
(const :tag "With the library" nil)
(const :tag "Where is this library" nil)
(directory :format "%{%t%}:\n%v"))
:group 'tree-widget)
(defcustom tree-widget-theme nil
"*Name of the theme where to look up for images.
It must be a sub directory in the directories specified in variable
`tree-widget-themes-directory'. The default theme is \"default\".
When an image is not found in a theme, it is searched in the parent
theme.
"*Name of the theme in which to look for images.
This is a sub directory of the themes directory specified by the
`tree-widget-themes-directory' option.
The default theme is \"default\". When an image is not found in a
theme, it is searched in its parent theme.
A complete theme must at least contain images with these file names
with a supported extension (see also `tree-widget-image-formats'):

View file

@ -1,3 +1,41 @@
2006-03-16 Richard Stallman <rms@gnu.org>
* display.texi (Defining Images): Minor cleanup.
2006-03-16 Bill Wohler <wohler@newt.com>
* display.texi (Defining Images): In image-load-path-for-library,
prefer user's images.
2006-03-15 Stefan Monnier <monnier@iro.umontreal.ca>
* modes.texi (Region to Fontify): Remove font-lock-lines-before.
2006-03-15 Bill Wohler <wohler@newt.com>
* 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
it if previously defined.
2006-03-14 Bill Wohler <wohler@newt.com>
* display.texi (Defining Images): In image-load-path-for-library,
always return list of directories. Update example.
2006-03-14 Alan Mackenzie <acm@muc.de>
* modes.texi: New node, "Region to Fontify" (for Font Lock).
This describes font-lock-extend-region-function.
("Other Font Lock Variables"): Move "font-lock-lines-before" to
the new node "Region to Fontify".
2006-03-13 Richard Stallman <rms@gnu.org>
* display.texi (Invisible Text): The impossible position is
now before the invisible text, not after.
(Defining Images): Clean up last change.
2006-03-11 Bill Wohler <wohler@newt.com>
* display.texi (Defining Images): Add image-load-path-for-library.
@ -86,9 +124,9 @@
2006-02-16 Johan Bockg,Ae(Brd <bojohan@dd.chalmers.se>
* display.texi (Other Display Specs, Image Descriptors): Revert
erroneous changes. The previous description of image-descriptors
as `(image . PROPS)' was correct.
* display.texi (Other Display Specs, Image Descriptors):
Revert erroneous changes. The previous description of
image-descriptors as `(image . PROPS)' was correct.
2006-02-14 Richard M. Stallman <rms@gnu.org>
@ -139,8 +177,8 @@
2006-01-29 Chong Yidong <cyd@stupidchicken.com>
* display.texi (Other Display Specs, Image Descriptors): Image
description is a list, not a cons cell.
* display.texi (Other Display Specs, Image Descriptors):
Image description is a list, not a cons cell.
2006-01-28 Luc Teirlinck <teirllm@auburn.edu>

View file

@ -800,15 +800,15 @@ explicitly ignore invisible newlines if
@code{line-move-ignore-invisible} is non-@code{nil} (the default), but
only because they are explicitly programmed to do so.
However, if a command ends with point inside or immediately after
However, if a command ends with point inside or immediately before
invisible text, the main editing loop moves point further forward or
further backward (in the same direction that the command already moved
it) until that condition is no longer true. Thus, if the command
moved point back into an invisible range, Emacs moves point back to
the beginning of that range, following the previous visible character.
If the command moved point forward into an invisible range, Emacs
moves point forward past the first visible character that follows the
invisible text.
the beginning of that range, and then back one more character. If the
command moved point forward into an invisible range, Emacs moves point
forward up to the first visible character that follows the invisible
text.
Incremental search can make invisible overlays visible temporarily
and/or permanently when a match includes invisible text. To enable
@ -4127,30 +4127,35 @@ should specify the image as follows:
@defun image-load-path-for-library library image &optional path no-error
@tindex image-load-path-for-library
Return a suitable search path for images relative to @var{library}.
This function returns a suitable search path for images used by the
Lisp package @var{library}.
Images for @var{library} are searched for in @file{../../etc/images}
and @file{../etc/images} relative to the files in
@file{lisp/@var{library}} as well as in @code{image-load-path} and
@var{load-path}.
It searches for @var{image} in @code{image-load-path} (excluding
@file{@code{data-directory}/images}) and @code{load-path}, followed by
a path suitable for @var{library}, which includes
@file{../../etc/images} and @file{../etc/images} relative to the
library file itself, and then in @file{@code{data-directory}/images}.
This function returns the value of @code{load-path} augmented with the
directory containing @var{image}. If @var{path} is given, it is used
instead of @code{load-path}. If @code{path} is @code{t}, just return
the directory that contains @var{image}.
Then this function returns a list of directories which contains first
the directory in which @var{image} was found, followed by the value of
@code{load-path}. If @var{path} is given, it is used instead of
@code{load-path}.
If @var{no-error} is non-nil, this function returns @code{nil} if a
suitable path can't be found rather than signaling an error.
If @var{no-error} is non-@code{nil} and a suitable path can't be
found, don't signal an error. Instead, return a list of directories as
before, except that @code{nil} appears in place of the image directory.
Here is an example that uses a common idiom to provide compatibility
with versions of Emacs that lack the variable @code{image-load-path}:
@example
(let ((load-path
(image-load-path-for-library "mh-e" "mh-logo.xpm"))
(image-load-path
(image-load-path-for-library "mh-e" "mh-logo.xpm"
'image-load-path)))
;; Shush compiler.
(defvar image-load-path)
(let* ((load-path (image-load-path-for-library "mh-e" "mh-logo.xpm"))
(image-load-path (cons (car load-path)
(when (boundp 'image-load-path)
image-load-path))))
(mh-tool-bar-folder-buttons-init))
@end example
@end defun

View file

@ -2337,6 +2337,8 @@ 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.
@ -2717,6 +2719,36 @@ 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
@ -2772,14 +2804,6 @@ arguments, the beginning and end of the region. The default value is
@code{font-lock-default-unfontify-region}.
@end defvar
@defvar font-lock-lines-before
This variable specifies the number of extra lines to consider when
refontifying the buffer after each text change. Font lock begins
refontifying from that number of lines before the changed region. The
default is 0, but using a larger value can be useful for coping with
multi-line patterns.
@end defvar
@ignore
@defvar font-lock-inhibit-thing-lock
List of Font Lock mode related modes that should not be turned on.

View file

@ -1,3 +1,56 @@
2006-03-17 Bill Wohler <wohler@newt.com>
* mh-e.texi: Use smallexample and smalllisp consistenly.
(Sending Mail Tour): Update method of entering
addresses and subject.
(Sending Mail Tour, Reading Mail Tour, Processing Mail Tour)
(Adding Attachments, Searching): Update screenshots for Emacs 22.
2006-03-16 Luc Teirlinck <teirllm@auburn.edu>
* emacs-xtra.texi (Top): Avoid ugly continuation line in
menu in the standalone Info reader.
2006-03-15 Chong Yidong <cyd@stupidchicken.com>
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
moved here from Emacs manual.
* programs.texi (Fortran): Section moved to emacs-xtra.
(Program Modes): Xref to Fortran in emacs-xtra.
* maintaining.texi (Emerge): Moved to emacs-xtra.
* files.texi (Comparing Files): Xref to Emerge in emacs-xtra.
* picture.texi: File deleted.
* Makefile.in:
* makefile.w32-in: Remove picture.texi.
* text.texi (Text): Xref to Picture Mode in emacs-xtra.
* abbrevs.texi (Abbrevs):
* sending.texi (Sending Mail): Picture node removed.
* emacs.texi (Top): Update node listings.
2006-03-15 Carsten Dominik <dominik@science.uva.nl>
* org.texi: Version number change only.
2006-03-14 Bill Wohler <wohler@newt.com>
* mh-e.texi: Add index entries around each paragraph rather than
depend on entries from beginning of node. Doing so ensures that
index entries are less likely to be forgotten if text is cut and
pasted, and are necessary anyway if the references are on a
separate page. It seems that makeinfo is now (v. 4.8) only
producing one index entry per node, so there is no longer any
excuse not to. Use subheading instead of heading. The incorrect
use of heading produced very large fonts in Info--as large as the
main heading.
(From Bill Wohler): MH-E never did appear in Emacs 21--MH-E
versions 6 and 7 appeared *around* the time of these Emacs
releases.
2006-03-13 Carsten Dominik <dominik@science.uva.nl>
* org.texi (Clean view): Document new startup options.

View file

@ -89,7 +89,6 @@ EMACSSOURCES= \
${srcdir}/building.texi \
${srcdir}/maintaining.texi \
${srcdir}/abbrevs.texi \
${srcdir}/picture.texi \
${srcdir}/sending.texi \
${srcdir}/rmail.texi \
${srcdir}/dired.texi \

View file

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

File diff suppressed because it is too large Load diff

View file

@ -103,8 +103,6 @@ Text Mode
Outline Mode
@TeX{} Mode
Formatted Text
Fortran Mode
Fortran Indentation
Shell Command History
The ones for Dired and Rmail have had the items turned into :: items
@ -182,8 +180,6 @@ Advanced Features
* Maintaining:: Features for maintaining large programs.
* Abbrevs:: How to define text abbreviations to reduce
the number of characters you must type.
* Picture:: Editing pictures made up of characters
using the quarter-plane screen model.
* Sending Mail:: Sending mail in Emacs.
* Rmail:: Reading mail in Emacs.
* Dired:: You can ``edit'' a directory to manage files in it.
@ -525,7 +521,6 @@ Editing Programs
* Misc for Programs:: Other Emacs features useful for editing programs.
* C Modes:: Special commands of C, C++, Objective-C,
Java, and Pike modes.
* Fortran:: Fortran mode and its special features.
* Asm Mode:: Asm mode and its special features.
Top-Level Definitions, or Defuns
@ -572,15 +567,6 @@ C and Related Modes
* Other C Commands:: Filling comments, viewing expansion of macros,
and other neat features.
Fortran Mode
* Fortran Motion:: Moving point by statements or subprograms.
* Fortran Indent:: Indentation commands for Fortran.
* Fortran Comments:: Inserting and aligning comments.
* Fortran Autofill:: Auto fill minor mode for Fortran.
* Fortran Columns:: Measuring columns for valid Fortran.
* Fortran Abbrev:: Built-in abbrevs for Fortran keywords.
Compiling and Testing Programs
* Compilation:: Compiling programs in languages other
@ -615,7 +601,6 @@ Maintaining Large Programs
* Format of ChangeLog:: What the change log file looks like.
* Tags:: Go direct to any function in your program in one
command. Tags remembers which file it is in.
* Emerge:: A convenient way of merging two versions of a program.
Tags Tables
@ -627,19 +612,6 @@ Tags Tables
* Tags Search:: Using a tags table for searching and replacing.
* List Tags:: Listing and finding tags defined in a file.
Merging Files with Emerge
* Overview of Emerge:: How to start Emerge. Basic concepts.
* Submodes of Emerge:: Fast mode vs. Edit mode.
Skip Prefers mode and Auto Advance mode.
* State of Difference:: You do the merge by specifying state A or B
for each difference.
* Merge Commands:: Commands for selecting a difference,
changing states of differences, etc.
* Exiting Emerge:: What to do when you've finished the merge.
* Combining in Emerge:: How to keep both alternatives for a difference.
* Fine Points of Emerge:: Misc.
Abbrevs
* Abbrev Concepts:: Fundamentals of defined abbrevs.
@ -650,14 +622,6 @@ Abbrevs
* Dynamic Abbrevs:: Abbreviations for words already in the buffer.
* Dabbrev Customization:: What is a word, for dynamic abbrevs. Case handling.
Editing Pictures
* Basic Picture:: Basic concepts and simple commands of Picture Mode.
* Insert in Picture:: Controlling direction of cursor motion
after "self-inserting" characters.
* Tabs in Picture:: Various features for tab stops and indentation.
* Rectangles in Picture:: Clearing and superimposing rectangles.
Sending Mail
* Mail Format:: Format of the mail being composed.
@ -1179,7 +1143,6 @@ shell commands.
@include building.texi
@include maintaining.texi
@include abbrevs.texi
@include picture.texi
@include sending.texi
@include rmail.texi
@include dired.texi

View file

@ -3037,8 +3037,8 @@ typically the result of a failed merge from a version control system
mode provides commands to resolve conflicts by selecting specific
changes.
See also @ref{Emerge}, and @ref{Top,,, ediff, The Ediff Manual}, for
convenient facilities for merging two similar files.
@inforef{Emerge,, emacs-xtra} for the Emerge facility, which
provides a powerful interface for merging files.
@node Misc File Ops
@section Miscellaneous File Operations

View file

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

View file

@ -90,7 +90,6 @@ EMACSSOURCES= \
$(srcdir)/building.texi \
$(srcdir)/maintaining.texi \
$(srcdir)/abbrevs.texi \
$(srcdir)/picture.texi \
$(srcdir)/sending.texi \
$(srcdir)/rmail.texi \
$(srcdir)/dired.texi \

File diff suppressed because it is too large Load diff

View file

@ -4,7 +4,7 @@
@setfilename ../info/org
@settitle Org Mode Manual
@set VERSION 4.09
@set VERSION 4.10
@set DATE March 2006
@dircategory Emacs

View file

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

View file

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

View file

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

View file

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

View file

@ -1,10 +1,64 @@
Building and Installing Emacs
on Windows NT/2K/XP and Windows 95/98/ME
Copyright (C) 2001, 2002, 2003, 2004, 2005,
2006 Free Software Foundation, Inc.
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
See the end of the file for copying permissions.
* For the impatient
Here are the concise instructions for configuring and building the
native Win32 binary of Emacs on Windows, for those who want to skip
the complex explanations and ``just do it'':
1. Change to the `nt' directory (the directory of this file):
cd nt
2. Run configure.bat. From the COMMAND.COM/CMD.EXE command prompt:
configure
from a Unixy shell prompt:
cmd /c configure.bat
or
command.com /c configure.bat
3. Run the Make utility suitable for your environment. If you build
with the Microsoft's Visual C compiler:
nmake
For the development environments based on GNU GCC (MinGW, MSYS,
Cygwin), depending on how Make is called, it could be:
make
or
gnumake
or
gmake
(If you are building from CVS, say "make bootstrap" or "nmake
bootstrap" instead.)
4. Generate the Info manuals (only if you are building out of CVS):
make info
(change "make" to "nmake" if you use MSVC).
5. Install the produced binaries:
make install
That's it!
If these short instructions somehow fail, read the rest of this
file.
* Preliminaries
If you used WinZip to unpack the distribution, we suggest to
remove the files and unpack again with a different program!
WinZip is known to create some subtle and hard to debug problems,
@ -28,6 +82,8 @@
"touch.exe" in your path, and that it will create files that do not
yet exist.
* Supported development environments
To compile Emacs, you will need either Microsoft Visual C++ 2.0 or
later and nmake, or a Windows port of GCC 2.95 or later with MinGW
and W32 API support and a port of GNU Make. You can use the Cygwin
@ -35,6 +91,11 @@
build (latest versions of the Cygwin toolkit, at least since v1.3.3,
include the MinGW headers and libraries as an integral part).
The rest of this file assumes you have a working development
environment. If you just installed such an environment, try
building a trivial C "Hello world" program, and see if it works. If
it doesn't work, resolve that problem first!
If you use the MinGW port of GCC and GNU Make to build Emacs, there
are some compatibility issues wrt Make and the shell that is run by
Make, either the standard COMMAND.COM/CMD.EXE supplied with Windows
@ -90,33 +151,38 @@
and other useful Posix utilities can be obtained from one of several
projects:
* http://gnuwin32.sourceforge.net/ ( GnuWin32 )
* http://www.mingw.org/ ( MinGW )
* http://www.cygwin.com/ ( Cygwin )
* http://unxutils.sourceforge.net/ ( UnxUtils )
* http://gnuwin32.sourceforge.net/ ( GnuWin32 )
If you build Emacs on Windows 9X or ME, not on Windows 2K/XP or
Windows NT, we suggest to install the Cygwin port of Bash.
Windows NT, we suggest to install the Cygwin port of Bash. That is
because the native Windows shell COMMAND.COM is too limited; the
Emacs build procedure tries very hard to support even such limited
shells, but as none of the Windows developers of Emacs work on
Windows 9x, we cannot guarantee that it works without a more
powerful shell.
Additional instructions and help for building Emacs on Windows can be
found at the Emacs Wiki:
http://www.emacswiki.org/cgi-bin/wiki/WThirtyTwoInstallationKit
http://www.emacswiki.org/cgi-bin/wiki/WThirtyTwoInstallationKit
and at this URL:
http://ourcomments.org/Emacs/w32-build-emacs.html
http://ourcomments.org/Emacs/w32-build-emacs.html
* Configuring
Configuration of Emacs is now handled by running configure.bat in the
nt subdirectory. It will detect which compiler you have available,
`nt' subdirectory. It will detect which compiler you have available,
and generate makefiles accordingly. You can override the compiler
detection, and control optimization and debug settings, by specifying
options on the command line when invoking configure.
To configure Emacs to build with GCC or MSVC, whichever is available,
simply change to the nt subdirectory and run `configure' with no
simply change to the `nt' subdirectory and run `configure.bat' with no
options. To see what options are available, run `configure --help'.
N.B. It is normal to see a few error messages output while configure
@ -169,7 +235,8 @@
After running configure, simply run the appropriate `make' program for
your compiler to build Emacs. For MSVC, this is nmake; for GCC, it is
GNU make.
GNU make. (If you are building out of CVS, say "make bootstrap" or
"nmake bootstrap" instead.)
As the files are compiled, you will see some warning messages
declaring that some functions don't return a value, or that some data
@ -177,6 +244,13 @@
The warnings may be fixed in the main FSF source at some point, but
until then we will just live with them.
If you are building from CVS, the following commands will produce
the Info manuals (which are not part of the CVS repository):
make info
or
nmake info
* Installing
To install Emacs after it has compiled, simply run `nmake install'

View file

@ -1,7 +1,96 @@
2006-03-18 Chong Yidong <cyd@stupidchicken.com>
* xterm.c (x_display_ok): Fix minor bug and compilation warnings.
2006-03-18 Nozomu Ando <nand@mac.com>
* m/pmax.h (BROKEN_NOCOMBRELOC) [__NetBSD__]: Define.
(LIB_STANDARD, START_FILES) [__NetBSD__]: Don't define.
(START_FILES, RUN_TIME_REMAP, UNEXEC) [__NetBSD__, __OpenBSD__]:
Don't redefine.
* m/mips.h: Don't use unexmips on NetBSD.
(LIBS_MACHINE): Move definition lower, so it doesn't use
LD_SWITCH_MACHINE, START_FILES, LIB_STANDARD, LIBS_TERMCAP,
C_SWITCH_MACHINE, and C_DEBUG_SWITCH.
* unexelf.c [BROKEN_NOCOMBRELOC]: Include assert.h.
(unexec) [BROKEN_NOCOMBRELOC]: Handle platforms whose nocombreloc
option is broken (e.g., MIPS/NetBSD).
2006-03-18 Craig McDaniel <craigmcd@gmail.com> (tiny change)
* sheap.c (STATIC_HEAP_SIZE): Enlarge STATIC_HEAP_SIZE to 12MB.
Remove the HAVE_X_WINDOWS conditional.
2006-03-18 Vivek Dasmohapatra <vivek@etla.org> (tiny change)
* emacs.c (main): If user asks for a display that is unavailable,
simulate -nw.
* xterm.c (x_display_ok): New function.
* xterm.h: Add prototype for x_display_ok.
2006-03-18 Eli Zaretskii <eliz@gnu.org>
* w32fns.c (Fw32_select_font): Doc fix.
2006-03-16 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* image.c [MAC_OS] (XPutPixel, XGetPixel)
[!WORDS_BIG_ENDIAN && USE_CG_DRAWING]: Don't use specialized
version when depth is 32.
(mac_create_cg_image_from_image) [MAC_OS && USE_CG_DRAWING]: New
function.
(prepare_image_for_display) [MAC_OS && USE_CG_DRAWING]: Use it.
(x_clear_image_1) [MAC_OS && USE_CG_DRAWING]: Release CGImage.
* macterm.c (XCreatePixmap) [!WORDS_BIG_ENDIAN && USE_CG_DRAWING]:
Create GWorld in ARGB pixel format.
(mac_copy_area, mac_copy_area_with_mask) [USE_CG_DRAWING]: Remove
functions.
(x_draw_image_foreground) [USE_CG_DRAWING]: Use mac_draw_cg_image
instead of mac_copy_area/mac_copy_area_with_mask.
2006-03-15 Kim F. Storm <storm@cua.dk>
* xdisp.c (extend_face_to_end_of_line): Always add space glyph to
empty row. Fixes memory corruption revealed by 2006-03-02 change.
(display_tool_bar_line): Skip empty tool-bar line if HEIGHT < 0.
(tool_bar_lines_needed): Fix tool-bar display in case the tool-bar
width is exactly the same as the window width. Don't count a final
empty tool-bar line (pass HEIGHT = -1 to display_tool_bar_line).
2006-03-15 Juanma Barranquero <lekktu@gmail.com>
* fringe.c (w32_init_fringe, w32_reset_fringes): Revert to being
conditional on HAVE_NTGUI, not WINDOWS_NT.
2006-03-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* dispextern.h (mac_init_fringe) [MAC_OS]: Add prototype.
* fringe.c (mac_init_fringe) [MAC_OS]: New function.
* macterm.c (mac_initialize) [USE_CG_DRAWING]: Call mac_init_fringe.
(max_fringe_bmp, fringe_bmp) [USE_CG_DRAWING]: New variables.
(mac_define_fringe_bitmap, mac_destroy_fringe_bitmap)
(mac_draw_cg_image) [USE_CG_DRAWING]: New functions.
(mac_draw_bitmap) [USE_CG_DRAWING]: Remove function.
(x_draw_fringe_bitmap) [USE_CG_DRAWING]: Use mac_draw_cg_image
instead of mac_draw_bitmap.
(x_redisplay_interface) [USE_CG_DRAWING]: Set handlers for
define_fringe_bitmap and destroy_fringe_bitmap.
2006-03-14 Chong Yidong <cyd@stupidchicken.com>
* xterm.c (x_uncatch_errors): Block input for entire function.
2006-03-12 Jason Rumney <jasonr@gnu.org>
* w32fns.c (Fx_create_frame): Remove call to
Qface_set_after_frame_default. (from xfns.c 2003-05-26)
Qface_set_after_frame_default (from xfns.c 2003-05-26).
* w32menu.c (Fx_popup_menu): Call w32_free_menu_strings when
finished with the menu.
@ -11,7 +100,7 @@
(note_mouse_movement): Say mouse moved if current frame differs
from last_mouse_glyph_frame, and update last_mouse_glyph_frame.
(w32_mouse_position): Set last_mouse_glyph_frame.
Remove OLD_REDISPLAY_CODE block.
Remove OLD_REDISPLAY_CODE block.
2006-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
@ -189,7 +278,7 @@
* xdisp.c: Minimize the unpleasent visual impact of the requirement
that non-toolkit tool-bars must occupy an integral number of screen
lines, by distributing the rows evenly over the tool-bar screen area.
lines, by distributing the rows evenly over the tool-bar screen area.
(Vtool_bar_border): New variable.
(syms_of_xdisp): DEFVAR_LISP it.
(display_tool_bar_line): Add HEIGHT arg for desired row height.
@ -223,9 +312,9 @@
* xterm.h, xterm.c (x_uncatch_errors): Delete unneccessary argument.
* xterm.c: (x_load_font, x_term_init, XTmouse_position)
(handle_one_xevent, x_connection_closed, x_list_fonts): No arg for
x_uncatch_errors.
* xterm.c (x_load_font, x_term_init, XTmouse_position)
(handle_one_xevent, x_connection_closed, x_list_fonts):
No arg for x_uncatch_errors.
* xselect.c (x_own_selection, x_decline_selection_request)
(x_reply_selection_request, x_get_foreign_selection)
@ -353,7 +442,7 @@
* fringe.c (syms_of_fringe) <fringe-bitmaps>: Doc fix.
2006-02-21 Zhang Wei <brep@newsmth.org>
2006-02-21 Zhang Wei <brep@newsmth.org>
* xfns.c (Fx_file_dialog, Motif and GTK): DECODE_FILE before
returning it.
@ -422,7 +511,7 @@
(draw_fringe_bitmap_1): Make static.
(get_logical_cursor_bitmap, get_logical_fringe_bitmap): New functions
to map from logical cursors and indicators to physical bitmaps.
(draw_fringe_bitmap): Resolve fringe cursor and overlay-arrow
(draw_fringe_bitmap): Resolve fringe cursor and overlay-arrow
bitmaps using symbol names instead of bitmap numbers.
(update_window_fringes): Use logical indicator symbol names
instead of bitmap numbers for logical. Add bitmap cache.

View file

@ -2729,6 +2729,9 @@ void compute_fringe_widths P_ ((struct frame *, int));
void w32_init_fringe P_ ((void));
void w32_reset_fringes P_ ((void));
#endif
#ifdef MAC_OS
void mac_init_fringe P_ ((void));
#endif
/* Defined in image.c */

View file

@ -53,6 +53,10 @@ Boston, MA 02110-1301, USA. */
#include "buffer.h"
#include "window.h"
#ifdef HAVE_X_WINDOWS
#include "xterm.h"
#endif
#include "systty.h"
#include "blockinput.h"
#include "syssignal.h"
@ -1486,6 +1490,14 @@ main (argc, argv
/* Don't actually discard this arg. */
skip_args = count_before;
/* Do not be lenient if the user explicitly asked for a named display. */
if (display_arg != 1 && !x_display_ok (displayname))
{
fprintf (stderr, "Display %s unavailable, simulating -nw\n",
displayname);
inhibit_window_system = 1;
}
}
#endif

View file

@ -1689,10 +1689,14 @@ init_fringe ()
}
}
#ifdef HAVE_NTGUI
#if defined (HAVE_NTGUI) || defined (MAC_OS)
void
#ifdef HAVE_NTGUI
w32_init_fringe ()
#else /* MAC_OS */
mac_init_fringe ()
#endif
{
int bt;
@ -1705,7 +1709,9 @@ w32_init_fringe ()
rif->define_fringe_bitmap (bt, fb->bits, fb->height, fb->width);
}
}
#endif
#ifdef HAVE_NTGUI
void
w32_reset_fringes ()
{

View file

@ -189,6 +189,7 @@ XPutPixel (ximage, x, y, pixel)
PixMapHandle pixmap = GetGWorldPixMap (ximage);
short depth = GetPixDepth (pixmap);
#if defined (WORDS_BIG_ENDIAN) || !USE_CG_DRAWING
if (depth == 32)
{
char *base_addr = GetPixBaseAddr (pixmap);
@ -196,7 +197,9 @@ XPutPixel (ximage, x, y, pixel)
((unsigned long *) (base_addr + y * row_bytes))[x] = 0xff000000 | pixel;
}
else if (depth == 1)
else
#endif
if (depth == 1)
{
char *base_addr = GetPixBaseAddr (pixmap);
short row_bytes = GetPixRowBytes (pixmap);
@ -233,6 +236,7 @@ XGetPixel (ximage, x, y)
PixMapHandle pixmap = GetGWorldPixMap (ximage);
short depth = GetPixDepth (pixmap);
#if defined (WORDS_BIG_ENDIAN) || !USE_CG_DRAWING
if (depth == 32)
{
char *base_addr = GetPixBaseAddr (pixmap);
@ -240,7 +244,9 @@ XGetPixel (ximage, x, y)
return ((unsigned long *) (base_addr + y * row_bytes))[x] & 0x00ffffff;
}
else if (depth == 1)
else
#endif
if (depth == 1)
{
char *base_addr = GetPixBaseAddr (pixmap);
short row_bytes = GetPixRowBytes (pixmap);
@ -272,6 +278,49 @@ XDestroyImage (ximg)
{
UnlockPixels (GetGWorldPixMap (ximg));
}
#if USE_CG_DRAWING
static CGImageRef
mac_create_cg_image_from_image (f, img)
struct frame *f;
struct image *img;
{
Pixmap mask;
CGImageRef result = NULL;
BLOCK_INPUT;
if (img->mask)
mask = img->mask;
else
{
mask = XCreatePixmap (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
img->width, img->height, 1);
if (mask)
{
CGrafPtr old_port;
GDHandle old_gdh;
Rect r;
GetGWorld (&old_port, &old_gdh);
SetGWorld (mask, NULL);
BackColor (blackColor); /* Don't mask. */
SetRect (&r, 0, 0, img->width, img->height);
EraseRect (&r);
SetGWorld (old_port, old_gdh);
}
}
if (mask)
{
CreateCGImageFromPixMaps (GetGWorldPixMap (img->pixmap),
GetGWorldPixMap (mask), &result);
if (mask != img->mask)
XFreePixmap (FRAME_X_DISPLAY (f), mask);
}
UNBLOCK_INPUT;
return result;
}
#endif /* USE_CG_DRAWING */
#endif /* MAC_OS */
@ -1206,6 +1255,18 @@ prepare_image_for_display (f, img)
type dependent loader function. */
if (img->pixmap == NO_PIXMAP && !img->load_failed_p)
img->load_failed_p = img->type->load (f, img) == 0;
#if defined (MAC_OS) && USE_CG_DRAWING
if (!img->load_failed_p && img->data.ptr_val == NULL)
{
img->data.ptr_val = mac_create_cg_image_from_image (f, img);
if (img->data.ptr_val == NULL)
{
img->load_failed_p = 1;
img->type->free (f, img);
}
}
#endif
}
@ -1452,6 +1513,14 @@ x_clear_image_1 (f, img, pixmap_p, mask_p, colors_p)
img->colors = NULL;
img->ncolors = 0;
}
#if defined (MAC_OS) && USE_CG_DRAWING
if (img->data.ptr_val)
{
CGImageRelease (img->data.ptr_val);
img->data.ptr_val = NULL;
}
#endif
}
/* Free X resources of image IMG which is used on frame F. */

View file

@ -112,10 +112,10 @@ NOTE-END */
/* This machine requires completely different unexec code
which lives in a separate file. Specify the file name. */
#ifndef __linux__
#if !defined(__linux__) && !defined(__NetBSD__)
#undef UNEXEC
#define UNEXEC unexmips.o
#endif /* not __linux__ */
#endif /* not __linux__ && not __NetBSD__ */
/* Describe layout of the address space in an executing process. */
@ -142,14 +142,6 @@ NOTE-END */
#if defined (__NetBSD__) || defined (__OpenBSD__)
#else /* bsd with elf */
#define LINKER /bsd43/bin/ld
#endif /* bsd with elf */
#else /* not BSD_SYSTEM */
#if defined(__GNUC__) && defined(_ABIN32)
#define LIBS_MACHINE
#else
#define LIBS_MACHINE -lmld
#endif
#define LD_SWITCH_MACHINE -D 800000 -g3
#define START_FILES pre-crt0.o /usr/lib/crt1.o
@ -159,6 +151,15 @@ NOTE-END */
#define C_SWITCH_MACHINE -I/usr/include/bsd
#define C_DEBUG_SWITCH -O -g3
#endif /* bsd with elf */
#else /* not BSD_SYSTEM */
#if defined(__GNUC__) && defined(_ABIN32)
#define LIBS_MACHINE
#else
#define LIBS_MACHINE -lmld
#endif
#endif /* not BSD_SYSTEM */
#endif /* not NEWSOS5 && not __linux__ */

View file

@ -13,8 +13,12 @@ NOTE-END */
#ifndef __MIPSEB__
#undef WORDS_BIG_ENDIAN
#endif
#if defined (__NetBSD__)
#define BROKEN_NOCOMBRELOC
#else
#undef LIB_STANDARD
#undef START_FILES
#endif
#undef COFF
#undef TERMINFO
#define MAIL_USE_FLOCK
@ -24,18 +28,12 @@ NOTE-END */
#ifdef MACH
#define START_FILES pre-crt0.o /usr/lib/crt0.o
#else
#if !defined (__NetBSD__)
/* This line starts being needed with ultrix 4.0. */
/* You must delete it for version 3.1. */
#define START_FILES pre-crt0.o /usr/lib/cmplrs/cc/crt0.o
#endif
#if defined (__NetBSD__) || defined (__OpenBSD__)
#undef START_FILES
#define START_FILES pre-crt0.o /usr/lib/crt0.o
#undef RUN_TIME_REMAP
#undef UNEXEC
#define UNEXEC unexelf.o
#endif /* NetBSD || OpenBSD */
#endif
/* Supposedly the following will overcome a kernel bug. */
#undef LD_SWITCH_MACHINE

View file

@ -283,6 +283,11 @@ extern void menubar_selection_callback (FRAME_PTR, int);
#if USE_CG_DRAWING
#define FRAME_CG_CONTEXT(f) ((f)->output_data.mac->cg_context)
/* Fringe bitmaps. */
static int max_fringe_bmp = 0;
static CGImageRef *fringe_bmp = 0;
static CGContextRef
mac_begin_cg_clip (f, gc)
struct frame *f;
@ -511,6 +516,44 @@ mac_clear_window (f)
/* Mac replacement for XCopyArea. */
#if USE_CG_DRAWING
static void
mac_draw_cg_image (image, f, gc, src_x, src_y, width, height,
dest_x, dest_y, overlay_p)
CGImageRef image;
struct frame *f;
GC gc;
int src_x, src_y;
unsigned int width, height;
int dest_x, dest_y, overlay_p;
{
CGContextRef context;
float port_height = FRAME_PIXEL_HEIGHT (f);
CGRect dest_rect = CGRectMake (dest_x, dest_y, width, height);
context = mac_begin_cg_clip (f, gc);
if (!overlay_p)
{
CG_SET_FILL_COLOR (context, gc->xgcv.background);
CGContextFillRect (context, dest_rect);
}
CGContextClipToRect (context, dest_rect);
CGContextScaleCTM (context, 1, -1);
CGContextTranslateCTM (context, 0, -port_height);
if (CGImageIsMask (image))
CG_SET_FILL_COLOR (context, gc->xgcv.foreground);
CGContextDrawImage (context,
CGRectMake (dest_x - src_x,
port_height - (dest_y - src_y
+ CGImageGetHeight (image)),
CGImageGetWidth (image),
CGImageGetHeight (image)),
image);
mac_end_cg_clip (f);
}
#else /* !USE_CG_DRAWING */
static void
mac_draw_bitmap (f, gc, x, y, width, height, bits, overlay_p)
struct frame *f;
@ -526,9 +569,6 @@ mac_draw_bitmap (f, gc, x, y, width, height, bits, overlay_p)
bitmap.baseAddr = (char *)bits;
SetRect (&(bitmap.bounds), 0, 0, width, height);
#if USE_CG_DRAWING
mac_prepare_for_quickdraw (f);
#endif
SetPortWindowPort (FRAME_MAC_WINDOW (f));
RGBForeColor (GC_FORE_COLOR (gc));
@ -554,6 +594,7 @@ mac_draw_bitmap (f, gc, x, y, width, height, bits, overlay_p)
RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f)));
}
#endif /* !USE_CG_DRAWING */
/* Mac replacement for XCreateBitmapFromBitmapData. */
@ -614,7 +655,15 @@ XCreatePixmap (display, w, width, height, depth)
SetPortWindowPort (w);
SetRect (&r, 0, 0, width, height);
err = NewGWorld (&pixmap, depth, &r, NULL, NULL, 0);
#if !defined (WORDS_BIG_ENDIAN) && USE_CG_DRAWING
if (depth == 1)
#endif
err = NewGWorld (&pixmap, depth, &r, NULL, NULL, 0);
#if !defined (WORDS_BIG_ENDIAN) && USE_CG_DRAWING
else
/* CreateCGImageFromPixMaps requires ARGB format. */
err = QTNewGWorld (&pixmap, k32ARGBPixelFormat, &r, NULL, NULL, 0);
#endif
if (err != noErr)
return NULL;
return pixmap;
@ -1297,6 +1346,7 @@ mac_draw_image_string_cg (f, gc, x, y, buf, nchars, bg_width)
#endif
#if !USE_CG_DRAWING
/* Mac replacement for XCopyArea: dest must be window. */
static void
@ -1310,9 +1360,6 @@ mac_copy_area (src, f, gc, src_x, src_y, width, height, dest_x, dest_y)
{
Rect src_r, dest_r;
#if USE_CG_DRAWING
mac_prepare_for_quickdraw (f);
#endif
SetPortWindowPort (FRAME_MAC_WINDOW (f));
SetRect (&src_r, src_x, src_y, src_x + width, src_y + height);
@ -1357,9 +1404,6 @@ mac_copy_area_with_mask (src, mask, f, gc, src_x, src_y,
{
Rect src_r, dest_r;
#if USE_CG_DRAWING
mac_prepare_for_quickdraw (f);
#endif
SetPortWindowPort (FRAME_MAC_WINDOW (f));
SetRect (&src_r, src_x, src_y, src_x + width, src_y + height);
@ -1392,6 +1436,7 @@ mac_copy_area_with_mask (src, mask, f, gc, src_x, src_y,
RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f)));
}
#endif /* !USE_CG_DRAWING */
/* Mac replacement for XCopyArea: used only for scrolling. */
@ -2003,9 +2048,12 @@ x_draw_fringe_bitmap (w, row, p)
#endif
}
if (p->which)
if (p->which
#if USE_CG_DRAWING
&& p->which < max_fringe_bmp
#endif
)
{
unsigned short *bits = p->bits + p->dh;
XGCValues gcv;
XGetGCValues (display, face->gc, GCForeground, &gcv);
@ -2014,14 +2062,64 @@ x_draw_fringe_bitmap (w, row, p)
? (p->overlay_p ? face->background
: f->output_data.mac->cursor_pixel)
: face->foreground));
#if USE_CG_DRAWING
mac_draw_cg_image (fringe_bmp[p->which], f, face->gc, 0, p->dh,
p->wd, p->h, p->x, p->y, p->overlay_p);
#else
mac_draw_bitmap (f, face->gc, p->x, p->y,
p->wd, p->h, bits, p->overlay_p);
p->wd, p->h, p->bits + p->dh, p->overlay_p);
#endif
XSetForeground (display, face->gc, gcv.foreground);
}
mac_reset_clip_rectangles (display, face->gc);
}
#if USE_CG_DRAWING
static void
mac_define_fringe_bitmap (which, bits, h, wd)
int which;
unsigned short *bits;
int h, wd;
{
unsigned short *mask_bits;
int i;
CGDataProviderRef provider;
if (which >= max_fringe_bmp)
{
i = max_fringe_bmp;
max_fringe_bmp = which + 20;
fringe_bmp = (CGImageRef *) xrealloc (fringe_bmp, max_fringe_bmp * sizeof (CGImageRef));
while (i < max_fringe_bmp)
fringe_bmp[i++] = 0;
}
for (i = 0; i < h; i++)
bits[i] = ~bits[i];
provider = CGDataProviderCreateWithData (NULL, bits,
sizeof (unsigned short) * h, NULL);
if (provider)
{
fringe_bmp[which] = CGImageMaskCreate (wd, h, 1, 1,
sizeof (unsigned short),
provider, NULL, 0);
CGDataProviderRelease (provider);
}
}
static void
mac_destroy_fringe_bitmap (which)
int which;
{
if (which >= max_fringe_bmp)
return;
if (fringe_bmp[which])
CGImageRelease (fringe_bmp[which]);
fringe_bmp[which] = 0;
}
#endif
/* This is called when starting Emacs and when restarting after
@ -3193,15 +3291,26 @@ x_draw_image_foreground (s)
{
x_set_glyph_string_clipping (s);
#if USE_CG_DRAWING
mac_draw_cg_image (s->img->data.ptr_val,
s->f, s->gc, s->slice.x, s->slice.y,
s->slice.width, s->slice.height, x, y, 1);
#endif
if (s->img->mask)
#if !USE_CG_DRAWING
mac_copy_area_with_mask (s->img->pixmap, s->img->mask,
s->f, s->gc, s->slice.x, s->slice.y,
s->slice.width, s->slice.height, x, y);
#else
;
#endif
else
{
#if !USE_CG_DRAWING
mac_copy_area (s->img->pixmap,
s->f, s->gc, s->slice.x, s->slice.y,
s->slice.width, s->slice.height, x, y);
#endif
/* When the image has a mask, we can expect that at
least part of a mouse highlight or a block cursor will
@ -10913,8 +11022,13 @@ static struct redisplay_interface x_redisplay_interface =
x_get_glyph_overhangs,
x_fix_overlapping_area,
x_draw_fringe_bitmap,
#if USE_CG_DRAWING
mac_define_fringe_bitmap,
mac_destroy_fringe_bitmap,
#else
0, /* define_fringe_bitmap */
0, /* destroy_fringe_bitmap */
#endif
mac_per_char_metric,
mac_encode_char,
mac_compute_glyph_string_overhangs,
@ -10990,6 +11104,11 @@ mac_initialize ()
MakeMeTheFrontProcess ();
#endif
#endif
#if USE_CG_DRAWING
mac_init_fringe ();
#endif
UNBLOCK_INPUT;
}

View file

@ -26,11 +26,7 @@ Boston, MA 02110-1301, USA. */
#include <unistd.h>
#ifdef HAVE_X_WINDOWS
#define STATIC_HEAP_SIZE (8 * 1024 * 1024)
#else
#define STATIC_HEAP_SIZE (8 * 1024 * 1024)
#endif
#define STATIC_HEAP_SIZE (12 * 1024 * 1024)
int debug_sheap = 0;

View file

@ -433,6 +433,9 @@ extern void fatal (const char *msgid, ...);
#if __sgi
#include <syms.h> /* for HDRR declaration */
#endif /* __sgi */
#ifdef BROKEN_NOCOMBRELOC
#include <assert.h>
#endif
#ifndef MAP_ANON
#ifdef MAP_ANONYMOUS
@ -687,6 +690,9 @@ unexec (new_name, old_name, data_start, bss_start, entry_address)
int old_mdebug_index;
struct stat stat_buf;
int old_file_size;
#ifdef BROKEN_NOCOMBRELOC
int unreloc_sections[10], n_unreloc_sections;
#endif
/* Open the old file, allocate a buffer of the right size, and read
in the file contents. */
@ -1218,6 +1224,7 @@ unexec (new_name, old_name, data_start, bss_start, entry_address)
/* This loop seeks out relocation sections for the data section, so
that it can undo relocations performed by the runtime linker. */
#ifndef BROKEN_NOCOMBRELOC
for (n = new_file_h->e_shnum - 1; n; n--)
{
ElfW(Shdr) section = NEW_SECTION_H (n);
@ -1272,6 +1279,81 @@ unexec (new_name, old_name, data_start, bss_start, entry_address)
break;
}
}
#else /* BROKEN_NOCOMBRELOC */
for (n = 1, n_unreloc_sections = 0; n < new_file_h->e_shnum; n++)
if (!strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".data")
|| !strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".sdata")
|| !strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".lit4")
|| !strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".lit8")
#ifdef IRIX6_5 /* see above */
|| !strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".got")
#endif
|| !strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".sdata1")
|| !strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".data1"))
{
assert (n_unreloc_sections
< (sizeof (unreloc_sections) / sizeof (unreloc_sections[0])));
unreloc_sections[n_unreloc_sections++] = n;
#ifdef DEBUG
fprintf (stderr, "section %d: %s\n", n,
old_section_names + NEW_SECTION_H (n).sh_name);
#endif
}
for (n = new_file_h->e_shnum - 1; n; n--)
{
ElfW(Shdr) section = NEW_SECTION_H (n);
caddr_t reloc, end;
ElfW(Addr) addr, offset;
int target;
switch (section.sh_type)
{
default:
break;
case SHT_REL:
case SHT_RELA:
/* This code handles two different size structs, but there should
be no harm in that provided that r_offset is always the first
member. */
for (reloc = old_base + section.sh_offset,
end = reloc + section.sh_size;
reloc < end;
reloc += section.sh_entsize)
{
addr = ((ElfW(Rel) *) reloc)->r_offset;
#ifdef __alpha__
/* The Alpha ELF binutils currently have a bug that
sometimes results in relocs that contain all
zeroes. Work around this for now... */
if (addr == 0)
continue;
#endif
for (nn = 0; nn < n_unreloc_sections; nn++)
{
target = unreloc_sections[nn];
if (NEW_SECTION_H (target).sh_addr <= addr
&& addr < (NEW_SECTION_H (target).sh_addr +
NEW_SECTION_H (target).sh_size))
{
offset = (NEW_SECTION_H (target).sh_addr -
NEW_SECTION_H (target).sh_offset);
memcpy (new_base + addr - offset,
old_base + addr - offset,
sizeof (ElfW(Addr)));
#ifdef DEBUG
fprintf (stderr, "unrelocate: [%08lx] <= %08lx\n",
(long) addr,
(long) *((long *) (new_base + addr - offset)));
#endif
break;
}
}
}
break;
}
}
#endif /* BROKEN_NOCOMBRELOC */
/* Write out new_file, and free the buffers. */

View file

@ -7999,8 +7999,12 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */)
***********************************************************************/
DEFUN ("w32-select-font", Fw32_select_font, Sw32_select_font, 0, 2, 0,
doc: /* Select a font using the W32 font dialog.
Returns an X font string corresponding to the selection. */)
doc: /* Select a font for the named FRAME using the W32 font dialog.
Returns an X-style font string corresponding to the selection.
If FRAME is omitted or nil, it defaults to the selected frame.
If INCLUDE-PROPORTIONAL is non-nil, include proportional fonts
in the font selection dialog. */)
(frame, include_proportional)
Lisp_Object frame, include_proportional;
{

View file

@ -9544,7 +9544,12 @@ build_desired_tool_bar_string (f)
HEIGHT specifies the desired height of the tool-bar line.
If the actual height of the glyph row is less than HEIGHT, the
row's height is increased to HEIGHT, and the icons are centered
vertically in the new height. */
vertically in the new height.
If HEIGHT is -1, we are counting needed tool-bar lines, so don't
count a final empty row in case the tool-bar width exactly matches
the window width.
*/
static void
display_tool_bar_line (it, height)
@ -9568,7 +9573,12 @@ display_tool_bar_line (it, height)
/* Get the next display element. */
if (!get_next_display_element (it))
break;
{
/* Don't count empty row if we are counting needed tool-bar lines. */
if (height < 0 && !it->hpos)
return;
break;
}
/* Produce glyphs. */
x_before = it->current_x;
@ -9666,11 +9676,12 @@ tool_bar_lines_needed (f, n_rows)
{
it.glyph_row = w->desired_matrix->rows;
clear_glyph_row (it.glyph_row);
display_tool_bar_line (&it, 0);
display_tool_bar_line (&it, -1);
}
/* f->n_tool_bar_rows == 0 means "unknown"; -1 means no tool-bar. */
if (n_rows)
*n_rows = it.vpos;
*n_rows = it.vpos > 0 ? it.vpos : -1;
return (it.current_y + FRAME_LINE_HEIGHT (f) - 1) / FRAME_LINE_HEIGHT (f);
}
@ -9746,11 +9757,7 @@ redisplay_tool_bar (f)
reseat_to_string (&it, NULL, f->desired_tool_bar_string, 0, 0, 0, -1);
if (f->n_tool_bar_rows == 0)
{
(void)tool_bar_lines_needed (f, &f->n_tool_bar_rows);
if (f->n_tool_bar_rows == 0)
f->n_tool_bar_rows = -1;
}
(void)tool_bar_lines_needed (f, &f->n_tool_bar_rows);
/* Display as many lines as needed to display all tool-bar items. */
@ -15453,6 +15460,7 @@ extend_face_to_end_of_line (it)
face = FACE_FROM_ID (f, it->face_id);
if (FRAME_WINDOW_P (f)
&& it->glyph_row->displays_text_p
&& face->box == FACE_NO_BOX
&& face->background == FRAME_BACKGROUND_PIXEL (f)
&& !face->stipple)

View file

@ -7589,18 +7589,17 @@ x_uncatch_errors ()
{
struct x_error_message_stack *tmp;
BLOCK_INPUT;
/* The display may have been closed before this function is called.
Check if it is still open before calling XSync. */
if (x_display_info_for_display (x_error_message->dpy) != 0)
{
BLOCK_INPUT;
XSync (x_error_message->dpy, False);
UNBLOCK_INPUT;
}
XSync (x_error_message->dpy, False);
tmp = x_error_message;
x_error_message = x_error_message->prev;
xfree (tmp);
UNBLOCK_INPUT;
}
/* If any X protocol errors have arrived since the last call to
@ -10345,6 +10344,25 @@ get_bits_and_offset (mask, bits, offset)
*bits = nr;
}
int
x_display_ok (display)
const char * display;
{
int dpy_ok = 1;
Display *dpy;
if (!display)
display = getenv("DISPLAY");
if (!display)
return 0;
if ((dpy = XOpenDisplay (display)))
XCloseDisplay (dpy);
else
dpy_ok = 0;
return dpy_ok;
}
struct x_display_info *
x_term_init (display_name, xrm_option, resource_name)
Lisp_Object display_name;

View file

@ -423,6 +423,7 @@ extern struct x_display_info *x_display_info_for_display P_ ((Display *));
extern struct x_display_info *x_display_info_for_name P_ ((Lisp_Object));
extern struct x_display_info *x_term_init P_ ((Lisp_Object, char *, char *));
extern int x_display_ok P_ ((const char *));
extern Lisp_Object x_list_fonts P_ ((struct frame *, Lisp_Object, int, int));
extern void select_visual P_ ((struct x_display_info *));