Merged from miles@gnu.org--gnu-2005 (patch 80-82, 350-422)

Patches applied:

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-350
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-351
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-352
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-353
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-354
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-355
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-356
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-357
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-358
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-359
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-360
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-361
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-362
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-363
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-364
   Remove "-face" suffix from widget faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-365
   Remove "-face" suffix from custom faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-366
   Remove "-face" suffix from change-log faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-367
   Remove "-face" suffix from compilation faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-368
   Remove "-face" suffix from diff-mode faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-369
   lisp/longlines.el (longlines-visible-face): Face removed

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-370
   Remove "-face" suffix from woman faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-371
   Remove "-face" suffix from whitespace-highlight face

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-372
   Remove "-face" suffix from ruler-mode faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-373
   Remove "-face" suffix from show-paren faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-374
   Remove "-face" suffix from log-view faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-375
   Remove "-face" suffix from smerge faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-376
   Remove "-face" suffix from show-tabs faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-377
   Remove "-face" suffix from highlight-changes faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-378
   Remove "-face" suffix from and downcase info faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-379
   Remove "-face" suffix from pcvs faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-380
   Update uses of renamed pcvs faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-381
   Tweak ChangeLog

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-382
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-383
   Remove "-face" suffix from strokes-char face

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-384
   Remove "-face" suffix from compare-windows face

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-385
   Remove "-face" suffix from calendar faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-386
   Remove "-face" suffix from diary-button face

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-387
   Remove "-face" suffix from testcover faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-388
   Remove "-face" suffix from viper faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-389
   Remove "-face" suffix from org faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-390
   Remove "-face" suffix from sgml-namespace face

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-391
   Remove "-face" suffix from table-cell face

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-392
   Remove "-face" suffix from tex-mode faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-393
   Remove "-face" suffix from texinfo-heading face

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-394
   Remove "-face" suffix from flyspell faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-395
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-396
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-397
   Remove "-face" suffix from gomoku faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-398
   Remove "-face" suffix from mpuz faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-399
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-400
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-401
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-402
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-403
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-404
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-405
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-406
   Merge from gnus--rel--5.10

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-407
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-408
   Remove "-face" suffix from Buffer-menu-buffer face

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-409
   Remove "-face" suffix from antlr-mode faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-410
   Remove "-face" suffix from ebrowse faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-411
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-412
   Remove "-face" suffix from flymake faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-413
   Remove "-face" suffix from idlwave faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-414
   Remove "-face" suffix from sh-script faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-415
   Remove "-face" suffix from vhdl-mode faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-416
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-417
   Remove "-face" suffix from which-func face

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-418
   Remove "-face" suffix from cperl-mode faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-419
   Remove "-face" suffix from ld-script faces

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-420
   Fix cperl-mode font-lock problem

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-421
   Tweak which-func face

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-422
   Update from CVS

 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-80
   Merge from emacs--cvs-trunk--0

 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-81
   Update from CVS

 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-82
   Update from CVS

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-350
This commit is contained in:
Karoly Lorentey 2005-06-15 12:57:51 +00:00
commit ef85512e51
276 changed files with 9429 additions and 7488 deletions

View file

@ -1,3 +1,13 @@
2005-06-08 Steven Tamm <steventamm@mac.com>
* configure.in: Support Darwin/MacOSX on Intel
* configure: Regenerate.
2005-06-06 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
* configure.in (HAVE_CANCELMENUTRACKING): New test.
* configure: Regenerate.
2005-05-11 J,Ai(Br,At(Bme Marant <jmarant@marant.org> 2005-05-11 J,Ai(Br,At(Bme Marant <jmarant@marant.org>
* configure.in: Add --enable-locallisppath. * configure.in: Add --enable-locallisppath.

View file

@ -1,3 +1,13 @@
2005-06-10 Lute Kamstra <lute@gnu.org>
* admin.el (set-version): Set version in lisp manual too.
* make-tarball.txt: Commit lispref/elisp.texi too.
2005-06-04 Richard M. Stallman <rms@gnu.org>
* emacs-pretesters: Refer to etc/DEBUG instead of duplicating it.
Other cleanups.
2005-04-19 Lute Kamstra <lute@gnu.org> 2005-04-19 Lute Kamstra <lute@gnu.org>
* make-tarball.txt: Don't commit lisp/loaddefs.el. * make-tarball.txt: Don't commit lisp/loaddefs.el.

View file

@ -82,6 +82,8 @@ is encountered.
** Finish updating the Emacs Lisp manual. ** Finish updating the Emacs Lisp manual.
*** Update lispref/README.
** Update the Emacs manual. ** Update the Emacs manual.
*** Update man/info.texi. *** Update man/info.texi.
@ -187,7 +189,7 @@ lispref/control.texi "Luc Teirlinck" Chong Yidong
lispref/customize.texi Chong Yidong lispref/customize.texi Chong Yidong
lispref/debugging.texi Joakim Verona <joakim@verona.se> Lute Kamstra lispref/debugging.texi Joakim Verona <joakim@verona.se> Lute Kamstra
lispref/display.texi Chong Yidong lispref/display.texi Chong Yidong
lispref/edebug.texi Chong Yidong lispref/edebug.texi Chong Yidong "Luc Teirlinck"
lispref/elisp.texi "Luc Teirlinck" Lute Kamstra lispref/elisp.texi "Luc Teirlinck" Lute Kamstra
lispref/errors.texi "Luc Teirlinck" lispref/errors.texi "Luc Teirlinck"
lispref/eval.texi "Luc Teirlinck" Chong Yidong lispref/eval.texi "Luc Teirlinck" Chong Yidong

View file

@ -83,6 +83,9 @@ Root must be the root of an Emacs source tree."
(rx (and "version" (1+ space) (rx (and "version" (1+ space)
(submatch (1+ (in "0-9.")))))) (submatch (1+ (in "0-9."))))))
(set-version-in-file root "man/emacs.texi" version (set-version-in-file root "man/emacs.texi" version
(rx (and "EMACSVER" (1+ space)
(submatch (1+ (in "0-9."))))))
(set-version-in-file root "lispref/elisp.texi" version
(rx (and "EMACSVER" (1+ space) (rx (and "EMACSVER" (1+ space)
(submatch (1+ (in "0-9."))))))) (submatch (1+ (in "0-9.")))))))

View file

@ -30,13 +30,13 @@ noise into long discussions or even arguments, and that can waste a
lot of time. But when you have a reason to ask other pretesters for lot of time. But when you have a reason to ask other pretesters for
help, you can do it that way. help, you can do it that way.
* It is absolutely vital that you tell me about even the smallest * It is absolutely vital that you report even the smallest change or
change or departure from the standard sources and procedure. departure from the standard sources and procedure.
Otherwise, you are not testing the same program that I asked you to Otherwise, you are not testing the same program that we asked you to
test. Testing a different program is usually of no use whatever. It test. Testing a different program is usually of no use whatever. It
can even cause trouble if you fail to tell me that you tested some can even cause trouble, if you fail to tell us that you tested some
other program instead of what I am about to release. I might think other program instead of what we are about to release. We might think
that Emacs works, when in fact it has not even been tried, and might that Emacs works, when in fact it has not even been tried, and might
have a glaring fault. have a glaring fault.
@ -46,8 +46,8 @@ site would use it.
Actually, it does no harm to test Emacs with such customizations *as Actually, it does no harm to test Emacs with such customizations *as
well as* testing it "out of the box". Anything you do that could find well as* testing it "out of the box". Anything you do that could find
a bug is useful, as long as you make sure I know exactly what you did. a bug is useful, as long as you make sure we know exactly what you
The important point is that testing with local changes is no did. The important point is that testing with local changes is no
substitute for testing Emacs exactly as it is distributed. substitute for testing Emacs exactly as it is distributed.
* Even changing the compilation options counts as a change in the * Even changing the compilation options counts as a change in the
@ -71,10 +71,10 @@ this is effectively changing Emacs. Because the crucial fact about
the planned release is that, without changes, it doesn't work on that the planned release is that, without changes, it doesn't work on that
machine. machine.
To make Emacs work on that machine, I would need to install new To make Emacs work on that machine, we would need to install new
configuration files. That is not out of the question, since it is configuration files. That is not out of the question, since it is
safe--it certainly won't break any other machines that already work. safe--it certainly won't break any other machines that already work.
But you will have to rush me the legal papers to give the FSF But you will have to rush in the legal papers to give the FSF
permission to use such a large piece of text. permission to use such a large piece of text.
* Look in the etc/MACHINES file. * Look in the etc/MACHINES file.
@ -92,25 +92,25 @@ recommendations also, for the same reason.
* Send your problem reports to emacs-pretest-bug@gnu.org, not * Send your problem reports to emacs-pretest-bug@gnu.org, not
bug-gnu-emacs. bug-gnu-emacs.
Sometimes I won't know what to do about a system-dependent issue, and Sometimes we won't know what to do about a system-dependent issue, and
I may need people to tell me what happens if you try a certain thing we may need people to say what happens if you try a certain thing on a
on a certain system. When this happens, I'll send out a query. certain system. When this happens, we'll send out a query.
* Don't delay sending information. * Don't delay sending information.
When you test on a system and encounter no problems, please tell me When you test on a system and encounter no problems, please report it
about it right away. That way, I will know that someone has tested right away. That way, we will know that someone has tested Emacs on
Emacs on that kind of system. that kind of system.
Please don't wait for several days "to see if it really works before Please don't wait for several days "to see if it really works before
you say anything." Tell me right away that Emacs seems basically to you say anything." Tell us right away that Emacs seems basically to
work; then, if you notice a problem a few days later, tell me work; then, if you notice a problem a few days later, tell us
immediately about that when you see it. immediately about that when you see it.
It is okay if you double check things before reporting a problem, such It is okay if you double check things before reporting a problem, such
as to see if you can easily fix it. But don't wait very long. A good as to see if you can easily fix it. But don't wait very long. A good
rule to use in pretesting is always to tell me about every problem on rule to use in pretesting is always to report every problem on the
the same day you encounter it, even if that means you can't find a same day you encounter it, even if that means you can't find a
solution before you report the problem. solution before you report the problem.
I'd much rather hear about a problem today and a solution tomorrow I'd much rather hear about a problem today and a solution tomorrow
@ -123,20 +123,22 @@ else, then it will be necessary for anyone who wants to investigate
the bug to find the other message. This may be difficult, it is the bug to find the other message. This may be difficult, it is
probably time-consuming. probably time-consuming.
To help me save time, simply copy the relevant parts of any previous To help save our time, simply copy the relevant parts of any previous
messages into your own bug report. messages into your own bug report.
In particular, if I ask you for more information because a bug report In particular, if we ask you for more information because a bug report
was incomplete, it is best to send me the *entire* collection of was incomplete, it is best to send me the *entire* collection of
relevant information, all together. If you send just the additional relevant information, all together. If you send just the additional
information, that makes me do extra work. There is even a risk that information, that makes extra work for us. There is even a risk that
I won't remember what question you are sending me the answer to. we won't remember what question you are sending the answer to.
* When you encounter a bug that manifests itself as a Lisp error, * When you encounter a bug that manifests itself as a Lisp error,
try setting debug-on-error to t and making the bug happen again. try setting debug-on-error to t and making the bug happen again.
Then you will get a Lisp backtrace. Including that in your bug report Then you will get a Lisp backtrace. Including that in your bug report
is very useful. is very useful.
* For advice on debugging, see etc/DEBUG.
* Debugging optimized code is possible, if you compile with GCC, but * Debugging optimized code is possible, if you compile with GCC, but
in some cases the optimized code can be confusing. If you are not in some cases the optimized code can be confusing. If you are not
accustomed to that, recompile Emacs without -O. One way to do this is accustomed to that, recompile Emacs without -O. One way to do this is
@ -144,193 +146,6 @@ accustomed to that, recompile Emacs without -O. One way to do this is
make clean make clean
make CFLAGS=-g make CFLAGS=-g
* If you use X windows, it is a good idea to run Emacs under GDB (or
some other suitable debugger) *all the time*, at least while
pretesting.
Then, when Emacs crashes, you will be able to debug the live process,
not just a core dump. The `pr' command defined in src/.gdbinit is very
useful in this case for examining Lisp_Object values as they would
appear in Lisp.
If you can't use `pr' because Emacs has got a fault already, or
because you have only a core dump, you can use `xtype' to look at the
type of a value, and then choose one of the other commands `xsymbol',
`xstring', `xcons', `xvector' and so on to examine the contents.
I myself *always* run Emacs under GDB so that I can debug conveniently
if the occasion arises.
* To get Lisp-level backtrace information within GDB,
look for stack frames that call Ffuncall. Select them one by one in GDB
and type this:
p *args
pr
This will print the name of the Lisp function called by that level
of function calling.
By printing the remaining elements of args, you can see the argument
values. Here's how to print the first argument:
p args[1]
pr
If you do not have a live process, you can use xtype and the other
x... commands such as xsymbol to get such information, albeit less
conveniently.
* Even with a live process, these x... commands are useful for
examining the fields in a buffer, window, process, frame or marker.
Here's an example using concepts explained in the node "Value History"
of the GDB manual to print the variable frame from this line in
xmenu.c:
buf.frame_or_window = Fcons (frame, prefix);
First, use these commands:
cd src
gdb emacs
b xmenu.c:1209
r -q
Then type C-x 5 2 to create a new frame, and it hits the breakpoint:
(gdb) p frame
$1 = 1077872640
(gdb) xtype
Lisp_Vectorlike
PVEC_FRAME
(gdb) xframe
$2 = (struct frame *) 0x3f0800
(gdb) p *$
$3 = {
size = 536871989,
next = 0x366240,
name = 809661752,
[...]
}
(gdb) p $3->name
$4 = 809661752
Now we can use `pr' to print the name of the frame:
(gdb) pr
"emacs@steenrod.math.nwu.edu"
* The Emacs C code heavily uses macros defined in lisp.h. So suppose
we want the address of the l-value expression near the bottom of
`kbd_buffer_store_event' from keyboard.c:
XVECTOR (kbd_buffer_frame_or_window)->contents[kbd_store_ptr
- kbd_buffer]
= event->frame_or_window);
XVECTOR is a macro, and therefore GDB does not know about it.
GDB cannot evaluate p XVECTOR (kbd_buffer_frame_or_window).
However, you can use the xvector command in GDB to get the same
result. Here is how:
(gdb) p kbd_buffer_frame_or_window
$1 = 1078005760
(gdb) xvector
$2 = (struct Lisp_Vector *) 0x411000
0
(gdb) p $->contents[kbd_store_ptr - kbd_buffer]
$3 = 1077872640
(gdb) p &$
$4 = (int *) 0x411008
* Here's a related example of macros and the GDB `define' command.
There are many Lisp vectors such as `recent_keys', which contains the
last 100 keystrokes. We can print this Lisp vector
p recent_keys
pr
But this may be inconvenient, since `recent_keys' is much more verbose
than `C-h l'. We might want to print only the last 10 elements of
this vector. `recent_keys' is updated in keyboard.c by the command
XVECTOR (recent_keys)->contents[recent_keys_index] = c;
So we define a GDB command `xvector-elts', so the last 10 keystrokes
are printed by
xvector-elts recent_keys recent_keys_index 10
where you can define xvector-elts as follows:
define xvector-elts
set $i = 0
p $arg0
xvector
set $foo = $
while $i < $arg2
p $foo->contents[$arg1-($i++)]
pr
end
document xvector-elts
Prints a range of elements of a Lisp vector.
xvector-elts v n i
prints `i' elements of the vector `v' ending at the index `n'.
end
* To debug what happens while preloading and dumping Emacs,
do `gdb temacs' and start it with `r -batch -l loadup dump'.
If temacs actually succeeds when running under GDB in this way, do not
try to run the dumped Emacs, because it was dumped with the GDB
breakpoints in it.
* If you encounter X protocol errors, try evaluating (x-synchronize t).
That puts Emacs into synchronous mode, where each Xlib call checks for
errors before it returns. This mode is much slower, but when you get
an error, you will see exactly which call really caused the error.
* If the symptom of the bug is that Emacs fails to respond, don't
assume Emacs is `hung'--it may instead be in an infinite loop. To
find out which, make the problem happen under GDB and stop Emacs once
it is not responding. (If Emacs is using X Windows directly, you can
stop Emacs by typing C-z at the GDB job.) Then try stepping with
`step'. If Emacs is hung, the `step' command won't return. If it is
looping, `step' will return.
If this shows Emacs is hung in a system call, stop it again and
examine the arguments of the call. In your bug report, state exactly
where in the source the system call is, and what the arguments are.
If Emacs is in an infinite loop, please determine where the loop
starts and ends. The easiest way to do this is to use the GDB command
`finish'. Each time you use it, Emacs resumes execution until it
exits one stack frame. Keep typing `finish' until it doesn't
return--that means the infinite loop is in the stack frame which you
just tried to finish.
Stop Emacs again, and use `finish' repeatedly again until you get back
to that frame. Then use `next' to step through that frame. By
stepping, you will see where the loop starts and ends. Also please
examine the data being used in the loop and try to determine why the
loop does not exit when it should. Include all of this information in
your bug report.
* If certain operations in Emacs are slower than they used to be, here
is some advice for how to find out why.
Stop Emacs repeatedly during the slow operation, and make a backtrace
each time. Compare the backtraces looking for a pattern--a specific
function that shows up more often than you'd expect.
If you don't see a pattern in the C backtraces, get some Lisp
backtrace information by looking at Ffuncall frames (see above), and
again look for a pattern.
When using X, you can stop Emacs at any time by typing C-z at GDB.
When not using X, you can do this with C-g.
* Configure tries to figure out what kind of system you have by * Configure tries to figure out what kind of system you have by
compiling and linking programs which calls various functions and looks compiling and linking programs which calls various functions and looks
at whether that succeeds. The file config.log contains any messages at whether that succeeds. The file config.log contains any messages
@ -344,6 +159,9 @@ or more simply,
rm config.cache rm config.cache
./configure ./configure
* Don't try changing Emacs *in any way* during pretest unless it fails
to work unchanged.
* Always be precise when talking about changes you have made. Show * Always be precise when talking about changes you have made. Show
things rather than describing them. Use exact filenames (relative to things rather than describing them. Use exact filenames (relative to
the main directory of the distribution), not partial ones. For the main directory of the distribution), not partial ones. For
@ -352,27 +170,27 @@ makefile". Instead of saying "I defined the MUMBLE macro", send a
diff. diff.
* Always use `diff -c' to make diffs. If you don't include context, it * Always use `diff -c' to make diffs. If you don't include context, it
may be hard for me to figure out where you propose to make the may be hard for us to figure out where you propose to make the
changes. So I might have to ignore your patch. changes. So we might ignore your patch.
* When you write a fix, keep in mind that I can't install a change * When you write a fix, keep in mind that we can't install a change
that *might* break other systems without the risk that it will fail to that *might* break other systems without the risk that it will fail to
work and therefore require an additional cycle of pretesting. work and therefore require an additional cycle of pretesting.
People often suggest fixing a problem by changing config.h or People often suggest fixing a problem by changing config.h or
src/ymakefile or even src/Makefile to do something special that a src/ymakefile or even src/Makefile to do something special that a
particular system needs. Sometimes it is totally obvious that such particular system needs. Sometimes it is totally obvious that such
changes would break Emacs for almost all users. I can't possibly make changes would break Emacs for almost all users. We can't possibly
a change like that. All I can do is send it back to you and ask you make a change like that. All we can do is ask you to find a fix that
to find a fix that is safe to install. is safe to install.
Sometimes people send fixes that *might* be an improvement in Sometimes people send fixes that *might* be an improvement in
general--but it is hard to be sure of this. I can install such general--but it is hard to be sure of this. I can install such
changes some of the time, but not during pretest, when I am trying to changes some of the time, but not during pretest, when I am trying to
get a new version to work reliably as quickly as possible. get a new version to work reliably as quickly as possible.
The safest changes for me to install are changes to the s- and m- The safest changes for us to install are changes to the s- and m-
files. At least I know those can't affect most systems. files. At least those can't break other systems.
Another safe kind of change is one that uses a conditional to make Another safe kind of change is one that uses a conditional to make
sure it will apply only to a particular kind of system. Ordinarily, sure it will apply only to a particular kind of system. Ordinarily,
@ -380,60 +198,20 @@ that is a bad way to solve a problem, and I would want to find a
cleaner alternative. But the virtue of safety can make it superior at cleaner alternative. But the virtue of safety can make it superior at
pretest time. pretest time.
* Don't try changing Emacs *in any way* unless it fails to work unchanged. * Don't suggest changes during pretest to add features or make
something cleaner. Every change risks introducing a bug, so I won't
* Don't even suggest changes to add features or make something install a change during pretest unless it is *necessary*.
cleaner. Every change I install could introduce a bug, so I won't
install a change during pretest unless I see it is *necessary*.
* If you would like to suggest changes for purposes other than fixing * If you would like to suggest changes for purposes other than fixing
user-visible bugs, don't wait till pretest time. Instead, send them user-visible bugs, don't wait till pretest time. Instead, send them
after I have made a release that proves to be stable. Then I can give after we have made a release that proves to be stable. That is the
your suggestions proper consideration. If you send them at pretest easiest time to consider such suggestions. If you send them at
time, I will have to defer them till later, and that might mean I pretest time, we will have to defer them till later, and that might
forget all about them. mean we forget all about them.
* In some cases, if you don't follow these guidelines, your * In some cases, if you don't follow these guidelines, your
information might still be useful, but I might have to do more work to information might still be useful, but we would have to do more work
make use of it. Unfortunately, I am so far behind in my work that I to make use of it. That might cause it to fall by the wayside.
just can't keep up unless you help me to do it efficiently.
Some suggestions for debugging on MS Windows:
Marc Fleischeuers, Geoff Voelker and Andrew Innes
To debug emacs with Microsoft Visual C++, you either start emacs from
the debugger or attach the debugger to a running emacs process. To
start emacs from the debugger, you can use the file bin/debug.bat. The
Microsoft Developer studio will start and under Project, Settings,
Debug, General you can set the command-line arguments and emacs'
startup directory. Set breakpoints (Edit, Breakpoints) at Fsignal and
other functions that you want to examine. Run the program (Build,
Start debug). Emacs will start and the debugger will take control as
soon as a breakpoint is hit.
You can also attach the debugger to an already running emacs process.
To do this, start up the Microsoft Developer studio and select Build,
Start debug, Attach to process. Choose the emacs process from the
list. Send a break to the running process (Debug, Break) and you will
find that execution is halted somewhere in user32.dll. Open the stack
trace window and go up the stack to w32_msg_pump. Now you can set
breakpoints in emacs (Edit, Breakpoints). Continue the running emacs
process (Debug, Step out) and control will return to emacs, until a
breakpoint is hit.
To examine the contents of a lisp variable, you can use the function
'debug_print'. Right-click on a variable, select QuickWatch, and
place 'debug_print(' and ')' around the expression. Press
'Recalculate' and the output is sent to the 'Debug' pane in the Output
window. If emacs was started from the debugger, a console window was
opened at emacs' startup; this console window also shows the output of
'debug_print'. It is also possible to keep appropriately masked and
typecast lisp symbols in the Watch window, this is more convenient
when steeping though the code. For instance, on entering
apply_lambda, you can watch (struct Lisp_Symbol *) (0xfffffff &
args[0]).
Local Variables: Local Variables:
mode: text mode: text

View file

@ -22,10 +22,10 @@ For each step, check for possible errors.
5. rm configure; make bootstrap 5. rm configure; make bootstrap
6. Commit configure, README, AUTHORS, lisp/cus-load.el, 6. Commit configure, README, AUTHORS, lisp/cus-load.el,
lisp/finder-inf.el, lisp/version.el, man/emacs.texi. lisp/finder-inf.el, lisp/version.el, man/emacs.texi,
Copy lisp/loaddefs.el to lisp/ldefs-boot.el and commit lispref/elisp.texi. Copy lisp/loaddefs.el to lisp/ldefs-boot.el
lisp/ldefs-boot.el. For a release, also commit the ChangeLog and commit lisp/ldefs-boot.el. For a release, also commit the
files in all directories. ChangeLog files in all directories.
7. make-dist --snapshot. Check the contents of the new tar with 7. make-dist --snapshot. Check the contents of the new tar with
admin/diff-tar-files against an older tar file. Some old pretest admin/diff-tar-files against an older tar file. Some old pretest

5364
configure vendored

File diff suppressed because it is too large Load diff

View file

@ -1080,6 +1080,9 @@ dnl see the `changequote' comment above.
machine=intel386 machine=intel386
case "${canonical}" in case "${canonical}" in
*-cygwin ) opsys=cygwin ;; *-cygwin ) opsys=cygwin ;;
*-darwin ) opsys=darwin
CPP="${CC-cc} -E -no-cpp-precomp"
;;
*-lynxos* ) opsys=lynxos ;; *-lynxos* ) opsys=lynxos ;;
*-isc1.* | *-isc2.[01]* ) opsys=386-ix ;; *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
*-isc2.2* ) opsys=isc2-2 ;; *-isc2.2* ) opsys=isc2-2 ;;
@ -2345,6 +2348,15 @@ if test "${HAVE_CARBON}" = "yes"; then
fi fi
# We also have mouse menus. # We also have mouse menus.
HAVE_MENUS=yes HAVE_MENUS=yes
tmp_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -framework Carbon"
AC_CHECK_FUNC(CancelMenuTracking, have_cmt=yes, have_cmt=no)
if test "$have_cmt" = yes; then
AC_DEFINE(HAVE_CANCELMENUTRACKING, 1,
[Define to 1 if CancelMenuTracking is available (Mac OSX).])
fi
CFLAGS="$tmp_CFLAGS"
fi fi
### Use session management (-lSM -lICE) if available ### Use session management (-lSM -lICE) if available

View file

@ -1,3 +1,25 @@
2005-06-11 Eli Zaretskii <eliz@gnu.org>
* DEBUG: Mention emacs-buffer.gdb.
2005-06-10 Noah Friedman <friedman@splode.com>
* emacs-buffer.gdb (ybuffer-list): Don't use $filename; can't use
char as placeholder when buffer has no file name and process is
still live. Use different printf cases instead.
2005-06-08 Kim F. Storm <storm@cua.dk>
* PROBLEMS: Linux kernel 2.6.10 may corrupt process output.
Warn that using CVS+SSH may corrupt files, include work-around.
2005-06-06 Juri Linkov <juri@jurta.org>
* TUTORIAL.cs, TUTORIAL.sk: Change NBSP to space.
* TUTORIAL.ro: Change NBSP to space. Move coding cookie from the
second line to Local Variables. Fix title line.
2005-05-30 Miles Bader <miles@gnu.org> 2005-05-30 Miles Bader <miles@gnu.org>
* emacs-buffer.gdb: Remove RCS keywords. * emacs-buffer.gdb: Remove RCS keywords.

View file

@ -576,6 +576,13 @@ these data structures on the respective headers to remove the `:N'
bitfield definitions (which will cause each such field to use a full bitfield definitions (which will cause each such field to use a full
int). int).
** How to recover buffer contents from an Emacs core dump file
The file etc/emacs-buffer.gdb defines a set of GDB commands for
recovering the contents of Emacs buffers from a core dump file. You
might also find those commands useful for displaying the list of
buffers in human-readable format from within the debugger.
** Some suggestions for debugging on MS Windows: ** Some suggestions for debugging on MS Windows:
(written by Marc Fleischeuers, Geoff Voelker and Andrew Innes) (written by Marc Fleischeuers, Geoff Voelker and Andrew Innes)

View file

@ -116,6 +116,7 @@ emacs crash.
* Startup Changes in Emacs 22.1 * Startup Changes in Emacs 22.1
+++
** New command line option -Q or --quick. ** New command line option -Q or --quick.
This is like using -q --no-site-file, but in addition it also disables This is like using -q --no-site-file, but in addition it also disables
the fancy startup screen. the fancy startup screen.
@ -710,6 +711,7 @@ gives the fraction of the window's width to scroll the window.
The variable `automatic-hscrolling' was renamed to The variable `automatic-hscrolling' was renamed to
`auto-hscroll-mode'. The old name is still available as an alias. `auto-hscroll-mode'. The old name is still available as an alias.
---
*** Moving or scrolling through images (and other lines) taller that *** Moving or scrolling through images (and other lines) taller that
the window now works sensibly, by automatically adjusting the window's the window now works sensibly, by automatically adjusting the window's
vscroll property. vscroll property.
@ -796,6 +798,21 @@ appears in.
*** The variable `cursor-in-non-selected-windows' can now be set to any *** The variable `cursor-in-non-selected-windows' can now be set to any
of the recognized cursor types. of the recognized cursor types.
** New faces:
+++
*** `mode-line-highlight' is the standard face indicating mouse sensitive
elements on mode-line (and header-line) like `highlight' face on text
areas.
+++
*** `shadow' face defines the appearance of the "shadowed" text, i.e.
the text which should be less noticeable than the surrounding text.
This can be achieved by using shades of grey in contrast with either
black or white default foreground color. This generic shadow face
allows customization of the appearance of shadowed text in one place,
so package-specific faces can inherit from it.
** Font-Lock changes: ** Font-Lock changes:
+++ +++
@ -826,8 +843,10 @@ trouble with fontification and/or indentation.
+++ +++
*** New standard font-lock face `font-lock-preprocessor-face'. *** New standard font-lock face `font-lock-preprocessor-face'.
+++
*** New standard font-lock face `font-lock-comment-delimiter-face'. *** New standard font-lock face `font-lock-comment-delimiter-face'.
+++
*** Easy to overlook single character negation can now be font-locked. *** Easy to overlook single character negation can now be font-locked.
You can use the new variable `font-lock-negation-char-face' and the face of You can use the new variable `font-lock-negation-char-face' and the face of
the same name to customize this. Currently the cc-modes, sh-script-mode, the same name to customize this. Currently the cc-modes, sh-script-mode,
@ -1247,6 +1266,7 @@ modes (shell-mode etc) inserts arguments from previous command lines,
like bash's `ESC .' binding. It is bound by default to `C-c .', but like bash's `ESC .' binding. It is bound by default to `C-c .', but
otherwise behaves quite similarly to the bash version. otherwise behaves quite similarly to the bash version.
+++
*** `comint-use-prompt-regexp-instead-of-fields' has been renamed *** `comint-use-prompt-regexp-instead-of-fields' has been renamed
`comint-use-prompt-regexp'. The old name has been kept as an alias, `comint-use-prompt-regexp'. The old name has been kept as an alias,
but declared obsolete. but declared obsolete.
@ -1292,9 +1312,11 @@ buffer causes automatic display in another window of the corresponding
matches, compilation errors, etc. This minor mode can be toggled with matches, compilation errors, etc. This minor mode can be toggled with
C-c C-f. C-c C-f.
+++
*** When the left fringe is displayed, an arrow points to current message in *** When the left fringe is displayed, an arrow points to current message in
the compilation buffer. the compilation buffer.
+++
*** The new variable `compilation-context-lines' controls lines of leading *** The new variable `compilation-context-lines' controls lines of leading
context before the current message. If nil and the left fringe is displayed, context before the current message. If nil and the left fringe is displayed,
it doesn't scroll the compilation output window. If there is no left fringe, it doesn't scroll the compilation output window. If there is no left fringe,
@ -1621,6 +1643,7 @@ referred to as "soft word wrap" in other text editors. This is
similar to Refill mode, but more reliable. To turn the word wrap similar to Refill mode, but more reliable. To turn the word wrap
feature off, set `longlines-auto-wrap' to nil. feature off, set `longlines-auto-wrap' to nil.
+++
** The printing package is now part of the Emacs distribution. ** The printing package is now part of the Emacs distribution.
If you enable the printing package by including (require 'printing) in If you enable the printing package by including (require 'printing) in
@ -1713,6 +1736,7 @@ This was actually done in Emacs-21.1, and was not documented.
* Changes in Specialized Modes and Packages in Emacs 22.1: * Changes in Specialized Modes and Packages in Emacs 22.1:
---
** Makefile mode has submodes for automake, gmake, makepp and BSD make. ** Makefile mode has submodes for automake, gmake, makepp and BSD make.
The former two couldn't be differentiated before, and the latter two The former two couldn't be differentiated before, and the latter two
@ -2401,6 +2425,7 @@ old name remains available as alias, but has been marked obsolete.
+++ +++
*** Desktop saving is now a minor mode, `desktop-save-mode'. *** Desktop saving is now a minor mode, `desktop-save-mode'.
+++
*** The variable `desktop-enable' is obsolete. *** The variable `desktop-enable' is obsolete.
Customize `desktop-save-mode' to enable desktop saving. Customize `desktop-save-mode' to enable desktop saving.
@ -2471,6 +2496,7 @@ currently highlighted regions in an inferior Ediff session. If you answer 'n'
then it reverts to the old behavior and asks the user to select regions for then it reverts to the old behavior and asks the user to select regions for
comparison. comparison.
+++
*** The new command `ediff-backup' compares a file with its most recent *** The new command `ediff-backup' compares a file with its most recent
backup using `ediff'. If you specify the name of a backup file, backup using `ediff'. If you specify the name of a backup file,
`ediff-backup' compares it with the file of which it is a backup. `ediff-backup' compares it with the file of which it is a backup.
@ -3038,6 +3064,10 @@ If APPEND is non-nil, the new element gets added at the end of the
list instead of at the beginning. This change actually occurred in list instead of at the beginning. This change actually occurred in
Emacs 21.1, but was not documented then. Emacs 21.1, but was not documented then.
+++
*** New function `add-to-ordered-list' is like `add-to-list' but
associates a numeric ordering of each symbol element added to the list.
+++ +++
*** New function `copy-tree' makes a copy of a tree. *** New function `copy-tree' makes a copy of a tree.
@ -3362,6 +3392,13 @@ clone to the other.
--- ---
*** The function `insert-string' is now obsolete. *** The function `insert-string' is now obsolete.
** Filling changes.
+++
*** In determining an adaptive fill prefix, Emacs now tries the function in
`adaptive-fill-function' _before_ matching the buffer line against
`adaptive-fill-regexp' rather than _after_ it.
+++ +++
** Atomic change groups. ** Atomic change groups.
@ -3502,6 +3539,14 @@ properties from surrounding text.
element, if the last match was on a buffer. `set-match-data' element, if the last match was on a buffer. `set-match-data'
accepts such a list for restoring the match state. accepts such a list for restoring the match state.
+++
*** Functions `match-data' and `set-match-data' now have an optional
argument `reseat'. When non-nil, all markers in the match data list
passed to these function will be reseated to point to nowhere, and if
the value of `reseat' is `evaporate', the markers are put onto the
free list. Note that no other references to those markers must exist
if `evaporate' is specified for the `reseat' argument.
+++ +++
*** The default value of `sentence-end' is now defined using the new *** The default value of `sentence-end' is now defined using the new
variable `sentence-end-without-space', which contains such characters variable `sentence-end-without-space', which contains such characters
@ -4784,10 +4829,8 @@ used to add text properties to mode-line elements.
to display the size of the accessible part of the buffer on the mode to display the size of the accessible part of the buffer on the mode
line. line.
+++
*** Mouse-face on mode-line (and header-line) is now supported. *** Mouse-face on mode-line (and header-line) is now supported.
`mode-line-highlight' is the standard face indicating mouse sensitive
elements on mode-line (and header-line) like `highlight' face on text
areas.
** Menu manipulation changes: ** Menu manipulation changes:

View file

@ -1579,6 +1579,24 @@ global-font-lock-mode RET" or by customizing the variable
** GNU/Linux ** GNU/Linux
*** GNU/Linux: Process output is corrupted.
There is a bug in Linux kernel 2.6.10 PTYs that can cause emacs to
read corrupted process output.
*** GNU/Linux: Remote access to CVS with SSH causes file corruption.
If you access a remote CVS repository via SSH, files may be corrupted
due to bad interaction between CVS, SSH, and libc.
To fix the problem, save the following script into a file, make it
executable, and set CVS_RSH environment variable to the file name of
the script:
#!/bin/bash
exec 2> >(exec cat >&2 2>/dev/null)
exec ssh "$@"
*** GNU/Linux: On Linux-based GNU systems using libc versions 5.4.19 through *** GNU/Linux: On Linux-based GNU systems using libc versions 5.4.19 through
5.4.22, Emacs crashes at startup with a segmentation fault. 5.4.22, Emacs crashes at startup with a segmentation fault.

View file

@ -489,7 +489,7 @@ vyvol
C-x C-f Vyhledání souboru C-x C-f Vyhledání souboru
Emacs se vás zeptá na jméno souboru. Jméno souboru, které píšete, se Emacs se vás zeptá na jméno souboru. Jméno souboru, které píšete, se
objevuje ve spodním řádku obrazovky, který se v této situaci nazývá objevuje ve spodním řádku obrazovky, který se v této situaci nazývá
minibuffer. Pro editaci jména souboru můžete používat obvyklé editační minibuffer. Pro editaci jména souboru můžete používat obvyklé editační
příkazy Emacsu. příkazy Emacsu.

View file

@ -1,10 +1,8 @@
tutorialului de Emacs. Tutorialului de Emacs. A se citi sfârşitul pentru condiţii.
Copyright (c) 1998 Free Software Foundation -*-coding: latin-2;-*- Copyright (c) 1998 Free Software Foundation
Traducere din engleză de Tudor Hulubei <tudor@gnu.org>. Traducere din engleză de Tudor Hulubei <tudor@gnu.org>.
Mulţumiri Aidei Hulubei <aida@chang.pub.ro> pentru corecturi şi sugestii. Mulţumiri Aidei Hulubei <aida@chang.pub.ro> pentru corecturi şi sugestii.
A se citi sfârşitul pentru condiţii.
Această versiune a fost produsă plecând de la versiunea în limba Această versiune a fost produsă plecând de la versiunea în limba
engleză, care este engleză, care este
Copyright (c) 1985 Free Software Foundation, Inc. Copyright (c) 1985 Free Software Foundation, Inc.
@ -1112,4 +1110,8 @@ spirit. Citi
ale Emacs-ului. Contribuiţi la eliminarea obstrucţionismului software ale Emacs-ului. Contribuiţi la eliminarea obstrucţionismului software
folosind, scriind şi distribuind free software! folosind, scriind şi distribuind free software!
;;; Local Variables:
;;; coding: iso-latin-2
;;; End:
;;; arch-tag: dcf252cf-bd67-4f8d-a440-1ec4b8dbfd70 ;;; arch-tag: dcf252cf-bd67-4f8d-a440-1ec4b8dbfd70

View file

@ -501,7 +501,7 @@ vyvol
C-x C-f Vyhµadanie súboru C-x C-f Vyhµadanie súboru
Emacs sa Vás opýta na meno súboru. Meno súboru, ktoré pí¹ete, sa Emacs sa Vás opýta na meno súboru. Meno súboru, ktoré pí¹ete, sa
objavuje v spodnom riadku obrazovky, ktorý sa v tejto situácii nazýva objavuje v spodnom riadku obrazovky, ktorý sa v tejto situácii nazýva
minibuffer. Pre editáciu mena súboru mô¾ete pou¾íva» obvyklé editaèné minibuffer. Pre editáciu mena súboru mô¾ete pou¾íva» obvyklé editaèné
príkazy Emacsu. príkazy Emacsu.

View file

@ -1,86 +1,86 @@
This file contains the list of translators and maintainers of the This file contains the list of translators and maintainers of the
tutorial. tutorial.
* TUTORIAL.bg: * TUTORIAL.bg:
Author: Ognyan Kulev <ogi@fmi.uni-sofia.bg> Author: Ognyan Kulev <ogi@fmi.uni-sofia.bg>
Maintainer: Ognyan Kulev <ogi@fmi.uni-sofia.bg> Maintainer: Ognyan Kulev <ogi@fmi.uni-sofia.bg>
* TUTORIAL.cn: * TUTORIAL.cn:
Author: Chao-Hong Liu <chliu@gnu.org> Author: Chao-Hong Liu <chliu@gnu.org>
Maintainer: Chao-Hong Liu <chliu@gnu.org> Maintainer: Chao-Hong Liu <chliu@gnu.org>
* TUTORIAL.cs: * TUTORIAL.cs:
Author: Milan Zamazal <pdm@zamazal.org> Author: Milan Zamazal <pdm@zamazal.org>
Pavel Janík <Pavel@Janik.cz> Pavel Janík <Pavel@Janik.cz>
Maintainer: Milan Zamazal <pdm@zamazal.org> Maintainer: Milan Zamazal <pdm@zamazal.org>
Pavel Janík <Pavel@Janik.cz> Pavel Janík <Pavel@Janik.cz>
* TUTORIAL.de: * TUTORIAL.de:
Author: Werner Lemberg <wl@gnu.org> Author: Werner Lemberg <wl@gnu.org>
Maintainer: Werner Lemberg <wl@gnu.org> Maintainer: Werner Lemberg <wl@gnu.org>
* TUTORIAL.es: * TUTORIAL.es:
Author: Rafael Sepúlveda <drs@gnulinux.org.mx> Author: Rafael Sepúlveda <drs@gnulinux.org.mx>
Maintainer: Rafael Sepúlveda <drs@gnulinux.org.mx> Maintainer: Rafael Sepúlveda <drs@gnulinux.org.mx>
* TUTORIAL.fr: * TUTORIAL.fr:
Author: Éric Jacoboni <jaco@teaser.fr> Author: Éric Jacoboni <jaco@teaser.fr>
Maintainer: Éric Jacoboni <jaco@teaser.fr> Maintainer: Éric Jacoboni <jaco@teaser.fr>
* TUTORIAL.it: * TUTORIAL.it:
Author: Alfredo Finelli <alfredofnl@tiscali.it> Author: Alfredo Finelli <alfredofnl@tiscali.it>
Italian GNU Translation Group <tp@lists.linux.it> Italian GNU Translation Group <tp@lists.linux.it>
Maintainer: Alfredo Finelli <alfredofnl@tiscali.it> Maintainer: Alfredo Finelli <alfredofnl@tiscali.it>
Italian GNU Translation Group <tp@lists.linux.it> Italian GNU Translation Group <tp@lists.linux.it>
* TUTORIAL.ja: * TUTORIAL.ja:
Author: Kenichi Handa <handa@m17n.org> Author: Kenichi Handa <handa@m17n.org>
Maintainer: Kenichi Handa <handa@m17n.org> Maintainer: Kenichi Handa <handa@m17n.org>
* TUTORIAL.ko: * TUTORIAL.ko:
Author: Koaunghi Un <koaunghi@ling.cnu.ac.kr> Author: Koaunghi Un <koaunghi@ling.cnu.ac.kr>
Maintainer: Maintainer needed. Maintainer: Maintainer needed.
* TUTORIAL.nl: * TUTORIAL.nl:
Author: Pieter Schoenmakers <tiggr@tiggr.net> Author: Pieter Schoenmakers <tiggr@tiggr.net>
Maintainer: Pieter Schoenmakers <tiggr@tiggr.net> Maintainer: Pieter Schoenmakers <tiggr@tiggr.net>
* TUTORIAL.pl: * TUTORIAL.pl:
Author: Beatę Wierzchołowską <beataw@orient.uw.edu.pl> Author: Beatę Wierzchołowską <beataw@orient.uw.edu.pl>
Janusz S. Bien <jsbien@mail.uw.edu.pl> Janusz S. Bien <jsbien@mail.uw.edu.pl>
Maintainer: Beatę Wierzchołowską <beataw@orient.uw.edu.pl> Maintainer: Beatę Wierzchołowską <beataw@orient.uw.edu.pl>
Janusz S. Bien <jsbien@mail.uw.edu.pl> Janusz S. Bien <jsbien@mail.uw.edu.pl>
* TUTORIAL.pt_BR: * TUTORIAL.pt_BR:
Author: Marcelo Toledo <marcelo@gnu.org> Author: Marcelo Toledo <marcelo@gnu.org>
Maintainer: Marcelo Toledo <marcelo@gnu.org> Maintainer: Marcelo Toledo <marcelo@gnu.org>
* TUTORIAL.ro: * TUTORIAL.ro:
Author: Tudor Hulubei <tudor@gnu.org> Author: Tudor Hulubei <tudor@gnu.org>
Maintainer: Maintainer needed. Maintainer: Maintainer needed.
* TUTORIAL.ru: * TUTORIAL.ru:
Author: Alex Ott <ottalex@narod.ru> Author: Alex Ott <ottalex@narod.ru>
Maintainer: Alex Ott <ottalex@narod.ru> Maintainer: Alex Ott <ottalex@narod.ru>
* TUTORIAL.sk: * TUTORIAL.sk:
Author: Miroslav Vaško <vasko@debian.cz> Author: Miroslav Vaško <vasko@debian.cz>
Pavel Janík <Pavel@Janik.cz> Pavel Janík <Pavel@Janik.cz>
Maintainer: Pavel Janík <Pavel@Janik.cz> Maintainer: Pavel Janík <Pavel@Janik.cz>
* TUTORIAL.sl: * TUTORIAL.sl:
Author: Primož Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> Author: Primož Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si>
Maintainer: Primož Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> Maintainer: Primož Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si>
* TUTORIAL.sv: * TUTORIAL.sv:
Author: Mats Lidell <matsl@contactor.se> Author: Mats Lidell <matsl@contactor.se>
Maintainer: Mats Lidell <matsl@contactor.se> Maintainer: Mats Lidell <matsl@contactor.se>
* TUTORIAL.th: * TUTORIAL.th:
Author: Virach Sornlertlamvanich <virach@nectec.or.th> Author: Virach Sornlertlamvanich <virach@nectec.or.th>
Maintainer: Virach Sornlertlamvanich <virach@nectec.or.th> Maintainer: Virach Sornlertlamvanich <virach@nectec.or.th>
* TUTORIAL.zh: * TUTORIAL.zh:
Author: Chao-Hong Liu <chliu@gnu.org> Author: Chao-Hong Liu <chliu@gnu.org>
Maintainer: Chao-Hong Liu <chliu@gnu.org> Maintainer: Chao-Hong Liu <chliu@gnu.org>

View file

@ -116,13 +116,13 @@ define ybuffer-list
if $buf->filename != Qnil if $buf->filename != Qnil
ygetptr $buf->filename ygetptr $buf->filename
set $filename = ((struct Lisp_String *) $ptr)->data printf "%2d %c %9d %-20s %-10s %s\n", \
$i, $modp, ($buf->text->z_byte - 1), $name, $mode, \
((struct Lisp_String *) $ptr)->data
else else
set $filename = ' ' printf "%2d %c %9d %-20s %-10s\n", \
$i, $modp, ($buf->text->z_byte - 1), $name, $mode
end end
printf "%2d %c %9d %-20s %-10s %s\n", \
$i, $modp, ($buf->text->z_byte - 1), $name, $mode, $filename
end end
set $i++ set $i++

View file

@ -1,3 +1,9 @@
2005-06-04 Eli Zaretskii <eliz@gnu.org>
* makefile.w32-in (distclean): Fix a typo (colon was after
"clean").
(extraclean): New target, emulates Makefile.in.
2005-04-06 Kenichi Handa <handa@m17n.org> 2005-04-06 Kenichi Handa <handa@m17n.org>
* quail/sgml-input.el ("sgml"): Enable quail-completion by typing * quail/sgml-input.el ("sgml"): Enable quail-completion by typing

View file

@ -1,6 +1,7 @@
# -*- Makefile -*- for leim subdirectory in GNU Emacs on the Microsoft W32 API. # -*- Makefile -*- for leim subdirectory in GNU Emacs on the Microsoft W32 API.
# Copyright (C) 1997, 2004 Electrotechnical Laboratory, JAPAN. # Copyright (C) 1997, 2004 Electrotechnical Laboratory, JAPAN.
# Licensed to the Free Software Foundation. # Licensed to the Free Software Foundation.
# Copyright (C) 2005, Free Software Foundation, Inc.
# This file is part of GNU Emacs. # This file is part of GNU Emacs.
@ -197,9 +198,12 @@ clean mostlyclean:
- $(FOREACH) $(MISC_DIC:.elc=.el) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR) - $(FOREACH) $(MISC_DIC:.elc=.el) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
- $(DEL) leim-list.el - $(DEL) leim-list.el
distclean clean: distclean: clean
- $(DELTREE) $(SUBDIRS) - $(DELTREE) $(SUBDIRS)
- $(DEL) stamp-subdir - $(DEL) stamp-subdir
maintainer-clean: distclean maintainer-clean: distclean
- $(FOREACH) $(WORLD) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR) - $(FOREACH) $(WORLD) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
extraclean: maintainer-clean
- $(FOREACH) *~ "#*" $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)

View file

@ -1,3 +1,17 @@
2005-06-13 Eli Zaretskii <eliz@gnu.org>
* makefile.w32-in ($(DOC)): Fix last change.
2005-06-12 Eli Zaretskii <eliz@gnu.org>
* makefile.w32-in ($(DOC)): Depend on make-docfile.exe,
temacs.exe, and the preloaded *.elc files. This avoids
unnecessary dumping and DOC rebuilding.
2005-06-04 Eli Zaretskii <eliz@gnu.org>
* ntlib.h (fileno): Don't define if already defined.
2005-05-25 Thien-Thi Nguyen <ttn@gnu.org> 2005-05-25 Thien-Thi Nguyen <ttn@gnu.org>
* yow.c (setup_yow): Use EXIT_FAILURE in case no separators found. * yow.c (setup_yow): Use EXIT_FAILURE in case no separators found.

View file

@ -248,7 +248,7 @@ lisp2 = \
DOC = DOC DOC = DOC
$(DOC): make-docfile $(DOC): $(BLD) $(BLD)/make-docfile.exe ../src/$(BLD)/temacs.exe $(lisp1) $(lisp2)
- $(DEL) $(DOC) - $(DEL) $(DOC)
"$(THISDIR)/$(BLD)/make-docfile" -o $(DOC) -d ../src $(obj) "$(THISDIR)/$(BLD)/make-docfile" -o $(DOC) -d ../src $(obj)
"$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(lisp1) "$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(lisp1)

View file

@ -90,7 +90,9 @@ int fchown (int fd, int uid, int gid);
#define fcloseall _fcloseall #define fcloseall _fcloseall
#define fdopen _fdopen #define fdopen _fdopen
#define fgetchar _fgetchar #define fgetchar _fgetchar
#ifndef fileno
#define fileno _fileno #define fileno _fileno
#endif
#define flushall _flushall #define flushall _flushall
#define fputchar _fputchar #define fputchar _fputchar
#define getcwd _getcwd #define getcwd _getcwd

File diff suppressed because it is too large Load diff

View file

@ -215,21 +215,19 @@ $(lisp)/progmodes/cc-mode.elc: \
# Prepare a bootstrap in the lisp subdirectory. # Prepare a bootstrap in the lisp subdirectory.
# #
# Build loaddefs.el, because it's not sure it's up-to-date, and if it's not, # Build loaddefs.el to make sure it's up-to-date. If it's not, that
# that might lead to errors during the bootstrap because something fails to # might lead to errors during the bootstrap because something fails to
# autoload as expected. However, if there is no emacs binary, then we can't # autoload as expected. If there is no emacs binary, then we can't
# build autoloads yet, so just make sure there's some loaddefs.el file, as # build autoloads yet. In that case we have to use ldefs-boot.el;
# it's necessary for generating the binary (because loaddefs.el is an # bootstrap should always work with ldefs-boot.el. (Because
# automatically generated file, we don't want to store it in the source # loaddefs.el is an automatically generated file, we don't want to
# repository). # store it in the source repository).
bootstrap-prepare: bootstrap-prepare:
if test -x $(EMACS); then \ if test -x $(EMACS); then \
$(MAKE) $(MFLAGS) autoloads; \ $(MAKE) $(MFLAGS) autoloads; \
else \ else \
if test ! -r $(lisp)/loaddefs.el; then \ cp $(lisp)/ldefs-boot.el $(lisp)/loaddefs.el; \
cp $(lisp)/ldefs-boot.el $(lisp)/loaddefs.el; \
fi \
fi fi
maintainer-clean: distclean maintainer-clean: distclean

View file

@ -134,9 +134,11 @@ Otherwise display all abbrevs."
"Major mode for editing the list of abbrev definitions. "Major mode for editing the list of abbrev definitions.
\\{edit-abbrevs-map}" \\{edit-abbrevs-map}"
(interactive) (interactive)
(kill-all-local-variables)
(setq major-mode 'edit-abbrevs-mode) (setq major-mode 'edit-abbrevs-mode)
(setq mode-name "Edit-Abbrevs") (setq mode-name "Edit-Abbrevs")
(use-local-map edit-abbrevs-map)) (use-local-map edit-abbrevs-map)
(run-mode-hooks 'edit-abbrevs-mode-hook))
(defun edit-abbrevs () (defun edit-abbrevs ()
"Alter abbrev definitions by editing a list of them. "Alter abbrev definitions by editing a list of them.

View file

@ -166,86 +166,102 @@ Note: The search is conducted only within 10%, at the beginning of the file."
:type '(repeat regexp) :type '(repeat regexp)
:group 'change-log) :group 'change-log)
(defface change-log-date-face (defface change-log-date
'((t (:inherit font-lock-string-face))) '((t (:inherit font-lock-string-face)))
"Face used to highlight dates in date lines." "Face used to highlight dates in date lines."
:version "21.1" :version "21.1"
:group 'change-log) :group 'change-log)
;; backward-compatibility alias
(put 'change-log-date-face 'face-alias 'change-log-date)
(defface change-log-name-face (defface change-log-name
'((t (:inherit font-lock-constant-face))) '((t (:inherit font-lock-constant-face)))
"Face for highlighting author names." "Face for highlighting author names."
:version "21.1" :version "21.1"
:group 'change-log) :group 'change-log)
;; backward-compatibility alias
(put 'change-log-name-face 'face-alias 'change-log-name)
(defface change-log-email-face (defface change-log-email
'((t (:inherit font-lock-variable-name-face))) '((t (:inherit font-lock-variable-name-face)))
"Face for highlighting author email addresses." "Face for highlighting author email addresses."
:version "21.1" :version "21.1"
:group 'change-log) :group 'change-log)
;; backward-compatibility alias
(put 'change-log-email-face 'face-alias 'change-log-email)
(defface change-log-file-face (defface change-log-file
'((t (:inherit font-lock-function-name-face))) '((t (:inherit font-lock-function-name-face)))
"Face for highlighting file names." "Face for highlighting file names."
:version "21.1" :version "21.1"
:group 'change-log) :group 'change-log)
;; backward-compatibility alias
(put 'change-log-file-face 'face-alias 'change-log-file)
(defface change-log-list-face (defface change-log-list
'((t (:inherit font-lock-keyword-face))) '((t (:inherit font-lock-keyword-face)))
"Face for highlighting parenthesized lists of functions or variables." "Face for highlighting parenthesized lists of functions or variables."
:version "21.1" :version "21.1"
:group 'change-log) :group 'change-log)
;; backward-compatibility alias
(put 'change-log-list-face 'face-alias 'change-log-list)
(defface change-log-conditionals-face (defface change-log-conditionals
'((t (:inherit font-lock-variable-name-face))) '((t (:inherit font-lock-variable-name-face)))
"Face for highlighting conditionals of the form `[...]'." "Face for highlighting conditionals of the form `[...]'."
:version "21.1" :version "21.1"
:group 'change-log) :group 'change-log)
;; backward-compatibility alias
(put 'change-log-conditionals-face 'face-alias 'change-log-conditionals)
(defface change-log-function-face (defface change-log-function
'((t (:inherit font-lock-variable-name-face))) '((t (:inherit font-lock-variable-name-face)))
"Face for highlighting items of the form `<....>'." "Face for highlighting items of the form `<....>'."
:version "21.1" :version "21.1"
:group 'change-log) :group 'change-log)
;; backward-compatibility alias
(put 'change-log-function-face 'face-alias 'change-log-function)
(defface change-log-acknowledgement-face (defface change-log-acknowledgement
'((t (:inherit font-lock-comment-face))) '((t (:inherit font-lock-comment-face)))
"Face for highlighting acknowledgments." "Face for highlighting acknowledgments."
:version "21.1" :version "21.1"
:group 'change-log) :group 'change-log)
;; backward-compatibility alias
(put 'change-log-acknowledgement-face 'face-alias 'change-log-acknowledgement)
(defvar change-log-font-lock-keywords (defvar change-log-font-lock-keywords
'(;; '(;;
;; Date lines, new and old styles. ;; Date lines, new and old styles.
("^\\sw.........[0-9:+ ]*" ("^\\sw.........[0-9:+ ]*"
(0 'change-log-date-face) (0 'change-log-date)
;; Name and e-mail; some people put e-mail in parens, not angles. ;; Name and e-mail; some people put e-mail in parens, not angles.
("\\([^<(]+?\\)[ \t]*[(<]\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)[>)]" nil nil ("\\([^<(]+?\\)[ \t]*[(<]\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)[>)]" nil nil
(1 'change-log-name-face) (1 'change-log-name)
(2 'change-log-email-face))) (2 'change-log-email)))
;; ;;
;; File names. ;; File names.
("^\\( +\\|\t\\)\\* \\([^ ,:([\n]+\\)" ("^\\( +\\|\t\\)\\* \\([^ ,:([\n]+\\)"
(2 'change-log-file-face) (2 'change-log-file)
;; Possibly further names in a list: ;; Possibly further names in a list:
("\\=, \\([^ ,:([\n]+\\)" nil nil (1 'change-log-file-face)) ("\\=, \\([^ ,:([\n]+\\)" nil nil (1 'change-log-file))
;; Possibly a parenthesized list of names: ;; Possibly a parenthesized list of names:
("\\= (\\([^(),\n]+\\|(\\(setf\\|SETF\\) [^() ,\n]+)\\)" ("\\= (\\([^(),\n]+\\|(\\(setf\\|SETF\\) [^() ,\n]+)\\)"
nil nil (1 'change-log-list-face)) nil nil (1 'change-log-list))
("\\=, *\\([^(),\n]+\\|(\\(setf\\|SETF\\) [^() ,\n]+)\\)" ("\\=, *\\([^(),\n]+\\|(\\(setf\\|SETF\\) [^() ,\n]+)\\)"
nil nil (1 'change-log-list-face))) nil nil (1 'change-log-list)))
;; ;;
;; Function or variable names. ;; Function or variable names.
("^\\( +\\|\t\\)(\\([^(),\n]+\\|(\\(setf\\|SETF\\) [^() ,\n]+)\\)" ("^\\( +\\|\t\\)(\\([^(),\n]+\\|(\\(setf\\|SETF\\) [^() ,\n]+)\\)"
(2 'change-log-list-face) (2 'change-log-list)
("\\=, *\\([^(),\n]+\\|(\\(setf\\|SETF\\) [^() ,\n]+)\\)" nil nil ("\\=, *\\([^(),\n]+\\|(\\(setf\\|SETF\\) [^() ,\n]+)\\)" nil nil
(1 'change-log-list-face))) (1 'change-log-list)))
;; ;;
;; Conditionals. ;; Conditionals.
("\\[!?\\([^]\n]+\\)\\]\\(:\\| (\\)" (1 'change-log-conditionals-face)) ("\\[!?\\([^]\n]+\\)\\]\\(:\\| (\\)" (1 'change-log-conditionals))
;; ;;
;; Function of change. ;; Function of change.
("<\\([^>\n]+\\)>\\(:\\| (\\)" (1 'change-log-function-face)) ("<\\([^>\n]+\\)>\\(:\\| (\\)" (1 'change-log-function))
;; ;;
;; Acknowledgements. ;; Acknowledgements.
;; Don't include plain "From" because that is vague; ;; Don't include plain "From" because that is vague;
@ -254,7 +270,7 @@ Note: The search is conducted only within 10%, at the beginning of the file."
;; is to put the name of the author of the changes at the top ;; is to put the name of the author of the changes at the top
;; of the change log entry. ;; of the change log entry.
("\\(^\\( +\\|\t\\)\\| \\)\\(Patch\\(es\\)? by\\|Report\\(ed by\\| from\\)\\|Suggest\\(ed by\\|ion from\\)\\)" ("\\(^\\( +\\|\t\\)\\| \\)\\(Patch\\(es\\)? by\\|Report\\(ed by\\| from\\)\\|Suggest\\(ed by\\|ion from\\)\\)"
3 'change-log-acknowledgement-face)) 3 'change-log-acknowledgement))
"Additional expressions to highlight in Change Log mode.") "Additional expressions to highlight in Change Log mode.")
(defvar change-log-mode-map (defvar change-log-mode-map

View file

@ -751,6 +751,7 @@ language you are using."
(define-key global-map [home] 'beginning-of-line) (define-key global-map [home] 'beginning-of-line)
(define-key global-map [C-home] 'beginning-of-buffer) (define-key global-map [C-home] 'beginning-of-buffer)
(define-key global-map [M-home] 'beginning-of-buffer-other-window) (define-key global-map [M-home] 'beginning-of-buffer-other-window)
(define-key esc-map [home] 'beginning-of-buffer-other-window)
(define-key global-map [left] 'backward-char) (define-key global-map [left] 'backward-char)
(define-key global-map [up] 'previous-line) (define-key global-map [up] 'previous-line)
(define-key global-map [right] 'forward-char) (define-key global-map [right] 'forward-char)
@ -763,13 +764,17 @@ language you are using."
(put 'scroll-left 'disabled t) (put 'scroll-left 'disabled t)
(define-key global-map [C-next] 'scroll-left) (define-key global-map [C-next] 'scroll-left)
(define-key global-map [M-next] 'scroll-other-window) (define-key global-map [M-next] 'scroll-other-window)
(define-key esc-map [next] 'scroll-other-window)
(define-key global-map [M-prior] 'scroll-other-window-down) (define-key global-map [M-prior] 'scroll-other-window-down)
(define-key esc-map [prior] 'scroll-other-window-down)
(define-key esc-map [?\C-\S-v] 'scroll-other-window-down) (define-key esc-map [?\C-\S-v] 'scroll-other-window-down)
(define-key global-map [end] 'end-of-line) (define-key global-map [end] 'end-of-line)
(define-key global-map [C-end] 'end-of-buffer) (define-key global-map [C-end] 'end-of-buffer)
(define-key global-map [M-end] 'end-of-buffer-other-window) (define-key global-map [M-end] 'end-of-buffer-other-window)
(define-key esc-map [end] 'end-of-buffer-other-window)
(define-key global-map [begin] 'beginning-of-buffer) (define-key global-map [begin] 'beginning-of-buffer)
(define-key global-map [M-begin] 'beginning-of-buffer-other-window) (define-key global-map [M-begin] 'beginning-of-buffer-other-window)
(define-key esc-map [begin] 'beginning-of-buffer-other-window)
;; (define-key global-map [select] 'function-key-error) ;; (define-key global-map [select] 'function-key-error)
;; (define-key global-map [print] 'function-key-error) ;; (define-key global-map [print] 'function-key-error)
(define-key global-map [execute] 'execute-extended-command) (define-key global-map [execute] 'execute-extended-command)
@ -933,7 +938,9 @@ language you are using."
(define-key global-map "\C-c" 'mode-specific-command-prefix) (define-key global-map "\C-c" 'mode-specific-command-prefix)
(global-set-key [M-right] 'forward-word) (global-set-key [M-right] 'forward-word)
(define-key esc-map [right] 'forward-word)
(global-set-key [M-left] 'backward-word) (global-set-key [M-left] 'backward-word)
(define-key esc-map [left] 'backward-word)
;; ilya@math.ohio-state.edu says these bindings are standard on PC editors. ;; ilya@math.ohio-state.edu says these bindings are standard on PC editors.
(global-set-key [C-right] 'forward-word) (global-set-key [C-right] 'forward-word)
(global-set-key [C-left] 'backward-word) (global-set-key [C-left] 'backward-word)
@ -943,12 +950,18 @@ language you are using."
;; This is "move to the clipboard", or as close as we come. ;; This is "move to the clipboard", or as close as we come.
(global-set-key [S-delete] 'kill-region) (global-set-key [S-delete] 'kill-region)
(global-set-key [C-M-left] 'backward-sexp) (global-set-key [C-M-left] 'backward-sexp)
(global-set-key [C-M-right] 'forward-sexp) (define-key esc-map [C-left] 'backward-sexp)
(global-set-key [C-M-up] 'backward-up-list) (global-set-key [C-M-right] 'forward-sexp)
(global-set-key [C-M-down] 'down-list) (define-key esc-map [C-right] 'forward-sexp)
(global-set-key [C-M-home] 'beginning-of-defun) (global-set-key [C-M-up] 'backward-up-list)
(global-set-key [C-M-end] 'end-of-defun) (define-key esc-map [C-up] 'backward-up-list)
(global-set-key [C-M-down] 'down-list)
(define-key esc-map [C-down] 'down-list)
(global-set-key [C-M-home] 'beginning-of-defun)
(define-key esc-map [C-home] 'beginning-of-defun)
(global-set-key [C-M-end] 'end-of-defun)
(define-key esc-map [C-end] 'end-of-defun)
(define-key esc-map "\C-f" 'forward-sexp) (define-key esc-map "\C-f" 'forward-sexp)
(define-key esc-map "\C-b" 'backward-sexp) (define-key esc-map "\C-b" 'backward-sexp)

View file

@ -74,11 +74,13 @@
:type 'boolean :type 'boolean
:group 'Buffer-menu) :group 'Buffer-menu)
(defface Buffer-menu-buffer-face (defface Buffer-menu-buffer
'((t (:weight bold))) '((t (:weight bold)))
"Face used to highlight buffer name." "Face used to highlight buffer name."
:group 'Buffer-menu :group 'Buffer-menu
:group 'font-lock-highlighting-faces) :group 'font-lock-highlighting-faces)
;; backward-compatibility alias
(put 'Buffer-menu-buffer-face 'face-alias 'Buffer-menu-buffer)
(defcustom Buffer-menu-buffer+size-width 26 (defcustom Buffer-menu-buffer+size-width 26
"*How wide to jointly make the buffer name and size columns." "*How wide to jointly make the buffer name and size columns."
@ -773,7 +775,7 @@ For more information, see the function `buffer-menu'."
(int-to-string (nth 3 buffer)) (int-to-string (nth 3 buffer))
`(buffer-name ,(nth 2 buffer) `(buffer-name ,(nth 2 buffer)
buffer ,(car buffer) buffer ,(car buffer)
font-lock-face Buffer-menu-buffer-face font-lock-face Buffer-menu-buffer
mouse-face highlight mouse-face highlight
help-echo "mouse-2: select this buffer")) help-echo "mouse-2: select this buffer"))
" " " "

View file

@ -206,9 +206,9 @@ If nil, make an icon of the frame. If non-nil, delete the frame."
:type 'boolean :type 'boolean
:group 'view) :group 'view)
(defvar diary-face 'diary-face (defvar diary-face 'diary
"Face name to use for diary entries.") "Face name to use for diary entries.")
(defface diary-face (defface diary
'((((min-colors 88) (class color) (background light)) '((((min-colors 88) (class color) (background light))
:foreground "red1") :foreground "red1")
(((class color) (background light)) (((class color) (background light))
@ -221,13 +221,17 @@ If nil, make an icon of the frame. If non-nil, delete the frame."
:weight bold)) :weight bold))
"Face for highlighting diary entries." "Face for highlighting diary entries."
:group 'diary) :group 'diary)
;; backward-compatibility alias
(put 'diary-face 'face-alias 'diary)
(defface calendar-today-face (defface calendar-today
'((t (:underline t))) '((t (:underline t)))
"Face for indicating today's date." "Face for indicating today's date."
:group 'diary) :group 'diary)
;; backward-compatibility alias
(put 'calendar-today-face 'face-alias 'calendar-today)
(defface holiday-face (defface holiday
'((((class color) (background light)) '((((class color) (background light))
:background "pink") :background "pink")
(((class color) (background dark)) (((class color) (background dark))
@ -236,17 +240,19 @@ If nil, make an icon of the frame. If non-nil, delete the frame."
:inverse-video t)) :inverse-video t))
"Face for indicating dates that have holidays." "Face for indicating dates that have holidays."
:group 'diary) :group 'diary)
;; backward-compatibility alias
(put 'holiday-face 'face-alias 'holiday)
(eval-after-load "facemenu" (eval-after-load "facemenu"
'(progn '(progn
(add-to-list 'facemenu-unlisted-faces 'diary-face) (add-to-list 'facemenu-unlisted-faces 'diary)
(add-to-list 'facemenu-unlisted-faces 'calendar-today-face) (add-to-list 'facemenu-unlisted-faces 'calendar-today)
(add-to-list 'facemenu-unlisted-faces 'holiday-face))) (add-to-list 'facemenu-unlisted-faces 'holiday)))
(defcustom diary-entry-marker (defcustom diary-entry-marker
(if (not (display-color-p)) (if (not (display-color-p))
"+" "+"
'diary-face) 'diary)
"*How to mark dates that have diary entries. "*How to mark dates that have diary entries.
The value can be either a single-character string or a face." The value can be either a single-character string or a face."
:type '(choice string face) :type '(choice string face)
@ -255,7 +261,7 @@ The value can be either a single-character string or a face."
(defcustom calendar-today-marker (defcustom calendar-today-marker
(if (not (display-color-p)) (if (not (display-color-p))
"=" "="
'calendar-today-face) 'calendar-today)
"*How to mark today's date in the calendar. "*How to mark today's date in the calendar.
The value can be either a single-character string or a face. The value can be either a single-character string or a face.
Marking today's date is done only if you set up `today-visible-calendar-hook' Marking today's date is done only if you set up `today-visible-calendar-hook'
@ -266,7 +272,7 @@ to request that."
(defcustom calendar-holiday-marker (defcustom calendar-holiday-marker
(if (not (display-color-p)) (if (not (display-color-p))
"*" "*"
'holiday-face) 'holiday)
"*How to mark notable dates in the calendar. "*How to mark notable dates in the calendar.
The value can be either a single-character string or a face." The value can be either a single-character string or a face."
:type '(choice string face) :type '(choice string face)
@ -2441,7 +2447,6 @@ For a complete description, type \
\\<calendar-mode-map>\\[calendar-goto-info-node] from within the calendar. \\<calendar-mode-map>\\[calendar-goto-info-node] from within the calendar.
\\<calendar-mode-map>\\{calendar-mode-map}" \\<calendar-mode-map>\\{calendar-mode-map}"
(kill-all-local-variables) (kill-all-local-variables)
(setq major-mode 'calendar-mode) (setq major-mode 'calendar-mode)
(setq mode-name "Calendar") (setq mode-name "Calendar")
@ -2454,7 +2459,8 @@ For a complete description, type \
(make-local-variable 'displayed-month);; Month in middle of window. (make-local-variable 'displayed-month);; Month in middle of window.
(make-local-variable 'displayed-year) ;; Year in middle of window. (make-local-variable 'displayed-year) ;; Year in middle of window.
(set (make-local-variable 'font-lock-defaults) (set (make-local-variable 'font-lock-defaults)
'(calendar-font-lock-keywords t))) '(calendar-font-lock-keywords t))
(run-mode-hooks 'calendar-mode-hook))
(defun calendar-string-spread (strings char length) (defun calendar-string-spread (strings char length)
"Concatenate list of STRINGS separated with copies of CHAR to fill LENGTH. "Concatenate list of STRINGS separated with copies of CHAR to fill LENGTH.
@ -2943,7 +2949,7 @@ MARK defaults to `diary-entry-marker'."
(forward-char -2)) (forward-char -2))
(let ; attr list (let ; attr list
((temp-face ((temp-face
(make-symbol (apply 'concat "temp-face-" (make-symbol (apply 'concat "temp-"
(mapcar '(lambda (sym) (mapcar '(lambda (sym)
(cond ((symbolp sym) (symbol-name sym)) (cond ((symbolp sym) (symbol-name sym))
((numberp sym) (int-to-string sym)) ((numberp sym) (int-to-string sym))

View file

@ -543,15 +543,17 @@ changing the variable `diary-include-string'."
(set-window-start window (point-min)))) (set-window-start window (point-min))))
(message "Preparing diary...done")))) (message "Preparing diary...done"))))
(defface diary-button-face '((((type pc) (class color)) (defface diary-button '((((type pc) (class color))
(:foreground "lightblue"))) (:foreground "lightblue")))
"Default face used for buttons." "Default face used for buttons."
:version "22.1" :version "22.1"
:group 'diary) :group 'diary)
;; backward-compatibility alias
(put 'diary-button-face 'face-alias 'diary-button)
(define-button-type 'diary-entry (define-button-type 'diary-entry
'action #'diary-goto-entry 'action #'diary-goto-entry
'face #'diary-button-face) 'face 'diary-button)
(defun diary-goto-entry (button) (defun diary-goto-entry (button)
(let ((marker (button-get button 'marker))) (let ((marker (button-get button 'marker)))

View file

@ -311,7 +311,7 @@ which it will stop. If you set the threshhold to zero, the upper and
lower bound will coincide at the end of the loop and you will insert lower bound will coincide at the end of the loop and you will insert
your item just before that point. If you set the threshhold to, your item just before that point. If you set the threshhold to,
e.g. 8, it will stop as soon as the window size drops below that e.g. 8, it will stop as soon as the window size drops below that
amount and will insert the item in the approximate centre of that amount and will insert the item in the approximate center of that
window." window."
:type 'integer :type 'integer
:group 'todo) :group 'todo)

View file

@ -423,7 +423,7 @@ field boundaries in a natural way)."
(make-obsolete-variable 'comint-use-prompt-regexp-instead-of-fields (make-obsolete-variable 'comint-use-prompt-regexp-instead-of-fields
'comint-use-prompt-regexp "22.1") 'comint-use-prompt-regexp "22.1")
(defcustom comint-mode-hook '(turn-on-font-lock) (defcustom comint-mode-hook nil
"Hook run upon entry to `comint-mode'. "Hook run upon entry to `comint-mode'.
This is run before the process is cranked up." This is run before the process is cranked up."
:type 'hook :type 'hook
@ -583,7 +583,7 @@ Return not at end copies rest of line to end and sends it.
Setting variable `comint-eol-on-send' means jump to the end of the line Setting variable `comint-eol-on-send' means jump to the end of the line
before submitting new input. before submitting new input.
This mode is customised to create major modes such as Inferior Lisp This mode is customized to create major modes such as Inferior Lisp
mode, Shell mode, etc. This can be done by setting the hooks mode, Shell mode, etc. This can be done by setting the hooks
`comint-input-filter-functions', `comint-input-filter', `comint-input-sender' `comint-input-filter-functions', `comint-input-filter', `comint-input-sender'
and `comint-get-old-input' to appropriate functions, and the variable and `comint-get-old-input' to appropriate functions, and the variable
@ -654,7 +654,7 @@ Entry to this mode runs the hooks on `comint-mode-hook'."
(set (make-local-variable 'next-line-add-newlines) nil)) (set (make-local-variable 'next-line-add-newlines) nil))
(defun comint-check-proc (buffer) (defun comint-check-proc (buffer)
"Return t if there is a living process associated w/buffer BUFFER. "Return non-nil if there is a living process associated w/buffer BUFFER.
Living means the status is `open', `run', or `stop'. Living means the status is `open', `run', or `stop'.
BUFFER can be either a buffer or the name of one." BUFFER can be either a buffer or the name of one."
(let ((proc (get-buffer-process buffer))) (let ((proc (get-buffer-process buffer)))
@ -667,7 +667,7 @@ If BUFFER is nil, it defaults to NAME surrounded by `*'s.
PROGRAM should be either a string denoting an executable program to create PROGRAM should be either a string denoting an executable program to create
via `start-process', or a cons pair of the form (HOST . SERVICE) denoting a TCP via `start-process', or a cons pair of the form (HOST . SERVICE) denoting a TCP
connection to be opened via `open-network-stream'. If there is already a connection to be opened via `open-network-stream'. If there is already a
running process in that buffer, it is not restarted. Optional third arg running process in that buffer, it is not restarted. Optional fourth arg
STARTFILE is the name of a file to send the contents of to the process. STARTFILE is the name of a file to send the contents of to the process.
If PROGRAM is a string, any more args are arguments to PROGRAM." If PROGRAM is a string, any more args are arguments to PROGRAM."
@ -1547,8 +1547,12 @@ Similarly for Soar, Scheme, etc."
nil comint-last-input-start comint-last-input-end nil comint-last-input-start comint-last-input-end
nil comint-last-input-end nil comint-last-input-end
(+ comint-last-input-end echo-len)))) (+ comint-last-input-end echo-len))))
(delete-region comint-last-input-end ;; Certain parts of the text to be deleted may have
(+ comint-last-input-end echo-len))))) ;; been mistaken for prompts. We have to prevent
;; problems when `comint-prompt-read-only' is non-nil.
(let ((inhibit-read-only t))
(delete-region comint-last-input-end
(+ comint-last-input-end echo-len))))))
;; This used to call comint-output-filter-functions, ;; This used to call comint-output-filter-functions,
;; but that scrolled the buffer in undesirable ways. ;; but that scrolled the buffer in undesirable ways.
@ -1579,7 +1583,7 @@ See `comint-carriage-motion' for details.")
(defun comint-snapshot-last-prompt () (defun comint-snapshot-last-prompt ()
"`snapshot' any current `comint-last-prompt-overlay'. "`snapshot' any current `comint-last-prompt-overlay'.
freeze its attributes in place, even when more input comes a long Freeze its attributes in place, even when more input comes along
and moves the prompt overlay." and moves the prompt overlay."
(when comint-last-prompt-overlay (when comint-last-prompt-overlay
(let ((inhibit-read-only t) (let ((inhibit-read-only t)
@ -2385,7 +2389,7 @@ updated using `comint-update-fence', if necessary."
"Compute the defaults for `load-file' and `compile-file' commands. "Compute the defaults for `load-file' and `compile-file' commands.
PREVIOUS-DIR/FILE is a pair (directory . filename) from the last PREVIOUS-DIR/FILE is a pair (directory . filename) from the last
source-file processing command. nil if there hasn't been one yet. source-file processing command, or nil if there hasn't been one yet.
SOURCE-MODES is a list used to determine what buffers contain source SOURCE-MODES is a list used to determine what buffers contain source
files: if the major mode of the buffer is in SOURCE-MODES, it's source. files: if the major mode of the buffer is in SOURCE-MODES, it's source.
Typically, (lisp-mode) or (scheme-mode). Typically, (lisp-mode) or (scheme-mode).

View file

@ -1,6 +1,6 @@
;;; compare-w.el --- compare text between windows for Emacs ;;; compare-w.el --- compare text between windows for Emacs
;; Copyright (C) 1986,1989,1993,1997,2003,2004 Free Software Foundation, Inc. ;; Copyright (C) 1986,1989,1993,1997,2003,2004,2005 Free Software Foundation, Inc.
;; Maintainer: FSF ;; Maintainer: FSF
;; Keywords: convenience files ;; Keywords: convenience files
@ -116,7 +116,7 @@ and the value `((4) (4))' for horizontally split windows."
:type 'boolean :type 'boolean
:group 'compare-w) :group 'compare-w)
(defface compare-windows-face (defface compare-windows
'((((class color) (min-colors 88) (background light)) '((((class color) (min-colors 88) (background light))
(:background "paleturquoise")) (:background "paleturquoise"))
(((class color) (min-colors 88) (background dark)) (((class color) (min-colors 88) (background dark))
@ -126,6 +126,8 @@ and the value `((4) (4))' for horizontally split windows."
(t (:underline t))) (t (:underline t)))
"Face for highlighting of compare-windows difference regions." "Face for highlighting of compare-windows difference regions."
:group 'compare-w) :group 'compare-w)
;; backward-compatibility alias
(put 'compare-windows-face 'face-alias 'compare-windows)
(defvar compare-windows-overlay1 nil) (defvar compare-windows-overlay1 nil)
(defvar compare-windows-overlay2 nil) (defvar compare-windows-overlay2 nil)
@ -341,13 +343,13 @@ on third call it again advances points to the next difference and so on."
(if compare-windows-overlay1 (if compare-windows-overlay1
(move-overlay compare-windows-overlay1 beg1 end1 b1) (move-overlay compare-windows-overlay1 beg1 end1 b1)
(setq compare-windows-overlay1 (make-overlay beg1 end1 b1)) (setq compare-windows-overlay1 (make-overlay beg1 end1 b1))
(overlay-put compare-windows-overlay1 'face 'compare-windows-face) (overlay-put compare-windows-overlay1 'face 'compare-windows)
(overlay-put compare-windows-overlay1 'priority 1)) (overlay-put compare-windows-overlay1 'priority 1))
(overlay-put compare-windows-overlay1 'window w1) (overlay-put compare-windows-overlay1 'window w1)
(if compare-windows-overlay2 (if compare-windows-overlay2
(move-overlay compare-windows-overlay2 beg2 end2 b2) (move-overlay compare-windows-overlay2 beg2 end2 b2)
(setq compare-windows-overlay2 (make-overlay beg2 end2 b2)) (setq compare-windows-overlay2 (make-overlay beg2 end2 b2))
(overlay-put compare-windows-overlay2 'face 'compare-windows-face) (overlay-put compare-windows-overlay2 'face 'compare-windows)
(overlay-put compare-windows-overlay2 'priority 1)) (overlay-put compare-windows-overlay2 'priority 1))
(overlay-put compare-windows-overlay2 'window w2) (overlay-put compare-windows-overlay2 'window w2)
;; Remove highlighting before next command is executed ;; Remove highlighting before next command is executed

View file

@ -417,7 +417,7 @@
:group 'development) :group 'development)
(defgroup minibuffer nil (defgroup minibuffer nil
"Controling the behaviour of the minibuffer." "Controling the behavior of the minibuffer."
:link '(custom-manual "(emacs)Minibuffer") :link '(custom-manual "(emacs)Minibuffer")
:group 'environment) :group 'environment)
@ -1636,50 +1636,62 @@ item in another window.\n\n"))
:group 'custom-faces :group 'custom-faces
:group 'custom-buffer) :group 'custom-buffer)
(defface custom-invalid-face '((((class color)) (defface custom-invalid '((((class color))
(:foreground "yellow1" :background "red1")) (:foreground "yellow1" :background "red1"))
(t (t
(:weight bold :slant italic :underline t))) (:weight bold :slant italic :underline t)))
"Face used when the customize item is invalid." "Face used when the customize item is invalid."
:group 'custom-magic-faces) :group 'custom-magic-faces)
;; backward-compatibility alias
(put 'custom-invalid-face 'face-alias 'custom-invalid)
(defface custom-rogue-face '((((class color)) (defface custom-rogue '((((class color))
(:foreground "pink" :background "black")) (:foreground "pink" :background "black"))
(t (t
(:underline t))) (:underline t)))
"Face used when the customize item is not defined for customization." "Face used when the customize item is not defined for customization."
:group 'custom-magic-faces) :group 'custom-magic-faces)
;; backward-compatibility alias
(put 'custom-rogue-face 'face-alias 'custom-rogue)
(defface custom-modified-face '((((min-colors 88) (class color)) (defface custom-modified '((((min-colors 88) (class color))
(:foreground "white" :background "blue1")) (:foreground "white" :background "blue1"))
(((class color)) (((class color))
(:foreground "white" :background "blue")) (:foreground "white" :background "blue"))
(t (t
(:slant italic :bold))) (:slant italic :bold)))
"Face used when the customize item has been modified." "Face used when the customize item has been modified."
:group 'custom-magic-faces) :group 'custom-magic-faces)
;; backward-compatibility alias
(put 'custom-modified-face 'face-alias 'custom-modified)
(defface custom-set-face '((((min-colors 88) (class color)) (defface custom-set '((((min-colors 88) (class color))
(:foreground "blue1" :background "white")) (:foreground "blue1" :background "white"))
(((class color)) (((class color))
(:foreground "blue" :background "white")) (:foreground "blue" :background "white"))
(t (t
(:slant italic))) (:slant italic)))
"Face used when the customize item has been set." "Face used when the customize item has been set."
:group 'custom-magic-faces) :group 'custom-magic-faces)
;; backward-compatibility alias
(put 'custom-set-face 'face-alias 'custom-set)
(defface custom-changed-face '((((min-colors 88) (class color)) (defface custom-changed '((((min-colors 88) (class color))
(:foreground "white" :background "blue1")) (:foreground "white" :background "blue1"))
(((class color)) (((class color))
(:foreground "white" :background "blue")) (:foreground "white" :background "blue"))
(t (t
(:slant italic))) (:slant italic)))
"Face used when the customize item has been changed." "Face used when the customize item has been changed."
:group 'custom-magic-faces) :group 'custom-magic-faces)
;; backward-compatibility alias
(put 'custom-changed-face 'face-alias 'custom-changed)
(defface custom-saved-face '((t (:underline t))) (defface custom-saved '((t (:underline t)))
"Face used when the customize item has been saved." "Face used when the customize item has been saved."
:group 'custom-magic-faces) :group 'custom-magic-faces)
;; backward-compatibility alias
(put 'custom-saved-face 'face-alias 'custom-saved)
(defconst custom-magic-alist (defconst custom-magic-alist
'((nil "#" underline "\ '((nil "#" underline "\
@ -1689,21 +1701,21 @@ UNKNOWN, you should not see this.")
(hidden "-" default "\ (hidden "-" default "\
HIDDEN, invoke \"Show\" in the previous line to show." "\ HIDDEN, invoke \"Show\" in the previous line to show." "\
group now hidden, invoke \"Show\", above, to show contents.") group now hidden, invoke \"Show\", above, to show contents.")
(invalid "x" custom-invalid-face "\ (invalid "x" custom-invalid "\
INVALID, the displayed value cannot be set.") INVALID, the displayed value cannot be set.")
(modified "*" custom-modified-face "\ (modified "*" custom-modified "\
EDITED, shown value does not take effect until you set or save it." "\ EDITED, shown value does not take effect until you set or save it." "\
something in this group has been edited but not set.") something in this group has been edited but not set.")
(set "+" custom-set-face "\ (set "+" custom-set "\
SET for current session only." "\ SET for current session only." "\
something in this group has been set but not saved.") something in this group has been set but not saved.")
(changed ":" custom-changed-face "\ (changed ":" custom-changed "\
CHANGED outside Customize; operating on it here may be unreliable." "\ CHANGED outside Customize; operating on it here may be unreliable." "\
something in this group has been changed outside customize.") something in this group has been changed outside customize.")
(saved "!" custom-saved-face "\ (saved "!" custom-saved "\
SAVED and set." "\ SAVED and set." "\
something in this group has been set and saved.") something in this group has been set and saved.")
(rogue "@" custom-rogue-face "\ (rogue "@" custom-rogue "\
NO CUSTOMIZATION DATA; you should not see this." "\ NO CUSTOMIZATION DATA; you should not see this." "\
something in this group is not prepared for customization.") something in this group is not prepared for customization.")
(standard " " nil "\ (standard " " nil "\
@ -1830,7 +1842,7 @@ and `face'."
(insert " (lisp)")) (insert " (lisp)"))
((eq form 'mismatch) ((eq form 'mismatch)
(insert " (mismatch)"))) (insert " (mismatch)")))
(put-text-property start (point) 'face 'custom-state-face)) (put-text-property start (point) 'face 'custom-state))
(insert "\n")) (insert "\n"))
(when (and (eq category 'group) (when (and (eq category 'group)
(not (and (eq custom-buffer-style 'links) (not (and (eq custom-buffer-style 'links)
@ -1864,7 +1876,7 @@ and `face'."
;;; The `custom' Widget. ;;; The `custom' Widget.
(defface custom-button-face (defface custom-button
'((((type x w32 mac) (class color)) ; Like default modeline '((((type x w32 mac) (class color)) ; Like default modeline
(:box (:line-width 2 :style released-button) (:box (:line-width 2 :style released-button)
:background "lightgrey" :foreground "black")) :background "lightgrey" :foreground "black"))
@ -1873,8 +1885,10 @@ and `face'."
"Face used for buttons in customization buffers." "Face used for buttons in customization buffers."
:version "21.1" :version "21.1"
:group 'custom-faces) :group 'custom-faces)
;; backward-compatibility alias
(put 'custom-button-face 'face-alias 'custom-button)
(defface custom-button-pressed-face (defface custom-button-pressed
'((((type x w32 mac) (class color)) '((((type x w32 mac) (class color))
(:box (:line-width 2 :style pressed-button) (:box (:line-width 2 :style pressed-button)
:background "lightgrey" :foreground "black")) :background "lightgrey" :foreground "black"))
@ -1883,20 +1897,26 @@ and `face'."
"Face used for buttons in customization buffers." "Face used for buttons in customization buffers."
:version "21.1" :version "21.1"
:group 'custom-faces) :group 'custom-faces)
;; backward-compatibility alias
(put 'custom-button-pressed-face 'face-alias 'custom-button-pressed)
(defface custom-documentation-face nil (defface custom-documentation nil
"Face used for documentation strings in customization buffers." "Face used for documentation strings in customization buffers."
:group 'custom-faces) :group 'custom-faces)
;; backward-compatibility alias
(put 'custom-documentation-face 'face-alias 'custom-documentation)
(defface custom-state-face '((((class color) (defface custom-state '((((class color)
(background dark)) (background dark))
(:foreground "lime green")) (:foreground "lime green"))
(((class color) (((class color)
(background light)) (background light))
(:foreground "dark green")) (:foreground "dark green"))
(t nil)) (t nil))
"Face used for State descriptions in the customize buffer." "Face used for State descriptions in the customize buffer."
:group 'custom-faces) :group 'custom-faces)
;; backward-compatibility alias
(put 'custom-state-face 'face-alias 'custom-state)
(define-widget 'custom 'default (define-widget 'custom 'default
"Customize a user option." "Customize a user option."
@ -2092,20 +2112,22 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"."
;;; The `custom-comment' Widget. ;;; The `custom-comment' Widget.
;; like the editable field ;; like the editable field
(defface custom-comment-face '((((class grayscale color) (defface custom-comment '((((class grayscale color)
(background light)) (background light))
(:background "gray85")) (:background "gray85"))
(((class grayscale color) (((class grayscale color)
(background dark)) (background dark))
(:background "dim gray")) (:background "dim gray"))
(t (t
(:slant italic))) (:slant italic)))
"Face used for comments on variables or faces" "Face used for comments on variables or faces"
:version "21.1" :version "21.1"
:group 'custom-faces) :group 'custom-faces)
;; backward-compatibility alias
(put 'custom-comment-face 'face-alias 'custom-comment)
;; like font-lock-comment-face ;; like font-lock-comment-face
(defface custom-comment-tag-face (defface custom-comment-tag
'((((class color) (background dark)) (:foreground "gray80")) '((((class color) (background dark)) (:foreground "gray80"))
(((class color) (background light)) (:foreground "blue4")) (((class color) (background light)) (:foreground "blue4"))
(((class grayscale) (background light)) (((class grayscale) (background light))
@ -2115,6 +2137,8 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"."
(t (:weight bold))) (t (:weight bold)))
"Face used for variables or faces comment tags" "Face used for variables or faces comment tags"
:group 'custom-faces) :group 'custom-faces)
;; backward-compatibility alias
(put 'custom-comment-tag-face 'face-alias 'custom-comment-tag)
(define-widget 'custom-comment 'string (define-widget 'custom-comment 'string
"User comment." "User comment."
@ -2154,7 +2178,7 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"."
;; When this was underlined blue, users confused it with a ;; When this was underlined blue, users confused it with a
;; Mosaic-style hyperlink... ;; Mosaic-style hyperlink...
(defface custom-variable-tag-face (defface custom-variable-tag
`((((class color) `((((class color)
(background dark)) (background dark))
(:foreground "light blue" :weight bold :height 1.2 :inherit variable-pitch)) (:foreground "light blue" :weight bold :height 1.2 :inherit variable-pitch))
@ -2163,14 +2187,18 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"."
(:foreground "blue1" :weight bold :height 1.2 :inherit variable-pitch)) (:foreground "blue1" :weight bold :height 1.2 :inherit variable-pitch))
(((class color) (((class color)
(background light)) (background light))
(:foreground "blue" :weight bold :height 1.2 :inherit variable-pitch)) (:foreground "blue" :weight bold :height 1.2 :inherit variable-pitch))
(t (:weight bold))) (t (:weight bold)))
"Face used for unpushable variable tags." "Face used for unpushable variable tags."
:group 'custom-faces) :group 'custom-faces)
;; backward-compatibility alias
(put 'custom-variable-tag-face 'face-alias 'custom-variable-tag)
(defface custom-variable-button-face '((t (:underline t :weight bold))) (defface custom-variable-button '((t (:underline t :weight bold)))
"Face used for pushable variable tags." "Face used for pushable variable tags."
:group 'custom-faces) :group 'custom-faces)
;; backward-compatibility alias
(put 'custom-variable-button-face 'face-alias 'custom-variable-button)
(defcustom custom-variable-default-form 'edit (defcustom custom-variable-default-form 'edit
"Default form of displaying variable values." "Default form of displaying variable values."
@ -2874,10 +2902,12 @@ Only match frames that support the specified face attributes.")
;;; The `custom-face' Widget. ;;; The `custom-face' Widget.
(defface custom-face-tag-face (defface custom-face-tag
`((t (:weight bold :height 1.2 :inherit variable-pitch))) `((t (:weight bold :height 1.2 :inherit variable-pitch)))
"Face used for face tags." "Face used for face tags."
:group 'custom-faces) :group 'custom-faces)
;; backward-compatibility alias
(put 'custom-face-tag-face 'face-alias 'custom-face-tag)
(defcustom custom-face-default-form 'selected (defcustom custom-face-default-form 'selected
"Default form of displaying face definition." "Default form of displaying face definition."
@ -3396,12 +3426,11 @@ restoring it to the state of a face that has never been customized."
;; Fixme: make it do so in Emacs. ;; Fixme: make it do so in Emacs.
"Face used for group tags. "Face used for group tags.
The first member is used for level 1 groups, the second for level 2, The first member is used for level 1 groups, the second for level 2,
and so forth. The remaining group tags are shown with and so forth. The remaining group tags are shown with `custom-group-tag'."
`custom-group-tag-face'."
:type '(repeat face) :type '(repeat face)
:group 'custom-faces) :group 'custom-faces)
(defface custom-group-tag-face-1 (defface custom-group-tag-1
`((((class color) `((((class color)
(background dark)) (background dark))
(:foreground "pink" :weight bold :height 1.2 :inherit variable-pitch)) (:foreground "pink" :weight bold :height 1.2 :inherit variable-pitch))
@ -3414,8 +3443,10 @@ and so forth. The remaining group tags are shown with
(t (:weight bold))) (t (:weight bold)))
"Face used for group tags." "Face used for group tags."
:group 'custom-faces) :group 'custom-faces)
;; backward-compatibility alias
(put 'custom-group-tag-face-1 'face-alias 'custom-group-tag-1)
(defface custom-group-tag-face (defface custom-group-tag
`((((class color) `((((class color)
(background dark)) (background dark))
(:foreground "light blue" :weight bold :height 1.2)) (:foreground "light blue" :weight bold :height 1.2))
@ -3428,6 +3459,8 @@ and so forth. The remaining group tags are shown with
(t (:weight bold))) (t (:weight bold)))
"Face used for low level group tags." "Face used for low level group tags."
:group 'custom-faces) :group 'custom-faces)
;; backward-compatibility alias
(put 'custom-group-tag-face 'face-alias 'custom-group-tag)
(define-widget 'custom-group 'custom (define-widget 'custom-group 'custom
"Customize group." "Customize group."
@ -3448,7 +3481,7 @@ and so forth. The remaining group tags are shown with
(defun custom-group-sample-face-get (widget) (defun custom-group-sample-face-get (widget)
;; Use :sample-face. ;; Use :sample-face.
(or (nth (1- (widget-get widget :custom-level)) custom-group-tag-faces) (or (nth (1- (widget-get widget :custom-level)) custom-group-tag-faces)
'custom-group-tag-face)) 'custom-group-tag))
(define-widget 'custom-group-visibility 'visibility (define-widget 'custom-group-visibility 'visibility
"An indicator and manipulator for hidden group contents." "An indicator and manipulator for hidden group contents."
@ -4261,13 +4294,12 @@ if that value is non-nil."
(make-local-variable 'custom-options) (make-local-variable 'custom-options)
(make-local-variable 'custom-local-buffer) (make-local-variable 'custom-local-buffer)
(make-local-variable 'widget-documentation-face) (make-local-variable 'widget-documentation-face)
(setq widget-documentation-face 'custom-documentation-face) (setq widget-documentation-face 'custom-documentation)
(make-local-variable 'widget-button-face) (make-local-variable 'widget-button-face)
(setq widget-button-face 'custom-button-face) (setq widget-button-face 'custom-button)
(set (make-local-variable 'widget-button-pressed-face) (set (make-local-variable 'widget-button-pressed-face) 'custom-button-pressed)
'custom-button-pressed-face)
(set (make-local-variable 'widget-mouse-face) (set (make-local-variable 'widget-mouse-face)
'custom-button-pressed-face) ; buttons `depress' when moused 'custom-button-pressed) ; buttons `depress' when moused
;; When possible, use relief for buttons, not bracketing. This test ;; When possible, use relief for buttons, not bracketing. This test
;; may not be optimal. ;; may not be optimal.
(when custom-raised-buttons (when custom-raised-buttons

View file

@ -322,6 +322,8 @@ since it could result in memory overflow and make Emacs crash."
(eq system-type 'ms-dos)) (eq system-type 'ms-dos))
((string-match "\\`w32-" (symbol-name symbol)) ((string-match "\\`w32-" (symbol-name symbol))
(eq system-type 'windows-nt)) (eq system-type 'windows-nt))
((string-match "\\`x-.*gtk" (symbol-name symbol))
(or (boundp 'gtk) (not (eq system-type 'windows-nt))))
((string-match "\\`x-" (symbol-name symbol)) ((string-match "\\`x-" (symbol-name symbol))
(fboundp 'x-create-frame)) (fboundp 'x-create-frame))
(t t)))) (t t))))

View file

@ -1,6 +1,6 @@
;;; cvs-status.el --- major mode for browsing `cvs status' output -*- coding: utf-8 -*- ;;; cvs-status.el --- major mode for browsing `cvs status' output -*- coding: utf-8 -*-
;; Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc. ;; Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@cs.yale.edu> ;; Author: Stefan Monnier <monnier@cs.yale.edu>
;; Keywords: pcl-cvs cvs status tree tools ;; Keywords: pcl-cvs cvs status tree tools
@ -73,8 +73,8 @@
(defconst cvs-status-font-lock-keywords (defconst cvs-status-font-lock-keywords
`((,cvs-status-entry-leader-re `((,cvs-status-entry-leader-re
(1 'cvs-filename-face) (1 'cvs-filename)
(2 'cvs-need-action-face)) (2 'cvs-need-action))
(,cvs-status-tags-leader-re (,cvs-status-tags-leader-re
(,cvs-status-rev-re (,cvs-status-rev-re
(save-excursion (re-search-forward "^\n" nil 'move) (point)) (save-excursion (re-search-forward "^\n" nil 'move) (point))

View file

@ -175,7 +175,7 @@ when editing big diffs)."
;;;; font-lock support ;;;; font-lock support
;;;; ;;;;
(defface diff-header-face (defface diff-header
'((((class color) (min-colors 88) (background light)) '((((class color) (min-colors 88) (background light))
:background "grey85") :background "grey85")
(((class color) (min-colors 88) (background dark)) (((class color) (min-colors 88) (background dark))
@ -187,9 +187,11 @@ when editing big diffs)."
(t :weight bold)) (t :weight bold))
"`diff-mode' face inherited by hunk and index header faces." "`diff-mode' face inherited by hunk and index header faces."
:group 'diff-mode) :group 'diff-mode)
(defvar diff-header-face 'diff-header-face) ;; backward-compatibility alias
(put 'diff-header-face 'face-alias 'diff-header)
(defvar diff-header-face 'diff-header)
(defface diff-file-header-face (defface diff-file-header
'((((class color) (min-colors 88) (background light)) '((((class color) (min-colors 88) (background light))
:background "grey70" :weight bold) :background "grey70" :weight bold)
(((class color) (min-colors 88) (background dark)) (((class color) (min-colors 88) (background dark))
@ -201,61 +203,76 @@ when editing big diffs)."
(t :weight bold)) ; :height 1.3 (t :weight bold)) ; :height 1.3
"`diff-mode' face used to highlight file header lines." "`diff-mode' face used to highlight file header lines."
:group 'diff-mode) :group 'diff-mode)
(defvar diff-file-header-face 'diff-file-header-face) ;; backward-compatibility alias
(put 'diff-file-header-face 'face-alias 'diff-file-header)
(defvar diff-file-header-face 'diff-file-header)
(defface diff-index-face (defface diff-index
'((t :inherit diff-file-header-face)) '((t :inherit diff-file-header))
"`diff-mode' face used to highlight index header lines." "`diff-mode' face used to highlight index header lines."
:group 'diff-mode) :group 'diff-mode)
(defvar diff-index-face 'diff-index-face) ;; backward-compatibility alias
(put 'diff-index-face 'face-alias 'diff-index)
(defvar diff-index-face 'diff-index)
(defface diff-hunk-header-face (defface diff-hunk-header
'((t :inherit diff-header-face)) '((t :inherit diff-header))
"`diff-mode' face used to highlight hunk header lines." "`diff-mode' face used to highlight hunk header lines."
:group 'diff-mode) :group 'diff-mode)
(defvar diff-hunk-header-face 'diff-hunk-header-face) ;; backward-compatibility alias
(put 'diff-hunk-header-face 'face-alias 'diff-hunk-header)
(defvar diff-hunk-header-face 'diff-hunk-header)
(defface diff-removed-face (defface diff-removed
'((t :inherit diff-changed-face)) '((t :inherit diff-changed))
"`diff-mode' face used to highlight removed lines." "`diff-mode' face used to highlight removed lines."
:group 'diff-mode) :group 'diff-mode)
(defvar diff-removed-face 'diff-removed-face) ;; backward-compatibility alias
(put 'diff-removed-face 'face-alias 'diff-removed)
(defvar diff-removed-face 'diff-removed)
(defface diff-added-face (defface diff-added
'((t :inherit diff-changed-face)) '((t :inherit diff-changed))
"`diff-mode' face used to highlight added lines." "`diff-mode' face used to highlight added lines."
:group 'diff-mode) :group 'diff-mode)
(defvar diff-added-face 'diff-added-face) ;; backward-compatibility alias
(put 'diff-added-face 'face-alias 'diff-added)
(defvar diff-added-face 'diff-added)
(defface diff-changed-face (defface diff-changed
'((((type tty pc) (class color) (background light)) '((((type tty pc) (class color) (background light))
:foreground "magenta" :weight bold :slant italic) :foreground "magenta" :weight bold :slant italic)
(((type tty pc) (class color) (background dark)) (((type tty pc) (class color) (background dark))
:foreground "yellow" :weight bold :slant italic)) :foreground "yellow" :weight bold :slant italic))
"`diff-mode' face used to highlight changed lines." "`diff-mode' face used to highlight changed lines."
:group 'diff-mode) :group 'diff-mode)
(defvar diff-changed-face 'diff-changed-face) ;; backward-compatibility alias
(put 'diff-changed-face 'face-alias 'diff-changed)
(defvar diff-changed-face 'diff-changed)
(defface diff-function-face (defface diff-function
'((t :inherit diff-context-face)) '((t :inherit diff-context))
"`diff-mode' face used to highlight function names produced by \"diff -p\"." "`diff-mode' face used to highlight function names produced by \"diff -p\"."
:group 'diff-mode) :group 'diff-mode)
(defvar diff-function-face 'diff-function-face) ;; backward-compatibility alias
(put 'diff-function-face 'face-alias 'diff-function)
(defvar diff-function-face 'diff-function)
(defface diff-context-face (defface diff-context
'((((class color) (background light)) '((t :inherit shadow))
:foreground "grey50")
(((class color) (background dark))
:foreground "grey70"))
"`diff-mode' face used to highlight context and other side-information." "`diff-mode' face used to highlight context and other side-information."
:group 'diff-mode) :group 'diff-mode)
(defvar diff-context-face 'diff-context-face) ;; backward-compatibility alias
(put 'diff-context-face 'face-alias 'diff-context)
(defvar diff-context-face 'diff-context)
(defface diff-nonexistent-face (defface diff-nonexistent
'((t :inherit diff-file-header-face)) '((t :inherit diff-file-header))
"`diff-mode' face used to highlight nonexistent files in recursive diffs." "`diff-mode' face used to highlight nonexistent files in recursive diffs."
:group 'diff-mode) :group 'diff-mode)
(defvar diff-nonexistent-face 'diff-nonexistent-face) ;; backward-compatibility alias
(put 'diff-nonexistent-face 'face-alias 'diff-nonexistent)
(defvar diff-nonexistent-face 'diff-nonexistent)
(defconst diff-yank-handler '(diff-yank-function)) (defconst diff-yank-handler '(diff-yank-function))
(defun diff-yank-function (text) (defun diff-yank-function (text)
@ -918,7 +935,7 @@ See `after-change-functions' for the meaning of BEG, END and LEN."
Supports unified and context diffs as well as (to a lesser extent) Supports unified and context diffs as well as (to a lesser extent)
normal diffs. normal diffs.
When the buffer is read-only, the ESC prefix is not necessary. When the buffer is read-only, the ESC prefix is not necessary.
IF you edit the buffer manually, diff-mode will try to update the hunk If you edit the buffer manually, diff-mode will try to update the hunk
headers for you on-the-fly. headers for you on-the-fly.
You can also switch between context diff and unified diff with \\[diff-context->unified], You can also switch between context diff and unified diff with \\[diff-context->unified],

View file

@ -356,7 +356,7 @@ Subexpression 2 must end right before the \\n or \\r.")
"Face name used for symbolic links.") "Face name used for symbolic links.")
(defface dired-ignored (defface dired-ignored
'((t (:inherit font-lock-string-face))) '((t (:inherit shadow)))
"Face used for files suffixed with `completion-ignored-extensions'." "Face used for files suffixed with `completion-ignored-extensions'."
:group 'dired-faces :group 'dired-faces
:version "22.1") :version "22.1")

View file

@ -1353,7 +1353,7 @@ Symlinks and the likes are not handled.
If FILTER-RE is non-nil, recursive checking in directories If FILTER-RE is non-nil, recursive checking in directories
affects only files whose names match the expression." affects only files whose names match the expression."
;; Normalize empty filter RE to nil. ;; Normalize empty filter RE to nil.
(unless (length filter-re) (setq filter-re nil)) (unless (> (length filter-re) 0) (setq filter-re nil))
;; Indicate progress ;; Indicate progress
(message "Comparing '%s' and '%s' modulo '%s'" d1 d2 filter-re) (message "Comparing '%s' and '%s' modulo '%s'" d1 d2 filter-re)
(cond (cond
@ -1367,27 +1367,11 @@ affects only files whose names match the expression."
(if (eq ediff-recurse-to-subdirectories 'yes) (if (eq ediff-recurse-to-subdirectories 'yes)
(let* ((all-entries-1 (directory-files d1 t filter-re)) (let* ((all-entries-1 (directory-files d1 t filter-re))
(all-entries-2 (directory-files d2 t filter-re)) (all-entries-2 (directory-files d2 t filter-re))
(entries-1 (remove-if (lambda (s) (entries-1 (ediff-delete-all-matches "^\\.\\.?$" all-entries-1))
(string-match "^\\.\\.?$" (entries-2 (ediff-delete-all-matches "^\\.\\.?$" all-entries-2))
(file-name-nondirectory s)))
all-entries-1))
(entries-2 (remove-if (lambda (s)
(string-match "^\\.\\.?$"
(file-name-nondirectory s)))
all-entries-2))
) )
;; First, check only the names (works quickly and ensures a
;; precondition for subsequent code) (ediff-same-file-contents-lists entries-1 entries-2 filter-re)
(if (and (= (length entries-1) (length entries-2))
(every (lambda (a b) (equal (file-name-nondirectory a)
(file-name-nondirectory b)))
entries-1 entries-2))
;; With name equality established, compare the entries
;; through recursion.
(every (lambda (a b)
(ediff-same-contents a b filter-re))
entries-1 entries-2)
)
)) ))
) ; end of the directories case ) ; end of the directories case
;; D1 & D2 are both files => compare directly ;; D1 & D2 are both files => compare directly
@ -1398,6 +1382,42 @@ affects only files whose names match the expression."
) )
) )
;; If lists have the same length and names of files are pairwise equal
;; (removing the directories) then compare contents pairwise.
;; True if all contents are the same; false otherwise
(defun ediff-same-file-contents-lists (entries-1 entries-2 filter-re)
;; First, check only the names (works quickly and ensures a
;; precondition for subsequent code)
(if (and (= (length entries-1) (length entries-2))
(equal (mapcar 'file-name-nondirectory entries-1)
(mapcar 'file-name-nondirectory entries-2)))
;; With name equality established, compare the entries
;; through recursion.
(let ((continue t))
(while (and entries-1 continue)
(if (ediff-same-contents
(car entries-1) (car entries-2) filter-re)
(setq entries-1 (cdr entries-1)
entries-2 (cdr entries-2))
(setq continue nil))
)
;; if reached the end then lists are equal
(null entries-1))
)
)
;; ARG1 is a regexp, ARG2 is a list of full-filenames
;; Delete all entries that match the regexp
(defun ediff-delete-all-matches (regex file-list-list)
(let (result elt)
(while file-list-list
(setq elt (car file-list-list))
(or (string-match regex (file-name-nondirectory elt))
(setq result (cons elt result)))
(setq file-list-list (cdr file-list-list)))
(reverse result)))
;;; Local Variables: ;;; Local Variables:
;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun) ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)

View file

@ -132,7 +132,7 @@ Normally, not a user option. See `ediff-help-message' for details.")
"Normally, not a user option. See `ediff-help-message' for details.") "Normally, not a user option. See `ediff-help-message' for details.")
(defconst ediff-brief-message-string (defconst ediff-brief-message-string
" ? -quick help " " Type ? for help"
"Contents of the brief help message.") "Contents of the brief help message.")
;; The actual brief help message ;; The actual brief help message
(ediff-defvar-local ediff-brief-help-message "" (ediff-defvar-local ediff-brief-help-message ""

View file

@ -410,7 +410,8 @@ Commands:
\\{ediff-meta-buffer-map}" \\{ediff-meta-buffer-map}"
(kill-all-local-variables) (kill-all-local-variables)
(setq major-mode 'ediff-meta-mode) (setq major-mode 'ediff-meta-mode)
(setq mode-name "MetaEdiff")) (setq mode-name "MetaEdiff")
(run-mode-hooks 'ediff-meta-mode-hook))
;; the keymap for the buffer showing directory differences ;; the keymap for the buffer showing directory differences
@ -560,17 +561,23 @@ behavior."
(ediff-add-slash-if-directory auxdir1 elt)) (ediff-add-slash-if-directory auxdir1 elt))
lis1) lis1)
auxdir2 (file-name-as-directory dir2) auxdir2 (file-name-as-directory dir2)
lis2 (directory-files auxdir2 nil regexp)
lis2 (delete "." lis2)
lis2 (delete ".." lis2)
lis2 (mapcar lis2 (mapcar
(lambda (elt) (lambda (elt)
(ediff-add-slash-if-directory auxdir2 elt)) (ediff-add-slash-if-directory auxdir2 elt))
(directory-files auxdir2 nil regexp))) lis2))
(if (stringp dir3) (if (stringp dir3)
(setq auxdir3 (file-name-as-directory dir3) (setq auxdir3 (file-name-as-directory dir3)
lis3 (directory-files auxdir3 nil regexp)
lis3 (delete "." lis3)
lis3 (delete ".." lis3)
lis3 (mapcar lis3 (mapcar
(lambda (elt) (lambda (elt)
(ediff-add-slash-if-directory auxdir3 elt)) (ediff-add-slash-if-directory auxdir3 elt))
(directory-files auxdir3 nil regexp)))) lis3)))
(if (ediff-nonempty-string-p merge-autostore-dir) (if (ediff-nonempty-string-p merge-autostore-dir)
(setq merge-autostore-dir (setq merge-autostore-dir

View file

@ -7,7 +7,7 @@
;; Keywords: comparing, merging, patching, tools, unix ;; Keywords: comparing, merging, patching, tools, unix
(defconst ediff-version "2.80" "The current version of Ediff") (defconst ediff-version "2.80" "The current version of Ediff")
(defconst ediff-date "February 19, 2005" "Date of last update") (defconst ediff-date "June 3, 2005" "Date of last update")
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.

View file

@ -85,7 +85,7 @@
;; (items u8) ;; (items u8)
;; (fill 3) ;; (fill 3)
;; (item repeat (items) ;; (item repeat (items)
;; ((struct data-spec))))) ;; (struct data-spec))))
;; ;;
;; ;;
;; A binary data representation may look like ;; A binary data representation may look like
@ -131,7 +131,7 @@
;; | ( [FIELD] align LEN ) -- skip to next multiple of LEN bytes ;; | ( [FIELD] align LEN ) -- skip to next multiple of LEN bytes
;; | ( [FIELD] struct SPEC_NAME ) ;; | ( [FIELD] struct SPEC_NAME )
;; | ( [FIELD] union TAG_VAL (TAG SPEC)... [(t SPEC)] ) ;; | ( [FIELD] union TAG_VAL (TAG SPEC)... [(t SPEC)] )
;; | ( [FIELD] repeat COUNT SPEC ) ;; | ( [FIELD] repeat COUNT ITEM... )
;; -- In (eval EXPR), the value of the last field is available in ;; -- In (eval EXPR), the value of the last field is available in
;; the dynamically bound variable `last'. ;; the dynamically bound variable `last'.
@ -151,7 +151,8 @@
;; -- Note: 32 bit values may be limited by emacs' INTEGER ;; -- Note: 32 bit values may be limited by emacs' INTEGER
;; implementation limits. ;; implementation limits.
;; ;;
;; -- Example: bits 2 will map bytes 0x1c 0x28 to list (2 3 7 11 13) ;; -- Example: `bits 2' will unpack 0x28 0x1c to (2 3 4 11 13)
;; and 0x1c 0x28 to (3 5 10 11 12).
;; FIELD ::= ( eval EXPR ) -- use result as NAME ;; FIELD ::= ( eval EXPR ) -- use result as NAME
;; | NAME ;; | NAME

View file

@ -100,23 +100,23 @@ The return value of this function is not used."
(eval-and-compile (eval-and-compile
(put ',name 'byte-optimizer 'byte-compile-inline-expand)))) (put ',name 'byte-optimizer 'byte-compile-inline-expand))))
(defun make-obsolete (function new &optional when) (defun make-obsolete (obsolete-name current-name &optional when)
"Make the byte-compiler warn that FUNCTION is obsolete. "Make the byte-compiler warn that OBSOLETE-NAME is obsolete.
The warning will say that NEW should be used instead. The warning will say that CURRENT-NAME should be used instead.
If NEW is a string, that is the `use instead' message. If CURRENT-NAME is a string, that is the `use instead' message.
If provided, WHEN should be a string indicating when the function If provided, WHEN should be a string indicating when the function
was first made obsolete, for example a date or a release number." was first made obsolete, for example a date or a release number."
(interactive "aMake function obsolete: \nxObsoletion replacement: ") (interactive "aMake function obsolete: \nxObsoletion replacement: ")
(let ((handler (get function 'byte-compile))) (let ((handler (get obsolete-name 'byte-compile)))
(if (eq 'byte-compile-obsolete handler) (if (eq 'byte-compile-obsolete handler)
(setq handler (nth 1 (get function 'byte-obsolete-info))) (setq handler (nth 1 (get obsolete-name 'byte-obsolete-info)))
(put function 'byte-compile 'byte-compile-obsolete)) (put obsolete-name 'byte-compile 'byte-compile-obsolete))
(put function 'byte-obsolete-info (list new handler when))) (put obsolete-name 'byte-obsolete-info (list current-name handler when)))
function) obsolete-name)
(defmacro define-obsolete-function-alias (function new (defmacro define-obsolete-function-alias (obsolete-name current-name
&optional when docstring) &optional when docstring)
"Set FUNCTION's function definition to NEW and mark it obsolete. "Set OBSOLETE-NAME's function definition to CURRENT-NAME and mark it obsolete.
\(define-obsolete-function-alias 'old-fun 'new-fun \"22.1\" \"old-fun's doc.\") \(define-obsolete-function-alias 'old-fun 'new-fun \"22.1\" \"old-fun's doc.\")
@ -127,13 +127,13 @@ is equivalent to the following two lines of code:
See the docstrings of `defalias' and `make-obsolete' for more details." See the docstrings of `defalias' and `make-obsolete' for more details."
`(progn `(progn
(defalias ,function ,new ,docstring) (defalias ,obsolete-name ,current-name ,docstring)
(make-obsolete ,function ,new ,when))) (make-obsolete ,obsolete-name ,current-name ,when)))
(defun make-obsolete-variable (variable new &optional when) (defun make-obsolete-variable (obsolete-name current-name &optional when)
"Make the byte-compiler warn that VARIABLE is obsolete. "Make the byte-compiler warn that OBSOLETE-NAME is obsolete.
The warning will say that NEW should be used instead. The warning will say that CURRENT-NAME should be used instead.
If NEW is a string, that is the `use instead' message. If CURRENT-NAME is a string, that is the `use instead' message.
If provided, WHEN should be a string indicating when the variable If provided, WHEN should be a string indicating when the variable
was first made obsolete, for example a date or a release number." was first made obsolete, for example a date or a release number."
(interactive (interactive
@ -142,12 +142,12 @@ was first made obsolete, for example a date or a release number."
(if (equal str "") (error "")) (if (equal str "") (error ""))
(intern str)) (intern str))
(car (read-from-string (read-string "Obsoletion replacement: "))))) (car (read-from-string (read-string "Obsoletion replacement: ")))))
(put variable 'byte-obsolete-variable (cons new when)) (put obsolete-name 'byte-obsolete-variable (cons current-name when))
variable) obsolete-name)
(defmacro define-obsolete-variable-alias (variable new (defmacro define-obsolete-variable-alias (obsolete-name current-name
&optional when docstring) &optional when docstring)
"Make VARIABLE a variable alias for NEW and mark it obsolete. "Make OBSOLETE-NAME a variable alias for CURRENT-NAME and mark it obsolete.
\(define-obsolete-variable-alias 'old-var 'new-var \"22.1\" \"old-var's doc.\") \(define-obsolete-variable-alias 'old-var 'new-var \"22.1\" \"old-var's doc.\")
@ -159,8 +159,8 @@ is equivalent to the following two lines of code:
See the docstrings of `defvaralias' and `make-obsolete-variable' or See the docstrings of `defvaralias' and `make-obsolete-variable' or
Info node `(elisp)Variable Aliases' for more details." Info node `(elisp)Variable Aliases' for more details."
`(progn `(progn
(defvaralias ,variable ,new ,docstring) (defvaralias ,obsolete-name ,current-name ,docstring)
(make-obsolete-variable ,variable ,new ,when))) (make-obsolete-variable ,obsolete-name ,current-name ,when)))
(defmacro dont-compile (&rest body) (defmacro dont-compile (&rest body)
"Like `progn', but the body always runs interpreted (not compiled). "Like `progn', but the body always runs interpreted (not compiled).

View file

@ -88,6 +88,8 @@ This is to optimize `debugger-make-xrefs'.")
(defvar debugger-outer-standard-output) (defvar debugger-outer-standard-output)
(defvar debugger-outer-inhibit-redisplay) (defvar debugger-outer-inhibit-redisplay)
(defvar debugger-outer-cursor-in-echo-area) (defvar debugger-outer-cursor-in-echo-area)
(defvar debugger-will-be-back nil
"Non-nil if we expect to get back in the debugger soon.")
(defvar inhibit-debug-on-entry nil (defvar inhibit-debug-on-entry nil
"Non-nil means that debug-on-entry is disabled.") "Non-nil means that debug-on-entry is disabled.")
@ -97,6 +99,8 @@ This is to optimize `debugger-make-xrefs'.")
This variable is used by `debugger-jump', `debugger-step-through', This variable is used by `debugger-jump', `debugger-step-through',
and `debugger-reenable' to temporarily disable debug-on-entry.") and `debugger-reenable' to temporarily disable debug-on-entry.")
(defvar inhibit-trace) ;Not yet implemented.
;;;###autoload ;;;###autoload
(setq debugger 'debug) (setq debugger 'debug)
;;;###autoload ;;;###autoload
@ -121,6 +125,7 @@ first will be printed into the backtrace buffer."
(get-buffer-create "*Backtrace*"))) (get-buffer-create "*Backtrace*")))
(debugger-old-buffer (current-buffer)) (debugger-old-buffer (current-buffer))
(debugger-step-after-exit nil) (debugger-step-after-exit nil)
(debugger-will-be-back nil)
;; Don't keep reading from an executing kbd macro! ;; Don't keep reading from an executing kbd macro!
(executing-kbd-macro nil) (executing-kbd-macro nil)
;; Save the outer values of these vars for the `e' command ;; Save the outer values of these vars for the `e' command
@ -178,7 +183,7 @@ first will be printed into the backtrace buffer."
;; Place an extra debug-on-exit for macro's. ;; Place an extra debug-on-exit for macro's.
(when (eq 'lambda (car-safe (cadr (backtrace-frame 4)))) (when (eq 'lambda (car-safe (cadr (backtrace-frame 4))))
(backtrace-debug 5 t))) (backtrace-debug 5 t)))
(pop-to-buffer debugger-buffer) (pop-to-buffer debugger-buffer)
(debugger-mode) (debugger-mode)
(debugger-setup-buffer debugger-args) (debugger-setup-buffer debugger-args)
(when noninteractive (when noninteractive
@ -210,12 +215,23 @@ first will be printed into the backtrace buffer."
;; Still visible despite the save-window-excursion? Maybe it ;; Still visible despite the save-window-excursion? Maybe it
;; it's in a pop-up frame. It would be annoying to delete and ;; it's in a pop-up frame. It would be annoying to delete and
;; recreate it every time the debugger stops, so instead we'll ;; recreate it every time the debugger stops, so instead we'll
;; erase it and hide it but keep it alive. ;; erase it (and maybe hide it) but keep it alive.
(with-current-buffer debugger-buffer (with-current-buffer debugger-buffer
(erase-buffer) (erase-buffer)
(fundamental-mode) (fundamental-mode)
(with-selected-window (get-buffer-window debugger-buffer 0) (with-selected-window (get-buffer-window debugger-buffer 0)
(bury-buffer))) (when (and (window-dedicated-p (selected-window))
(not debugger-will-be-back))
;; If the window is not dedicated, burying the buffer
;; will mean that the frame created for it is left
;; around showing some random buffer, and next time we
;; pop to the debugger buffer we'll create yet
;; another frame.
;; If debugger-will-be-back is non-nil, the frame
;; would need to be de-iconified anyway immediately
;; after when we re-enter the debugger, so iconifying it
;; here would cause flashing.
(bury-buffer))))
(kill-buffer debugger-buffer)) (kill-buffer debugger-buffer))
(set-match-data debugger-outer-match-data))) (set-match-data debugger-outer-match-data)))
;; Put into effect the modified values of these variables ;; Put into effect the modified values of these variables
@ -307,7 +323,7 @@ That buffer should be current already."
(save-excursion (save-excursion
(set-buffer (or buffer (current-buffer))) (set-buffer (or buffer (current-buffer)))
(setq buffer (current-buffer)) (setq buffer (current-buffer))
(let ((buffer-read-only nil) (let ((inhibit-read-only t)
(old-end (point-min)) (new-end (point-min))) (old-end (point-min)) (new-end (point-min)))
;; If we saved an old backtrace, find the common part ;; If we saved an old backtrace, find the common part
;; between the new and the old. ;; between the new and the old.
@ -377,6 +393,7 @@ Enter another debugger on next entry to eval, apply or funcall."
(interactive) (interactive)
(setq debugger-step-after-exit t) (setq debugger-step-after-exit t)
(setq debugger-jumping-flag t) (setq debugger-jumping-flag t)
(setq debugger-will-be-back t)
(add-hook 'post-command-hook 'debugger-reenable) (add-hook 'post-command-hook 'debugger-reenable)
(message "Proceeding, will debug on next eval or call.") (message "Proceeding, will debug on next eval or call.")
(exit-recursive-edit)) (exit-recursive-edit))
@ -387,6 +404,12 @@ Enter another debugger on next entry to eval, apply or funcall."
(unless debugger-may-continue (unless debugger-may-continue
(error "Cannot continue")) (error "Cannot continue"))
(message "Continuing.") (message "Continuing.")
(save-excursion
;; Check to see if we've flagged some frame for debug-on-exit, in which
;; case we'll probably come back to the debugger soon.
(goto-char (point-min))
(if (re-search-forward "^\\* " nil t)
(setq debugger-will-be-back t)))
(exit-recursive-edit)) (exit-recursive-edit))
(defun debugger-return-value (val) (defun debugger-return-value (val)
@ -397,6 +420,12 @@ will be used, such as in a debug on exit from a frame."
(setq debugger-value val) (setq debugger-value val)
(princ "Returning " t) (princ "Returning " t)
(prin1 debugger-value) (prin1 debugger-value)
(save-excursion
;; Check to see if we've flagged some frame for debug-on-exit, in which
;; case we'll probably come back to the debugger soon.
(goto-char (point-min))
(if (re-search-forward "^\\* " nil t)
(setq debugger-will-be-back t)))
(exit-recursive-edit)) (exit-recursive-edit))
(defun debugger-jump () (defun debugger-jump ()
@ -406,6 +435,7 @@ will be used, such as in a debug on exit from a frame."
(setq debugger-jumping-flag t) (setq debugger-jumping-flag t)
(add-hook 'post-command-hook 'debugger-reenable) (add-hook 'post-command-hook 'debugger-reenable)
(message "Continuing through this frame") (message "Continuing through this frame")
(setq debugger-will-be-back t)
(exit-recursive-edit)) (exit-recursive-edit))
(defun debugger-reenable () (defun debugger-reenable ()
@ -454,7 +484,7 @@ Applies to the frame whose line point is on in the backtrace."
(beginning-of-line) (beginning-of-line)
(backtrace-debug (debugger-frame-number) t) (backtrace-debug (debugger-frame-number) t)
(if (= (following-char) ? ) (if (= (following-char) ? )
(let ((buffer-read-only nil)) (let ((inhibit-read-only t))
(delete-char 1) (delete-char 1)
(insert ?*))) (insert ?*)))
(beginning-of-line)) (beginning-of-line))
@ -470,7 +500,7 @@ Applies to the frame whose line point is on in the backtrace."
(beginning-of-line) (beginning-of-line)
(backtrace-debug (debugger-frame-number) nil) (backtrace-debug (debugger-frame-number) nil)
(if (= (following-char) ?*) (if (= (following-char) ?*)
(let ((buffer-read-only nil)) (let ((inhibit-read-only t))
(delete-char 1) (delete-char 1)
(insert ? ))) (insert ? )))
(beginning-of-line)) (beginning-of-line))
@ -584,7 +614,7 @@ Applies to the frame whose line point is on in the backtrace."
(terpri)) (terpri))
(with-current-buffer (get-buffer debugger-record-buffer) (with-current-buffer (get-buffer debugger-record-buffer)
(message "%s" (message "%s"
(buffer-substring (line-beginning-position 0) (buffer-substring (line-beginning-position 0)
(line-end-position 0))))) (line-end-position 0)))))
@ -626,22 +656,29 @@ functions to break on entry."
;;;###autoload ;;;###autoload
(defun debug-on-entry (function) (defun debug-on-entry (function)
"Request FUNCTION to invoke debugger each time it is called. "Request FUNCTION to invoke debugger each time it is called.
If you tell the debugger to continue, FUNCTION's execution proceeds.
This works by modifying the definition of FUNCTION, When called interactively, prompt for FUNCTION in the minibuffer.
which must be written in Lisp, not predefined.
This works by modifying the definition of FUNCTION. If you tell the
debugger to continue, FUNCTION's execution proceeds. If FUNCTION is a
normal function or a macro written in Lisp, you can also step through
its execution. FUNCTION can also be a primitive that is not a special
form, in which case stepping is not possible. Break-on-entry for
primitive functions only works when that function is called from Lisp.
Use \\[cancel-debug-on-entry] to cancel the effect of this command. Use \\[cancel-debug-on-entry] to cancel the effect of this command.
Redefining FUNCTION also cancels it." Redefining FUNCTION also cancels it."
(interactive "aDebug on entry (to function): ") (interactive "aDebug on entry (to function): ")
(when (and (subrp (symbol-function function)) (when (and (subrp (symbol-function function))
(eq (cdr (subr-arity (symbol-function function))) 'unevalled)) (eq (cdr (subr-arity (symbol-function function))) 'unevalled))
(error "Function %s is a special form" function)) (error "Function %s is a special form" function))
(if (or (symbolp (symbol-function function)) (if (or (symbolp (symbol-function function))
(subrp (symbol-function function))) (subrp (symbol-function function)))
;; The function is built-in or aliased to another function. ;; The function is built-in or aliased to another function.
;; Create a wrapper in which we can add the debug call. ;; Create a wrapper in which we can add the debug call.
(fset function `(lambda (&rest debug-on-entry-args) (fset function `(lambda (&rest debug-on-entry-args)
,(interactive-form (symbol-function function)) ,(interactive-form (symbol-function function))
(apply ',(symbol-function function) (apply ',(symbol-function function)
debug-on-entry-args))) debug-on-entry-args)))
(when (eq (car-safe (symbol-function function)) 'autoload) (when (eq (car-safe (symbol-function function)) 'autoload)
;; The function is autoloaded. Load its real definition. ;; The function is autoloaded. Load its real definition.
@ -662,14 +699,19 @@ Redefining FUNCTION also cancels it."
;;;###autoload ;;;###autoload
(defun cancel-debug-on-entry (&optional function) (defun cancel-debug-on-entry (&optional function)
"Undo effect of \\[debug-on-entry] on FUNCTION. "Undo effect of \\[debug-on-entry] on FUNCTION.
If argument is nil or an empty string, cancel for all functions." If FUNCTION is nil, cancel debug-on-entry for all functions.
When called interactively, prompt for FUNCTION in the minibuffer.
To specify a nil argument interactively, exit with an empty minibuffer."
(interactive (interactive
(list (let ((name (list (let ((name
(completing-read "Cancel debug on entry (to function): " (completing-read
(mapcar 'symbol-name debug-function-list) "Cancel debug on entry to function (default: all functions): "
nil t nil))) (mapcar 'symbol-name debug-function-list) nil t)))
(if name (intern name))))) (when name
(if (and function (not (string= function ""))) (unless (string= name "")
(intern name))))))
(if (and function
(not (string= function ""))) ; Pre 22.1 compatibility test.
(progn (progn
(let ((defn (debug-on-entry-1 function nil))) (let ((defn (debug-on-entry-1 function nil)))
(condition-case nil (condition-case nil
@ -709,7 +751,7 @@ If argument is nil or an empty string, cancel for all functions."
(defun debug-on-entry-1 (function flag) (defun debug-on-entry-1 (function flag)
(let* ((defn (symbol-function function)) (let* ((defn (symbol-function function))
(tail defn)) (tail defn))
(when (eq (car-safe tail) 'macro) (when (eq (car-safe tail) 'macro)
(setq tail (cdr tail))) (setq tail (cdr tail)))
(if (not (eq (car-safe tail) 'lambda)) (if (not (eq (car-safe tail) 'lambda))
;; Only signal an error when we try to set debug-on-entry. ;; Only signal an error when we try to set debug-on-entry.

View file

@ -1,5 +1,5 @@
;;; derived.el --- allow inheritance of major modes ;;; derived.el --- allow inheritance of major modes
;;; (formerly mode-clone.el) ;; (formerly mode-clone.el)
;; Copyright (C) 1993, 1994, 1999, 2003 Free Software Foundation, Inc. ;; Copyright (C) 1993, 1994, 1999, 2003 Free Software Foundation, Inc.
@ -221,6 +221,12 @@ See Info node `(elisp)Derived Modes' for more details."
(get (quote ,parent) 'mode-class))) (get (quote ,parent) 'mode-class)))
; Set up maps and tables. ; Set up maps and tables.
(unless (keymap-parent ,map) (unless (keymap-parent ,map)
;; It would probably be better to set the keymap's parent
;; at the toplevel rather than inside the mode function,
;; but this is not easy for at least the following reasons:
;; - the parent (and its keymap) may not yet be loaded.
;; - the parent's keymap name may be called something else
;; than <parent>-mode-map.
(set-keymap-parent ,map (current-local-map))) (set-keymap-parent ,map (current-local-map)))
,(when declare-syntax ,(when declare-syntax
`(let ((parent (char-table-parent ,syntax))) `(let ((parent (char-table-parent ,syntax)))
@ -440,5 +446,5 @@ Where the new table already has an entry, nothing is copied from the old one."
(provide 'derived) (provide 'derived)
;;; arch-tag: 630be248-47d1-4f02-afa0-8207de0ebea0 ;; arch-tag: 630be248-47d1-4f02-afa0-8207de0ebea0
;;; derived.el ends here ;;; derived.el ends here

View file

@ -183,13 +183,18 @@ Use the command `%s' to change this variable." pretty-name mode))
(let ((curfile (or (and (boundp 'byte-compile-current-file) (let ((curfile (or (and (boundp 'byte-compile-current-file)
byte-compile-current-file) byte-compile-current-file)
load-file-name))) load-file-name))
`(defcustom ,mode ,init-value base-doc-string)
,(format "Non-nil if %s is enabled. (setq base-doc-string "Non-nil if %s is enabled.
See the command `%s' for a description of this minor-mode. See the command `%s' for a description of this minor-mode.
Setting this variable directly does not take effect; Setting this variable directly does not take effect;
use either \\[customize] or the function `%s'." use either \\[customize] or the function `%s'.")
pretty-name mode mode) (if (null body)
(setq base-doc-string "Non-nil if %s is enabled.
See the command `%s' for a description of this minor-mode."))
`(defcustom ,mode ,init-value
,(format base-doc-string pretty-name mode mode)
:set 'custom-set-minor-mode :set 'custom-set-minor-mode
:initialize 'custom-initialize-default :initialize 'custom-initialize-default
,@group ,@group
@ -271,14 +276,26 @@ With zero or negative ARG turn mode off.
TURN-ON is a function that will be called with no args in every buffer TURN-ON is a function that will be called with no args in every buffer
and that should try to turn MODE on if applicable for that buffer. and that should try to turn MODE on if applicable for that buffer.
KEYS is a list of CL-style keyword arguments: KEYS is a list of CL-style keyword arguments:
:group to specify the custom group." :group to specify the custom group.
If MODE's set-up depends on the major mode in effect when it was
enabled, then disabling and reenabling MODE should make MODE work
correctly with the current major mode. This is important to
prevent problems with derived modes, that is, major modes that
call another major mode in their body."
(let* ((global-mode-name (symbol-name global-mode)) (let* ((global-mode-name (symbol-name global-mode))
(pretty-name (easy-mmode-pretty-mode-name mode)) (pretty-name (easy-mmode-pretty-mode-name mode))
(pretty-global-name (easy-mmode-pretty-mode-name global-mode)) (pretty-global-name (easy-mmode-pretty-mode-name global-mode))
(group nil) (group nil)
(extra-args nil) (extra-args nil)
(buffers (intern (concat global-mode-name "-buffers"))) (MODE-buffers (intern (concat global-mode-name "-buffers")))
(cmmh (intern (concat global-mode-name "-cmmh")))) (MODE-enable-in-buffers
(intern (concat global-mode-name "-enable-in-buffers")))
(MODE-check-buffers
(intern (concat global-mode-name "-check-buffers")))
(MODE-cmhh (intern (concat global-mode-name "-cmhh")))
(MODE-major-mode (intern (concat (symbol-name mode) "-major-mode"))))
;; Check keys. ;; Check keys.
(while (keywordp (car keys)) (while (keywordp (car keys))
@ -294,6 +311,8 @@ KEYS is a list of CL-style keyword arguments:
"-mode\\'" "" (symbol-name mode)))))) "-mode\\'" "" (symbol-name mode))))))
`(progn `(progn
(defvar ,MODE-major-mode nil)
(make-variable-buffer-local ',MODE-major-mode)
;; The actual global minor-mode ;; The actual global minor-mode
(define-minor-mode ,global-mode (define-minor-mode ,global-mode
,(format "Toggle %s in every buffer. ,(format "Toggle %s in every buffer.
@ -306,10 +325,13 @@ in which `%s' turns it on."
;; Setup hook to handle future mode changes and new buffers. ;; Setup hook to handle future mode changes and new buffers.
(if ,global-mode (if ,global-mode
(progn (progn
(add-hook 'after-change-major-mode-hook ',buffers) (add-hook 'after-change-major-mode-hook
(add-hook 'change-major-mode-hook ',cmmh)) ',MODE-enable-in-buffers)
(remove-hook 'after-change-major-mode-hook ',buffers) (add-hook 'find-file-hook ',MODE-check-buffers)
(remove-hook 'change-major-mode-hook ',cmmh)) (add-hook 'change-major-mode-hook ',MODE-cmhh))
(remove-hook 'after-change-major-mode-hook ',MODE-enable-in-buffers)
(remove-hook 'find-file-hook ',MODE-check-buffers)
(remove-hook 'change-major-mode-hook ',MODE-cmhh))
;; Go through existing buffers. ;; Go through existing buffers.
(dolist (buf (buffer-list)) (dolist (buf (buffer-list))
@ -321,22 +343,33 @@ in which `%s' turns it on."
:autoload-end :autoload-end
;; List of buffers left to process. ;; List of buffers left to process.
(defvar ,buffers nil) (defvar ,MODE-buffers nil)
;; The function that calls TURN-ON in each buffer. ;; The function that calls TURN-ON in each buffer.
(defun ,buffers () (defun ,MODE-enable-in-buffers ()
(remove-hook 'post-command-hook ',buffers) (dolist (buf ,MODE-buffers)
(while ,buffers (when (buffer-live-p buf)
(let ((buf (pop ,buffers))) (with-current-buffer buf
(when (buffer-live-p buf) (if ,mode
(with-current-buffer buf (,turn-on)))))) (unless (eq ,MODE-major-mode major-mode)
(put ',buffers 'definition-name ',global-mode) (,mode -1)
(,turn-on)
(setq ,MODE-major-mode major-mode))
(,turn-on)
(setq ,MODE-major-mode major-mode))))))
(put ',MODE-enable-in-buffers 'definition-name ',global-mode)
(defun ,MODE-check-buffers ()
(,MODE-enable-in-buffers)
(setq ,MODE-buffers nil)
(remove-hook 'post-command-hook ',MODE-check-buffers))
(put ',MODE-check-buffers 'definition-name ',global-mode)
;; The function that catches kill-all-local-variables. ;; The function that catches kill-all-local-variables.
(defun ,cmmh () (defun ,MODE-cmhh ()
(add-to-list ',buffers (current-buffer)) (add-to-list ',MODE-buffers (current-buffer))
(add-hook 'post-command-hook ',buffers)) (add-hook 'post-command-hook ',MODE-check-buffers))
(put ',cmmh 'definition-name ',global-mode)))) (put ',MODE-cmhh 'definition-name ',global-mode))))
;;; ;;;
;;; easy-mmode-defmap ;;; easy-mmode-defmap

View file

@ -80,7 +80,7 @@ using but only when you also use Edebug."
;;;###autoload ;;;###autoload
(defcustom edebug-all-defs nil (defcustom edebug-all-defs nil
"*If non-nil, evaluation of any defining forms will instrument for Edebug. "*If non-nil, evaluating defining forms instruments for Edebug.
This applies to `eval-defun', `eval-region', `eval-buffer', and This applies to `eval-defun', `eval-region', `eval-buffer', and
`eval-current-buffer'. `eval-region' is also called by `eval-current-buffer'. `eval-region' is also called by
`eval-last-sexp', and `eval-print-last-sexp'. `eval-last-sexp', and `eval-print-last-sexp'.
@ -141,10 +141,10 @@ it."
:group 'edebug) :group 'edebug)
(defcustom edebug-initial-mode 'step (defcustom edebug-initial-mode 'step
"*Initial execution mode for Edebug, if non-nil. If this variable "*Initial execution mode for Edebug, if non-nil.
is non-@code{nil}, it specifies the initial execution mode for Edebug If this variable is non-nil, it specifies the initial execution mode
when it is first activated. Possible values are step, next, go, for Edebug when it is first activated. Possible values are step, next,
Go-nonstop, trace, Trace-fast, continue, and Continue-fast." go, Go-nonstop, trace, Trace-fast, continue, and Continue-fast."
:type '(choice (const step) (const next) (const go) :type '(choice (const step) (const next) (const go)
(const Go-nonstop) (const trace) (const Go-nonstop) (const trace)
(const Trace-fast) (const continue) (const Trace-fast) (const continue)
@ -180,15 +180,15 @@ Use this with caution since it is not debugged."
(defcustom edebug-print-length 50 (defcustom edebug-print-length 50
"*Default value of `print-length' to use while printing results in Edebug." "*Default value of `print-length' for printing results in Edebug."
:type 'integer :type 'integer
:group 'edebug) :group 'edebug)
(defcustom edebug-print-level 50 (defcustom edebug-print-level 50
"*Default value of `print-level' to use while printing results in Edebug." "*Default value of `print-level' for printing results in Edebug."
:type 'integer :type 'integer
:group 'edebug) :group 'edebug)
(defcustom edebug-print-circle t (defcustom edebug-print-circle t
"*Default value of `print-circle' to use while printing results in Edebug." "*Default value of `print-circle' for printing results in Edebug."
:type 'boolean :type 'boolean
:group 'edebug) :group 'edebug)
@ -3189,8 +3189,8 @@ The default is one second."
(defun edebug-modify-breakpoint (flag &optional condition temporary) (defun edebug-modify-breakpoint (flag &optional condition temporary)
"Modify the breakpoint for the form at point or after it according "Modify the breakpoint for the form at point or after it.
to FLAG: set if t, clear if nil. Then move to that point. Set it if FLAG is non-nil, clear it otherwise. Then move to that point.
If CONDITION or TEMPORARY are non-nil, add those attributes to If CONDITION or TEMPORARY are non-nil, add those attributes to
the breakpoint. " the breakpoint. "
(let ((edebug-stop-point (edebug-find-stop-point))) (let ((edebug-stop-point (edebug-find-stop-point)))
@ -3729,12 +3729,13 @@ Print result in minibuffer."
(eval-expression-print-format (car values)))))) (eval-expression-print-format (car values))))))
(defun edebug-eval-last-sexp () (defun edebug-eval-last-sexp ()
"Evaluate sexp before point in the outside environment; value in minibuffer." "Evaluate sexp before point in the outside environment.
Print value in minibuffer."
(interactive) (interactive)
(edebug-eval-expression (edebug-last-sexp))) (edebug-eval-expression (edebug-last-sexp)))
(defun edebug-eval-print-last-sexp () (defun edebug-eval-print-last-sexp ()
"Evaluate sexp before point in the outside environment; insert the value. "Evaluate sexp before point in outside environment; insert value.
This prints the value into current buffer." This prints the value into current buffer."
(interactive) (interactive)
(let* ((edebug-form (edebug-last-sexp)) (let* ((edebug-form (edebug-last-sexp))
@ -4014,20 +4015,19 @@ May only be called from within edebug-recursive-edit."
(defvar edebug-eval-mode-map nil (defvar edebug-eval-mode-map nil
"Keymap for Edebug Eval mode. Superset of Lisp Interaction mode.") "Keymap for Edebug Eval mode. Superset of Lisp Interaction mode.")
(if edebug-eval-mode-map (unless edebug-eval-mode-map
nil (setq edebug-eval-mode-map (make-sparse-keymap))
(setq edebug-eval-mode-map (copy-keymap lisp-interaction-mode-map)) (set-keymap-parent edebug-eval-mode-map lisp-interaction-mode-map)
(define-key edebug-eval-mode-map "\C-c\C-w" 'edebug-where) (define-key edebug-eval-mode-map "\C-c\C-w" 'edebug-where)
(define-key edebug-eval-mode-map "\C-c\C-d" 'edebug-delete-eval-item) (define-key edebug-eval-mode-map "\C-c\C-d" 'edebug-delete-eval-item)
(define-key edebug-eval-mode-map "\C-c\C-u" 'edebug-update-eval-list) (define-key edebug-eval-mode-map "\C-c\C-u" 'edebug-update-eval-list)
(define-key edebug-eval-mode-map "\C-x\C-e" 'edebug-eval-last-sexp) (define-key edebug-eval-mode-map "\C-x\C-e" 'edebug-eval-last-sexp)
(define-key edebug-eval-mode-map "\C-j" 'edebug-eval-print-last-sexp) (define-key edebug-eval-mode-map "\C-j" 'edebug-eval-print-last-sexp))
)
(put 'edebug-eval-mode 'mode-class 'special) (put 'edebug-eval-mode 'mode-class 'special)
(defun edebug-eval-mode () (define-derived-mode edebug-eval-mode lisp-interaction-mode "Edebug Eval"
"Mode for evaluation list buffer while in Edebug. "Mode for evaluation list buffer while in Edebug.
In addition to all Interactive Emacs Lisp commands there are local and In addition to all Interactive Emacs Lisp commands there are local and
@ -4039,12 +4039,7 @@ Eval list buffer commands:
\\{edebug-eval-mode-map} \\{edebug-eval-mode-map}
Global commands prefixed by global-edebug-prefix: Global commands prefixed by global-edebug-prefix:
\\{global-edebug-map} \\{global-edebug-map}")
"
(lisp-interaction-mode)
(setq major-mode 'edebug-eval-mode)
(setq mode-name "Edebug Eval")
(use-local-map edebug-eval-mode-map))
;;; Interface with standard debugger. ;;; Interface with standard debugger.

View file

@ -264,7 +264,7 @@ start position and the element DATA."
(defun ewoc--delete-node-internal (ewoc node) (defun ewoc--delete-node-internal (ewoc node)
"Delete a data string from EWOC. "Delete a data string from EWOC.
Can not be used on the footer. Returns the wrapper that is deleted. Can not be used on the footer. Return the wrapper that is deleted.
The start-marker in the wrapper is set to nil, so that it doesn't The start-marker in the wrapper is set to nil, so that it doesn't
consume any more resources." consume any more resources."
(let ((dll (ewoc--dll ewoc)) (let ((dll (ewoc--dll ewoc))
@ -334,25 +334,27 @@ be inserted at the bottom of the ewoc."
(defalias 'ewoc-data 'ewoc--node-data) (defalias 'ewoc-data 'ewoc--node-data)
(defun ewoc-enter-first (ewoc data) (defun ewoc-enter-first (ewoc data)
"Enter DATA first in EWOC." "Enter DATA first in EWOC.
Return the new node."
(ewoc--set-buffer-bind-dll ewoc (ewoc--set-buffer-bind-dll ewoc
(ewoc-enter-after ewoc (ewoc--node-nth dll 0) data))) (ewoc-enter-after ewoc (ewoc--node-nth dll 0) data)))
(defun ewoc-enter-last (ewoc data) (defun ewoc-enter-last (ewoc data)
"Enter DATA last in EWOC." "Enter DATA last in EWOC.
Return the new node."
(ewoc--set-buffer-bind-dll ewoc (ewoc--set-buffer-bind-dll ewoc
(ewoc-enter-before ewoc (ewoc--node-nth dll -1) data))) (ewoc-enter-before ewoc (ewoc--node-nth dll -1) data)))
(defun ewoc-enter-after (ewoc node data) (defun ewoc-enter-after (ewoc node data)
"Enter a new element DATA after NODE in EWOC. "Enter a new element DATA after NODE in EWOC.
Returns the new NODE." Return the new node."
(ewoc--set-buffer-bind-dll ewoc (ewoc--set-buffer-bind-dll ewoc
(ewoc-enter-before ewoc (ewoc--node-next dll node) data))) (ewoc-enter-before ewoc (ewoc--node-next dll node) data)))
(defun ewoc-enter-before (ewoc node data) (defun ewoc-enter-before (ewoc node data)
"Enter a new element DATA before NODE in EWOC. "Enter a new element DATA before NODE in EWOC.
Returns the new NODE." Return the new node."
(ewoc--set-buffer-bind-dll ewoc (ewoc--set-buffer-bind-dll ewoc
(ewoc--node-enter-before (ewoc--node-enter-before
node node
@ -362,15 +364,15 @@ Returns the new NODE."
(ewoc--node-start-marker node))))) (ewoc--node-start-marker node)))))
(defun ewoc-next (ewoc node) (defun ewoc-next (ewoc node)
"Get the next node. "Return the node in EWOC that follows NODE.
Returns nil if NODE is nil or the last element." Return nil if NODE is nil or the last element."
(when node (when node
(ewoc--filter-hf-nodes (ewoc--filter-hf-nodes
ewoc (ewoc--node-next (ewoc--dll ewoc) node)))) ewoc (ewoc--node-next (ewoc--dll ewoc) node))))
(defun ewoc-prev (ewoc node) (defun ewoc-prev (ewoc node)
"Get the previous node. "Return the node in EWOC that precedes NODE.
Returns nil if NODE is nil or the first element." Return nil if NODE is nil or the first element."
(when node (when node
(ewoc--filter-hf-nodes (ewoc--filter-hf-nodes
ewoc ewoc
@ -497,16 +499,16 @@ If the EWOC is empty, nil is returned."
best-guess))))))) best-guess)))))))
(defun ewoc-invalidate (ewoc &rest nodes) (defun ewoc-invalidate (ewoc &rest nodes)
"Refresh some elements. "Call EWOC's pretty-printer for each element in NODES.
The pretty-printer set for EWOC will be called for all NODES." Delete current text first, thus effecting a \"refresh\"."
(ewoc--set-buffer-bind-dll ewoc (ewoc--set-buffer-bind-dll ewoc
(dolist (node nodes) (dolist (node nodes)
(ewoc--refresh-node (ewoc--pretty-printer ewoc) node)))) (ewoc--refresh-node (ewoc--pretty-printer ewoc) node))))
(defun ewoc-goto-prev (ewoc arg) (defun ewoc-goto-prev (ewoc arg)
"Move point to the ARGth previous element. "Move point to the ARGth previous element in EWOC.
Don't move if we are at the first element, or if EWOC is empty. Don't move if we are at the first element, or if EWOC is empty.
Returns the node we moved to." Return the node we moved to."
(ewoc--set-buffer-bind-dll-let* ewoc (ewoc--set-buffer-bind-dll-let* ewoc
((node (ewoc-locate ewoc (point)))) ((node (ewoc-locate ewoc (point))))
(when node (when node
@ -522,8 +524,8 @@ Returns the node we moved to."
(ewoc-goto-node ewoc node)))) (ewoc-goto-node ewoc node))))
(defun ewoc-goto-next (ewoc arg) (defun ewoc-goto-next (ewoc arg)
"Move point to the ARGth next element. "Move point to the ARGth next element in EWOC.
Returns the node (or nil if we just passed the last node)." Return the node (or nil if we just passed the last node)."
(ewoc--set-buffer-bind-dll-let* ewoc (ewoc--set-buffer-bind-dll-let* ewoc
((node (ewoc-locate ewoc (point)))) ((node (ewoc-locate ewoc (point))))
(while (and node (> arg 0)) (while (and node (> arg 0))
@ -535,7 +537,7 @@ Returns the node (or nil if we just passed the last node)."
(ewoc-goto-node ewoc node))) (ewoc-goto-node ewoc node)))
(defun ewoc-goto-node (ewoc node) (defun ewoc-goto-node (ewoc node)
"Move point to NODE." "Move point to NODE in EWOC."
(ewoc--set-buffer-bind-dll ewoc (ewoc--set-buffer-bind-dll ewoc
(goto-char (ewoc--node-start-marker node)) (goto-char (ewoc--node-start-marker node))
(if goal-column (move-to-column goal-column)) (if goal-column (move-to-column goal-column))
@ -586,7 +588,7 @@ remaining arguments will be passed to PREDICATE."
(defun ewoc-buffer (ewoc) (defun ewoc-buffer (ewoc)
"Return the buffer that is associated with EWOC. "Return the buffer that is associated with EWOC.
Returns nil if the buffer has been deleted." Return nil if the buffer has been deleted."
(let ((buf (ewoc--buffer ewoc))) (let ((buf (ewoc--buffer ewoc)))
(when (buffer-name buf) buf))) (when (buffer-name buf) buf)))

View file

@ -129,6 +129,7 @@
(put 'defmacro 'doc-string-elt 3) (put 'defmacro 'doc-string-elt 3)
(put 'defmacro* 'doc-string-elt 3) (put 'defmacro* 'doc-string-elt 3)
(put 'defsubst 'doc-string-elt 3) (put 'defsubst 'doc-string-elt 3)
(put 'defstruct 'doc-string-elt 2)
(put 'define-skeleton 'doc-string-elt 2) (put 'define-skeleton 'doc-string-elt 2)
(put 'define-derived-mode 'doc-string-elt 4) (put 'define-derived-mode 'doc-string-elt 4)
(put 'define-compilation-mode 'doc-string-elt 3) (put 'define-compilation-mode 'doc-string-elt 3)
@ -194,7 +195,7 @@
(setq comment-start-skip "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *") (setq comment-start-skip "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *")
(make-local-variable 'font-lock-comment-start-skip) (make-local-variable 'font-lock-comment-start-skip)
;; Font lock mode uses this only when it KNOWS a comment is starting. ;; Font lock mode uses this only when it KNOWS a comment is starting.
(setq font-lock-comment-start-skip ";+ *") (setq font-lock-comment-start-skip ";+ *")
(make-local-variable 'comment-add) (make-local-variable 'comment-add)
(setq comment-add 1) ;default to `;;' in comment-region (setq comment-add 1) ;default to `;;' in comment-region
(make-local-variable 'comment-column) (make-local-variable 'comment-column)

View file

@ -1,6 +1,6 @@
;;;; testcover.el -- Visual code-coverage tool ;;;; testcover.el -- Visual code-coverage tool
;; Copyright (C) 2002 Free Software Foundation, Inc. ;; Copyright (C) 2002, 2005 Free Software Foundation, Inc.
;; Author: Jonathan Yavner <jyavner@member.fsf.org> ;; Author: Jonathan Yavner <jyavner@member.fsf.org>
;; Maintainer: Jonathan Yavner <jyavner@member.fsf.org> ;; Maintainer: Jonathan Yavner <jyavner@member.fsf.org>
@ -150,15 +150,19 @@ call to one of the `testcover-1value-functions'."
1-valued, no error if actually multi-valued." 1-valued, no error if actually multi-valued."
:group 'testcover) :group 'testcover)
(defface testcover-nohits-face (defface testcover-nohits
'((t (:background "DeepPink2"))) '((t (:background "DeepPink2")))
"Face for forms that had no hits during coverage test" "Face for forms that had no hits during coverage test"
:group 'testcover) :group 'testcover)
;; backward-compatibility alias
(put 'testcover-nohits-face 'face-alias 'testcover-nohits)
(defface testcover-1value-face (defface testcover-1value
'((t (:background "Wheat2"))) '((t (:background "Wheat2")))
"Face for forms that always produced the same value during coverage test" "Face for forms that always produced the same value during coverage test"
:group 'testcover) :group 'testcover)
;; backward-compatibility alias
(put 'testcover-1value-face 'face-alias 'testcover-1value)
;;;========================================================================= ;;;=========================================================================
@ -477,8 +481,8 @@ same value during coverage testing."
(defun testcover-mark (def) (defun testcover-mark (def)
"Marks one DEF (a function or macro symbol) to highlight its contained forms "Marks one DEF (a function or macro symbol) to highlight its contained forms
that did not get completely tested during coverage tests. that did not get completely tested during coverage tests.
A marking of testcover-nohits-face (default = red) indicates that the A marking with the face `testcover-nohits' (default = red) indicates that the
form was never evaluated. A marking of testcover-1value-face form was never evaluated. A marking using the `testcover-1value' face
\(default = tan) indicates that the form always evaluated to the same value. \(default = tan) indicates that the form always evaluated to the same value.
The forms throw, error, and signal are not marked. They do not return and The forms throw, error, and signal are not marked. They do not return and
would always get a red mark. Some forms that always return the same would always get a red mark. Some forms that always return the same
@ -506,8 +510,8 @@ eliminated by adding more test cases."
(setq ov (make-overlay (1- j) j)) (setq ov (make-overlay (1- j) j))
(overlay-put ov 'face (overlay-put ov 'face
(if (memq data '(unknown 1value)) (if (memq data '(unknown 1value))
'testcover-nohits-face 'testcover-nohits
'testcover-1value-face)))) 'testcover-1value))))
(set-buffer-modified-p changed)))) (set-buffer-modified-p changed))))
(defun testcover-mark-all (&optional buffer) (defun testcover-mark-all (&optional buffer)

View file

@ -384,13 +384,13 @@ and after the region marked by the rectangle to search."
:type 'boolean :type 'boolean
:group 'cua) :group 'cua)
(defface cua-rectangle-face (defface cua-rectangle
'((default :inherit region) '((default :inherit region)
(((class color)) :foreground "white" :background "maroon")) (((class color)) :foreground "white" :background "maroon"))
"*Font used by CUA for highlighting the rectangle." "*Font used by CUA for highlighting the rectangle."
:group 'cua) :group 'cua)
(defface cua-rectangle-noselect-face (defface cua-rectangle-noselect
'((default :inherit region) '((default :inherit region)
(((class color)) :foreground "white" :background "dimgray")) (((class color)) :foreground "white" :background "dimgray"))
"*Font used by CUA for highlighting the non-selected rectangle lines." "*Font used by CUA for highlighting the non-selected rectangle lines."
@ -404,7 +404,7 @@ and after the region marked by the rectangle to search."
:type 'boolean :type 'boolean
:group 'cua) :group 'cua)
(defface cua-global-mark-face (defface cua-global-mark
'((((min-colors 88)(class color)) :foreground "black" :background "yellow1") '((((min-colors 88)(class color)) :foreground "black" :background "yellow1")
(((class color)) :foreground "black" :background "yellow") (((class color)) :foreground "black" :background "yellow")
(t :bold t)) (t :bold t))
@ -447,13 +447,13 @@ a cons (TYPE . COLOR), then both properties are affected."
(choice :tag "Type" (choice :tag "Type"
(const :tag "Filled box" box) (const :tag "Filled box" box)
(const :tag "Vertical bar" bar) (const :tag "Vertical bar" bar)
(const :tag "Horisontal bar" hbar) (const :tag "Horizontal bar" hbar)
(const :tag "Hollow box" hollow)) (const :tag "Hollow box" hollow))
(cons :tag "Color and Type" (cons :tag "Color and Type"
(choice :tag "Type" (choice :tag "Type"
(const :tag "Filled box" box) (const :tag "Filled box" box)
(const :tag "Vertical bar" bar) (const :tag "Vertical bar" bar)
(const :tag "Horisontal bar" hbar) (const :tag "Horizontal bar" hbar)
(const :tag "Hollow box" hollow)) (const :tag "Hollow box" hollow))
(color :tag "Color"))) (color :tag "Color")))
:group 'cua) :group 'cua)
@ -471,13 +471,13 @@ a cons (TYPE . COLOR), then both properties are affected."
(choice :tag "Type" (choice :tag "Type"
(const :tag "Filled box" box) (const :tag "Filled box" box)
(const :tag "Vertical bar" bar) (const :tag "Vertical bar" bar)
(const :tag "Horisontal bar" hbar) (const :tag "Horizontal bar" hbar)
(const :tag "Hollow box" hollow)) (const :tag "Hollow box" hollow))
(cons :tag "Color and Type" (cons :tag "Color and Type"
(choice :tag "Type" (choice :tag "Type"
(const :tag "Filled box" box) (const :tag "Filled box" box)
(const :tag "Vertical bar" bar) (const :tag "Vertical bar" bar)
(const :tag "Horisontal bar" hbar) (const :tag "Horizontal bar" hbar)
(const :tag "Hollow box" hollow)) (const :tag "Hollow box" hollow))
(color :tag "Color"))) (color :tag "Color")))
:group 'cua) :group 'cua)
@ -495,13 +495,13 @@ a cons (TYPE . COLOR), then both properties are affected."
(choice :tag "Type" (choice :tag "Type"
(const :tag "Filled box" box) (const :tag "Filled box" box)
(const :tag "Vertical bar" bar) (const :tag "Vertical bar" bar)
(const :tag "Horisontal bar" hbar) (const :tag "Horizontal bar" hbar)
(const :tag "Hollow box" hollow)) (const :tag "Hollow box" hollow))
(cons :tag "Color and Type" (cons :tag "Color and Type"
(choice :tag "Type" (choice :tag "Type"
(const :tag "Filled box" box) (const :tag "Filled box" box)
(const :tag "Vertical bar" bar) (const :tag "Vertical bar" bar)
(const :tag "Horisontal bar" hbar) (const :tag "Horizontal bar" hbar)
(const :tag "Hollow box" hollow)) (const :tag "Hollow box" hollow))
(color :tag "Color"))) (color :tag "Color")))
:group 'cua) :group 'cua)
@ -520,13 +520,13 @@ a cons (TYPE . COLOR), then both properties are affected."
(choice :tag "Type" (choice :tag "Type"
(const :tag "Filled box" box) (const :tag "Filled box" box)
(const :tag "Vertical bar" bar) (const :tag "Vertical bar" bar)
(const :tag "Horisontal bar" hbar) (const :tag "Horizontal bar" hbar)
(const :tag "Hollow box" hollow)) (const :tag "Hollow box" hollow))
(cons :tag "Color and Type" (cons :tag "Color and Type"
(choice :tag "Type" (choice :tag "Type"
(const :tag "Filled box" box) (const :tag "Filled box" box)
(const :tag "Vertical bar" bar) (const :tag "Vertical bar" bar)
(const :tag "Horisontal bar" hbar) (const :tag "Horizontal bar" hbar)
(const :tag "Hollow box" hollow)) (const :tag "Hollow box" hollow))
(color :tag "Color"))) (color :tag "Color")))
:group 'cua) :group 'cua)
@ -1360,7 +1360,7 @@ paste (in addition to the normal emacs bindings)."
(if (not cua-mode) (if (not cua-mode)
(setq emulation-mode-map-alists (delq 'cua--keymap-alist emulation-mode-map-alists)) (setq emulation-mode-map-alists (delq 'cua--keymap-alist emulation-mode-map-alists))
(add-to-list 'emulation-mode-map-alists 'cua--keymap-alist) (add-to-ordered-list 'emulation-mode-map-alists 'cua--keymap-alist 400)
(cua--select-keymaps)) (cua--select-keymaps))
(cond (cond

View file

@ -74,7 +74,7 @@
(move-overlay cua--global-mark-overlay (point) (1+ (point))) (move-overlay cua--global-mark-overlay (point) (1+ (point)))
(setq cua--global-mark-overlay (setq cua--global-mark-overlay
(make-overlay (point) (1+ (point)))) (make-overlay (point) (1+ (point))))
(overlay-put cua--global-mark-overlay 'face 'cua-global-mark-face)) (overlay-put cua--global-mark-overlay 'face 'cua-global-mark))
(if (and cua-global-mark-blink-cursor-interval (if (and cua-global-mark-blink-cursor-interval
(not cua--orig-blink-cursor-interval)) (not cua--orig-blink-cursor-interval))
(setq cua--orig-blink-cursor-interval blink-cursor-interval (setq cua--orig-blink-cursor-interval blink-cursor-interval
@ -218,7 +218,7 @@ With prefix argument, don't jump to global mark when cancelling it."
(let ((olist (overlays-at (marker-position cua--global-mark-marker))) (let ((olist (overlays-at (marker-position cua--global-mark-marker)))
in-rect) in-rect)
(while olist (while olist
(if (eq (overlay-get (car olist) 'face) 'cua-rectangle-face) (if (eq (overlay-get (car olist) 'face) 'cua-rectangle)
(setq in-rect t olist nil) (setq in-rect t olist nil)
(setq olist (cdr olist)))) (setq olist (cdr olist))))
(if in-rect (if in-rect
@ -358,11 +358,6 @@ With prefix argument, don't jump to global mark when cancelling it."
;;; Initialization ;;; Initialization
(defun cua--init-global-mark () (defun cua--init-global-mark ()
(unless (face-background 'cua-global-mark-face)
(copy-face 'region 'cua-global-mark-face)
(set-face-foreground 'cua-global-mark-face "black")
(set-face-background 'cua-global-mark-face "cyan"))
(define-key cua--global-mark-keymap [remap copy-region-as-kill] 'cua-copy-to-global-mark) (define-key cua--global-mark-keymap [remap copy-region-as-kill] 'cua-copy-to-global-mark)
(define-key cua--global-mark-keymap [remap kill-ring-save] 'cua-copy-to-global-mark) (define-key cua--global-mark-keymap [remap kill-ring-save] 'cua-copy-to-global-mark)
(define-key cua--global-mark-keymap [remap kill-region] 'cua-cut-to-global-mark) (define-key cua--global-mark-keymap [remap kill-region] 'cua-cut-to-global-mark)

View file

@ -755,7 +755,7 @@ If command is repeated at same position, delete the rectangle."
(sit-for 0) ; make window top/bottom reliable (sit-for 0) ; make window top/bottom reliable
(cua--rectangle-operation nil t nil nil nil ; do not tabify (cua--rectangle-operation nil t nil nil nil ; do not tabify
'(lambda (s e l r v) '(lambda (s e l r v)
(let ((rface (if v 'cua-rectangle-face 'cua-rectangle-noselect-face)) (let ((rface (if v 'cua-rectangle 'cua-rectangle-noselect))
overlay bs ms as) overlay bs ms as)
(when (cua--rectangle-virtual-edges) (when (cua--rectangle-virtual-edges)
(let ((lb (line-beginning-position)) (let ((lb (line-beginning-position))

View file

@ -99,7 +99,7 @@ errors are suppressed."
(defcustom pc-select-selection-keys-only nil (defcustom pc-select-selection-keys-only nil
"*Non-nil means only bind the basic selection keys when started. "*Non-nil means only bind the basic selection keys when started.
Other keys that emulate pc-behavior will be untouched. Other keys that emulate pc-behavior will be untouched.
This gives mostly Emacs-like behaviour with only the selection keys enabled." This gives mostly Emacs-like behavior with only the selection keys enabled."
:type 'boolean :type 'boolean
:group 'pc-select) :group 'pc-select)
@ -825,7 +825,7 @@ If the value is non-nil, call the function MODE with an argument of
;;;###autoload ;;;###autoload
(define-minor-mode pc-selection-mode (define-minor-mode pc-selection-mode
"Change mark behaviour to emulate Motif, MAC or MS-Windows cut and paste style. "Change mark behavior to emulate Motif, MAC or MS-Windows cut and paste style.
This mode enables Delete Selection mode and Transient Mark mode. This mode enables Delete Selection mode and Transient Mark mode.
@ -971,7 +971,7 @@ but before calling PC Selection mode):
;;;###autoload ;;;###autoload
(defcustom pc-selection-mode nil (defcustom pc-selection-mode nil
"Toggle PC Selection mode. "Toggle PC Selection mode.
Change mark behaviour to emulate Motif, MAC or MS-Windows cut and paste style, Change mark behavior to emulate Motif, MAC or MS-Windows cut and paste style,
and cursor movement commands. and cursor movement commands.
This mode enables Delete Selection mode and Transient Mark mode. This mode enables Delete Selection mode and Transient Mark mode.
Setting this variable directly does not take effect; Setting this variable directly does not take effect;

View file

@ -520,7 +520,7 @@ set sw=n M-x set-variable vi-shift-width n "
"Go into insert state, the text entered will be repeated if REPETITION > 1. "Go into insert state, the text entered will be repeated if REPETITION > 1.
If PREFIX-CODE is given, do it before insertion begins if DO-IT-NOW-P is T. If PREFIX-CODE is given, do it before insertion begins if DO-IT-NOW-P is T.
In any case, the prefix-code will be done before each 'redo-insert'. In any case, the prefix-code will be done before each 'redo-insert'.
This function expects 'overwrite-mode' being set properly beforehand." This function expects `overwrite-mode' being set properly beforehand."
(if do-it-now-p (apply (car prefix-code) (cdr prefix-code))) (if do-it-now-p (apply (car prefix-code) (cdr prefix-code)))
(setq vi-ins-point (point)) (setq vi-ins-point (point))
(setq vi-ins-repetition repetition) (setq vi-ins-repetition repetition)

View file

@ -1342,7 +1342,7 @@ after search."
(defun vip-find-char-forward (arg) (defun vip-find-char-forward (arg)
"Find char on the line. If called interactively read the char to find "Find char on the line. If called interactively read the char to find
from the terminal, and if called from vip-repeat, the char last used is from the terminal, and if called from vip-repeat, the char last used is
used. This behaviour is controlled by the sign of prefix numeric value." used. This behavior is controlled by the sign of prefix numeric value."
(interactive "P") (interactive "P")
(let ((val (vip-p-val arg)) (com (vip-getcom arg))) (let ((val (vip-p-val arg)) (com (vip-getcom arg)))
(if (> val 0) (if (> val 0)

View file

@ -3131,7 +3131,7 @@ On reaching beginning of line, stop and signal error."
(defun viper-find-char-forward (arg) (defun viper-find-char-forward (arg)
"Find char on the line. "Find char on the line.
If called interactively read the char to find from the terminal, and if If called interactively read the char to find from the terminal, and if
called from viper-repeat, the char last used is used. This behaviour is called from viper-repeat, the char last used is used. This behavior is
controlled by the sign of prefix numeric value." controlled by the sign of prefix numeric value."
(interactive "P") (interactive "P")
(let ((val (viper-p-val arg)) (let ((val (viper-p-val arg))
@ -3672,8 +3672,8 @@ If MAJOR-MODE is set, set the macros only in that major mode."
(sit-for 2) (sit-for 2)
(viper-unrecord-kbd-macro "///" 'vi-state))) (viper-unrecord-kbd-macro "///" 'vi-state)))
)) ))
(defun viper-set-parsing-style-toggling-macro (unset) (defun viper-set-parsing-style-toggling-macro (unset)
"Set `%%%' to be a macro that toggles whether comment fields should be parsed for matching parentheses. "Set `%%%' to be a macro that toggles whether comment fields should be parsed for matching parentheses.
This is used in conjunction with the `%' command. This is used in conjunction with the `%' command.

View file

@ -1,6 +1,6 @@
;;; viper-init.el --- some common definitions for Viper ;;; viper-init.el --- some common definitions for Viper
;; Copyright (C) 1997, 98, 99, 2000, 01, 02 Free Software Foundation, Inc. ;; Copyright (C) 1997, 98, 99, 2000, 01, 02, 05 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
@ -850,74 +850,84 @@ Related buffers can be cycled through via :R and :P commands."
:group 'viper) :group 'viper)
(defface viper-search-face (defface viper-search
'((((class color)) (:foreground "Black" :background "khaki")) '((((class color)) (:foreground "Black" :background "khaki"))
(t (:underline t :stipple "gray3"))) (t (:underline t :stipple "gray3")))
"*Face used to flash out the search pattern." "*Face used to flash out the search pattern."
:group 'viper-highlighting) :group 'viper-highlighting)
;; backward-compatibility alias
(put 'viper-search-face 'face-alias 'viper-search)
;; An internal variable. Viper takes the face from here. ;; An internal variable. Viper takes the face from here.
(defvar viper-search-face 'viper-search-face (defvar viper-search-face 'viper-search
"Face used to flash out the search pattern. "Face used to flash out the search pattern.
DO NOT CHANGE this variable. Instead, use the customization widget DO NOT CHANGE this variable. Instead, use the customization widget
to customize the actual face object `viper-search-face' to customize the actual face object `viper-search-face'
this variable represents.") this variable represents.")
(viper-hide-face 'viper-search-face) (viper-hide-face 'viper-search)
(defface viper-replace-overlay-face (defface viper-replace-overlay
'((((class color)) (:foreground "Black" :background "darkseagreen2")) '((((class color)) (:foreground "Black" :background "darkseagreen2"))
(t (:underline t :stipple "gray3"))) (t (:underline t :stipple "gray3")))
"*Face for highlighting replace regions on a window display." "*Face for highlighting replace regions on a window display."
:group 'viper-highlighting) :group 'viper-highlighting)
;; backward-compatibility alias
(put 'viper-replace-overlay-face 'face-alias 'viper-replace-overlay)
;; An internal variable. Viper takes the face from here. ;; An internal variable. Viper takes the face from here.
(defvar viper-replace-overlay-face 'viper-replace-overlay-face (defvar viper-replace-overlay-face 'viper-replace-overlay
"Face for highlighting replace regions on a window display. "Face for highlighting replace regions on a window display.
DO NOT CHANGE this variable. Instead, use the customization widget DO NOT CHANGE this variable. Instead, use the customization widget
to customize the actual face object `viper-replace-overlay-face' to customize the actual face object `viper-replace-overlay-face'
this variable represents.") this variable represents.")
(viper-hide-face 'viper-replace-overlay-face) (viper-hide-face 'viper-replace-overlay)
(defface viper-minibuffer-emacs-face (defface viper-minibuffer-emacs
'((((class color)) (:foreground "Black" :background "darkseagreen2")) '((((class color)) (:foreground "Black" :background "darkseagreen2"))
(t (:weight bold))) (t (:weight bold)))
"Face used in the Minibuffer when it is in Emacs state." "Face used in the Minibuffer when it is in Emacs state."
:group 'viper-highlighting) :group 'viper-highlighting)
;; backward-compatibility alias
(put 'viper-minibuffer-emacs-face 'face-alias 'viper-minibuffer-emacs)
;; An internal variable. Viper takes the face from here. ;; An internal variable. Viper takes the face from here.
(defvar viper-minibuffer-emacs-face 'viper-minibuffer-emacs-face (defvar viper-minibuffer-emacs-face 'viper-minibuffer-emacs
"Face used in the Minibuffer when it is in Emacs state. "Face used in the Minibuffer when it is in Emacs state.
DO NOT CHANGE this variable. Instead, use the customization widget DO NOT CHANGE this variable. Instead, use the customization widget
to customize the actual face object `viper-minibuffer-emacs-face' to customize the actual face object `viper-minibuffer-emacs-face'
this variable represents.") this variable represents.")
(viper-hide-face 'viper-minibuffer-emacs-face) (viper-hide-face 'viper-minibuffer-emacs)
(defface viper-minibuffer-insert-face (defface viper-minibuffer-insert
'((((class color)) (:foreground "Black" :background "pink")) '((((class color)) (:foreground "Black" :background "pink"))
(t (:slant italic))) (t (:slant italic)))
"Face used in the Minibuffer when it is in Insert state." "Face used in the Minibuffer when it is in Insert state."
:group 'viper-highlighting) :group 'viper-highlighting)
;; backward-compatibility alias
(put 'viper-minibuffer-insert-face 'face-alias 'viper-minibuffer-insert)
;; An internal variable. Viper takes the face from here. ;; An internal variable. Viper takes the face from here.
(defvar viper-minibuffer-insert-face 'viper-minibuffer-insert-face (defvar viper-minibuffer-insert-face 'viper-minibuffer-insert
"Face used in the Minibuffer when it is in Insert state. "Face used in the Minibuffer when it is in Insert state.
DO NOT CHANGE this variable. Instead, use the customization widget DO NOT CHANGE this variable. Instead, use the customization widget
to customize the actual face object `viper-minibuffer-insert-face' to customize the actual face object `viper-minibuffer-insert-face'
this variable represents.") this variable represents.")
(viper-hide-face 'viper-minibuffer-insert-face) (viper-hide-face 'viper-minibuffer-insert)
(defface viper-minibuffer-vi-face (defface viper-minibuffer-vi
'((((class color)) (:foreground "DarkGreen" :background "grey")) '((((class color)) (:foreground "DarkGreen" :background "grey"))
(t (:inverse-video t))) (t (:inverse-video t)))
"Face used in the Minibuffer when it is in Vi state." "Face used in the Minibuffer when it is in Vi state."
:group 'viper-highlighting) :group 'viper-highlighting)
;; backward-compatibility alias
(put 'viper-minibuffer-vi-face 'face-alias 'viper-minibuffer-vi)
;; An internal variable. Viper takes the face from here. ;; An internal variable. Viper takes the face from here.
(defvar viper-minibuffer-vi-face 'viper-minibuffer-vi-face (defvar viper-minibuffer-vi-face 'viper-minibuffer-vi
"Face used in the Minibuffer when it is in Vi state. "Face used in the Minibuffer when it is in Vi state.
DO NOT CHANGE this variable. Instead, use the customization widget DO NOT CHANGE this variable. Instead, use the customization widget
to customize the actual face object `viper-minibuffer-vi-face' to customize the actual face object `viper-minibuffer-vi-face'
this variable represents.") this variable represents.")
(viper-hide-face 'viper-minibuffer-vi-face) (viper-hide-face 'viper-minibuffer-vi)
;; the current face to be used in the minibuffer ;; the current face to be used in the minibuffer
(viper-deflocalvar (viper-deflocalvar

View file

@ -50,16 +50,25 @@
;;; Variables ;;; Variables
(defvar viper-toggle-key "\C-z" (defcustom viper-toggle-key "\C-z"
"The key used to change states from emacs to Vi and back. "The key used to change states from emacs to Vi and back.
In insert mode, this key also functions as Meta. In insert mode, this key also functions as Meta.
Must be set in .viper file or prior to loading Viper. Must be set in .viper file or prior to loading Viper.
This setting cannot be changed interactively.") This setting cannot be changed interactively."
:type 'string
:group 'viper)
(defvar viper-ESC-key "\e" (defcustom viper-quoted-insert-key "\C-v"
"The key used to quote special characters when inserting them in Insert state."
:type 'string
:group 'viper)
(defcustom viper-ESC-key "\e"
"Key used to ESC. "Key used to ESC.
Must be set in .viper file or prior to loading Viper. Must be set in .viper file or prior to loading Viper.
This setting cannot be changed interactively.") This setting cannot be changed interactively."
:type 'string
:group 'viper)
;;; Emacs keys in other states. ;;; Emacs keys in other states.
@ -242,7 +251,7 @@ viper-insert-basic-map. Not recommended, except for novice users.")
(define-key viper-insert-basic-map "\C-t" 'viper-forward-indent) (define-key viper-insert-basic-map "\C-t" 'viper-forward-indent)
(define-key viper-insert-basic-map (define-key viper-insert-basic-map
(if viper-xemacs-p [(shift tab)] [S-tab]) 'viper-insert-tab) (if viper-xemacs-p [(shift tab)] [S-tab]) 'viper-insert-tab)
(define-key viper-insert-basic-map "\C-v" 'quoted-insert) (define-key viper-insert-basic-map viper-quoted-insert-key 'quoted-insert)
(define-key viper-insert-basic-map "\C-?" 'viper-del-backward-char-in-insert) (define-key viper-insert-basic-map "\C-?" 'viper-del-backward-char-in-insert)
(define-key viper-insert-basic-map [backspace] 'viper-del-backward-char-in-insert) (define-key viper-insert-basic-map [backspace] 'viper-del-backward-char-in-insert)
(define-key viper-insert-basic-map "\C-\\" 'viper-alternate-Meta-key) (define-key viper-insert-basic-map "\C-\\" 'viper-alternate-Meta-key)

View file

@ -990,12 +990,13 @@ remains buffer-local."
(setq global-mode-string (setq global-mode-string
(append '("" viper-mode-string) (cdr global-mode-string)))) (append '("" viper-mode-string) (cdr global-mode-string))))
(defadvice describe-key (before viper-read-keyseq-ad protect activate) (defadvice describe-key (before viper-describe-key-ad protect activate)
"Force to read key via `viper-read-key-sequence'." "Force to read key via `viper-read-key-sequence'."
(interactive (list (viper-read-key-sequence "Describe key: ")))) (interactive (list (viper-read-key-sequence "Describe key: "))
))
(defadvice describe-key-briefly (defadvice describe-key-briefly
(before viper-read-keyseq-ad protect activate) (before viper-describe-key-briefly-ad protect activate)
"Force to read key via `viper-read-key-sequence'." "Force to read key via `viper-read-key-sequence'."
(interactive (list (viper-read-key-sequence "Describe key briefly: ")))) (interactive (list (viper-read-key-sequence "Describe key briefly: "))))

View file

@ -297,7 +297,7 @@ This function is explicit for adding to `eshell-parse-argument-hook'."
nil) nil)
(defun eshell/export (&rest sets) (defun eshell/export (&rest sets)
"This alias allows the 'export' command to act as bash users expect." "This alias allows the `export' command to act as bash users expect."
(while sets (while sets
(if (and (stringp (car sets)) (if (and (stringp (car sets))
(string-match "^\\([^=]+\\)=\\(.*\\)" (car sets))) (string-match "^\\([^=]+\\)=\\(.*\\)" (car sets)))

View file

@ -1,6 +1,6 @@
;;; faces.el --- Lisp faces ;;; faces.el --- Lisp faces
;; Copyright (C) 1992,1993,1994,1995,1996,1998,1999,2000,2001,2002,2004 ;; Copyright (C) 1992,1993,1994,1995,1996,1998,1999,2000,2001,2002,2004,2005
;; Free Software Foundation, Inc. ;; Free Software Foundation, Inc.
;; Maintainer: FSF ;; Maintainer: FSF
@ -231,8 +231,8 @@ of a face name is the same for all frames."
(defun face-equal (face1 face2 &optional frame) (defun face-equal (face1 face2 &optional frame)
"Non-nil if faces FACE1 and FACE2 are equal. "Non-nil if faces FACE1 and FACE2 are equal.
Faces are considered equal if all their attributes are equal. Faces are considered equal if all their attributes are equal.
If the optional argument FRAME is given, report on face FACE in that frame. If the optional argument FRAME is given, report on FACE1 and FACE2 in that frame.
If FRAME is t, report on the defaults for face FACE (for new frames). If FRAME is t, report on the defaults for FACE1 and FACE2 (for new frames).
If FRAME is omitted or nil, use the selected frame." If FRAME is omitted or nil, use the selected frame."
(internal-lisp-face-equal-p face1 face2 frame)) (internal-lisp-face-equal-p face1 face2 frame))
@ -854,6 +854,8 @@ If MULTIPLE is non-nil, return a list of faces (possibly only one).
Otherwise, return a single face." Otherwise, return a single face."
(let ((faceprop (or (get-char-property (point) 'read-face-name) (let ((faceprop (or (get-char-property (point) 'read-face-name)
(get-char-property (point) 'face))) (get-char-property (point) 'face)))
(aliasfaces nil)
(nonaliasfaces nil)
faces) faces)
;; Make a list of the named faces that the `face' property uses. ;; Make a list of the named faces that the `face' property uses.
(if (and (listp faceprop) (if (and (listp faceprop)
@ -870,6 +872,13 @@ Otherwise, return a single face."
(memq (intern-soft (thing-at-point 'symbol)) (face-list))) (memq (intern-soft (thing-at-point 'symbol)) (face-list)))
(setq faces (list (intern-soft (thing-at-point 'symbol))))) (setq faces (list (intern-soft (thing-at-point 'symbol)))))
;; Build up the completion tables.
(mapatoms (lambda (s)
(if (custom-facep s)
(if (get s 'face-alias)
(push (symbol-name s) aliasfaces)
(push (symbol-name s) nonaliasfaces)))))
;; If we only want one, and the default is more than one, ;; If we only want one, and the default is more than one,
;; discard the unwanted ones now. ;; discard the unwanted ones now.
(unless multiple (unless multiple
@ -883,7 +892,7 @@ Otherwise, return a single face."
(if faces (mapconcat 'symbol-name faces ", ") (if faces (mapconcat 'symbol-name faces ", ")
string-describing-default)) string-describing-default))
(format "%s: " prompt)) (format "%s: " prompt))
obarray 'custom-facep t)) (complete-in-turn nonaliasfaces aliasfaces) nil t))
;; Canonicalize the output. ;; Canonicalize the output.
(output (output
(if (equal input "") (if (equal input "")
@ -1894,7 +1903,7 @@ created."
;; Make `modeline' an alias for `mode-line', for compatibility. ;; Make `modeline' an alias for `mode-line', for compatibility.
(put 'modeline 'face-alias 'mode-line) (put 'modeline 'face-alias 'mode-line)
(put 'modeline-inactive 'face-alias 'mode-line-inactive) (put 'modeline-inactive 'face-alias 'mode-line-inactive)
(put 'modeline-higilight 'face-alias 'mode-line-highlight) (put 'modeline-highlight 'face-alias 'mode-line-highlight)
(defface header-line (defface header-line
'((default '((default
@ -2115,13 +2124,32 @@ Note: Other faces cannot inherit from the cursor face."
:group 'whitespace ; like `show-trailing-whitespace' :group 'whitespace ; like `show-trailing-whitespace'
:group 'basic-faces) :group 'basic-faces)
(defface escape-glyph '((((background dark)) :foreground "cyan") (defface escape-glyph
;; See the comment in minibuffer-prompt for '((((background dark)) :foreground "pink2")
;; the reason not to use blue on MS-DOS. ;; See the comment in minibuffer-prompt for
(((type pc)) :foreground "magenta") ;; the reason not to use blue on MS-DOS.
(t :foreground "blue")) (((type pc)) :foreground "magenta")
;; red4 is too light -- rms.
(t :foreground "blue"))
"Face for characters displayed as ^-sequences or \-sequences." "Face for characters displayed as ^-sequences or \-sequences."
:group 'basic-faces) :group 'basic-faces
:version "22.1")
(defface no-break-space
'((((class color) (min-colors 88)) :inherit escape-glyph :underline t)
(((class color) (min-colors 8)) :background "magenta" :foreground )
(t :inverse-video t))
"Face for non-breaking space."
:group 'basic-faces
:version "22.1")
(defface shadow
'((((background dark)) :foreground "grey70")
(((background light)) :foreground "grey50"))
"Basic face for shadowed text."
:group 'basic-faces
:version "22.1")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Manipulating font names. ;;; Manipulating font names.
@ -2301,5 +2329,5 @@ If that can't be done, return nil."
(provide 'faces) (provide 'faces)
;;; arch-tag: 19a4759f-2963-445f-b004-425b9aadd7d6 ;; arch-tag: 19a4759f-2963-445f-b004-425b9aadd7d6
;;; faces.el ends here ;;; faces.el ends here

View file

@ -658,7 +658,7 @@ one or more of those symbols."
(defun locate-file-completion (string path-and-suffixes action) (defun locate-file-completion (string path-and-suffixes action)
"Do completion for file names passed to `locate-file'. "Do completion for file names passed to `locate-file'.
PATH-AND-SUFFIXES is a pair of lists (DIRECTORIES . SUFFIXES)." PATH-AND-SUFFIXES is a pair of lists, (DIRECTORIES . SUFFIXES)."
(if (file-name-absolute-p string) (if (file-name-absolute-p string)
(read-file-name-internal string nil action) (read-file-name-internal string nil action)
(let ((names nil) (let ((names nil)
@ -1766,12 +1766,12 @@ in that case, this function acts as if `enable-local-variables' were t."
("\\.ad[abs]\\'" . ada-mode) ("\\.ad[abs]\\'" . ada-mode)
("\\.ad[bs].dg\\'" . ada-mode) ("\\.ad[bs].dg\\'" . ada-mode)
("\\.\\([pP]\\([Llm]\\|erl\\|od\\)\\|al\\)\\'" . perl-mode) ("\\.\\([pP]\\([Llm]\\|erl\\|od\\)\\|al\\)\\'" . perl-mode)
("GNUmakefile\\'" . makefile-gmake-mode)
,@(if (memq system-type '(berkeley-unix next-mach darwin)) ,@(if (memq system-type '(berkeley-unix next-mach darwin))
'(("\\.mk\\'" . makefile-bsdmake-mode) '(("\\.mk\\'" . makefile-bsdmake-mode)
("GNUmakefile\\'" . makefile-gmake-mode)
("[Mm]akefile\\'" . makefile-bsdmake-mode)) ("[Mm]akefile\\'" . makefile-bsdmake-mode))
'(("\\.mk\\'" . makefile-gmake-mode) ; Might be any make, give Gnu the host advantage '(("\\.mk\\'" . makefile-gmake-mode) ; Might be any make, give Gnu the host advantage
("[Mm]akefile\\'" . makefile-mode))) ("[Mm]akefile\\'" . makefile-gmake-mode)))
("Makeppfile\\'" . makefile-makepp-mode) ("Makeppfile\\'" . makefile-makepp-mode)
("\\.am\\'" . makefile-automake-mode) ("\\.am\\'" . makefile-automake-mode)
;; Less common extensions come here ;; Less common extensions come here
@ -2159,9 +2159,9 @@ Otherwise, return nil; point may be changed."
(goto-char beg) (goto-char beg)
end)))) end))))
(defun hack-local-variables-confirm (string) (defun hack-local-variables-confirm (string flag-to-check)
(or (eq enable-local-variables t) (or (eq flag-to-check t)
(and enable-local-variables (and flag-to-check
(save-window-excursion (save-window-excursion
(condition-case nil (condition-case nil
(switch-to-buffer (current-buffer)) (switch-to-buffer (current-buffer))
@ -2236,7 +2236,8 @@ is specified, returning t if it is specified."
(if (and result (if (and result
(or mode-only (or mode-only
(hack-local-variables-confirm (hack-local-variables-confirm
"Set local variables as specified in -*- line of %s? "))) "Set local variables as specified in -*- line of %s? "
enable-local-variables)))
(let ((enable-local-eval enable-local-eval)) (let ((enable-local-eval enable-local-eval))
(while result (while result
(hack-one-local-variable (car (car result)) (cdr (car result))) (hack-one-local-variable (car (car result)) (cdr (car result)))
@ -2267,7 +2268,8 @@ is specified, returning t if it is specified."
(and (search-forward "Local Variables:" nil t) (and (search-forward "Local Variables:" nil t)
(or mode-only (or mode-only
(hack-local-variables-confirm (hack-local-variables-confirm
"Set local variables as specified at end of %s? ")))) "Set local variables as specified at end of %s? "
enable-local-variables))))
(skip-chars-forward " \t") (skip-chars-forward " \t")
(let ((enable-local-eval enable-local-eval) (let ((enable-local-eval enable-local-eval)
;; suffix is what comes after "local variables:" in its line. ;; suffix is what comes after "local variables:" in its line.
@ -2489,7 +2491,8 @@ is considered risky."
;; Permit eval if not root and user says ok. ;; Permit eval if not root and user says ok.
(and (not (zerop (user-uid))) (and (not (zerop (user-uid)))
(hack-local-variables-confirm (hack-local-variables-confirm
"Process `eval' or hook local variables in %s? "))) "Process `eval' or hook local variables in %s? "
enable-local-eval)))
(if (eq var 'eval) (if (eq var 'eval)
(save-excursion (eval val)) (save-excursion (eval val))
(make-local-variable var) (make-local-variable var)
@ -2851,7 +2854,7 @@ the value is \"\"."
(defcustom make-backup-file-name-function nil (defcustom make-backup-file-name-function nil
"A function to use instead of the default `make-backup-file-name'. "A function to use instead of the default `make-backup-file-name'.
A value of nil gives the default `make-backup-file-name' behaviour. A value of nil gives the default `make-backup-file-name' behavior.
This could be buffer-local to do something special for specific This could be buffer-local to do something special for specific
files. If you define it, you may need to change `backup-file-name-p' files. If you define it, you may need to change `backup-file-name-p'

View file

@ -650,8 +650,8 @@ the filename."
Has the form ((FILE-PATTERN VIEWER PROPERTIES) ...), VIEWER being either a Has the form ((FILE-PATTERN VIEWER PROPERTIES) ...), VIEWER being either a
function or a command name as string. function or a command name as string.
Properties is an association list determining filesets' behaviour in Properties is an association list determining filesets' behavior in
several conditions. Choose one from this list: several conditions. Choose one from this list:
:ignore-on-open-all ... Don't open files of this type automatically -- :ignore-on-open-all ... Don't open files of this type automatically --
i.e. on open-all-files-events or when running commands i.e. on open-all-files-events or when running commands

View file

@ -88,6 +88,8 @@ settings. See the variable `font-lock-defaults', which takes precedence.")
It will be passed one argument, which is the current value of It will be passed one argument, which is the current value of
`font-lock-mode'.") `font-lock-mode'.")
;; The mode for which font-lock was initialized, or nil if none.
(defvar font-lock-mode-major-mode)
(define-minor-mode font-lock-mode (define-minor-mode font-lock-mode
"Toggle Font Lock mode. "Toggle Font Lock mode.
With arg, turn Font Lock mode off if and only if arg is a non-positive With arg, turn Font Lock mode off if and only if arg is a non-positive
@ -156,7 +158,9 @@ your own function which is called when `font-lock-mode' is toggled via
;; Arrange to unfontify this buffer if we change major mode later. ;; Arrange to unfontify this buffer if we change major mode later.
(if font-lock-mode (if font-lock-mode
(add-hook 'change-major-mode-hook 'font-lock-change-mode nil t) (add-hook 'change-major-mode-hook 'font-lock-change-mode nil t)
(remove-hook 'change-major-mode-hook 'font-lock-change-mode t))) (remove-hook 'change-major-mode-hook 'font-lock-change-mode t))
(when font-lock-mode
(setq font-lock-mode-major-mode major-mode)))
;; Get rid of fontification for the old major mode. ;; Get rid of fontification for the old major mode.
;; We do this when changing major modes. ;; We do this when changing major modes.
@ -175,6 +179,7 @@ this function onto `change-major-mode-hook'."
'(font-lock-face))) '(font-lock-face)))
(restore-buffer-modified-p modp))) (restore-buffer-modified-p modp)))
(defvar font-lock-set-defaults)
(defun font-lock-default-function (mode) (defun font-lock-default-function (mode)
;; Turn on Font Lock mode. ;; Turn on Font Lock mode.
(when mode (when mode
@ -201,9 +206,14 @@ this function onto `change-major-mode-hook'."
;; Only do hard work if the mode has specified stuff in ;; Only do hard work if the mode has specified stuff in
;; `font-lock-defaults'. ;; `font-lock-defaults'.
(when (or font-lock-defaults (when (or font-lock-defaults
(and (boundp 'font-lock-keywords) font-lock-keywords) (if (boundp 'font-lock-keywords) font-lock-keywords)
(with-no-warnings (with-no-warnings
(cdr (assq major-mode font-lock-defaults-alist)))) (cdr (assq major-mode font-lock-defaults-alist)))
(and mode
(boundp 'font-lock-set-defaults)
font-lock-set-defaults
font-lock-mode-major-mode
(not (eq font-lock-mode-major-mode major-mode))))
(font-lock-mode-internal mode))) (font-lock-mode-internal mode)))
(defun turn-on-font-lock () (defun turn-on-font-lock ()

View file

@ -683,9 +683,22 @@ For example:
adds two fontification patterns for C mode, to fontify `FIXME:' words, even in adds two fontification patterns for C mode, to fontify `FIXME:' words, even in
comments, and to fontify `and', `or' and `not' words as keywords. comments, and to fontify `and', `or' and `not' words as keywords.
When used from a Lisp program (such as a minor mode), it is recommended to The above procedure will only add the keywords for C mode, not
use nil for MODE (and place the call on a hook) to avoid subtle problems for modes derived from C mode. To add them for derived modes too,
due to details of the implementation. pass nil for MODE and add the call to c-mode-hook.
For example:
(add-hook 'c-mode-hook
(lambda ()
(font-lock-add-keywords nil
'((\"\\\\\\=<\\\\(FIXME\\\\):\" 1 font-lock-warning-face prepend)
(\"\\\\\\=<\\\\(and\\\\|or\\\\|not\\\\)\\\\\\=>\" .
font-lock-keyword-face)))))
The above procedure may fail to add keywords to derived modes if
some involved major mode does not follow the standard conventions.
File a bug report if this happens, so the major mode can be corrected.
Note that some modes have specialized support for additional patterns, e.g., Note that some modes have specialized support for additional patterns, e.g.,
see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types', see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types',
@ -704,7 +717,8 @@ see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types',
(font-lock-update-removed-keyword-alist mode keywords append)) (font-lock-update-removed-keyword-alist mode keywords append))
(t (t
;; Otherwise set or add the keywords now. ;; Otherwise set or add the keywords now.
;; This is a no-op if it has been done already in this buffer. ;; This is a no-op if it has been done already in this buffer
;; for the correct major mode.
(font-lock-set-defaults) (font-lock-set-defaults)
(let ((was-compiled (eq (car font-lock-keywords) t))) (let ((was-compiled (eq (car font-lock-keywords) t)))
;; Bring back the user-level (uncompiled) keywords. ;; Bring back the user-level (uncompiled) keywords.
@ -774,9 +788,11 @@ see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types',
MODE should be a symbol, the major mode command name, such as `c-mode' MODE should be a symbol, the major mode command name, such as `c-mode'
or nil. If nil, highlighting keywords are removed for the current buffer. or nil. If nil, highlighting keywords are removed for the current buffer.
When used from a Lisp program (such as a minor mode), it is recommended to To make the removal apply to modes derived from MODE as well,
use nil for MODE (and place the call on a hook) to avoid subtle problems pass nil for MODE and add the call to MODE-hook. This may fail
due to details of the implementation." for some derived modes if some involved major mode does not
follow the standard conventions. File a bug report if this
happens, so the major mode can be corrected."
(cond (mode (cond (mode
;; Remove one keyword at the time. ;; Remove one keyword at the time.
(dolist (keyword keywords) (dolist (keyword keywords)
@ -889,7 +905,7 @@ The value of this variable is used when Font Lock mode is turned on."
'font-lock-after-change-function t) 'font-lock-after-change-function t)
(set (make-local-variable 'font-lock-fontify-buffer-function) (set (make-local-variable 'font-lock-fontify-buffer-function)
'jit-lock-refontify) 'jit-lock-refontify)
;; Don't fontify eagerly (and don't abort is the buffer is large). ;; Don't fontify eagerly (and don't abort if the buffer is large).
(set (make-local-variable 'font-lock-fontified) t) (set (make-local-variable 'font-lock-fontified) t)
;; Use jit-lock. ;; Use jit-lock.
(jit-lock-register 'font-lock-fontify-region (jit-lock-register 'font-lock-fontify-region
@ -1571,12 +1587,15 @@ A LEVEL of nil is equal to a LEVEL of 0, a LEVEL of t is equal to
(defvar font-lock-set-defaults nil) ; Whether we have set up defaults. (defvar font-lock-set-defaults nil) ; Whether we have set up defaults.
(defvar font-lock-mode-major-mode)
(defun font-lock-set-defaults () (defun font-lock-set-defaults ()
"Set fontification defaults appropriately for this mode. "Set fontification defaults appropriately for this mode.
Sets various variables using `font-lock-defaults' (or, if nil, using Sets various variables using `font-lock-defaults' (or, if nil, using
`font-lock-defaults-alist') and `font-lock-maximum-decoration'." `font-lock-defaults-alist') and `font-lock-maximum-decoration'."
;; Set fontification defaults iff not previously set. ;; Set fontification defaults iff not previously set for correct major mode.
(unless font-lock-set-defaults (unless (and font-lock-set-defaults
(eq font-lock-mode-major-mode major-mode))
(setq font-lock-mode-major-mode major-mode)
(set (make-local-variable 'font-lock-set-defaults) t) (set (make-local-variable 'font-lock-set-defaults) t)
(make-local-variable 'font-lock-fontified) (make-local-variable 'font-lock-fontified)
(make-local-variable 'font-lock-multiline) (make-local-variable 'font-lock-multiline)
@ -1807,6 +1826,17 @@ Sets various variables using `font-lock-defaults' (or, if nil, using
"Font Lock mode face used to highlight preprocessor directives." "Font Lock mode face used to highlight preprocessor directives."
:group 'font-lock-highlighting-faces) :group 'font-lock-highlighting-faces)
(defface font-lock-regexp-backslash
'((((class color) (min-colors 16)) :inherit escape-glyph)
(t :inherit bold))
"Font Lock mode face used to highlight a backslash in Lisp regexps."
:group 'font-lock-highlighting-faces)
(defface font-lock-regexp-backslash-construct
'((t :inherit bold))
"Font Lock mode face used to highlight `\' constructs in Lisp regexps."
:group 'font-lock-highlighting-faces)
;;; End of Colour etc. support. ;;; End of Colour etc. support.
;;; Menu support. ;;; Menu support.
@ -2000,7 +2030,7 @@ This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item."
`(;; Control structures. Emacs Lisp forms. `(;; Control structures. Emacs Lisp forms.
(,(concat (,(concat
"(" (regexp-opt "(" (regexp-opt
'("cond" "if" "while" "let" "let*" '("cond" "if" "while" "while-no-input" "let" "let*"
"prog" "progn" "progv" "prog1" "prog2" "prog*" "prog" "progn" "progv" "prog1" "prog2" "prog*"
"inline" "lambda" "save-restriction" "save-excursion" "inline" "lambda" "save-restriction" "save-excursion"
"save-window-excursion" "save-selected-window" "save-window-excursion" "save-selected-window"
@ -2056,16 +2086,14 @@ This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item."
;; Make regexp grouping constructs bold, so they stand out, but only ;; Make regexp grouping constructs bold, so they stand out, but only
;; in strings. ;; in strings.
((lambda (bound) ((lambda (bound)
(if (re-search-forward "\\(\\\\\\\\\\)\\([(|)]\\)\\(\\?:\\)?" bound t) (if (re-search-forward "\\(\\\\\\\\\\)\\((\\(?:?:\\)?\\|[|)]\\)" bound t)
(let ((face (get-text-property (1- (point)) 'face))) (let ((face (get-text-property (1- (point)) 'face)))
(if (listp face) (if (listp face)
(memq 'font-lock-string-face face) (memq 'font-lock-string-face face)
(eq 'font-lock-string-face face))))) (eq 'font-lock-string-face face)))))
;; Should we introduce a lowlight face for this? (1 'font-lock-regexp-backslash prepend)
;; Ideally that would retain the color, dimmed. (2 'font-lock-regexp-backslash-construct prepend))
(1 font-lock-comment-face prepend)
(2 'bold prepend)
(3 font-lock-type-face prepend t))
;; Underline innermost grouping, so that you can more easily see what ;; Underline innermost grouping, so that you can more easily see what
;; belongs together. 2005-05-12: Font-lock can go into an ;; belongs together. 2005-05-12: Font-lock can go into an
;; unbreakable endless loop on this -- something's broken. ;; unbreakable endless loop on this -- something's broken.

View file

@ -550,7 +550,7 @@ Commands: Equivalent keys in read-only mode:
(eq (length forms-multi-line) 1)) (eq (length forms-multi-line) 1))
(if (string= forms-multi-line forms-field-sep) (if (string= forms-multi-line forms-field-sep)
(error (concat "Forms control file error: " (error (concat "Forms control file error: "
"`forms-multi-line' is equal to 'forms-field-sep'"))) "`forms-multi-line' is equal to `forms-field-sep'")))
(error (concat "Forms control file error: " (error (concat "Forms control file error: "
"`forms-multi-line' must be nil or a one-character string")))) "`forms-multi-line' must be nil or a one-character string"))))
(or (fboundp 'set-text-properties) (or (fboundp 'set-text-properties)
@ -1207,7 +1207,7 @@ Commands: Equivalent keys in read-only mode:
;; Need a file to do this. ;; Need a file to do this.
(if (not (file-exists-p forms-file)) (if (not (file-exists-p forms-file))
(error "Need existing file or explicit 'forms-number-of-records'") (error "Need existing file or explicit `forms-number-of-fields'")
;; Visit the file and extract the first record. ;; Visit the file and extract the first record.
(setq forms--file-buffer (find-file-noselect forms-file)) (setq forms--file-buffer (find-file-noselect forms-file))
@ -1983,7 +1983,7 @@ after writing out the data."
(goto-char (aref forms--markers (1- (length forms--markers))))))) (goto-char (aref forms--markers (1- (length forms--markers)))))))
(defun forms-print () (defun forms-print ()
"Send the records to the printer with 'print-buffer', one record per page." "Send the records to the printer with `print-buffer', one record per page."
(interactive) (interactive)
(let ((inhibit-read-only t) (let ((inhibit-read-only t)
(save-record forms--current-record) (save-record forms--current-record)

View file

@ -1036,9 +1036,9 @@ one frame, otherwise the name is displayed on the frame's caption bar."
(defun frame-current-scroll-bars (&optional frame) (defun frame-current-scroll-bars (&optional frame)
"Return the current scroll-bar settings in frame FRAME. "Return the current scroll-bar settings in frame FRAME.
Value is a cons (VERTICAL . HORISONTAL) where VERTICAL specifies the Value is a cons (VERTICAL . HORIZ0NTAL) where VERTICAL specifies the
current location of the vertical scroll-bars (left, right, or nil), current location of the vertical scroll-bars (left, right, or nil),
and HORISONTAL specifies the current location of the horisontal scroll and HORIZONTAL specifies the current location of the horizontal scroll
bars (top, bottom, or nil)." bars (top, bottom, or nil)."
(let ((vert (frame-parameter frame 'vertical-scroll-bars)) (let ((vert (frame-parameter frame 'vertical-scroll-bars))
(hor nil)) (hor nil))

View file

@ -1733,17 +1733,17 @@ like an INI file. You can add this hook to `find-file-hook'."
(defconst show-tabs-generic-mode-font-lock-defaults-1 (defconst show-tabs-generic-mode-font-lock-defaults-1
'(;; trailing spaces must come before... '(;; trailing spaces must come before...
("[ \t]+$" . 'show-tabs-space-face) ("[ \t]+$" . 'show-tabs-space)
;; ...embedded tabs ;; ...embedded tabs
("[^\n\t]\\(\t+\\)" (1 'show-tabs-tab-face)))) ("[^\n\t]\\(\t+\\)" (1 'show-tabs-tab))))
(defconst show-tabs-generic-mode-font-lock-defaults-2 (defconst show-tabs-generic-mode-font-lock-defaults-2
'(;; trailing spaces must come before... '(;; trailing spaces must come before...
("[ \t]+$" . 'show-tabs-space-face) ("[ \t]+$" . 'show-tabs-space)
;; ...tabs ;; ...tabs
("\t+" . 'show-tabs-tab-face)))) ("\t+" . 'show-tabs-tab))))
(defface show-tabs-tab-face (defface show-tabs-tab
'((((class grayscale) (background light)) (:background "DimGray" :weight bold)) '((((class grayscale) (background light)) (:background "DimGray" :weight bold))
(((class grayscale) (background dark)) (:background "LightGray" :weight bold)) (((class grayscale) (background dark)) (:background "LightGray" :weight bold))
(((class color) (min-colors 88)) (:background "red1")) (((class color) (min-colors 88)) (:background "red1"))
@ -1751,8 +1751,10 @@ like an INI file. You can add this hook to `find-file-hook'."
(t (:weight bold))) (t (:weight bold)))
"Font Lock mode face used to highlight TABs." "Font Lock mode face used to highlight TABs."
:group 'generic-x) :group 'generic-x)
;; backward-compatibility alias
(put 'show-tabs-tab-face 'face-alias 'show-tabs-tab)
(defface show-tabs-space-face (defface show-tabs-space
'((((class grayscale) (background light)) (:background "DimGray" :weight bold)) '((((class grayscale) (background light)) (:background "DimGray" :weight bold))
(((class grayscale) (background dark)) (:background "LightGray" :weight bold)) (((class grayscale) (background dark)) (:background "LightGray" :weight bold))
(((class color) (min-colors 88)) (:background "yellow1")) (((class color) (min-colors 88)) (:background "yellow1"))
@ -1760,6 +1762,8 @@ like an INI file. You can add this hook to `find-file-hook'."
(t (:weight bold))) (t (:weight bold)))
"Font Lock mode face used to highlight spaces." "Font Lock mode face used to highlight spaces."
:group 'generic-x) :group 'generic-x)
;; backward-compatibility alias
(put 'show-tabs-space-face 'face-alias 'show-tabs-space)
(define-generic-mode show-tabs-generic-mode (define-generic-mode show-tabs-generic-mode
nil ;; no comment char nil ;; no comment char

View file

@ -1,10 +1,42 @@
2005-06-14 Juanma Barranquero <lekktu@gmail.com>
* gnus-sieve.el (gnus-sieve-article-add-rule):
* legacy-gnus-agent.el (gnus-agent-unlist-expire-days):
* spam-stat.el (spam-stat-buffer-change-to-spam)
(spam-stat-buffer-change-to-non-spam): Follow error conventions.
* message.el (message-is-yours-p):
* gnus-sum.el (gnus-auto-select-subject): Fix quoting in docstring.
2005-06-14 Katsumi Yamaoka <yamaoka@jpl.org>
* mm-view.el (mm-inline-text): Withdraw the last change.
2005-06-09 Katsumi Yamaoka <yamaoka@jpl.org>
* mm-view.el (mm-inline-text): Turn off adaptive-fill-mode while
executing enriched-decode.
2005-06-04 Luc Teirlinck <teirllm@auburn.edu>
* gnus-art.el (article-update-date-lapsed): Use `save-match-data'.
2005-06-04 Lute Kamstra <lute@gnu.org>
* nnfolder.el (nnfolder-read-folder): Make sure that undo
information is never recorded.
2005-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
* gnus-art.el (gnus-emphasis-alist): Disable the strikethru thingy.
2005-06-02 Katsumi Yamaoka <yamaoka@jpl.org> 2005-06-02 Katsumi Yamaoka <yamaoka@jpl.org>
* pop3.el (pop3-md5): Run md5 in the binary mode. * pop3.el (pop3-md5): Run md5 in the binary mode.
(pop3-md5-program-args): New variable. (pop3-md5-program-args): New variable.
* starttls.el (starttls-set-process-query-on-exit-flag): Use * starttls.el (starttls-set-process-query-on-exit-flag):
eval-and-compile. Use eval-and-compile.
2005-05-31 Katsumi Yamaoka <yamaoka@jpl.org> 2005-05-31 Katsumi Yamaoka <yamaoka@jpl.org>
@ -29,8 +61,8 @@
* mml2015.el: Bind pgg-default-user-id when compiling. * mml2015.el: Bind pgg-default-user-id when compiling.
* nndraft.el (nndraft-request-associate-buffer): Use * nndraft.el (nndraft-request-associate-buffer):
write-contents-functions instead of write-contents-hooks if it is Use write-contents-functions instead of write-contents-hooks if it is
available. available.
* nnheader.el (nnheader-find-file-noselect): Bind find-file-hook * nnheader.el (nnheader-find-file-noselect): Bind find-file-hook
@ -58,7 +90,7 @@
2005-05-31 Kevin Greiner <kgreiner@xpediantsolutions.com> 2005-05-31 Kevin Greiner <kgreiner@xpediantsolutions.com>
* gnus-group.el (): Require gnus-sum and autoload functions to * gnus-group.el: Require gnus-sum and autoload functions to
resolve warnings when gnus-group.el compiled alone. resolve warnings when gnus-group.el compiled alone.
2005-05-30 Reiner Steib <Reiner.Steib@gmx.de> 2005-05-30 Reiner Steib <Reiner.Steib@gmx.de>
@ -195,7 +227,7 @@
(gnus-summary-high-unread-face): Ditto. (gnus-summary-high-unread-face): Ditto.
(gnus-summary-low-unread-face): Ditto. (gnus-summary-low-unread-face): Ditto.
(gnus-summary-normal-unread-face): Ditto. (gnus-summary-normal-unread-face): Ditto.
(gnus-summary-high-read-face, gnus-summary-low-read-face): Diito (gnus-summary-high-read-face, gnus-summary-low-read-face): Ditto.
(gnus-summary-normal-read-face, gnus-splash-face): Ditto. (gnus-summary-normal-read-face, gnus-splash-face): Ditto.
* message.el (message-minibuffer-local-map): Add :group. * message.el (message-minibuffer-local-map): Add :group.
@ -205,7 +237,7 @@
(sieve-manage-server-eol, sieve-manage-client-eol): Ditto. (sieve-manage-server-eol, sieve-manage-client-eol): Ditto.
(sieve-manage-streams, sieve-manage-stream-alist): Ditto. (sieve-manage-streams, sieve-manage-stream-alist): Ditto.
(sieve-manage-authenticators): Ditto. (sieve-manage-authenticators): Ditto.
(sieve-manage-authenticator-alist): Ditto (sieve-manage-authenticator-alist): Ditto.
(sieve-manage-default-port): Ditto. (sieve-manage-default-port): Ditto.
* sieve-mode.el (sieve-control-commands-face): Add :group. * sieve-mode.el (sieve-control-commands-face): Add :group.
@ -438,11 +470,11 @@
* nnimap.el (nnimap-date-days-ago): Ditto. * nnimap.el (nnimap-date-days-ago): Ditto.
* gnus-demon.el (parse-time-string): Added autoload. * gnus-demon.el (parse-time-string): Add autoload.
* gnus-delay.el (parse-time-string): Added autoload. * gnus-delay.el (parse-time-string): Add autoload.
* gnus-art.el (parse-time-string): Added autoload. * gnus-art.el (parse-time-string): Add autoload.
* nnultimate.el (parse-time): Require for `parse-time-string'. * nnultimate.el (parse-time): Require for `parse-time-string'.
@ -496,14 +528,13 @@
(rfc2047-encoded-word-regexp): Don't use shy group. (rfc2047-encoded-word-regexp): Don't use shy group.
(rfc2047-decode-region): Follow rfc2047-encoded-word-regexp change. (rfc2047-decode-region): Follow rfc2047-encoded-word-regexp change.
(rfc2047-parse-and-decode): Ditto. (rfc2047-parse-and-decode): Ditto.
(rfc2047-decode): Treat the ascii coding-system as raw-text by (rfc2047-decode): Treat the ascii coding-system as raw-text by default.
default.
2005-03-25 Lars Magne Ingebrigtsen <larsi@gnus.org> 2005-03-25 Lars Magne Ingebrigtsen <larsi@gnus.org>
* rfc2047.el (rfc2047-encode-encoded-words): New variable. * rfc2047.el (rfc2047-encode-encoded-words): New variable.
(rfc2047-field-value): Strip props. (rfc2047-field-value): Strip props.
(rfc2047-encode-message-header): Disabled header folding -- not (rfc2047-encode-message-header): Disable header folding -- not
all headers can be folded, and this should be done by the message all headers can be folded, and this should be done by the message
composition mode. Probably. I think. composition mode. Probably. I think.
(rfc2047-encodable-p): Say that =? needs encoding. (rfc2047-encodable-p): Say that =? needs encoding.

View file

@ -367,8 +367,12 @@ advertisements. For example:
(or (nth 4 spec) 3) (or (nth 4 spec) 3)
(intern (format "gnus-emphasis-%s" (nth 2 spec))))) (intern (format "gnus-emphasis-%s" (nth 2 spec)))))
types)) types))
'(("\\(\\s-\\|^\\)\\(-\\(\\(\\w\\|-[^-]\\)+\\)-\\)\\(\\s-\\|[?!.,;]\\)" '(;; I've never seen anyone use this strikethru convention whereas I've
2 3 gnus-emphasis-strikethru) ;; several times seen it triggered by normal text. --Stef
;; Miles suggests that this form is sometimes used but for italics,
;; so maybe we should map it to `italic'.
;; ("\\(\\s-\\|^\\)\\(-\\(\\(\\w\\|-[^-]\\)+\\)-\\)\\(\\s-\\|[?!.,;]\\)"
;; 2 3 gnus-emphasis-strikethru)
("\\(\\s-\\|^\\)\\(_\\(\\(\\w\\|_[^_]\\)+\\)_\\)\\(\\s-\\|[?!.,;]\\)" ("\\(\\s-\\|^\\)\\(_\\(\\(\\w\\|_[^_]\\)+\\)_\\)\\(\\s-\\|[?!.,;]\\)"
2 3 gnus-emphasis-underline)))) 2 3 gnus-emphasis-underline))))
"*Alist that says how to fontify certain phrases. "*Alist that says how to fontify certain phrases.
@ -3034,20 +3038,21 @@ function and want to see what the date was before converting."
(defun article-update-date-lapsed () (defun article-update-date-lapsed ()
"Function to be run from a timer to update the lapsed time line." "Function to be run from a timer to update the lapsed time line."
(let (deactivate-mark) (save-match-data
(save-excursion (let (deactivate-mark)
(ignore-errors (save-excursion
(walk-windows (ignore-errors
(lambda (w) (walk-windows
(set-buffer (window-buffer w)) (lambda (w)
(when (eq major-mode 'gnus-article-mode) (set-buffer (window-buffer w))
(let ((mark (point-marker))) (when (eq major-mode 'gnus-article-mode)
(goto-char (point-min)) (let ((mark (point-marker)))
(when (re-search-forward "^X-Sent:" nil t) (goto-char (point-min))
(article-date-lapsed t)) (when (re-search-forward "^X-Sent:" nil t)
(goto-char (marker-position mark)) (article-date-lapsed t))
(move-marker mark nil)))) (goto-char (marker-position mark))
nil 'visible))))) (move-marker mark nil))))
nil 'visible))))))
(defun gnus-start-date-timer (&optional n) (defun gnus-start-date-timer (&optional n)
"Start a timer to update the X-Sent header in the article buffers. "Start a timer to update the X-Sent header in the article buffers.

View file

@ -129,7 +129,7 @@ Return nil if no rule could be guessed."
(let ((rule (gnus-sieve-guess-rule-for-article)) (let ((rule (gnus-sieve-guess-rule-for-article))
(info (gnus-get-info gnus-newsgroup-name))) (info (gnus-get-info gnus-newsgroup-name)))
(if (null rule) (if (null rule)
(error "Could not guess rule for article.") (error "Could not guess rule for article")
(gnus-info-set-params info (cons rule (gnus-info-params info))) (gnus-info-set-params info (cons rule (gnus-info-params info)))
(message "Added rule in group %s for article: %s" gnus-newsgroup-name (message "Added rule in group %s for article: %s" gnus-newsgroup-name
rule))))) rule)))))

View file

@ -320,7 +320,7 @@ This variable can either be the symbols `first' (place point on the
first subject), `unread' (place point on the subject line of the first first subject), `unread' (place point on the subject line of the first
unread article), `best' (place point on the subject line of the unread article), `best' (place point on the subject line of the
higest-scored article), `unseen' (place point on the subject line of higest-scored article), `unseen' (place point on the subject line of
the first unseen article), 'unseen-or-unread' (place point on the subject the first unseen article), `unseen-or-unread' (place point on the subject
line of the first unseen article or, if all article have been seen, on the line of the first unseen article or, if all article have been seen, on the
subject line of the first unread article), or a function to be called to subject line of the first unread article), or a function to be called to
place point on some subject line." place point on some subject line."

View file

@ -25,7 +25,7 @@ converted to the compressed format."
((file-directory-p member) ((file-directory-p member)
(push member search-in)) (push member search-in))
((equal (file-name-nondirectory member) ".agentview") ((equal (file-name-nondirectory member) ".agentview")
(setq converted-something (setq converted-something
(or (gnus-agent-convert-agentview member) (or (gnus-agent-convert-agentview member)
converted-something)))))) converted-something))))))
@ -175,7 +175,7 @@ converted to the compressed format."
(t (t
t)))))) t))))))
(kill-buffer buffer)) (kill-buffer buffer))
(error "Change gnus-agent-expire-days to an integer for gnus to start.")))) (error "Change gnus-agent-expire-days to an integer for gnus to start"))))
;; The gnus-agent-unlist-expire-days has its own conversion prompt. ;; The gnus-agent-unlist-expire-days has its own conversion prompt.
;; Therefore, hide the default prompt. ;; Therefore, hide the default prompt.
@ -198,8 +198,8 @@ possible that the hook was persistently saved."
(when (cond ((eq (type-of func) 'compiled-function) (when (cond ((eq (type-of func) 'compiled-function)
;; Search def. of compiled function for gnus-agent-do-once string ;; Search def. of compiled function for gnus-agent-do-once string
(let* (definition (let* (definition
print-level print-level
print-length print-length
(standard-output (standard-output
(lambda (char) (lambda (char)

View file

@ -5912,9 +5912,9 @@ want to get rid of this query permanently."))
(defun message-is-yours-p () (defun message-is-yours-p ()
"Non-nil means current article is yours. "Non-nil means current article is yours.
If you have added 'cancel-messages to 'message-shoot-gnksa-feet', all articles If you have added 'cancel-messages to `message-shoot-gnksa-feet', all articles
are yours except those that have Cancel-Lock header not belonging to you. are yours except those that have Cancel-Lock header not belonging to you.
Instead of shooting GNKSA feet, you should modify 'message-alternative-emails' Instead of shooting GNKSA feet, you should modify `message-alternative-emails'
regexp to match all of yours addresses." regexp to match all of yours addresses."
;; Canlock-logic as suggested by Per Abrahamsen ;; Canlock-logic as suggested by Per Abrahamsen
;; <abraham@dina.kvl.dk> ;; <abraham@dina.kvl.dk>

View file

@ -875,6 +875,7 @@ deleted. Point is left where the deleted region was."
nnfolder-file-coding-system)) nnfolder-file-coding-system))
(nnheader-find-file-noselect file t))))) (nnheader-find-file-noselect file t)))))
(mm-enable-multibyte) ;; Use multibyte buffer for future copying. (mm-enable-multibyte) ;; Use multibyte buffer for future copying.
(buffer-disable-undo)
(if (equal (cadr (assoc group nnfolder-scantime-alist)) (if (equal (cadr (assoc group nnfolder-scantime-alist))
(nth 5 (file-attributes file))) (nth 5 (file-attributes file)))
;; This looks up-to-date, so we don't do any scanning. ;; This looks up-to-date, so we don't do any scanning.
@ -901,7 +902,6 @@ deleted. Point is left where the deleted region was."
maxid start end newscantime maxid start end newscantime
novbuf articles newnum novbuf articles newnum
buffer-read-only) buffer-read-only)
(buffer-disable-undo)
(setq maxid (cdr active)) (setq maxid (cdr active))
(unless (or gnus-nov-is-evil nnfolder-nov-is-evil (unless (or gnus-nov-is-evil nnfolder-nov-is-evil

View file

@ -370,7 +370,7 @@ Use `spam-stat-ngood', `spam-stat-nbad', `spam-stat-good',
(lambda (word count) (lambda (word count)
(let ((entry (gethash word spam-stat))) (let ((entry (gethash word spam-stat)))
(if (not entry) (if (not entry)
(error "This buffer has unknown words in it.") (error "This buffer has unknown words in it")
(spam-stat-set-good entry (- (spam-stat-good entry) count)) (spam-stat-set-good entry (- (spam-stat-good entry) count))
(spam-stat-set-bad entry (+ (spam-stat-bad entry) count)) (spam-stat-set-bad entry (+ (spam-stat-bad entry) count))
(spam-stat-set-score entry (spam-stat-compute-score entry)) (spam-stat-set-score entry (spam-stat-compute-score entry))
@ -386,7 +386,7 @@ Use `spam-stat-ngood', `spam-stat-nbad', `spam-stat-good',
(lambda (word count) (lambda (word count)
(let ((entry (gethash word spam-stat))) (let ((entry (gethash word spam-stat)))
(if (not entry) (if (not entry)
(error "This buffer has unknown words in it.") (error "This buffer has unknown words in it")
(spam-stat-set-good entry (+ (spam-stat-good entry) count)) (spam-stat-set-good entry (+ (spam-stat-good entry) count))
(spam-stat-set-bad entry (- (spam-stat-bad entry) count)) (spam-stat-set-bad entry (- (spam-stat-bad entry) count))
(spam-stat-set-score entry (spam-stat-compute-score entry)) (spam-stat-set-score entry (spam-stat-compute-score entry))

View file

@ -988,7 +988,9 @@ This function is assumed to be used as call back function for `hl-line-mode'."
(define-key hexl-mode-map [up] 'hexl-previous-line) (define-key hexl-mode-map [up] 'hexl-previous-line)
(define-key hexl-mode-map [down] 'hexl-next-line) (define-key hexl-mode-map [down] 'hexl-next-line)
(define-key hexl-mode-map [M-left] 'hexl-backward-short) (define-key hexl-mode-map [M-left] 'hexl-backward-short)
(define-key hexl-mode-map [?\e left] 'hexl-backward-short)
(define-key hexl-mode-map [M-right] 'hexl-forward-short) (define-key hexl-mode-map [M-right] 'hexl-forward-short)
(define-key hexl-mode-map [?\e right] 'hexl-forward-short)
(define-key hexl-mode-map [next] 'hexl-scroll-up) (define-key hexl-mode-map [next] 'hexl-scroll-up)
(define-key hexl-mode-map [prior] 'hexl-scroll-down) (define-key hexl-mode-map [prior] 'hexl-scroll-down)
(define-key hexl-mode-map [home] 'hexl-beginning-of-line) (define-key hexl-mode-map [home] 'hexl-beginning-of-line)

View file

@ -37,9 +37,9 @@
;; it on to active mode to see them, then toggle it back off to avoid ;; it on to active mode to see them, then toggle it back off to avoid
;; distraction. ;; distraction.
;; ;;
;; When active, changes are displayed in `highlight-changes-face'. When ;; When active, changes are displayed in the `highlight-changes' face.
;; text is deleted, the following character is displayed in ;; When text is deleted, the following character is displayed in the
;; `highlight-changes-delete-face' face. ;; `highlight-changes-delete' face.
;; ;;
;; ;;
;; You can "age" different sets of changes by using ;; You can "age" different sets of changes by using
@ -48,10 +48,10 @@
;; changes. You can customize these "rotated" faces in two ways. You can ;; changes. You can customize these "rotated" faces in two ways. You can
;; either explicitly define each face by customizing ;; either explicitly define each face by customizing
;; `highlight-changes-face-list'. If, however, the faces differ from ;; `highlight-changes-face-list'. If, however, the faces differ from
;; `highlight-changes-face' only in the foreground color, you can simply set ;; the `highlight-changes' face only in the foreground color, you can simply set
;; `highlight-changes-colours'. If `highlight-changes-face-list' is nil when ;; `highlight-changes-colors'. If `highlight-changes-face-list' is nil when
;; the faces are required they will be constructed from ;; the faces are required they will be constructed from
;; `highlight-changes-colours'. ;; `highlight-changes-colors'.
;; ;;
;; ;;
;; When a Highlight Changes mode is on (either active or passive) you can go ;; When a Highlight Changes mode is on (either active or passive) you can go
@ -212,42 +212,49 @@
;; However, having it set for non-delete changes can be annoying because all ;; However, having it set for non-delete changes can be annoying because all
;; indentation on inserts gets underlined (which can look pretty ugly!). ;; indentation on inserts gets underlined (which can look pretty ugly!).
(defface highlight-changes-face (defface highlight-changes
'((((min-colors 88) (class color)) (:foreground "red1" )) '((((min-colors 88) (class color)) (:foreground "red1" ))
(((class color)) (:foreground "red" )) (((class color)) (:foreground "red" ))
(t (:inverse-video t))) (t (:inverse-video t)))
"Face used for highlighting changes." "Face used for highlighting changes."
:group 'highlight-changes) :group 'highlight-changes)
;; backward-compatibility alias
(put 'highlight-changes-face 'face-alias 'highlight-changes)
;; This looks pretty ugly, actually. Maybe the underline should be removed. ;; This looks pretty ugly, actually. Maybe the underline should be removed.
(defface highlight-changes-delete-face (defface highlight-changes-delete
'((((min-colors 88) (class color)) (:foreground "red1" :underline t)) '((((min-colors 88) (class color)) (:foreground "red1" :underline t))
(((class color)) (:foreground "red" :underline t)) (((class color)) (:foreground "red" :underline t))
(t (:inverse-video t))) (t (:inverse-video t)))
"Face used for highlighting deletions." "Face used for highlighting deletions."
:group 'highlight-changes) :group 'highlight-changes)
;; backward-compatibility alias
(put 'highlight-changes-delete-face 'face-alias 'highlight-changes-delete)
;; A (not very good) default list of colours to rotate through. ;; A (not very good) default list of colors to rotate through.
;; ;;
(defcustom highlight-changes-colours (defcustom highlight-changes-colors
(if (eq (frame-parameter nil 'background-mode) 'light) (if (eq (frame-parameter nil 'background-mode) 'light)
;; defaults for light background: ;; defaults for light background:
'( "magenta" "blue" "darkgreen" "chocolate" "sienna4" "NavyBlue") '( "magenta" "blue" "darkgreen" "chocolate" "sienna4" "NavyBlue")
;; defaults for dark background: ;; defaults for dark background:
'("yellow" "magenta" "blue" "maroon" "firebrick" "green4" "DarkOrchid")) '("yellow" "magenta" "blue" "maroon" "firebrick" "green4" "DarkOrchid"))
"*Colours used by `highlight-changes-rotate-faces'. "*Colors used by `highlight-changes-rotate-faces'.
The newest rotated change will be displayed in the first element of this list, The newest rotated change will be displayed in the first element of this list,
the next older will be in the second element etc. the next older will be in the second element etc.
This list is used if `highlight-changes-face-list' is nil, otherwise that This list is used if `highlight-changes-face-list' is nil, otherwise that
variable overrides this list. If you only care about foreground variable overrides this list. If you only care about foreground
colours then use this, if you want fancier faces then set colors then use this, if you want fancier faces then set
`highlight-changes-face-list'." `highlight-changes-face-list'."
:type '(repeat color) :type '(repeat color)
:group 'highlight-changes) :group 'highlight-changes)
(define-obsolete-variable-alias 'highlight-changes-colours
'highlight-changes-colors "22.1")
;; If you invoke highlight-changes-mode with no argument, should it start in ;; If you invoke highlight-changes-mode with no argument, should it start in
;; active or passive mode? ;; active or passive mode?
@ -347,15 +354,15 @@ remove it from existing buffers."
) )
(while p (while p
(setq old-name (car p)) (setq old-name (car p))
(setq new-name (intern (format "highlight-changes-face-%d" n))) (setq new-name (intern (format "highlight-changes-%d" n)))
(if (eq old-name new-name) (if (eq old-name new-name)
nil nil
;; A new face has been inserted: we don't want to modify the ;; A new face has been inserted: we don't want to modify the
;; default face so copy it. Better, though, (I think) is to ;; default face so copy it. Better, though, (I think) is to
;; make a new face have the same attributes as ;; make a new face have the same attributes as
;; highlight-changes-face . ;; the `highlight-changes' face.
(if (eq old-name 'default) (if (eq old-name 'default)
(copy-face 'highlight-changes-face new-name) (copy-face 'highlight-changes new-name)
(copy-face old-name new-name) (copy-face old-name new-name)
)) ))
(setq new-list (append (list new-name) new-list)) (setq new-list (append (list new-name) new-list))
@ -377,16 +384,16 @@ remove it from existing buffers."
(defcustom highlight-changes-face-list nil (defcustom highlight-changes-face-list nil
"*A list of faces used when rotating changes. "*A list of faces used when rotating changes.
Normally the variable is initialized to nil and the list is created from Normally the variable is initialized to nil and the list is created from
`highlight-changes-colours' when needed. However, you can set this variable `highlight-changes-colors' when needed. However, you can set this variable
to any list of faces. You will have to do this if you want faces which to any list of faces. You will have to do this if you want faces which
don't just differ from `highlight-changes-face' by the foreground colour. don't just differ from the `highlight-changes' face by the foreground color.
Otherwise, this list will be constructed when needed from Otherwise, this list will be constructed when needed from
`highlight-changes-colours'." `highlight-changes-colors'."
:type '(choice :type '(choice
(repeat (repeat
:notify hilit-chg-cust-fix-changes-face-list :notify hilit-chg-cust-fix-changes-face-list
face ) face )
(const :tag "Derive from highlight-changes-colours" nil) (const :tag "Derive from highlight-changes-colors" nil)
) )
:group 'highlight-changes) :group 'highlight-changes)
@ -445,7 +452,7 @@ This is the opposite of `hilit-chg-hide-changes'."
(let ((ov (make-overlay start end)) (let ((ov (make-overlay start end))
face) face)
(if (eq prop 'hilit-chg-delete) (if (eq prop 'hilit-chg-delete)
(setq face 'highlight-changes-delete-face) (setq face 'highlight-changes-delete)
(setq face (nth 1 (member prop hilit-chg-list)))) (setq face (nth 1 (member prop hilit-chg-list))))
(if face (if face
(progn (progn
@ -727,24 +734,24 @@ Hook variables:
;; so we pick up any changes? ;; so we pick up any changes?
(if (or (null highlight-changes-face-list) ; Don't do it if it (if (or (null highlight-changes-face-list) ; Don't do it if it
force) ; already exists unless FORCE non-nil. force) ; already exists unless FORCE non-nil.
(let ((p highlight-changes-colours) (let ((p highlight-changes-colors)
(n 1) name) (n 1) name)
(setq highlight-changes-face-list nil) (setq highlight-changes-face-list nil)
(while p (while p
(setq name (intern (format "highlight-changes-face-%d" n))) (setq name (intern (format "highlight-changes-%d" n)))
(copy-face 'highlight-changes-face name) (copy-face 'highlight-changes name)
(set-face-foreground name (car p)) (set-face-foreground name (car p))
(setq highlight-changes-face-list (setq highlight-changes-face-list
(append highlight-changes-face-list (list name))) (append highlight-changes-face-list (list name)))
(setq p (cdr p)) (setq p (cdr p))
(setq n (1+ n))))) (setq n (1+ n)))))
(setq hilit-chg-list (list 'hilit-chg 'highlight-changes-face)) (setq hilit-chg-list (list 'hilit-chg 'highlight-changes))
(let ((p highlight-changes-face-list) (let ((p highlight-changes-face-list)
(n 1) (n 1)
last-category last-face) last-category last-face)
(while p (while p
(setq last-category (intern (format "change-%d" n))) (setq last-category (intern (format "change-%d" n)))
;; (setq last-face (intern (format "highlight-changes-face-%d" n))) ;; (setq last-face (intern (format "highlight-changes-%d" n)))
(setq last-face (car p)) (setq last-face (car p))
(setq hilit-chg-list (setq hilit-chg-list
(append hilit-chg-list (append hilit-chg-list
@ -774,7 +781,7 @@ of `highlight-changes-face-list', one level older changes are shown in
face described by the second element, and so on. Very old changes remain face described by the second element, and so on. Very old changes remain
shown in the last face in the list. shown in the last face in the list.
You can automatically rotate colours when the buffer is saved You can automatically rotate colors when the buffer is saved
by adding the following to `local-write-file-hooks', by evaling it in the by adding the following to `local-write-file-hooks', by evaling it in the
buffer to be saved): buffer to be saved):
@ -842,7 +849,7 @@ is non-nil."
(setq change-a (car change-info)) (setq change-a (car change-info))
(setq change-b (car (cdr change-info))) (setq change-b (car (cdr change-info)))
(hilit-chg-make-list) (hilit-chg-make-list)
(while change-a (while change-a
(setq a-start (nth 0 (car change-a))) (setq a-start (nth 0 (car change-a)))
@ -886,11 +893,11 @@ If a buffer is read-only, differences will be highlighted but no property
changes are made, so \\[highlight-changes-next-change] and changes are made, so \\[highlight-changes-next-change] and
\\[highlight-changes-previous-change] will not work." \\[highlight-changes-previous-change] will not work."
(interactive (interactive
(list (list
(get-buffer (read-buffer "buffer-a " (current-buffer) t)) (get-buffer (read-buffer "buffer-a " (current-buffer) t))
(get-buffer (get-buffer
(read-buffer "buffer-b " (read-buffer "buffer-b "
(window-buffer (next-window (selected-window))) t)))) (window-buffer (next-window (selected-window))) t))))
(let ((file-a (buffer-file-name buf-a)) (let ((file-a (buffer-file-name buf-a))
(file-b (buffer-file-name buf-b))) (file-b (buffer-file-name buf-b)))
(highlight-markup-buffers buf-a file-a buf-b file-b) (highlight-markup-buffers buf-a file-a buf-b file-b)
@ -917,10 +924,10 @@ changes are made, so \\[highlight-changes-next-change] and
nil ;; default nil ;; default
'yes ;; must exist 'yes ;; must exist
(let ((f (buffer-file-name (current-buffer)))) (let ((f (buffer-file-name (current-buffer))))
(if f (if f
(progn (progn
(setq f (make-backup-file-name f)) (setq f (make-backup-file-name f))
(or (file-exists-p f) (or (file-exists-p f)
(setq f nil))) (setq f nil)))
) )
f)))) f))))

View file

@ -299,8 +299,8 @@
;; ------------ ;; ------------
;; The highlighting of matching items is controlled via ido-use-faces. ;; The highlighting of matching items is controlled via ido-use-faces.
;; The faces used are ido-first-match-face, ido-only-match-face and ;; The faces used are ido-first-match, ido-only-match and
;; ido-subdir-face. ;; ido-subdir.
;; Colouring of the matching item was suggested by ;; Colouring of the matching item was suggested by
;; Carsten Dominik (dominik@strw.leidenuniv.nl). ;; Carsten Dominik (dominik@strw.leidenuniv.nl).
@ -345,7 +345,7 @@
;;;###autoload ;;;###autoload
(defcustom ido-mode nil (defcustom ido-mode nil
"Determines for which functional group \(buffer and files) ido behavior "Determines for which functional group \(buffer and files) ido behavior
should be enabled. The following values are possible: should be enabled. The following values are possible:
- `buffer': Turn only on ido buffer behavior \(switching, killing, - `buffer': Turn only on ido buffer behavior \(switching, killing,
displaying...) displaying...)
- `file': Turn only on ido file behavior \(finding, writing, inserting...) - `file': Turn only on ido file behavior \(finding, writing, inserting...)
@ -414,7 +414,7 @@ This allows the current directory to be opened immediate with `dired'."
"*List of file extensions specifying preferred order of file selections. "*List of file extensions specifying preferred order of file selections.
Each element is either a string with `.' as the first char, an empty Each element is either a string with `.' as the first char, an empty
string matching files without extension, or t which is the default order string matching files without extension, or t which is the default order
of for files with an unlisted file extension." for files with an unlisted file extension."
:type '(repeat (choice string :type '(repeat (choice string
(const :tag "Default order" t))) (const :tag "Default order" t)))
:group 'ido) :group 'ido)
@ -453,9 +453,9 @@ Possible values:
`otherframe' Show new file in another frame `otherframe' Show new file in another frame
`maybe-frame' If a file is visible in another frame, prompt to ask if you `maybe-frame' If a file is visible in another frame, prompt to ask if you
you want to see the file in the same window of the current you want to see the file in the same window of the current
frame or in the other frame. frame or in the other frame
`always-frame' If a file is visible in another frame, raise that `always-frame' If a file is visible in another frame, raise that
frame. Otherwise, visit the file in the same window." frame; otherwise, visit the file in the same window"
:type '(choice (const samewindow) :type '(choice (const samewindow)
(const otherwindow) (const otherwindow)
(const display) (const display)
@ -466,7 +466,7 @@ Possible values:
(defcustom ido-default-buffer-method 'always-frame (defcustom ido-default-buffer-method 'always-frame
"*How to switch to new buffer when using `ido-switch-buffer'. "*How to switch to new buffer when using `ido-switch-buffer'.
See ido-default-file-method for details." See `ido-default-file-method' for details."
:type '(choice (const samewindow) :type '(choice (const samewindow)
(const otherwindow) (const otherwindow)
(const display) (const display)
@ -530,7 +530,7 @@ Note that the non-ido equivalent command is recorded."
(defcustom ido-max-prospects 12 (defcustom ido-max-prospects 12
"*Non-zero means that the prospect list will be limited to than number of items. "*Non-zero means that the prospect list will be limited to than number of items.
For a long list of prospects, building the full list for the minibuffer can take a For a long list of prospects, building the full list for the minibuffer can take a
non-negletable amount of time; setting this variable reduces that time." non-negligible amount of time; setting this variable reduces that time."
:type 'integer :type 'integer
:group 'ido) :group 'ido)
@ -615,7 +615,7 @@ If zero, ftp directories are not cached."
(defcustom ido-slow-ftp-hosts nil (defcustom ido-slow-ftp-hosts nil
"*List of slow ftp hosts where ido prompting should not be used. "*List of slow ftp hosts where ido prompting should not be used.
If an ftp host is on this list, ido automatically switches to the non-ido If an ftp host is on this list, ido automatically switches to the non-ido
equivalent function, e.g. find-file rather than ido-find-file." equivalent function, e.g. `find-file' rather than `ido-find-file'."
:type '(repeat string) :type '(repeat string)
:group 'ido) :group 'ido)
@ -706,7 +706,7 @@ ask user whether to create buffer, or 'never to never create new buffer."
:group 'ido) :group 'ido)
(defcustom ido-setup-hook nil (defcustom ido-setup-hook nil
"*Hook run after the ido variables and keymap has been setup. "*Hook run after the ido variables and keymap have been setup.
The dynamic variable `ido-cur-item' contains the current type of item that The dynamic variable `ido-cur-item' contains the current type of item that
is read by ido, possible values are file, dir, buffer, and list. is read by ido, possible values are file, dir, buffer, and list.
Additional keys can be defined in `ido-mode-map'." Additional keys can be defined in `ido-mode-map'."
@ -727,9 +727,9 @@ There are 10 elements in this list:
4th element is the string inserted at the end of a truncated list of prospects, 4th element is the string inserted at the end of a truncated list of prospects,
5th and 6th elements are used as brackets around the common match string which 5th and 6th elements are used as brackets around the common match string which
can be completed using TAB, can be completed using TAB,
7th element is the string displayed when there are a no matches, and 7th element is the string displayed when there are no matches, and
8th element is displayed if there is a single match (and faces are not used). 8th element is displayed if there is a single match (and faces are not used),
9th element is displayed when the current directory is non-readable. 9th element is displayed when the current directory is non-readable,
10th element is displayed when directory exceeds `ido-max-directory-size'." 10th element is displayed when directory exceeds `ido-max-directory-size'."
:type '(repeat string) :type '(repeat string)
:group 'ido) :group 'ido)
@ -740,17 +740,17 @@ subdirs in the alternatives."
:type 'boolean :type 'boolean
:group 'ido) :group 'ido)
(defface ido-first-match-face '((t (:bold t))) (defface ido-first-match '((t (:bold t)))
"*Font used by ido for highlighting first match." "*Font used by ido for highlighting first match."
:group 'ido) :group 'ido)
(defface ido-only-match-face '((((class color)) (defface ido-only-match '((((class color))
(:foreground "ForestGreen")) (:foreground "ForestGreen"))
(t (:italic t))) (t (:italic t)))
"*Font used by ido for highlighting only match." "*Font used by ido for highlighting only match."
:group 'ido) :group 'ido)
(defface ido-subdir-face '((((min-colors 88) (class color)) (defface ido-subdir '((((min-colors 88) (class color))
(:foreground "red1")) (:foreground "red1"))
(((class color)) (((class color))
(:foreground "red")) (:foreground "red"))
@ -758,7 +758,7 @@ subdirs in the alternatives."
"*Font used by ido for highlighting subdirs in the alternatives." "*Font used by ido for highlighting subdirs in the alternatives."
:group 'ido) :group 'ido)
(defface ido-indicator-face '((((min-colors 88) (class color)) (defface ido-indicator '((((min-colors 88) (class color))
(:foreground "yellow1" (:foreground "yellow1"
:background "red1" :background "red1"
:width condensed)) :width condensed))
@ -864,14 +864,14 @@ Must be set before enabling ido mode."
(defcustom ido-read-file-name-as-directory-commands '() (defcustom ido-read-file-name-as-directory-commands '()
"List of commands which uses read-file-name to read a directory name. "List of commands which uses read-file-name to read a directory name.
When `ido-everywhere' is non-nil, the commands in this list will read When `ido-everywhere' is non-nil, the commands in this list will read
the directory using ido-read-directory-name." the directory using `ido-read-directory-name'."
:type '(repeat symbol) :type '(repeat symbol)
:group 'ido) :group 'ido)
(defcustom ido-read-file-name-non-ido '() (defcustom ido-read-file-name-non-ido '()
"List of commands which shall not read file names the ido way. "List of commands which shall not read file names the ido way.
When `ido-everywhere' is non-nil, the commands in this list will read When `ido-everywhere' is non-nil, the commands in this list will read
the file name using normal read-file-name style." the file name using normal `read-file-name' style."
:type '(repeat symbol) :type '(repeat symbol)
:group 'ido) :group 'ido)
@ -895,7 +895,7 @@ See `ido-enable-last-directory-history' for details.")
(defvar ido-work-directory-list nil (defvar ido-work-directory-list nil
"List of actual working directory names. "List of actual working directory names.
The current directory is inserted at the front of this list whenever a The current directory is inserted at the front of this list whenever a
file is opened with ido-find-file and family.") file is opened with `ido-find-file' and family.")
(defvar ido-work-file-list nil (defvar ido-work-file-list nil
"List of actual work file names. "List of actual work file names.
@ -909,7 +909,7 @@ Each element in the list is of the form (DIR (MTIME) FILE...).")
(defvar ido-ignore-item-temp-list nil (defvar ido-ignore-item-temp-list nil
"List of items to ignore in current ido invocation. "List of items to ignore in current ido invocation.
Intended to be let-bound by functions which calls ido repeatedly. Intended to be let-bound by functions which call ido repeatedly.
Should never be set permanently.") Should never be set permanently.")
;; Temporary storage ;; Temporary storage
@ -949,7 +949,7 @@ If equal to `takeprompt', we use the prompt as the file name to be
selected.") selected.")
(defvar ido-current-directory nil (defvar ido-current-directory nil
"Current directory for ido-find-file.") "Current directory for `ido-find-file'.")
(defvar ido-auto-merge-timer nil (defvar ido-auto-merge-timer nil
"Delay timer for auto merge.") "Delay timer for auto merge.")
@ -1320,7 +1320,8 @@ This function also adds a hook to the minibuffer."
(add-hook 'kill-emacs-hook 'ido-kill-emacs-hook) (add-hook 'kill-emacs-hook 'ido-kill-emacs-hook)
(unless ido-minor-mode-map-entry (if ido-minor-mode-map-entry
(setcdr ido-minor-mode-map-entry (make-sparse-keymap))
(setq ido-minor-mode-map-entry (cons 'ido-mode (make-sparse-keymap))) (setq ido-minor-mode-map-entry (cons 'ido-mode (make-sparse-keymap)))
(add-to-list 'minor-mode-map-alist ido-minor-mode-map-entry)) (add-to-list 'minor-mode-map-alist ido-minor-mode-map-entry))
@ -1646,6 +1647,7 @@ If INITIAL is non-nil, it specifies the initial input string."
(l (ido-make-merged-file-list ido-text-init (l (ido-make-merged-file-list ido-text-init
(eq ido-use-merged-list 'auto) (eq ido-use-merged-list 'auto)
(eq ido-try-merged-list 'wide)))) (eq ido-try-merged-list 'wide))))
(ido-trace "merged" l)
(cond (cond
((not l) ((not l)
(if (eq ido-try-merged-list 'wide) (if (eq ido-try-merged-list 'wide)
@ -1665,6 +1667,9 @@ If INITIAL is non-nil, it specifies the initial input string."
ido-use-merged-list nil))) ido-use-merged-list nil)))
((eq l t) ((eq l t)
(setq ido-use-merged-list nil)) (setq ido-use-merged-list nil))
((eq l 'input-pending-p)
(setq ido-try-merged-list t
ido-use-merged-list nil))
(t (t
(setq ido-pre-merge-state (setq ido-pre-merge-state
(list ido-text-init ido-current-directory olist oign omat)) (list ido-text-init ido-current-directory olist oign omat))
@ -2267,7 +2272,7 @@ If no merge has yet taken place, toggle automatic merging option."
(defun ido-magic-forward-char () (defun ido-magic-forward-char ()
"Move forward in user input or perform magic action. "Move forward in user input or perform magic action.
If no user input is present or at end of input, perform magic actions: If no user input is present, or at end of input, perform magic actions:
C-x C-b ... C-f switch to ido-find-file. C-x C-b ... C-f switch to ido-find-file.
C-x C-f ... C-f fallback to non-ido find-file. C-x C-f ... C-f fallback to non-ido find-file.
C-x C-d ... C-f fallback to non-ido brief dired. C-x C-d ... C-f fallback to non-ido brief dired.
@ -2410,13 +2415,13 @@ If no buffer or file exactly matching the prompt exists, maybe create a new one.
(exit-minibuffer)) (exit-minibuffer))
(defun ido-enter-find-file () (defun ido-enter-find-file ()
"Drop into find-file from buffer switching." "Drop into `find-file' from buffer switching."
(interactive) (interactive)
(setq ido-exit 'find-file) (setq ido-exit 'find-file)
(exit-minibuffer)) (exit-minibuffer))
(defun ido-enter-switch-buffer () (defun ido-enter-switch-buffer ()
"Drop into ido-switch-buffer from file switching." "Drop into `ido-switch-buffer' from file switching."
(interactive) (interactive)
(setq ido-exit 'switch-to-buffer) (setq ido-exit 'switch-to-buffer)
(exit-minibuffer)) (exit-minibuffer))
@ -2493,10 +2498,10 @@ If no buffer or file exactly matching the prompt exists, maybe create a new one.
(file-directory-p dir) (file-directory-p dir)
(or (not must-match) (or (not must-match)
;; TODO. check for nonreadable and too-big. ;; TODO. check for nonreadable and too-big.
(ido-set-matches1 (ido-set-matches-1
(if (eq ido-cur-item 'file) (if (eq ido-cur-item 'file)
(ido-make-file-list1 dir) (ido-make-file-list-1 dir)
(ido-make-dir-list1 dir))))) (ido-make-dir-list-1 dir)))))
(setq j n) (setq j n)
(setq dir nil))) (setq dir nil)))
(if dir (if dir
@ -2786,11 +2791,11 @@ for first matching file."
(ido-directory-too-big nil)) (ido-directory-too-big nil))
(cond (cond
((eq ido-cur-item 'file) ((eq ido-cur-item 'file)
(ido-make-file-list1 ido-current-directory)) (ido-make-file-list-1 ido-current-directory))
((eq ido-cur-item 'dir) ((eq ido-cur-item 'dir)
(ido-make-dir-list1 ido-current-directory)) (ido-make-dir-list-1 ido-current-directory))
((eq ido-cur-item 'buffer) ((eq ido-cur-item 'buffer)
(ido-make-buffer-list1)) (ido-make-buffer-list-1))
((eq ido-cur-item 'list) ((eq ido-cur-item 'list)
ido-choice-list) ido-choice-list)
(t nil)))) (t nil))))
@ -2908,74 +2913,87 @@ for first matching file."
(setq items (cdr items))) (setq items (cdr items)))
res)) res))
(defun ido-make-merged-file-list-1 (text auto wide)
(let (res)
(if (and (ido-final-slash text) ido-dir-file-cache)
(if wide
(setq res (ido-wide-find-dirs-or-files
ido-current-directory (substring text 0 -1) ido-enable-prefix t))
;; Use list of cached directories
(let ((re (concat (regexp-quote (substring text 0 -1)) "[^/:]*/\\'"))
(dirs ido-dir-file-cache)
dir b d f)
(if nil ;; simple
(while dirs
(setq dir (car (car dirs))
dirs (cdr dirs))
(when (and (string-match re dir)
(not (ido-ignore-item-p dir ido-ignore-directories-merge))
(file-directory-p dir))
(setq b (substring dir 0 -1)
f (concat (file-name-nondirectory b) "/")
d (file-name-directory b)
res (cons (cons f d) res))))
(while dirs
(setq dir (car dirs)
d (car dir)
dirs (cdr dirs))
(when (not (ido-ignore-item-p d ido-ignore-directories-merge))
(setq dir (cdr (cdr dir)))
(while dir
(setq f (car dir)
dir (cdr dir))
(if (and (string-match re f)
(not (ido-ignore-item-p f ido-ignore-directories)))
(setq res (cons (cons f d) res)))))
(if (and auto (input-pending-p))
(setq dirs nil
res t))))))
(if wide
(setq res (ido-wide-find-dirs-or-files
ido-current-directory text ido-enable-prefix nil))
(let ((ido-text text)
(dirs ido-work-directory-list)
(must-match (and text (> (length text) 0)))
dir fl)
(if (and auto (not (member ido-current-directory dirs)))
(setq dirs (cons ido-current-directory dirs)))
(while dirs
(setq dir (car dirs)
dirs (cdr dirs))
(when (and dir (stringp dir)
(or ido-merge-ftp-work-directories
(not (ido-is-ftp-directory dir)))
(file-directory-p dir)
;; TODO. check for nonreadable and too-big.
(setq fl (if (eq ido-cur-item 'file)
(ido-make-file-list-1 dir t)
(ido-make-dir-list-1 dir t))))
(if must-match
(setq fl (ido-set-matches-1 fl)))
(if fl
(setq res (nconc fl res))))
(if (and auto (input-pending-p))
(setq dirs nil
res t))))))
res))
(defun ido-make-merged-file-list (text auto wide) (defun ido-make-merged-file-list (text auto wide)
(let (res) (let (res)
(message "Searching for `%s'...." text) (message "Searching for `%s'...." text)
(condition-case nil (condition-case nil
(if (and (ido-final-slash text) ido-dir-file-cache) (unless (catch 'input-pending-p
(if wide (let ((throw-on-input 'input-pending-p))
(setq res (ido-wide-find-dirs-or-files (setq res (ido-make-merged-file-list-1 text auto wide))
ido-current-directory (substring text 0 -1) ido-enable-prefix t)) t))
;; Use list of cached directories (setq res 'input-pending-p))
(let ((re (concat (regexp-quote (substring text 0 -1)) "[^/:]*/\\'")) (quit
(dirs ido-dir-file-cache) (setq res t
dir b d f) ido-try-merged-list nil
(if nil ;; simple ido-use-merged-list nil)))
(while dirs (when (and res (listp res))
(setq dir (car (car dirs)) (setq res (ido-sort-merged-list res auto)))
dirs (cdr dirs))
(when (and (string-match re dir)
(not (ido-ignore-item-p dir ido-ignore-directories-merge))
(file-directory-p dir))
(setq b (substring dir 0 -1)
f (concat (file-name-nondirectory b) "/")
d (file-name-directory b)
res (cons (cons f d) res))))
(while dirs
(setq dir (car dirs)
d (car dir)
dirs (cdr dirs))
(when (not (ido-ignore-item-p d ido-ignore-directories-merge))
(setq dir (cdr (cdr dir)))
(while dir
(setq f (car dir)
dir (cdr dir))
(if (and (string-match re f)
(not (ido-ignore-item-p f ido-ignore-directories)))
(setq res (cons (cons f d) res)))))
(if (and auto (input-pending-p))
(setq dirs nil
res t))))))
(if wide
(setq res (ido-wide-find-dirs-or-files
ido-current-directory text ido-enable-prefix nil))
(let ((ido-text text)
(dirs ido-work-directory-list)
(must-match (and text (> (length text) 0)))
dir fl)
(if (and auto (not (member ido-current-directory dirs)))
(setq dirs (cons ido-current-directory dirs)))
(while dirs
(setq dir (car dirs)
dirs (cdr dirs))
(when (and dir (stringp dir)
(or ido-merge-ftp-work-directories
(not (ido-is-ftp-directory dir)))
(file-directory-p dir)
;; TODO. check for nonreadable and too-big.
(setq fl (if (eq ido-cur-item 'file)
(ido-make-file-list1 dir t)
(ido-make-dir-list1 dir t))))
(if must-match
(setq fl (ido-set-matches1 fl)))
(if fl
(setq res (nconc fl res))))
(if (and auto (input-pending-p))
(setq dirs nil
res t))))))
(quit (setq res t)))
(if (and res (not (eq res t)))
(setq res (ido-sort-merged-list res auto)))
(when (and (or ido-rotate-temp ido-rotate-file-list-default) (when (and (or ido-rotate-temp ido-rotate-file-list-default)
(listp res) (listp res)
(> (length text) 0)) (> (length text) 0))
@ -2986,7 +3004,7 @@ for first matching file."
(message nil) (message nil)
res)) res))
(defun ido-make-buffer-list1 (&optional frame visible) (defun ido-make-buffer-list-1 (&optional frame visible)
;; Return list of non-ignored buffer names ;; Return list of non-ignored buffer names
(delq nil (delq nil
(mapcar (mapcar
@ -2999,12 +3017,12 @@ for first matching file."
(defun ido-make-buffer-list (default) (defun ido-make-buffer-list (default)
;; Return the current list of buffers. ;; Return the current list of buffers.
;; Currently visible buffers are put at the end of the list. ;; Currently visible buffers are put at the end of the list.
;; The hook `ido-make-buflist-hook' is run after the list has been ;; The hook `ido-make-buffer-list-hook' is run after the list has been
;; created to allow the user to further modify the order of the buffer names ;; created to allow the user to further modify the order of the buffer names
;; in this list. If DEFAULT is non-nil, and corresponds to an existing buffer, ;; in this list. If DEFAULT is non-nil, and corresponds to an existing buffer,
;; it is put to the start of the list. ;; it is put to the start of the list.
(let* ((ido-current-buffers (ido-get-buffers-in-frames 'current)) (let* ((ido-current-buffers (ido-get-buffers-in-frames 'current))
(ido-temp-list (ido-make-buffer-list1 (selected-frame) ido-current-buffers))) (ido-temp-list (ido-make-buffer-list-1 (selected-frame) ido-current-buffers)))
(if ido-temp-list (if ido-temp-list
(nconc ido-temp-list ido-current-buffers) (nconc ido-temp-list ido-current-buffers)
(setq ido-temp-list ido-current-buffers)) (setq ido-temp-list ido-current-buffers))
@ -3041,7 +3059,7 @@ for first matching file."
(nconc ido-temp-list items) (nconc ido-temp-list items)
(setq ido-temp-list items))) (setq ido-temp-list items)))
(defun ido-file-name-all-completions1 (dir) (defun ido-file-name-all-completions-1 (dir)
(cond (cond
((ido-nonreadable-directory-p dir) '()) ((ido-nonreadable-directory-p dir) '())
;; do not check (ido-directory-too-big-p dir) here. ;; do not check (ido-directory-too-big-p dir) here.
@ -3098,13 +3116,13 @@ for first matching file."
(if (and ftp (file-readable-p dir)) (if (and ftp (file-readable-p dir))
(setq mtime (cons 'ftp (ido-time-stamp)))) (setq mtime (cons 'ftp (ido-time-stamp))))
(if mtime (if mtime
(setq cached (cons dir (cons mtime (ido-file-name-all-completions1 dir))) (setq cached (cons dir (cons mtime (ido-file-name-all-completions-1 dir)))
ido-dir-file-cache (cons cached ido-dir-file-cache))) ido-dir-file-cache (cons cached ido-dir-file-cache)))
(if (> (length ido-dir-file-cache) ido-max-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))) (setcdr (nthcdr (1- ido-max-dir-file-cache) ido-dir-file-cache) nil)))
(and cached (and cached
(cdr (cdr cached)))) (cdr (cdr cached))))
(ido-file-name-all-completions1 dir))) (ido-file-name-all-completions-1 dir)))
(defun ido-remove-cached-dir (dir) (defun ido-remove-cached-dir (dir)
;; Remove dir from ido-dir-file-cache ;; Remove dir from ido-dir-file-cache
@ -3115,7 +3133,7 @@ for first matching file."
(setq ido-dir-file-cache (delq cached ido-dir-file-cache)))))) (setq ido-dir-file-cache (delq cached ido-dir-file-cache))))))
(defun ido-make-file-list1 (dir &optional merged) (defun ido-make-file-list-1 (dir &optional merged)
;; Return list of non-ignored files in DIR ;; Return list of non-ignored files in DIR
;; If MERGED is non-nil, each file is cons'ed with 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) (file-directory-p dir))
@ -3132,7 +3150,7 @@ for first matching file."
;; The hook `ido-make-file-list-hook' is run after the list has been ;; The hook `ido-make-file-list-hook' is run after the list has been
;; created to allow the user to further modify the order of the file names ;; created to allow the user to further modify the order of the file names
;; in this list. ;; in this list.
(let ((ido-temp-list (ido-make-file-list1 ido-current-directory))) (let ((ido-temp-list (ido-make-file-list-1 ido-current-directory)))
(setq ido-temp-list (sort ido-temp-list (setq ido-temp-list (sort ido-temp-list
(if ido-file-extensions-order (if ido-file-extensions-order
#'ido-file-extension-lessp #'ido-file-extension-lessp
@ -3168,7 +3186,7 @@ for first matching file."
(run-hooks 'ido-make-file-list-hook) (run-hooks 'ido-make-file-list-hook)
ido-temp-list)) ido-temp-list))
(defun ido-make-dir-list1 (dir &optional merged) (defun ido-make-dir-list-1 (dir &optional merged)
;; Return list of non-ignored subdirs in DIR ;; Return list of non-ignored subdirs in DIR
;; If MERGED is non-nil, each subdir is cons'ed with DIR ;; If MERGED is non-nil, each subdir is cons'ed with DIR
(and (or (ido-is-tramp-root dir) (file-directory-p dir)) (and (or (ido-is-tramp-root dir) (file-directory-p dir))
@ -3184,7 +3202,7 @@ for first matching file."
;; The hook `ido-make-dir-list-hook' is run after the list has been ;; The hook `ido-make-dir-list-hook' is run after the list has been
;; created to allow the user to further modify the order of the ;; created to allow the user to further modify the order of the
;; directory names in this list. ;; directory names in this list.
(let ((ido-temp-list (ido-make-dir-list1 ido-current-directory))) (let ((ido-temp-list (ido-make-dir-list-1 ido-current-directory)))
(setq ido-temp-list (sort ido-temp-list #'ido-file-lessp)) (setq ido-temp-list (sort ido-temp-list #'ido-file-lessp))
(ido-to-end ;; move . files to end (ido-to-end ;; move . files to end
(delq nil (mapcar (delq nil (mapcar
@ -3238,7 +3256,7 @@ for first matching file."
;;; FIND MATCHING ITEMS ;;; FIND MATCHING ITEMS
(defun ido-set-matches1 (items &optional do-full) (defun ido-set-matches-1 (items &optional do-full)
;; Return list of matches in items ;; Return list of matches in items
(let* ((case-fold-search ido-case-fold) (let* ((case-fold-search ido-case-fold)
(slash (and (not ido-enable-prefix) (ido-final-slash ido-text))) (slash (and (not ido-enable-prefix) (ido-final-slash ido-text)))
@ -3296,7 +3314,7 @@ for first matching file."
(defun ido-set-matches () (defun ido-set-matches ()
;; Set `ido-matches' to the list of items matching prompt ;; Set `ido-matches' to the list of items matching prompt
(when ido-rescan (when ido-rescan
(setq ido-matches (ido-set-matches1 (reverse ido-cur-list) (not ido-rotate)) (setq ido-matches (ido-set-matches-1 (reverse ido-cur-list) (not ido-rotate))
ido-rotate nil))) ido-rotate nil)))
(defun ido-ignore-item-p (name re-list &optional ignore-ext) (defun ido-ignore-item-p (name re-list &optional ignore-ext)
@ -3479,7 +3497,7 @@ for first matching file."
;;; VISIT CHOSEN BUFFER ;;; VISIT CHOSEN BUFFER
(defun ido-visit-buffer (buffer method &optional record) (defun ido-visit-buffer (buffer method &optional record)
"Visit file named FILE according to METHOD. "Visit file named FILE according to METHOD.
Record command in command-history if optional RECORD is non-nil." Record command in `command-history' if optional RECORD is non-nil."
(let (win newframe) (let (win newframe)
(cond (cond
@ -3552,9 +3570,9 @@ in another frame.
As you type in a string, all of the buffers matching the string are As you type in a string, all of the buffers matching the string are
displayed if substring-matching is used \(default). Look at displayed if substring-matching is used \(default). Look at
`ido-enable-prefix' and `ido-toggle-prefix'. When you have found the `ido-enable-prefix' and `ido-toggle-prefix'. When you have found the
buffer you want, it can then be selected. As you type, most keys have their buffer you want, it can then be selected. As you type, most keys have
normal keybindings, except for the following: \\<ido-mode-map> their normal keybindings, except for the following: \\<ido-mode-map>
RET Select the buffer at the front of the list of matches. If the RET Select the buffer at the front of the list of matches. If the
list is empty, possibly prompt to create new buffer. list is empty, possibly prompt to create new buffer.
@ -3637,11 +3655,11 @@ The file is displayed according to `ido-default-file-method' -- the
default is to show it in the same window, unless it is already default is to show it in the same window, unless it is already
visible in another frame. visible in another frame.
The file name is selected interactively by typing a substring. As you type The file name is selected interactively by typing a substring. As you
in a string, all of the filenames matching the string are displayed if type in a string, all of the filenames matching the string are displayed
substring-matching is used \(default). Look at `ido-enable-prefix' and if substring-matching is used \(default). Look at `ido-enable-prefix' and
`ido-toggle-prefix'. When you have found the filename you want, it can `ido-toggle-prefix'. When you have found the filename you want, it can
then be selected. As you type, most keys have their normal keybindings, then be selected. As you type, most keys have their normal keybindings,
except for the following: \\<ido-mode-map> except for the following: \\<ido-mode-map>
RET Select the file at the front of the list of matches. If the RET Select the file at the front of the list of matches. If the
@ -4022,7 +4040,7 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
first) first)
(if (and ind ido-use-faces) (if (and ind ido-use-faces)
(put-text-property 0 1 'face 'ido-indicator-face ind)) (put-text-property 0 1 'face 'ido-indicator ind))
(if (and ido-use-faces comps) (if (and ido-use-faces comps)
(let* ((fn (ido-name (car comps))) (let* ((fn (ido-name (car comps)))
@ -4030,8 +4048,8 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
(setq first (format "%s" fn)) (setq first (format "%s" fn))
(put-text-property 0 ln 'face (put-text-property 0 ln 'face
(if (= (length comps) 1) (if (= (length comps) 1)
'ido-only-match-face 'ido-only-match
'ido-first-match-face) 'ido-first-match)
first) first)
(if ind (setq first (concat first ind))) (if ind (setq first (concat first ind)))
(setq comps (cons first (cdr comps))))) (setq comps (cons first (cdr comps)))))
@ -4074,7 +4092,7 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
(if (and ido-use-faces (if (and ido-use-faces
(not (string= str first)) (not (string= str first))
(ido-final-slash str)) (ido-final-slash str))
(put-text-property 0 (length str) 'face 'ido-subdir-face str)) (put-text-property 0 (length str) 'face 'ido-subdir str))
str))))) str)))))
comps)))))) comps))))))
@ -4154,7 +4172,7 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
Return the name of a buffer selected. Return the name of a buffer selected.
PROMPT is the prompt to give to the user. DEFAULT if given is the default PROMPT is the prompt to give to the user. DEFAULT if given is the default
buffer to be selected, which will go to the front of the list. buffer to be selected, which will go to the front of the list.
If REQUIRE-MATCH is non-nil, an existing-buffer must be selected." If REQUIRE-MATCH is non-nil, an existing buffer must be selected."
(let* ((ido-current-directory nil) (let* ((ido-current-directory nil)
(ido-directory-nonreadable nil) (ido-directory-nonreadable nil)
(ido-directory-too-big nil) (ido-directory-too-big nil)
@ -4176,7 +4194,9 @@ See `read-file-name' for additional parameters."
(eq (get this-command 'ido) 'dir) (eq (get this-command 'ido) 'dir)
(memq this-command ido-read-file-name-as-directory-commands)) (memq this-command ido-read-file-name-as-directory-commands))
(setq filename (setq filename
(ido-read-directory-name prompt dir default-filename mustmatch initial))) (ido-read-directory-name prompt dir default-filename mustmatch initial))
(if (eq ido-exit 'fallback)
(setq filename 'fallback)))
((and (not (eq (get this-command 'ido) 'ignore)) ((and (not (eq (get this-command 'ido) 'ignore))
(not (memq this-command ido-read-file-name-non-ido)) (not (memq this-command ido-read-file-name-non-ido))
(or (null predicate) (eq predicate 'file-exists-p))) (or (null predicate) (eq predicate 'file-exists-p)))

View file

@ -102,7 +102,7 @@ prevent a running IELM process from being messed up when the user
customizes `ielm-prompt'.") customizes `ielm-prompt'.")
(defcustom ielm-dynamic-return t (defcustom ielm-dynamic-return t
"*Controls whether \\<ielm-map>\\[ielm-return] has intelligent behaviour in IELM. "*Controls whether \\<ielm-map>\\[ielm-return] has intelligent behavior in IELM.
If non-nil, \\[ielm-return] evaluates input for complete sexps, or inserts a newline If non-nil, \\[ielm-return] evaluates input for complete sexps, or inserts a newline
and indents for incomplete sexps. If nil, always inserts newlines." and indents for incomplete sexps. If nil, always inserts newlines."
:type 'boolean :type 'boolean
@ -468,7 +468,7 @@ buffer, then the values in the working buffer are used. The variables
Expressions evaluated by IELM are not subject to `debug-on-quit' or Expressions evaluated by IELM are not subject to `debug-on-quit' or
`debug-on-error'. `debug-on-error'.
The behaviour of IELM may be customized with the following variables: The behavior of IELM may be customized with the following variables:
* To stop beeping on error, set `ielm-noisy' to nil. * To stop beeping on error, set `ielm-noisy' to nil.
* If you don't like the prompt, you can change it by setting `ielm-prompt'. * If you don't like the prompt, you can change it by setting `ielm-prompt'.
* If you do not like that the prompt is (by default) read-only, set * If you do not like that the prompt is (by default) read-only, set

View file

@ -1379,6 +1379,43 @@ If FORK is a string, it is the name to use for the new buffer."
(defvar Info-read-node-completion-table) (defvar Info-read-node-completion-table)
(defun Info-read-node-name-2 (string path-and-suffixes action)
"Virtual completion table for file names input in Info node names.
PATH-AND-SUFFIXES is a pair of lists, (DIRECTORIES . SUFFIXES)."
(let* ((names nil)
(suffixes (remove "" (cdr path-and-suffixes)))
(suffix (concat (regexp-opt suffixes t) "\\'"))
(string-dir (file-name-directory string))
(dirs
(if (file-name-absolute-p string)
(list (file-name-directory string))
(car path-and-suffixes))))
(dolist (dir dirs)
(unless dir
(setq dir default-directory))
(if string-dir (setq dir (expand-file-name string-dir dir)))
(when (file-directory-p dir)
(dolist (file (file-name-all-completions
(file-name-nondirectory string) dir))
;; If the file name has no suffix or a standard suffix,
;; include it.
(and (or (null (file-name-extension file))
(string-match suffix file))
;; But exclude subfiles of split info files.
(not (string-match "-[0-9]+\\'" file))
;; And exclude backup files.
(not (string-match "~\\'" file))
(push (if string-dir (concat string-dir file) file) names))
;; If the file name ends in a standard suffix,
;; add the unsuffixed name as a completion option.
(when (string-match suffix file)
(setq file (substring file 0 (match-beginning 0)))
(push (if string-dir (concat string-dir file) file) names)))))
(cond
((eq action t) (all-completions string names))
((null action) (try-completion string names))
(t (test-completion string names)))))
;; This function is used as the "completion table" while reading a node name. ;; This function is used as the "completion table" while reading a node name.
;; It does completion using the alist in Info-read-node-completion-table ;; It does completion using the alist in Info-read-node-completion-table
;; unless STRING starts with an open-paren. ;; unless STRING starts with an open-paren.
@ -1389,15 +1426,16 @@ If FORK is a string, it is the name to use for the new buffer."
(let ((file (substring string 1))) (let ((file (substring string 1)))
(cond (cond
((eq code nil) ((eq code nil)
(let ((comp (try-completion file 'locate-file-completion (let ((comp (try-completion file 'Info-read-node-name-2
(cons Info-directory-list (cons Info-directory-list
(mapcar 'car Info-suffix-list))))) (mapcar 'car Info-suffix-list)))))
(cond (cond
((eq comp t) (concat string ")")) ((eq comp t) (concat string ")"))
(comp (concat "(" comp))))) (comp (concat "(" comp)))))
((eq code t) (all-completions file 'locate-file-completion ((eq code t)
(cons Info-directory-list (all-completions file 'Info-read-node-name-2
(mapcar 'car Info-suffix-list)))) (cons Info-directory-list
(mapcar 'car Info-suffix-list))))
(t nil)))) (t nil))))
;; If a file name was given, then any node is fair game. ;; If a file name was given, then any node is fair game.
((string-match "\\`(" string) ((string-match "\\`(" string)
@ -1413,6 +1451,10 @@ If FORK is a string, it is the name to use for the new buffer."
(t (t
(test-completion string Info-read-node-completion-table predicate)))) (test-completion string Info-read-node-completion-table predicate))))
;; Arrange to highlight the proper letters in the completion list buffer.
(put 'Info-read-node-name-1 'completion-base-size-function
(lambda () 1))
(defun Info-read-node-name (prompt &optional default) (defun Info-read-node-name (prompt &optional default)
(let* ((completion-ignore-case t) (let* ((completion-ignore-case t)
(Info-read-node-completion-table (Info-build-node-completions)) (Info-read-node-completion-table (Info-build-node-completions))
@ -3482,29 +3524,37 @@ the variable `Info-file-list-for-emacs'."
(t (t
(Info-goto-emacs-command-node command))))) (Info-goto-emacs-command-node command)))))
(defface Info-title-1-face (defface info-title-1
'((((type tty pc) (class color)) :foreground "yellow" :weight bold) '((((type tty pc) (class color)) :foreground "green" :weight bold)
(t :height 1.2 :inherit Info-title-2-face)) (t :height 1.2 :inherit info-title-2))
"Face for Info titles at level 1." "Face for info titles at level 1."
:group 'info) :group 'info)
;; backward-compatibility alias
(put 'Info-title-1-face 'face-alias 'info-title-1)
(defface Info-title-2-face (defface info-title-2
'((((type tty pc) (class color)) :foreground "lightblue" :weight bold) '((((type tty pc) (class color)) :foreground "lightblue" :weight bold)
(t :height 1.2 :inherit Info-title-3-face)) (t :height 1.2 :inherit info-title-3))
"Face for Info titles at level 2." "Face for info titles at level 2."
:group 'info) :group 'info)
;; backward-compatibility alias
(put 'Info-title-2-face 'face-alias 'info-title-2)
(defface Info-title-3-face (defface info-title-3
'((((type tty pc) (class color)) :weight bold) '((((type tty pc) (class color)) :weight bold)
(t :height 1.2 :inherit Info-title-4-face)) (t :height 1.2 :inherit info-title-4))
"Face for Info titles at level 3." "Face for info titles at level 3."
:group 'info) :group 'info)
;; backward-compatibility alias
(put 'Info-title-3-face 'face-alias 'info-title-3)
(defface Info-title-4-face (defface info-title-4
'((((type tty pc) (class color)) :weight bold) '((((type tty pc) (class color)) :weight bold)
(t :weight bold :inherit variable-pitch)) (t :weight bold :inherit variable-pitch))
"Face for Info titles at level 4." "Face for info titles at level 4."
:group 'info) :group 'info)
;; backward-compatibility alias
(put 'Info-title-4-face 'face-alias 'info-title-4)
(defface info-menu-header (defface info-menu-header
'((((type tty pc)) '((((type tty pc))
@ -3644,10 +3694,10 @@ Preserve text properties."
nil t) nil t)
(let* ((c (preceding-char)) (let* ((c (preceding-char))
(face (face
(cond ((= c ?*) 'Info-title-1-face) (cond ((= c ?*) 'info-title-1)
((= c ?=) 'Info-title-2-face) ((= c ?=) 'info-title-2)
((= c ?-) 'Info-title-3-face) ((= c ?-) 'info-title-3)
(t 'Info-title-4-face)))) (t 'info-title-4))))
(put-text-property (match-beginning 1) (match-end 1) (put-text-property (match-beginning 1) (match-end 1)
'font-lock-face face)) 'font-lock-face face))
;; This is a serious problem for trying to handle multiple ;; This is a serious problem for trying to handle multiple

View file

@ -791,6 +791,7 @@ Optional arg BUFFER is ignored (for use in `format-alist')."
("&iuml;" "ï") ("&iuml;" "ï")
("&eth;" "ð") ("&eth;" "ð")
("&ntilde;" "ñ") ("&ntilde;" "ñ")
("&nbsp;" "<EFBFBD>")
("&ograve;" "ò") ("&ograve;" "ò")
("&oacute;" "ó") ("&oacute;" "ó")
("&ocirc;" "ô") ("&ocirc;" "ô")

View file

@ -47,7 +47,7 @@
;; like this ;; like this
;; (add-to-list 'file-coding-system-alist ;; (add-to-list 'file-coding-system-alist
;; '("\\.tex\\|\\.ltx\\|\\.dtx\\|\\.drv\\'" . latexenc-find-file-coding-system)) ;; '("\\.\\(tex\\|ltx\\|dtx\\|drv\\)\\'" . latexenc-find-file-coding-system))
;;; Code: ;;; Code:
@ -130,46 +130,50 @@ coding system names is determined from `latex-inputenc-coding-alist'."
(throw 'cs t) (throw 'cs t)
(goto-char (match-end 0)))))) (goto-char (match-end 0))))))
(let* ((match (match-string 1)) (let* ((match (match-string 1))
(sym (intern match))) (sym (or (latexenc-inputenc-to-coding-system match)
(when (latexenc-inputenc-to-coding-system match) (intern match))))
(setq sym (latexenc-inputenc-to-coding-system match))) (cond
(when (coding-system-p sym) ((coding-system-p sym) sym)
sym ((and (require 'code-pages nil t) (coding-system-p sym)) sym)
(if (and (require 'code-pages nil t) (coding-system-p sym)) (t 'undecided)))
sym
'undecided)))
;; else try to find it in the master/main file ;; else try to find it in the master/main file
(let (latexenc-main-file) (let ((default-directory (file-name-directory (nth 1 arg-list)))
;; is there a TeX-master or tex-main-file in the local variable section latexenc-main-file)
;; Is there a TeX-master or tex-main-file in the local variables
;; section?
(unless latexenc-dont-use-TeX-master-flag (unless latexenc-dont-use-TeX-master-flag
(goto-char (point-max)) (goto-char (point-max))
(search-backward "\n\^L" (max (- (point-max) 3000) (point-min)) 'move) (search-backward "\n\^L" (max (- (point-max) 3000) (point-min))
'move)
(search-forward "Local Variables:" nil t) (search-forward "Local Variables:" nil t)
(when (re-search-forward "^%+ *\\(TeX-master\\|tex-main-file\\): *\"\\(.+\\)\"" nil t) (when (re-search-forward
(let ((file (concat (file-name-directory (nth 1 arg-list)) (match-string 2)))) "^%+ *\\(TeX-master\\|tex-main-file\\): *\"\\(.+\\)\""
(if (file-exists-p file) nil t)
(setq latexenc-main-file file) (let ((file (match-string 2)))
(if (boundp 'TeX-default-extension) (dolist (ext `("" ,(if (boundp 'TeX-default-extension)
(when (file-exists-p (concat file "." TeX-default-extension)) (concat "." TeX-default-extension)
(setq latexenc-main-file (concat file "." TeX-default-extension))) "")
(dolist (ext '("drv" "dtx" "ltx" "tex")) ".tex" ".ltx" ".dtx" ".drv"))
(if (file-exists-p (concat file "." ext)) (if (and (null latexenc-main-file) ;Stop at first.
(setq latexenc-main-file (concat file "." ext))))))))) (file-exists-p (concat file ext)))
(setq latexenc-main-file (concat file ext)))))))
;; try tex-modes tex-guess-main-file ;; try tex-modes tex-guess-main-file
(when (and (not latexenc-dont-use-tex-guess-main-file-flag) (when (and (not latexenc-dont-use-tex-guess-main-file-flag)
(not latexenc-main-file)) (not latexenc-main-file))
;; Use a separate `when' so the byte-compiler sees the fboundp.
(when (fboundp 'tex-guess-main-file) (when (fboundp 'tex-guess-main-file)
(let ((tex-start-of-header "\\\\document\\(style\\|class\\)") (let ((tex-start-of-header "\\\\document\\(style\\|class\\)"))
(default-directory (file-name-directory (nth 1 arg-list))))
(setq latexenc-main-file (tex-guess-main-file))))) (setq latexenc-main-file (tex-guess-main-file)))))
;; if we found a master/main file get the coding system from it ;; if we found a master/main file get the coding system from it
(if (and latexenc-main-file (if (and latexenc-main-file
(file-readable-p latexenc-main-file)) (file-readable-p latexenc-main-file))
(let* ((latexenc-dont-use-tex-guess-main-file-flag t) (let* ((latexenc-dont-use-tex-guess-main-file-flag t)
(latexenc-dont-use-TeX-master-flag t) (latexenc-dont-use-TeX-master-flag t)
(latexenc-main-buffer (find-file-noselect latexenc-main-file t))) (latexenc-main-buffer
(or (buffer-local-value 'coding-system-for-write latexenc-main-buffer) (find-file-noselect latexenc-main-file t)))
(buffer-local-value 'buffer-file-coding-system latexenc-main-buffer))) (coding-system-base ;Disregard the EOL part of the CS.
(with-current-buffer latexenc-main-buffer
(or coding-system-for-write buffer-file-coding-system))))
'undecided)))) 'undecided))))
'undecided)) 'undecided))

View file

@ -624,7 +624,7 @@ then call `write-region', then afterward this variable will be non-nil
only if the user was explicitly asked and specified a coding system.") only if the user was explicitly asked and specified a coding system.")
(defvar select-safe-coding-system-accept-default-p nil (defvar select-safe-coding-system-accept-default-p nil
"If non-nil, a function to control the behaviour of coding system selection. "If non-nil, a function to control the behavior of coding system selection.
The meaning is the same as the argument ACCEPT-DEFAULT-P of the The meaning is the same as the argument ACCEPT-DEFAULT-P of the
function `select-safe-coding-system' (which see). This variable function `select-safe-coding-system' (which see). This variable
overrides that argument.") overrides that argument.")
@ -1569,7 +1569,7 @@ at point in the current buffer.
But, if this flag is non-nil, it displays them in echo area instead.") But, if this flag is non-nil, it displays them in echo area instead.")
(defvar input-method-exit-on-invalid-key nil (defvar input-method-exit-on-invalid-key nil
"This flag controls the behaviour of an input method on invalid key input. "This flag controls the behavior of an input method on invalid key input.
Usually, when a user types a key which doesn't start any character Usually, when a user types a key which doesn't start any character
handled by the input method, the key is handled by turning off the handled by the input method, the key is handled by turning off the
input method temporarily. After that key, the input method is re-enabled. input method temporarily. After that key, the input method is re-enabled.
@ -1846,7 +1846,7 @@ specifies the character set for the major languages of Western Europe."
;; Don't invoke fontset-related functions if fontsets aren't ;; Don't invoke fontset-related functions if fontsets aren't
;; supported in this build of Emacs. ;; supported in this build of Emacs.
(when (fboundp 'fontset-list) (when (fboundp 'fontset-list)
(let ((overriding-fontspec (get-language-info language-name (let ((overriding-fontspec (get-language-info language-name
'overriding-fontspec))) 'overriding-fontspec)))
(if overriding-fontspec (if overriding-fontspec
(set-overriding-fontspec-internal overriding-fontspec)))) (set-overriding-fontspec-internal overriding-fontspec))))

View file

@ -64,7 +64,7 @@
'help-echo "mouse-2, RET: show table of characters for this character set") 'help-echo "mouse-2, RET: show table of characters for this character set")
;;;###autoload ;;;###autoload
(defvar non-iso-charset-alist (defvar non-iso-charset-alist
`((mac-roman `((mac-roman
(ascii latin-iso8859-1 mule-unicode-2500-33ff (ascii latin-iso8859-1 mule-unicode-2500-33ff
mule-unicode-0100-24ff mule-unicode-e000-ffff) mule-unicode-0100-24ff mule-unicode-e000-ffff)
@ -609,7 +609,7 @@ PC `codepages' and other coded character sets. See `non-iso-charset-alist'."
(let ((vars (coding-system-get coding-system 'dependency))) (let ((vars (coding-system-get coding-system 'dependency)))
(when vars (when vars
(princ "See also the documentation of these customizable variables (princ "See also the documentation of these customizable variables
which alter the behaviour of this coding system.\n") which alter the behavior of this coding system.\n")
(dolist (v vars) (dolist (v vars)
(princ " `") (princ " `")
(princ v) (princ v)

View file

@ -2439,7 +2439,7 @@ Interactively, prompts for a hex string giving the code."
The ISO 8859 characters sets overlap, e.g. 8859-1 (Latin-1) and The ISO 8859 characters sets overlap, e.g. 8859-1 (Latin-1) and
8859-15 (Latin-9) differ only in a few characters. Emacs normally 8859-15 (Latin-9) differ only in a few characters. Emacs normally
distinguishes equivalent characters from those ISO-8859 character sets distinguishes equivalent characters from those ISO-8859 character sets
which are built in to Emacs. This behaviour is essentially inherited which are built in to Emacs. This behavior is essentially inherited
from the European-originated international standards. Treating them from the European-originated international standards. Treating them
equivalently, by translating to and from a single representation is equivalently, by translating to and from a single representation is
called `unification'. (The `utf-8' coding system treats the called `unification'. (The `utf-8' coding system treats the

View file

@ -151,7 +151,7 @@ It's purpose is to pass different call arguments to
(switch-to-buffer buf) (switch-to-buffer buf)
(if isearchb-show-completions (if isearchb-show-completions
(message "isearchb: %s%s" iswitchb-text (message "isearchb: %s%s" iswitchb-text
(iswitchb-completions iswitchb-text nil)) (iswitchb-completions iswitchb-text))
(if (= 1 (length iswitchb-matches)) (if (= 1 (length iswitchb-matches))
(message "isearchb: %s (only match)" iswitchb-text) (message "isearchb: %s (only match)" iswitchb-text)
(message "isearchb: %s" iswitchb-text)))))) (message "isearchb: %s" iswitchb-text))))))
@ -213,7 +213,7 @@ accessed via isearchb."
((eq last-command 'isearchb-activate) ((eq last-command 'isearchb-activate)
(if isearchb-last-buffer (if isearchb-last-buffer
(switch-to-buffer isearchb-last-buffer) (switch-to-buffer isearchb-last-buffer)
(error "isearchb: There is no previous buffer to toggle to.")) (error "isearchb: There is no previous buffer to toggle to"))
(isearchb-stop nil t)) (isearchb-stop nil t))
(t (t
(message "isearchb: ") (message "isearchb: ")

View file

@ -1,6 +1,7 @@
;;; iswitchb.el --- switch between buffers using substrings ;;; iswitchb.el --- switch between buffers using substrings
;; Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. ;; Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
;; Free Software Foundation, Inc.
;; Author: Stephen Eglen <stephen@gnu.org> ;; Author: Stephen Eglen <stephen@gnu.org>
;; Maintainer: Stephen Eglen <stephen@gnu.org> ;; Maintainer: Stephen Eglen <stephen@gnu.org>
@ -165,11 +166,10 @@
;; Font-Lock ;; Font-Lock
;; If you have font-lock loaded, the first matching buffer is ;; font-lock is used to highlight the first matching buffer. To
;; highlighted. To switch this off, set (setq iswitchb-use-fonts nil) ;; switch this off, set (setq iswitchb-use-faces nil). Colouring of
;; I don't use font-lock that much, so I've hardcoded the faces. If ;; the matching buffer name was suggested by Carsten Dominik
;; this is too harsh, let me know. Colouring of the matching buffer ;; (dominik@strw.leidenuniv.nl)
;; name was suggested by Carsten Dominik (dominik@strw.leidenuniv.nl)
;; Replacement for read-buffer ;; Replacement for read-buffer
@ -230,16 +230,10 @@
;; Regexp matching ;; Regexp matching
;; There is limited provision for regexp matching within iswitchb, ;; There is provision for regexp matching within iswitchb, enabled
;; enabled through `iswitchb-regexp'. This allows you to type `c$' ;; through `iswitchb-regexp'. This allows you to type `c$' for
;; for example and see all buffer names ending in `c'. This facility ;; example and see all buffer names ending in `c'. No completion
;; is quite limited though in two respects. First, you can't ;; mechanism is currently offered when regexp searching.
;; currently type in expressions like `[0-9]' directly -- you have to
;; type them in when iswitchb-regexp is nil and then toggle on the
;; regexp functionality. Likewise, don't enter an expression
;; containing `\' in regexp mode. If you try, iswitchb gets confused,
;; so just hit C-g and try again. Secondly, no completion mechanism
;; is currently offered when regexp searching.
;;; TODO ;;; TODO
@ -256,6 +250,8 @@
(fboundp 'last))) (fboundp 'last)))
(require 'cl)) (require 'cl))
(require 'font-lock)
;; Set up the custom library. ;; Set up the custom library.
;; taken from http://www.dina.kvl.dk/~abraham/custom/ ;; taken from http://www.dina.kvl.dk/~abraham/custom/
(eval-and-compile (eval-and-compile
@ -377,10 +373,11 @@ See also `iswitchb-newbuffer'."
:type 'boolean :type 'boolean
:group 'iswitchb) :group 'iswitchb)
(defcustom iswitchb-use-fonts t (defcustom iswitchb-use-faces t
"*Non-nil means use font-lock fonts for showing first match." "*Non-nil means use font-lock fonts for showing first match."
:type 'boolean :type 'boolean
:group 'iswitchb) :group 'iswitchb)
(define-obsolete-variable-alias 'iswitchb-use-fonts 'iswitchb-use-faces "22.1")
(defcustom iswitchb-use-frame-buffer-list nil (defcustom iswitchb-use-frame-buffer-list nil
"*Non-nil means use the currently selected frame's buffer list." "*Non-nil means use the currently selected frame's buffer list."
@ -408,6 +405,35 @@ iswitchb is running."
:type 'hook :type 'hook
:group 'iswitchb) :group 'iswitchb)
(defface iswitchb-single-match
'((t
(:inherit font-lock-comment-face)))
"Iswitchb face for single matching buffer name."
:version "22.1"
:group 'iswitchb)
(defface iswitchb-current-match
'((t
(:inherit font-lock-function-name-face)))
"Iswitchb face for current matching buffer name."
:version "22.1"
:group 'iswitchb)
(defface iswitchb-virtual-matches
'((t
(:inherit font-lock-builtin-face)))
"Iswitchb face for matching virtual buffer names.
See also `iswitchb-use-virtual-buffers'."
:version "22.1"
:group 'iswitchb)
(defface iswitchb-invalid-regexp
'((t
(:inherit font-lock-warning-face)))
"Iswitchb face for indicating invalid regexp. "
:version "22.1"
:group 'iswitchb)
;; Do we need the variable iswitchb-use-mycompletion? ;; Do we need the variable iswitchb-use-mycompletion?
;;; Internal Variables ;;; Internal Variables
@ -507,6 +533,11 @@ selected.")
(defvar iswitchb-minibuf-depth nil (defvar iswitchb-minibuf-depth nil
"Value we expect to be returned by `minibuffer-depth' in the minibuffer.") "Value we expect to be returned by `minibuffer-depth' in the minibuffer.")
(defvar iswitchb-common-match-inserted nil
"Non-nil if we have just inserted a common match in the minibuffer.")
(defvar iswitchb-invalid-regexp)
;;; FUNCTIONS ;;; FUNCTIONS
;;; ISWITCHB KEYMAP ;;; ISWITCHB KEYMAP
@ -564,6 +595,7 @@ in a separate window.
;;`iswitchb-buffer-ignore') ;;`iswitchb-buffer-ignore')
(let* ((prompt "iswitch ") (let* ((prompt "iswitch ")
iswitchb-invalid-regexp
(buf (iswitchb-read-buffer prompt))) (buf (iswitchb-read-buffer prompt)))
;;(message "chosen text %s" iswitchb-final-text) ;;(message "chosen text %s" iswitchb-final-text)
@ -572,7 +604,8 @@ in a separate window.
(cond ( (eq iswitchb-exit 'findfile) (cond ( (eq iswitchb-exit 'findfile)
(call-interactively 'find-file)) (call-interactively 'find-file))
(iswitchb-invalid-regexp
(message "Won't make invalid regexp named buffer"))
(t (t
;; View the buffer ;; View the buffer
;;(message "go to buf %s" buf) ;;(message "go to buf %s" buf)
@ -602,10 +635,7 @@ the selection process begins. Used by isearchb.el."
buf-sel buf-sel
iswitchb-final-text iswitchb-final-text
(icomplete-mode nil) ;; prevent icomplete starting up (icomplete-mode nil) ;; prevent icomplete starting up
;; can only use fonts if they have been bound. )
(iswitchb-use-fonts (and iswitchb-use-fonts
(boundp 'font-lock-comment-face)
(boundp 'font-lock-function-name-face))))
(iswitchb-define-mode-map) (iswitchb-define-mode-map)
(setq iswitchb-exit nil) (setq iswitchb-exit nil)
@ -691,7 +721,9 @@ The result is stored in `iswitchb-common-match-string'."
(let (res) (let (res)
(cond ((not iswitchb-matches) (cond ((not iswitchb-matches)
(run-hooks 'iswitchb-cannot-complete-hook)) (run-hooks 'iswitchb-cannot-complete-hook))
(iswitchb-invalid-regexp
;; Do nothing
)
((= 1 (length iswitchb-matches)) ((= 1 (length iswitchb-matches))
;; only one choice, so select it. ;; only one choice, so select it.
(exit-minibuffer)) (exit-minibuffer))
@ -703,7 +735,8 @@ The result is stored in `iswitchb-common-match-string'."
(not (equal res iswitchb-text))) (not (equal res iswitchb-text)))
;; found something to complete, so put it in the minibuffer. ;; found something to complete, so put it in the minibuffer.
(progn (progn
(setq iswitchb-rescan nil) (setq iswitchb-rescan nil
iswitchb-common-match-inserted t)
(delete-region (minibuffer-prompt-end) (point)) (delete-region (minibuffer-prompt-end) (point))
(insert res)) (insert res))
;; else nothing to complete ;; else nothing to complete
@ -839,10 +872,8 @@ it is put to the start of the list."
(defun iswitchb-to-end (lst) (defun iswitchb-to-end (lst)
"Move the elements from LST to the end of `iswitchb-temp-buflist'." "Move the elements from LST to the end of `iswitchb-temp-buflist'."
(mapcar (dolist (elem lst)
(lambda (elem) (setq iswitchb-temp-buflist (delq elem iswitchb-temp-buflist)))
(setq iswitchb-temp-buflist (delq elem iswitchb-temp-buflist)))
lst)
(setq iswitchb-temp-buflist (nconc iswitchb-temp-buflist lst))) (setq iswitchb-temp-buflist (nconc iswitchb-temp-buflist lst)))
(defun iswitchb-get-buffers-in-frames (&optional current) (defun iswitchb-get-buffers-in-frames (&optional current)
@ -883,29 +914,19 @@ current frame, rather than all frames, regardless of value of
"Return buffers matching REGEXP. "Return buffers matching REGEXP.
If STRING-FORMAT is nil, consider REGEXP as just a string. If STRING-FORMAT is nil, consider REGEXP as just a string.
BUFFER-LIST can be list of buffers or list of strings." BUFFER-LIST can be list of buffers or list of strings."
(let* ((case-fold-search (iswitchb-case)) (let* ((case-fold-search (iswitchb-case))
;; need reverse since we are building up list backwards name ret)
(list (reverse buffer-list)) (if (null string-format) (setq regexp (regexp-quote regexp)))
(do-string (stringp (car list))) (setq iswitchb-invalid-regexp nil)
name (condition-case error
ret) (dolist (x buffer-list (nreverse ret))
(mapcar (setq name (if (stringp x) x (buffer-name x)))
(lambda (x) (when (and (string-match regexp name)
(not (iswitchb-ignore-buffername-p name)))
(if do-string (push name ret)))
(setq name x) ;We already have the name (invalid-regexp
(setq name (buffer-name x))) (setq iswitchb-invalid-regexp t)
(cdr error)))))
(cond
((and (or (and string-format (string-match regexp name))
(and (null string-format)
(string-match (regexp-quote regexp) name)))
(not (iswitchb-ignore-buffername-p name)))
(setq ret (cons name ret))
)))
list)
ret))
(defun iswitchb-ignore-buffername-p (bufname) (defun iswitchb-ignore-buffername-p (bufname)
"Return t if the buffer BUFNAME should be ignored." "Return t if the buffer BUFNAME should be ignored."
@ -989,7 +1010,8 @@ Return the modified list with the last element prepended to it."
(temp-buf "*Completions*") (temp-buf "*Completions*")
(win)) (win))
(if (eq last-command this-command) (if (and (eq last-command this-command)
(not iswitchb-common-match-inserted))
;; scroll buffer ;; scroll buffer
(progn (progn
(set-buffer temp-buf) (set-buffer temp-buf)
@ -1016,8 +1038,8 @@ Return the modified list with the last element prepended to it."
(fundamental-mode)) (fundamental-mode))
(display-completion-list (if iswitchb-matches (display-completion-list (if iswitchb-matches
iswitchb-matches iswitchb-matches
iswitchb-buflist)) iswitchb-buflist))))
))))) (setq iswitchb-common-match-inserted nil))))
;;; KILL CURRENT BUFFER ;;; KILL CURRENT BUFFER
@ -1227,8 +1249,7 @@ Copied from `icomplete-exhibit' with two changes:
;; Insert the match-status information: ;; Insert the match-status information:
(insert (iswitchb-completions (insert (iswitchb-completions
contents contents))))))
(not minibuffer-completion-confirm)))))))
(eval-when-compile (eval-when-compile
(defvar most-len) (defvar most-len)
@ -1243,27 +1264,29 @@ Copied from `icomplete-exhibit' with two changes:
(setq most-is-exact t)) (setq most-is-exact t))
(substring com most-len))) (substring com most-len)))
(defun iswitchb-completions (name require-match) (defun iswitchb-completions (name)
"Return the string that is displayed after the user's text. "Return the string that is displayed after the user's text.
Modified from `icomplete-completions'." Modified from `icomplete-completions'."
(let ((comps iswitchb-matches) (let ((comps iswitchb-matches)
; "-determined" - only one candidate ; "-determined" - only one candidate
(open-bracket-determined (if require-match "(" "[")) (open-bracket-determined "[")
(close-bracket-determined (if require-match ")" "]")) (close-bracket-determined "]")
;"-prospects" - more than one candidate ;"-prospects" - more than one candidate
(open-bracket-prospects "{") (open-bracket-prospects "{")
(close-bracket-prospects "}") (close-bracket-prospects "}")
first) first)
(if (and iswitchb-use-fonts comps) (if (and iswitchb-use-faces comps)
(progn (progn
(setq first (car comps)) (setq first (car comps))
(setq first (format "%s" first)) (setq first (format "%s" first))
(put-text-property 0 (length first) 'face (put-text-property 0 (length first) 'face
(if (= (length comps) 1) (if (= (length comps) 1)
'font-lock-comment-face (if iswitchb-invalid-regexp
'font-lock-function-name-face) 'iswitchb-invalid-regexp
'iswitchb-single-match)
'iswitchb-current-match)
first) first)
(setq comps (cons first (cdr comps))))) (setq comps (cons first (cdr comps)))))
@ -1292,7 +1315,7 @@ Modified from `icomplete-completions'."
(let ((comp comps)) (let ((comp comps))
(while comp (while comp
(put-text-property 0 (length (car comp)) (put-text-property 0 (length (car comp))
'face 'font-lock-builtin-face 'face 'iswitchb-virtual-matches
(car comp)) (car comp))
(setq comp (cdr comp)))))) (setq comp (cdr comp))))))
@ -1300,16 +1323,23 @@ Modified from `icomplete-completions'."
open-bracket-determined open-bracket-determined
close-bracket-determined)) close-bracket-determined))
((null (cdr comps)) ;one match (iswitchb-invalid-regexp
(concat (if (and (> (length (car comps)) (concat " " (car comps)))
(length name))) ((null (cdr comps)) ;one match
(concat open-bracket-determined (concat
(if (if (not iswitchb-regexp)
(= (length name)
(length (car comps)))
(string-match name (car comps))
(string-equal (match-string 0 (car comps))
(car comps)))
""
(concat open-bracket-determined
;; when there is one match, show the ;; when there is one match, show the
;; matching buffer name in full ;; matching buffer name in full
(car comps) (car comps)
close-bracket-determined) close-bracket-determined))
"") (if (not iswitchb-use-faces) " [Matched]")))
(if (not iswitchb-use-fonts) " [Matched]")))
(t ;multiple matches (t ;multiple matches
(if (and iswitchb-max-to-show (if (and iswitchb-max-to-show
(> (length comps) iswitchb-max-to-show)) (> (length comps) iswitchb-max-to-show))
@ -1431,5 +1461,5 @@ This mode enables switching between buffers using substrings. See
(provide 'iswitchb) (provide 'iswitchb)
;;; arch-tag: d74198ae-753f-44f2-b34f-0c515398d90a ;; arch-tag: d74198ae-753f-44f2-b34f-0c515398d90a
;;; iswitchb.el ends here ;;; iswitchb.el ends here

View file

@ -631,7 +631,7 @@ A prefix argument serves as a repeat count. Zero means repeat until error.
When you call the macro, you can call the macro again by repeating When you call the macro, you can call the macro again by repeating
just the last key in the key sequence that you used to call this just the last key in the key sequence that you used to call this
command. See `kmacro-call-repeat-key' and `kmacro-call-repeat-with-arg' command. See `kmacro-call-repeat-key' and `kmacro-call-repeat-with-arg'
for details on how to adjust or disable this behaviour. for details on how to adjust or disable this behavior.
To make a macro permanent so you can call it even after defining To make a macro permanent so you can call it even after defining
others, use \\[kmacro-name-last-macro]." others, use \\[kmacro-name-last-macro]."

View file

@ -144,7 +144,7 @@ Like Lisp mode, plus these special commands:
To make Lisp mode automatically change to Ledit mode, To make Lisp mode automatically change to Ledit mode,
do (setq lisp-mode-hook 'ledit-from-lisp-mode)" do (setq lisp-mode-hook 'ledit-from-lisp-mode)"
(interactive) (interactive)
(lisp-mode) (delay-mode-hooks (lisp-mode))
(ledit-from-lisp-mode)) (ledit-from-lisp-mode))
;;;###autoload ;;;###autoload

View file

@ -332,7 +332,7 @@
(setq name (concat (downcase (substring name 0 (match-beginning 0))) (setq name (concat (downcase (substring name 0 (match-beginning 0)))
"-" "-"
(substring name (match-end 0))))) (substring name (match-end 0)))))
(if (eq system-type 'ms-dos) (if (memq system-type '(ms-dos windows-nt cygwin))
(message "Dumping under the name emacs") (message "Dumping under the name emacs")
(message "Dumping under names emacs and %s" name))) (message "Dumping under names emacs and %s" name)))
(condition-case () (condition-case ()

View file

@ -154,12 +154,12 @@ different paragraphs are unrelated.
You could argue that the log entry for a file should contain the You could argue that the log entry for a file should contain the
full ChangeLog paragraph mentioning the change to the file, even though full ChangeLog paragraph mentioning the change to the file, even though
it may mention other files, because that gives you the full context you it may mention other files, because that gives you the full context you
need to understand the change. This is the behaviour you get when this need to understand the change. This is the behavior you get when this
variable is set to t. variable is set to t.
On the other hand, you could argue that the log entry for a change On the other hand, you could argue that the log entry for a change
should contain only the text for the changes which occurred in that should contain only the text for the changes which occurred in that
file, because the log is per-file. This is the behaviour you get file, because the log is per-file. This is the behavior you get
when this variable is set to nil.") when this variable is set to nil.")
;;;; Internal global or buffer-local vars ;;;; Internal global or buffer-local vars

View file

@ -63,21 +63,25 @@
(defvar log-view-mode-hook nil (defvar log-view-mode-hook nil
"Hook run at the end of `log-view-mode'.") "Hook run at the end of `log-view-mode'.")
(defface log-view-file-face (defface log-view-file
'((((class color) (background light)) '((((class color) (background light))
(:background "grey70" :weight bold)) (:background "grey70" :weight bold))
(t (:weight bold))) (t (:weight bold)))
"Face for the file header line in `log-view-mode'." "Face for the file header line in `log-view-mode'."
:group 'log-view) :group 'log-view)
(defvar log-view-file-face 'log-view-file-face) ;; backward-compatibility alias
(put 'log-view-file-face 'face-alias 'log-view-file)
(defvar log-view-file-face 'log-view-file)
(defface log-view-message-face (defface log-view-message
'((((class color) (background light)) '((((class color) (background light))
(:background "grey85")) (:background "grey85"))
(t (:weight bold))) (t (:weight bold)))
"Face for the message header line in `log-view-mode'." "Face for the message header line in `log-view-mode'."
:group 'log-view) :group 'log-view)
(defvar log-view-message-face 'log-view-message-face) ;; backward-compatibility alias
(put 'log-view-message-face 'face-alias 'log-view-message)
(defvar log-view-message-face 'log-view-message)
(defconst log-view-file-re (defconst log-view-file-re
(concat "^\\(" (concat "^\\("

View file

@ -153,11 +153,6 @@ major mode changes."
;; Showing the effect of hard newlines in the buffer ;; Showing the effect of hard newlines in the buffer
(defface longlines-visible-face
'((t (:background "red")))
"Face used to make hard newlines visible in `longlines-mode'."
:group 'longlines)
(defun longlines-show-hard-newlines (&optional arg) (defun longlines-show-hard-newlines (&optional arg)
"Make hard newlines visible by adding a face. "Make hard newlines visible by adding a face.
With optional argument ARG, make the hard newlines invisible again." With optional argument ARG, make the hard newlines invisible again."

View file

@ -357,7 +357,7 @@ nil."
(use-local-map mspools-mode-map) (use-local-map mspools-mode-map)
(setq major-mode 'mspools-mode) (setq major-mode 'mspools-mode)
(setq mode-name "MSpools") (setq mode-name "MSpools")
) (run-mode-hooks 'mspools-mode-hook))
(defun mspools-get-spool-files () (defun mspools-get-spool-files ()
"Find the list of spool files and display them in *spools* buffer." "Find the list of spool files and display them in *spools* buffer."

View file

@ -57,7 +57,7 @@ to return to regular RMAIL:
* \\[rmail-cease-edit] makes them permanent. * \\[rmail-cease-edit] makes them permanent.
This functions runs the normal hook `rmail-edit-mode-hook'. This functions runs the normal hook `rmail-edit-mode-hook'.
\\{rmail-edit-map}" \\{rmail-edit-map}"
(text-mode) (delay-mode-hooks (text-mode))
(use-local-map rmail-edit-map) (use-local-map rmail-edit-map)
(setq major-mode 'rmail-edit-mode) (setq major-mode 'rmail-edit-mode)
(setq mode-name "RMAIL Edit") (setq mode-name "RMAIL Edit")

View file

@ -720,6 +720,7 @@ the list should be unique."
(sc-mail-warn-if-non-rfc822-p (sc-mail-error-in-mail-field)) (sc-mail-warn-if-non-rfc822-p (sc-mail-error-in-mail-field))
(end (setq sc-mail-headers-end (point)))) (end (setq sc-mail-headers-end (point))))
"Regi frame for glomming mail header information.") "Regi frame for glomming mail header information.")
(put 'sc-mail-glom-frame 'risky-local-variable t)
(defvar curline) ; dynamic bondage (defvar curline) ; dynamic bondage

View file

@ -40,7 +40,7 @@
"^----.*\\([Ff]orwarded\\|[Oo]riginal\\).*[Mm]essage" "^----.*\\([Ff]orwarded\\|[Oo]riginal\\).*[Mm]essage"
"*Regexp to match the string that introduces forwarded messages. "*Regexp to match the string that introduces forwarded messages.
This is not a header, but a string contained in the body of the message. This is not a header, but a string contained in the body of the message.
You may need to customise it for local needs." You may need to customize it for local needs."
:type 'regexp :type 'regexp
:group 'rmail-headers) :group 'rmail-headers)

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