Merged in changes from CVS trunk.
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-726 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-727 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-728 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-729 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-730 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-731 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-732 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-733 Update from CVS: man/calc.texi: Fix some TeX definitions. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-734 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-735 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-736 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-737 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-738 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-739 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-740 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-741 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-742 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-743 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-744 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-745 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-746 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-75 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-76 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-77 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-277
This commit is contained in:
commit
17d51b68fb
114 changed files with 3998 additions and 2294 deletions
|
@ -1,3 +1,7 @@
|
|||
2004-12-11 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
* Makefile.in (info): Undo 2004-12-05 change.
|
||||
|
||||
2004-12-08 Luc Teirlinck <teirllm@auburn.edu>
|
||||
|
||||
* info/dir (File): Add URL and Org Mode manuals.
|
||||
|
|
|
@ -719,9 +719,9 @@ force-info:
|
|||
# put the info files in $(srcdir),
|
||||
# so we can do ok running make in the build dir.
|
||||
info: force-info
|
||||
-(cd man; $(MAKE) $(MFLAGS) info)
|
||||
-(cd lispref; $(MAKE) $(MFLAGS) info)
|
||||
-(cd lispintro; $(MAKE) $(MFLAGS) info)
|
||||
(cd man; $(MAKE) $(MFLAGS) info)
|
||||
(cd lispref; $(MAKE) $(MFLAGS) info)
|
||||
(cd lispintro; $(MAKE) $(MFLAGS) info)
|
||||
dvi:
|
||||
(cd man; $(MAKE) $(MFLAGS) dvi)
|
||||
(cd lispref; $(MAKE) $(MFLAGS) elisp.dvi)
|
||||
|
|
|
@ -57,7 +57,7 @@ Trying 192.87.102.36...
|
|||
Connected to ftp.nluug.nl.
|
||||
|
||||
Ange-ftp chokes on the `No route to host' message and doesn't look any
|
||||
further.
|
||||
further.
|
||||
|
||||
I think in the near future we will see more of this problem, so it might be
|
||||
time to make anfe-ftp more intelligent.
|
||||
|
@ -112,6 +112,28 @@ we come to mark the http buffers as dead.
|
|||
|
||||
* REDISPLAY RELATED BUGS
|
||||
|
||||
** Strange text scrolling with Emacs + GTK
|
||||
|
||||
> I could reproduce the problem with the latest CVS.
|
||||
>
|
||||
> % emacs -Q
|
||||
> M-x info RET
|
||||
> M->
|
||||
> C-l
|
||||
> C-x ( C-u - 1 C-v C-x )
|
||||
> C-x e e e e ...
|
||||
>
|
||||
> I see the problem around "CC mode" and "Forms".
|
||||
|
||||
It is not specific for the first line of a buffer.
|
||||
|
||||
Rather it happens for lines which are indented but the
|
||||
indentation is controlled by a display property and
|
||||
the newline is part of that display property -- in
|
||||
that case, the indentation is not recognized for the
|
||||
first display line.
|
||||
|
||||
|
||||
** Avoid unbreakable loops in redisplay.
|
||||
|
||||
Redisplay may loop if there is an error in some display property, e.g.
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
2004-12-21 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* DISTRIB: Don't say "freeware".
|
||||
|
||||
2004-12-15 Nick Roberts <nickrob@snap.net.nz>
|
||||
|
||||
* DEBUG: Change printing example to break on a procedure name.
|
||||
|
||||
2004-12-11 Dan Nicolaescu <dann@ics.uci.edu>
|
||||
|
||||
* e/eterm.ti: Add rs1.
|
||||
* e/eterm: Regenerate.
|
||||
|
||||
2004-12-08 Alexandre VEYRENC <veyrenc@wanadoo.fr> (tiny change)
|
||||
|
||||
* fr-refcard.tex: Fix typos.
|
||||
|
|
24
etc/DEBUG
24
etc/DEBUG
|
@ -107,36 +107,32 @@ objects which you can examine in turn with the x... commands.
|
|||
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 = frame;
|
||||
|
||||
First, use these commands:
|
||||
of the GDB manual to print values associated with the variable
|
||||
called frame. First, use these commands:
|
||||
|
||||
cd src
|
||||
gdb emacs
|
||||
b xmenu.c:1296
|
||||
b set_frame_buffer_list
|
||||
r -q
|
||||
|
||||
Then type C-x 5 2 to create a new frame, and it hits the breakpoint:
|
||||
Then when Emacs it hits the breakpoint:
|
||||
|
||||
(gdb) p frame
|
||||
$1 = 1077872640
|
||||
$1 = 139854428
|
||||
(gdb) xtype
|
||||
Lisp_Vectorlike
|
||||
PVEC_FRAME
|
||||
(gdb) xframe
|
||||
$2 = (struct frame *) 0x3f0800
|
||||
$2 = (struct frame *) 0x8560258
|
||||
(gdb) p *$
|
||||
$3 = {
|
||||
size = 536871989,
|
||||
next = 0x366240,
|
||||
name = 809661752,
|
||||
size = 1073742931,
|
||||
next = 0x85dfe58,
|
||||
name = 140615219,
|
||||
[...]
|
||||
}
|
||||
(gdb) p $3->name
|
||||
$4 = 809661752
|
||||
$4 = 140615219
|
||||
|
||||
Now we can use `pr' to print the name of the frame:
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ product and divide it by five, that is a good amount.
|
|||
If you like GNU Emacs, please express your satisfaction with a
|
||||
donation: send me or the Foundation what you feel Emacs has been worth
|
||||
to you. If you are glad that I developed GNU Emacs and distribute it
|
||||
as freeware, rather than following the obstructive and antisocial
|
||||
as free software, rather than following the obstructive and antisocial
|
||||
practices typical of software developers, reward me. If you would
|
||||
like the Foundation to develop more free software, contribute.
|
||||
|
||||
|
|
130
etc/NEWS
130
etc/NEWS
|
@ -98,27 +98,45 @@ types any more. Add -DUSE_LISP_UNION_TYPE if you want union types.
|
|||
|
||||
* Changes in Emacs 21.4
|
||||
|
||||
** You can now follow links by clicking Mouse-1 on the link.
|
||||
|
||||
Traditionally, Emacs uses a Mouse-1 click to set point and a Mouse-2
|
||||
click to follow a link, whereas most other applications use a Mouse-1
|
||||
click for both purposes, depending on whether you click outside or
|
||||
inside a link. With release 21.4, the behaviour of a Mouse-1 click
|
||||
has been changed to match this context-sentitive dual behaviour.
|
||||
|
||||
Depending on the current mode, a Mouse-2 click in Emacs may do much
|
||||
more than just follow a link, so the new Mouse-1 behaviour is only
|
||||
activated for modes which explicitly mark a clickable text as a "link"
|
||||
(see the new function `mouse-on-link-p' for details). The lisp
|
||||
packages that are included in release 21.4 have been adapted to do
|
||||
this, but external packages may not yet support this. However, there
|
||||
is no risk in using such packages, as the worst thing that could
|
||||
happen is that you get the original Mouse-1 behaviour when you click
|
||||
on a link, which typically means that you set point where you click.
|
||||
|
||||
If you want to get the original Mouse-1 action also inside a link, you
|
||||
just need to press the Mouse-1 button a little longer than a normal
|
||||
click (i.e. press and hold the Mouse-1 button for half a second before
|
||||
you release it).
|
||||
|
||||
Dragging the Mouse-1 inside a link still performs the original
|
||||
drag-mouse-1 action, typically copy the text.
|
||||
|
||||
You can customize the new Mouse-1 behaviour via the new user option
|
||||
`mouse-1-click-follows-link'.
|
||||
|
||||
+++
|
||||
** When the undo information of the current command gets really large
|
||||
(beyond the value of `undo-outer-limit'), Emacs asks you whether to
|
||||
discard it or keep it.
|
||||
|
||||
** line-move-ignore-invisible now defaults to t.
|
||||
|
||||
** In Outline mode, hide-body no longer hides lines at the top
|
||||
of the file that precede the first header line.
|
||||
|
||||
+++
|
||||
** `set-auto-mode' now gives the interpreter magic line (if present)
|
||||
precedence over the file name. Likewise an <?xml or <!DOCTYPE declaration
|
||||
will give the buffer XML or SGML mode, based on the new var
|
||||
`magic-mode-alist'.
|
||||
|
||||
+++
|
||||
** New function `looking-back' checks whether a regular expression matches
|
||||
the text before point. Specifying the LIMIT argument bounds how far
|
||||
back the match can start; this is a way to keep it from taking too long.
|
||||
|
||||
+++
|
||||
** New functions `make-progress-reporter', `progress-reporter-update',
|
||||
`progress-reporter-force-update' and `progress-reporter-done' provide
|
||||
a simple and efficient way of printing progress messages to the user.
|
||||
|
||||
+++
|
||||
** In Enriched mode, `set-left-margin' and `set-right-margin' are now
|
||||
by default bound to `C-c [' and `C-c ]' instead of the former `C-c C-l'
|
||||
|
@ -596,6 +614,27 @@ command is bound to M-o. A new command dired-mark-omitted, bound to M-O,
|
|||
marks omitted files. The variable dired-omit-files-p is obsoleted, use the
|
||||
mode toggling function instead.
|
||||
|
||||
+++
|
||||
** find-file-read-only visits multiple files in read-only mode,
|
||||
when the file name contains wildcard characters.
|
||||
|
||||
+++
|
||||
** find-alternate-file replaces the current file with multiple files,
|
||||
when the file name contains wildcard characters.
|
||||
|
||||
** FFAP
|
||||
|
||||
+++
|
||||
*** New ffap commands and keybindings: C-x C-r (`ffap-read-only'),
|
||||
C-x C-v (`ffap-alternate-file'), C-x C-d (`ffap-list-directory'),
|
||||
C-x 4 r (`ffap-read-only-other-window'), C-x 4 d (`ffap-dired-other-window'),
|
||||
C-x 5 r (`ffap-read-only-other-frame'), C-x 5 d (`ffap-dired-other-frame').
|
||||
|
||||
---
|
||||
*** FFAP accepts wildcards in a file name by default. C-x C-f passes
|
||||
it to `find-file' with non-nil WILDCARDS argument, which visits
|
||||
multiple files, and C-x d passes it to `dired'.
|
||||
|
||||
** Info mode:
|
||||
|
||||
*** A numeric prefix argument of `info' selects an Info buffer
|
||||
|
@ -1064,6 +1103,12 @@ All regular expression replacement commands now allow `\?' in the
|
|||
replacement string to specify a position where the replacement string
|
||||
can be edited for each replacement.
|
||||
|
||||
** query-replace uses isearch lazy highlighting when the new user option
|
||||
`query-replace-lazy-highlight' is non-nil.
|
||||
|
||||
** The current match in query-replace is highlighted in new face
|
||||
`query-replace' which by default inherits from isearch face.
|
||||
|
||||
+++
|
||||
** Emacs normally highlights mouse sensitive text whenever the mouse
|
||||
is over the text. By setting the new variable `mouse-highlight', you
|
||||
|
@ -1368,7 +1413,10 @@ you hit M-C-SPC (mark-sexp), M-@ (mark-word), M-h (mark-paragraph), or
|
|||
C-M-h (mark-defun) repeatedly, the marked region extends each time, so
|
||||
you can mark the next two sexps with M-C-SPC M-C-SPC, for example.
|
||||
This feature also works for mark-end-of-sentence, if you bind that to
|
||||
a key.
|
||||
a key. It also extends the region when the mark is active in Transient
|
||||
Mark mode, regardless of the last command. To start a new region with
|
||||
one of marking commands in Transient Mark mode, you can deactivate the
|
||||
active region with C-g, or set the new mark with C-SPC.
|
||||
|
||||
+++
|
||||
** Some commands do something special in Transient Mark mode when the
|
||||
|
@ -1393,6 +1441,10 @@ C-g.
|
|||
previous mark, i.e. C-u C-SPC C-SPC C-SPC ... cycles through the
|
||||
mark ring. Use C-u C-u C-SPC to set the mark immediately after a jump.
|
||||
|
||||
** Movement commands `beginning-of-buffer', `end-of-buffer',
|
||||
`beginning-of-defun', `end-of-defun' do not set the mark if the mark
|
||||
is already active in Transient Mark mode.
|
||||
|
||||
+++
|
||||
** In the *Occur* buffer, `o' switches to it in another window, and
|
||||
C-o displays the current line's occurrence in another window without
|
||||
|
@ -2338,6 +2390,39 @@ configuration files.
|
|||
|
||||
* Lisp Changes in Emacs 21.4
|
||||
|
||||
** Lisp code can now test if a given buffer position is inside a
|
||||
clickable link with the new function `mouse-on-link-p'. This is the
|
||||
function used by the new `mouse-1-click-follows-link' functionality.
|
||||
|
||||
+++
|
||||
** (while-no-input BODY...) runs BODY, but only so long as no input
|
||||
arrives. If the user types or clicks anything, BODY stops as if a
|
||||
quit had occurred. while-no-input returns the value of BODY, if BODY
|
||||
finishes. It returns nil if BODY was aborted.
|
||||
|
||||
+++
|
||||
** `set-auto-mode' now gives the interpreter magic line (if present)
|
||||
precedence over the file name. Likewise an <?xml or <!DOCTYPE declaration
|
||||
will give the buffer XML or SGML mode, based on the new var
|
||||
`magic-mode-alist'.
|
||||
|
||||
+++
|
||||
** New function `looking-back' checks whether a regular expression matches
|
||||
the text before point. Specifying the LIMIT argument bounds how far
|
||||
back the match can start; this is a way to keep it from taking too long.
|
||||
|
||||
+++
|
||||
** New functions `make-progress-reporter', `progress-reporter-update',
|
||||
`progress-reporter-force-update' and `progress-reporter-done' provide
|
||||
a simple and efficient way for a command to present progress messages
|
||||
for the user.
|
||||
|
||||
---
|
||||
** To manipulate the File menu using easy-menu, you must specify the
|
||||
proper name "file". In previous Emacs versions, you had to specify
|
||||
"files", even though the menu item itself was changed to say "File"
|
||||
several versions ago.
|
||||
|
||||
+++
|
||||
** read-from-minibuffer now accepts an additional argument KEEP-ALL
|
||||
saying to put all inputs in the history list, even empty ones.
|
||||
|
@ -2581,8 +2666,10 @@ strings by giving that character a non-nil `cursor' text property.
|
|||
around potentially blocking or long-running code in timers
|
||||
and post-command-hooks.
|
||||
|
||||
** An unconditional face specification in defface (one where the DISPLAY part
|
||||
is just t) applies to all cases and does not override subsequent entries.
|
||||
** The first face specification element in a defface can specify
|
||||
`default' instead of frame classification. Then its attributes act as
|
||||
defaults that apply to all the subsequent cases (and may be overridden
|
||||
by them).
|
||||
|
||||
+++
|
||||
** New face attribute `min-colors' can be used to tailor the face color
|
||||
|
@ -6448,9 +6535,8 @@ function was declared obsolete.
|
|||
** Function `plist-member' is renamed from `widget-plist-member' (which is
|
||||
retained as an alias).
|
||||
|
||||
** Easy-menu's :filter now works as in XEmacs.
|
||||
It takes the unconverted (i.e. XEmacs) form of the menu and the result
|
||||
is automatically converted to Emacs' form.
|
||||
** Easy-menu's :filter now takes the unconverted form of the menu and
|
||||
the result is automatically converted to Emacs' form.
|
||||
|
||||
** The new function `window-list' has been defined
|
||||
|
||||
|
|
3
etc/TODO
3
etc/TODO
|
@ -15,6 +15,9 @@ to the FSF.
|
|||
ought to be possible to omit text which is invisible (due to a
|
||||
text-property, overlay, or selective display) from the kill-ring.
|
||||
|
||||
** Redefine define-generic-mode as a macro, so the compiler
|
||||
sees the definitions it generates.
|
||||
|
||||
* Important features:
|
||||
|
||||
** Provide user-friendly ways to list all available font families,
|
||||
|
|
BIN
etc/e/eterm
BIN
etc/e/eterm
Binary file not shown.
|
@ -50,6 +50,7 @@ eterm,
|
|||
rmir=\E[4l,
|
||||
rmso=\E[27m,
|
||||
rmul=\E[24m,
|
||||
rs1=\Ec,
|
||||
sc=\E7,
|
||||
setab=\E[%p1%{40}%+%dm,
|
||||
setaf=\E[%p1%{30}%+%dm,
|
||||
|
@ -59,3 +60,4 @@ eterm,
|
|||
smso=\E[7m,
|
||||
# smcup=\E[?47h,
|
||||
# rmcup=\E[?47l,
|
||||
# rs2 may need to be added
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2004-12-15 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* etags.c (main): Fix typo in conversion of LONG_OPTIONS from
|
||||
preprocessing to compile time constant.
|
||||
|
||||
2004-11-17 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
* etags.c: Undo last change.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Tags file maker to go with GNU Emacs -*- coding: latin-1 -*-
|
||||
Copyright (C) 1984, 1987-1989, 1993-1995, 1998-2001, 2002
|
||||
Copyright (C) 1984, 1987-1989, 1993-1995, 1998-2001, 2002, 2004
|
||||
Free Software Foundation, Inc. and Ken Arnold
|
||||
|
||||
This file is not considered part of GNU Emacs.
|
||||
|
@ -1183,7 +1183,7 @@ main (argc, argv)
|
|||
#ifdef ETAGS_REGEXPS
|
||||
optstring = "-r:Rc:";
|
||||
#endif /* ETAGS_REGEXPS */
|
||||
if (LONG_OPTIONS)
|
||||
if (!LONG_OPTIONS)
|
||||
optstring += 1;
|
||||
optstring = concat (optstring,
|
||||
"Cf:Il:o:SVhH",
|
||||
|
|
550
lisp/ChangeLog
550
lisp/ChangeLog
|
@ -1,8 +1,441 @@
|
|||
2004-12-22 Kenichi Handa <handa@m17n.org>
|
||||
|
||||
* international/quail.el (quail-start-translation): Fix prompt
|
||||
string for the case if input-method-use-echo-area being non-nil.
|
||||
(quail-start-conversion): Likewise.
|
||||
(quail-show-guidance): Don't show guidance if
|
||||
input-method-use-echo-area is non-nil.
|
||||
|
||||
2004-12-21 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* textmodes/ispell.el (ispell-help): Bind resize-mini-windows.
|
||||
|
||||
2004-12-21 Markus Rost <rost@ias.edu>
|
||||
|
||||
* calendar/diary-lib.el (mark-diary-entries): Set
|
||||
mark-diary-entries-in-calendar only after checking for diary-file.
|
||||
|
||||
2004-12-21 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* faces.el (escape-glyph): Use blue against light foreground.
|
||||
|
||||
* simple.el (undo-outer-limit-truncate): New function.
|
||||
(undo-outer-limit-function): Use undo-outer-limit-truncate.
|
||||
|
||||
2004-12-21 Eli Barzilay <eli@barzilay.org>
|
||||
|
||||
* calculator.el: (calculator-radix-grouping-mode)
|
||||
(calculator-radix-grouping-digits)
|
||||
(calculator-radix-grouping-separator):
|
||||
New defcustoms for the new radix grouping mode functionality.
|
||||
(calculator-mode-hook): Now used in electric mode too.
|
||||
(calculator-mode-map): Some new keys.
|
||||
(calculator-message): New function. Some new calls.
|
||||
(calculator-string-to-number): New function,
|
||||
(calculator-curnum-value): Use it.
|
||||
(calculator-rotate-displayer, calculator-rotate-displayer-back)
|
||||
(calculator-displayer-prev, calculator-displayer-next):
|
||||
Change digit group size when in radix mode.
|
||||
(calculator-number-to-string): Renamed from calculator-num-to-string.
|
||||
Now deals with digit grouping in radix mode.
|
||||
|
||||
2004-12-20 Glenn Morris <gmorris@ast.cam.ac.uk>
|
||||
|
||||
* calendar/calendar.el (view-other-diary-entries): Add autoload.
|
||||
* calendar/diary-lib.el (view-other-diary-entries): Use
|
||||
current-prefix-arg in interactive spec.
|
||||
|
||||
2004-12-19 Jay Belanger <belanger@truman.edu>
|
||||
|
||||
* calc/calc-aent.el (calcAlg-blank-matching-open):
|
||||
Temporarily adjust the syntax of both delimiters of half-open
|
||||
intervals.
|
||||
|
||||
2004-12-19 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
* mouse.el (mouse-1-click-follows-link): Doc fix.
|
||||
|
||||
2004-12-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
|
||||
|
||||
* term/mac-win.el (encoding-vector, mac-font-encoder-list)
|
||||
(ccl-encode-mac-centraleurroman-font): Use centraleurroman
|
||||
instead of centraleuropean as the name
|
||||
|
||||
2004-12-17 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
Sync with Tramp 2.0.46.
|
||||
|
||||
* net/tramp.el (tramp-maybe-send-perl-script): Change order of
|
||||
parameters wrt Tramp convention.
|
||||
(tramp-handle-file-attributes-with-perl)
|
||||
(tramp-handle-directory-files-and-attributes): Apply it.
|
||||
(tramp-do-copy-or-rename-file-out-of-band): Check for existence of
|
||||
`copy-program'. Reported by Zack Weinberg
|
||||
<zack@codesourcery.com>.
|
||||
(top): Set `edebug-form-spec' property directly rather than
|
||||
calling `def-edebug-spec'.
|
||||
|
||||
* net/tramp-smb.el (tramp-smb-advice-PC-do-completion): Make the
|
||||
advice less fragile. Surround temporary redefinition of
|
||||
`substitute-in-file-name' with `unwind-protect'. Suggested by
|
||||
Matt Hodges <MPHodges@member.fsf.org>.
|
||||
|
||||
2004-12-17 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* replace.el (occur-accumulate-lines, occur-engine):
|
||||
Make forcing deferred font-lock fontification jit-specific.
|
||||
|
||||
2004-12-17 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
* mouse.el (mouse-1-click-follows-link): New defcustom.
|
||||
(mouse-on-link-p): New function.
|
||||
(mouse-drag-region-1): Implement mouse-1-click-follows-link
|
||||
functionality. Map a mouse-1 click event into a mouse-2 (or
|
||||
other) event when position is inside a link.
|
||||
|
||||
* tooltip.el (tooltip-show-help-function): Replace "mouse-2"
|
||||
prefix in tooltip text with "mouse-1" when this is a link
|
||||
recognized by mouse-1-click-follows-link functionality.
|
||||
|
||||
* help.el (describe-key): Report effective and original binding
|
||||
for mouse-1 when clicked on a link.
|
||||
(describe-mode): Add follow-link property to "minor-mode" button.
|
||||
|
||||
* help-fns.el (describe-variable): Add follow-link property to
|
||||
"below" button.
|
||||
|
||||
* help-mode.el (help-xref): Add follow-link property.
|
||||
|
||||
* apropos.el (apropos-symbol, apropos-function, apropos-macro)
|
||||
(apropos-command, apropos-variable, apropos-face, apropos-group)
|
||||
(apropos-widget, apropos-plist): Add follow-link property.
|
||||
|
||||
* pcvs-defs.el (cvs-mode-map): Map follow-link to a function which
|
||||
checks if position is in a filename, rather than some other
|
||||
clickable item. Function looks for cvs-filename-face at position.
|
||||
|
||||
* wid-edit.el (widget-specify-field, widget-specify-button):
|
||||
Map a :follow-link keyword into a follow-link property.
|
||||
(link): Add :follow-link keyword, map to RET binding.
|
||||
|
||||
* dired.el (dired-mode-map): Map follow-link to mouse-face.
|
||||
|
||||
* progmodes/compile.el (compilation-minor-mode-map)
|
||||
(compilation-button-map, compilation-mode-map): Likewise.
|
||||
|
||||
2004-12-17 Thien-Thi Nguyen <ttn@gnu.org>
|
||||
|
||||
* play/zone.el (zone): Init `line-spacing' from orig buffer.
|
||||
(zone-replace-char): Take `count' and `del-count'
|
||||
instead of `direction'. Update callers. When `del-count' is
|
||||
non-nil, delete that many characters, otherwise `count' characters
|
||||
backwards. Insert the newly-replaced string `count' times.
|
||||
(zone-fret): Handle chars w/ width greater than one.
|
||||
(zone-fall-through-ws): No longer take window width `ww'.
|
||||
Update callers. Add handling for `char-width' greater than one.
|
||||
(zone-pgm-drip): Update var holding window-end position every cycle.
|
||||
|
||||
2004-12-17 Andre Spiegel <spiegel@gnu.org>
|
||||
|
||||
* vc.el (vc-default-update-changelog): Use insert-file-contents,
|
||||
rather than insert-file.
|
||||
|
||||
2004-12-16 Jay Belanger <belanger@truman.edu>
|
||||
|
||||
* calc/calc-comb.el (var-RandSeed): Don't initially bind it.
|
||||
(math-init-random-base, math-random-digit): Check to see if
|
||||
var-RandSeed is bound.
|
||||
(math-random-last): Declare it.
|
||||
(math-random-digit): Don't make math-random-last local.
|
||||
|
||||
2004-12-16 Thien-Thi Nguyen <ttn@gnu.org>
|
||||
|
||||
* play/zone.el (zone): Fix omission bug: Use a self-disabling
|
||||
one-shot thunk for uniform (error, quit, normal) recovery.
|
||||
Reported by John Paul Wallington.
|
||||
(zone-pgm-random-life): Fix bug:
|
||||
Recognize empty initial field by lack of "@" chars.
|
||||
|
||||
2004-12-16 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* help.el (function-called-at-point):
|
||||
* help-fns.el (variable-at-point): As a last resort try striping
|
||||
non-word prefixes and suffixes.
|
||||
|
||||
* descr-text.el (describe-property-list): Don't treat syntax-table
|
||||
specially. Use describe-text-sexp which inserts [show] button
|
||||
for large objects and handles printing errors. Sort properties
|
||||
by names in alphabetical order instead of by value sizes.
|
||||
Add `mouse-face' to list of properties for `describe-face' widget.
|
||||
(describe-char): Mask out face-id from 19 bits of character.
|
||||
Print face-id separately.
|
||||
|
||||
* replace.el (occur-accumulate-lines, occur-engine):
|
||||
Fontify unfontified matching lines in the source buffer
|
||||
before copying them.
|
||||
(occur-engine): Don't put mouse-face on context lines.
|
||||
(occur-next-error): Set point to line beginning/end
|
||||
before searching for prev/next property to skip multiple
|
||||
matches on a line (not supported by occur engine).
|
||||
Remove redundant prefix-numeric-value.
|
||||
|
||||
2004-12-15 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* replace.el (match): New face.
|
||||
(list-matching-lines-face): Change default from `bold' to `match'.
|
||||
|
||||
* progmodes/grep.el (grep-match-face): New defvar.
|
||||
(grep-mode-font-lock-keywords): Use grep-match-face instead of
|
||||
compilation-column-face to highlight grep matches.
|
||||
|
||||
* apropos.el (apropos-match-face): Change default from
|
||||
`secondary-selection' to `match'.
|
||||
|
||||
* info-look.el (info-lookup-highlight-face): Change default from
|
||||
`highlight' to `match'.
|
||||
|
||||
2004-12-15 Daniel Pfeiffer <occitan@esperanto.org>
|
||||
|
||||
* progmodes/executable.el (executable-interpret): Eliminate
|
||||
obsolete compile-internal, and switch to comint for interaction.
|
||||
|
||||
2004-12-15 J.D. Smith <jdsmith@as.arizona.edu>
|
||||
|
||||
* progmodes/idlwave.el (idlwave-skip-multi-commands): Don't match
|
||||
`&&' when skipping multiple statements on a line.
|
||||
|
||||
2004-12-15 Thien-Thi Nguyen <ttn@gnu.org>
|
||||
|
||||
* play/zone.el (zone): Set `truncate-lines'.
|
||||
Also, init `tab-width' with value from original buffer.
|
||||
(zone-shift-up): Rewrite for speed.
|
||||
(zone-shift-down, zone-shift-left, zone-shift-right): Likewise.
|
||||
(zone-pgm-jitter): Remove redundant entries from ops vector.
|
||||
(zone-exploding-remove): Reduce iteration count.
|
||||
(zone-cpos): Convert to defsubst.
|
||||
(zone-replace-char): New defsubst.
|
||||
(zone-park/sit-for): Likewise.
|
||||
(zone-fret): Take window-start arg.
|
||||
Update callers. Use `zone-park/sit-for'.
|
||||
(zone-fill-out-screen): Rewrite.
|
||||
(zone-fall-through-ws): Likewise. Update callers.
|
||||
(zone-pgm-drip): Use `zone-replace-char'.
|
||||
Move var inits before while-loop. Use `zone-park/sit-for'.
|
||||
(zone-pgm-random-life): Handle empty initial field.
|
||||
Use `zone-replace-char' and `zone-park/sit-for'.
|
||||
|
||||
2004-12-15 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* isearch.el (isearch-update): Test isearch-lazy-highlight
|
||||
before calling isearch-lazy-highlight-new-loop.
|
||||
(isearch-lazy-highlight-new-loop):
|
||||
Don't test isearch-lazy-highlight.
|
||||
|
||||
* replace.el (perform-replace): Add isearch-case-fold-search.
|
||||
Use delimited-flag for isearch-regexp.
|
||||
Reset isearch-lazy-highlight-last-string to force lazy
|
||||
highlighting when called from isearch mode.
|
||||
(query-replace-highlight): Revert defcustom type to boolean.
|
||||
(query-replace-lazy-highlight): New defcustom.
|
||||
(query-replace): New face.
|
||||
(perform-replace, replace-highlight, replace-dehighlight):
|
||||
Test query-replace-lazy-highlight instead of special value
|
||||
`isearch' of query-replace-highlight.
|
||||
(replace-dehighlight): Don't call isearch-dehighlight.
|
||||
(replace-highlight): Don't call isearch-highlight.
|
||||
Use face `query-replace' unconditionally.
|
||||
|
||||
2004-12-14 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
* simple.el (inhibit-mark-movement): Remove defvar.
|
||||
(beginning-of-buffer, end-of-buffer): Don't use it.
|
||||
|
||||
* emacs-lisp/lisp.el (beginning-of-defun, end-of-defun): Don't
|
||||
use inhibit-mark-movement.
|
||||
|
||||
* emulation/cua-base.el (cua--preserve-mark-commands): Remove.
|
||||
(cua--undo-push-mark): Remove.
|
||||
(cua--pre-command-handler, cua--post-command-handler): Don't
|
||||
fiddle with inhibit-mark-movement.
|
||||
|
||||
2004-12-14 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* buff-menu.el (list-buffers-noselect): Collect internal info
|
||||
for every buffer in BUFFER-LIST arg too.
|
||||
(Buffer-menu-switch-other-window): Bind pop-up-windows to t.
|
||||
(Buffer-menu-switch-other-window, Buffer-menu-2-window):
|
||||
Bind same-window-buffer-names and same-window-regexps to nil.
|
||||
|
||||
2004-12-13 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* simple.el (next-error-buffer-p, next-error-find-buffer):
|
||||
Doc fix.
|
||||
|
||||
* mail/supercite.el (sc-cite-frame-alist): Doc fix.
|
||||
(sc-cite-region, sc-uncite-region, sc-recite-region):
|
||||
Fix previous change to handle not alist as a symbol, but
|
||||
a citation frame as a symbol that represents a variable name.
|
||||
|
||||
2004-12-13 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* filecache.el (file-cache-add-directory-using-find):
|
||||
Only set up file-cache-find-command-posix-flag if we will use it.
|
||||
|
||||
* bindings.el (mode-line-buffer-identification-keymap):
|
||||
Don't cancel the mode-line's usual down-mouse-1 binding.
|
||||
|
||||
* cus-edit.el (custom-face-selected): Handle `default' specs.
|
||||
(custom-face-edit): Increase extra-offset.
|
||||
(custom-display): Handle `default' specs.
|
||||
|
||||
* xml.el (xml-name-re, xml-entity-value-re): Add defvars.
|
||||
|
||||
* emacs-lisp/elint.el (elint-standard-variables)
|
||||
(elint-unknown-builtin-args): Move definitions up.
|
||||
|
||||
* net/browse-url.el (browse-url-url-at-point): Add autoload.
|
||||
|
||||
* info.el (info-xref-visited): Use `default' instead of t.
|
||||
(Info-try-follow-nearest-node): Don't explicitly load browse-url.
|
||||
|
||||
* faces.el (header-line, mode-line-inactive, tool-bar):
|
||||
Use `default' instead of t for setting the defaults.
|
||||
(face-spec-choose): Separate `t' from `default'.
|
||||
|
||||
* subr.el (while-no-input): New macro.
|
||||
|
||||
2004-12-13 Frederik Fouvry <fouvry@CoLi.Uni-SB.DE> (tiny change)
|
||||
|
||||
* filecache.el (file-cache-add-directory-using-find):
|
||||
Only test file-cache-find-command-posix-flag on some systems.
|
||||
|
||||
2004-12-13 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* vc-svn.el (vc-svn-repository-hostname): Adjust to new format.
|
||||
Reported by Ville Skytt,Ad(B <scop@xemacs.org>.
|
||||
(vc-svn-annotate-current-time, vc-svn-annotate-time-of-rev)
|
||||
(vc-svn-annotate-time, vc-svn-annotate-extract-revision-at-line)
|
||||
(vc-svn-annotate-command, vc-svn-annotate-re): Support for svn annotate.
|
||||
|
||||
2004-12-12 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* files.el (find-file-other-window, find-file-other-frame):
|
||||
Add the first buffer to the returned value to return the complete
|
||||
list of all visited buffers.
|
||||
(find-file-read-only, find-file-read-only-other-window)
|
||||
(find-file-read-only-other-frame): Use nil for `mustmatch' arg of
|
||||
`find-file-read-args'. Signal an error about non-existent file
|
||||
only if file name doesn't contain wildcards. Toggle read-only in
|
||||
all visited buffers.
|
||||
(find-alternate-file, find-alternate-file-other-window):
|
||||
Add optional arg `wildcards'. Doc fix. Set `wildcards' to t when
|
||||
called interactively. Pass arg `wildcards' to other functions.
|
||||
(find-file-noselect): Doc fix.
|
||||
|
||||
* ffap.el (ffap-dired-wildcards): Set default to "[*?][^/]*\\'".
|
||||
Doc fix.
|
||||
(ffap-directory-finder): New variable.
|
||||
(ffap-string-at-point-mode-alist): Add * and ? to `file'.
|
||||
(ffap-file-at-point): Add /* to immediately rejected names.
|
||||
Return absolute file names matching ffap-dired-wildcards.
|
||||
(ffap-read-file-or-url): Set default value for `completing-read'
|
||||
to `buffer-file-name'.
|
||||
(find-file-at-point): When filename matches ffap-dired-wildcards,
|
||||
call ffap-file-finder with t arg `wildcards', instead of dired.
|
||||
(ffap-other-window, ffap-other-frame): Return visited buffers.
|
||||
(ffap-read-only, ffap-read-only-other-window)
|
||||
(ffap-read-only-other-frame, ffap-alternate-file): New commands.
|
||||
(dired-at-point): Call ffap-directory-finder instead of dired.
|
||||
(ffap-dired-other-window, ffap-dired-other-frame)
|
||||
(ffap-list-directory): New commands.
|
||||
(ffap-bindings): New keybindings for new commands.
|
||||
|
||||
2004-12-12 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* simple.el (beginning-of-buffer, end-of-buffer):
|
||||
* emacs-lisp/lisp.el (beginning-of-defun, end-of-defun):
|
||||
Do not push mark when mark is active in transient-mark-mode.
|
||||
|
||||
* simple.el (mark-word):
|
||||
* emacs-lisp/lisp.el (mark-sexp, mark-defun):
|
||||
* textmodes/paragraphs.el (mark-paragraph):
|
||||
Extend the region when mark is active in transient-mark-mode,
|
||||
regardless of the last command. Doc fix.
|
||||
|
||||
* simple.el (mark-word): Preserve direction when repeating.
|
||||
Make arg optional. Interactive "p" -> "P".
|
||||
(transient-mark-mode, inhibit-mark-movement): Doc fix.
|
||||
|
||||
* emacs-lisp/lisp.el (mark-sexp): Reverse the condition for
|
||||
preserving direction, to mark forward instead of backward when mark
|
||||
is equal to point (e.g. when C-SPC C-M-SPC is typed in t-m-m).
|
||||
|
||||
2004-12-12 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* isearch.el (isearch-edit-string): Set 7th arg of
|
||||
`read-from-minibuffer' to `t' to inherit the current input
|
||||
method (whose name is indicated by [IM] in the minibuffer prompt)
|
||||
from the current buffer to the minibuffer.
|
||||
(isearch-lazy-highlight-update): Put body to `with-local-quit'
|
||||
to allow C-g quitting for lazy highlighting looping inside the
|
||||
search with nested repetition operators. Add overlay to the list
|
||||
before setting its face and other properties to avoid the case of
|
||||
code quitting after placing the new overlay but before it's
|
||||
recorded on the list. Select the window where isearch was
|
||||
activated, to highlight matches in the right window when isearch
|
||||
switches the current window to the minibuffer.
|
||||
|
||||
* international/isearch-x.el
|
||||
(isearch-process-search-multibyte-characters):
|
||||
Use `isearch-message' as initial input for `read-string' instead
|
||||
of adding it to the minibuffer prompt. After reading a string
|
||||
remove the initial value of `isearch-message' from the string.
|
||||
|
||||
* replace.el (replace-match-maybe-edit): Doc fix.
|
||||
(perform-replace): Don't call `replace-highlight' when automatic
|
||||
replacement is requested in literal mode, since it is intended
|
||||
only to highlight words during entering a new replacement string
|
||||
for \? in non-literal mode.
|
||||
|
||||
* replace.el (query-replace-highlight): Add new value `isearch'
|
||||
that allows query replacement to use isearch highlighting.
|
||||
Change type from `boolean' to `choice'. Doc fix.
|
||||
(replace-highlight, replace-dehighlight, perform-replace):
|
||||
Use isearch highlighting if query-replace-highlight eq `isearch'.
|
||||
|
||||
2004-12-11 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* emacs-lisp/checkdoc.el (checkdoc-continue, checkdoc-comments)
|
||||
(checkdoc-message-text, checkdoc-defun): Fix format messages for `error'.
|
||||
|
||||
* textmodes/tex-mode.el (latex-backward-sexp-1): Handle the special
|
||||
case of \end{verbatim}.
|
||||
|
||||
2004-12-11 Dan Nicolaescu <dann@ics.uci.edu>
|
||||
|
||||
* term.el (term-termcap-format): Synchronyze with terminfo.
|
||||
(term-emulate-terminal): Handle reset.
|
||||
(term-reset-terminal): New function.
|
||||
|
||||
2004-12-11 Thien-Thi Nguyen <ttn@gnu.org>
|
||||
|
||||
* play/zone.el (zone-programs): Add `zone-pgm-random-life'.
|
||||
(zone-fill-out-screen): New func.
|
||||
(zone-pgm-drip): Use `zone-fill-out-screen'.
|
||||
Also, no longer go to point-min on every cycle.
|
||||
(zone-pgm-paragraph-spaz): Allow spazzing for texinfo-mode.
|
||||
(zone-pgm-random-life-wait): New user var.
|
||||
(zone-pgm-random-life): New func.
|
||||
|
||||
2004-12-10 Thien-Thi Nguyen <ttn@gnu.org>
|
||||
|
||||
* files.el (auto-mode-alist): Map .com to DCL mode.
|
||||
|
||||
2004-12-09 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* isearch.el (isearch-mode-map): Treat S-SPC like SPC.
|
||||
|
||||
2004-12-10 Nick Roberts <nickrob@snap.net.nz>
|
||||
2004-12-09 Nick Roberts <nickrob@snap.net.nz>
|
||||
|
||||
* xt-mouse.el (xterm-mouse-event): Correct cursor position in a
|
||||
buffer with a display margin.
|
||||
|
@ -41,10 +474,9 @@
|
|||
* edmacro.el: `edit-kbd-macro' is now bound to `C-x C-k e'.
|
||||
(edmacro-finish-edit): Further update for keyboard macros that are
|
||||
lambda forms.
|
||||
(edmacro-sanitize-for-string): Correctly remove Meta modifier
|
||||
(as suggested by Kim Storm).
|
||||
(edmacro-sanitize-for-string): Correctly remove Meta modifier.
|
||||
|
||||
2004-12-06 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
2004-12-07 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* font-lock.el (font-lock-unfontify-region): Save buffer state.
|
||||
(font-lock-default-unfontify-region): Don't save buffer state any more.
|
||||
|
@ -7889,7 +8321,115 @@
|
|||
(compilation-forget-errors): Don't localize already local
|
||||
compilation-locs and remove FIXME about refontifying.
|
||||
|
||||
2004-04-14
|
||||
2004-04-14 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
* startup.el (emacs-quick-startup): New defvar (set by -Q).
|
||||
(command-line): New option -Q. Like -q --no-site-file, but
|
||||
in addition it also disables menu-bar, tool-bar, scroll-bars,
|
||||
tool-tips, and the blinking cursor.
|
||||
(command-line-1): Skip startup screen if -Q.
|
||||
(fancy-splash-head): Use ":align-to center" prop to center splash image.
|
||||
|
||||
* emulation/cua-base.el (cua-read-only-cursor-color)
|
||||
(cua-overwrite-cursor-color, cua-global-mark-cursor-color): Doc fix.
|
||||
|
||||
2004-04-13 Dave Love <fx@gnu.org>
|
||||
|
||||
* progmodes/python.el: Doc fixes. Changes for compiler warnings.
|
||||
(syntax): Don't require.
|
||||
(python) <defgroup>: Add :version.
|
||||
(python-quote-syntax): Re-written.
|
||||
(inferior-python-mode): Move stuff here from run-python and add
|
||||
some more.
|
||||
(python-preoutput-continuation, python-preoutput-result)
|
||||
(python-dotty-syntax-table): New.
|
||||
(python-describe-symbol): Use them.
|
||||
(run-python): Move stuff to inferior-python-mode. Modify code
|
||||
loaded into Python.
|
||||
(python-send-region): Use python-proc, python-send-string.
|
||||
(python-send-string): Send newlines too. Callers changed.
|
||||
(python-load-file): Re-written.
|
||||
(python-eldoc-function): New.
|
||||
(info-look): Don't require.
|
||||
(python-after-info-look): New. A modified version of former
|
||||
top-level code for use with eval-after-load.
|
||||
(python-maybe-jython, python-guess-indent): Use widened buffer.
|
||||
(python-fill-paragraph): Re-written.
|
||||
(python-mode): Fix outline-regexp. Set outline-heading-end-regexp,
|
||||
eldoc-print-current-symbol-info-function. Add to eldoc-mode-hook.
|
||||
|
||||
2004-04-13 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* progmodes/python.el (run-python): Use compilation-shell-minor-mode.
|
||||
Set compilation-error-regexp-alist earlier.
|
||||
|
||||
* progmodes/compile.el (compilation-minor-mode-map)
|
||||
(compilation-shell-minor-mode-map, compile-mouse-goto-error)
|
||||
(compile-goto-error): Re-merge the mouse and non-mouse commands.
|
||||
|
||||
2004-04-12 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* progmodes/compile.el (compile-goto-error): Select the buffer/window
|
||||
corresponding to the event.
|
||||
|
||||
2004-04-12 Joe Buehler <jbuehler@hekiman.com>
|
||||
|
||||
* loadup.el: Add cygwin to system-type list, for unexec() support.
|
||||
|
||||
2004-04-12 John Paul Wallington <jpw@gnu.org>
|
||||
|
||||
* ibuffer.el (ibuffer-delete-window-on-quit): Remove.
|
||||
(ibuffer-restore-window-config-on-quit): New variable to replace
|
||||
`ibuffer-delete-window-on-quit'. Update all references.
|
||||
(ibuffer-prev-window-config): New variable.
|
||||
(ibuffer-quit): Restore previous window configuration instead of
|
||||
deleting window.
|
||||
(ibuffer): Save window configuration before showing Ibuffer buffer.
|
||||
|
||||
* help.el (describe-mode): Doc fix.
|
||||
|
||||
2004-04-12 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* progmodes/compile.el (compilation-mode-font-lock-keywords): Fix test
|
||||
not to treat nil as a function.
|
||||
|
||||
* vc-arch.el (vc-arch-root): Be a bit more careful.
|
||||
(vc-arch-register): Save the buffer if we modified it.
|
||||
(vc-arch-delete-rej-if-obsolete): Save excursion.
|
||||
(vc-arch-find-file-hook): Use the simpler after-save-hook.
|
||||
(vc-arch-responsible-p, vc-arch-init-version): New functions.
|
||||
|
||||
* net/ldap.el (ldap-search): Use list*.
|
||||
|
||||
2004-04-12 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* info.el (Info-follow-reference): Allow multiline reference name.
|
||||
|
||||
2004-04-11 Dave Love <fx@gnu.org>
|
||||
|
||||
* emacs-lisp/bytecomp.el (byte-compile-cond): Fix last change.
|
||||
|
||||
* progmodes/python.el: New file.
|
||||
|
||||
2004-04-11 Andre Spiegel <spiegel@gnu.org>
|
||||
|
||||
* vc-hooks.el (vc-arg-list): Function removed.
|
||||
(vc-default-workfile-unchanged-p): Use condition-case to check for
|
||||
backward compatibility.
|
||||
|
||||
* vc.el (vc-print-log): Use condition-case to check for backward
|
||||
compatibility.
|
||||
|
||||
2004-04-11 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* dired.el (dired-faces): New defgroup.
|
||||
(dired-header, dired-mark, dired-marked, dired-flagged)
|
||||
(dired-warning, dired-directory, dired-symlink, dired-ignored):
|
||||
New faces.
|
||||
(dired-header-face, dired-mark-face, dired-marked-face)
|
||||
(dired-flagged-face, dired-warning-face, dired-directory-face)
|
||||
(dired-symlink-face, dired-ignored-face): New face variables.
|
||||
(dired-font-lock-keywords): Use them instead of font-lock faces.
|
||||
Split the rule for dired marks into 3 separate rules: for marks,
|
||||
marked file names and flagged file names.
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ turns off mouse highlighting."
|
|||
:group 'apropos
|
||||
:type 'face)
|
||||
|
||||
(defcustom apropos-match-face 'secondary-selection
|
||||
(defcustom apropos-match-face 'match
|
||||
"*Face for matching text in Apropos documentation/value, or nil for none.
|
||||
This applies when you look for matches in the documentation or variable value
|
||||
for the regexp; the part that matches gets displayed in this font."
|
||||
|
@ -163,6 +163,7 @@ term, and the rest of the words are alternative terms.")
|
|||
(define-button-type 'apropos-symbol
|
||||
'face apropos-symbol-face
|
||||
'help-echo "mouse-2, RET: Display more help on this symbol"
|
||||
'follow-link t
|
||||
'action #'apropos-symbol-button-display-help
|
||||
'skip t)
|
||||
|
||||
|
@ -174,19 +175,24 @@ term, and the rest of the words are alternative terms.")
|
|||
|
||||
(define-button-type 'apropos-function
|
||||
'apropos-label "Function"
|
||||
'help-echo "mouse-2, RET: Display more help on this function"
|
||||
'follow-link t
|
||||
'action (lambda (button)
|
||||
(describe-function (button-get button 'apropos-symbol)))
|
||||
'help-echo "mouse-2, RET: Display more help on this function")
|
||||
(describe-function (button-get button 'apropos-symbol))))
|
||||
|
||||
(define-button-type 'apropos-macro
|
||||
'apropos-label "Macro"
|
||||
'help-echo "mouse-2, RET: Display more help on this macro"
|
||||
'follow-link t
|
||||
'action (lambda (button)
|
||||
(describe-function (button-get button 'apropos-symbol)))
|
||||
'help-echo "mouse-2, RET: Display more help on this macro")
|
||||
(describe-function (button-get button 'apropos-symbol))))
|
||||
|
||||
(define-button-type 'apropos-command
|
||||
'apropos-label "Command"
|
||||
'help-echo "mouse-2, RET: Display more help on this command"
|
||||
'follow-link t
|
||||
'action (lambda (button)
|
||||
(describe-function (button-get button 'apropos-symbol)))
|
||||
'help-echo "mouse-2, RET: Display more help on this command")
|
||||
(describe-function (button-get button 'apropos-symbol))))
|
||||
|
||||
;; We used to use `customize-variable-other-window' instead for a
|
||||
;; customizable variable, but that is slow. It is better to show an
|
||||
|
@ -196,18 +202,21 @@ term, and the rest of the words are alternative terms.")
|
|||
(define-button-type 'apropos-variable
|
||||
'apropos-label "Variable"
|
||||
'help-echo "mouse-2, RET: Display more help on this variable"
|
||||
'follow-link t
|
||||
'action (lambda (button)
|
||||
(describe-variable (button-get button 'apropos-symbol))))
|
||||
|
||||
(define-button-type 'apropos-face
|
||||
'apropos-label "Face"
|
||||
'help-echo "mouse-2, RET: Display more help on this face"
|
||||
'follow-link t
|
||||
'action (lambda (button)
|
||||
(describe-face (button-get button 'apropos-symbol))))
|
||||
|
||||
(define-button-type 'apropos-group
|
||||
'apropos-label "Group"
|
||||
'help-echo "mouse-2, RET: Display more help on this group"
|
||||
'follow-link t
|
||||
'action (lambda (button)
|
||||
(customize-group-other-window
|
||||
(button-get button 'apropos-symbol))))
|
||||
|
@ -215,12 +224,14 @@ term, and the rest of the words are alternative terms.")
|
|||
(define-button-type 'apropos-widget
|
||||
'apropos-label "Widget"
|
||||
'help-echo "mouse-2, RET: Display more help on this widget"
|
||||
'follow-link t
|
||||
'action (lambda (button)
|
||||
(widget-browse-other-window (button-get button 'apropos-symbol))))
|
||||
|
||||
(define-button-type 'apropos-plist
|
||||
'apropos-label "Plist"
|
||||
'help-echo "mouse-2, RET: Display more help on this plist"
|
||||
'follow-link t
|
||||
'action (lambda (button)
|
||||
(apropos-describe-plist (button-get button 'apropos-symbol))))
|
||||
|
||||
|
|
|
@ -448,7 +448,6 @@ Menu of mode operations in the mode line.")
|
|||
(let ((map (make-sparse-keymap)))
|
||||
;; Bind down- events so that the global keymap won't ``shine
|
||||
;; through''.
|
||||
(define-key map [mode-line down-mouse-1] 'ignore)
|
||||
(define-key map [mode-line mouse-1] 'mode-line-unbury-buffer)
|
||||
(define-key map [header-line down-mouse-1] 'ignore)
|
||||
(define-key map [header-line mouse-1] 'mode-line-unbury-buffer)
|
||||
|
|
|
@ -484,14 +484,19 @@ in the selected frame."
|
|||
"Make the other window select this line's buffer.
|
||||
The current window remains selected."
|
||||
(interactive)
|
||||
(display-buffer (Buffer-menu-buffer t)))
|
||||
(let ((pop-up-windows t)
|
||||
same-window-buffer-names
|
||||
same-window-regexps)
|
||||
(display-buffer (Buffer-menu-buffer t))))
|
||||
|
||||
(defun Buffer-menu-2-window ()
|
||||
"Select this line's buffer, with previous buffer in second window."
|
||||
(interactive)
|
||||
(let ((buff (Buffer-menu-buffer t))
|
||||
(menu (current-buffer))
|
||||
(pop-up-windows t))
|
||||
(pop-up-windows t)
|
||||
same-window-buffer-names
|
||||
same-window-regexps)
|
||||
(delete-other-windows)
|
||||
(switch-to-buffer (other-buffer))
|
||||
(pop-to-buffer buff)
|
||||
|
@ -671,8 +676,7 @@ For more information, see the function `buffer-menu'."
|
|||
;; line with the beginning of the text (rather than with the left
|
||||
;; scrollbar or the left fringe). –-Stef
|
||||
(setq header (concat (propertize " " 'display '(space :align-to 0))
|
||||
header))
|
||||
)
|
||||
header)))
|
||||
(with-current-buffer (get-buffer-create "*Buffer List*")
|
||||
(setq buffer-read-only nil)
|
||||
(erase-buffer)
|
||||
|
@ -684,47 +688,45 @@ For more information, see the function `buffer-menu'."
|
|||
(mapcar (lambda (c)
|
||||
(if (memq c '(?\n ?\ )) c underline))
|
||||
header)))))
|
||||
(if buffer-list
|
||||
(setq list buffer-list)
|
||||
;; Collect info for every buffer we're interested in.
|
||||
(dolist (buffer (buffer-list))
|
||||
(with-current-buffer buffer
|
||||
(let ((name (buffer-name))
|
||||
(file buffer-file-name))
|
||||
(cond
|
||||
;; Don't mention internal buffers.
|
||||
((and (string= (substring name 0 1) " ") (null file)))
|
||||
;; Maybe don't mention buffers without files.
|
||||
((and files-only (not file)))
|
||||
((string= name "*Buffer List*"))
|
||||
;; Otherwise output info.
|
||||
(t
|
||||
(let ((mode (concat (format-mode-line mode-name nil nil buffer)
|
||||
(if mode-line-process
|
||||
(format-mode-line mode-line-process
|
||||
nil nil buffer))))
|
||||
(bits (string
|
||||
(if (eq buffer old-buffer) ?. ?\ )
|
||||
;; Handle readonly status. The output buffer
|
||||
;; is special cased to appear readonly; it is
|
||||
;; actually made so at a later date.
|
||||
(if (or (eq buffer standard-output)
|
||||
buffer-read-only)
|
||||
?% ?\ )
|
||||
;; Identify modified buffers.
|
||||
(if (buffer-modified-p) ?* ?\ )
|
||||
;; Space separator.
|
||||
?\ )))
|
||||
(unless file
|
||||
;; No visited file. Check local value of
|
||||
;; list-buffers-directory.
|
||||
(when (and (boundp 'list-buffers-directory)
|
||||
list-buffers-directory)
|
||||
(setq file list-buffers-directory)))
|
||||
(push (list buffer bits name (buffer-size) mode file)
|
||||
list)))))))
|
||||
;; Preserve the original buffer-list ordering, just in case.
|
||||
(setq list (nreverse list)))
|
||||
;; Collect info for every buffer we're interested in.
|
||||
(dolist (buffer (or buffer-list (buffer-list)))
|
||||
(with-current-buffer buffer
|
||||
(let ((name (buffer-name))
|
||||
(file buffer-file-name))
|
||||
(unless (and (not buffer-list)
|
||||
(or
|
||||
;; Don't mention internal buffers.
|
||||
(and (string= (substring name 0 1) " ") (null file))
|
||||
;; Maybe don't mention buffers without files.
|
||||
(and files-only (not file))
|
||||
(string= name "*Buffer List*")))
|
||||
;; Otherwise output info.
|
||||
(let ((mode (concat (format-mode-line mode-name nil nil buffer)
|
||||
(if mode-line-process
|
||||
(format-mode-line mode-line-process
|
||||
nil nil buffer))))
|
||||
(bits (string
|
||||
(if (eq buffer old-buffer) ?. ?\ )
|
||||
;; Handle readonly status. The output buffer
|
||||
;; is special cased to appear readonly; it is
|
||||
;; actually made so at a later date.
|
||||
(if (or (eq buffer standard-output)
|
||||
buffer-read-only)
|
||||
?% ?\ )
|
||||
;; Identify modified buffers.
|
||||
(if (buffer-modified-p) ?* ?\ )
|
||||
;; Space separator.
|
||||
?\ )))
|
||||
(unless file
|
||||
;; No visited file. Check local value of
|
||||
;; list-buffers-directory.
|
||||
(when (and (boundp 'list-buffers-directory)
|
||||
list-buffers-directory)
|
||||
(setq file list-buffers-directory)))
|
||||
(push (list buffer bits name (buffer-size) mode file)
|
||||
list))))))
|
||||
;; Preserve the original buffer-list ordering, just in case.
|
||||
(setq list (nreverse list))
|
||||
;; Place the buffers's info in the output buffer, sorted if necessary.
|
||||
(dolist (buffer
|
||||
(if Buffer-menu-sort-column
|
||||
|
|
|
@ -410,32 +410,40 @@ T means abort and give an error message.")
|
|||
(exit-minibuffer))))
|
||||
|
||||
(defun calcAlg-blink-matching-open ()
|
||||
(let ((oldpos (point))
|
||||
(blinkpos nil))
|
||||
(let ((rightpt (point))
|
||||
(leftpt nil)
|
||||
(rightchar (preceding-char))
|
||||
leftchar
|
||||
rightsyntax
|
||||
leftsyntax)
|
||||
(save-excursion
|
||||
(condition-case ()
|
||||
(setq blinkpos (scan-sexps oldpos -1))
|
||||
(error nil)))
|
||||
(if (and blinkpos
|
||||
(> oldpos (1+ (point-min)))
|
||||
(or (and (= (char-after (1- oldpos)) ?\))
|
||||
(= (char-after blinkpos) ?\[))
|
||||
(and (= (char-after (1- oldpos)) ?\])
|
||||
(= (char-after blinkpos) ?\()))
|
||||
(save-excursion
|
||||
(goto-char blinkpos)
|
||||
(looking-at ".+\\(\\.\\.\\|\\\\dots\\|\\\\ldots\\)")))
|
||||
(let ((saved (aref (syntax-table) (char-after blinkpos))))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(aset (syntax-table) (char-after blinkpos)
|
||||
(+ (logand saved 255)
|
||||
(lsh (char-after (1- oldpos)) 8)))
|
||||
(blink-matching-open))
|
||||
(aset (syntax-table) (char-after blinkpos) saved)))
|
||||
(setq leftpt (scan-sexps rightpt -1)
|
||||
leftchar (char-after leftpt))
|
||||
(error nil)))
|
||||
(if (and leftpt
|
||||
(or (and (= rightchar ?\))
|
||||
(= leftchar ?\[))
|
||||
(and (= rightchar ?\])
|
||||
(= leftchar ?\()))
|
||||
(save-excursion
|
||||
(goto-char leftpt)
|
||||
(looking-at ".+\\(\\.\\.\\|\\\\dots\\|\\\\ldots\\)")))
|
||||
(let ((leftsaved (aref (syntax-table) leftchar))
|
||||
(rightsaved (aref (syntax-table) rightchar)))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(cond ((= leftchar ?\[)
|
||||
(aset (syntax-table) leftchar (cons 4 ?\)))
|
||||
(aset (syntax-table) rightchar (cons 5 ?\[)))
|
||||
(t
|
||||
(aset (syntax-table) leftchar (cons 4 ?\]))
|
||||
(aset (syntax-table) rightchar (cons 5 ?\())))
|
||||
(blink-matching-open))
|
||||
(aset (syntax-table) leftchar leftsaved)
|
||||
(aset (syntax-table) rightchar rightsaved)))
|
||||
(blink-matching-open))))
|
||||
|
||||
|
||||
(defun calc-alg-digit-entry ()
|
||||
(calc-alg-entry
|
||||
(cond ((eq last-command-char ?e)
|
||||
|
|
|
@ -540,12 +540,12 @@
|
|||
;;; Produce a random 10-bit integer, with (random) if no seed provided,
|
||||
;;; or else with Numerical Recipes algorithm ran3 / Knuth 3.2.2-A.
|
||||
|
||||
(defvar var-RandSeed nil)
|
||||
(defvar var-RandSeed)
|
||||
(defvar math-random-cache nil)
|
||||
(defvar math-gaussian-cache nil)
|
||||
|
||||
(defun math-init-random-base ()
|
||||
(if var-RandSeed
|
||||
(if (and (boundp 'var-RandSeed) var-RandSeed)
|
||||
(if (eq (car-safe var-RandSeed) 'vec)
|
||||
nil
|
||||
(if (Math-integerp var-RandSeed)
|
||||
|
@ -599,9 +599,10 @@
|
|||
;;; Produce a random digit in the range 0..999.
|
||||
;;; Avoid various pitfalls that may lurk in the built-in (random) function!
|
||||
;;; Shuffling algorithm from Numerical Recipes, section 7.1.
|
||||
(defvar math-random-last)
|
||||
(defun math-random-digit ()
|
||||
(let (i math-random-last)
|
||||
(or (eq var-RandSeed math-last-RandSeed)
|
||||
(let (i)
|
||||
(or (and (boundp 'var-RandSeed) (eq var-RandSeed math-last-RandSeed))
|
||||
(math-init-random-base))
|
||||
(or math-random-cache
|
||||
(progn
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
;; Author: Eli Barzilay <eli@barzilay.org>
|
||||
;; Keywords: tools, convenience
|
||||
;; Time-stamp: <2002-07-13 01:14:35 eli>
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||
|
@ -100,6 +101,20 @@ at runtime."
|
|||
:type 'integer
|
||||
:group 'calculator)
|
||||
|
||||
(defcustom calculator-radix-grouping-mode t
|
||||
"*Use digit grouping in radix output mode.
|
||||
If this is set, chunks of `calculator-radix-grouping-digits' characters
|
||||
will be separated by `calculator-radix-grouping-separator' when in radix
|
||||
output mode is active (determined by `calculator-output-radix').")
|
||||
|
||||
(defcustom calculator-radix-grouping-digits 4
|
||||
"*The number of digits used for grouping display in radix modes.
|
||||
See `calculator-radix-grouping-mode'.")
|
||||
|
||||
(defcustom calculator-radix-grouping-separator "'"
|
||||
"*The separator used in radix grouping display.
|
||||
See `calculator-radix-grouping-mode'.")
|
||||
|
||||
(defcustom calculator-remove-zeros t
|
||||
"*Non-nil value means delete all redundant zero decimal digits.
|
||||
If this value is not t, and not nil, redundant zeros are removed except
|
||||
|
@ -163,7 +178,11 @@ Otherwise show as a negative number."
|
|||
:group 'calculator)
|
||||
|
||||
(defcustom calculator-mode-hook nil
|
||||
"*List of hook functions for `calculator-mode' to run."
|
||||
"*List of hook functions for `calculator-mode' to run.
|
||||
Note: if `calculator-electric-mode' is on, then this hook will get
|
||||
activated in the minibuffer - in that case it should not do much more
|
||||
than local key settings and other effects that will change things
|
||||
outside the scope of calculator related code."
|
||||
:type 'hook
|
||||
:group 'calculator)
|
||||
|
||||
|
@ -387,7 +406,7 @@ Used for repeating operations in calculator-repR/L.")
|
|||
"oD" "oH" "oX" "oO" "oB")
|
||||
(calculator-rotate-displayer "'")
|
||||
(calculator-rotate-displayer-back "\"")
|
||||
(calculator-displayer-pref "{")
|
||||
(calculator-displayer-prev "{")
|
||||
(calculator-displayer-next "}")
|
||||
(calculator-saved-up [up] [?\C-p])
|
||||
(calculator-saved-down [down] [?\C-n])
|
||||
|
@ -399,10 +418,10 @@ Used for repeating operations in calculator-repR/L.")
|
|||
(calculator-save-and-quit [(control return)]
|
||||
[(control kp-enter)])
|
||||
(calculator-paste [insert] [(shift insert)]
|
||||
[mouse-2])
|
||||
[paste] [mouse-2] [?\C-y])
|
||||
(calculator-clear [delete] [?\C-?] [?\C-d])
|
||||
(calculator-help [?h] [??] [f1] [help])
|
||||
(calculator-copy [(control insert)])
|
||||
(calculator-copy [(control insert)] [copy])
|
||||
(calculator-backspace [backspace])
|
||||
)))
|
||||
(while p
|
||||
|
@ -536,7 +555,7 @@ Used for repeating operations in calculator-repR/L.")
|
|||
,@(mapcar (lambda (x) (nth 1 x)) radix-selectors)
|
||||
"---"
|
||||
,@(mapcar (lambda (x) (nth 2 x)) radix-selectors)))
|
||||
("Decimal Dislpay"
|
||||
("Decimal Display"
|
||||
,@(mapcar (lambda (d)
|
||||
(vector (cadr d)
|
||||
;; Note: inserts actual object here
|
||||
|
@ -611,10 +630,11 @@ The prompt indicates the current modes:
|
|||
* \"=?\": (? is B/O/H) the display radix (when input is decimal);
|
||||
* \"??\": (? is D/B/O/H) 1st char for input radix, 2nd for display.
|
||||
|
||||
Also, the quote character can be used to switch display modes for
|
||||
decimal numbers (double-quote rotates back), and the two brace
|
||||
characters (\"{\" and \"}\" change display parameters that these
|
||||
displayers use (if they handle such).
|
||||
Also, the quote key can be used to switch display modes for decimal
|
||||
numbers (double-quote rotates back), and the two brace characters
|
||||
\(\"{\" and \"}\" change display parameters that these displayers use (if
|
||||
they handle such). If output is using any radix mode, then these keys
|
||||
toggle digit grouping mode and the chunk size.
|
||||
|
||||
Values can be saved for future reference in either a list of saved
|
||||
values, or in registers.
|
||||
|
@ -683,6 +703,7 @@ See the documentation for `calculator-mode' for more information."
|
|||
(setq calculator-saved-global-map (current-global-map))
|
||||
(use-local-map nil)
|
||||
(use-global-map calculator-mode-map)
|
||||
(run-hooks 'calculator-mode-hook)
|
||||
(unwind-protect
|
||||
(catch 'calculator-done
|
||||
(Electric-command-loop
|
||||
|
@ -717,6 +738,12 @@ See the documentation for `calculator-mode' for more information."
|
|||
(if (and calculator-restart-other-mode calculator-electric-mode)
|
||||
(calculator)))
|
||||
|
||||
(defun calculator-message (string &rest arguments)
|
||||
"Same as `message', but special handle of electric mode."
|
||||
(apply 'message string arguments)
|
||||
(if calculator-electric-mode
|
||||
(progn (sit-for 1) (message nil))))
|
||||
|
||||
;;;---------------------------------------------------------------------
|
||||
;;; Operators
|
||||
|
||||
|
@ -818,82 +845,116 @@ The string is set not to exceed the screen width."
|
|||
(concat calculator-prompt
|
||||
(substring prompt (+ trim (length calculator-prompt)))))))
|
||||
|
||||
(defun calculator-curnum-value ()
|
||||
"Get the numeric value of the displayed number string as a float."
|
||||
(defun calculator-string-to-number (str)
|
||||
"Convert the given STR to a number, according to the value of
|
||||
`calculator-input-radix'."
|
||||
(if calculator-input-radix
|
||||
(let ((radix
|
||||
(cdr (assq calculator-input-radix
|
||||
'((bin . 2) (oct . 8) (hex . 16)))))
|
||||
(i -1) (value 0))
|
||||
;; assume valid input (upcased & characters in range)
|
||||
(while (< (setq i (1+ i)) (length calculator-curnum))
|
||||
(setq value
|
||||
(+ (let ((ch (aref calculator-curnum i)))
|
||||
(- ch (if (<= ch ?9) ?0 (- ?A 10))))
|
||||
(* radix value))))
|
||||
(i -1) (value 0) (new-value 0))
|
||||
;; assume mostly valid input (e.g., characters in range)
|
||||
(while (< (setq i (1+ i)) (length str))
|
||||
(setq new-value
|
||||
(let* ((ch (upcase (aref str i)))
|
||||
(n (cond ((< ch ?0) nil)
|
||||
((<= ch ?9) (- ch ?0))
|
||||
((< ch ?A) nil)
|
||||
((<= ch ?Z) (- ch (- ?A 10)))
|
||||
(t nil))))
|
||||
(if (and n (<= 0 n) (< n radix))
|
||||
(+ n (* radix value))
|
||||
(progn
|
||||
(calculator-message
|
||||
"Warning: Ignoring bad input character `%c'." ch)
|
||||
(sit-for 1)
|
||||
value))))
|
||||
(if (if (< new-value 0) (> value 0) (< value 0))
|
||||
(calculator-message "Warning: Overflow in input."))
|
||||
(setq value new-value))
|
||||
value)
|
||||
(car
|
||||
(read-from-string
|
||||
(cond
|
||||
((equal "." calculator-curnum)
|
||||
"0.0")
|
||||
((string-match "[eE][+-]?$" calculator-curnum)
|
||||
(concat calculator-curnum "0"))
|
||||
((string-match "\\.[0-9]\\|[eE]" calculator-curnum)
|
||||
calculator-curnum)
|
||||
((string-match "\\." calculator-curnum)
|
||||
;; do this because Emacs reads "23." as an integer
|
||||
(concat calculator-curnum "0"))
|
||||
((stringp calculator-curnum)
|
||||
(concat calculator-curnum ".0"))
|
||||
(t "0.0"))))))
|
||||
(car (read-from-string
|
||||
(cond ((equal "." str) "0.0")
|
||||
((string-match "[eE][+-]?$" str) (concat str "0"))
|
||||
((string-match "\\.[0-9]\\|[eE]" str) str)
|
||||
((string-match "\\." str)
|
||||
;; do this because Emacs reads "23." as an integer
|
||||
(concat str "0"))
|
||||
((stringp str) (concat str ".0"))
|
||||
(t "0.0"))))))
|
||||
|
||||
(defun calculator-curnum-value ()
|
||||
"Get the numeric value of the displayed number string as a float."
|
||||
(calculator-string-to-number calculator-curnum))
|
||||
|
||||
(defun calculator-rotate-displayer (&optional new-disp)
|
||||
"Switch to the next displayer on the `calculator-displayers' list.
|
||||
Can be called with an optional argument NEW-DISP to force rotation to
|
||||
that argument."
|
||||
that argument.
|
||||
If radix output mode is active, toggle digit grouping."
|
||||
(interactive)
|
||||
(setq calculator-displayers
|
||||
(if (and new-disp (memq new-disp calculator-displayers))
|
||||
(let ((tmp nil))
|
||||
(while (not (eq (car calculator-displayers) new-disp))
|
||||
(setq tmp (cons (car calculator-displayers) tmp))
|
||||
(setq calculator-displayers (cdr calculator-displayers)))
|
||||
(setq calculator-displayers
|
||||
(nconc calculator-displayers (nreverse tmp))))
|
||||
(nconc (cdr calculator-displayers)
|
||||
(list (car calculator-displayers)))))
|
||||
(message "Using %s." (cadr (car calculator-displayers)))
|
||||
(if calculator-electric-mode
|
||||
(progn (sit-for 1) (message nil)))
|
||||
(cond
|
||||
(calculator-output-radix
|
||||
(setq calculator-radix-grouping-mode
|
||||
(not calculator-radix-grouping-mode))
|
||||
(calculator-message
|
||||
"Digit grouping mode %s."
|
||||
(if calculator-radix-grouping-mode "ON" "OFF")))
|
||||
(t
|
||||
(setq calculator-displayers
|
||||
(if (and new-disp (memq new-disp calculator-displayers))
|
||||
(let ((tmp nil))
|
||||
(while (not (eq (car calculator-displayers) new-disp))
|
||||
(setq tmp (cons (car calculator-displayers) tmp))
|
||||
(setq calculator-displayers
|
||||
(cdr calculator-displayers)))
|
||||
(setq calculator-displayers
|
||||
(nconc calculator-displayers (nreverse tmp))))
|
||||
(nconc (cdr calculator-displayers)
|
||||
(list (car calculator-displayers)))))
|
||||
(calculator-message
|
||||
"Using %s." (cadr (car calculator-displayers)))))
|
||||
(calculator-enter))
|
||||
|
||||
(defun calculator-rotate-displayer-back ()
|
||||
"Like `calculator-rotate-displayer', but rotates modes back."
|
||||
"Like `calculator-rotate-displayer', but rotates modes back.
|
||||
If radix output mode is active, toggle digit grouping."
|
||||
(interactive)
|
||||
(calculator-rotate-displayer (car (last calculator-displayers))))
|
||||
|
||||
(defun calculator-displayer-prev ()
|
||||
"Send the current displayer function a 'left argument.
|
||||
This is used to modify display arguments (if the current displayer
|
||||
function supports this)."
|
||||
function supports this).
|
||||
If radix output mode is active, increase the grouping size."
|
||||
(interactive)
|
||||
(and (car calculator-displayers)
|
||||
(let ((disp (caar calculator-displayers)))
|
||||
(cond ((symbolp disp) (funcall disp 'left))
|
||||
((and (consp disp) (eq 'std (car disp)))
|
||||
(calculator-standard-displayer 'left (cadr disp)))))))
|
||||
(if calculator-output-radix
|
||||
(progn (setq calculator-radix-grouping-digits
|
||||
(1+ calculator-radix-grouping-digits))
|
||||
(calculator-enter))
|
||||
(and (car calculator-displayers)
|
||||
(let ((disp (caar calculator-displayers)))
|
||||
(cond
|
||||
((symbolp disp) (funcall disp 'left))
|
||||
((and (consp disp) (eq 'std (car disp)))
|
||||
(calculator-standard-displayer 'left (cadr disp))))))))
|
||||
|
||||
(defun calculator-displayer-next ()
|
||||
"Send the current displayer function a 'right argument.
|
||||
This is used to modify display arguments (if the current displayer
|
||||
function supports this)."
|
||||
function supports this).
|
||||
If radix output mode is active, decrease the grouping size."
|
||||
(interactive)
|
||||
(and (car calculator-displayers)
|
||||
(let ((disp (caar calculator-displayers)))
|
||||
(cond ((symbolp disp) (funcall disp 'right))
|
||||
((and (consp disp) (eq 'std (car disp)))
|
||||
(calculator-standard-displayer 'right (cadr disp)))))))
|
||||
(if calculator-output-radix
|
||||
(progn (setq calculator-radix-grouping-digits
|
||||
(max 2 (1- calculator-radix-grouping-digits)))
|
||||
(calculator-enter))
|
||||
(and (car calculator-displayers)
|
||||
(let ((disp (caar calculator-displayers)))
|
||||
(cond
|
||||
((symbolp disp) (funcall disp 'right))
|
||||
((and (consp disp) (eq 'std (car disp)))
|
||||
(calculator-standard-displayer 'right (cadr disp))))))))
|
||||
|
||||
(defun calculator-remove-zeros (numstr)
|
||||
"Get a number string NUMSTR and remove unnecessary zeroes.
|
||||
|
@ -995,7 +1056,7 @@ the 'left or 'right when one of the standard modes is used."
|
|||
(calculator-remove-zeros str))
|
||||
"e" (number-to-string exp))))))
|
||||
|
||||
(defun calculator-num-to-string (num)
|
||||
(defun calculator-number-to-string (num)
|
||||
"Convert NUM to a displayable string."
|
||||
(cond
|
||||
((and (numberp num) calculator-output-radix)
|
||||
|
@ -1015,6 +1076,14 @@ the 'left or 'right when one of the standard modes is used."
|
|||
(?6 . "110") (?7 . "111")))))))
|
||||
(string-match "^0*\\(.+\\)" s)
|
||||
(setq str (match-string 1 s))))
|
||||
(if calculator-radix-grouping-mode
|
||||
(let ((d (/ (length str) calculator-radix-grouping-digits))
|
||||
(r (% (length str) calculator-radix-grouping-digits)))
|
||||
(while (>= (setq d (1- d)) (if (zerop r) 1 0))
|
||||
(let ((i (+ r (* d calculator-radix-grouping-digits))))
|
||||
(setq str (concat (substring str 0 i)
|
||||
calculator-radix-grouping-separator
|
||||
(substring str i)))))))
|
||||
(upcase
|
||||
(if (and (not calculator-2s-complement) (< num 0))
|
||||
(concat "-" str)
|
||||
|
@ -1051,7 +1120,7 @@ If optional argument FORCE is non-nil, don't use the cached string."
|
|||
;; customizable display for a single value
|
||||
(caar calculator-displayers)
|
||||
calculator-displayer)))
|
||||
(mapconcat 'calculator-num-to-string
|
||||
(mapconcat 'calculator-number-to-string
|
||||
(reverse calculator-stack)
|
||||
" "))
|
||||
" "
|
||||
|
@ -1319,9 +1388,8 @@ Optional string argument KEYS will force using it as the keys entered."
|
|||
(if (not (and op (= -1 (calculator-op-arity op))))
|
||||
;;(error "Binary operator without a first operand")
|
||||
(progn
|
||||
(message "Binary operator without a first operand")
|
||||
(if calculator-electric-mode
|
||||
(progn (sit-for 1) (message nil)))
|
||||
(calculator-message
|
||||
"Binary operator without a first operand")
|
||||
(throw 'op-error nil)))))
|
||||
(calculator-reduce-stack
|
||||
(cond ((eq (nth 1 op) '\() 10)
|
||||
|
@ -1334,9 +1402,7 @@ Optional string argument KEYS will force using it as the keys entered."
|
|||
(not (numberp (car calculator-stack)))))
|
||||
;;(error "Unterminated expression")
|
||||
(progn
|
||||
(message "Unterminated expression")
|
||||
(if calculator-electric-mode
|
||||
(progn (sit-for 1) (message nil)))
|
||||
(calculator-message "Unterminated expression")
|
||||
(throw 'op-error nil)))
|
||||
(setq calculator-stack (cons op calculator-stack))
|
||||
(calculator-reduce-stack (calculator-op-prec op))
|
||||
|
@ -1540,7 +1606,7 @@ Optional string argument KEYS will force using it as the keys entered."
|
|||
(setcdr as val)
|
||||
(setq calculator-registers
|
||||
(cons (cons reg val) calculator-registers)))
|
||||
(message (format "[%c] := %S" reg val))))
|
||||
(calculator-message "[%c] := %S" reg val)))
|
||||
|
||||
(defun calculator-put-value (val)
|
||||
"Paste VAL as if entered.
|
||||
|
@ -1552,24 +1618,26 @@ Used by `calculator-paste' and `get-register'."
|
|||
(progn
|
||||
(calculator-clear-fragile)
|
||||
(setq calculator-curnum (let ((calculator-displayer "%S"))
|
||||
(calculator-num-to-string val)))
|
||||
(calculator-number-to-string val)))
|
||||
(calculator-update-display))))
|
||||
|
||||
(defun calculator-paste ()
|
||||
"Paste a value from the `kill-ring'."
|
||||
(interactive)
|
||||
(calculator-put-value
|
||||
(let ((str (current-kill 0)))
|
||||
(and calculator-paste-decimals
|
||||
(let ((str (replace-regexp-in-string
|
||||
"^ *\\(.+[^ ]\\) *$" "\\1" (current-kill 0))))
|
||||
(and (not calculator-input-radix)
|
||||
calculator-paste-decimals
|
||||
(string-match "\\([0-9]+\\)\\(\\.[0-9]+\\)?\\(e[0-9]+\\)?"
|
||||
str)
|
||||
(or (match-string 1 str)
|
||||
(match-string 2 str)
|
||||
(match-string 3 str))
|
||||
(setq str (concat (match-string 1 str)
|
||||
(setq str (concat (or (match-string 1 str) "0")
|
||||
(or (match-string 2 str) ".0")
|
||||
(match-string 3 str))))
|
||||
(condition-case nil (car (read-from-string str))
|
||||
(or (match-string 3 str) ""))))
|
||||
(condition-case nil (calculator-string-to-number str)
|
||||
(error nil)))))
|
||||
|
||||
(defun calculator-get-register (reg)
|
||||
|
@ -1678,7 +1746,7 @@ To use this, apply a binary operator (evaluate it), then call this."
|
|||
(while (> x 0)
|
||||
(setq r (* r (truncate x)))
|
||||
(setq x (1- x)))
|
||||
r))
|
||||
(+ 0.0 r)))
|
||||
|
||||
(defun calculator-truncate (n)
|
||||
"Truncate N, return 0 in case of overflow."
|
||||
|
|
|
@ -1660,6 +1660,13 @@ the date indicated by the cursor position in the displayed three-month
|
|||
calendar."
|
||||
t)
|
||||
|
||||
(autoload 'view-other-diary-entries "diary-lib"
|
||||
"Prepare and display buffer of diary entries from an alternative diary file.
|
||||
Searches for entries that match ARG days, starting with the date indicated
|
||||
by the cursor position in the displayed three-month calendar.
|
||||
D-FILE specifies the file to use as the diary file."
|
||||
t)
|
||||
|
||||
(autoload 'calendar-sunrise-sunset "solar"
|
||||
"Local time of sunrise and sunset for date under cursor."
|
||||
t)
|
||||
|
|
|
@ -80,7 +80,7 @@ Searches for entries that match ARG days, starting with the date indicated
|
|||
by the cursor position in the displayed three-month calendar.
|
||||
D-FILE specifies the file to use as the diary file."
|
||||
(interactive
|
||||
(list (if arg (prefix-numeric-value arg) 1)
|
||||
(list (prefix-numeric-value current-prefix-arg)
|
||||
(read-file-name "Enter diary file name: " default-directory nil t)))
|
||||
(let ((diary-file d-file))
|
||||
(view-diary-entries arg)))
|
||||
|
@ -841,11 +841,11 @@ Each entry in the diary file visible in the calendar window is marked.
|
|||
After the entries are marked, the hooks `nongregorian-diary-marking-hook' and
|
||||
`mark-diary-entries-hook' are run."
|
||||
(interactive)
|
||||
(setq mark-diary-entries-in-calendar t)
|
||||
(let ((marking-diary-entries t)
|
||||
file-glob-attrs marks)
|
||||
(save-excursion
|
||||
(set-buffer (find-file-noselect (diary-check-diary-file) t))
|
||||
(setq mark-diary-entries-in-calendar t)
|
||||
(message "Marking diary entries...")
|
||||
(setq file-glob-attrs (nth 1 (diary-pull-attrs nil '())))
|
||||
(let ((d diary-date-forms)
|
||||
|
|
|
@ -1561,9 +1561,9 @@ item in another window.\n\n"))
|
|||
:group 'custom-magic-faces)
|
||||
|
||||
(defface custom-set-face '((((class color))
|
||||
(:foreground "blue" :background "white"))
|
||||
(t
|
||||
(:slant italic)))
|
||||
(:foreground "blue" :background "white"))
|
||||
(t
|
||||
(:slant italic)))
|
||||
"Face used when the customize item has been set."
|
||||
:group 'custom-magic-faces)
|
||||
|
||||
|
@ -1578,31 +1578,32 @@ item in another window.\n\n"))
|
|||
"Face used when the customize item has been saved."
|
||||
:group 'custom-magic-faces)
|
||||
|
||||
(defconst custom-magic-alist '((nil "#" underline "\
|
||||
(defconst custom-magic-alist
|
||||
'((nil "#" underline "\
|
||||
uninitialized, you should not see this.")
|
||||
(unknown "?" italic "\
|
||||
(unknown "?" italic "\
|
||||
unknown, you should not see this.")
|
||||
(hidden "-" default "\
|
||||
(hidden "-" default "\
|
||||
hidden, invoke \"Show\" in the previous line to show." "\
|
||||
group now hidden, invoke \"Show\", above, to show contents.")
|
||||
(invalid "x" custom-invalid-face "\
|
||||
(invalid "x" custom-invalid-face "\
|
||||
the value displayed for this %c is invalid and cannot be set.")
|
||||
(modified "*" custom-modified-face "\
|
||||
(modified "*" custom-modified-face "\
|
||||
you have edited the value as text, but you have not set the %c." "\
|
||||
you have edited something in this group, but not set it.")
|
||||
(set "+" custom-set-face "\
|
||||
(set "+" custom-set-face "\
|
||||
you have set this %c, but not saved it for future sessions." "\
|
||||
something in this group has been set, but not saved.")
|
||||
(changed ":" custom-changed-face "\
|
||||
(changed ":" custom-changed-face "\
|
||||
this %c has been changed outside the customize buffer." "\
|
||||
something in this group has been changed outside customize.")
|
||||
(saved "!" custom-saved-face "\
|
||||
(saved "!" custom-saved-face "\
|
||||
this %c has been set and saved." "\
|
||||
something in this group has been set and saved.")
|
||||
(rogue "@" custom-rogue-face "\
|
||||
(rogue "@" custom-rogue-face "\
|
||||
this %c has not been changed with customize." "\
|
||||
something in this group is not prepared for customization.")
|
||||
(standard " " nil "\
|
||||
(standard " " nil "\
|
||||
this %c is unchanged from its standard setting." "\
|
||||
visible group members are all at standard settings."))
|
||||
"Alist of customize option states.
|
||||
|
@ -2576,7 +2577,7 @@ to switch between two values."
|
|||
"Edit face attributes."
|
||||
:format "%t: %v"
|
||||
:tag "Attributes"
|
||||
:extra-offset 12
|
||||
:extra-offset 13
|
||||
:button-args '(:help-echo "Control whether this attribute has any effect.")
|
||||
:value-to-internal 'custom-face-edit-fix-value
|
||||
:match (lambda (widget value)
|
||||
|
@ -2689,6 +2690,7 @@ Also change :reverse-video to :inverse-video."
|
|||
:value t
|
||||
:help-echo "Specify frames where the face attributes should be used."
|
||||
:args '((const :tag "all" t)
|
||||
(const :tag "defaults" default)
|
||||
(checklist
|
||||
:offset 0
|
||||
:extra-offset 9
|
||||
|
@ -2817,13 +2819,29 @@ Only match frames that support the specified face attributes.")
|
|||
|
||||
(define-widget 'custom-face-selected 'group
|
||||
"Edit the attributes of the selected display in a face specification."
|
||||
:args '((repeat :format ""
|
||||
:inline t
|
||||
(group custom-display-unselected sexp))
|
||||
(group (sexp :format "") custom-face-edit)
|
||||
(repeat :format ""
|
||||
:inline t
|
||||
sexp)))
|
||||
:args '((choice :inline t
|
||||
(group :tag "With Defaults" :inline t
|
||||
(group (const :tag "" default)
|
||||
(custom-face-edit :tag " Default\n Attributes"))
|
||||
(repeat :format ""
|
||||
:inline t
|
||||
(group custom-display-unselected sexp))
|
||||
(group (sexp :format "")
|
||||
(custom-face-edit :tag " Overriding\n Attributes"))
|
||||
(repeat :format ""
|
||||
:inline t
|
||||
sexp))
|
||||
(group :tag "No Defaults" :inline t
|
||||
(repeat :format ""
|
||||
:inline t
|
||||
(group custom-display-unselected sexp))
|
||||
(group (sexp :format "")
|
||||
(custom-face-edit :tag "\n Attributes"))
|
||||
(repeat :format ""
|
||||
:inline t
|
||||
sexp)))))
|
||||
|
||||
|
||||
|
||||
(defconst custom-face-selected (widget-convert 'custom-face-selected)
|
||||
"Converted version of the `custom-face-selected' widget.")
|
||||
|
|
|
@ -104,24 +104,11 @@ The `category', `face' and `font-lock-face' properties are made
|
|||
into widget buttons that call `describe-text-category' or
|
||||
`describe-face' when pushed."
|
||||
;; Sort the properties by the size of their value.
|
||||
(dolist (elt (sort (let ((ret nil)
|
||||
(key nil)
|
||||
(val nil)
|
||||
(len nil))
|
||||
(dolist (elt (sort (let (ret)
|
||||
(while properties
|
||||
(setq key (pop properties)
|
||||
val (pop properties)
|
||||
len 0)
|
||||
(unless (or (memq key '(category face font-lock-face
|
||||
syntax-table))
|
||||
(widgetp val))
|
||||
(setq val (pp-to-string val)
|
||||
len (length val)))
|
||||
(push (list key val len) ret))
|
||||
(push (list (pop properties) (pop properties)) ret))
|
||||
ret)
|
||||
(lambda (a b)
|
||||
(< (nth 2 a)
|
||||
(nth 2 b)))))
|
||||
(lambda (a b) (string< (nth 0 a) (nth 0 b)))))
|
||||
(let ((key (nth 0 elt))
|
||||
(value (nth 1 elt)))
|
||||
(widget-insert (propertize (format " %-20s " key)
|
||||
|
@ -131,23 +118,15 @@ into widget buttons that call `describe-text-category' or
|
|||
:notify `(lambda (&rest ignore)
|
||||
(describe-text-category ',value))
|
||||
(format "%S" value)))
|
||||
((memq key '(face font-lock-face))
|
||||
((memq key '(face font-lock-face mouse-face))
|
||||
(widget-create 'link
|
||||
:notify `(lambda (&rest ignore)
|
||||
(describe-face ',value))
|
||||
(format "%S" value)))
|
||||
((eq key 'syntax-table)
|
||||
(widget-create 'push-button
|
||||
:tag "show"
|
||||
:action (lambda (widget &optional event)
|
||||
(with-output-to-temp-buffer
|
||||
"*Pp Eval Output*"
|
||||
(pp (widget-get widget :value))))
|
||||
value))
|
||||
((widgetp value)
|
||||
(describe-text-widget value))
|
||||
(t
|
||||
(widget-insert value))))
|
||||
(describe-text-sexp value))))
|
||||
(widget-insert "\n")))
|
||||
|
||||
;;; Describe-Text Commands.
|
||||
|
@ -552,10 +531,17 @@ as well as widgets, buttons, overlays, and text properties."
|
|||
(dotimes (i (length disp-vector))
|
||||
(setq char (aref disp-vector i))
|
||||
(aset disp-vector i
|
||||
(cons char (describe-char-display pos char))))
|
||||
(cons char (describe-char-display
|
||||
pos (logand char #x7ffff)))))
|
||||
(format "by display table entry [%s] (see below)"
|
||||
(mapconcat #'(lambda (x) (format "?%c" (car x)))
|
||||
disp-vector " ")))
|
||||
(mapconcat
|
||||
#'(lambda (x)
|
||||
(if (> (car x) #x7ffff)
|
||||
(format "?%c<face-id=%s>"
|
||||
(logand (car x) #x7ffff)
|
||||
(lsh (car x) -19))
|
||||
(format "?%c" (car x))))
|
||||
disp-vector " ")))
|
||||
(composition
|
||||
(let ((from (car composition))
|
||||
(to (nth 1 composition))
|
||||
|
@ -627,7 +613,7 @@ as well as widgets, buttons, overlays, and text properties."
|
|||
(progn
|
||||
(insert "these fonts (glyph codes):\n")
|
||||
(dotimes (i (length disp-vector))
|
||||
(insert (car (aref disp-vector i)) ?:
|
||||
(insert (logand (car (aref disp-vector i)) #x7ffff) ?:
|
||||
(propertize " " 'display '(space :align-to 5))
|
||||
(if (cdr (aref disp-vector i))
|
||||
(format "%s (0x%02X)" (cadr (aref disp-vector i))
|
||||
|
|
|
@ -1104,6 +1104,7 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST."
|
|||
(let ((map (make-keymap)))
|
||||
(suppress-keymap map)
|
||||
(define-key map [mouse-2] 'dired-mouse-find-file-other-window)
|
||||
(define-key map [follow-link] 'mouse-face)
|
||||
;; Commands to mark or flag certain categories of files
|
||||
(define-key map "#" 'dired-flag-auto-save-files)
|
||||
(define-key map "." 'dired-clean-directory)
|
||||
|
|
|
@ -2178,7 +2178,7 @@ list that represents a doc string reference.
|
|||
(let ((old-load-list current-load-list)
|
||||
(args (mapcar 'eval (cdr form))))
|
||||
(apply 'require args)
|
||||
;; Detech (require 'cl) in a way that works even if cl is already loaded.
|
||||
;; Detect (require 'cl) in a way that works even if cl is already loaded.
|
||||
(if (member (car args) '("cl" cl))
|
||||
(setq byte-compile-warnings
|
||||
(remq 'cl-functions byte-compile-warnings))))
|
||||
|
|
|
@ -919,7 +919,7 @@ is the starting location. If this is nil, `point-min' is used instead."
|
|||
(progn
|
||||
(goto-char wrong)
|
||||
(if (not take-notes)
|
||||
(error (checkdoc-error-text msg)))))
|
||||
(error "%s" (checkdoc-error-text msg)))))
|
||||
(checkdoc-show-diagnostics)
|
||||
(if (interactive-p)
|
||||
(message "No style warnings."))))
|
||||
|
@ -952,7 +952,7 @@ if there is one."
|
|||
(e (checkdoc-file-comments-engine))
|
||||
(checkdoc-generate-compile-warnings-flag
|
||||
(or take-notes checkdoc-generate-compile-warnings-flag)))
|
||||
(if e (error (checkdoc-error-text e)))
|
||||
(if e (error "%s" (checkdoc-error-text e)))
|
||||
(checkdoc-show-diagnostics)
|
||||
e))
|
||||
|
||||
|
@ -990,7 +990,7 @@ Optional argument TAKE-NOTES causes all errors to be logged."
|
|||
(if (not (interactive-p))
|
||||
e
|
||||
(if e
|
||||
(error (checkdoc-error-text e))
|
||||
(error "%s" (checkdoc-error-text e))
|
||||
(checkdoc-show-diagnostics)))
|
||||
(goto-char p))
|
||||
(if (interactive-p) (message "Checking interactive message text...done.")))
|
||||
|
@ -1033,15 +1033,15 @@ space at the end of each line."
|
|||
(msg (checkdoc-this-string-valid)))
|
||||
(if msg (if no-error
|
||||
(message (checkdoc-error-text msg))
|
||||
(error (checkdoc-error-text msg)))
|
||||
(error "%s" (checkdoc-error-text msg)))
|
||||
(setq msg (checkdoc-message-text-search beg end))
|
||||
(if msg (if no-error
|
||||
(message (checkdoc-error-text msg))
|
||||
(error (checkdoc-error-text msg)))
|
||||
(error "%s" (checkdoc-error-text msg)))
|
||||
(setq msg (checkdoc-rogue-space-check-engine beg end))
|
||||
(if msg (if no-error
|
||||
(message (checkdoc-error-text msg))
|
||||
(error (checkdoc-error-text msg))))))
|
||||
(error "%s" (checkdoc-error-text msg))))))
|
||||
(if (interactive-p) (message "Checkdoc: done."))))))
|
||||
|
||||
;;; Ispell interface for forcing a spell check
|
||||
|
|
|
@ -49,6 +49,85 @@
|
|||
(defvar elint-log-buffer "*Elint*"
|
||||
"*The buffer to insert lint messages in.")
|
||||
|
||||
;;;
|
||||
;;; Data
|
||||
;;;
|
||||
|
||||
(defconst elint-standard-variables
|
||||
'(abbrev-mode auto-fill-function buffer-auto-save-file-name
|
||||
buffer-backed-up buffer-display-count buffer-display-table buffer-display-time buffer-file-coding-system buffer-file-format
|
||||
buffer-file-name buffer-file-number buffer-file-truename
|
||||
buffer-file-type buffer-invisibility-spec buffer-offer-save
|
||||
buffer-read-only buffer-saved-size buffer-undo-list
|
||||
cache-long-line-scans case-fold-search ctl-arrow cursor-type comment-column
|
||||
default-directory defun-prompt-regexp desktop-save-buffer enable-multibyte-characters fill-column fringes-outside-margins goal-column
|
||||
header-line-format indicate-buffer-boundaries indicate-empty-lines
|
||||
left-fringe-width
|
||||
left-margin left-margin-width line-spacing local-abbrev-table local-write-file-hooks major-mode
|
||||
mark-active mark-ring mode-line-buffer-identification
|
||||
mode-line-format mode-line-modified mode-line-process mode-name
|
||||
overwrite-mode
|
||||
point-before-scroll right-fringe-width right-margin-width
|
||||
scroll-bar-width scroll-down-aggressively scroll-up-aggressively selective-display
|
||||
selective-display-ellipses tab-width truncate-lines vc-mode vertical-scroll-bar)
|
||||
"Standard buffer local vars.")
|
||||
|
||||
(defconst elint-unknown-builtin-args
|
||||
'((while test &rest forms)
|
||||
(insert-before-markers-and-inherit &rest text)
|
||||
(catch tag &rest body)
|
||||
(and &rest args)
|
||||
(funcall func &rest args)
|
||||
(insert &rest args)
|
||||
(vconcat &rest args)
|
||||
(run-hook-with-args hook &rest args)
|
||||
(message-or-box string &rest args)
|
||||
(save-window-excursion &rest body)
|
||||
(append &rest args)
|
||||
(logior &rest args)
|
||||
(progn &rest body)
|
||||
(insert-and-inherit &rest args)
|
||||
(message-box string &rest args)
|
||||
(prog2 x y &rest body)
|
||||
(prog1 first &rest body)
|
||||
(insert-before-markers &rest args)
|
||||
(call-process-region start end program &optional delete
|
||||
destination display &rest args)
|
||||
(concat &rest args)
|
||||
(vector &rest args)
|
||||
(run-hook-with-args-until-success hook &rest args)
|
||||
(track-mouse &rest body)
|
||||
(unwind-protect bodyform &rest unwindforms)
|
||||
(save-restriction &rest body)
|
||||
(quote arg)
|
||||
(make-byte-code &rest args)
|
||||
(or &rest args)
|
||||
(cond &rest clauses)
|
||||
(start-process name buffer program &rest args)
|
||||
(run-hook-with-args-until-failure hook &rest args)
|
||||
(if cond then &rest else)
|
||||
(apply function &rest args)
|
||||
(format string &rest args)
|
||||
(encode-time second minute hour day month year zone &rest args)
|
||||
(min &rest args)
|
||||
(logand &rest args)
|
||||
(logxor &rest args)
|
||||
(max &rest args)
|
||||
(list &rest args)
|
||||
(message string &rest args)
|
||||
(defvar symbol init doc)
|
||||
(call-process program &optional infile destination display &rest args)
|
||||
(with-output-to-temp-buffer bufname &rest body)
|
||||
(nconc &rest args)
|
||||
(save-excursion &rest body)
|
||||
(run-hooks &rest hooks)
|
||||
(/ x y &rest zs)
|
||||
(- x &rest y)
|
||||
(+ &rest args)
|
||||
(* &rest args)
|
||||
(interactive &optional args))
|
||||
"Those built-ins for which we can't find arguments.")
|
||||
|
||||
;;;
|
||||
;;; ADT: top-form
|
||||
;;;
|
||||
|
@ -724,85 +803,6 @@ If no documentation could be found args will be `unknown'."
|
|||
(if list list
|
||||
(elint-find-builtins))))
|
||||
|
||||
;;;
|
||||
;;; Data
|
||||
;;;
|
||||
|
||||
(defconst elint-standard-variables
|
||||
'(abbrev-mode auto-fill-function buffer-auto-save-file-name
|
||||
buffer-backed-up buffer-display-count buffer-display-table buffer-display-time buffer-file-coding-system buffer-file-format
|
||||
buffer-file-name buffer-file-number buffer-file-truename
|
||||
buffer-file-type buffer-invisibility-spec buffer-offer-save
|
||||
buffer-read-only buffer-saved-size buffer-undo-list
|
||||
cache-long-line-scans case-fold-search ctl-arrow cursor-type comment-column
|
||||
default-directory defun-prompt-regexp desktop-save-buffer enable-multibyte-characters fill-column fringes-outside-margins goal-column
|
||||
header-line-format indicate-buffer-boundaries indicate-empty-lines
|
||||
left-fringe-width
|
||||
left-margin left-margin-width line-spacing local-abbrev-table local-write-file-hooks major-mode
|
||||
mark-active mark-ring mode-line-buffer-identification
|
||||
mode-line-format mode-line-modified mode-line-process mode-name
|
||||
overwrite-mode
|
||||
point-before-scroll right-fringe-width right-margin-width
|
||||
scroll-bar-width scroll-down-aggressively scroll-up-aggressively selective-display
|
||||
selective-display-ellipses tab-width truncate-lines vc-mode vertical-scroll-bar)
|
||||
"Standard buffer local vars.")
|
||||
|
||||
(defconst elint-unknown-builtin-args
|
||||
'((while test &rest forms)
|
||||
(insert-before-markers-and-inherit &rest text)
|
||||
(catch tag &rest body)
|
||||
(and &rest args)
|
||||
(funcall func &rest args)
|
||||
(insert &rest args)
|
||||
(vconcat &rest args)
|
||||
(run-hook-with-args hook &rest args)
|
||||
(message-or-box string &rest args)
|
||||
(save-window-excursion &rest body)
|
||||
(append &rest args)
|
||||
(logior &rest args)
|
||||
(progn &rest body)
|
||||
(insert-and-inherit &rest args)
|
||||
(message-box string &rest args)
|
||||
(prog2 x y &rest body)
|
||||
(prog1 first &rest body)
|
||||
(insert-before-markers &rest args)
|
||||
(call-process-region start end program &optional delete
|
||||
destination display &rest args)
|
||||
(concat &rest args)
|
||||
(vector &rest args)
|
||||
(run-hook-with-args-until-success hook &rest args)
|
||||
(track-mouse &rest body)
|
||||
(unwind-protect bodyform &rest unwindforms)
|
||||
(save-restriction &rest body)
|
||||
(quote arg)
|
||||
(make-byte-code &rest args)
|
||||
(or &rest args)
|
||||
(cond &rest clauses)
|
||||
(start-process name buffer program &rest args)
|
||||
(run-hook-with-args-until-failure hook &rest args)
|
||||
(if cond then &rest else)
|
||||
(apply function &rest args)
|
||||
(format string &rest args)
|
||||
(encode-time second minute hour day month year zone &rest args)
|
||||
(min &rest args)
|
||||
(logand &rest args)
|
||||
(logxor &rest args)
|
||||
(max &rest args)
|
||||
(list &rest args)
|
||||
(message string &rest args)
|
||||
(defvar symbol init doc)
|
||||
(call-process program &optional infile destination display &rest args)
|
||||
(with-output-to-temp-buffer bufname &rest body)
|
||||
(nconc &rest args)
|
||||
(save-excursion &rest body)
|
||||
(run-hooks &rest hooks)
|
||||
(/ x y &rest zs)
|
||||
(- x &rest y)
|
||||
(+ &rest args)
|
||||
(* &rest args)
|
||||
(interactive &optional args))
|
||||
"Those built-ins for which we can't find arguments.")
|
||||
|
||||
(provide 'elint)
|
||||
|
||||
;;; arch-tag: b2f061e2-af84-4ddc-8e39-f5e969ac228f
|
||||
|
|
|
@ -73,17 +73,18 @@ move forward across N balanced expressions."
|
|||
"Set mark ARG sexps from point.
|
||||
The place mark goes is the same place \\[forward-sexp] would
|
||||
move to with the same argument.
|
||||
If this command is repeated, it marks the next ARG sexps after the ones
|
||||
already marked."
|
||||
If this command is repeated or mark is active in Transient Mark mode,
|
||||
it marks the next ARG sexps after the ones already marked."
|
||||
(interactive "P")
|
||||
(cond ((and (eq last-command this-command) (mark t))
|
||||
(cond ((or (and (eq last-command this-command) (mark t))
|
||||
(and transient-mark-mode mark-active))
|
||||
(setq arg (if arg (prefix-numeric-value arg)
|
||||
(if (> (mark) (point)) 1 -1)))
|
||||
(if (< (mark) (point)) -1 1)))
|
||||
(set-mark
|
||||
(save-excursion
|
||||
(goto-char (mark))
|
||||
(forward-sexp arg)
|
||||
(point))))
|
||||
(goto-char (mark))
|
||||
(forward-sexp arg)
|
||||
(point))))
|
||||
(t
|
||||
(push-mark
|
||||
(save-excursion
|
||||
|
@ -191,9 +192,10 @@ open-parenthesis, and point ends up at the beginning of the line.
|
|||
If variable `beginning-of-defun-function' is non-nil, its value
|
||||
is called as a function to find the defun's beginning."
|
||||
(interactive "p")
|
||||
(and (eq this-command 'beginning-of-defun)
|
||||
(or inhibit-mark-movement (eq last-command 'beginning-of-defun)
|
||||
(push-mark)))
|
||||
(or (not (eq this-command 'beginning-of-defun))
|
||||
(eq last-command 'beginning-of-defun)
|
||||
(and transient-mark-mode mark-active)
|
||||
(push-mark))
|
||||
(and (beginning-of-defun-raw arg)
|
||||
(progn (beginning-of-line) t)))
|
||||
|
||||
|
@ -242,9 +244,10 @@ matches the open-parenthesis that starts a defun; see function
|
|||
If variable `end-of-defun-function' is non-nil, its value
|
||||
is called as a function to find the defun's end."
|
||||
(interactive "p")
|
||||
(and (eq this-command 'end-of-defun)
|
||||
(or inhibit-mark-movement (eq last-command 'end-of-defun)
|
||||
(push-mark)))
|
||||
(or (not (eq this-command 'end-of-defun))
|
||||
(eq last-command 'end-of-defun)
|
||||
(and transient-mark-mode mark-active)
|
||||
(push-mark))
|
||||
(if (or (null arg) (= arg 0)) (setq arg 1))
|
||||
(if end-of-defun-function
|
||||
(if (> arg 0)
|
||||
|
@ -289,10 +292,11 @@ is called as a function to find the defun's end."
|
|||
(defun mark-defun ()
|
||||
"Put mark at end of this defun, point at beginning.
|
||||
The defun marked is the one that contains point or follows point.
|
||||
If this command is repeated, marks more defuns after the ones
|
||||
already marked."
|
||||
If this command is repeated or mark is active in Transient Mark mode,
|
||||
it marks more defuns after the ones already marked."
|
||||
(interactive)
|
||||
(cond ((and (eq last-command this-command) (mark t))
|
||||
(cond ((or (and (eq last-command this-command) (mark t))
|
||||
(and transient-mark-mode mark-active))
|
||||
(set-mark
|
||||
(save-excursion
|
||||
(goto-char (mark))
|
||||
|
|
|
@ -1003,14 +1003,6 @@ Extra commands should be added to `cua-movement-commands'")
|
|||
(defvar cua-movement-commands nil
|
||||
"User may add additional movement commands to this list.")
|
||||
|
||||
(defvar cua--preserve-mark-commands
|
||||
'(end-of-buffer beginning-of-buffer)
|
||||
"List of movement commands that move the mark.
|
||||
CUA will preserve the previous mark position if a mark is already
|
||||
active before one of these commands is executed.")
|
||||
|
||||
(defvar cua--undo-push-mark nil)
|
||||
|
||||
;;; Scrolling commands which does not signal errors at top/bottom
|
||||
;;; of buffer at first key-press (instead moves to top/bottom
|
||||
;;; of buffer).
|
||||
|
@ -1100,11 +1092,7 @@ If ARG is the atom `-', scroll upward by nearly full screen."
|
|||
(aref (if window-system
|
||||
(this-single-command-raw-keys)
|
||||
(this-single-command-keys)) 0)))
|
||||
(if mark-active
|
||||
(if (and (memq this-command cua--preserve-mark-commands)
|
||||
(not inhibit-mark-movement))
|
||||
(setq cua--undo-push-mark t
|
||||
inhibit-mark-movement t))
|
||||
(unless mark-active
|
||||
(push-mark-command nil t))
|
||||
(setq cua--last-region-shifted t)
|
||||
(setq cua--explicit-region-start nil))
|
||||
|
@ -1151,9 +1139,6 @@ If ARG is the atom `-', scroll upward by nearly full screen."
|
|||
(defun cua--post-command-handler ()
|
||||
(condition-case nil
|
||||
(progn
|
||||
(when cua--undo-push-mark
|
||||
(setq cua--undo-push-mark nil
|
||||
inhibit-mark-movement nil))
|
||||
(when cua--global-mark-active
|
||||
(cua--global-mark-post-command))
|
||||
(when (fboundp 'cua--rectangle-post-command)
|
||||
|
|
|
@ -1334,21 +1334,29 @@ If SPEC is nil, return nil."
|
|||
(unless frame
|
||||
(setq frame (selected-frame)))
|
||||
(let ((tail spec)
|
||||
result all)
|
||||
result defaults)
|
||||
(while tail
|
||||
(let* ((entry (pop tail))
|
||||
(display (car entry))
|
||||
(attrs (cdr entry)))
|
||||
(when (face-spec-set-match-display display frame)
|
||||
(setq result (if (null (cdr attrs)) ;; was (listp (car attrs))
|
||||
;; Old-style entry, the attribute list is the
|
||||
;; first element.
|
||||
(car attrs)
|
||||
attrs))
|
||||
(if (eq display t)
|
||||
(setq all result result nil)
|
||||
(attrs (cdr entry))
|
||||
thisval)
|
||||
;; Get the attributes as actually specified by this alternative.
|
||||
(setq thisval
|
||||
(if (null (cdr attrs)) ;; was (listp (car attrs))
|
||||
;; Old-style entry, the attribute list is the
|
||||
;; first element.
|
||||
(car attrs)
|
||||
attrs))
|
||||
|
||||
;; If the condition is `default', that sets the default
|
||||
;; for following conditions.
|
||||
(if (eq display 'default)
|
||||
(setq defaults thisval)
|
||||
;; Otherwise, if it matches, use it.
|
||||
(when (face-spec-set-match-display display frame)
|
||||
(setq result thisval)
|
||||
(setq tail nil)))))
|
||||
(if all (append result all) result)))
|
||||
(if defaults (append result defaults) result)))
|
||||
|
||||
|
||||
(defun face-spec-reset-face (face &optional frame)
|
||||
|
@ -1816,7 +1824,7 @@ created."
|
|||
:group 'basic-faces)
|
||||
|
||||
(defface mode-line-inactive
|
||||
'((t
|
||||
'((default
|
||||
:inherit mode-line)
|
||||
(((type x w32 mac) (background light) (class color))
|
||||
:weight light
|
||||
|
@ -1836,7 +1844,7 @@ created."
|
|||
(put 'modeline-inactive 'face-alias 'mode-line-inactive)
|
||||
|
||||
(defface header-line
|
||||
'((t
|
||||
'((default
|
||||
:inherit mode-line)
|
||||
(((type tty))
|
||||
;; This used to be `:inverse-video t', but that doesn't look very
|
||||
|
@ -1872,7 +1880,7 @@ created."
|
|||
|
||||
|
||||
(defface tool-bar
|
||||
'((t
|
||||
'((default
|
||||
:box (:line-width 1 :style released-button)
|
||||
:foreground "black")
|
||||
(((type x w32 mac) (class color))
|
||||
|
@ -2053,8 +2061,8 @@ Note: Other faces cannot inherit from the cursor face."
|
|||
|
||||
(defface escape-glyph '((((background dark)) :foreground "cyan")
|
||||
(((type pc)) :foreground "magenta")
|
||||
(t :foreground "dark blue"))
|
||||
"Face for displaying \\ and ^ in multichar glyphs."
|
||||
(t :foreground "blue"))
|
||||
"Face for characters displayed as ^-sequences or \-sequences."
|
||||
:group 'basic-faces)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
|
186
lisp/ffap.el
186
lisp/ffap.el
|
@ -42,10 +42,21 @@
|
|||
;;
|
||||
;; ffap-bindings makes the following global key bindings:
|
||||
;;
|
||||
;; C-x C-f find-file-at-point (abbreviated as ffap)
|
||||
;; C-x d dired-at-point
|
||||
;; C-x 4 f ffap-other-window
|
||||
;; C-x 5 f ffap-other-frame
|
||||
;; C-x C-f find-file-at-point (abbreviated as ffap)
|
||||
;; C-x C-r ffap-read-only
|
||||
;; C-x C-v ffap-alternate-file
|
||||
;;
|
||||
;; C-x d dired-at-point
|
||||
;; C-x C-d ffap-list-directory
|
||||
;;
|
||||
;; C-x 4 f ffap-other-window
|
||||
;; C-x 4 r ffap-read-only-other-window
|
||||
;; C-x 4 d ffap-dired-other-window
|
||||
;;
|
||||
;; C-x 5 f ffap-other-frame
|
||||
;; C-x 5 r ffap-read-only-other-frame
|
||||
;; C-x 5 d ffap-dired-other-frame
|
||||
;;
|
||||
;; S-mouse-3 ffap-at-mouse
|
||||
;; C-S-mouse-3 ffap-menu
|
||||
;;
|
||||
|
@ -202,13 +213,17 @@ Sensible values are nil, \"news\", or \"mailto\"."
|
|||
;; through this section for features that you like, put an appropriate
|
||||
;; enabler in your .emacs file.
|
||||
|
||||
(defcustom ffap-dired-wildcards nil
|
||||
;; Suggestion from RHOGEE, 07 Jul 1994. Disabled, dired is still
|
||||
;; available by "C-x C-d <pattern>", and valid filenames may
|
||||
;; sometimes contain wildcard characters.
|
||||
(defcustom ffap-dired-wildcards "[*?][^/]*\\'"
|
||||
"*A regexp matching filename wildcard characters, or nil.
|
||||
|
||||
If `find-file-at-point' gets a filename matching this pattern,
|
||||
it passes it on to `dired' instead of `find-file'."
|
||||
it passes it on to `find-file' with non-nil WILDCARDS argument,
|
||||
which expands wildcards and visits multiple files. To visit
|
||||
a file whose name contains wildcard characters you can suppress
|
||||
wildcard expansion by setting `find-file-wildcards'.
|
||||
|
||||
If `dired-at-point' gets a filename matching this pattern,
|
||||
it passes it on to `dired'."
|
||||
:type '(choice (const :tag "Disable" nil)
|
||||
(const :tag "Enable" "[*?][^/]*\\'")
|
||||
;; regexp -- probably not useful
|
||||
|
@ -236,6 +251,12 @@ ffap most of the time."
|
|||
:group 'ffap)
|
||||
(put 'ffap-file-finder 'risky-local-variable t)
|
||||
|
||||
(defcustom ffap-directory-finder 'dired
|
||||
"*The command called by `dired-at-point' to find a directory."
|
||||
:type 'function
|
||||
:group 'ffap)
|
||||
(put 'ffap-directory-finder 'risky-local-variable t)
|
||||
|
||||
(defcustom ffap-url-fetcher
|
||||
(if (fboundp 'browse-url)
|
||||
'browse-url ; rely on browse-url-browser-function
|
||||
|
@ -939,7 +960,7 @@ If t, `ffap-tex-init' will initialize this when needed.")
|
|||
;; Slightly controversial decisions:
|
||||
;; * strip trailing "@" and ":"
|
||||
;; * no commas (good for latex)
|
||||
(file "--:$+<>@-Z_a-z~" "<@" "@>;.,!?:")
|
||||
(file "--:$+<>@-Z_a-z~*?" "<@" "@>;.,!:")
|
||||
;; An url, or maybe a email/news message-id:
|
||||
(url "--:=&?$+@-Z_a-z~#,%;" "^A-Za-z0-9" ":;.,!?")
|
||||
;; Find a string that does *not* contain a colon:
|
||||
|
@ -1120,8 +1141,8 @@ which may actually result in an url rather than a filename."
|
|||
(default-directory default-directory))
|
||||
(unwind-protect
|
||||
(cond
|
||||
;; Immediate rejects (/ and // are too common in C++):
|
||||
((member name '("" "/" "//" ".")) nil)
|
||||
;; Immediate rejects (/ and // and /* are too common in C/C++):
|
||||
((member name '("" "/" "//" "/*" ".")) nil)
|
||||
;; Immediately test local filenames. If default-directory is
|
||||
;; remote, you probably already have a connection.
|
||||
((and (not abs) (ffap-file-exists-string name)))
|
||||
|
@ -1187,6 +1208,12 @@ which may actually result in an url rather than a filename."
|
|||
remote-dir (substring name (match-end 1)))))
|
||||
(ffap-file-exists-string
|
||||
(ffap-replace-file-component remote-dir name))))))
|
||||
((and ffap-dired-wildcards
|
||||
(string-match ffap-dired-wildcards name)
|
||||
abs
|
||||
(ffap-file-exists-string (file-name-directory
|
||||
(directory-file-name name)))
|
||||
name))
|
||||
;; Try all parent directories by deleting the trailing directory
|
||||
;; name until existing directory is found or name stops changing
|
||||
((let ((dir name))
|
||||
|
@ -1227,7 +1254,9 @@ which may actually result in an url rather than a filename."
|
|||
dir
|
||||
nil
|
||||
(if dir (cons guess (length dir)) guess)
|
||||
(list 'file-name-history))))
|
||||
(list 'file-name-history)
|
||||
(and buffer-file-name
|
||||
(abbreviate-file-name buffer-file-name)))))
|
||||
;; Do file substitution like (interactive "F"), suggested by MCOOK.
|
||||
(or (ffap-url-p guess) (setq guess (substitute-in-file-name guess)))
|
||||
;; Should not do it on url's, where $ is a common (VMS?) character.
|
||||
|
@ -1357,10 +1386,12 @@ See <ftp://ftp.mathcs.emory.edu/pub/mic/emacs/> for latest version."
|
|||
((ffap-url-p filename)
|
||||
(let (current-prefix-arg) ; w3 2.3.25 bug, reported by KPC
|
||||
(funcall ffap-url-fetcher filename)))
|
||||
;; This junk more properly belongs in a modified ffap-file-finder:
|
||||
((and ffap-dired-wildcards
|
||||
(string-match ffap-dired-wildcards filename))
|
||||
(dired filename))
|
||||
(string-match ffap-dired-wildcards filename)
|
||||
find-file-wildcards
|
||||
;; Check if it's find-file that supports wildcards arg
|
||||
(memq ffap-file-finder '(find-file find-alternate-file)))
|
||||
(funcall ffap-file-finder (expand-file-name filename) t))
|
||||
((or (not ffap-newfile-prompt)
|
||||
(file-exists-p filename)
|
||||
(y-or-n-p "File does not exist, create buffer? "))
|
||||
|
@ -1556,9 +1587,7 @@ Return value:
|
|||
)))
|
||||
|
||||
|
||||
;;; ffap-other-* commands:
|
||||
;;
|
||||
;; Requested by KPC.
|
||||
;;; ffap-other-*, ffap-read-only-*, ffap-alternate-* commands:
|
||||
|
||||
;; There could be a real `ffap-noselect' function, but we would need
|
||||
;; at least two new user variables, and there is no w3-fetch-noselect.
|
||||
|
@ -1568,23 +1597,70 @@ Return value:
|
|||
"Like `ffap', but put buffer in another window.
|
||||
Only intended for interactive use."
|
||||
(interactive)
|
||||
(switch-to-buffer-other-window
|
||||
(save-window-excursion (call-interactively 'ffap) (current-buffer))))
|
||||
(let (value)
|
||||
(switch-to-buffer-other-window
|
||||
(save-window-excursion
|
||||
(setq value (call-interactively 'ffap))
|
||||
(unless (or (bufferp value) (bufferp (car-safe value)))
|
||||
(setq value (current-buffer)))
|
||||
(current-buffer)))
|
||||
value))
|
||||
|
||||
(defun ffap-other-frame nil
|
||||
"Like `ffap', but put buffer in another frame.
|
||||
Only intended for interactive use."
|
||||
(interactive)
|
||||
;; Extra code works around dedicated windows (noted by JENS, 7/96):
|
||||
(let* ((win (selected-window)) (wdp (window-dedicated-p win)))
|
||||
(let* ((win (selected-window))
|
||||
(wdp (window-dedicated-p win))
|
||||
value)
|
||||
(unwind-protect
|
||||
(progn
|
||||
(set-window-dedicated-p win nil)
|
||||
(switch-to-buffer-other-frame
|
||||
(save-window-excursion
|
||||
(call-interactively 'ffap)
|
||||
(setq value (call-interactively 'ffap))
|
||||
(unless (or (bufferp value) (bufferp (car-safe value)))
|
||||
(setq value (current-buffer)))
|
||||
(current-buffer))))
|
||||
(set-window-dedicated-p win wdp))))
|
||||
(set-window-dedicated-p win wdp))
|
||||
value))
|
||||
|
||||
(defun ffap-read-only ()
|
||||
"Like `ffap', but mark buffer as read-only.
|
||||
Only intended for interactive use."
|
||||
(interactive)
|
||||
(let ((value (call-interactively 'ffap)))
|
||||
(unless (or (bufferp value) (bufferp (car-safe value)))
|
||||
(setq value (current-buffer)))
|
||||
(mapc (lambda (b) (with-current-buffer b (toggle-read-only 1)))
|
||||
(if (listp value) value (list value)))
|
||||
value))
|
||||
|
||||
(defun ffap-read-only-other-window ()
|
||||
"Like `ffap', but put buffer in another window and mark as read-only.
|
||||
Only intended for interactive use."
|
||||
(interactive)
|
||||
(let ((value (ffap-other-window)))
|
||||
(mapc (lambda (b) (with-current-buffer b (toggle-read-only 1)))
|
||||
(if (listp value) value (list value)))
|
||||
value))
|
||||
|
||||
(defun ffap-read-only-other-frame ()
|
||||
"Like `ffap', but put buffer in another frame and mark as read-only.
|
||||
Only intended for interactive use."
|
||||
(interactive)
|
||||
(let ((value (ffap-other-frame)))
|
||||
(mapc (lambda (b) (with-current-buffer b (toggle-read-only 1)))
|
||||
(if (listp value) value (list value)))
|
||||
value))
|
||||
|
||||
(defun ffap-alternate-file ()
|
||||
"Like `ffap' and `find-alternate-file'.
|
||||
Only intended for interactive use."
|
||||
(interactive)
|
||||
(let ((ffap-file-finder 'find-alternate-file))
|
||||
(call-interactively 'ffap)))
|
||||
|
||||
|
||||
;;; Bug Reporter:
|
||||
|
@ -1665,24 +1741,26 @@ ffap most of the time."
|
|||
(not current-prefix-arg)
|
||||
current-prefix-arg))
|
||||
(let (current-prefix-arg) ; already interpreted
|
||||
(call-interactively 'dired))
|
||||
(call-interactively ffap-directory-finder))
|
||||
(or filename (setq filename (dired-at-point-prompter)))
|
||||
(cond
|
||||
((ffap-url-p filename)
|
||||
(funcall ffap-url-fetcher filename))
|
||||
((and ffap-dired-wildcards
|
||||
(string-match ffap-dired-wildcards filename))
|
||||
(dired filename))
|
||||
(funcall ffap-directory-finder filename))
|
||||
((file-exists-p filename)
|
||||
(if (file-directory-p filename)
|
||||
(dired (expand-file-name filename))
|
||||
(dired (concat (expand-file-name filename) "*"))))
|
||||
(funcall ffap-directory-finder
|
||||
(expand-file-name filename))
|
||||
(funcall ffap-directory-finder
|
||||
(concat (expand-file-name filename) "*"))))
|
||||
((and (file-writable-p
|
||||
(or (file-name-directory (directory-file-name filename))
|
||||
filename))
|
||||
(y-or-n-p "Directory does not exist, create it? "))
|
||||
(make-directory filename)
|
||||
(dired filename))
|
||||
(funcall ffap-directory-finder filename))
|
||||
((error "No such file or directory `%s'" filename)))))
|
||||
|
||||
(defun dired-at-point-prompter (&optional guess)
|
||||
|
@ -1712,16 +1790,66 @@ ffap most of the time."
|
|||
(and guess (ffap-highlight))))
|
||||
(ffap-highlight t)))
|
||||
|
||||
;;; ffap-dired-other-*, ffap-list-directory commands:
|
||||
|
||||
(defun ffap-dired-other-window ()
|
||||
"Like `dired-at-point', but put buffer in another window.
|
||||
Only intended for interactive use."
|
||||
(interactive)
|
||||
(let (value)
|
||||
(switch-to-buffer-other-window
|
||||
(save-window-excursion
|
||||
(setq value (call-interactively 'dired-at-point))
|
||||
(current-buffer)))
|
||||
value))
|
||||
|
||||
(defun ffap-dired-other-frame ()
|
||||
"Like `dired-at-point', but put buffer in another frame.
|
||||
Only intended for interactive use."
|
||||
(interactive)
|
||||
;; Extra code works around dedicated windows (noted by JENS, 7/96):
|
||||
(let* ((win (selected-window))
|
||||
(wdp (window-dedicated-p win))
|
||||
value)
|
||||
(unwind-protect
|
||||
(progn
|
||||
(set-window-dedicated-p win nil)
|
||||
(switch-to-buffer-other-frame
|
||||
(save-window-excursion
|
||||
(setq value (call-interactively 'dired-at-point))
|
||||
(current-buffer))))
|
||||
(set-window-dedicated-p win wdp))
|
||||
value))
|
||||
|
||||
(defun ffap-list-directory ()
|
||||
"Like `dired-at-point' and `list-directory'.
|
||||
Only intended for interactive use."
|
||||
(interactive)
|
||||
(let ((ffap-directory-finder 'list-directory))
|
||||
(call-interactively 'dired-at-point)))
|
||||
|
||||
|
||||
;;; Offer default global bindings (`ffap-bindings'):
|
||||
|
||||
(defvar ffap-bindings
|
||||
'(
|
||||
(global-set-key [S-mouse-3] 'ffap-at-mouse)
|
||||
(global-set-key [C-S-mouse-3] 'ffap-menu)
|
||||
|
||||
(global-set-key "\C-x\C-f" 'find-file-at-point)
|
||||
(global-set-key "\C-x\C-r" 'ffap-read-only)
|
||||
(global-set-key "\C-x\C-v" 'ffap-alternate-file)
|
||||
|
||||
(global-set-key "\C-x4f" 'ffap-other-window)
|
||||
(global-set-key "\C-x5f" 'ffap-other-frame)
|
||||
(global-set-key "\C-x4r" 'ffap-read-only-other-window)
|
||||
(global-set-key "\C-x5r" 'ffap-read-only-other-frame)
|
||||
|
||||
(global-set-key "\C-xd" 'dired-at-point)
|
||||
(global-set-key "\C-x4d" 'ffap-dired-other-window)
|
||||
(global-set-key "\C-x5d" 'ffap-dired-other-frame)
|
||||
(global-set-key "\C-x\C-d" 'ffap-list-directory)
|
||||
|
||||
(add-hook 'gnus-summary-mode-hook 'ffap-gnus-hook)
|
||||
(add-hook 'gnus-article-mode-hook 'ffap-gnus-hook)
|
||||
(add-hook 'vm-mode-hook 'ffap-ro-mode-hook)
|
||||
|
|
|
@ -337,21 +337,20 @@ in each directory, not to the directory list itself."
|
|||
Find is run in DIRECTORY."
|
||||
(interactive "DAdd files under directory: ")
|
||||
(let ((dir (expand-file-name directory)))
|
||||
(if (eq file-cache-find-command-posix-flag 'not-defined)
|
||||
(setq file-cache-find-command-posix-flag
|
||||
(executable-command-find-posix-p file-cache-find-command)))
|
||||
(when (memq system-type '(windows-nt cygwin))
|
||||
(if (eq file-cache-find-command-posix-flag 'not-defined)
|
||||
(setq file-cache-find-command-posix-flag
|
||||
(executable-command-find-posix-p file-cache-find-command))))
|
||||
(set-buffer (get-buffer-create file-cache-buffer))
|
||||
(erase-buffer)
|
||||
(call-process file-cache-find-command nil
|
||||
(get-buffer file-cache-buffer) nil
|
||||
dir "-name"
|
||||
(cond
|
||||
(file-cache-find-command-posix-flag
|
||||
"\\*")
|
||||
((eq system-type 'windows-nt)
|
||||
"'*'")
|
||||
(t
|
||||
"*"))
|
||||
(if (memq system-type '(windows-nt cygwin))
|
||||
(if file-cache-find-command-posix-flag
|
||||
"\\*"
|
||||
"'*'")
|
||||
"*")
|
||||
"-print")
|
||||
(file-cache-add-from-file-cache-buffer)))
|
||||
|
||||
|
|
|
@ -932,8 +932,7 @@ suppress wildcard expansion by setting `find-file-wildcards'.
|
|||
|
||||
To visit a file without any kind of conversion and without
|
||||
automatically choosing a major mode, use \\[find-file-literally]."
|
||||
(interactive
|
||||
(find-file-read-args "Find file: " nil))
|
||||
(interactive (find-file-read-args "Find file: " nil))
|
||||
(let ((value (find-file-noselect filename nil nil wildcards)))
|
||||
(if (listp value)
|
||||
(mapcar 'switch-to-buffer (nreverse value))
|
||||
|
@ -955,8 +954,8 @@ expand wildcards (if any) and visit multiple files."
|
|||
(if (listp value)
|
||||
(progn
|
||||
(setq value (nreverse value))
|
||||
(switch-to-buffer-other-window (car value))
|
||||
(mapcar 'switch-to-buffer (cdr value)))
|
||||
(cons (switch-to-buffer-other-window (car value))
|
||||
(mapcar 'switch-to-buffer (cdr value))))
|
||||
(switch-to-buffer-other-window value))))
|
||||
|
||||
(defun find-file-other-frame (filename &optional wildcards)
|
||||
|
@ -975,8 +974,8 @@ expand wildcards (if any) and visit multiple files."
|
|||
(if (listp value)
|
||||
(progn
|
||||
(setq value (nreverse value))
|
||||
(switch-to-buffer-other-frame (car value))
|
||||
(mapcar 'switch-to-buffer (cdr value)))
|
||||
(cons (switch-to-buffer-other-frame (car value))
|
||||
(mapcar 'switch-to-buffer (cdr value))))
|
||||
(switch-to-buffer-other-frame value))))
|
||||
|
||||
(defun find-file-existing (filename &optional wildcards)
|
||||
|
@ -991,35 +990,53 @@ Like \\[find-file] but only allow files that exists."
|
|||
"Edit file FILENAME but don't allow changes.
|
||||
Like \\[find-file] but marks buffer as read-only.
|
||||
Use \\[toggle-read-only] to permit editing."
|
||||
(interactive (find-file-read-args "Find file read-only: " t))
|
||||
(unless (file-exists-p filename) (error "%s does not exist" filename))
|
||||
(find-file filename wildcards)
|
||||
(toggle-read-only 1)
|
||||
(current-buffer))
|
||||
(interactive (find-file-read-args "Find file read-only: " nil))
|
||||
(unless (or (and wildcards find-file-wildcards
|
||||
(not (string-match "\\`/:" filename))
|
||||
(string-match "[[*?]" filename))
|
||||
(file-exists-p filename))
|
||||
(error "%s does not exist" filename))
|
||||
(let ((value (find-file filename wildcards)))
|
||||
(mapc (lambda (b) (with-current-buffer b (toggle-read-only 1)))
|
||||
(if (listp value) value (list value)))
|
||||
value))
|
||||
|
||||
(defun find-file-read-only-other-window (filename &optional wildcards)
|
||||
"Edit file FILENAME in another window but don't allow changes.
|
||||
Like \\[find-file-other-window] but marks buffer as read-only.
|
||||
Use \\[toggle-read-only] to permit editing."
|
||||
(interactive (find-file-read-args "Find file read-only other window: " t))
|
||||
(unless (file-exists-p filename) (error "%s does not exist" filename))
|
||||
(find-file-other-window filename wildcards)
|
||||
(toggle-read-only 1)
|
||||
(current-buffer))
|
||||
(interactive (find-file-read-args "Find file read-only other window: " nil))
|
||||
(unless (or (and wildcards find-file-wildcards
|
||||
(not (string-match "\\`/:" filename))
|
||||
(string-match "[[*?]" filename))
|
||||
(file-exists-p filename))
|
||||
(error "%s does not exist" filename))
|
||||
(let ((value (find-file-other-window filename wildcards)))
|
||||
(mapc (lambda (b) (with-current-buffer b (toggle-read-only 1)))
|
||||
(if (listp value) value (list value)))
|
||||
value))
|
||||
|
||||
(defun find-file-read-only-other-frame (filename &optional wildcards)
|
||||
"Edit file FILENAME in another frame but don't allow changes.
|
||||
Like \\[find-file-other-frame] but marks buffer as read-only.
|
||||
Use \\[toggle-read-only] to permit editing."
|
||||
(interactive (find-file-read-args "Find file read-only other frame: " t))
|
||||
(unless (file-exists-p filename) (error "%s does not exist" filename))
|
||||
(find-file-other-frame filename wildcards)
|
||||
(toggle-read-only 1)
|
||||
(current-buffer))
|
||||
(interactive (find-file-read-args "Find file read-only other frame: " nil))
|
||||
(unless (or (and wildcards find-file-wildcards
|
||||
(not (string-match "\\`/:" filename))
|
||||
(string-match "[[*?]" filename))
|
||||
(file-exists-p filename))
|
||||
(error "%s does not exist" filename))
|
||||
(let ((value (find-file-other-frame filename wildcards)))
|
||||
(mapc (lambda (b) (with-current-buffer b (toggle-read-only 1)))
|
||||
(if (listp value) value (list value)))
|
||||
value))
|
||||
|
||||
(defun find-alternate-file-other-window (filename)
|
||||
(defun find-alternate-file-other-window (filename &optional wildcards)
|
||||
"Find file FILENAME as a replacement for the file in the next window.
|
||||
This command does not select that window."
|
||||
This command does not select that window.
|
||||
|
||||
Interactively, or if WILDCARDS is non-nil in a call from Lisp,
|
||||
expand wildcards (if any) and replace the file with multiple files."
|
||||
(interactive
|
||||
(save-selected-window
|
||||
(other-window 1)
|
||||
|
@ -1030,17 +1047,21 @@ This command does not select that window."
|
|||
(setq file-name (file-name-nondirectory file)
|
||||
file-dir (file-name-directory file)))
|
||||
(list (read-file-name
|
||||
"Find alternate file: " file-dir nil nil file-name)))))
|
||||
"Find alternate file: " file-dir nil nil file-name)
|
||||
t))))
|
||||
(if (one-window-p)
|
||||
(find-file-other-window filename)
|
||||
(find-file-other-window filename wildcards)
|
||||
(save-selected-window
|
||||
(other-window 1)
|
||||
(find-alternate-file filename))))
|
||||
(find-alternate-file filename wildcards))))
|
||||
|
||||
(defun find-alternate-file (filename)
|
||||
(defun find-alternate-file (filename &optional wildcards)
|
||||
"Find file FILENAME, select its buffer, kill previous buffer.
|
||||
If the current buffer now contains an empty file that you just visited
|
||||
\(presumably by mistake), use this command to visit the file you really want."
|
||||
\(presumably by mistake), use this command to visit the file you really want.
|
||||
|
||||
Interactively, or if WILDCARDS is non-nil in a call from Lisp,
|
||||
expand wildcards (if any) and replace the file with multiple files."
|
||||
(interactive
|
||||
(let ((file buffer-file-name)
|
||||
(file-name nil)
|
||||
|
@ -1049,7 +1070,8 @@ If the current buffer now contains an empty file that you just visited
|
|||
(setq file-name (file-name-nondirectory file)
|
||||
file-dir (file-name-directory file)))
|
||||
(list (read-file-name
|
||||
"Find alternate file: " file-dir nil nil file-name))))
|
||||
"Find alternate file: " file-dir nil nil file-name)
|
||||
t)))
|
||||
(unless (run-hook-with-args-until-failure 'kill-buffer-query-functions)
|
||||
(error "Aborted"))
|
||||
(when (and (buffer-modified-p) (buffer-file-name))
|
||||
|
@ -1077,7 +1099,7 @@ If the current buffer now contains an empty file that you just visited
|
|||
(setq buffer-file-truename nil)
|
||||
;; Likewise for dired buffers.
|
||||
(setq dired-directory nil)
|
||||
(find-file filename))
|
||||
(find-file filename wildcards))
|
||||
(when (eq obuf (current-buffer))
|
||||
;; This executes if find-file gets an error
|
||||
;; and does not really find anything.
|
||||
|
@ -1247,8 +1269,8 @@ Optional first arg NOWARN non-nil means suppress any warning messages.
|
|||
Optional second arg RAWFILE non-nil means the file is read literally.
|
||||
Optional third arg WILDCARDS non-nil means do wildcard processing
|
||||
and visit all the matching files. When wildcards are actually
|
||||
used and expanded, the value is a list of buffers
|
||||
that are visiting the various files."
|
||||
used and expanded, return a list of buffers that are visiting
|
||||
the various files."
|
||||
(setq filename
|
||||
(abbreviate-file-name
|
||||
(expand-file-name filename)))
|
||||
|
@ -1757,6 +1779,7 @@ in that case, this function acts as if `enable-local-variables' were t."
|
|||
("\\.ses\\'" . ses-mode)
|
||||
("\\.\\(soa\\|zone\\)\\'" . dns-mode)
|
||||
("\\.docbook\\'" . sgml-mode)
|
||||
("\\.com\\'" . dcl-mode)
|
||||
("/config\\.\\(?:bat\\|log\\)\\'" . fundamental-mode)
|
||||
;; Windows candidates may be opened case sensitively on Unix
|
||||
("\\.\\(?:[iI][nN][iI]\\|[lL][sS][tT]\\|[rR][eE][gG]\\|[sS][yY][sS]\\)\\'" . conf-mode)
|
||||
|
|
|
@ -1,7 +1,22 @@
|
|||
2004-12-17 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
* gnus-group.el (gnus-group-mode-map): Map follow-link to mouse-face.
|
||||
|
||||
* gnus-sum.el (gnus-summary-mode-map): Likewise.
|
||||
|
||||
2004-12-08 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* gnus-art.el (gnus-narrow-to-page): Don't hardcode point-min.
|
||||
|
||||
2004-12-13 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* gnus-group.el (gnus-group-make-rss-group): Use
|
||||
gnus-group-make-group instead of gnus-group-unsubscribe-group.
|
||||
|
||||
* gnus-start.el (gnus-setup-news): Honor user's setting to
|
||||
gnus-message-archive-method. Suggested by Lute Kamstra
|
||||
<Lute.Kamstra@xs4all.nl>.
|
||||
|
||||
2004-12-02 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* message.el (message-forward-make-body-mml): Remove headers
|
||||
|
@ -896,7 +911,7 @@
|
|||
* gnus-delay.el (gnus-delay-default-hour): Add :version.
|
||||
|
||||
* gnus-cite.el (gnus-cite-blank-line-after-header)
|
||||
(gnus-article-boring-faces):
|
||||
(gnus-article-boring-faces):
|
||||
|
||||
* gnus-art.el (gnus-buttonized-mime-types)
|
||||
(gnus-inhibit-mime-unbuttonizing)
|
||||
|
|
|
@ -591,6 +591,7 @@ simple manner.")
|
|||
"\M-e" gnus-group-edit-group-method
|
||||
"^" gnus-group-enter-server-mode
|
||||
gnus-mouse-2 gnus-mouse-pick-group
|
||||
[follow-link] mouse-face
|
||||
"<" beginning-of-buffer
|
||||
">" end-of-buffer
|
||||
"\C-c\C-b" gnus-bug
|
||||
|
@ -2592,8 +2593,7 @@ If there is, use Gnus to create an nnrss group"
|
|||
(href (cdr (assoc 'href feedinfo))))
|
||||
(push (list title href desc)
|
||||
nnrss-group-alist)
|
||||
(gnus-group-unsubscribe-group
|
||||
(concat "nnrss:" title))
|
||||
(gnus-group-make-group title '(nnrss ""))
|
||||
(nnrss-save-server-data nil))
|
||||
(error "No feeds found for %s" url))))
|
||||
|
||||
|
|
|
@ -952,16 +952,28 @@ If LEVEL is non-nil, the news will be set up at level LEVEL."
|
|||
;; Make sure the archive server is available to all and sundry.
|
||||
(when gnus-message-archive-method
|
||||
(unless (assoc "archive" gnus-server-alist)
|
||||
(push `("archive"
|
||||
nnfolder
|
||||
"archive"
|
||||
(nnfolder-directory
|
||||
,(nnheader-concat message-directory "archive"))
|
||||
(nnfolder-active-file
|
||||
,(nnheader-concat message-directory "archive/active"))
|
||||
(nnfolder-get-new-mail nil)
|
||||
(nnfolder-inhibit-expiry t))
|
||||
gnus-server-alist)))
|
||||
(let ((method (or (and (stringp gnus-message-archive-method)
|
||||
(gnus-server-to-method
|
||||
gnus-message-archive-method))
|
||||
gnus-message-archive-method)))
|
||||
;; Check whether the archive method is writable.
|
||||
(unless (or (stringp method)
|
||||
(memq 'respool (assoc (format "%s" (car method))
|
||||
gnus-valid-select-methods)))
|
||||
(setq method "archive")) ;; The default.
|
||||
(push (if (stringp method)
|
||||
`("archive"
|
||||
nnfolder
|
||||
,method
|
||||
(nnfolder-directory
|
||||
,(nnheader-concat message-directory method))
|
||||
(nnfolder-active-file
|
||||
,(nnheader-concat message-directory
|
||||
(concat method "/active")))
|
||||
(nnfolder-get-new-mail nil)
|
||||
(nnfolder-inhibit-expiry t))
|
||||
(cons "archive" method))
|
||||
gnus-server-alist))))
|
||||
|
||||
;; If we don't read the complete active file, we fill in the
|
||||
;; hashtb here.
|
||||
|
|
|
@ -1703,6 +1703,7 @@ increase the score of each group you read."
|
|||
"Q" gnus-summary-exit-no-update
|
||||
"\C-c\C-i" gnus-info-find-node
|
||||
gnus-mouse-2 gnus-mouse-pick-article
|
||||
[follow-link] mouse-face
|
||||
"m" gnus-summary-mail-other-window
|
||||
"a" gnus-summary-post-news
|
||||
"i" gnus-summary-news-other-window
|
||||
|
@ -5096,7 +5097,7 @@ If SELECT-ARTICLES, only select those articles from GROUP."
|
|||
|
||||
(when gnus-agent
|
||||
(gnus-agent-possibly-alter-active group (gnus-active group) info)
|
||||
|
||||
|
||||
(setq gnus-summary-use-undownloaded-faces
|
||||
(gnus-agent-find-parameter
|
||||
group
|
||||
|
@ -7044,7 +7045,7 @@ If optional argument UNREAD is non-nil, only unread article is selected."
|
|||
(gnus-summary-goto-subject article t)))
|
||||
(gnus-summary-limit (append articles gnus-newsgroup-limit))
|
||||
(gnus-summary-position-point))
|
||||
|
||||
|
||||
(defun gnus-summary-goto-subject (article &optional force silent)
|
||||
"Go the subject line of ARTICLE.
|
||||
If FORCE, also allow jumping to articles not currently shown."
|
||||
|
@ -9140,7 +9141,7 @@ ACTION can be either `move' (the default), `crosspost' or `copy'."
|
|||
|
||||
;;;!!!Why is this necessary?
|
||||
(set-buffer gnus-summary-buffer)
|
||||
|
||||
|
||||
(gnus-summary-goto-subject article)
|
||||
(when (eq action 'move)
|
||||
(gnus-summary-mark-article article gnus-canceled-mark))))
|
||||
|
|
|
@ -478,8 +478,13 @@ Return 0 if there is no such symbol."
|
|||
(and (symbolp obj) (boundp obj) obj))))
|
||||
(error nil))
|
||||
(let* ((str (find-tag-default))
|
||||
(obj (if str (intern str))))
|
||||
(and (symbolp obj) (boundp obj) obj))
|
||||
(sym (if str (intern-soft str))))
|
||||
(if (and sym (boundp sym))
|
||||
sym
|
||||
(save-match-data
|
||||
(when (and str (string-match "\\`\\W*\\(.*?\\)\\W*\\'" str))
|
||||
(setq sym (intern-soft (match-string 1 str)))
|
||||
(and (boundp sym) sym)))))
|
||||
0))
|
||||
|
||||
;;;###autoload
|
||||
|
@ -564,6 +569,7 @@ it is displayed along with the global value."
|
|||
(insert " value is shown ")
|
||||
(insert-button "below"
|
||||
'action help-button-cache
|
||||
'follow-link t
|
||||
'help-echo "mouse-2, RET: show value")
|
||||
(insert ".\n\n")))
|
||||
;; Add a note for variables that have been make-var-buffer-local.
|
||||
|
|
|
@ -68,6 +68,7 @@ The format is (FUNCTION ARGS...).")
|
|||
;; Button types used by help
|
||||
|
||||
(define-button-type 'help-xref
|
||||
'follow-link t
|
||||
'action #'help-button-action)
|
||||
|
||||
(defun help-button-action (button)
|
||||
|
|
61
lisp/help.el
61
lisp/help.el
|
@ -267,8 +267,13 @@ If that doesn't give a function, return nil."
|
|||
(and (symbolp obj) (fboundp obj) obj))))
|
||||
(error nil))))
|
||||
(let* ((str (find-tag-default))
|
||||
(obj (if str (intern str))))
|
||||
(and (symbolp obj) (fboundp obj) obj))))
|
||||
(sym (if str (intern-soft str))))
|
||||
(if (and sym (fboundp sym))
|
||||
sym
|
||||
(save-match-data
|
||||
(when (and str (string-match "\\`\\W*\\(.*?\\)\\W*\\'" str))
|
||||
(setq sym (intern-soft (match-string 1 str)))
|
||||
(and (fboundp sym) sym)))))))
|
||||
|
||||
|
||||
;;; `User' help functions
|
||||
|
@ -609,17 +614,58 @@ the last key hit are used."
|
|||
(princ "\n which is ")
|
||||
(describe-function-1 defn)
|
||||
(when up-event
|
||||
(let ((defn (or (string-key-binding up-event) (key-binding up-event))))
|
||||
(let ((ev (aref up-event 0))
|
||||
(descr (key-description up-event))
|
||||
(hdr "\n\n-------------- up event ---------------\n\n")
|
||||
defn
|
||||
mouse-1-tricky mouse-1-remapped)
|
||||
(when (and (consp ev)
|
||||
(eq (car ev) 'mouse-1)
|
||||
(windowp window)
|
||||
mouse-1-click-follows-link
|
||||
(not (eq mouse-1-click-follows-link 'double))
|
||||
(with-current-buffer (window-buffer window)
|
||||
(mouse-on-link-p (posn-point (event-start ev)))))
|
||||
(setq mouse-1-tricky (integerp mouse-1-click-follows-link)
|
||||
mouse-1-remapped (or (not mouse-1-tricky)
|
||||
(> mouse-1-click-follows-link 0)))
|
||||
(if mouse-1-remapped
|
||||
(setcar ev 'mouse-2)))
|
||||
(setq defn (or (string-key-binding up-event) (key-binding up-event)))
|
||||
(unless (or (null defn) (integerp defn) (equal defn 'undefined))
|
||||
(princ "\n\n-------------- up event ---------------\n\n")
|
||||
(princ (key-description up-event))
|
||||
(princ (if mouse-1-tricky
|
||||
"\n\n----------------- up-event (short click) ----------------\n\n"
|
||||
hdr))
|
||||
(setq hdr nil)
|
||||
(princ descr)
|
||||
(if (windowp window)
|
||||
(princ " at that spot"))
|
||||
(if mouse-1-remapped
|
||||
(princ " is remapped to <mouse-2>\n which" ))
|
||||
(princ " runs the command ")
|
||||
(prin1 defn)
|
||||
(princ "\n which is ")
|
||||
(describe-function-1 defn))))
|
||||
(print-help-return-message)))))))
|
||||
(describe-function-1 defn))
|
||||
(when mouse-1-tricky
|
||||
(setcar ev
|
||||
(if (> mouse-1-click-follows-link 0) 'mouse-1 'mouse-2))
|
||||
(setq defn (or (string-key-binding up-event) (key-binding up-event)))
|
||||
(unless (or (null defn) (integerp defn) (equal defn 'undefined))
|
||||
(princ (or hdr
|
||||
"\n\n----------------- up-event (long click) ----------------\n\n"))
|
||||
(princ "Pressing ")
|
||||
(princ descr)
|
||||
(if (windowp window)
|
||||
(princ " at that spot"))
|
||||
(princ (format " for longer than %d milli-seconds\n"
|
||||
(abs mouse-1-click-follows-link)))
|
||||
(if (not mouse-1-remapped)
|
||||
(princ " remaps it to <mouse-2> which" ))
|
||||
(princ " runs the command ")
|
||||
(prin1 defn)
|
||||
(princ "\n which is ")
|
||||
(describe-function-1 defn))))
|
||||
(print-help-return-message))))))))
|
||||
|
||||
|
||||
(defun describe-mode (&optional buffer)
|
||||
|
@ -692,6 +738,7 @@ whose documentation describes the minor mode."
|
|||
(princ " ")
|
||||
(insert-button pretty-minor-mode
|
||||
'action (car help-button-cache)
|
||||
'follow-link t
|
||||
'help-echo "mouse-2, RET: show full information")
|
||||
(princ (format " minor mode (%s):\n"
|
||||
(if indicator
|
||||
|
|
|
@ -47,7 +47,7 @@ Automatically becomes buffer local when set in any fashion.")
|
|||
"Non-nil means pop up the Info buffer in another window."
|
||||
:group 'info-lookup :type 'boolean)
|
||||
|
||||
(defcustom info-lookup-highlight-face 'highlight
|
||||
(defcustom info-lookup-highlight-face 'match
|
||||
"Face for highlighting looked up help items.
|
||||
Setting this variable to nil disables highlighting."
|
||||
:group 'info-lookup :type 'face)
|
||||
|
|
|
@ -86,7 +86,7 @@ The Lisp code is executed when the node is selected.")
|
|||
:group 'info)
|
||||
|
||||
(defface info-xref-visited
|
||||
'((t :inherit info-xref)
|
||||
'((default :inherit info-xref)
|
||||
(((class color) (background light)) :foreground "magenta4")
|
||||
(((class color) (background dark)) :foreground "magenta3")) ;"violet"?
|
||||
"Face for visited Info cross-references."
|
||||
|
@ -2834,8 +2834,7 @@ if point is in a menu item description, follow that menu item."
|
|||
"Follow a node reference near point. Return non-nil if successful."
|
||||
(let (node)
|
||||
(cond
|
||||
((and (Info-get-token (point) "[hf]t?tp://" "[hf]t?tp://\\([^ \t\n\"`({<>})']+\\)")
|
||||
(or (featurep 'browse-url) (require 'browse-url nil t)))
|
||||
((Info-get-token (point) "[hf]t?tp://" "[hf]t?tp://\\([^ \t\n\"`({<>})']+\\)")
|
||||
(setq node t)
|
||||
(browse-url (browse-url-url-at-point)))
|
||||
((setq node (Info-get-token (point) "\\*note[ \n\t]+"
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
(defun isearch-process-search-multibyte-characters (last-char)
|
||||
(if (eq this-command 'isearch-printing-char)
|
||||
(let ((overriding-terminal-local-map nil)
|
||||
(prompt (concat (isearch-message-prefix) isearch-message))
|
||||
(prompt (concat (isearch-message-prefix)))
|
||||
(minibuffer-local-map isearch-minibuffer-local-map)
|
||||
str)
|
||||
(if isearch-input-method-function
|
||||
|
@ -107,11 +107,12 @@
|
|||
(cons 'with-input-method
|
||||
(cons last-char unread-command-events))
|
||||
;; Inherit current-input-method in a minibuffer.
|
||||
str (read-string prompt nil nil nil t))
|
||||
str (read-string prompt isearch-message nil nil t))
|
||||
(if (not str)
|
||||
;; All inputs were deleted while the input method
|
||||
;; was working.
|
||||
(setq str "")
|
||||
(setq str (substring str (length isearch-message)))
|
||||
(if (and (= (length str) 1)
|
||||
(= (aref str 0) last-char)
|
||||
(>= last-char 128))
|
||||
|
|
|
@ -1371,11 +1371,12 @@ Return the input string."
|
|||
(while quail-translating
|
||||
(set-buffer-modified-p modified-p)
|
||||
(quail-show-guidance)
|
||||
(let* ((keyseq (read-key-sequence
|
||||
(and input-method-use-echo-area
|
||||
(concat input-method-previous-message
|
||||
quail-current-str))
|
||||
nil nil t))
|
||||
(let* ((prompt (if input-method-use-echo-area
|
||||
(format "%s%s %s"
|
||||
(or input-method-previous-message "")
|
||||
quail-current-str
|
||||
quail-guidance-str)))
|
||||
(keyseq (read-key-sequence prompt nil nil t))
|
||||
(cmd (lookup-key (quail-translation-keymap) keyseq)))
|
||||
(if (if key
|
||||
(and (commandp cmd) (not (eq cmd 'quail-other-command)))
|
||||
|
@ -1436,12 +1437,13 @@ Return the input string."
|
|||
quail-translating t)
|
||||
(quail-setup-overlays nil)))
|
||||
(quail-show-guidance)
|
||||
(let* ((keyseq (read-key-sequence
|
||||
(and input-method-use-echo-area
|
||||
(concat input-method-previous-message
|
||||
quail-conversion-str
|
||||
quail-current-str))
|
||||
nil nil t))
|
||||
(let* ((prompt (if input-method-use-echo-area
|
||||
(format "%s%s%s %s"
|
||||
(or input-method-previous-message "")
|
||||
quail-conversion-str
|
||||
quail-current-str
|
||||
quail-guidance-str)))
|
||||
(keyseq (read-key-sequence prompt nil nil t))
|
||||
(cmd (lookup-key (quail-conversion-keymap) keyseq)))
|
||||
(if (if key (commandp cmd) (eq cmd 'quail-self-insert-command))
|
||||
(progn
|
||||
|
@ -1950,10 +1952,10 @@ minibuffer and the selected frame has no other windows)."
|
|||
|
||||
;; Then, show the guidance.
|
||||
(when (and (quail-require-guidance-buf)
|
||||
(not input-method-use-echo-area)
|
||||
(null unread-command-events)
|
||||
(null unread-post-input-method-events))
|
||||
(if (or (eq (selected-window) (minibuffer-window))
|
||||
input-method-use-echo-area)
|
||||
(if (eq (selected-window) (minibuffer-window))
|
||||
(if (eq (minibuffer-window) (frame-root-window))
|
||||
;; Use another frame. It is sure that we are using some
|
||||
;; window system.
|
||||
|
|
115
lisp/isearch.el
115
lisp/isearch.el
|
@ -229,7 +229,6 @@ Default value, nil, means edit the string instead."
|
|||
(while (< i 256)
|
||||
(define-key map (vector i) 'isearch-printing-char)
|
||||
(setq i (1+ i)))
|
||||
(define-key map (vector i) 'isearch-printing-char)
|
||||
|
||||
;; To handle local bindings with meta char prefix keys, define
|
||||
;; another full keymap. This must be done for any other prefix
|
||||
|
@ -654,7 +653,7 @@ is treated as a regexp. See \\[isearch-forward] for more info."
|
|||
(setq ;; quit-flag nil not for isearch-mode
|
||||
isearch-adjusted nil
|
||||
isearch-yank-flag nil)
|
||||
(isearch-lazy-highlight-new-loop)
|
||||
(if isearch-lazy-highlight (isearch-lazy-highlight-new-loop))
|
||||
;; We must prevent the point moving to the end of composition when a
|
||||
;; part of the composition has just been searched.
|
||||
(setq disable-point-adjustment t))
|
||||
|
@ -944,7 +943,7 @@ If first char entered is \\[isearch-yank-word-or-char], then do word search inst
|
|||
(isearch-message-prefix nil nil isearch-nonincremental)
|
||||
isearch-string
|
||||
minibuffer-local-isearch-map nil
|
||||
'junk-ring))
|
||||
'junk-ring nil t))
|
||||
isearch-new-message
|
||||
(mapconcat 'isearch-text-char-description
|
||||
isearch-new-string "")))
|
||||
|
@ -2334,8 +2333,7 @@ is nil. This function is called when exiting an incremental search if
|
|||
"Cleanup any previous `isearch-lazy-highlight' loop and begin a new one.
|
||||
This happens when `isearch-update' is invoked (which can cause the
|
||||
search string to change or the window to scroll)."
|
||||
(when (and isearch-lazy-highlight
|
||||
(null executing-kbd-macro)
|
||||
(when (and (null executing-kbd-macro)
|
||||
(sit-for 0) ;make sure (window-start) is credible
|
||||
(or (not (equal isearch-string
|
||||
isearch-lazy-highlight-last-string))
|
||||
|
@ -2387,59 +2385,64 @@ Attempt to do the search exactly the way the pending isearch would."
|
|||
(let ((max isearch-lazy-highlight-max-at-a-time)
|
||||
(looping t)
|
||||
nomore)
|
||||
(save-excursion
|
||||
(save-match-data
|
||||
(goto-char (if isearch-forward
|
||||
isearch-lazy-highlight-end
|
||||
isearch-lazy-highlight-start))
|
||||
(while looping
|
||||
(let ((found (isearch-lazy-highlight-search)))
|
||||
(when max
|
||||
(setq max (1- max))
|
||||
(if (<= max 0)
|
||||
(setq looping nil)))
|
||||
(if found
|
||||
(let ((mb (match-beginning 0))
|
||||
(me (match-end 0)))
|
||||
(if (= mb me) ;zero-length match
|
||||
(with-local-quit
|
||||
(save-selected-window
|
||||
(if (and (window-live-p isearch-lazy-highlight-window)
|
||||
(not (eq (selected-window) isearch-lazy-highlight-window)))
|
||||
(select-window isearch-lazy-highlight-window))
|
||||
(save-excursion
|
||||
(save-match-data
|
||||
(goto-char (if isearch-forward
|
||||
isearch-lazy-highlight-end
|
||||
isearch-lazy-highlight-start))
|
||||
(while looping
|
||||
(let ((found (isearch-lazy-highlight-search)))
|
||||
(when max
|
||||
(setq max (1- max))
|
||||
(if (<= max 0)
|
||||
(setq looping nil)))
|
||||
(if found
|
||||
(let ((mb (match-beginning 0))
|
||||
(me (match-end 0)))
|
||||
(if (= mb me) ;zero-length match
|
||||
(if isearch-forward
|
||||
(if (= mb (if isearch-lazy-highlight-wrapped
|
||||
isearch-lazy-highlight-start
|
||||
(window-end)))
|
||||
(setq found nil)
|
||||
(forward-char 1))
|
||||
(if (= mb (if isearch-lazy-highlight-wrapped
|
||||
isearch-lazy-highlight-end
|
||||
(window-start)))
|
||||
(setq found nil)
|
||||
(forward-char -1)))
|
||||
|
||||
;; non-zero-length match
|
||||
(let ((ov (make-overlay mb me)))
|
||||
(push ov isearch-lazy-highlight-overlays)
|
||||
(overlay-put ov 'face isearch-lazy-highlight-face)
|
||||
(overlay-put ov 'priority 0) ;lower than main overlay
|
||||
(overlay-put ov 'window (selected-window))))
|
||||
(if isearch-forward
|
||||
(if (= mb (if isearch-lazy-highlight-wrapped
|
||||
isearch-lazy-highlight-start
|
||||
(window-end)))
|
||||
(setq found nil)
|
||||
(forward-char 1))
|
||||
(if (= mb (if isearch-lazy-highlight-wrapped
|
||||
isearch-lazy-highlight-end
|
||||
(window-start)))
|
||||
(setq found nil)
|
||||
(forward-char -1)))
|
||||
(setq isearch-lazy-highlight-end (point))
|
||||
(setq isearch-lazy-highlight-start (point)))))
|
||||
|
||||
;; non-zero-length match
|
||||
(let ((ov (make-overlay mb me)))
|
||||
(overlay-put ov 'face isearch-lazy-highlight-face)
|
||||
(overlay-put ov 'priority 0) ;lower than main overlay
|
||||
(overlay-put ov 'window (selected-window))
|
||||
(push ov isearch-lazy-highlight-overlays)))
|
||||
(if isearch-forward
|
||||
(setq isearch-lazy-highlight-end (point))
|
||||
(setq isearch-lazy-highlight-start (point)))))
|
||||
|
||||
;; not found or zero-length match at the search bound
|
||||
(if (not found)
|
||||
(if isearch-lazy-highlight-wrapped
|
||||
(setq looping nil
|
||||
nomore t)
|
||||
(setq isearch-lazy-highlight-wrapped t)
|
||||
(if isearch-forward
|
||||
(progn
|
||||
(setq isearch-lazy-highlight-end (window-start))
|
||||
(goto-char (window-start)))
|
||||
(setq isearch-lazy-highlight-start (window-end))
|
||||
(goto-char (window-end)))))))
|
||||
(unless nomore
|
||||
(setq isearch-lazy-highlight-timer
|
||||
(run-at-time isearch-lazy-highlight-interval nil
|
||||
'isearch-lazy-highlight-update)))))))
|
||||
;; not found or zero-length match at the search bound
|
||||
(if (not found)
|
||||
(if isearch-lazy-highlight-wrapped
|
||||
(setq looping nil
|
||||
nomore t)
|
||||
(setq isearch-lazy-highlight-wrapped t)
|
||||
(if isearch-forward
|
||||
(progn
|
||||
(setq isearch-lazy-highlight-end (window-start))
|
||||
(goto-char (window-start)))
|
||||
(setq isearch-lazy-highlight-start (window-end))
|
||||
(goto-char (window-end)))))))
|
||||
(unless nomore
|
||||
(setq isearch-lazy-highlight-timer
|
||||
(run-at-time isearch-lazy-highlight-interval nil
|
||||
'isearch-lazy-highlight-update)))))))))
|
||||
|
||||
(defun isearch-resume (search regexp word forward message case-fold)
|
||||
"Resume an incremental search.
|
||||
|
|
|
@ -146,8 +146,9 @@ Each element of this list has the following form:
|
|||
(...)))
|
||||
|
||||
Where INFOKEY is a key for `sc-mail-field', REGEXP is a regular
|
||||
expression to match against the INFOKEY's value. FRAME is a citation
|
||||
frame, or a variable containing a citation frame."
|
||||
expression to match against the INFOKEY's value. FRAME is
|
||||
a citation frame, or a symbol that represents the name of
|
||||
a variable whose value is a citation frame."
|
||||
:type '(repeat (list symbol (repeat (cons regexp
|
||||
(choice (repeat (repeat sexp))
|
||||
symbol)))))
|
||||
|
@ -1434,12 +1435,11 @@ When called interactively, the optional arg INTERACTIVE is non-nil,
|
|||
and that means call `sc-select-attribution' too."
|
||||
(interactive "r\nP\np")
|
||||
(undo-boundary)
|
||||
(let ((frame (or (sc-scan-info-alist
|
||||
(if (symbolp sc-cite-frame-alist)
|
||||
(symbol-value sc-cite-frame-alist)
|
||||
sc-cite-frame-alist))
|
||||
sc-default-cite-frame))
|
||||
(let ((frame (sc-scan-info-alist sc-cite-frame-alist))
|
||||
(sc-confirm-always-p (if confirm-p t sc-confirm-always-p)))
|
||||
(if (and frame (symbolp frame))
|
||||
(setq frame (symbol-value frame)))
|
||||
(or frame (setq frame sc-default-cite-frame))
|
||||
(run-hooks 'sc-pre-cite-hook)
|
||||
(if interactive
|
||||
(sc-select-attribution))
|
||||
|
@ -1450,11 +1450,10 @@ and that means call `sc-select-attribution' too."
|
|||
First runs `sc-pre-uncite-hook'."
|
||||
(interactive "r")
|
||||
(undo-boundary)
|
||||
(let ((frame (or (sc-scan-info-alist
|
||||
(if (symbolp sc-uncite-frame-alist)
|
||||
(symbol-value sc-uncite-frame-alist)
|
||||
sc-uncite-frame-alist))
|
||||
sc-default-uncite-frame)))
|
||||
(let ((frame (sc-scan-info-alist sc-uncite-frame-alist)))
|
||||
(if (and frame (symbolp frame))
|
||||
(setq frame (symbol-value frame)))
|
||||
(or frame (setq frame sc-default-uncite-frame))
|
||||
(run-hooks 'sc-pre-uncite-hook)
|
||||
(regi-interpret frame start end)))
|
||||
|
||||
|
@ -1465,11 +1464,10 @@ First runs `sc-pre-recite-hook'."
|
|||
(let ((sc-confirm-always-p t))
|
||||
(sc-select-attribution))
|
||||
(undo-boundary)
|
||||
(let ((frame (or (sc-scan-info-alist
|
||||
(if (symbolp sc-recite-frame-alist)
|
||||
(symbol-value sc-recite-frame-alist)
|
||||
sc-recite-frame-alist))
|
||||
sc-default-recite-frame)))
|
||||
(let ((frame (sc-scan-info-alist sc-recite-frame-alist)))
|
||||
(if (and frame (symbolp frame))
|
||||
(setq frame (symbol-value frame)))
|
||||
(or frame (setq frame sc-default-recite-frame))
|
||||
(run-hooks 'sc-pre-recite-hook)
|
||||
(regi-interpret frame start end)))
|
||||
|
||||
|
|
108
lisp/mouse.el
108
lisp/mouse.el
|
@ -49,6 +49,39 @@
|
|||
:version "21.4"
|
||||
:group 'mouse)
|
||||
|
||||
(defcustom mouse-1-click-follows-link 350
|
||||
"Non-nil means that clicking Mouse-1 on a link follows the link.
|
||||
|
||||
With the default setting, an ordinary Mouse-1 click on a link
|
||||
performs the same action as Mouse-2 on that link, while a longer
|
||||
Mouse-1 click \(hold down the Mouse-1 button for more than 350
|
||||
milliseconds) performs the original Mouse-1 binding \(which
|
||||
typically sets point where you click the mouse).
|
||||
|
||||
If value is an integer, the time elapsed between pressing and
|
||||
releasing the mouse button determines whether to follow the link
|
||||
or perform the normal Mouse-1 action (typically set point).
|
||||
The absolute numeric value specifices the maximum duration of a
|
||||
\"short click\" in milliseconds. A positive value means that a
|
||||
short click follows the link, and a longer click performs the
|
||||
normal action. A negative value gives the opposite behaviour.
|
||||
|
||||
If value is `double', a double click follows the link.
|
||||
|
||||
Otherwise, a single Mouse-1 click unconditionally follows the link.
|
||||
|
||||
Note that dragging the mouse never follows the link.
|
||||
|
||||
This feature only works in modes that specifically identify
|
||||
clickable text as links, so it may not work with some external
|
||||
packages. See `mouse-on-link-p' for details."
|
||||
:version "21.4"
|
||||
:type '(choice (const :tag "Disabled" nil)
|
||||
(const :tag "Double click" double)
|
||||
(number :tag "Single click time limit" :value 350)
|
||||
(other :tag "Single click" t))
|
||||
:group 'mouse)
|
||||
|
||||
|
||||
;; Provide a mode-specific menu on a mouse button.
|
||||
|
||||
|
@ -733,6 +766,51 @@ If the click is in the echo area, display the `*Messages*' buffer."
|
|||
(run-hooks 'mouse-leave-buffer-hook)
|
||||
(mouse-drag-region-1 start-event))))
|
||||
|
||||
|
||||
(defun mouse-on-link-p (pos)
|
||||
"Return non-nil if POS is on a link in the current buffer.
|
||||
|
||||
A clickable link is identified by one of the following methods:
|
||||
|
||||
1) If the character at POS has a non-nil `follow-link' text or
|
||||
overlay property, the value of that property is returned.
|
||||
|
||||
2) If there is a local key-binding or a keybinding at position
|
||||
POS for the `follow-link' event, the binding of that event
|
||||
determines whether POS is inside a link:
|
||||
|
||||
- If the binding is `mouse-face', POS is inside a link if there
|
||||
is a non-nil `mouse-face' property at POS. Return t in this case.
|
||||
|
||||
- If the binding is a function, FUNC, POS is inside a link if
|
||||
the call \(FUNC POS) returns non-nil. Return the return value
|
||||
from that call.
|
||||
|
||||
- Otherwise, return the binding of the `follow-link' binding.
|
||||
|
||||
The return value is interpreted as follows:
|
||||
|
||||
- If it is a string, the mouse-1 event is translated into the
|
||||
first character of the string, i.e. the action of the mouse-1
|
||||
click is the local or global binding of that character.
|
||||
|
||||
- If it is a vector, the mouse-1 event is translated into the
|
||||
first element of that vector, i.e. the action of the mouse-1
|
||||
click is the local or global binding of that event.
|
||||
|
||||
- Otherwise, the mouse-1 event is translated into a mouse-2 event
|
||||
at the same position."
|
||||
(or (get-char-property pos 'follow-link)
|
||||
(save-excursion
|
||||
(goto-char pos)
|
||||
(let ((b (key-binding [follow-link] nil t)))
|
||||
(cond
|
||||
((eq b 'mouse-face)
|
||||
(and (get-char-property pos 'mouse-face) t))
|
||||
((functionp b)
|
||||
(funcall b pos))
|
||||
(t b))))))
|
||||
|
||||
(defun mouse-drag-region-1 (start-event)
|
||||
(mouse-minibuffer-check start-event)
|
||||
(let* ((echo-keystrokes 0)
|
||||
|
@ -749,6 +827,7 @@ If the click is in the echo area, display the `*Messages*' buffer."
|
|||
(nth 3 bounds)
|
||||
;; Don't count the mode line.
|
||||
(1- (nth 3 bounds))))
|
||||
on-link remap-double-click
|
||||
(click-count (1- (event-click-count start-event))))
|
||||
(setq mouse-selection-click-count click-count)
|
||||
(setq mouse-selection-click-count-buffer (current-buffer))
|
||||
|
@ -758,6 +837,13 @@ If the click is in the echo area, display the `*Messages*' buffer."
|
|||
(if (< (point) start-point)
|
||||
(goto-char start-point))
|
||||
(setq start-point (point))
|
||||
(setq on-link (and mouse-1-click-follows-link
|
||||
(mouse-on-link-p start-point)))
|
||||
(setq remap-double-click (and on-link
|
||||
(eq mouse-1-click-follows-link 'double)
|
||||
(= click-count 1)))
|
||||
(if remap-double-click ;; Don't expand mouse overlay in links
|
||||
(setq click-count 0))
|
||||
(let ((range (mouse-start-end start-point start-point click-count)))
|
||||
(move-overlay mouse-drag-overlay (car range) (nth 1 range)
|
||||
(window-buffer start-window))
|
||||
|
@ -880,6 +966,28 @@ If the click is in the echo area, display the `*Messages*' buffer."
|
|||
(or end-point
|
||||
(= (window-start start-window)
|
||||
start-window-start)))
|
||||
(if (and on-link
|
||||
(not end-point)
|
||||
(consp event)
|
||||
(or remap-double-click
|
||||
(and
|
||||
(not (eq mouse-1-click-follows-link 'double))
|
||||
(= click-count 0)
|
||||
(= (event-click-count event) 1)
|
||||
(not (input-pending-p))
|
||||
(or (not (integerp mouse-1-click-follows-link))
|
||||
(let ((t0 (posn-timestamp (event-start start-event)))
|
||||
(t1 (posn-timestamp (event-end event))))
|
||||
(and (integerp t0) (integerp t1)
|
||||
(if (> mouse-1-click-follows-link 0)
|
||||
(<= (- t1 t0) mouse-1-click-follows-link)
|
||||
(< (- t0 t1) mouse-1-click-follows-link)))))
|
||||
(or (not double-click-time)
|
||||
(sit-for 0 (if (integerp double-click-time)
|
||||
double-click-time 500) t)))))
|
||||
(if (or (vectorp on-link) (stringp on-link))
|
||||
(setq event (aref on-link 0))
|
||||
(setcar event 'mouse-2)))
|
||||
(setq unread-command-events
|
||||
(cons event unread-command-events)))))
|
||||
(delete-overlay mouse-drag-overlay)))))
|
||||
|
|
|
@ -575,6 +575,7 @@ down (this *won't* always work)."
|
|||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; URL input
|
||||
|
||||
;;;###autoload
|
||||
(defun browse-url-url-at-point ()
|
||||
(let ((url (thing-at-point 'url)))
|
||||
(set-text-properties 0 (length url) nil url)
|
||||
|
|
|
@ -1105,9 +1105,11 @@ Return the difference in the format of a time value."
|
|||
;; Do `PC-do-completion' without substitution
|
||||
(let* (save)
|
||||
(fset 'save (symbol-function 'substitute-in-file-name))
|
||||
(fset 'substitute-in-file-name (symbol-function 'identity))
|
||||
ad-do-it
|
||||
(fset 'substitute-in-file-name (symbol-function 'save)))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(fset 'substitute-in-file-name (symbol-function 'identity))
|
||||
ad-do-it)
|
||||
(fset 'substitute-in-file-name (symbol-function 'save))))
|
||||
|
||||
;; Expand "$"
|
||||
(let* ((beg (or (and (functionp 'minibuffer-prompt-end) ; Emacs 21
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
;;
|
||||
;; Notes:
|
||||
;; -----
|
||||
;;
|
||||
;;
|
||||
;; This package only works for Emacs 20 and higher, and for XEmacs 21
|
||||
;; and higher. (XEmacs 20 is missing the `with-timeout' macro. Emacs
|
||||
;; 19 is reported to have other problems. For XEmacs 21, you need the
|
||||
|
@ -205,7 +205,7 @@ file name, the backup directory is prepended with Tramp file name prefix
|
|||
|
||||
gives the same backup policy for Tramp files on their hosts like the
|
||||
policy for local files."
|
||||
:type '(repeat
|
||||
:type '(repeat
|
||||
(list (regexp :tag "File regexp")
|
||||
(string :tag "Backup Dir")
|
||||
(set :inline t
|
||||
|
@ -506,7 +506,7 @@ This variable defaults to the value of `tramp-encoding-shell'."
|
|||
(tramp-copy-args nil)
|
||||
(tramp-copy-keep-date-arg "-p")
|
||||
(tramp-password-end-of-line "xy")) ;see docstring for "xy"
|
||||
("fcp"
|
||||
("fcp"
|
||||
(tramp-connection-function tramp-open-connection-rsh)
|
||||
(tramp-login-program "fsh")
|
||||
(tramp-copy-program "fcp")
|
||||
|
@ -633,7 +633,7 @@ variable `tramp-methods'."
|
|||
("rsh" tramp-multi-connect-rlogin "rsh %h -l %u%n")
|
||||
("remsh" tramp-multi-connect-rlogin "remsh %h -l %u%n")
|
||||
("ssh" tramp-multi-connect-rlogin "ssh %h -l %u%n")
|
||||
("ssht" tramp-multi-connect-rlogin "ssh %h -e none -t -t -l %u%n")
|
||||
("ssht" tramp-multi-connect-rlogin "ssh %h -e none -t -t -l %u%n")
|
||||
("su" tramp-multi-connect-su "su - %u%n")
|
||||
("sudo" tramp-multi-connect-su "sudo -u %u -s -p Password:%n"))
|
||||
"*List of connection functions for multi-hop methods.
|
||||
|
@ -777,7 +777,7 @@ the info pages.")
|
|||
"sudo" tramp-completion-function-alist-su)
|
||||
(tramp-set-completion-function
|
||||
"multi" nil)
|
||||
(tramp-set-completion-function
|
||||
(tramp-set-completion-function
|
||||
"scpx" tramp-completion-function-alist-ssh)
|
||||
(tramp-set-completion-function
|
||||
"sshx" tramp-completion-function-alist-ssh)
|
||||
|
@ -1536,9 +1536,9 @@ cat /tmp/tramp.$$
|
|||
rm -f /tmp/tramp.$$
|
||||
}"
|
||||
"Shell function to implement `uudecode' to standard output.
|
||||
Many systems support `uudecode -o /dev/stdout' for this or
|
||||
`uudecode -o -' or `uudecode -p', but some systems don't, and for
|
||||
them we have this shell function.")
|
||||
Many systems support `uudecode -o /dev/stdout' or `uudecode -o -'
|
||||
for this or `uudecode -p', but some systems don't, and for them
|
||||
we have this shell function.")
|
||||
|
||||
;; Perl script to implement `file-attributes' in a Lisp `read'able
|
||||
;; output. If you are hacking on this, note that you get *no* output
|
||||
|
@ -1960,10 +1960,9 @@ If VAR is nil, then we bind `v' to the structure and `multi-method',
|
|||
(put 'with-parsed-tramp-file-name 'lisp-indent-function 2)
|
||||
;; To be activated for debugging containing this macro
|
||||
;; It works only when VAR is nil. Otherwise, it can be deactivated by
|
||||
;; (def-edebug-spec with-parsed-tramp-file-name 0)
|
||||
;; (put 'with-parsed-tramp-file-name 'edebug-form-spec 0)
|
||||
;; I'm too stupid to write a precise SPEC for it.
|
||||
(if (functionp 'def-edebug-spec)
|
||||
(def-edebug-spec with-parsed-tramp-file-name t))
|
||||
(put 'with-parsed-tramp-file-name 'edebug-form-spec t)
|
||||
|
||||
(defmacro tramp-let-maybe (variable value &rest body)
|
||||
"Let-bind VARIABLE to VALUE in BODY, but only if VARIABLE is not obsolete.
|
||||
|
@ -2056,7 +2055,7 @@ target of the symlink differ."
|
|||
(setq filename (tramp-file-name-localname
|
||||
(tramp-dissect-file-name
|
||||
(expand-file-name filename)))))
|
||||
|
||||
|
||||
;; Right, they are on the same host, regardless of user, method, etc.
|
||||
;; We now make the link on the remote machine. This will occur as the user
|
||||
;; that FILENAME belongs to.
|
||||
|
@ -2065,7 +2064,7 @@ target of the symlink differ."
|
|||
l-multi-method l-method l-user l-host
|
||||
(format "cd %s && %s -sf %s %s"
|
||||
cwd ln
|
||||
filename
|
||||
filename
|
||||
l-localname)
|
||||
t)))))
|
||||
|
||||
|
@ -2347,9 +2346,9 @@ target of the symlink differ."
|
|||
"file attributes with perl: %s"
|
||||
(tramp-make-tramp-file-name
|
||||
multi-method method user host localname))
|
||||
(tramp-maybe-send-perl-script tramp-perl-file-attributes
|
||||
"tramp_file_attributes"
|
||||
multi-method method user host)
|
||||
(tramp-maybe-send-perl-script multi-method method user host
|
||||
tramp-perl-file-attributes
|
||||
"tramp_file_attributes")
|
||||
(tramp-send-command multi-method method user host
|
||||
(format "tramp_file_attributes %s %s"
|
||||
(tramp-shell-quote-argument localname) id-format))
|
||||
|
@ -2394,7 +2393,12 @@ target of the symlink differ."
|
|||
;; This function makes the same assumption as
|
||||
;; `tramp-handle-set-visited-file-modtime'.
|
||||
(defun tramp-handle-verify-visited-file-modtime (buf)
|
||||
"Like `verify-visited-file-modtime' for tramp files."
|
||||
"Like `verify-visited-file-modtime' for tramp files.
|
||||
At the time `verify-visited-file-modtime' calls this function, we
|
||||
already know that the buffer is visiting a file and that
|
||||
`visited-file-modtime' does not return 0. Do not call this
|
||||
function directly, unless those two cases are already taken care
|
||||
of."
|
||||
(with-current-buffer buf
|
||||
;; There is no file visiting the buffer, or the buffer has no
|
||||
;; recorded last modification time.
|
||||
|
@ -2406,7 +2410,7 @@ target of the symlink differ."
|
|||
(let* ((attr (file-attributes f))
|
||||
(modtime (nth 5 attr))
|
||||
(mt (visited-file-modtime)))
|
||||
|
||||
|
||||
(cond
|
||||
;; file exists, and has a known modtime.
|
||||
((and attr (not (equal modtime '(0 0))))
|
||||
|
@ -2689,9 +2693,9 @@ if the remote host can't provide the modtime."
|
|||
(save-excursion
|
||||
(setq directory (tramp-handle-expand-file-name directory))
|
||||
(with-parsed-tramp-file-name directory nil
|
||||
(tramp-maybe-send-perl-script tramp-perl-directory-files-and-attributes
|
||||
"tramp_directory_files_and_attributes"
|
||||
multi-method method user host)
|
||||
(tramp-maybe-send-perl-script multi-method method user host
|
||||
tramp-perl-directory-files-and-attributes
|
||||
"tramp_directory_files_and_attributes")
|
||||
(tramp-send-command multi-method method user host
|
||||
(format "tramp_directory_files_and_attributes %s %s"
|
||||
(tramp-shell-quote-argument localname)
|
||||
|
@ -2753,7 +2757,7 @@ if the remote host can't provide the modtime."
|
|||
(push (buffer-substring (point)
|
||||
(tramp-line-end-position))
|
||||
result))
|
||||
|
||||
|
||||
(tramp-send-command multi-method method user host "cd")
|
||||
(tramp-wait-for-output)
|
||||
|
||||
|
@ -3096,6 +3100,12 @@ be a local filename. The method used must be an out-of-band method."
|
|||
|
||||
;; Use an asynchronous process. By this, password can be handled.
|
||||
(save-excursion
|
||||
|
||||
;; Check for program.
|
||||
(when (and (fboundp 'executable-find)
|
||||
(not (executable-find copy-program)))
|
||||
(error "Cannot find copy program: %s" copy-program))
|
||||
|
||||
(set-buffer trampbuf)
|
||||
(setq tramp-current-multi-method multi-method
|
||||
tramp-current-method method
|
||||
|
@ -3170,15 +3180,15 @@ This is like `dired-recursive-delete-directory' for tramp files."
|
|||
'file-error
|
||||
(list "Removing old file name" "no such directory" filename)))
|
||||
;; Which is better, -r or -R? (-r works for me <daniel@danann.net>)
|
||||
(tramp-send-command multi-method method user host
|
||||
(tramp-send-command multi-method method user host
|
||||
(format "rm -r %s" (tramp-shell-quote-argument localname)))
|
||||
;; Wait for the remote system to return to us...
|
||||
;; This might take a while, allow it plenty of time.
|
||||
(tramp-wait-for-output 120)
|
||||
;; Make sure that it worked...
|
||||
(and (file-exists-p filename)
|
||||
(error "Failed to recusively delete %s" filename))))
|
||||
|
||||
(error "Failed to recursively delete %s" filename))))
|
||||
|
||||
(defun tramp-handle-dired-call-process (program discard &rest arguments)
|
||||
"Like `dired-call-process' for tramp files."
|
||||
(with-parsed-tramp-file-name default-directory nil
|
||||
|
@ -3200,7 +3210,7 @@ This is like `dired-recursive-delete-directory' for tramp files."
|
|||
(tramp-send-command-and-check multi-method method user host nil)
|
||||
(tramp-send-command multi-method method user host "cd")
|
||||
(tramp-wait-for-output)))))
|
||||
|
||||
|
||||
(defun tramp-handle-dired-compress-file (file &rest ok-flag)
|
||||
"Like `dired-compress-file' for tramp files."
|
||||
;; OK-FLAG is valid for XEmacs only, but not implemented.
|
||||
|
@ -3568,7 +3578,7 @@ This will break if COMMAND prints a newline, followed by the value of
|
|||
(when (and (numberp buffer) (zerop buffer))
|
||||
(error "Implementation does not handle immediate return"))
|
||||
(when (consp buffer) (error "Implementation does not handle error files"))
|
||||
(shell-command
|
||||
(shell-command
|
||||
(mapconcat 'tramp-shell-quote-argument
|
||||
(cons program args)
|
||||
" ")
|
||||
|
@ -4250,7 +4260,7 @@ necessary anymore."
|
|||
;; `tramp-completion-file-name-regexp-unified' aren't different.
|
||||
;; If nil, `tramp-completion-run-real-handler' is called (i.e. forwarding to
|
||||
;; `tramp-file-name-handler'). Otherwise, it takes `tramp-run-real-handler'.
|
||||
;; Using `last-input-event' is a little bit risky, because completing a file
|
||||
;; Using `last-input-event' is a little bit risky, because completing a file
|
||||
;; might require loading other files, like "~/.netrc", and for them it
|
||||
;; shouldn't be decided based on that variable. On the other hand, those files
|
||||
;; shouldn't have partial tramp file name syntax. Maybe another variable should
|
||||
|
@ -4354,7 +4364,7 @@ necessary anymore."
|
|||
(funcall (nth 0 x) (nth 1 x)))))
|
||||
(tramp-get-completion-function m))
|
||||
|
||||
(setq result (append result
|
||||
(setq result (append result
|
||||
(mapcar
|
||||
(lambda (x)
|
||||
(tramp-get-completion-user-host
|
||||
|
@ -4395,7 +4405,7 @@ necessary anymore."
|
|||
;; [nil nil "x" nil nil]
|
||||
;; [nil "x" nil nil nil]
|
||||
|
||||
;; "/x:" "/x:y" "/x:y:"
|
||||
;; "/x:" "/x:y" "/x:y:"
|
||||
;; [nil nil nil "x" ""] [nil nil nil "x" "y"] [nil "x" nil "y" ""]
|
||||
;; "/[x/" "/[x/y"
|
||||
;; [nil "x" nil "" nil] [nil "x" nil "y" nil]
|
||||
|
@ -4769,7 +4779,7 @@ User may be nil."
|
|||
|
||||
;;; Internal Functions:
|
||||
|
||||
(defun tramp-maybe-send-perl-script (script name multi-method method user host)
|
||||
(defun tramp-maybe-send-perl-script (multi-method method user host script name)
|
||||
"Define in remote shell function NAME implemented as perl SCRIPT.
|
||||
Only send the definition if it has not already been done.
|
||||
Function may have 0-3 parameters."
|
||||
|
@ -4864,7 +4874,7 @@ TIME is an Emacs internal time value as returned by `current-time'."
|
|||
"touch" nil (current-buffer) nil "-t" touch-time file))
|
||||
(pop-to-buffer (current-buffer))
|
||||
(error "tramp-touch: touch failed"))))))
|
||||
|
||||
|
||||
(defun tramp-buffer-name (multi-method method user host)
|
||||
"A name for the connection buffer for USER at HOST using METHOD."
|
||||
(if multi-method
|
||||
|
@ -5022,7 +5032,7 @@ file exists and nonzero exit status otherwise."
|
|||
(file-exists-p existing)
|
||||
(not (file-exists-p nonexisting))))
|
||||
(error "Couldn't find command to check if file exists."))))
|
||||
|
||||
|
||||
|
||||
;; CCC test ksh or bash found for tilde expansion?
|
||||
(defun tramp-find-shell (multi-method method user host)
|
||||
|
@ -5121,9 +5131,9 @@ Returns nil if none was found, else the command is returned."
|
|||
(tramp-check-ls-commands multi-method method user host "gnuls" tramp-remote-path)
|
||||
(tramp-check-ls-commands multi-method method user host "gls" tramp-remote-path)))
|
||||
|
||||
;; ------------------------------------------------------------
|
||||
;; -- Functions for establishing connection --
|
||||
;; ------------------------------------------------------------
|
||||
;; ------------------------------------------------------------
|
||||
;; -- Functions for establishing connection --
|
||||
;; ------------------------------------------------------------
|
||||
|
||||
;; The following functions are actions to be taken when seeing certain
|
||||
;; prompts from the remote host. See the variable
|
||||
|
@ -5364,7 +5374,7 @@ Maybe the different regular expressions need to be tuned.
|
|||
(when multi-method
|
||||
(error "Cannot multi-connect using telnet connection method"))
|
||||
(tramp-pre-connection multi-method method user host)
|
||||
(tramp-message 7 "Opening connection for %s@%s using %s..."
|
||||
(tramp-message 7 "Opening connection for %s@%s using %s..."
|
||||
(or user (user-login-name)) host method)
|
||||
(let ((process-environment (copy-sequence process-environment)))
|
||||
(setenv "TERM" tramp-terminal-type)
|
||||
|
@ -5398,7 +5408,7 @@ Maybe the different regular expressions need to be tuned.
|
|||
p multi-method method user host)
|
||||
(tramp-post-connection multi-method method user host)))))
|
||||
|
||||
|
||||
|
||||
(defun tramp-open-connection-rsh (multi-method method user host)
|
||||
"Open a connection using an rsh METHOD.
|
||||
This starts the command `rsh HOST -l USER'[*], then waits for a remote
|
||||
|
@ -5423,7 +5433,7 @@ arguments, and xx will be used as the host name to connect to.
|
|||
(error "Cannot multi-connect using rsh connection method"))
|
||||
(tramp-pre-connection multi-method method user host)
|
||||
(if (and user (not (string= user "")))
|
||||
(tramp-message 7 "Opening connection for %s@%s using %s..."
|
||||
(tramp-message 7 "Opening connection for %s@%s using %s..."
|
||||
user host method)
|
||||
(tramp-message 7 "Opening connection at %s using %s..." host method))
|
||||
(let ((process-environment (copy-sequence process-environment))
|
||||
|
@ -5452,9 +5462,9 @@ arguments, and xx will be used as the host name to connect to.
|
|||
(> emacs-major-version 20))
|
||||
tramp-dos-coding-system))
|
||||
(p (if (and user (not (string= user "")))
|
||||
(apply #'start-process bufnam buf login-program
|
||||
(apply #'start-process bufnam buf login-program
|
||||
real-host "-l" user login-args)
|
||||
(apply #'start-process bufnam buf login-program
|
||||
(apply #'start-process bufnam buf login-program
|
||||
real-host login-args)))
|
||||
(found nil))
|
||||
(tramp-set-process-query-on-exit-flag p nil)
|
||||
|
@ -5524,10 +5534,10 @@ prompt than you do, so it is not at all unlikely that the variable
|
|||
tramp-actions-before-shell)
|
||||
(tramp-open-connection-setup-interactive-shell
|
||||
p multi-method method user host)
|
||||
(tramp-post-connection multi-method method
|
||||
(tramp-post-connection multi-method method
|
||||
user host)))))
|
||||
|
||||
;; HHH: Not Changed. Multi method. It is not clear to me how this can
|
||||
;; HHH: Not Changed. Multi method. It is not clear to me how this can
|
||||
;; handle not giving a user name in the "file name".
|
||||
;;
|
||||
;; This is more difficult than for the single-hop method. In the
|
||||
|
@ -5597,7 +5607,7 @@ log in as u2 to h2."
|
|||
(tramp-post-connection multi-method method user host)))))
|
||||
|
||||
;; HHH: Changed. Multi method. Don't know how to handle this in the case
|
||||
;; of no user name provided. Hack to make it work as it did before:
|
||||
;; of no user name provided. Hack to make it work as it did before:
|
||||
;; changed `user' to `(or user (user-login-name))' in the places where
|
||||
;; the value is actually used.
|
||||
(defun tramp-multi-connect-telnet (p method user host command)
|
||||
|
@ -5619,8 +5629,8 @@ If USER is nil, uses the return value of (user-login-name) instead."
|
|||
(tramp-process-multi-actions p method user host
|
||||
tramp-multi-actions)))
|
||||
|
||||
;; HHH: Changed. Multi method. Don't know how to handle this in the case
|
||||
;; of no user name provided. Hack to make it work as it did before:
|
||||
;; HHH: Changed. Multi method. Don't know how to handle this in the case
|
||||
;; of no user name provided. Hack to make it work as it did before:
|
||||
;; changed `user' to `(or user (user-login-name))' in the places where
|
||||
;; the value is actually used.
|
||||
(defun tramp-multi-connect-rlogin (p method user host command)
|
||||
|
@ -5645,8 +5655,8 @@ If USER is nil, uses the return value of (user-login-name) instead."
|
|||
(tramp-process-multi-actions p method user host
|
||||
tramp-multi-actions)))
|
||||
|
||||
;; HHH: Changed. Multi method. Don't know how to handle this in the case
|
||||
;; of no user name provided. Hack to make it work as it did before:
|
||||
;; HHH: Changed. Multi method. Don't know how to handle this in the case
|
||||
;; of no user name provided. Hack to make it work as it did before:
|
||||
;; changed `user' to `(or user (user-login-name))' in the places where
|
||||
;; the value is actually used.
|
||||
(defun tramp-multi-connect-su (p method user host command)
|
||||
|
@ -6276,7 +6286,7 @@ Sends COMMAND, then waits 30 seconds for shell prompt."
|
|||
(tramp-barf-if-no-shell-prompt
|
||||
nil 30
|
||||
"Couldn't `%s', see buffer `%s'" command (buffer-name)))
|
||||
|
||||
|
||||
(defun tramp-wait-for-output (&optional timeout)
|
||||
"Wait for output from remote rsh command."
|
||||
(let ((proc (get-buffer-process (current-buffer)))
|
||||
|
@ -6609,9 +6619,9 @@ Not actually used. Use `(format \"%o\" i)' instead?"
|
|||
""))
|
||||
|
||||
|
||||
;; ------------------------------------------------------------
|
||||
;; -- TRAMP file names --
|
||||
;; ------------------------------------------------------------
|
||||
;; ------------------------------------------------------------
|
||||
;; -- TRAMP file names --
|
||||
;; ------------------------------------------------------------
|
||||
;; Conversion functions between external representation and
|
||||
;; internal data structure. Convenience functions for internal
|
||||
;; data structure.
|
||||
|
@ -6622,7 +6632,7 @@ Not actually used. Use `(format \"%o\" i)' instead?"
|
|||
"Return t iff NAME is a tramp file."
|
||||
(save-match-data
|
||||
(string-match tramp-file-name-regexp name)))
|
||||
|
||||
|
||||
;; HHH: Changed. Used to assign the return value of (user-login-name)
|
||||
;; to the `user' part of the structure if a user name was not
|
||||
;; provided, now it assigns nil.
|
||||
|
@ -6675,7 +6685,7 @@ This is MULTI-METHOD, if non-nil. Otherwise, it is METHOD, if non-nil.
|
|||
If both MULTI-METHOD and METHOD are nil, do a lookup in
|
||||
`tramp-default-method-alist'."
|
||||
(or multi-method method (tramp-find-default-method user host)))
|
||||
|
||||
|
||||
;; HHH: Not Changed. Multi method. Will probably not handle the case where
|
||||
;; a user name is not provided in the "file name" very well.
|
||||
(defun tramp-dissect-multi-file-name (name)
|
||||
|
@ -6847,7 +6857,7 @@ as default."
|
|||
(if entry
|
||||
(second entry)
|
||||
(symbol-value param))))
|
||||
|
||||
|
||||
|
||||
;; Auto saving to a special directory.
|
||||
|
||||
|
@ -7039,9 +7049,9 @@ exiting if process is running."
|
|||
process flag)))
|
||||
|
||||
|
||||
;; ------------------------------------------------------------
|
||||
;; -- Kludges section --
|
||||
;; ------------------------------------------------------------
|
||||
;; ------------------------------------------------------------
|
||||
;; -- Kludges section --
|
||||
;; ------------------------------------------------------------
|
||||
|
||||
;; Currently (as of Emacs 20.5), the function `shell-quote-argument'
|
||||
;; does not deal well with newline characters. Newline is replaced by
|
||||
|
@ -7304,7 +7314,7 @@ report.
|
|||
;; strange when doing zerop, we should kill the process and start
|
||||
;; again. (Greg Stark)
|
||||
;; * Add caching for filename completion. (Greg Stark)
|
||||
;; Of course, this has issues with usability (stale cache bites)
|
||||
;; Of course, this has issues with usability (stale cache bites)
|
||||
;; -- <daniel@danann.net>
|
||||
;; * Provide a local cache of old versions of remote files for the rsync
|
||||
;; transfer method to use. (Greg Stark)
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
;; are auto-frobbed from configure.ac, so you should edit that file and run
|
||||
;; "autoconf && ./configure" to change them.
|
||||
|
||||
(defconst tramp-version "2.0.45"
|
||||
(defconst tramp-version "2.0.46"
|
||||
"This version of Tramp.")
|
||||
|
||||
(defconst tramp-bug-report-address "tramp-devel@mail.freesoftware.fsf.org"
|
||||
|
|
|
@ -380,6 +380,8 @@ This variable is buffer local and only used in the *cvs* buffer.")
|
|||
("+" . cvs-mode-tree)
|
||||
;; mouse bindings
|
||||
([mouse-2] . cvs-mode-find-file)
|
||||
([follow-link] . (lambda (pos)
|
||||
(if (eq (get-char-property pos 'face) 'cvs-filename-face) t)))
|
||||
([(down-mouse-3)] . cvs-menu)
|
||||
;; dired-like bindings
|
||||
("\C-o" . cvs-mode-display-file)
|
||||
|
|
|
@ -33,10 +33,11 @@
|
|||
;; `zone-programs'. See `zone-call' for higher-ordered zoning.
|
||||
|
||||
;; WARNING: Not appropriate for Emacs sessions over modems or
|
||||
;; computers as slow as mine.
|
||||
;; computers as slow as mine.
|
||||
|
||||
;; THANKS: Christopher Mayer, Scott Flinchbaugh, Rachel Kalmar,
|
||||
;; Max Froumentin.
|
||||
;; THANKS: Christopher Mayer, Scott Flinchbaugh,
|
||||
;; Rachel Kalmar, Max Froumentin, Juri Linkov,
|
||||
;; Luigi Panzeri, John Paul Wallington.
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
@ -75,6 +76,7 @@ If nil, don't interrupt for about 1^26 seconds.")
|
|||
zone-pgm-paragraph-spaz
|
||||
zone-pgm-stress
|
||||
zone-pgm-stress-destress
|
||||
zone-pgm-random-life
|
||||
])
|
||||
|
||||
(defmacro zone-orig (&rest body)
|
||||
|
@ -139,19 +141,28 @@ If the element is a function or a list of a function and a number,
|
|||
(window-start)))))
|
||||
(put 'zone 'orig-buffer (current-buffer))
|
||||
(put 'zone 'modeline-hidden-level 0)
|
||||
(set-buffer outbuf)
|
||||
(switch-to-buffer outbuf)
|
||||
(setq mode-name "Zone")
|
||||
(erase-buffer)
|
||||
(setq buffer-undo-list t
|
||||
truncate-lines t
|
||||
tab-width (zone-orig tab-width)
|
||||
line-spacing (zone-orig line-spacing))
|
||||
(insert text)
|
||||
(switch-to-buffer outbuf)
|
||||
(setq buffer-undo-list t)
|
||||
(untabify (point-min) (point-max))
|
||||
(set-window-start (selected-window) (point-min))
|
||||
(set-window-point (selected-window) wp)
|
||||
(sit-for 0 500)
|
||||
(let ((pgm (elt zone-programs (random (length zone-programs))))
|
||||
(ct (and f (frame-parameter f 'cursor-type))))
|
||||
(when ct (modify-frame-parameters f '((cursor-type . (bar . 0)))))
|
||||
(ct (and f (frame-parameter f 'cursor-type)))
|
||||
(restore (list '(kill-buffer outbuf))))
|
||||
(when ct
|
||||
(modify-frame-parameters f '((cursor-type . (bar . 0))))
|
||||
(setq restore (cons '(modify-frame-parameters
|
||||
f (list (cons 'cursor-type ct)))
|
||||
restore)))
|
||||
;; Make `restore' a self-disabling one-shot thunk.
|
||||
(setq restore `(lambda () ,@restore (setq restore nil)))
|
||||
(condition-case nil
|
||||
(progn
|
||||
(message "Zoning... (%s)" pgm)
|
||||
|
@ -165,14 +176,17 @@ If the element is a function or a list of a function and a number,
|
|||
(zone-call pgm)
|
||||
(message "Zoning...sorry"))
|
||||
(error
|
||||
(funcall restore)
|
||||
(while (not (input-pending-p))
|
||||
(message (format "We were zoning when we wrote %s..." pgm))
|
||||
(sit-for 3)
|
||||
(message "...here's hoping we didn't hose your buffer!")
|
||||
(sit-for 3)))
|
||||
(quit (ding) (message "Zoning...sorry")))
|
||||
(when ct (modify-frame-parameters f (list (cons 'cursor-type ct)))))
|
||||
(kill-buffer outbuf)))
|
||||
(quit
|
||||
(funcall restore)
|
||||
(ding)
|
||||
(message "Zoning...sorry")))
|
||||
(when restore (funcall restore)))))
|
||||
|
||||
;;;; Zone when idle, or not.
|
||||
|
||||
|
@ -194,13 +208,11 @@ If the element is a function or a list of a function and a number,
|
|||
(message "I won't zone out any more"))
|
||||
|
||||
|
||||
;;;; zone-pgm-jitter
|
||||
;;;; jittering
|
||||
|
||||
(defun zone-shift-up ()
|
||||
(let* ((b (point))
|
||||
(e (progn
|
||||
(end-of-line)
|
||||
(if (looking-at "\n") (1+ (point)) (point))))
|
||||
(e (progn (forward-line 1) (point)))
|
||||
(s (buffer-substring b e)))
|
||||
(delete-region b e)
|
||||
(goto-char (point-max))
|
||||
|
@ -208,48 +220,40 @@ If the element is a function or a list of a function and a number,
|
|||
|
||||
(defun zone-shift-down ()
|
||||
(goto-char (point-max))
|
||||
(forward-line -1)
|
||||
(beginning-of-line)
|
||||
(let* ((b (point))
|
||||
(e (progn
|
||||
(end-of-line)
|
||||
(if (looking-at "\n") (1+ (point)) (point))))
|
||||
(e (progn (forward-line -1) (point)))
|
||||
(s (buffer-substring b e)))
|
||||
(delete-region b e)
|
||||
(goto-char (point-min))
|
||||
(insert s)))
|
||||
|
||||
(defun zone-shift-left ()
|
||||
(while (not (eobp))
|
||||
(or (eolp)
|
||||
(let ((c (following-char)))
|
||||
(delete-char 1)
|
||||
(end-of-line)
|
||||
(insert c)))
|
||||
(forward-line 1)))
|
||||
(let (s)
|
||||
(while (not (eobp))
|
||||
(unless (eolp)
|
||||
(setq s (buffer-substring (point) (1+ (point))))
|
||||
(delete-char 1)
|
||||
(end-of-line)
|
||||
(insert s))
|
||||
(forward-char 1))))
|
||||
|
||||
(defun zone-shift-right ()
|
||||
(while (not (eobp))
|
||||
(end-of-line)
|
||||
(or (bolp)
|
||||
(let ((c (preceding-char)))
|
||||
(delete-backward-char 1)
|
||||
(beginning-of-line)
|
||||
(insert c)))
|
||||
(forward-line 1)))
|
||||
(goto-char (point-max))
|
||||
(end-of-line)
|
||||
(let (s)
|
||||
(while (not (bobp))
|
||||
(unless (bolp)
|
||||
(setq s (buffer-substring (1- (point)) (point)))
|
||||
(delete-char -1)
|
||||
(beginning-of-line)
|
||||
(insert s))
|
||||
(end-of-line 0))))
|
||||
|
||||
(defun zone-pgm-jitter ()
|
||||
(let ((ops [
|
||||
zone-shift-left
|
||||
zone-shift-left
|
||||
zone-shift-left
|
||||
zone-shift-left
|
||||
zone-shift-right
|
||||
zone-shift-down
|
||||
zone-shift-down
|
||||
zone-shift-down
|
||||
zone-shift-down
|
||||
zone-shift-down
|
||||
zone-shift-up
|
||||
]))
|
||||
(goto-char (point-min))
|
||||
|
@ -259,7 +263,7 @@ If the element is a function or a list of a function and a number,
|
|||
(sit-for 0 10))))
|
||||
|
||||
|
||||
;;;; zone-pgm-whack-chars
|
||||
;;;; whacking chars
|
||||
|
||||
(defun zone-pgm-whack-chars ()
|
||||
(let ((tbl (copy-sequence (get 'zone-pgm-whack-chars 'wc-tbl))))
|
||||
|
@ -279,7 +283,7 @@ If the element is a function or a list of a function and a number,
|
|||
(setq i (1+ i)))
|
||||
tbl))
|
||||
|
||||
;;;; zone-pgm-dissolve
|
||||
;;;; dissolving
|
||||
|
||||
(defun zone-remove-text ()
|
||||
(let ((working t))
|
||||
|
@ -304,11 +308,11 @@ If the element is a function or a list of a function and a number,
|
|||
(zone-pgm-jitter))
|
||||
|
||||
|
||||
;;;; zone-pgm-explode
|
||||
;;;; exploding
|
||||
|
||||
(defun zone-exploding-remove ()
|
||||
(let ((i 0))
|
||||
(while (< i 20)
|
||||
(while (< i 5)
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(while (not (eobp))
|
||||
|
@ -327,7 +331,7 @@ If the element is a function or a list of a function and a number,
|
|||
(zone-pgm-jitter))
|
||||
|
||||
|
||||
;;;; zone-pgm-putz-with-case
|
||||
;;;; putzing w/ case
|
||||
|
||||
;; Faster than `zone-pgm-putz-with-case', but not as good: all
|
||||
;; instances of the same letter have the same case, which produces a
|
||||
|
@ -376,7 +380,7 @@ If the element is a function or a list of a function and a number,
|
|||
(sit-for 0 2)))
|
||||
|
||||
|
||||
;;;; zone-pgm-rotate
|
||||
;;;; rotating
|
||||
|
||||
(defun zone-line-specs ()
|
||||
(let (ret)
|
||||
|
@ -438,46 +442,84 @@ If the element is a function or a list of a function and a number,
|
|||
(zone-pgm-rotate (lambda () (1- (- (random 3))))))
|
||||
|
||||
|
||||
;;;; zone-pgm-drip
|
||||
;;;; dripping
|
||||
|
||||
(defun zone-cpos (pos)
|
||||
(defsubst zone-cpos (pos)
|
||||
(buffer-substring pos (1+ pos)))
|
||||
|
||||
(defun zone-fret (pos)
|
||||
(defsubst zone-replace-char (count del-count char-as-string new-value)
|
||||
(delete-char (or del-count (- count)))
|
||||
(aset char-as-string 0 new-value)
|
||||
(dotimes (i count) (insert char-as-string)))
|
||||
|
||||
(defsubst zone-park/sit-for (pos seconds)
|
||||
(let ((p (point)))
|
||||
(goto-char pos)
|
||||
(prog1 (sit-for seconds)
|
||||
(goto-char p))))
|
||||
|
||||
(defun zone-fret (wbeg pos)
|
||||
(let* ((case-fold-search nil)
|
||||
(c-string (zone-cpos pos))
|
||||
(cw-ceil (ceiling (char-width (aref c-string 0))))
|
||||
(hmm (cond
|
||||
((string-match "[a-z]" c-string) (upcase c-string))
|
||||
((string-match "[A-Z]" c-string) (downcase c-string))
|
||||
(t " "))))
|
||||
(t (propertize " " 'display `(space :width ,cw-ceil))))))
|
||||
(do ((i 0 (1+ i))
|
||||
(wait 0.5 (* wait 0.8)))
|
||||
((= i 20))
|
||||
(goto-char pos)
|
||||
(delete-char 1)
|
||||
(insert (if (= 0 (% i 2)) hmm c-string))
|
||||
(sit-for wait))
|
||||
(zone-park/sit-for wbeg wait))
|
||||
(delete-char -1) (insert c-string)))
|
||||
|
||||
(defun zone-fall-through-ws (c col wend)
|
||||
(let ((fall-p nil) ; todo: move outward
|
||||
(wait 0.15)
|
||||
(o (point)) ; for terminals w/o cursor hiding
|
||||
(p (point)))
|
||||
(while (progn
|
||||
(forward-line 1)
|
||||
(move-to-column col)
|
||||
(looking-at " "))
|
||||
(setq fall-p t)
|
||||
(delete-char 1)
|
||||
(insert (if (< (point) wend) c " "))
|
||||
(save-excursion
|
||||
(goto-char p)
|
||||
(delete-char 1)
|
||||
(insert " ")
|
||||
(goto-char o)
|
||||
(sit-for (setq wait (* wait 0.8))))
|
||||
(setq p (1- (point))))
|
||||
(defun zone-fill-out-screen (width height)
|
||||
(let ((start (window-start))
|
||||
(line (make-string width 32)))
|
||||
(goto-char start)
|
||||
;; fill out rectangular ws block
|
||||
(while (progn (end-of-line)
|
||||
(let ((cc (current-column)))
|
||||
(if (< cc width)
|
||||
(insert (substring line cc))
|
||||
(delete-char (- width cc)))
|
||||
(cond ((eobp) (insert "\n") nil)
|
||||
(t (forward-char 1) t)))))
|
||||
;; pad ws past bottom of screen
|
||||
(let ((nl (- height (count-lines (point-min) (point)))))
|
||||
(when (> nl 0)
|
||||
(setq line (concat line "\n"))
|
||||
(do ((i 0 (1+ i)))
|
||||
((= i nl))
|
||||
(insert line))))
|
||||
(goto-char start)
|
||||
(recenter 0)
|
||||
(sit-for 0)))
|
||||
|
||||
(defun zone-fall-through-ws (c wbeg wend)
|
||||
(let* ((cw-ceil (ceiling (char-width (aref c 0))))
|
||||
(spaces (make-string cw-ceil 32))
|
||||
(col (current-column))
|
||||
(wait 0.15)
|
||||
newpos fall-p)
|
||||
(while (when (save-excursion
|
||||
(next-line 1)
|
||||
(and (= col (current-column))
|
||||
(setq newpos (point))
|
||||
(string= spaces (buffer-substring-no-properties
|
||||
newpos (+ newpos cw-ceil)))
|
||||
(setq newpos (+ newpos (1- cw-ceil)))))
|
||||
(setq fall-p t)
|
||||
(delete-char 1)
|
||||
(insert spaces)
|
||||
(goto-char newpos)
|
||||
(when (< (point) wend)
|
||||
(delete-char cw-ceil)
|
||||
(insert c)
|
||||
(forward-char -1)
|
||||
(zone-park/sit-for wbeg (setq wait (* wait 0.8))))))
|
||||
fall-p))
|
||||
|
||||
(defun zone-pgm-drip (&optional fret-p pancake-p)
|
||||
|
@ -485,59 +527,35 @@ If the element is a function or a list of a function and a number,
|
|||
(wh (window-height))
|
||||
(mc 0) ; miss count
|
||||
(total (* ww wh))
|
||||
(fall-p nil))
|
||||
(goto-char (point-min))
|
||||
;; fill out rectangular ws block
|
||||
(while (not (eobp))
|
||||
(end-of-line)
|
||||
(let ((cc (current-column)))
|
||||
(if (< cc ww)
|
||||
(insert (make-string (- ww cc) ? ))
|
||||
(delete-char (- ww cc))))
|
||||
(unless (eobp)
|
||||
(forward-char 1)))
|
||||
;; pad ws past bottom of screen
|
||||
(let ((nl (- wh (count-lines (point-min) (point)))))
|
||||
(when (> nl 0)
|
||||
(let ((line (concat (make-string (1- ww) ? ) "\n")))
|
||||
(do ((i 0 (1+ i)))
|
||||
((= i nl))
|
||||
(insert line)))))
|
||||
(fall-p nil)
|
||||
wbeg wend c)
|
||||
(zone-fill-out-screen ww wh)
|
||||
(setq wbeg (window-start)
|
||||
wend (window-end))
|
||||
(catch 'done
|
||||
(while (not (input-pending-p))
|
||||
(goto-char (point-min))
|
||||
(sit-for 0)
|
||||
(let ((wbeg (window-start))
|
||||
(wend (window-end)))
|
||||
(setq mc 0)
|
||||
;; select non-ws character, but don't miss too much
|
||||
(goto-char (+ wbeg (random (- wend wbeg))))
|
||||
(while (looking-at "[ \n\f]")
|
||||
(if (= total (setq mc (1+ mc)))
|
||||
(throw 'done 'sel)
|
||||
(goto-char (+ wbeg (random (- wend wbeg))))))
|
||||
;; character animation sequence
|
||||
(let ((p (point)))
|
||||
(when fret-p (zone-fret p))
|
||||
(goto-char p)
|
||||
(setq fall-p (zone-fall-through-ws
|
||||
(zone-cpos p) (current-column) wend))))
|
||||
(setq mc 0 wend (window-end))
|
||||
;; select non-ws character, but don't miss too much
|
||||
(goto-char (+ wbeg (random (- wend wbeg))))
|
||||
(while (looking-at "[ \n\f]")
|
||||
(if (= total (setq mc (1+ mc)))
|
||||
(throw 'done 'sel)
|
||||
(goto-char (+ wbeg (random (- wend wbeg))))))
|
||||
;; character animation sequence
|
||||
(let ((p (point)))
|
||||
(when fret-p (zone-fret wbeg p))
|
||||
(goto-char p)
|
||||
(setq c (zone-cpos p)
|
||||
fall-p (zone-fall-through-ws c wbeg wend)))
|
||||
;; assuming current-column has not changed...
|
||||
(when (and pancake-p
|
||||
fall-p
|
||||
(< (count-lines (point-min) (point))
|
||||
wh))
|
||||
(previous-line 1)
|
||||
(forward-char 1)
|
||||
(sit-for 0.137)
|
||||
(delete-char -1)
|
||||
(insert "@")
|
||||
(sit-for 0.137)
|
||||
(delete-char -1)
|
||||
(insert "*")
|
||||
(sit-for 0.137)
|
||||
(delete-char -1)
|
||||
(insert "_"))))))
|
||||
(let ((cw (ceiling (char-width (aref c 0)))))
|
||||
(zone-replace-char cw 1 c ?@) (zone-park/sit-for wbeg 0.137)
|
||||
(zone-replace-char cw nil c ?*) (zone-park/sit-for wbeg 0.137)
|
||||
(zone-replace-char cw nil c ?_)))))))
|
||||
|
||||
(defun zone-pgm-drip-fretfully ()
|
||||
(zone-pgm-drip t))
|
||||
|
@ -549,10 +567,12 @@ If the element is a function or a list of a function and a number,
|
|||
(zone-pgm-drip t t))
|
||||
|
||||
|
||||
;;;; zone-pgm-paragraph-spaz
|
||||
;;;; paragraph spazzing (for textish modes)
|
||||
|
||||
(defun zone-pgm-paragraph-spaz ()
|
||||
(if (memq (zone-orig major-mode) '(text-mode fundamental-mode))
|
||||
(if (memq (zone-orig major-mode)
|
||||
;; there should be a better way to distinguish textish modes
|
||||
'(text-mode texinfo-mode fundamental-mode))
|
||||
(let ((fill-column fill-column)
|
||||
(fc-min fill-column)
|
||||
(fc-max fill-column)
|
||||
|
@ -570,7 +590,7 @@ If the element is a function or a list of a function and a number,
|
|||
(zone-pgm-rotate)))
|
||||
|
||||
|
||||
;;;; zone-pgm-stress
|
||||
;;;; stressing and destressing
|
||||
|
||||
(defun zone-pgm-stress ()
|
||||
(goto-char (point-min))
|
||||
|
@ -596,9 +616,6 @@ If the element is a function or a list of a function and a number,
|
|||
(message (concat (make-string (random (- (frame-width) 5)) ? ) "grrr"))
|
||||
(sit-for 0.1)))))
|
||||
|
||||
|
||||
;;;; zone-pgm-stress-destress
|
||||
|
||||
(defun zone-pgm-stress-destress ()
|
||||
(zone-call 'zone-pgm-stress 25)
|
||||
(zone-hiding-modeline
|
||||
|
@ -617,6 +634,63 @@ If the element is a function or a list of a function and a number,
|
|||
zone-pgm-drip))))
|
||||
|
||||
|
||||
;;;; the lyfe so short the craft so long to lerne --chaucer
|
||||
|
||||
(defvar zone-pgm-random-life-wait nil
|
||||
"*Seconds to wait between successive `life' generations.
|
||||
If nil, `zone-pgm-random-life' chooses a value from 0-3 (inclusive).")
|
||||
|
||||
(defun zone-pgm-random-life ()
|
||||
(require 'life)
|
||||
(zone-fill-out-screen (1- (window-width)) (1- (window-height)))
|
||||
(let ((top (progn (goto-char (window-start)) (forward-line 7) (point)))
|
||||
(bot (progn (goto-char (window-end)) (forward-line -7) (point)))
|
||||
(rtc (- (frame-width) 11))
|
||||
(min (window-start))
|
||||
(max (1- (window-end)))
|
||||
s c col)
|
||||
(delete-region max (point-max))
|
||||
(while (and (progn (goto-char min) (sit-for 0.05))
|
||||
(progn (goto-char (+ min (random max)))
|
||||
(or (progn (skip-chars-forward " @\n" max)
|
||||
(not (= max (point))))
|
||||
(unless (or (= 0 (skip-chars-backward " @\n" min))
|
||||
(= min (point)))
|
||||
(forward-char -1)
|
||||
t))))
|
||||
(unless (or (eolp) (eobp))
|
||||
(setq s (zone-cpos (point))
|
||||
c (aref s 0))
|
||||
(zone-replace-char
|
||||
(char-width c)
|
||||
1 s (cond ((or (> top (point))
|
||||
(< bot (point))
|
||||
(or (> 11 (setq col (current-column)))
|
||||
(< rtc col)))
|
||||
32)
|
||||
((and (<= ?a c) (>= ?z c)) (+ c (- ?A ?a)))
|
||||
((and (<= ?A c) (>= ?Z c)) ?*)
|
||||
(t ?@)))))
|
||||
(sit-for 3)
|
||||
(setq col nil)
|
||||
(goto-char bot)
|
||||
(while (< top (point))
|
||||
(setq c (point))
|
||||
(move-to-column 9)
|
||||
(setq col (cons (buffer-substring (point) c) col))
|
||||
(end-of-line 0)
|
||||
(forward-char -10))
|
||||
(let ((life-patterns (vector
|
||||
(if (and col (search-forward "@" max t))
|
||||
(cons (make-string (length (car col)) 32) col)
|
||||
(list (mapconcat 'identity
|
||||
(make-list (/ (- rtc 11) 15)
|
||||
(make-string 5 ?@))
|
||||
(make-string 10 32)))))))
|
||||
(life (or zone-pgm-random-life-wait (random 4)))
|
||||
(kill-buffer nil))))
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;
|
||||
(provide 'zone)
|
||||
|
||||
|
|
|
@ -1044,6 +1044,7 @@ exited abnormally with code %d\n"
|
|||
(defvar compilation-minor-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map [mouse-2] 'compile-goto-error)
|
||||
(define-key map [follow-link] 'mouse-face)
|
||||
(define-key map "\C-c\C-c" 'compile-goto-error)
|
||||
(define-key map "\C-m" 'compile-goto-error)
|
||||
(define-key map "\C-c\C-k" 'kill-compilation)
|
||||
|
@ -1073,6 +1074,7 @@ exited abnormally with code %d\n"
|
|||
(defvar compilation-button-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map [mouse-2] 'compile-goto-error)
|
||||
(define-key map [follow-link] 'mouse-face)
|
||||
(define-key map "\C-m" 'compile-goto-error)
|
||||
map)
|
||||
"Keymap for compilation-message buttons.")
|
||||
|
@ -1084,6 +1086,7 @@ exited abnormally with code %d\n"
|
|||
;; because that introduces a menu bar item we don't want.
|
||||
;; That confuses C-down-mouse-3.
|
||||
(define-key map [mouse-2] 'compile-goto-error)
|
||||
(define-key map [follow-link] 'mouse-face)
|
||||
(define-key map "\C-c\C-c" 'compile-goto-error)
|
||||
(define-key map "\C-m" 'compile-goto-error)
|
||||
(define-key map "\C-c\C-k" 'kill-compilation)
|
||||
|
|
|
@ -199,20 +199,20 @@ non-executable files."
|
|||
(file-modes buffer-file-name)))))))
|
||||
|
||||
|
||||
;;;###autoload
|
||||
(defun executable-interpret (command)
|
||||
"Run script with user-specified args, and collect output in a buffer.
|
||||
While script runs asynchronously, you can use the \\[next-error] command
|
||||
to find the next error."
|
||||
While script runs asynchronously, you can use the \\[next-error]
|
||||
command to find the next error. The buffer is also in `comint-mode' and
|
||||
`compilation-shell-minor-mode', so that you can answer any prompts."
|
||||
(interactive (list (read-string "Run script: "
|
||||
(or executable-command
|
||||
buffer-file-name))))
|
||||
(require 'compile)
|
||||
(save-some-buffers (not compilation-ask-about-save))
|
||||
(make-local-variable 'executable-command)
|
||||
(compile-internal (setq executable-command command)
|
||||
"No more errors." "Interpretation"
|
||||
;; Give it a simpler regexp to match.
|
||||
nil executable-error-regexp-alist))
|
||||
(set (make-local-variable 'executable-command) command)
|
||||
(let ((compilation-error-regexp-alist executable-error-regexp-alist))
|
||||
(compilation-start command t (lambda (x) "*interpretation*"))))
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -275,6 +275,9 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies
|
|||
(defvar grep-error-face compilation-error-face
|
||||
"Face name to use for grep error messages.")
|
||||
|
||||
(defvar grep-match-face 'match
|
||||
"Face name to use for grep matches.")
|
||||
|
||||
(defvar grep-mode-font-lock-keywords
|
||||
'(;; Command output lines.
|
||||
("^\\([A-Za-z_0-9/\.+-]+\\)[ \t]*:" 1 font-lock-function-name-face)
|
||||
|
@ -291,7 +294,7 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies
|
|||
(2 compilation-line-face))
|
||||
;; Highlight grep matches and delete markers
|
||||
("\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\)"
|
||||
(2 compilation-column-face)
|
||||
(2 grep-match-face)
|
||||
((lambda (p))
|
||||
(progn
|
||||
;; Delete markers with `replace-match' because it updates
|
||||
|
|
|
@ -841,6 +841,8 @@ IDL has currently stepped.")
|
|||
(defvar idlwave-shell-sources-query)
|
||||
(defvar idlwave-shell-mode-map)
|
||||
(defvar idlwave-shell-calling-stack-index)
|
||||
(defvar idlwave-shell-only-prompt-pattern nil)
|
||||
(defvar tool-bar-map)
|
||||
|
||||
(defun idlwave-shell-mode ()
|
||||
"Major mode for interacting with an inferior IDL process.
|
||||
|
@ -994,7 +996,7 @@ IDL has currently stepped.")
|
|||
(setq idlwave-shell-hide-output nil)
|
||||
|
||||
;; NB: `make-local-hook' needed for older/alternative Emacs compatibility
|
||||
(make-local-hook 'kill-buffer-hook)
|
||||
;;(make-local-hook 'kill-buffer-hook)
|
||||
(add-hook 'kill-buffer-hook 'idlwave-shell-kill-shell-buffer-confirm
|
||||
nil 'local)
|
||||
(add-hook 'kill-buffer-hook 'idlwave-shell-delete-temp-files nil 'local)
|
||||
|
@ -1038,7 +1040,7 @@ IDL has currently stepped.")
|
|||
(setq abbrev-mode t)
|
||||
|
||||
;; NB: `make-local-hook' needed for older/alternative Emacs compatibility
|
||||
(make-local-hook 'post-command-hook)
|
||||
;;(make-local-hook 'post-command-hook)
|
||||
(add-hook 'post-command-hook 'idlwave-command-hook nil t)
|
||||
|
||||
;; Read the command history?
|
||||
|
@ -1458,7 +1460,6 @@ Otherwise just move the line. Move down unless UP is non-nil."
|
|||
"Return t if the shell process is running."
|
||||
(eq (process-status idlwave-shell-process-name) 'run))
|
||||
|
||||
(defvar idlwave-shell-only-prompt-pattern nil)
|
||||
(defun idlwave-shell-filter-hidden-output (output)
|
||||
"Filter hidden output, leaving the good stuff.
|
||||
|
||||
|
@ -1475,6 +1476,7 @@ error messages, etc."
|
|||
|
||||
(defvar idlwave-shell-hidden-output-buffer " *idlwave-shell-hidden-output*"
|
||||
"Buffer containing hidden output from IDL commands.")
|
||||
(defvar idlwave-shell-current-state nil)
|
||||
|
||||
(defun idlwave-shell-filter (proc string)
|
||||
"Watch for IDL prompt and filter incoming text.
|
||||
|
@ -1627,7 +1629,55 @@ and then calls `idlwave-shell-send-command' for any pending commands."
|
|||
(run-hooks 'idlwave-shell-sentinel-hook))
|
||||
(run-hooks 'idlwave-shell-sentinel-hook))))
|
||||
|
||||
(defvar idlwave-shell-current-state nil)
|
||||
(defvar idlwave-shell-error-buffer " *idlwave-shell-errors*"
|
||||
"Buffer containing syntax errors from IDL compilations.")
|
||||
|
||||
;; FIXME: the following two variables do not currently allow line breaks
|
||||
;; in module and file names. I am not sure if it will be necessary to
|
||||
;; change this. Currently it seems to work the way it is.
|
||||
(defvar idlwave-shell-syntax-error
|
||||
"^% Syntax error.\\s-*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)"
|
||||
"A regular expression to match an IDL syntax error.
|
||||
The 1st pair matches the file name, the second pair matches the line
|
||||
number.")
|
||||
|
||||
(defvar idlwave-shell-other-error
|
||||
"^% .*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)"
|
||||
"A regular expression to match any IDL error.")
|
||||
|
||||
(defvar idlwave-shell-halting-error
|
||||
"^% .*\n\\([^%].*\n\\)*% Execution halted at:\\(\\s-*\\S-+\\s-*[0-9]+\\s-*.*\\)\n"
|
||||
"A regular expression to match errors which halt execution.")
|
||||
|
||||
(defvar idlwave-shell-cant-continue-error
|
||||
"^% Can't continue from this point.\n"
|
||||
"A regular expression to match errors stepping errors.")
|
||||
|
||||
(defvar idlwave-shell-file-line-message
|
||||
(concat
|
||||
"\\(" ; program name group (1)
|
||||
"\\$MAIN\\$\\|" ; main level routine
|
||||
"\\<[a-zA-Z][a-zA-Z0-9_$:]*" ; start with a letter followed by [..]
|
||||
"\\([ \t]*\n[ \t]*[a-zA-Z0-9_$:]+\\)*"; continuation lines program name (2)
|
||||
"\\)" ; end program name group (1)
|
||||
"[ \t\n]+" ; white space
|
||||
"\\(" ; line number group (3)
|
||||
"[0-9]+" ; the line number (the fix point)
|
||||
"\\([ \t]*\n[ \t]*[0-9]+\\)*" ; continuation lines number (4)
|
||||
"\\)" ; end line number group (3)
|
||||
"[ \t\n]+" ; white space
|
||||
"\\(" ; file name group (5)
|
||||
"[^ \t\n]+" ; file names can contain any non-white
|
||||
"\\([ \t]*\n[ \t]*[^ \t\n]+\\)*" ; continuation lines file name (6)
|
||||
"\\)" ; end line number group (5)
|
||||
)
|
||||
"*A regular expression to parse out the file name and line number.
|
||||
The 1st group should match the subroutine name.
|
||||
The 3rd group is the line number.
|
||||
The 5th group is the file name.
|
||||
All parts may contain linebreaks surrounded by spaces. This is important
|
||||
in IDL5 which inserts random linebreaks in long module and file names.")
|
||||
|
||||
(defun idlwave-shell-scan-for-state ()
|
||||
"Scan for state info. Looks for messages in output from last IDL
|
||||
command indicating where IDL has stopped. The types of messages we are
|
||||
|
@ -1721,55 +1771,6 @@ the above."
|
|||
;; Otherwise, no particular state
|
||||
(t (setq idlwave-shell-current-state nil)))))
|
||||
|
||||
(defvar idlwave-shell-error-buffer " *idlwave-shell-errors*"
|
||||
"Buffer containing syntax errors from IDL compilations.")
|
||||
|
||||
;; FIXME: the following two variables do not currently allow line breaks
|
||||
;; in module and file names. I am not sure if it will be necessary to
|
||||
;; change this. Currently it seems to work the way it is.
|
||||
(defvar idlwave-shell-syntax-error
|
||||
"^% Syntax error.\\s-*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)"
|
||||
"A regular expression to match an IDL syntax error.
|
||||
The 1st pair matches the file name, the second pair matches the line
|
||||
number.")
|
||||
|
||||
(defvar idlwave-shell-other-error
|
||||
"^% .*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)"
|
||||
"A regular expression to match any IDL error.")
|
||||
|
||||
(defvar idlwave-shell-halting-error
|
||||
"^% .*\n\\([^%].*\n\\)*% Execution halted at:\\(\\s-*\\S-+\\s-*[0-9]+\\s-*.*\\)\n"
|
||||
"A regular expression to match errors which halt execution.")
|
||||
|
||||
(defvar idlwave-shell-cant-continue-error
|
||||
"^% Can't continue from this point.\n"
|
||||
"A regular expression to match errors stepping errors.")
|
||||
|
||||
(defvar idlwave-shell-file-line-message
|
||||
(concat
|
||||
"\\(" ; program name group (1)
|
||||
"\\$MAIN\\$\\|" ; main level routine
|
||||
"\\<[a-zA-Z][a-zA-Z0-9_$:]*" ; start with a letter followed by [..]
|
||||
"\\([ \t]*\n[ \t]*[a-zA-Z0-9_$:]+\\)*"; continuation lines program name (2)
|
||||
"\\)" ; end program name group (1)
|
||||
"[ \t\n]+" ; white space
|
||||
"\\(" ; line number group (3)
|
||||
"[0-9]+" ; the line number (the fix point)
|
||||
"\\([ \t]*\n[ \t]*[0-9]+\\)*" ; continuation lines number (4)
|
||||
"\\)" ; end line number group (3)
|
||||
"[ \t\n]+" ; white space
|
||||
"\\(" ; file name group (5)
|
||||
"[^ \t\n]+" ; file names can contain any non-white
|
||||
"\\([ \t]*\n[ \t]*[^ \t\n]+\\)*" ; continuation lines file name (6)
|
||||
"\\)" ; end line number group (5)
|
||||
)
|
||||
"*A regular expression to parse out the file name and line number.
|
||||
The 1st group should match the subroutine name.
|
||||
The 3rd group is the line number.
|
||||
The 5th group is the file name.
|
||||
All parts may contain linebreaks surrounded by spaces. This is important
|
||||
in IDL5 which inserts random linebreaks in long module and file names.")
|
||||
|
||||
(defun idlwave-shell-parse-line (string &optional skip-main)
|
||||
"Parse IDL message for the subroutine, file name and line number.
|
||||
We need to work hard here to remove the stupid line breaks inserted by
|
||||
|
@ -2102,8 +2103,8 @@ Change the default directory for the process buffer to concur."
|
|||
'hide 'wait)
|
||||
;; If we don't know anything about the class, update shell routines
|
||||
(if (and idlwave-shell-get-object-class
|
||||
(not (assoc-ignore-case idlwave-shell-get-object-class
|
||||
(idlwave-class-alist))))
|
||||
(not (assoc-string idlwave-shell-get-object-class
|
||||
(idlwave-class-alist) t)))
|
||||
(idlwave-shell-maybe-update-routine-info))
|
||||
idlwave-shell-get-object-class)))
|
||||
|
||||
|
@ -2165,9 +2166,10 @@ keywords."
|
|||
(idlwave-complete arg)))))
|
||||
|
||||
;; Get rid of opaque dynamic variable passing of link?
|
||||
(defvar link) ;dynamic variable
|
||||
(defun idlwave-shell-complete-execcomm-help (mode word)
|
||||
(let ((word (or (nth 1 idlwave-completion-help-info) word))
|
||||
(entry (assoc-ignore-case word idlwave-executive-commands-alist)))
|
||||
(entry (assoc-string word idlwave-executive-commands-alist t)))
|
||||
(cond
|
||||
((eq mode 'test)
|
||||
(and (stringp word) entry (cdr entry)))
|
||||
|
@ -2217,6 +2219,7 @@ args of an executive .run, .rnew or .compile."
|
|||
(looking-at "\\$")))
|
||||
|
||||
;; Debugging Commands ------------------------------------------------------
|
||||
(defvar idlwave-shell-electric-debug-mode) ; defined by easy-mmode
|
||||
|
||||
(defun idlwave-shell-redisplay (&optional hide)
|
||||
"Tries to resync the display with where execution has stopped.
|
||||
|
@ -3517,6 +3520,7 @@ considered the new breakpoint if the file name of frame matches."
|
|||
|
||||
(defvar idlwave-shell-bp-overlays nil
|
||||
"Alist of overlays marking breakpoints")
|
||||
(defvar idlwave-shell-bp-glyph)
|
||||
|
||||
(defun idlwave-shell-update-bp-overlays ()
|
||||
"Update the overlays which mark breakpoints in the source code.
|
||||
|
@ -3605,7 +3609,6 @@ Existing overlays are recycled, in order to minimize consumption."
|
|||
(set-window-buffer win buf))))))))
|
||||
|
||||
|
||||
(defvar idlwave-shell-bp-glyph)
|
||||
(defun idlwave-shell-make-new-bp-overlay (&optional type disabled help)
|
||||
"Make a new overlay for highlighting breakpoints.
|
||||
|
||||
|
@ -4026,7 +4029,7 @@ Otherwise, just expand the file name."
|
|||
'(alt))))
|
||||
(shift (memq 'shift mod))
|
||||
(mod-noshift (delete 'shift (copy-sequence mod)))
|
||||
s k1 c2 k2 cmd cannotshift)
|
||||
s k1 c2 k2 cmd electric only-buffer cannotshift)
|
||||
(while (setq s (pop specs))
|
||||
(setq k1 (nth 0 s)
|
||||
c2 (nth 1 s)
|
||||
|
@ -4089,6 +4092,9 @@ Otherwise, just expand the file name."
|
|||
(setq idlwave-shell-suppress-electric-debug nil))
|
||||
(idlwave-shell-electric-debug-mode))
|
||||
|
||||
(defvar idlwave-shell-electric-debug-read-only)
|
||||
(defvar idlwave-shell-electric-debug-buffers nil)
|
||||
|
||||
(easy-mmode-define-minor-mode idlwave-shell-electric-debug-mode
|
||||
"Toggle Electric Debug mode.
|
||||
With no argument, this command toggles the mode.
|
||||
|
@ -4138,7 +4144,6 @@ idlwave-shell-electric-debug-mode-map)
|
|||
(force-mode-line-update))
|
||||
|
||||
;; Turn it off in all relevant buffers
|
||||
(defvar idlwave-shell-electric-debug-buffers nil)
|
||||
(defun idlwave-shell-electric-debug-all-off ()
|
||||
(setq idlwave-shell-suppress-electric-debug nil)
|
||||
(let ((buffers idlwave-shell-electric-debug-buffers)
|
||||
|
|
|
@ -2571,7 +2571,9 @@ If not in a statement just moves to end of line. Returns position."
|
|||
(let ((save-point (point)))
|
||||
(when (re-search-forward ".*&" lim t)
|
||||
(goto-char (match-end 0))
|
||||
(if (idlwave-quoted) (goto-char save-point)))
|
||||
(if (idlwave-quoted)
|
||||
(goto-char save-point)
|
||||
(if (eq (char-after (- (point) 2)) ?&) (goto-char save-point))))
|
||||
(point)))
|
||||
|
||||
(defun idlwave-skip-label-or-case ()
|
||||
|
|
152
lisp/replace.el
152
lisp/replace.el
|
@ -735,16 +735,17 @@ Alternatively, click \\[occur-mode-mouse-goto] on an item to go to it.
|
|||
Compatibility function for \\[next-error] invocations."
|
||||
(interactive "p")
|
||||
;; we need to run occur-find-match from within the Occur buffer
|
||||
(with-current-buffer
|
||||
(with-current-buffer
|
||||
(if (next-error-buffer-p (current-buffer))
|
||||
(current-buffer)
|
||||
(next-error-find-buffer nil nil (lambda() (eq major-mode 'occur-mode))))
|
||||
|
||||
(when reset
|
||||
(goto-char (point-min)))
|
||||
|
||||
(goto-char (cond (reset (point-min))
|
||||
((< argp 0) (line-beginning-position))
|
||||
((line-end-position))))
|
||||
(occur-find-match
|
||||
(abs (prefix-numeric-value argp))
|
||||
(if (> 0 (prefix-numeric-value argp))
|
||||
(abs argp)
|
||||
(if (> 0 argp)
|
||||
#'previous-single-property-change
|
||||
#'next-single-property-change)
|
||||
"No more matches")
|
||||
|
@ -752,6 +753,20 @@ Compatibility function for \\[next-error] invocations."
|
|||
(set-window-point (get-buffer-window (current-buffer)) (point))
|
||||
(occur-mode-goto-occurrence)))
|
||||
|
||||
(defface match
|
||||
'((((class color) (min-colors 88) (background light))
|
||||
:background "Tan")
|
||||
(((class color) (min-colors 88) (background dark))
|
||||
:background "RoyalBlue4")
|
||||
(((class color) (min-colors 8))
|
||||
:background "blue" :foreground "white")
|
||||
(((type tty) (class mono))
|
||||
:inverse-video t)
|
||||
(t :background "gray"))
|
||||
"Face used to highlight matches permanently."
|
||||
:group 'matching
|
||||
:version "21.4")
|
||||
|
||||
(defcustom list-matching-lines-default-context-lines 0
|
||||
"*Default number of context lines included around `list-matching-lines' matches.
|
||||
A negative number means to include that many lines before the match.
|
||||
|
@ -761,7 +776,7 @@ A positive number means to include that many lines both before and after."
|
|||
|
||||
(defalias 'list-matching-lines 'occur)
|
||||
|
||||
(defcustom list-matching-lines-face 'bold
|
||||
(defcustom list-matching-lines-face 'match
|
||||
"*Face used by \\[list-matching-lines] to show the text that matches.
|
||||
If the value is nil, don't highlight the matching portions specially."
|
||||
:type 'face
|
||||
|
@ -776,18 +791,22 @@ If the value is nil, don't highlight the buffer names specially."
|
|||
(defun occur-accumulate-lines (count &optional keep-props)
|
||||
(save-excursion
|
||||
(let ((forwardp (> count 0))
|
||||
(result nil))
|
||||
result beg end)
|
||||
(while (not (or (zerop count)
|
||||
(if forwardp
|
||||
(eobp)
|
||||
(bobp))))
|
||||
(setq count (+ count (if forwardp -1 1)))
|
||||
(setq beg (line-beginning-position)
|
||||
end (line-end-position))
|
||||
(if (and keep-props (boundp 'jit-lock-mode) jit-lock-mode
|
||||
(text-property-not-all beg end 'fontified t))
|
||||
(jit-lock-fontify-now beg end))
|
||||
(push
|
||||
(funcall (if keep-props
|
||||
#'buffer-substring
|
||||
#'buffer-substring-no-properties)
|
||||
(line-beginning-position)
|
||||
(line-end-position))
|
||||
beg end)
|
||||
result)
|
||||
(forward-line (if forwardp 1 -1)))
|
||||
(nreverse result))))
|
||||
|
@ -982,14 +1001,17 @@ See also `multi-occur'."
|
|||
(when (setq endpt (re-search-forward regexp nil t))
|
||||
(setq matches (1+ matches)) ;; increment match count
|
||||
(setq matchbeg (match-beginning 0))
|
||||
(setq begpt (save-excursion
|
||||
(goto-char matchbeg)
|
||||
(line-beginning-position)))
|
||||
(setq lines (+ lines (1- (count-lines origpt endpt))))
|
||||
(save-excursion
|
||||
(goto-char matchbeg)
|
||||
(setq begpt (line-beginning-position)
|
||||
endpt (line-end-position)))
|
||||
(setq marker (make-marker))
|
||||
(set-marker marker matchbeg)
|
||||
(setq curstring (buffer-substring begpt
|
||||
(line-end-position)))
|
||||
(if (and keep-props (boundp 'jit-lock-mode) jit-lock-mode
|
||||
(text-property-not-all begpt endpt 'fontified t))
|
||||
(jit-lock-fontify-now begpt endpt))
|
||||
(setq curstring (buffer-substring begpt endpt))
|
||||
;; Depropertize the string, and maybe
|
||||
;; highlight the matches
|
||||
(let ((len (length curstring))
|
||||
|
@ -998,17 +1020,15 @@ See also `multi-occur'."
|
|||
(set-text-properties 0 len nil curstring))
|
||||
(while (and (< start len)
|
||||
(string-match regexp curstring start))
|
||||
(add-text-properties (match-beginning 0)
|
||||
(match-end 0)
|
||||
(append
|
||||
`(occur-match t)
|
||||
(when match-face
|
||||
;; Use `face' rather than
|
||||
;; `font-lock-face' here
|
||||
;; so as to override faces
|
||||
;; copied from the buffer.
|
||||
`(face ,match-face)))
|
||||
curstring)
|
||||
(add-text-properties
|
||||
(match-beginning 0) (match-end 0)
|
||||
(append
|
||||
`(occur-match t)
|
||||
(when match-face
|
||||
;; Use `face' rather than `font-lock-face' here
|
||||
;; so as to override faces copied from the buffer.
|
||||
`(face ,match-face)))
|
||||
curstring)
|
||||
(setq start (match-end 0))))
|
||||
;; Generate the string to insert for this match
|
||||
(let* ((out-line
|
||||
|
@ -1019,7 +1039,10 @@ See also `multi-occur'."
|
|||
(when prefix-face
|
||||
`(font-lock-face prefix-face))
|
||||
'(occur-prefix t)))
|
||||
curstring
|
||||
;; We don't put `mouse-face' on the newline,
|
||||
;; because that loses. And don't put it
|
||||
;; on context lines to reduce flicker.
|
||||
(propertize curstring 'mouse-face 'highlight)
|
||||
"\n"))
|
||||
(data
|
||||
(if (= nlines 0)
|
||||
|
@ -1043,10 +1066,7 @@ See also `multi-occur'."
|
|||
(insert "-------\n"))
|
||||
(add-text-properties
|
||||
beg end
|
||||
`(occur-target ,marker help-echo "mouse-2: go to this occurrence"))
|
||||
;; We don't put `mouse-face' on the newline,
|
||||
;; because that loses.
|
||||
(add-text-properties beg (1- end) '(mouse-face highlight)))))
|
||||
`(occur-target ,marker help-echo "mouse-2: go to this occurrence")))))
|
||||
(goto-char endpt))
|
||||
(if endpt
|
||||
(progn
|
||||
|
@ -1214,7 +1234,7 @@ but coerced to the correct value of INTEGERS."
|
|||
|
||||
(defun replace-match-maybe-edit (newtext fixedcase literal noedit match-data)
|
||||
"Make a replacement with `replace-match', editing `\\?'.
|
||||
NEXTEXT, FIXEDCASE, LITERAL are just passed on. If NOEDIT is true, no
|
||||
NEWTEXT, FIXEDCASE, LITERAL are just passed on. If NOEDIT is true, no
|
||||
check for `\\?' is made to save time. MATCH-DATA is used for the
|
||||
replacement. In case editing is done, it is changed to use markers.
|
||||
|
||||
|
@ -1281,6 +1301,9 @@ make, or the user didn't cancel the call."
|
|||
;; (match-data); otherwise it is t if a match is possible at point.
|
||||
(match-again t)
|
||||
|
||||
(isearch-string isearch-string)
|
||||
(isearch-regexp isearch-regexp)
|
||||
(isearch-case-fold-search isearch-case-fold-search)
|
||||
(message
|
||||
(if query-flag
|
||||
(substitute-command-keys
|
||||
|
@ -1313,6 +1336,12 @@ make, or the user didn't cancel the call."
|
|||
(if regexp-flag from-string
|
||||
(regexp-quote from-string))
|
||||
"\\b")))
|
||||
(when query-replace-lazy-highlight
|
||||
(setq isearch-string search-string
|
||||
isearch-regexp (or delimited-flag regexp-flag)
|
||||
isearch-case-fold-search case-fold-search
|
||||
isearch-lazy-highlight-last-string nil))
|
||||
|
||||
(push-mark)
|
||||
(undo-boundary)
|
||||
(unwind-protect
|
||||
|
@ -1380,7 +1409,7 @@ make, or the user didn't cancel the call."
|
|||
(if (not query-flag)
|
||||
(let ((inhibit-read-only
|
||||
query-replace-skip-read-only))
|
||||
(unless noedit
|
||||
(unless (or literal noedit)
|
||||
(replace-highlight (nth 0 real-match-data)
|
||||
(nth 1 real-match-data)))
|
||||
(setq noedit
|
||||
|
@ -1528,7 +1557,16 @@ make, or the user didn't cancel the call."
|
|||
(setq unread-command-events
|
||||
(append (listify-key-sequence key)
|
||||
unread-command-events))
|
||||
(setq done t))))
|
||||
(setq done t)))
|
||||
(when query-replace-lazy-highlight
|
||||
;; Restore isearch data for lazy highlighting
|
||||
;; in case of isearching during recursive edit
|
||||
(setq isearch-string search-string
|
||||
isearch-regexp (or delimited-flag regexp-flag)
|
||||
isearch-case-fold-search case-fold-search)
|
||||
;; Force lazy rehighlighting only after replacements
|
||||
(if (not (memq def '(skip backup)))
|
||||
(setq isearch-lazy-highlight-last-string nil))))
|
||||
;; Record previous position for ^ when we move on.
|
||||
;; Change markers to numbers in the match data
|
||||
;; since lots of markers slow down editing.
|
||||
|
@ -1564,26 +1602,44 @@ make, or the user didn't cancel the call."
|
|||
(and keep-going stack)))
|
||||
|
||||
(defcustom query-replace-highlight t
|
||||
"*Non-nil means to highlight words during query replacement."
|
||||
"*Non-nil means to highlight matches during query replacement."
|
||||
:type 'boolean
|
||||
:group 'matching)
|
||||
|
||||
(defcustom query-replace-lazy-highlight t
|
||||
"*Controls the lazy-highlighting during query replacements.
|
||||
When non-nil, all text in the buffer matching the current match
|
||||
is highlighted lazily using isearch lazy highlighting (see
|
||||
`isearch-lazy-highlight-initial-delay' and
|
||||
`isearch-lazy-highlight-interval')."
|
||||
:type 'boolean
|
||||
:group 'matching
|
||||
:version "21.4")
|
||||
|
||||
(defface query-replace
|
||||
'((t (:inherit isearch)))
|
||||
"Face for highlighting query replacement matches."
|
||||
:group 'matching
|
||||
:version "21.4")
|
||||
|
||||
(defvar replace-overlay nil)
|
||||
|
||||
(defun replace-dehighlight ()
|
||||
(and replace-overlay
|
||||
(progn
|
||||
(delete-overlay replace-overlay)
|
||||
(setq replace-overlay nil))))
|
||||
(defun replace-highlight (beg end)
|
||||
(if query-replace-highlight
|
||||
(if replace-overlay
|
||||
(move-overlay replace-overlay beg end (current-buffer))
|
||||
(setq replace-overlay (make-overlay beg end))
|
||||
(overlay-put replace-overlay 'priority 1) ;higher than lazy overlays
|
||||
(overlay-put replace-overlay 'face 'query-replace)))
|
||||
(if query-replace-lazy-highlight
|
||||
(isearch-lazy-highlight-new-loop)))
|
||||
|
||||
(defun replace-highlight (start end)
|
||||
(and query-replace-highlight
|
||||
(if replace-overlay
|
||||
(move-overlay replace-overlay start end (current-buffer))
|
||||
(setq replace-overlay (make-overlay start end))
|
||||
(overlay-put replace-overlay 'face
|
||||
(if (facep 'query-replace)
|
||||
'query-replace 'region)))))
|
||||
(defun replace-dehighlight ()
|
||||
(when replace-overlay
|
||||
(delete-overlay replace-overlay))
|
||||
(when query-replace-lazy-highlight
|
||||
(isearch-lazy-highlight-cleanup isearch-lazy-highlight-cleanup)
|
||||
(setq isearch-lazy-highlight-last-string nil)))
|
||||
|
||||
;; arch-tag: 16b4cd61-fd40-497b-b86f-b667c4cf88e4
|
||||
;;; replace.el ends here
|
||||
|
|
|
@ -123,33 +123,33 @@ to navigate in it.")
|
|||
|
||||
(make-variable-buffer-local 'next-error-function)
|
||||
|
||||
(defsubst next-error-buffer-p (buffer
|
||||
&optional
|
||||
extra-test-inclusive
|
||||
(defsubst next-error-buffer-p (buffer
|
||||
&optional
|
||||
extra-test-inclusive
|
||||
extra-test-exclusive)
|
||||
"Test if BUFFER is a next-error capable buffer.
|
||||
EXTRA-TEST-INCLUSIVE is called to allow extra buffers.
|
||||
EXTRA-TEST-INCLUSIVE is called to disallow buffers."
|
||||
EXTRA-TEST-EXCLUSIVE is called to disallow buffers."
|
||||
(with-current-buffer buffer
|
||||
(or (and extra-test-inclusive (funcall extra-test-inclusive))
|
||||
(and (if extra-test-exclusive (funcall extra-test-exclusive) t)
|
||||
next-error-function))))
|
||||
|
||||
(defun next-error-find-buffer (&optional other-buffer
|
||||
extra-test-inclusive
|
||||
(defun next-error-find-buffer (&optional other-buffer
|
||||
extra-test-inclusive
|
||||
extra-test-exclusive)
|
||||
"Return a next-error capable buffer.
|
||||
OTHER-BUFFER will disallow the current buffer.
|
||||
EXTRA-TEST-INCLUSIVE is called to allow extra buffers.
|
||||
EXTRA-TEST-INCLUSIVE is called to disallow buffers."
|
||||
EXTRA-TEST-EXCLUSIVE is called to disallow buffers."
|
||||
(or
|
||||
;; 1. If one window on the selected frame displays such buffer, return it.
|
||||
(let ((window-buffers
|
||||
(delete-dups
|
||||
(delq nil (mapcar (lambda (w)
|
||||
(if (next-error-buffer-p
|
||||
(window-buffer w)
|
||||
extra-test-inclusive extra-test-exclusive)
|
||||
(window-buffer w)
|
||||
extra-test-inclusive extra-test-exclusive)
|
||||
(window-buffer w)))
|
||||
(window-list))))))
|
||||
(if other-buffer
|
||||
|
@ -159,29 +159,29 @@ EXTRA-TEST-INCLUSIVE is called to disallow buffers."
|
|||
;; 2. If next-error-last-buffer is set to a live buffer, use that.
|
||||
(if (and next-error-last-buffer
|
||||
(buffer-name next-error-last-buffer)
|
||||
(next-error-buffer-p next-error-last-buffer
|
||||
extra-test-inclusive extra-test-exclusive)
|
||||
(next-error-buffer-p next-error-last-buffer
|
||||
extra-test-inclusive extra-test-exclusive)
|
||||
(or (not other-buffer)
|
||||
(not (eq next-error-last-buffer (current-buffer)))))
|
||||
next-error-last-buffer)
|
||||
;; 3. If the current buffer is a next-error capable buffer, return it.
|
||||
(if (and (not other-buffer)
|
||||
(next-error-buffer-p (current-buffer)
|
||||
extra-test-inclusive extra-test-exclusive))
|
||||
(next-error-buffer-p (current-buffer)
|
||||
extra-test-inclusive extra-test-exclusive))
|
||||
(current-buffer))
|
||||
;; 4. Look for a next-error capable buffer in a buffer list.
|
||||
(let ((buffers (buffer-list)))
|
||||
(while (and buffers
|
||||
(or (not (next-error-buffer-p
|
||||
(car buffers)
|
||||
extra-test-inclusive extra-test-exclusive))
|
||||
(or (not (next-error-buffer-p
|
||||
(car buffers)
|
||||
extra-test-inclusive extra-test-exclusive))
|
||||
(and other-buffer (eq (car buffers) (current-buffer)))))
|
||||
(setq buffers (cdr buffers)))
|
||||
(if buffers
|
||||
(car buffers)
|
||||
(or (and other-buffer
|
||||
(next-error-buffer-p (current-buffer)
|
||||
extra-test-inclusive extra-test-exclusive)
|
||||
(next-error-buffer-p (current-buffer)
|
||||
extra-test-inclusive extra-test-exclusive)
|
||||
;; The current buffer is a next-error capable buffer.
|
||||
(progn
|
||||
(if other-buffer
|
||||
|
@ -645,9 +645,6 @@ If BACKWARD-ONLY is non-nil, only delete spaces before point."
|
|||
(skip-chars-forward " \t")
|
||||
(constrain-to-field nil orig-pos t)))))
|
||||
|
||||
(defvar inhibit-mark-movement nil
|
||||
"If non-nil, \\[beginning-of-buffer] and \\[end-of-buffer] does not set the mark.")
|
||||
|
||||
(defun beginning-of-buffer (&optional arg)
|
||||
"Move point to the beginning of the buffer; leave mark at previous position.
|
||||
With \\[universal-argument] prefix, do not set mark at previous position.
|
||||
|
@ -659,8 +656,9 @@ of the accessible part of the buffer.
|
|||
Don't use this command in Lisp programs!
|
||||
\(goto-char (point-min)) is faster and avoids clobbering the mark."
|
||||
(interactive "P")
|
||||
(unless (or inhibit-mark-movement (consp arg))
|
||||
(push-mark))
|
||||
(or (consp arg)
|
||||
(and transient-mark-mode mark-active)
|
||||
(push-mark))
|
||||
(let ((size (- (point-max) (point-min))))
|
||||
(goto-char (if (and arg (not (consp arg)))
|
||||
(+ (point-min)
|
||||
|
@ -683,8 +681,9 @@ of the accessible part of the buffer.
|
|||
Don't use this command in Lisp programs!
|
||||
\(goto-char (point-max)) is faster and avoids clobbering the mark."
|
||||
(interactive "P")
|
||||
(unless (or inhibit-mark-movement (consp arg))
|
||||
(push-mark))
|
||||
(or (consp arg)
|
||||
(and transient-mark-mode mark-active)
|
||||
(push-mark))
|
||||
(let ((size (- (point-max) (point-min))))
|
||||
(goto-char (if (and arg (not (consp arg)))
|
||||
(- (point-max)
|
||||
|
@ -1485,6 +1484,17 @@ is not *inside* the region START...END."
|
|||
(t
|
||||
'(0 . 0)))
|
||||
'(0 . 0)))
|
||||
|
||||
;; When the first undo batch in an undo list is longer than undo-outer-limit,
|
||||
;; this function gets called to ask the user what to do.
|
||||
;; Garbage collection is inhibited around the call,
|
||||
;; so it had better not do a lot of consing.
|
||||
(setq undo-outer-limit-function 'undo-outer-limit-truncate)
|
||||
(defun undo-outer-limit-truncate (size)
|
||||
(if (yes-or-no-p (format "Buffer %s undo info is %d bytes long; discard it? "
|
||||
(buffer-name) size))
|
||||
(progn (setq buffer-undo-list nil) t)
|
||||
nil))
|
||||
|
||||
(defvar shell-command-history nil
|
||||
"History list for some commands that read shell commands.")
|
||||
|
@ -2991,11 +3001,11 @@ You can also deactivate the mark by typing \\[keyboard-quit] or
|
|||
Many commands change their behavior when Transient Mark mode is in effect
|
||||
and the mark is active, by acting on the region instead of their usual
|
||||
default part of the buffer's text. Examples of such commands include
|
||||
\\[comment-dwim], \\[flush-lines], \\[ispell], \\[keep-lines],
|
||||
\\[query-replace], \\[query-replace-regexp], and \\[undo]. Invoke
|
||||
\\[apropos-documentation] and type \"transient\" or \"mark.*active\" at
|
||||
the prompt, to see the documentation of commands which are sensitive to
|
||||
the Transient Mark mode."
|
||||
\\[comment-dwim], \\[flush-lines], \\[keep-lines], \
|
||||
\\[query-replace], \\[query-replace-regexp], \\[ispell], and \\[undo].
|
||||
Invoke \\[apropos-documentation] and type \"transient\" or
|
||||
\"mark.*active\" at the prompt, to see the documentation of
|
||||
commands which are sensitive to the Transient Mark mode."
|
||||
:global t :group 'editing-basics :require nil)
|
||||
|
||||
(defun pop-global-mark ()
|
||||
|
@ -3246,7 +3256,7 @@ Outline mode sets this."
|
|||
(if (if forward
|
||||
;; If going forward, don't accept the previous
|
||||
;; allowable position if it is before the target line.
|
||||
(< line-beg (point))
|
||||
(< line-beg (point))
|
||||
;; If going backward, don't accept the previous
|
||||
;; allowable position if it is still after the target line.
|
||||
(<= (point) line-end))
|
||||
|
@ -3527,12 +3537,17 @@ With argument, do this that many times."
|
|||
(interactive "p")
|
||||
(forward-word (- (or arg 1))))
|
||||
|
||||
(defun mark-word (arg)
|
||||
"Set mark arg words away from point.
|
||||
If this command is repeated, it marks the next ARG words after the ones
|
||||
already marked."
|
||||
(interactive "p")
|
||||
(cond ((and (eq last-command this-command) (mark t))
|
||||
(defun mark-word (&optional arg)
|
||||
"Set mark ARG words away from point.
|
||||
The place mark goes is the same place \\[forward-word] would
|
||||
move to with the same argument.
|
||||
If this command is repeated or mark is active in Transient Mark mode,
|
||||
it marks the next ARG words after the ones already marked."
|
||||
(interactive "P")
|
||||
(cond ((or (and (eq last-command this-command) (mark t))
|
||||
(and transient-mark-mode mark-active))
|
||||
(setq arg (if arg (prefix-numeric-value arg)
|
||||
(if (< (mark) (point)) -1 1)))
|
||||
(set-mark
|
||||
(save-excursion
|
||||
(goto-char (mark))
|
||||
|
@ -3541,7 +3556,7 @@ already marked."
|
|||
(t
|
||||
(push-mark
|
||||
(save-excursion
|
||||
(forward-word arg)
|
||||
(forward-word (prefix-numeric-value arg))
|
||||
(point))
|
||||
nil t))))
|
||||
|
||||
|
@ -4025,8 +4040,7 @@ or go back to just one window (by deleting all but the selected window)."
|
|||
(abort-recursive-edit))
|
||||
(current-prefix-arg
|
||||
nil)
|
||||
((and transient-mark-mode
|
||||
mark-active)
|
||||
((and transient-mark-mode mark-active)
|
||||
(deactivate-mark))
|
||||
((> (recursion-depth) 0)
|
||||
(exit-recursive-edit))
|
||||
|
|
13
lisp/subr.el
13
lisp/subr.el
|
@ -1874,6 +1874,19 @@ is allowed once again."
|
|||
,@body)
|
||||
(quit (setq quit-flag t) nil)))
|
||||
|
||||
(defmacro while-no-input (&rest body)
|
||||
"Execute BODY only as long as there's no pending input.
|
||||
If input arrives, that ends the execution of BODY,
|
||||
and `while-no-input' returns nil. If BODY finishes,
|
||||
`while-no-input' returns whatever value BODY produced."
|
||||
(declare (debug t) (indent 0))
|
||||
(let ((catch-sym (make-symbol "input")))
|
||||
`(with-local-quit
|
||||
(catch ',catch-sym
|
||||
(let ((throw-on-input ',catch-sym))
|
||||
(when (sit-for 0 0 t)
|
||||
,@body))))))
|
||||
|
||||
(defmacro combine-after-change-calls (&rest body)
|
||||
"Execute BODY, but don't call the after-change functions till the end.
|
||||
If BODY makes changes in the buffer, they are recorded
|
||||
|
|
24
lisp/term.el
24
lisp/term.el
|
@ -1402,7 +1402,7 @@ The main purpose is to get rid of the local keymap."
|
|||
:kl=\\EOD:kd=\\EOB:kr=\\EOC:ku=\\EOA:kN=\\E[6~:kP=\\E[5~:@7=\\E[4~:kh=\\E[1~\
|
||||
:mk=\\E[8m:cb=\\E[1K:op=\\E[39;49m:Co#8:pa#64:AB=\\E[4%%dm:AF=\\E[3%%dm:cr=^M\
|
||||
:bl=^G:do=^J:le=^H:ta=^I:se=\E[27m:ue=\E24m\
|
||||
:kb=^?:kD=^[[3~:sc=\E7:rc=\E8:"
|
||||
:kb=^?:kD=^[[3~:sc=\E7:rc=\E8:r1=\Ec:"
|
||||
;;; : -undefine ic
|
||||
;;; don't define :te=\\E[2J\\E[?47l\\E8:ti=\\E7\\E[?47h\
|
||||
"termcap capabilities supported")
|
||||
|
@ -2893,6 +2893,10 @@ See `term-prompt-regexp'."
|
|||
(term-goto (car term-saved-cursor)
|
||||
(cdr term-saved-cursor)))
|
||||
(setq term-terminal-state 0))
|
||||
((eq char ?c) ;; \Ec - Reset (terminfo: rs1)
|
||||
;; This is used by the "clear" program.
|
||||
(setq term-terminal-state 0)
|
||||
(term-reset-terminal))
|
||||
;; The \E#8 reset sequence for xterm. We
|
||||
;; probably don't need to handle it, but this
|
||||
;; is the code to parse it.
|
||||
|
@ -3020,13 +3024,29 @@ See `term-prompt-regexp'."
|
|||
(set-marker term-home-marker (point))
|
||||
(setq term-current-row (1- term-height))))))
|
||||
|
||||
;;; Reset the terminal, delete all the content and set the face to the
|
||||
;;; default one.
|
||||
(defun term-reset-terminal ()
|
||||
(erase-buffer)
|
||||
(setq term-current-row 1)
|
||||
(setq term-current-column 1)
|
||||
(setq term-insert-mode nil)
|
||||
(setq term-current-face nil)
|
||||
(setq term-ansi-current-underline 0)
|
||||
(setq term-ansi-current-bold 0)
|
||||
(setq term-ansi-current-reverse 0)
|
||||
(setq term-ansi-current-color 0)
|
||||
(setq term-ansi-current-invisible 0)
|
||||
(setq term-ansi-face-already-done 1)
|
||||
(setq term-ansi-current-bg-color 0))
|
||||
|
||||
;;; New function to deal with ansi colorized output, as you can see you can
|
||||
;;; have any bold/underline/fg/bg/reverse combination. -mm
|
||||
|
||||
(defun term-handle-colors-array (parameter)
|
||||
(cond
|
||||
|
||||
;;; Bold
|
||||
;;; Bold (terminfo: bold)
|
||||
((eq parameter 1)
|
||||
(setq term-ansi-current-bold 1))
|
||||
|
||||
|
|
|
@ -199,7 +199,7 @@ Switch to a buffer editing the last file dropped."
|
|||
(let
|
||||
((encoding-vector (make-vector 256 nil))
|
||||
(i 0)
|
||||
(vec ;; mac-centraleuropean (128..255) -> UCS mapping
|
||||
(vec ;; mac-centraleurroman (128..255) -> UCS mapping
|
||||
[ #x00C4 ;; 128:LATIN CAPITAL LETTER A WITH DIAERESIS
|
||||
#x0100 ;; 129:LATIN CAPITAL LETTER A WITH MACRON
|
||||
#x0101 ;; 130:LATIN SMALL LETTER A WITH MACRON
|
||||
|
@ -339,8 +339,8 @@ Switch to a buffer editing the last file dropped."
|
|||
(setq i (1+ i)))
|
||||
(setq translation-table
|
||||
(make-translation-table-from-vector encoding-vector))
|
||||
;; (define-translation-table 'mac-centraleuropean-decoder translation-table)
|
||||
(define-translation-table 'mac-centraleuropean-encoder
|
||||
;; (define-translation-table 'mac-centraleurroman-decoder translation-table)
|
||||
(define-translation-table 'mac-centraleurroman-encoder
|
||||
(char-table-extra-slot translation-table 0)))
|
||||
|
||||
(let
|
||||
|
@ -493,8 +493,8 @@ Switch to a buffer editing the last file dropped."
|
|||
(defvar mac-font-encoder-list
|
||||
'(("mac-roman" mac-roman-encoder
|
||||
ccl-encode-mac-roman-font "%s")
|
||||
("mac-centraleuropean" mac-centraleuropean-encoder
|
||||
ccl-encode-mac-centraleuropean-font "%s ce")
|
||||
("mac-centraleurroman" mac-centraleurroman-encoder
|
||||
ccl-encode-mac-centraleurroman-font "%s ce")
|
||||
("mac-cyrillic" mac-cyrillic-encoder
|
||||
ccl-encode-mac-cyrillic-font "%s cy")))
|
||||
|
||||
|
@ -515,15 +515,15 @@ Switch to a buffer editing the last file dropped."
|
|||
(if mac-encoded
|
||||
(aset table c mac-encoded))))))))
|
||||
|
||||
(define-ccl-program ccl-encode-mac-centraleuropean-font
|
||||
(define-ccl-program ccl-encode-mac-centraleurroman-font
|
||||
`(0
|
||||
(if (r0 != ,(charset-id 'ascii))
|
||||
(if (r0 <= ?\x8f)
|
||||
(translate-character mac-centraleuropean-encoder r0 r1)
|
||||
(translate-character mac-centraleurroman-encoder r0 r1)
|
||||
((r1 <<= 7)
|
||||
(r1 |= r2)
|
||||
(translate-character mac-centraleuropean-encoder r0 r1)))))
|
||||
"CCL program for Mac Central European font")
|
||||
(translate-character mac-centraleurroman-encoder r0 r1)))))
|
||||
"CCL program for Mac Central European Roman font")
|
||||
|
||||
(define-ccl-program ccl-encode-mac-cyrillic-font
|
||||
`(0
|
||||
|
|
|
@ -1975,7 +1975,7 @@ SPC: Accept word this time.
|
|||
(sit-for 5)
|
||||
(kill-buffer "*Ispell Help*"))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(let ((resize-mini-windows 'grow-only))
|
||||
(select-window (minibuffer-window))
|
||||
(erase-buffer)
|
||||
(message nil)
|
||||
|
|
|
@ -357,13 +357,15 @@ the number of paragraphs marked equals ARG.
|
|||
If ARG is negative, point is put at end of this paragraph, mark is put
|
||||
at beginning of this or a previous paragraph.
|
||||
|
||||
If this command is repeated, it marks the next ARG paragraphs after (or
|
||||
before, if arg is negative) the ones already marked."
|
||||
If this command is repeated or mark is active in Transient Mark mode,
|
||||
it marks the next ARG paragraphs after (or before, if arg is negative)
|
||||
the ones already marked."
|
||||
(interactive "p")
|
||||
(unless arg (setq arg 1))
|
||||
(when (zerop arg)
|
||||
(error "Cannot mark zero paragraphs"))
|
||||
(cond ((and (eq last-command this-command) (mark t))
|
||||
(cond ((or (and (eq last-command this-command) (mark t))
|
||||
(and transient-mark-mode mark-active))
|
||||
(set-mark
|
||||
(save-excursion
|
||||
(goto-char (mark))
|
||||
|
|
|
@ -1351,7 +1351,9 @@ Mark is left at original location."
|
|||
(when (eq (char-after) ?{)
|
||||
(let ((newpos (point)))
|
||||
(when (ignore-errors (backward-sexp 1) t)
|
||||
(if (looking-at "\\\\end\\>")
|
||||
(if (or (looking-at "\\\\end\\>")
|
||||
;; In case the \\ ends a verbatim section.
|
||||
(and (looking-at "end\\>") (eq (char-before) ?\\)))
|
||||
(tex-last-unended-begin)
|
||||
(goto-char newpos))))))))
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
;;; tooltip.el --- show tooltip windows
|
||||
|
||||
;; Copyright (C) 1997, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004
|
||||
;; Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Gerd Moellmann <gerd@acm.org>
|
||||
;; Keywords: help c mouse tools
|
||||
|
@ -476,7 +477,25 @@ This function must return nil if it doesn't handle EVENT."
|
|||
(defun tooltip-show-help-function (msg)
|
||||
"Function installed as `show-help-function'.
|
||||
MSG is either a help string to display, or nil to cancel the display."
|
||||
(let ((previous-help tooltip-help-message))
|
||||
(let ((previous-help tooltip-help-message)
|
||||
mp pos)
|
||||
(if (and mouse-1-click-follows-link
|
||||
(stringp msg)
|
||||
(save-match-data
|
||||
(string-match "^mouse-2" msg))
|
||||
(setq mp (mouse-pixel-position))
|
||||
(consp (setq pos (cdr mp)))
|
||||
(setq pos (posn-at-x-y (car pos) (cdr pos) (car mp)))
|
||||
(windowp (posn-window pos)))
|
||||
(with-current-buffer (window-buffer (posn-window pos))
|
||||
(if (mouse-on-link-p (posn-point pos))
|
||||
(setq msg (concat
|
||||
(cond
|
||||
((eq mouse-1-click-follows-link 'double) "double-")
|
||||
((and (integerp mouse-1-click-follows-link)
|
||||
(< mouse-1-click-follows-link 0)) "Long ")
|
||||
(t ""))
|
||||
"mouse-1" (substring msg 7))))))
|
||||
(setq tooltip-help-message msg)
|
||||
(cond ((null msg)
|
||||
;; Cancel display. This also cancels a delayed tip, if
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2004-12-11 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* url-handlers.el: Don't `require' everything eagerly.
|
||||
|
||||
2004-11-30 Paul Pogonyshev <pogonyshev@gmx.net>
|
||||
|
||||
* url-http.el (url-http-handle-cookies): Bind `url-current-object'
|
||||
|
@ -18,8 +22,7 @@
|
|||
|
||||
2004-11-12 Masatake YAMATO <jet@gyve.org>
|
||||
|
||||
* url-mailto.el (url-mailto): Fix a typo in the
|
||||
comment.
|
||||
* url-mailto.el (url-mailto): Fix a typo in the comment.
|
||||
|
||||
2004-11-02 Masatake YAMATO <jet@gyve.org>
|
||||
|
||||
|
@ -76,12 +79,12 @@
|
|||
|
||||
* url-vars.el (url-passwd-entry-func): Var deleted.
|
||||
(mm-mime-mule-charset-alist): Remove compatibility code for old Gnus.
|
||||
(url-weekday-alist): Renamed from weekday-alist.
|
||||
(url-monthabbrev-alist): Renamed from monthabbrev-alist.
|
||||
(url-weekday-alist): Rename from weekday-alist.
|
||||
(url-monthabbrev-alist): Rename from monthabbrev-alist.
|
||||
(url-vars-unload-hook): Initialize hook var to hold the function.
|
||||
|
||||
* url-util.el (url-get-normalized-date): Use
|
||||
url-weekday-alist and url-monthabbrev-alist.
|
||||
* url-util.el (url-get-normalized-date): Use url-weekday-alist and
|
||||
url-monthabbrev-alist.
|
||||
|
||||
* url-misc.el: Load cl at compile time.
|
||||
|
||||
|
@ -99,8 +102,8 @@
|
|||
* url-news.el (url-snews): Use nntp-open-tls-stream if
|
||||
url-gateway-method is tls.
|
||||
|
||||
* url-ldap.el (url-ldap-certificate-formatter): Use
|
||||
tls-certificate-information if ssl.el is not available.
|
||||
* url-ldap.el (url-ldap-certificate-formatter):
|
||||
Use tls-certificate-information if ssl.el is not available.
|
||||
|
||||
* url-https.el (url-https-create-secure-wrapper): Use tls if ssl
|
||||
is not available.
|
||||
|
|
|
@ -25,11 +25,21 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
(require 'url)
|
||||
(require 'url-parse)
|
||||
(require 'url-util)
|
||||
(require 'mm-decode)
|
||||
(require 'mailcap)
|
||||
;; (require 'url)
|
||||
(eval-when-compile (require 'url-parse))
|
||||
;; (require 'url-util)
|
||||
(eval-when-compile (require 'mm-decode))
|
||||
;; (require 'mailcap)
|
||||
;; The following functions in the byte compiler's warnings are known not
|
||||
;; to cause any real problem for the following reasons:
|
||||
;; - mm-save-part-to-file, mm-destroy-parts: always used
|
||||
;; after mm-dissect-buffer and defined in the same file.
|
||||
;; The following are autoloaded instead of `require'd to avoid eagerly
|
||||
;; loading all of URL when turning on url-handler-mode in the .emacs.
|
||||
(autoload 'url-retrieve-synchronously "url" "Retrieve url synchronously.")
|
||||
(autoload 'url-expand-file-name "url-expand" "Convert url to a fully specified url, and canonicalize it.")
|
||||
(autoload 'mm-dissect-buffer "mm-decode" "Dissect the current buffer and return a list of MIME handles.")
|
||||
(autoload 'url-scheme-get-property "url-methods" "Get property of a URL SCHEME.")
|
||||
|
||||
(eval-when-compile
|
||||
(require 'cl))
|
||||
|
|
|
@ -447,10 +447,14 @@ and that it passes `vc-svn-global-switches' to it before FLAGS."
|
|||
(vc-insert-file (expand-file-name ".svn/entries" dirname)))
|
||||
(goto-char (point-min))
|
||||
(when (re-search-forward
|
||||
(concat "name=\"svn:this_dir\"[\n\t ]*"
|
||||
"\\([-a-z]+=\"[^\"]*\"[\n\t ]*\\)*?"
|
||||
;; Old `svn' used name="svn:dir", newer use just name="".
|
||||
(concat "name=\"\\(?:svn:this_dir\\)?\"[\n\t ]*"
|
||||
"\\(?:[-a-z]+=\"[^\"]*\"[\n\t ]*\\)*?"
|
||||
"url=\"\\([^\"]+\\)\"") nil t)
|
||||
(match-string 2))))
|
||||
;; This is not a hostname but a URL. This may actually be considered
|
||||
;; as a feature since it allows vc-svn-stay-local to specify different
|
||||
;; behavior for different modules on the same server.
|
||||
(match-string 1))))
|
||||
|
||||
(defun vc-svn-parse-status (localp)
|
||||
"Parse output of \"svn status\" command in the current buffer.
|
||||
|
@ -505,6 +509,30 @@ essential information."
|
|||
(and (string-match "^[0-9]" tag)
|
||||
(not (string-match "[^0-9]" tag))))
|
||||
|
||||
;; Support for `svn annotate'
|
||||
|
||||
(defun vc-svn-annotate-command (file buf &optional rev)
|
||||
(vc-svn-command buf 0 file "annotate" (if rev (concat "-r" rev))))
|
||||
|
||||
(defun vc-svn-annotate-time-of-rev (rev)
|
||||
;; Arbitrarily assume 10 commmits per day.
|
||||
(/ (string-to-number rev) 10.0))
|
||||
|
||||
(defun vc-svn-annotate-current-time ()
|
||||
(vc-svn-annotate-time-of-rev vc-annotate-parent-rev))
|
||||
|
||||
(defconst vc-svn-annotate-re "[ \t]*\\([0-9]+\\)[ \t]+[^\t ]+ ")
|
||||
|
||||
(defun vc-svn-annotate-time ()
|
||||
(when (looking-at vc-svn-annotate-re)
|
||||
(goto-char (match-end 0))
|
||||
(vc-svn-annotate-time-of-rev (match-string 1))))
|
||||
|
||||
(defun vc-svn-annotate-extract-revision-at-line ()
|
||||
(save-excursion
|
||||
(beginning-of-line)
|
||||
(if (looking-at vc-svn-annotate-re) (match-string 1))))
|
||||
|
||||
(provide 'vc-svn)
|
||||
|
||||
;; arch-tag: 02f10c68-2b4d-453a-90fc-1eee6cfb268d
|
||||
|
|
|
@ -2836,7 +2836,7 @@ Uses `rcs2log' which only works for RCS and CVS."
|
|||
(pop-to-buffer
|
||||
(set-buffer (get-buffer-create "*vc*")))
|
||||
(erase-buffer)
|
||||
(insert-file tempfile)
|
||||
(insert-file-contents tempfile)
|
||||
"failed"))
|
||||
(setq default-directory (file-name-directory changelog))
|
||||
(delete-file tempfile)))))
|
||||
|
|
|
@ -327,6 +327,7 @@ new value.")
|
|||
(let ((keymap (widget-get widget :keymap))
|
||||
(face (or (widget-get widget :value-face) 'widget-field-face))
|
||||
(help-echo (widget-get widget :help-echo))
|
||||
(follow-link (widget-get widget :follow-link))
|
||||
(rear-sticky
|
||||
(or (not widget-field-add-space) (widget-get widget :size))))
|
||||
(if (functionp help-echo)
|
||||
|
@ -345,6 +346,7 @@ new value.")
|
|||
;; works in the field when, say, Custom uses `suppress-keymap'.
|
||||
(overlay-put overlay 'local-map keymap)
|
||||
(overlay-put overlay 'face face)
|
||||
(overlay-put overlay 'follow-link follow-link)
|
||||
(overlay-put overlay 'help-echo help-echo))
|
||||
(setq to (1- to))
|
||||
(setq rear-sticky t))
|
||||
|
@ -354,6 +356,7 @@ new value.")
|
|||
(overlay-put overlay 'field widget)
|
||||
(overlay-put overlay 'local-map keymap)
|
||||
(overlay-put overlay 'face face)
|
||||
(overlay-put overlay 'follow-link follow-link)
|
||||
(overlay-put overlay 'help-echo help-echo)))
|
||||
(widget-specify-secret widget))
|
||||
|
||||
|
@ -378,6 +381,7 @@ new value.")
|
|||
(defun widget-specify-button (widget from to)
|
||||
"Specify button for WIDGET between FROM and TO."
|
||||
(let ((overlay (make-overlay from to nil t nil))
|
||||
(follow-link (widget-get widget :follow-link))
|
||||
(help-echo (widget-get widget :help-echo)))
|
||||
(widget-put widget :button-overlay overlay)
|
||||
(if (functionp help-echo)
|
||||
|
@ -389,6 +393,7 @@ new value.")
|
|||
(unless (widget-get widget :suppress-face)
|
||||
(overlay-put overlay 'face (widget-apply widget :button-face-get)))
|
||||
(overlay-put overlay 'pointer 'hand)
|
||||
(overlay-put overlay 'follow-link follow-link)
|
||||
(overlay-put overlay 'help-echo help-echo)))
|
||||
|
||||
(defun widget-mouse-help (window overlay point)
|
||||
|
@ -1705,6 +1710,7 @@ If END is omitted, it defaults to the length of LIST."
|
|||
"An embedded link."
|
||||
:button-prefix 'widget-link-prefix
|
||||
:button-suffix 'widget-link-suffix
|
||||
:follow-link "\C-m"
|
||||
:help-echo "Follow the link."
|
||||
:format "%[%t%]")
|
||||
|
||||
|
|
|
@ -179,6 +179,8 @@ If PARSE-NS is non-nil, then QNAMES are expanded."
|
|||
xml)))
|
||||
|
||||
|
||||
(defvar xml-name-re)
|
||||
(defvar xml-entity-value-re)
|
||||
(let* ((start-chars (concat "[:alpha:]:_"))
|
||||
(name-chars (concat "-[:digit:]." start-chars))
|
||||
;;[3] S ::= (#x20 | #x9 | #xD | #xA)+
|
||||
|
|
|
@ -1,3 +1,26 @@
|
|||
2004-12-21 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* commands.texi (Event Input Misc): Add while-no-input.
|
||||
|
||||
2004-12-11 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* display.texi (Line Height): Rewrite text for clarity.
|
||||
|
||||
2004-12-11 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
* display.texi (Display): Add node "Line Height" to menu.
|
||||
(Line Height): New node. Move full description of line-spacing
|
||||
and line-height text properties here from text.texi.
|
||||
(Scroll Bars): Add vertical-scroll-bar variable.
|
||||
|
||||
* frames.texi (Window Frame Parameters): Remove line-height defvar.
|
||||
|
||||
* locals.texi (Standard Buffer-Local Variables): Fix xref for
|
||||
line-spacing and vertical-scroll-bar.
|
||||
|
||||
* text.texi (Special Properties): Just mention line-spacing and
|
||||
line-height here, add xref to new "Line Height" node.
|
||||
|
||||
2004-12-09 Thien-Thi Nguyen <ttn@gnu.org>
|
||||
|
||||
* frames.texi (Window Frame Parameters): New @defvar for `line-spacing'.
|
||||
|
|
|
@ -2388,6 +2388,18 @@ The alias @code{last-input-char} exists for compatibility with
|
|||
Emacs version 18.
|
||||
@end defvar
|
||||
|
||||
@defmac while-no-input body...
|
||||
This construct runs the @var{body} forms and returns the value
|
||||
of the last one---but only if no input arrives. If any input
|
||||
arrives during the execution of the @var{body} forms, it aborts
|
||||
them (working much like a quit), and the @code{while-no-input}
|
||||
form returns @code{nil}.
|
||||
|
||||
If a part of @var{body} binds @code{inhibit-quit} to non-@code{nil},
|
||||
arrival of input during those parts won't cause an abort until
|
||||
the end of that part.
|
||||
@end defmac
|
||||
|
||||
@defun discard-input
|
||||
@cindex flush input
|
||||
@cindex discard input
|
||||
|
|
|
@ -23,6 +23,7 @@ that Emacs presents to the user.
|
|||
* Temporary Displays:: Displays that go away automatically.
|
||||
* Overlays:: Use overlays to highlight parts of the buffer.
|
||||
* Width:: How wide a character or string is on the screen.
|
||||
* Line Height:: Controlling the height of lines.
|
||||
* Faces:: A face defines a graphics style for text characters:
|
||||
font, colors, etc.
|
||||
* Fringes:: Controlling window fringes.
|
||||
|
@ -1510,6 +1511,98 @@ the beginning of the result if one multi-column character in
|
|||
@end example
|
||||
@end defun
|
||||
|
||||
@node Line Height
|
||||
@section Line Height
|
||||
@cindex line height
|
||||
|
||||
The total height of each display line consists of the height of the
|
||||
contents of the line, and additional vertical line spacing below the
|
||||
display row.
|
||||
|
||||
The height of the line contents is normally determined from the
|
||||
maximum height of any character or image on that display line,
|
||||
including the final newline if there is one. (A line that is
|
||||
continued doesn't include a final newline.) In the most common case,
|
||||
the line height equals the height of the default frame font.
|
||||
|
||||
There are several ways to explicitly control or change the line
|
||||
height, either by specifying an absolute height for the display line,
|
||||
or by adding additional vertical space below one or all lines.
|
||||
|
||||
@kindex line-height @r{(text property)}
|
||||
A newline can have a @code{line-height} text or overlay property
|
||||
that controls the total height of the display line ending in that
|
||||
newline. If the property value is zero, the displayed height of the
|
||||
line is exactly what its contents need; no line-spacing is added.
|
||||
This case is useful for tiling small images or image slices without
|
||||
adding blank areas between the images.
|
||||
|
||||
If the property value is not zero, it specifies a desired height,
|
||||
@var{line-height}. There are several ways it can do this:
|
||||
|
||||
@table @code
|
||||
@item @var{integer}
|
||||
If the property is a positive integer, @var{line-height} is that integer.
|
||||
@item @var{float}
|
||||
If the property is a float, @var{float}, @var{line-height} is @var{float}
|
||||
times the frame's default line height.
|
||||
@item (@var{ratio} . @var{face})
|
||||
If the property is a cons of the format shown, @var{line-height} is
|
||||
@var{ratio} times the height of face @var{face}. @var{ratio} can be
|
||||
any type of number. If @var{face} is @code{t}, it refers to the
|
||||
current face.
|
||||
@end table
|
||||
|
||||
Thus, any valid nonzero property value specifies a height in pixels,
|
||||
@var{line-height}, one way or another. If the line contents' height
|
||||
is less than @var{line-height}, Emacs adds extra vertical space above
|
||||
the line to achieve the total height @var{line-height}. Otherwise,
|
||||
@var{line-height} has no effect.
|
||||
|
||||
If you don't specify the @code{line-height} propery, the line's
|
||||
height consists of the contents' height plus the line spacing.
|
||||
|
||||
@vindex default-line-spacing
|
||||
You can specify the line spacing for all lines in a frame with the
|
||||
@code{line-spacing} frame parameter, @xref{Window Frame Parameters}.
|
||||
However, if the variable @code{default-line-spacing} is
|
||||
non-@code{nil}, it overrides the frame's @code{line-spacing}
|
||||
parameter. An integer value specifies the number of pixels put below
|
||||
lines on window systems. A floating point number specifies the
|
||||
spacing relative to the frame's default line height.
|
||||
|
||||
@vindex line-spacing
|
||||
You can specify the line spacing for all lines in a buffer via the
|
||||
buffer-local @code{line-spacing} variable. An integer value specifies
|
||||
the number of pixels put below lines on window systems. A floating
|
||||
point number specifies the spacing relative to the default frame line
|
||||
height. This overrides line spacings specified for the frame.
|
||||
|
||||
@kindex line-spacing @r{(text property)}
|
||||
Finally, a newline can have a @code{line-spacing} text or overlay
|
||||
property that controls the height of the display line ending with that
|
||||
newline. The property value overrides the default frame line spacing
|
||||
and the buffer local @code{line-spacing} variable.
|
||||
|
||||
One way or another, these mechanisms specify a line spacing for each
|
||||
line. Let's call the value @var{line-spacing}.
|
||||
|
||||
If the @var{line-spacing} value is a positive integer, it specifies
|
||||
the number of pixels of additional vertical space. This space appears
|
||||
below the display line contents.
|
||||
|
||||
If the @var{line-spacing} value is a floating point number or cons,
|
||||
the additional vertical space is @var{line-spacing} times the frame
|
||||
default line height.
|
||||
|
||||
@ignore @c I think we may want to delete this, so don't document it -- rms.
|
||||
If the @var{line-spacing} value is a cons @code{(total . @var{spacing})}
|
||||
where @var{spacing} is any of the forms described above, the value of
|
||||
@var{spacing} specifies the total displayed height of the line,
|
||||
regardless of the height of the characters in it. This is equivalent
|
||||
to using the @code{line-height} property.
|
||||
@end ignore
|
||||
|
||||
@node Faces
|
||||
@section Faces
|
||||
@cindex faces
|
||||
|
@ -2826,7 +2919,14 @@ non-@code{nil} parameter value means they do. The frame parameter
|
|||
@code{scroll-bar-width} specifies how wide they are (@code{nil}
|
||||
meaning the default). @xref{Window Frame Parameters}.
|
||||
|
||||
You can also control this for individual windows. Call the function
|
||||
@vindex vertical-scroll-bar
|
||||
You can enable or disable scroll bars for a particular buffer,
|
||||
by setting the variable @code{vertical-scroll-bar}. This variable
|
||||
automatically becomes buffer-local when set. The possible values are
|
||||
@code{left}, @code{right}, @code{t}, which means to use the
|
||||
frame's default, and @code{nil} for no scroll bar.
|
||||
|
||||
You can also control this for individual windows. Call the function
|
||||
@code{set-window-scroll-bars} to specify what to do for a specific window:
|
||||
|
||||
@defun set-window-scroll-bars window width &optional vertical-type horizontal-type
|
||||
|
|
|
@ -605,25 +605,6 @@ it and see if it works.)
|
|||
@end ignore
|
||||
@end table
|
||||
|
||||
@defvar line-spacing
|
||||
When this permanently buffer-local variable is non-nil, if its value is
|
||||
an integer, that many pixels of extra space are put below each line. If
|
||||
the value is a floating point number, compute the spacing by multiplying
|
||||
the value by the default frame line height.
|
||||
|
||||
Note that this variable and the frame parameter @code{line-spacing}
|
||||
(described above) control different things. The frame parameter is
|
||||
involved in setting the frame line height (@pxref{Creating Frames}),
|
||||
while the buffer-local variable is for already-created frames.
|
||||
|
||||
For example, if the frame parameter is nil, a variable value of 1.0
|
||||
``double-spaces'' the display because for every line of text, there is
|
||||
an additional full line of space put below it. Likewise, a value of 2.0
|
||||
``triple-spaces'' the display, and so forth. If, on the other hand, the
|
||||
frame parameter is 10, a variable value of 10 would effectively put 20
|
||||
pixels of space under the text.
|
||||
@end defvar
|
||||
|
||||
@defvar blink-cursor-alist
|
||||
This variable specifies how to blink the cursor. Each element has the
|
||||
form @code{(@var{on-state} . @var{off-state})}. Whenever the cursor
|
||||
|
|
|
@ -132,7 +132,7 @@ Does not work yet.
|
|||
@xref{Display Margins}.
|
||||
|
||||
@item line-spacing
|
||||
@xref{Window Frame Parameters}.
|
||||
@xref{Line Height}.
|
||||
|
||||
@item local-abbrev-table
|
||||
@xref{Abbrevs}.
|
||||
|
@ -198,7 +198,7 @@ Used for communication between mouse commands and scroll-bar commands.
|
|||
@xref{Mode Line Variables}.
|
||||
|
||||
@item vertical-scroll-bar
|
||||
@xref{Yet to be written}.
|
||||
@xref{Scroll Bars}.
|
||||
@end table
|
||||
|
||||
@ignore
|
||||
|
|
|
@ -3002,45 +3002,13 @@ for possible pointer shapes.
|
|||
A newline can have a @code{line-spacing} text or overlay property that
|
||||
controls the height of the display line ending with that newline. The
|
||||
property value overrides the default frame line spacing and the buffer
|
||||
local @code{line-spacing} variable. We will call the property value
|
||||
@var{line-spacing}.
|
||||
|
||||
If @var{line-spacing} is a positive integer, the value specifies
|
||||
additional vertical space, below the display line, in pixels.
|
||||
|
||||
If @var{line-spacing} is a floating point number or cons, the
|
||||
additional vertical space is the product of @var{line-spacing} and the
|
||||
default frame line height.
|
||||
|
||||
If the @var{line-spacing} value is a cons @code{(total .
|
||||
@var{spacing})} where @var{spacing} is any of the forms described
|
||||
above, the value of @var{spacing} specifies the total displayed height
|
||||
of the line, regardless of the height of the characters in it. This
|
||||
is equivalent to using the @code{line-height} property.
|
||||
local @code{line-spacing} variable. @xref{Line Height}.
|
||||
|
||||
@item line-height
|
||||
@kindex line-height @r{(text property)}
|
||||
A newline can have a @code{line-height} text or overlay property that
|
||||
controls the total height of the display line ending in that newline.
|
||||
We will call the property value @var{line-height}.
|
||||
|
||||
If @var{line-height} is 0, the height of the line is determined solely
|
||||
from its contents; nothing is added. Any @code{line-spacing} property
|
||||
on this newline is ignored. This case is useful for tiling small
|
||||
images or image slices without adding blank areas between the images.
|
||||
|
||||
If @var{line-height} is a positive integer, the value specifies the
|
||||
minimum line height in pixels. The line's ascent height is
|
||||
increased as necessary to achieve the specified height.
|
||||
|
||||
If @var{line-height} is a floating point number, the minimum line
|
||||
height is the product of @var{line-height} and the default frame line
|
||||
height.
|
||||
|
||||
If @var{line-height} is a cons @code{(@var{ratio} . @var{face})}, the
|
||||
minimum line height is calculated as @var{ratio} times the height of
|
||||
face @var{face}. The @var{ratio} is an integer or a floating point
|
||||
number. If @var{face} is @code{t}, it refers to the current face.
|
||||
@xref{Line Height}.
|
||||
|
||||
@item modification-hooks
|
||||
@cindex change hooks for a character
|
||||
|
|
|
@ -1,3 +1,57 @@
|
|||
2004-12-20 Jay Belanger <belanger@truman.edu>
|
||||
|
||||
* calc.texi (Types Tutorial): Emphasized that you can't divide by
|
||||
zero.
|
||||
|
||||
2004-12-17 Luc Teirlinck <teirllm@auburn.edu>
|
||||
|
||||
* cc-mode.texi (Text Filling and Line Breaking): Put period after
|
||||
@xref.
|
||||
(Font Locking): Avoid @strong{Note:}.
|
||||
|
||||
2004-12-17 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
Sync with Tramp 2.0.46.
|
||||
|
||||
* tramp.texi (bottom): Add arch-tag. It was lost, somehow.
|
||||
|
||||
2004-12-16 Luc Teirlinck <teirllm@auburn.edu>
|
||||
|
||||
* url.texi: Correct typos.
|
||||
(Retrieving URLs): @var{nil}->@code{nil}.
|
||||
(HTTP language/coding, mailto): Replace "GNU Emacs Manual" with
|
||||
the standard "The GNU Emacs Manual" in fifth argument of @xref's.
|
||||
(Dealing with HTTP documents): @inforef->@xref.
|
||||
|
||||
2004-12-15 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* mark.texi (Transient Mark, Mark Ring): M-< and other
|
||||
movement commands don't set mark in Transient Mark mode
|
||||
if mark is active.
|
||||
|
||||
2004-12-15 Jay Belanger <belanger@truman.edu>
|
||||
|
||||
* calc.texi: Consistently capitalized all mode names.
|
||||
(Answers to Exercises): Mention that an answer can be a fraction
|
||||
when in Fraction mode.
|
||||
|
||||
2004-12-13 Jay Belanger <belanger@truman.edu>
|
||||
|
||||
* calc.texi: Fix some TeX definitions.
|
||||
|
||||
2004-12-12 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* misc.texi (FFAP): Add C-x C-r, C-x C-v, C-x C-d,
|
||||
C-x 4 r, C-x 4 d, C-x 5 r, C-x 5 d.
|
||||
|
||||
* dired.texi (Dired Navigation): Add @r{(Dired)} to M-g.
|
||||
(Misc Dired Commands): Add @r{(Dired)} to w.
|
||||
|
||||
2004-12-12 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* mark.texi (Marking Objects): Marking commands also extend the
|
||||
region when mark is active in Transient Mark mode.
|
||||
|
||||
2004-12-09 Luc Teirlinck <teirllm@auburn.edu>
|
||||
|
||||
* reftex.texi (Imprint): Remove erroneous @value's.
|
||||
|
@ -133,6 +187,13 @@
|
|||
to Alex Ott, Karl Fogel, Stefan Monnier, and David Kastrup for
|
||||
suggestions.
|
||||
|
||||
2004-12-08 Reiner Steib <Reiner.Steib@gmx.de>
|
||||
|
||||
* gnus-faq.texi ([5.1]): Added missing bracket.
|
||||
|
||||
* gnus.texi (Filtering Spam Using The Spam ELisp Package): Index
|
||||
`spam-initialize'.
|
||||
|
||||
2004-11-22 Reiner Steib <Reiner.Steib@gmx.de>
|
||||
|
||||
* message.texi (Various Message Variables): Mention that all mail
|
||||
|
@ -140,11 +201,6 @@
|
|||
|
||||
* gnus.texi (Splitting Mail): Clarify bogus group.
|
||||
|
||||
2004-11-16 Reiner Steib <Reiner.Steib@gmx.de>
|
||||
|
||||
* gnus.texi (Filtering Spam Using The Spam ELisp Package): Index
|
||||
`spam-initialize'.
|
||||
|
||||
2004-11-02 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* emacs-mime.texi (Encoding Customization): Fix
|
||||
|
|
1202
man/calc.texi
1202
man/calc.texi
File diff suppressed because it is too large
Load diff
|
@ -1420,7 +1420,7 @@ then as the comment prefix. It defaults to @samp{*
|
|||
@code{c-block-comment-prefix} typically gets overriden by the default
|
||||
style @code{gnu}, which sets it to blank. You can see the line
|
||||
splitting effect described here by setting a different style,
|
||||
e.g. @code{k&r} @xref{Choosing a Style}}, which makes a comment
|
||||
e.g. @code{k&r} @xref{Choosing a Style}.}, which makes a comment
|
||||
|
||||
@example
|
||||
/* Got O(n^2) here, which is a Bad Thing. */
|
||||
|
@ -1643,7 +1643,7 @@ trailing backslashes.
|
|||
@cindex font locking
|
||||
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
@strong{Note:} The font locking in AWK mode is currently not integrated
|
||||
@strong{Please note:} The font locking in AWK mode is currently not integrated
|
||||
with the rest of @ccmode{}, so this section does not apply there.
|
||||
@xref{AWK Mode Font Locking}, instead.
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ so common in Dired that it deserves to be easy to type.) @key{DEL}
|
|||
(move up and unflag) is often useful simply for moving up.
|
||||
|
||||
@findex dired-goto-file
|
||||
@kindex M-g
|
||||
@kindex M-g @r{(Dired)}
|
||||
@kbd{M-g} (@code{dired-goto-file}) moves point to the line that
|
||||
describes a specified file or directory.
|
||||
|
||||
|
@ -1113,7 +1113,7 @@ and erases all flags and marks.
|
|||
@table @kbd
|
||||
@item w
|
||||
@cindex Adding to the kill ring in Dired.
|
||||
@kindex w
|
||||
@kindex w @r{(Dired)}
|
||||
@findex dired-copy-filename-as-kill
|
||||
The @kbd{w} command (@code{dired-copy-filename-as-kill}) puts the
|
||||
names of the marked (or next @var{n}) files into the kill ring, as if
|
||||
|
|
|
@ -1414,7 +1414,7 @@ Answer:
|
|||
message. For a follow up to a newsgroup, it's
|
||||
@samp{f} and @samp{F}
|
||||
(analog to @samp{r} and
|
||||
@samp{R}.
|
||||
@samp{R}).
|
||||
|
||||
|
||||
Enter new headers above the line saying "--text follows
|
||||
|
|
|
@ -191,7 +191,9 @@ You can activate the new region by executing @kbd{C-x C-x}
|
|||
(@code{exchange-point-and-mark}).
|
||||
|
||||
@item
|
||||
@kbd{C-s} when the mark is active does not alter the mark.
|
||||
Commands that normally set the mark before moving long distances (like
|
||||
@kbd{M-<} and @kbd{C-s}) do not alter the mark in Transient Mark mode
|
||||
when the mark is active.
|
||||
|
||||
@item
|
||||
Some commands operate on the region if a region is active. For
|
||||
|
@ -320,6 +322,8 @@ next balanced expression (@pxref{Expressions}). These commands handle
|
|||
arguments just like @kbd{M-f} and @kbd{C-M-f}. If you repeat these
|
||||
commands, the region is extended. For example, you can type either
|
||||
@kbd{C-u 2 M-@@} or @kbd{M-@@ M-@@} to mark the next two words.
|
||||
The region is also extended when the mark is active in Transient Mark
|
||||
mode, regardless of the last command.
|
||||
|
||||
@kindex C-x h
|
||||
@findex mark-whole-buffer
|
||||
|
@ -382,9 +386,10 @@ the same buffer.
|
|||
Many commands that can move long distances, such as @kbd{M-<}
|
||||
(@code{beginning-of-buffer}), start by setting the mark and saving the
|
||||
old mark on the mark ring. This is to make it easier for you to move
|
||||
back later. Searches set the mark if they move point. You can tell
|
||||
when a command sets the mark because it displays @samp{Mark set} in the
|
||||
echo area.
|
||||
back later. Searches set the mark if they move point. However, in
|
||||
Transient Mark mode, these commands do not set the mark when the mark
|
||||
is already active. You can tell when a command sets the mark because
|
||||
it displays @samp{Mark set} in the echo area.
|
||||
|
||||
If you want to move back to the same place over and over, the mark
|
||||
ring may not be convenient enough. If so, you can record the position
|
||||
|
|
|
@ -2219,7 +2219,7 @@ which has a similar feature of its own.
|
|||
@subsection Finding Files and URLs at Point
|
||||
@findex find-file-at-point
|
||||
@findex ffap
|
||||
@findex ffap-dired-at-point
|
||||
@findex dired-at-point
|
||||
@findex ffap-next
|
||||
@findex ffap-menu
|
||||
@cindex finding file at point
|
||||
|
@ -2248,18 +2248,36 @@ make the following key bindings and to install hooks for using
|
|||
@kindex C-x C-f @r{(FFAP)}
|
||||
Find @var{filename}, guessing a default from text around point
|
||||
(@code{find-file-at-point}).
|
||||
@item C-x 4 f
|
||||
@kindex C-x 4 f @r{(FFAP)}
|
||||
@code{ffap-other-window}, analogous to @code{find-file-other-window}.
|
||||
@item C-x 5 f
|
||||
@kindex C-x 5 f @r{(FFAP)}
|
||||
@code{ffap-other-frame}, analogous to @code{find-file-other-frame}.
|
||||
@item M-x ffap-next
|
||||
Search buffer for next file name or URL, then find that file or URL.
|
||||
@item C-x C-r
|
||||
@kindex C-x C-r @r{(FFAP)}
|
||||
@code{ffap-read-only}, analogous to @code{find-file-read-only}.
|
||||
@item C-x C-v
|
||||
@kindex C-x C-v @r{(FFAP)}
|
||||
@code{ffap-alternate-file}, analogous to @code{find-alternate-file}.
|
||||
@item C-x d @var{directory} @key{RET}
|
||||
@kindex C-x d @r{(FFAP)}
|
||||
Start Dired on @var{directory}, defaulting to the directory name at
|
||||
point (@code{ffap-dired-at-point}).
|
||||
point (@code{dired-at-point}).
|
||||
@item C-x C-d
|
||||
@code{ffap-list-directory}, analogous to @code{list-directory}.
|
||||
@item C-x 4 f
|
||||
@kindex C-x 4 f @r{(FFAP)}
|
||||
@code{ffap-other-window}, analogous to @code{find-file-other-window}.
|
||||
@item C-x 4 r
|
||||
@code{ffap-read-only-other-window}, analogous to
|
||||
@code{find-file-read-only-other-window}.
|
||||
@item C-x 4 d
|
||||
@code{ffap-dired-other-window}, analogous to @code{dired-other-window}.
|
||||
@item C-x 5 f
|
||||
@kindex C-x 5 f @r{(FFAP)}
|
||||
@code{ffap-other-frame}, analogous to @code{find-file-other-frame}.
|
||||
@item C-x 5 r
|
||||
@code{ffap-read-only-other-frame}, analogous to
|
||||
@code{find-file-read-only-other-frame}.
|
||||
@item C-x 5 d
|
||||
@code{ffap-dired-other-frame}, analogous to @code{dired-other-frame}.
|
||||
@item M-x ffap-next
|
||||
Search buffer for next file name or URL, then find that file or URL.
|
||||
@item S-Mouse-3
|
||||
@kindex S-Mouse-3 @r{(FFAP)}
|
||||
@code{ffap-at-mouse} finds the file guessed from text around the position
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
@c In the Tramp CVS, the version number is auto-frobbed from
|
||||
@c configure.ac, so you should edit that file and run
|
||||
@c "autoconf && ./configure" to change the version number.
|
||||
@set trampver 2.0.45
|
||||
@set trampver 2.0.46
|
||||
|
||||
@c Other flags from configuration
|
||||
@set prefix /usr/local
|
||||
|
|
94
man/url.texi
94
man/url.texi
|
@ -27,7 +27,7 @@ Copyright (C) 1993, 1994, 1995, 1996 William M. Perry
|
|||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1 or
|
||||
any later version published by the Free Software Foundation; with the
|
||||
Invariant Sections being
|
||||
Invariant Sections being
|
||||
``GNU GENERAL PUBLIC LICENSE''. A copy of the
|
||||
license is included in the section entitled ``GNU Free Documentation
|
||||
License.''
|
||||
|
@ -74,9 +74,9 @@ License.''
|
|||
* General Facilities:: URLs can be cached, accessed via a gateway
|
||||
and tracked in a history list.
|
||||
* Customization:: Variables you can alter.
|
||||
* Function Index::
|
||||
* Variable Index::
|
||||
* Concept Index::
|
||||
* Function Index::
|
||||
* Variable Index::
|
||||
* Concept Index::
|
||||
@end menu
|
||||
|
||||
@node Getting Started
|
||||
|
@ -115,7 +115,7 @@ The meaning of
|
|||
the @var{path} component depends on the service.
|
||||
|
||||
@menu
|
||||
* Configuration::
|
||||
* Configuration::
|
||||
* Parsed URLs:: URLs are parsed into vector structures.
|
||||
@end menu
|
||||
|
||||
|
@ -204,7 +204,7 @@ Recreates a URL string from the parsed @var{url}.
|
|||
@defun url-retrieve-synchronously url
|
||||
Retrieve @var{url} synchronously and return a buffer containing the
|
||||
data. @var{url} is either a string or a parsed URL structure. Return
|
||||
@var{nil} if there are no data associated with it (the case for dired,
|
||||
@code{nil} if there are no data associated with it (the case for dired,
|
||||
info, or mailto URLs that need no further processing).
|
||||
@end defun
|
||||
|
||||
|
@ -214,7 +214,7 @@ Retrieve @var{url} asynchronously and call @var{callback} with args
|
|||
has been completely retrieved, with the current buffer containing the
|
||||
object and any MIME headers associated with it. @var{url} is either a
|
||||
string or a parsed URL structure. Returns the buffer @var{url} will
|
||||
load into, or @var{nil} if the process has already completed.
|
||||
load into, or @code{nil} if the process has already completed.
|
||||
@end defun
|
||||
|
||||
@node Supported URL Types
|
||||
|
@ -222,7 +222,7 @@ load into, or @var{nil} if the process has already completed.
|
|||
|
||||
@menu
|
||||
* http/https:: Hypertext Transfer Protocol.
|
||||
* file/ftp:: Local files and FTP archives.
|
||||
* file/ftp:: Local files and FTP archives.
|
||||
* info:: Emacs `Info' pages.
|
||||
* mailto:: Sending email.
|
||||
* news/nntp/snews:: Usenet news.
|
||||
|
@ -235,7 +235,7 @@ load into, or @var{nil} if the process has already completed.
|
|||
@c * netrek::
|
||||
@c * prospero::
|
||||
* cid:: Content-ID.
|
||||
* about::
|
||||
* about::
|
||||
* ldap:: Lightweight Directory Access Protocol
|
||||
* imap:: IMAP mailboxes.
|
||||
* man:: Unix man pages.
|
||||
|
@ -273,10 +273,10 @@ otherwise the user will be asked on each request.
|
|||
|
||||
|
||||
@menu
|
||||
* Cookies::
|
||||
* HTTP language/coding::
|
||||
* HTTP URL Options::
|
||||
* Dealing with HTTP documents::
|
||||
* Cookies::
|
||||
* HTTP language/coding::
|
||||
* HTTP URL Options::
|
||||
* Dealing with HTTP documents::
|
||||
@end menu
|
||||
|
||||
@node Cookies
|
||||
|
@ -330,7 +330,7 @@ preferred character set encodings, e.g.@: Latin-9 or Big5, and these
|
|||
can be weighted. In Emacs 21 this list is generated automatically
|
||||
from the list of defined coding systems which have associated MIME
|
||||
types. These are sorted by coding priority. @xref{Recognize Coding,
|
||||
, Recognizing Coding Systems, emacs, GNU Emacs Manual}.
|
||||
, Recognizing Coding Systems, emacs, The GNU Emacs Manual}.
|
||||
@end defopt
|
||||
|
||||
@defopt url-mime-language-string
|
||||
|
@ -384,9 +384,9 @@ Currently this is just the raw header contents.
|
|||
|
||||
HTTP URLs are retrieved into a buffer containing the HTTP headers
|
||||
followed by the body. Since the headers are quasi-MIME, they may be
|
||||
processed using the MIME library. @inforef{Top, The MIME library,
|
||||
emacs-mime}. The URL package provides a function to do this in
|
||||
general:
|
||||
processed using the MIME library. @xref{Top,, Emacs MIME,
|
||||
emacs-mime, The Emacs MIME Manual}. The URL package provides a
|
||||
function to do this in general:
|
||||
|
||||
@defun url-decode-text-part handle &optional coding
|
||||
This function decodes charset-encoded text in the current buffer. In
|
||||
|
@ -414,8 +414,8 @@ file://@var{user}:@var{password}@@@var{host}:@var{port}/@var{file}
|
|||
@end example
|
||||
|
||||
These schemes are defined in RFC 1808.
|
||||
@samp{ftp:} and @samp{file:} are synonomous in this library. They
|
||||
allow reading arbitary files from hosts. Either @samp{ange-ftp}
|
||||
@samp{ftp:} and @samp{file:} are synonymous in this library. They
|
||||
allow reading arbitrary files from hosts. Either @samp{ange-ftp}
|
||||
(Emacs) or @samp{efs} (XEmacs) is used to retrieve them from remote
|
||||
hosts. Local files are accessed directly.
|
||||
|
||||
|
@ -451,13 +451,13 @@ Info URLs are not officially defined. They invoke
|
|||
@cindex email
|
||||
A mailto URL will send an email message to the address in the
|
||||
URL, for example @samp{mailto:foo@@bar.com} would compose a
|
||||
message to @samp{foo@@bar.com}.
|
||||
message to @samp{foo@@bar.com}.
|
||||
|
||||
@defopt url-mail-command
|
||||
@vindex mail-user-agent
|
||||
The function called whenever url needs to send mail. This should
|
||||
normally be left to default from @var{mail-user-agent}. @xref{Mail
|
||||
Methods, , Mail-Composition Methods, emacs, GNU Emacs Manual}.
|
||||
Methods, , Mail-Composition Methods, emacs, The GNU Emacs Manual}.
|
||||
@end defopt
|
||||
|
||||
An @samp{X-Url-From} header field containing the URL of the document
|
||||
|
@ -468,7 +468,7 @@ The form of a mailto URL is
|
|||
@example
|
||||
@samp{mailto:@var{mailbox}[?@var{header}=@var{contents}[&@var{header}=@var{contents}]]}
|
||||
@end example
|
||||
@noindent where an arbitary number of @var{header}s can be added. If the
|
||||
@noindent where an arbitrary number of @var{header}s can be added. If the
|
||||
@var{header} is @samp{body}, then @var{contents} is put in the body
|
||||
otherwise a @var{header} header field is created with @var{contents}
|
||||
as its contents. Note that the URL library does not consider any
|
||||
|
@ -493,11 +493,11 @@ fields may be included in news URLs though they are properly only
|
|||
allowed for nntp an snews.
|
||||
|
||||
@table @samp
|
||||
@item news:@var{newsgroup}
|
||||
@item news:@var{newsgroup}
|
||||
Retrieves a list of messages in @var{newsgroup};
|
||||
@item news:@var{message-id}
|
||||
Retrieves the message with the given @var{message-id};
|
||||
@item news:*
|
||||
@item news:*
|
||||
Retrieves a list of all available newsgroups;
|
||||
@item nntp://@var{host}:@var{port}/@var{newsgroup}
|
||||
@itemx nntp://@var{host}:@var{port}/@var{message-id}
|
||||
|
@ -510,7 +510,7 @@ Similar to the @samp{news} versions.
|
|||
@samp{snews} is the same as @samp{nntp} except that the default port
|
||||
is :563.
|
||||
@cindex SSL
|
||||
(It is tunnelled through SSL.)
|
||||
(It is tunneled through SSL.)
|
||||
|
||||
An @samp{nntp} URL is the same as a news URL, except that the URL may
|
||||
specify an article by its number.
|
||||
|
@ -550,9 +550,9 @@ Well-known ports are used if the URL does not specify a port.
|
|||
@cindex IRC
|
||||
@cindex Internet Relay Chat
|
||||
@cindex ZEN IRC
|
||||
@c Fixme: reference (was http://www.w3.org/Addressing/draft-mirashi-url-irc-01.txt)
|
||||
@c Fixme: reference (was http://www.w3.org/Addressing/draft-mirashi-url-irc-01.txt)
|
||||
@dfn{Internet Relay Chat} (IRC) is handled by handing off the @sc{irc}
|
||||
session to a function named in @code{url-irc-function}.
|
||||
session to a function named in @code{url-irc-function}.
|
||||
|
||||
@defopt url-irc-function
|
||||
A function to actually open an IRC connection.
|
||||
|
@ -582,7 +582,7 @@ including parameters. It defaults to
|
|||
@samp{text/plain;charset=US-ASCII}. The @samp{text/plain} can be
|
||||
omitted but the charset parameter supplied. If @samp{;base64} is
|
||||
present, the @var{data} are base64-encoded.
|
||||
|
||||
|
||||
@node nfs
|
||||
@section nfs
|
||||
@cindex NFS
|
||||
|
@ -658,11 +658,11 @@ the Lisp @code{man} function.
|
|||
@chapter Defining New URLs
|
||||
|
||||
@menu
|
||||
* Naming conventions::
|
||||
* Required functions::
|
||||
* Optional functions::
|
||||
* Asynchronous fetching::
|
||||
* Supporting file-name-handlers::
|
||||
* Naming conventions::
|
||||
* Required functions::
|
||||
* Optional functions::
|
||||
* Asynchronous fetching::
|
||||
* Supporting file-name-handlers::
|
||||
@end menu
|
||||
|
||||
@node Naming conventions
|
||||
|
@ -684,10 +684,10 @@ the Lisp @code{man} function.
|
|||
@chapter General Facilities
|
||||
|
||||
@menu
|
||||
* Disk Caching::
|
||||
* Proxies::
|
||||
* Gateways in general::
|
||||
* History::
|
||||
* Disk Caching::
|
||||
* Proxies::
|
||||
* Gateways in general::
|
||||
* History::
|
||||
@end menu
|
||||
|
||||
@node Disk Caching
|
||||
|
@ -761,7 +761,7 @@ more likely to conflict with other files.
|
|||
@end smallexample
|
||||
@end defun
|
||||
|
||||
@c Fixme: never actually used currently?
|
||||
@c Fixme: never actually used currently?
|
||||
@c @defopt url-standalone-mode
|
||||
@c @cindex Relying on cache
|
||||
@c @cindex Cache only mode
|
||||
|
@ -783,7 +783,7 @@ more likely to conflict with other files.
|
|||
@node Proxies
|
||||
@section Proxies and Gatewaying
|
||||
|
||||
@c fixme: check/document url-ns stuff
|
||||
@c fixme: check/document url-ns stuff
|
||||
@cindex proxy servers
|
||||
@cindex proxies
|
||||
@cindex environment variables
|
||||
|
@ -815,7 +815,7 @@ NO_PROXY="*.aventail.com,home.com,.seanet.com"
|
|||
@noindent says to contact all machines in the @samp{aventail.com} and
|
||||
@samp{seanet.com} domains directly, as well as the machine named
|
||||
@samp{home.com}. If @code{NO_PROXY} isn't defined, @code{no_PROXY}
|
||||
and @code{no_proxy} are also tried, in that order.
|
||||
and @code{no_proxy} are also tried, in that order.
|
||||
|
||||
Proxies may also be specified directly in Lisp.
|
||||
|
||||
|
@ -940,7 +940,7 @@ This specifies the default server, it takes the form
|
|||
where @var{version} can be either 4 or 5.
|
||||
@end defopt
|
||||
@defvar socks-password
|
||||
If this is @code{nil} then you will be asked for the passward,
|
||||
If this is @code{nil} then you will be asked for the password,
|
||||
otherwise it will be used as the password for authenticating you to
|
||||
the @sc{socks} server.
|
||||
@end defvar
|
||||
|
@ -980,9 +980,9 @@ This the @samp{nslookup} program. It is @code{"nslookup"} by default.
|
|||
@end defopt
|
||||
|
||||
@menu
|
||||
* Suppressing network connexions::
|
||||
* Suppressing network connexions::
|
||||
@end menu
|
||||
@c * Broken hostname resolution::
|
||||
@c * Broken hostname resolution::
|
||||
|
||||
@node Suppressing network connexions
|
||||
@subsection Suppressing Network Connexions
|
||||
|
@ -1010,7 +1010,7 @@ opened by the URL library.
|
|||
@c @cindex resolver, hostname
|
||||
@c Some C libraries do not include the hostname resolver routines in
|
||||
@c their static libraries. If Emacs was linked statically, and was not
|
||||
@c linked with the resolver libraries, it wil not be able to get to any
|
||||
@c linked with the resolver libraries, it will not be able to get to any
|
||||
@c machines off the local network. This is characterized by being able
|
||||
@c to reach someplace with a raw ip number, but not its hostname
|
||||
@c (@url{http://129.79.254.191/} works, but
|
||||
|
@ -1052,8 +1052,8 @@ The history `list' is actually a hash table,
|
|||
strings. The times are in the format returned by @code{current-time}.
|
||||
|
||||
@defun url-history-update-url url time
|
||||
This function updates the hsitory table with an entry for @var{url}
|
||||
accessed at the gievn @var{time}.
|
||||
This function updates the history table with an entry for @var{url}
|
||||
accessed at the given @var{time}.
|
||||
@end defun
|
||||
|
||||
@defopt url-history-track
|
||||
|
@ -1144,7 +1144,7 @@ function taking a single argument (the prompt) and returning @code{t}
|
|||
only if an affirmative answer is given.
|
||||
@end defopt
|
||||
@defopt url-gateway-method
|
||||
@c fixme: describe gatewaying
|
||||
@c fixme: describe gatewaying
|
||||
A symbol specifying the type of gateway support to use fro connexions
|
||||
from the local machine. The supported methods are:
|
||||
|
||||
|
|
166
src/ChangeLog
166
src/ChangeLog
|
@ -1,3 +1,159 @@
|
|||
2004-12-22 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* emacs.c (main): If batch mode, set Vundo_outer_limit to nil.
|
||||
|
||||
* lisp.h (Vundo_outer_limit): Fix decl.
|
||||
|
||||
* undo.c (Vundo_outer_limit): Replaces undo_outer_limit.
|
||||
Uses changed.
|
||||
(syms_of_undo): Initialize appropriately.
|
||||
(truncate_undo_list): If it's nil, there's no limit.
|
||||
|
||||
2004-12-22 Kenichi Handa <handa@m17n.org>
|
||||
|
||||
* xselect.c (Fx_get_cut_buffer_internal): Return a unibyte string.
|
||||
|
||||
2004-12-21 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* eval.c (unwind_to_catch): Clear immediate_quit.
|
||||
|
||||
* xdisp.c (get_next_display_element): Display codes 8a0 and 8ad
|
||||
specially as `\ ' and `\-'.
|
||||
|
||||
* keyboard.c (kbd_buffer_store_event_hold):
|
||||
In the code for while-no-input, handle immediate_quit.
|
||||
|
||||
* alloc.c (Fgarbage_collect): Update call to truncate_undo_list.
|
||||
Call that at the very start.
|
||||
(undo_limit, undo_strong_limit, undo_outer_limit): Moved to undo.c.
|
||||
(syms_of_alloc): Don't define undo-limit,
|
||||
undo-strong-limit and undo-outer-limit here.
|
||||
|
||||
* undo.c (truncate_undo_list): Return void.
|
||||
Take just one argument, the buffer.
|
||||
Make it current, and inhibit recursive GC.
|
||||
Access and update the undo list directly; return void.
|
||||
Refer to the undo...limit variables directly.
|
||||
Test undo_outer_limit only after counting the whole current command.
|
||||
When it's exceeded, call the function in undo-outer-limit-function.
|
||||
(undo_limit, undo_strong_limit, undo_outer_limit): From alloc.c.
|
||||
(Vundo_outer_limit_function): New variable.
|
||||
(syms_of_undo): Define undo-limit, undo-strong-limit
|
||||
and undo-outer-limit here, and undo-outer-limit-function.
|
||||
Doc fixes.
|
||||
|
||||
* lisp.h (truncate_undo_list): Update decl.
|
||||
|
||||
2004-12-21 Piet van Oostrum <piet@cs.uu.nl>
|
||||
|
||||
* fileio.c (Fread_file_name): Delete duplicates in
|
||||
file-name-history when history_delete_duplicates is true.
|
||||
|
||||
2004-12-20 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
|
||||
|
||||
* macterm.c (mac_do_list_fonts): Fix memory leak
|
||||
|
||||
2004-12-20 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* regex.c (re_match_2_internal) <symend, wordend>:
|
||||
Fix calls to UPDATE_SYNTAX_TABLE_FORWARD.
|
||||
|
||||
2004-12-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
|
||||
|
||||
* macterm.c (endif, x_font_name_to_mac_font_name): Use
|
||||
maccentraleurroman instead of maccentraleuropean
|
||||
(mac_c_string_match, mac_do_list_fonts): Speed up font search by
|
||||
quickly finding a specific font without needing regexps.
|
||||
|
||||
2004-12-15 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
|
||||
|
||||
* syssignal.h: Declare main_thread.
|
||||
(SIGNAL_THREAD_CHECK): New macro.
|
||||
|
||||
* keyboard.c (input_available_signal): Move thread checking code
|
||||
to macro SIGNAL_THREAD_CHECK and call that macro.
|
||||
(interrupt_signal): Call SIGNAL_THREAD_CHECK.
|
||||
|
||||
* alloc.c (uninterrupt_malloc): Move main_thread to emacs.c.
|
||||
|
||||
* emacs.c: Define main_thread.
|
||||
(main): Initialize main_thread.
|
||||
(handle_USR1_signal, handle_USR2_signal, fatal_error_signal)
|
||||
(memory_warning_signal): Call SIGNAL_THREAD_CHECK.
|
||||
|
||||
* floatfns.c (float_error): Call SIGNAL_THREAD_CHECK.
|
||||
|
||||
* dispnew.c (window_change_signal): Call SIGNAL_THREAD_CHECK.
|
||||
|
||||
* sysdep.c (select_alarm): Call SIGNAL_THREAD_CHECK.
|
||||
|
||||
* process.c (send_process_trap, sigchld_handler): Call
|
||||
SIGNAL_THREAD_CHECK.
|
||||
|
||||
* data.c (arith_error): Call SIGNAL_THREAD_CHECK.
|
||||
|
||||
* atimer.c (alarm_signal_handler): Call SIGNAL_THREAD_CHECK.
|
||||
|
||||
* xterm.c (xg_scroll_callback): Update XG_LAST_SB_DATA before
|
||||
returning when xg_ignore_gtk_scrollbar is true.
|
||||
|
||||
2004-12-14 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
* keyboard.c (read_char): Save and restore echo_string when
|
||||
handling input method.
|
||||
|
||||
2004-12-13 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* eval.c (syms_of_eval) <quit-flag>: Doc fix.
|
||||
|
||||
* keyboard.c (Vthrow_on_input): New variable.
|
||||
(syms_of_keyboard): Defvar and initialize it.
|
||||
(kbd_buffer_store_event_hold): Handle Vthrow_on_input.
|
||||
|
||||
* lisp.h (QUIT): Check for Vthrow_on_input.
|
||||
(Vthrow_on_input): Declare it.
|
||||
|
||||
2004-12-13 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
* xdisp.c (set_iterator_to_next): Reset stop_charpos after display
|
||||
vector.
|
||||
|
||||
2004-12-12 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* indent.c (Fvertical_motion): Call move_it_by_lines even if LINES = 0.
|
||||
|
||||
* minibuf.c (Fall_completions): Add var `zero' and use it in loop.
|
||||
(Ftry_completion): Really use outer `zero'; eliminate inner one.
|
||||
|
||||
2004-12-12 Kenichi Handa <handa@m17n.org>
|
||||
|
||||
* term.c (encode_terminal_code): Fix previous change.
|
||||
|
||||
2004-12-11 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* keyboard.c (handle_async_input): Remove pthread mutex handling.
|
||||
(input_available_signal): Move pthread thingy to !SYNC_INPUT branch.
|
||||
|
||||
* syntax.c (Fforward_word): Avoid non-idempotent side-effects
|
||||
in macro arguments.
|
||||
|
||||
* minibuf.c (Ftry_completion, Fall_completions): Don't use
|
||||
XFASTINT blindly.
|
||||
|
||||
* emacs.c (main, Fdump_emacs): Don't touch malloc hooks if SYNC_INPUT.
|
||||
|
||||
2004-12-11 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
|
||||
|
||||
* w32term.c (x_calc_absolute_position): Remove calculation of
|
||||
difference between inner and outer window. Don't subtract difference
|
||||
for left and top calculations.
|
||||
|
||||
* xterm.c (x_calc_absolute_position): Don't subtract outer_pixel_diff
|
||||
for left and top calculations. Remove call to x_real_positions.
|
||||
[Bug report by Drew Adams in November]
|
||||
(x_check_expected_move): Do not set change_gravity to 1 when calling
|
||||
x_set_offset.
|
||||
|
||||
2004-12-08 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* xdisp.c (get_next_display_element): Use `escape-glyph' for
|
||||
|
@ -17,8 +173,8 @@
|
|||
* emacs.c (Fdump_emacs): Add ! defined (SYSTEM_MALLOC) around
|
||||
reset_malloc_hooks.
|
||||
|
||||
* keyboard.c (handle_async_input, input_available_signal): Add
|
||||
! defined (SYSTEM_MALLOC) around thread code.
|
||||
* keyboard.c (handle_async_input, input_available_signal):
|
||||
Add ! defined (SYSTEM_MALLOC) around thread code.
|
||||
|
||||
* alloc.c: Add comment about the reason for (UN)BLOCK_INPUT_ALLOC.
|
||||
|
||||
|
@ -56,12 +212,11 @@
|
|||
* emacs.c (Fdump_emacs): Call reset_malloc_hooks.
|
||||
|
||||
* keyboard.c: Conditionally include pthread.h
|
||||
(handle_async_inpu, input_available_signalt): If not in the main
|
||||
(handle_async_input, input_available_signalt): If not in the main
|
||||
thread, block signal, send signal to main thread and return.
|
||||
|
||||
* gtkutil.c (xg_get_file_with_chooser): Handle local files only.
|
||||
Set current folder in file chooser if default_filename is a
|
||||
directory.
|
||||
Set current folder in file chooser if default_filename is a directory.
|
||||
|
||||
2004-12-05 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
|
@ -92,6 +247,7 @@
|
|||
* eval.c (Fcalled_interactively_p): Don't check INTERACTIVE.
|
||||
(interactive_p): Skip Scalled_interactively_p frames
|
||||
like Sinteractive_p frames.
|
||||
(unwind_to_catch): Clear handling_signal.
|
||||
|
||||
* data.c (Fmake_variable_buffer_local): Doc fix.
|
||||
(Fmake_local_variable): Doc fix.
|
||||
|
|
109
src/alloc.c
109
src/alloc.c
|
@ -99,7 +99,7 @@ extern __malloc_size_t __malloc_extra_blocks;
|
|||
If Emacs sets malloc hooks (! SYSTEM_MALLOC) and the emacs_blocked_*
|
||||
functions below are called from malloc, there is a chance that one
|
||||
of these threads preempts the Emacs main thread and the hook variables
|
||||
end up in a inconsistent state. So we have a mutex to prevent that (note
|
||||
end up in an inconsistent state. So we have a mutex to prevent that (note
|
||||
that the backend handles concurrent access to malloc within its own threads
|
||||
but Emacs code running in the main thread is not included in that control).
|
||||
|
||||
|
@ -109,7 +109,6 @@ extern __malloc_size_t __malloc_extra_blocks;
|
|||
To prevent that, we only call BLOCK/UNBLOCK from the main thread. */
|
||||
|
||||
static pthread_mutex_t alloc_mutex;
|
||||
pthread_t main_thread;
|
||||
|
||||
#define BLOCK_INPUT_ALLOC \
|
||||
do \
|
||||
|
@ -201,12 +200,6 @@ extern
|
|||
#endif /* VIRT_ADDR_VARIES */
|
||||
int malloc_sbrk_unused;
|
||||
|
||||
/* Two limits controlling how much undo information to keep. */
|
||||
|
||||
EMACS_INT undo_limit;
|
||||
EMACS_INT undo_strong_limit;
|
||||
EMACS_INT undo_outer_limit;
|
||||
|
||||
/* Number of live and free conses etc. */
|
||||
|
||||
static int total_conses, total_markers, total_symbols, total_vector_size;
|
||||
|
@ -1311,8 +1304,6 @@ uninterrupt_malloc ()
|
|||
pthread_mutexattr_init (&attr);
|
||||
pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE);
|
||||
pthread_mutex_init (&alloc_mutex, &attr);
|
||||
|
||||
main_thread = pthread_self ();
|
||||
#endif /* HAVE_GTK_AND_PTHREAD */
|
||||
|
||||
if (__free_hook != emacs_blocked_free)
|
||||
|
@ -4648,13 +4639,48 @@ returns nil, because real GC can't be done. */)
|
|||
if (abort_on_gc)
|
||||
abort ();
|
||||
|
||||
EMACS_GET_TIME (t1);
|
||||
|
||||
/* Can't GC if pure storage overflowed because we can't determine
|
||||
if something is a pure object or not. */
|
||||
if (pure_bytes_used_before_overflow)
|
||||
return Qnil;
|
||||
|
||||
/* Don't keep undo information around forever.
|
||||
Do this early on, so it is no problem if the user quits. */
|
||||
{
|
||||
register struct buffer *nextb = all_buffers;
|
||||
|
||||
while (nextb)
|
||||
{
|
||||
/* If a buffer's undo list is Qt, that means that undo is
|
||||
turned off in that buffer. Calling truncate_undo_list on
|
||||
Qt tends to return NULL, which effectively turns undo back on.
|
||||
So don't call truncate_undo_list if undo_list is Qt. */
|
||||
if (! EQ (nextb->undo_list, Qt))
|
||||
truncate_undo_list (nextb);
|
||||
|
||||
/* Shrink buffer gaps, but skip indirect and dead buffers. */
|
||||
if (nextb->base_buffer == 0 && !NILP (nextb->name))
|
||||
{
|
||||
/* If a buffer's gap size is more than 10% of the buffer
|
||||
size, or larger than 2000 bytes, then shrink it
|
||||
accordingly. Keep a minimum size of 20 bytes. */
|
||||
int size = min (2000, max (20, (nextb->text->z_byte / 10)));
|
||||
|
||||
if (nextb->text->gap_size > size)
|
||||
{
|
||||
struct buffer *save_current = current_buffer;
|
||||
current_buffer = nextb;
|
||||
make_gap (-(nextb->text->gap_size - size));
|
||||
current_buffer = save_current;
|
||||
}
|
||||
}
|
||||
|
||||
nextb = nextb->next;
|
||||
}
|
||||
}
|
||||
|
||||
EMACS_GET_TIME (t1);
|
||||
|
||||
/* In case user calls debug_print during GC,
|
||||
don't let that cause a recursive GC. */
|
||||
consing_since_gc = 0;
|
||||
|
@ -4693,42 +4719,6 @@ returns nil, because real GC can't be done. */)
|
|||
|
||||
shrink_regexp_cache ();
|
||||
|
||||
/* Don't keep undo information around forever. */
|
||||
{
|
||||
register struct buffer *nextb = all_buffers;
|
||||
|
||||
while (nextb)
|
||||
{
|
||||
/* If a buffer's undo list is Qt, that means that undo is
|
||||
turned off in that buffer. Calling truncate_undo_list on
|
||||
Qt tends to return NULL, which effectively turns undo back on.
|
||||
So don't call truncate_undo_list if undo_list is Qt. */
|
||||
if (! EQ (nextb->undo_list, Qt))
|
||||
nextb->undo_list
|
||||
= truncate_undo_list (nextb->undo_list, undo_limit,
|
||||
undo_strong_limit, undo_outer_limit);
|
||||
|
||||
/* Shrink buffer gaps, but skip indirect and dead buffers. */
|
||||
if (nextb->base_buffer == 0 && !NILP (nextb->name))
|
||||
{
|
||||
/* If a buffer's gap size is more than 10% of the buffer
|
||||
size, or larger than 2000 bytes, then shrink it
|
||||
accordingly. Keep a minimum size of 20 bytes. */
|
||||
int size = min (2000, max (20, (nextb->text->z_byte / 10)));
|
||||
|
||||
if (nextb->text->gap_size > size)
|
||||
{
|
||||
struct buffer *save_current = current_buffer;
|
||||
current_buffer = nextb;
|
||||
make_gap (-(nextb->text->gap_size - size));
|
||||
current_buffer = save_current;
|
||||
}
|
||||
}
|
||||
|
||||
nextb = nextb->next;
|
||||
}
|
||||
}
|
||||
|
||||
gc_in_progress = 1;
|
||||
|
||||
/* clear_marks (); */
|
||||
|
@ -6004,29 +5994,6 @@ prevent garbage collection during a part of the program. */);
|
|||
doc: /* Non-nil means loading Lisp code in order to dump an executable.
|
||||
This means that certain objects should be allocated in shared (pure) space. */);
|
||||
|
||||
DEFVAR_INT ("undo-limit", &undo_limit,
|
||||
doc: /* Keep no more undo information once it exceeds this size.
|
||||
This limit is applied when garbage collection happens.
|
||||
The size is counted as the number of bytes occupied,
|
||||
which includes both saved text and other data. */);
|
||||
undo_limit = 20000;
|
||||
|
||||
DEFVAR_INT ("undo-strong-limit", &undo_strong_limit,
|
||||
doc: /* Don't keep more than this much size of undo information.
|
||||
A previous command which pushes the undo list past this size
|
||||
is entirely forgotten when GC happens.
|
||||
The size is counted as the number of bytes occupied,
|
||||
which includes both saved text and other data. */);
|
||||
undo_strong_limit = 30000;
|
||||
|
||||
DEFVAR_INT ("undo-outer-limit", &undo_outer_limit,
|
||||
doc: /* Don't keep more than this much size of undo information.
|
||||
If the current command has produced more than this much undo information,
|
||||
GC discards it. This is a last-ditch limit to prevent memory overflow.
|
||||
The size is counted as the number of bytes occupied,
|
||||
which includes both saved text and other data. */);
|
||||
undo_outer_limit = 300000;
|
||||
|
||||
DEFVAR_BOOL ("garbage-collection-messages", &garbage_collection_messages,
|
||||
doc: /* Non-nil means display messages at start and end of garbage collection. */);
|
||||
garbage_collection_messages = 0;
|
||||
|
|
|
@ -364,6 +364,8 @@ alarm_signal_handler (signo)
|
|||
{
|
||||
EMACS_TIME now;
|
||||
|
||||
SIGNAL_THREAD_CHECK (signo);
|
||||
|
||||
EMACS_GET_TIME (now);
|
||||
pending_atimers = 0;
|
||||
|
||||
|
|
|
@ -3366,6 +3366,7 @@ arith_error (signo)
|
|||
sigsetmask (SIGEMPTYMASK);
|
||||
#endif /* not BSD4_1 */
|
||||
|
||||
SIGNAL_THREAD_CHECK (signo);
|
||||
Fsignal (Qarith_error, Qnil);
|
||||
}
|
||||
|
||||
|
|
|
@ -6005,6 +6005,9 @@ window_change_signal (signalnum) /* If we don't have an argument, */
|
|||
|
||||
struct tty_display_info *tty;
|
||||
|
||||
signal (SIGWINCH, window_change_signal);
|
||||
SIGNAL_THREAD_CHECK (signalnum);
|
||||
|
||||
/* The frame size change obviously applies to a single
|
||||
termcap-controlled terminal, but we can't decide which.
|
||||
Therefore, we resize the frames corresponding to each tty.
|
||||
|
@ -6028,7 +6031,6 @@ window_change_signal (signalnum) /* If we don't have an argument, */
|
|||
}
|
||||
}
|
||||
|
||||
signal (SIGWINCH, window_change_signal);
|
||||
errno = old_errno;
|
||||
}
|
||||
#endif /* SIGWINCH */
|
||||
|
|
25
src/emacs.c
25
src/emacs.c
|
@ -343,6 +343,14 @@ int fatal_error_in_progress;
|
|||
|
||||
void (*fatal_error_signal_hook) P_ ((void));
|
||||
|
||||
#ifdef HAVE_GTK_AND_PTHREAD
|
||||
/* When compiled with GTK and running under Gnome, multiple threads meay be
|
||||
created. Keep track of our main thread to make sure signals are delivered
|
||||
to it (see syssignal.h). */
|
||||
|
||||
pthread_t main_thread;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef SIGUSR1
|
||||
SIGTYPE
|
||||
|
@ -351,6 +359,7 @@ handle_USR1_signal (sig)
|
|||
{
|
||||
struct input_event buf;
|
||||
|
||||
SIGNAL_THREAD_CHECK (sig);
|
||||
bzero (&buf, sizeof buf);
|
||||
buf.kind = USER_SIGNAL_EVENT;
|
||||
buf.frame_or_window = selected_frame;
|
||||
|
@ -366,6 +375,7 @@ handle_USR2_signal (sig)
|
|||
{
|
||||
struct input_event buf;
|
||||
|
||||
SIGNAL_THREAD_CHECK (sig);
|
||||
bzero (&buf, sizeof buf);
|
||||
buf.kind = USER_SIGNAL_EVENT;
|
||||
buf.code = 1;
|
||||
|
@ -380,6 +390,7 @@ SIGTYPE
|
|||
fatal_error_signal (sig)
|
||||
int sig;
|
||||
{
|
||||
SIGNAL_THREAD_CHECK (sig);
|
||||
fatal_error_code = sig;
|
||||
signal (sig, SIG_DFL);
|
||||
|
||||
|
@ -419,6 +430,7 @@ memory_warning_signal (sig)
|
|||
int sig;
|
||||
{
|
||||
signal (sig, memory_warning_signal);
|
||||
SIGNAL_THREAD_CHECK (sig);
|
||||
|
||||
malloc_warning ("Operating system warns that virtual memory is running low.\n");
|
||||
|
||||
|
@ -1024,10 +1036,16 @@ main (argc, argv
|
|||
Also call realloc and free for consistency. */
|
||||
free (realloc (malloc (4), 4));
|
||||
|
||||
# ifndef SYNC_INPUT
|
||||
/* Arrange to disable interrupt input inside malloc etc. */
|
||||
uninterrupt_malloc ();
|
||||
# endif /* not SYNC_INPUT */
|
||||
#endif /* not SYSTEM_MALLOC */
|
||||
|
||||
#ifdef HAVE_GTK_AND_PTHREAD
|
||||
main_thread = pthread_self ();
|
||||
#endif /* HAVE_GTK_AND_PTHREAD */
|
||||
|
||||
#if defined (MSDOS) || defined (WINDOWSNT)
|
||||
/* We do all file input/output as binary files. When we need to translate
|
||||
newlines, we do that manually. */
|
||||
|
@ -1116,7 +1134,10 @@ main (argc, argv
|
|||
/* Handle the -batch switch, which means don't do interactive display. */
|
||||
noninteractive = 0;
|
||||
if (argmatch (argv, argc, "-batch", "--batch", 5, NULL, &skip_args))
|
||||
noninteractive = 1;
|
||||
{
|
||||
noninteractive = 1;
|
||||
Vundo_outer_limit = Qnil;
|
||||
}
|
||||
if (argmatch (argv, argc, "-script", "--script", 3, &junk, &skip_args))
|
||||
{
|
||||
noninteractive = 1; /* Set batch mode. */
|
||||
|
@ -2237,7 +2258,7 @@ You must run Emacs in batch mode in order to dump it. */)
|
|||
memory_warnings (my_edata, malloc_warning);
|
||||
#endif /* not WINDOWSNT */
|
||||
#endif
|
||||
#if ! defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD)
|
||||
#if !defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD) && !defined SYNC_INPUT
|
||||
/* Pthread may call malloc before main, and then we will get an endless
|
||||
loop, because pthread_self (see alloc.c) calls malloc the first time
|
||||
it is called on some systems. */
|
||||
|
|
|
@ -1178,6 +1178,7 @@ unwind_to_catch (catch, value)
|
|||
set_poll_suppress_count (catch->poll_suppress_count);
|
||||
interrupt_input_blocked = catch->interrupt_input_blocked;
|
||||
handling_signal = 0;
|
||||
immediate_quit = 0;
|
||||
|
||||
do
|
||||
{
|
||||
|
@ -3331,7 +3332,11 @@ Emacs could overflow the real C stack, and crash. */);
|
|||
|
||||
DEFVAR_LISP ("quit-flag", &Vquit_flag,
|
||||
doc: /* Non-nil causes `eval' to abort, unless `inhibit-quit' is non-nil.
|
||||
Typing C-g sets `quit-flag' non-nil, regardless of `inhibit-quit'. */);
|
||||
If the value is t, that means do an ordinary quit.
|
||||
If the value equals `throw-on-input', that means quit by throwing
|
||||
to the tag specified in `throw-on-input'; it's for handling `while-no-input'.
|
||||
Typing C-g sets `quit-flag' to t, regardless of `inhibit-quit',
|
||||
but `inhibit-quit' non-nil prevents anything from taking notice of that. */);
|
||||
Vquit_flag = Qnil;
|
||||
|
||||
DEFVAR_LISP ("inhibit-quit", &Vinhibit_quit,
|
||||
|
|
16
src/fileio.c
16
src/fileio.c
|
@ -230,6 +230,8 @@ extern int minibuf_level;
|
|||
|
||||
extern int minibuffer_auto_raise;
|
||||
|
||||
extern int history_delete_duplicates;
|
||||
|
||||
/* These variables describe handlers that have "already" had a chance
|
||||
to handle the current operation.
|
||||
|
||||
|
@ -6385,7 +6387,13 @@ and `read-file-name-function'. */)
|
|||
if (replace_in_history)
|
||||
/* Replace what Fcompleting_read added to the history
|
||||
with what we will actually return. */
|
||||
XSETCAR (Fsymbol_value (Qfile_name_history), double_dollars (val));
|
||||
{
|
||||
Lisp_Object val1 = double_dollars (val);
|
||||
tem = Fsymbol_value (Qfile_name_history);
|
||||
if (history_delete_duplicates)
|
||||
XSETCDR (tem, Fdelete (val1, XCDR(tem)));
|
||||
XSETCAR (tem, val1);
|
||||
}
|
||||
else if (add_to_history)
|
||||
{
|
||||
/* Add the value to the history--but not if it matches
|
||||
|
@ -6393,8 +6401,10 @@ and `read-file-name-function'. */)
|
|||
Lisp_Object val1 = double_dollars (val);
|
||||
tem = Fsymbol_value (Qfile_name_history);
|
||||
if (! CONSP (tem) || NILP (Fequal (XCAR (tem), val1)))
|
||||
Fset (Qfile_name_history,
|
||||
Fcons (val1, tem));
|
||||
{
|
||||
if (history_delete_duplicates) tem = Fdelete (val1, tem);
|
||||
Fset (Qfile_name_history, Fcons (val1, tem));
|
||||
}
|
||||
}
|
||||
|
||||
return val;
|
||||
|
|
|
@ -981,6 +981,7 @@ float_error (signo)
|
|||
signal (SIGILL, float_error);
|
||||
#endif /* BSD_SYSTEM */
|
||||
|
||||
SIGNAL_THREAD_CHECK (signo);
|
||||
in_float = 0;
|
||||
|
||||
Fsignal (Qarith_error, Fcons (float_error_arg, Qnil));
|
||||
|
|
|
@ -2094,8 +2094,9 @@ whether or not it is currently displayed in some window. */)
|
|||
move_it_by_lines (&it, -1, 0);
|
||||
|
||||
it.vpos = 0;
|
||||
if (XINT (lines) != 0)
|
||||
move_it_by_lines (&it, XINT (lines), 0);
|
||||
/* Do this even if LINES is 0, so that we move back
|
||||
to the beginning of the current line as we ought. */
|
||||
move_it_by_lines (&it, XINT (lines), 0);
|
||||
|
||||
SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it));
|
||||
}
|
||||
|
|
|
@ -3038,6 +3038,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
|
|||
/* Save the echo status. */
|
||||
int saved_immediate_echo = current_kboard->immediate_echo;
|
||||
struct kboard *saved_ok_to_echo = ok_to_echo_at_next_pause;
|
||||
Lisp_Object saved_echo_string = current_kboard->echo_string;
|
||||
int saved_echo_after_prompt = current_kboard->echo_after_prompt;
|
||||
|
||||
#if 0
|
||||
|
@ -3092,6 +3093,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
|
|||
|
||||
cancel_echoing ();
|
||||
ok_to_echo_at_next_pause = saved_ok_to_echo;
|
||||
current_kboard->echo_string = saved_echo_string;
|
||||
current_kboard->echo_after_prompt = saved_echo_after_prompt;
|
||||
if (saved_immediate_echo)
|
||||
echo_now ();
|
||||
|
@ -3574,6 +3576,9 @@ event_to_kboard (event)
|
|||
}
|
||||
#endif
|
||||
|
||||
|
||||
Lisp_Object Vthrow_on_input;
|
||||
|
||||
/* Store an event obtained at interrupt level into kbd_buffer, fifo */
|
||||
|
||||
void
|
||||
|
@ -3699,6 +3704,24 @@ kbd_buffer_store_event_hold (event, hold_quit)
|
|||
*kbd_store_ptr = *event;
|
||||
++kbd_store_ptr;
|
||||
}
|
||||
|
||||
/* If we're inside while-no-input, and this event qualifies
|
||||
as input, set quit-flag to cause an interrupt. */
|
||||
if (!NILP (Vthrow_on_input)
|
||||
&& event->kind != FOCUS_IN_EVENT
|
||||
&& event->kind != HELP_EVENT
|
||||
&& event->kind != DEICONIFY_EVENT)
|
||||
{
|
||||
Vquit_flag = Vthrow_on_input;
|
||||
/* If we're inside a function that wants immediate quits,
|
||||
do it now. */
|
||||
if (immediate_quit && NILP (Vinhibit_quit))
|
||||
{
|
||||
immediate_quit = 0;
|
||||
sigfree ();
|
||||
QUIT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -6849,24 +6872,6 @@ handle_async_input ()
|
|||
#ifdef BSD4_1
|
||||
extern int select_alarmed;
|
||||
#endif
|
||||
#if ! defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD)
|
||||
extern pthread_t main_thread;
|
||||
if (pthread_self () != main_thread)
|
||||
{
|
||||
/* POSIX says any thread can receive the signal. On GNU/Linux that is
|
||||
not true, but for other systems (FreeBSD at least) it is. So direct
|
||||
the signal to the correct thread and block it from this thread. */
|
||||
#ifdef SIGIO
|
||||
sigset_t new_mask;
|
||||
|
||||
sigemptyset (&new_mask);
|
||||
sigaddset (&new_mask, SIGIO);
|
||||
pthread_sigmask (SIG_BLOCK, &new_mask, 0);
|
||||
pthread_kill (main_thread, SIGIO);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
interrupt_input_pending = 0;
|
||||
|
||||
|
@ -6895,22 +6900,6 @@ input_available_signal (signo)
|
|||
{
|
||||
/* Must preserve main program's value of errno. */
|
||||
int old_errno = errno;
|
||||
#if ! defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD)
|
||||
extern pthread_t main_thread;
|
||||
if (pthread_self () != main_thread)
|
||||
{
|
||||
/* POSIX says any thread can receive the signal. On GNU/Linux that is
|
||||
not true, but for other systems (FreeBSD at least) it is. So direct
|
||||
the signal to the correct thread and block it from this thread. */
|
||||
sigset_t new_mask;
|
||||
|
||||
sigemptyset (&new_mask);
|
||||
sigaddset (&new_mask, SIGIO);
|
||||
pthread_sigmask (SIG_BLOCK, &new_mask, 0);
|
||||
pthread_kill (main_thread, SIGIO);
|
||||
return;
|
||||
}
|
||||
#endif /* HAVE_GTK_AND_PTHREAD */
|
||||
#if defined (USG) && !defined (POSIX_SIGNALS)
|
||||
/* USG systems forget handlers when they are used;
|
||||
must reestablish each time */
|
||||
|
@ -6927,6 +6916,8 @@ input_available_signal (signo)
|
|||
#ifdef SYNC_INPUT
|
||||
interrupt_input_pending = 1;
|
||||
#else
|
||||
|
||||
SIGNAL_THREAD_CHECK (signo);
|
||||
handle_async_input ();
|
||||
#endif
|
||||
|
||||
|
@ -10379,6 +10370,7 @@ handle_interrupt ()
|
|||
char c;
|
||||
struct frame *sf = SELECTED_FRAME ();
|
||||
|
||||
SIGNAL_THREAD_CHECK (signalnum);
|
||||
cancel_echoing ();
|
||||
|
||||
/* XXX This code needs to be revised for multi-tty support. */
|
||||
|
@ -11525,6 +11517,12 @@ Used during Emacs' startup. */);
|
|||
doc: /* *How long to display an echo-area message when the minibuffer is active.
|
||||
If the value is not a number, such messages don't time out. */);
|
||||
Vminibuffer_message_timeout = make_number (2);
|
||||
|
||||
DEFVAR_LISP ("throw-on-input", &Vthrow_on_input,
|
||||
doc: /* If non-nil, any keyboard input throws to this symbol.
|
||||
The value of that variable is passed to `quit-flag' and later causes a
|
||||
peculiar kind of quitting. */);
|
||||
Vthrow_on_input = Qnil;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue