Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-54
Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 190-203) - Update from CVS - Undo incorrect merge of etc/images/README from Gnus 5.10 - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 74-80) - Update from CVS - Update from CVS: README: Addition from 5.10.6 tar ball.
This commit is contained in:
commit
49d395cd57
73 changed files with 7951 additions and 7370 deletions
|
@ -1,3 +1,7 @@
|
|||
2006-04-07 Reiner Steib <Reiner.Steib@gmx.de>
|
||||
|
||||
* NEWS: Add string-or-null-p.
|
||||
|
||||
2006-03-28 Bill Wohler <wohler@newt.com>
|
||||
|
||||
* images/README: Update with following information.
|
||||
|
|
5
etc/NEWS
5
etc/NEWS
|
@ -3699,6 +3699,11 @@ This is useful in packages that can be preloaded.
|
|||
|
||||
If it is non-nil, the function lists only faces matching this regexp.
|
||||
|
||||
+++
|
||||
*** New function `string-or-null-p'.
|
||||
|
||||
Return t if OBJECT is a string or nil. Otherwise, return nil.
|
||||
|
||||
** Lisp code indentation features:
|
||||
|
||||
+++
|
||||
|
|
6
etc/TODO
6
etc/TODO
|
@ -9,6 +9,12 @@ to the FSF.
|
|||
|
||||
* Small but important fixes needed in existing features:
|
||||
|
||||
** Make vc-checkin avoid reverting the buffer if has not changed after
|
||||
the checkin. Comparing (md5 BUFFER) to (md5 FILE) should be enough.
|
||||
|
||||
** Make vc-annotate show place the cursor in the annotate buffer at the
|
||||
same line as the current buffer.
|
||||
|
||||
** buffer-offer-save should be a permanent local.
|
||||
|
||||
** revert-buffer should eliminate overlays and the mark.
|
||||
|
|
|
@ -1,71 +1,43 @@
|
|||
The following icons are from GNOME 2.6:
|
||||
All of the following icons are not part of Emacs, but distributed and
|
||||
used by Emacs.
|
||||
|
||||
attach.xpm (stock_attach)
|
||||
connect.xpm (stock_connect)
|
||||
contact.xpm (stock_contact)
|
||||
delete.xpm (stock_delete)
|
||||
describe.xpm (stock_properties)
|
||||
disconnect.xpm (stock_disconnect)
|
||||
exit.xpm (stock_exit)
|
||||
lock-broken.xpm (stock_lock_broken)
|
||||
lock-ok.xpm (stock_lock_ok)
|
||||
lock.xpm (stock_lock)
|
||||
next-page.xpm (stock_next-page)
|
||||
refresh.xpm (stock_refresh)
|
||||
sort-ascending.xpm (stock_sort-ascending)
|
||||
sort-column-ascending.xpm (stock_sort-column-ascending)
|
||||
sort-criteria.xpm (stock_sort-criteria)
|
||||
sort-descending.xpm (stock_sort-descending)
|
||||
sort-row-ascending.xpm (stock_sort-row-ascending)
|
||||
* The following icons are from GTK+ 2.x:
|
||||
|
||||
gnus/toggle-subscription.xpm (stock_task-recurring)
|
||||
close.xpm copy.xpm cut.xpm find-replace.xpm help.xpm home.xpm
|
||||
index.xpm jump-to.xpm left-arrow.xpm new.xpm open.xpm paste.xpm
|
||||
preferences.xpm print.xpm refresh.xpm right-arrow.xpm save.xpm
|
||||
saveas.xpm search.xpm sort-ascending.xpm sort-descending.xpm
|
||||
spell.xpm undo.xpm up-arrow.xpm
|
||||
|
||||
mail/compose.xpm (stock_mail-compose)
|
||||
mail/copy.xpm (stock_mail-copy)
|
||||
mail/forward.xpm (stock_mail-forward)
|
||||
mail/inbox.xpm (stock_inbox)
|
||||
mail/move.xpm (stock_mail-move)
|
||||
mail/not-spam.xpm (stock_not-spam)
|
||||
mail/outbox.xpm (stock_outbox)
|
||||
mail/reply-all.xpm (stock_mail-reply-to-all)
|
||||
mail/reply.xpm (stock_mail-reply)
|
||||
mail/save-draft.xpm (stock_mail-handling)
|
||||
mail/send.xpm (stock_mail-send)
|
||||
mail/spam.xpm (stock_spam)
|
||||
back-arrow.xpm and fwd-arrow.xpm are slightly modified undo and redo.
|
||||
|
||||
diropen.xpm is file-manager.png from Gnome hicolor theme.
|
||||
|
||||
The following icons were contributed by Adam Sjøgren <asjo@koldfront.dk>:
|
||||
* The following icons are from GNOME 2.x:
|
||||
|
||||
mail/preview.xpm (combining stock_mail and stock_zoom)
|
||||
mail/save.xpm (combining stock_mail, stock_save and stock_convert)
|
||||
attach.xpm connect.xpm contact.xpm data-save.xpm delete.xpm
|
||||
describe.xpm disconnect.xpm exit.xpm gnus/toggle-subscription.xpm
|
||||
lock-broken.xpm lock-ok.xpm lock.xpm mail/compose.xpm
|
||||
mail/copy.xpm mail/flag-for-followup.xpm mail/forward.xpm
|
||||
mail/inbox.xpm mail/move.xpm mail/not-spam.xpm mail/outbox.xpm
|
||||
mail/preview.xpm mail/reply-all.xpm mail/reply.xpm
|
||||
mail/save-draft.xpm mail/save.xpm mail/send.xpm mail/spam.xpm
|
||||
next-page.xpm refresh.xpm separator.xpm sort-ascending.xpm
|
||||
sort-column-ascending.xpm sort-criteria.xpm sort-descending.xpm
|
||||
sort-row-ascending.xpm zoom-in.xpm zoom-out.xpm
|
||||
|
||||
* Note that the default GTK icons were not overridden by the GNOME theme
|
||||
due to a bug which was fixed in GNOME 2.15. Once GNOME 2.16 is in wide
|
||||
circulation, then the GTK icons should be replaced with the equivalent
|
||||
GNOME icons.
|
||||
|
||||
The folling icon are duplicated from Emacs 22. They are either not present in
|
||||
Emacs 21 or look different there.
|
||||
* Recipe for Creating PBM Versions
|
||||
|
||||
cancel.xpm
|
||||
copy.xpm
|
||||
diropen.xpm
|
||||
help.xpm
|
||||
left-arrow.xpm
|
||||
paste.xpm
|
||||
print.xpm
|
||||
redo.xpm
|
||||
right-arrow.xpm
|
||||
save.xpm
|
||||
search.xpm
|
||||
separator.xpm
|
||||
1. Edit .xpm image in GIMP.
|
||||
2. Image > Mode > Indexed. Check Use Black/White Palette and No
|
||||
Color Dithering.
|
||||
3. File > Save As file.xbm.
|
||||
4. Run xbmtopbm < file.xbm > file.pbm.
|
||||
|
||||
The GNOME's stock_*.png files were converted to XPM using the following GIMP
|
||||
script:
|
||||
Thanks to jan.h.d@swipnet.se for the help.
|
||||
|
||||
;; -*- scheme -*-
|
||||
;; Put this file in ~/.gimp-*/scripts/
|
||||
;; gimp -i -b '(rs-save-as-xpm "foo.png" "foo.xpm" 127)' '(gimp-quit 0)'
|
||||
(define (rs-save-as-xpm filename filename2 threshold)
|
||||
(let* ((image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
|
||||
(drawable (car (gimp-image-get-active-layer image))))
|
||||
(file-xpm-save RUN-NONINTERACTIVE image drawable
|
||||
filename2 filename2 threshold)
|
||||
(gimp-image-delete image)))
|
||||
;; end
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
2006-04-02 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* b2m.c (main): Don't include <limits.h>.
|
||||
(TM_YEAR_BASE): New macro.
|
||||
(TM_YEAR_IN_ASCTIME_RANGE): Don't define if already defined, so
|
||||
that s/ files can override this. Use the more-conservative range
|
||||
1000-9999.
|
||||
(main): Check for asctime returning NULL.
|
||||
* fakemail.c: Likewise.
|
||||
|
||||
2006-03-27 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* b2m.c: Include <limits.h>.
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#undef static
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <sys/types.h>
|
||||
|
@ -45,15 +44,13 @@
|
|||
|
||||
typedef int logical;
|
||||
|
||||
/* True if TM_YEAR is a struct tm's tm_year value that is acceptable
|
||||
to asctime. Glibc asctime returns a useful string unless TM_YEAR
|
||||
is nearly INT_MAX, but the C Standard lets C libraries overrun a
|
||||
buffer if TM_YEAR needs more than 4 bytes. */
|
||||
#ifdef __GLIBC__
|
||||
# define TM_YEAR_IN_ASCTIME_RANGE(tm_year) ((tm_year) <= INT_MAX - 1900)
|
||||
#else
|
||||
#define TM_YEAR_BASE 1900
|
||||
|
||||
/* Nonzero if TM_YEAR is a struct tm's tm_year value that causes
|
||||
asctime to have well-defined behavior. */
|
||||
#ifndef TM_YEAR_IN_ASCTIME_RANGE
|
||||
# define TM_YEAR_IN_ASCTIME_RANGE(tm_year) \
|
||||
(-999 - 1900 <= (tm_year) && (tm_year) <= 9999 - 1900)
|
||||
(1000 - TM_YEAR_BASE <= (tm_year) && (tm_year) <= 9999 - TM_YEAR_BASE)
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -148,9 +145,9 @@ main (argc, argv)
|
|||
Don't use 'ctime', as that might dump core if the hardware clock
|
||||
is set to a bizarre value. */
|
||||
tm = localtime (<oday);
|
||||
if (! (tm && TM_YEAR_IN_ASCTIME_RANGE (tm->tm_year)))
|
||||
if (! (tm && TM_YEAR_IN_ASCTIME_RANGE (tm->tm_year)
|
||||
&& (today = asctime (tm))))
|
||||
fatal ("current time is out of range");
|
||||
today = asctime (tm);
|
||||
data.size = 200;
|
||||
data.buffer = xnew (200, char);
|
||||
|
||||
|
|
|
@ -53,7 +53,6 @@ main ()
|
|||
#include "ntlib.h"
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
@ -71,15 +70,13 @@ main ()
|
|||
#define true 1
|
||||
#define false 0
|
||||
|
||||
/* True if TM_YEAR is a struct tm's tm_year value that is acceptable
|
||||
to asctime. Glibc asctime returns a useful string unless TM_YEAR
|
||||
is nearly INT_MAX, but the C Standard lets C libraries overrun a
|
||||
buffer if TM_YEAR needs more than 4 bytes. */
|
||||
#ifdef __GLIBC__
|
||||
# define TM_YEAR_IN_ASCTIME_RANGE(tm_year) ((tm_year) <= INT_MAX - 1900)
|
||||
#else
|
||||
#define TM_YEAR_BASE 1900
|
||||
|
||||
/* Nonzero if TM_YEAR is a struct tm's tm_year value that causes
|
||||
asctime to have well-defined behavior. */
|
||||
#ifndef TM_YEAR_IN_ASCTIME_RANGE
|
||||
# define TM_YEAR_IN_ASCTIME_RANGE(tm_year) \
|
||||
(-999 - 1900 <= (tm_year) && (tm_year) <= 9999 - 1900)
|
||||
(1000 - TM_YEAR_BASE <= (tm_year) && (tm_year) <= 9999 - TM_YEAR_BASE)
|
||||
#endif
|
||||
|
||||
/* Various lists */
|
||||
|
@ -378,9 +375,9 @@ make_file_preface ()
|
|||
Don't use 'ctime', as that might dump core if the hardware clock
|
||||
is set to a bizarre value. */
|
||||
tm = localtime (&idiotic_interface);
|
||||
if (! (tm && TM_YEAR_IN_ASCTIME_RANGE (tm->tm_year)))
|
||||
if (! (tm && TM_YEAR_IN_ASCTIME_RANGE (tm->tm_year)
|
||||
&& (the_date = asctime (tm))))
|
||||
fatal ("current time is out of range", 0);
|
||||
the_date = asctime (tm);
|
||||
/* the_date has an unwanted newline at the end */
|
||||
date_length = strlen (the_date) - 1;
|
||||
the_date[date_length] = '\0';
|
||||
|
|
311
lisp/ChangeLog
311
lisp/ChangeLog
|
@ -1,3 +1,300 @@
|
|||
2006-04-08 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* emacs-lisp/bytecomp.el (byte-compile-form): Don't call
|
||||
cl-byte-compile-compiler-macro unless it exists.
|
||||
|
||||
2006-04-08 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* files.el (hack-local-variables-confirm) <offer-save>:
|
||||
Clarify message text. Suggested by Ralf Angeli.
|
||||
|
||||
2006-04-08 Michael Cadilhac <michael.cadilhac@lrde.org> (tiny change)
|
||||
|
||||
* rect.el (kill-rectangle): Don't barf if `kill-read-only-ok' is set.
|
||||
(delete-extract-rectangle-line): Use `filter-buffer-substring'
|
||||
instead of `buffer-substring' and `delete-region'. (Most of the
|
||||
code actually copied from `kill-region'.)
|
||||
|
||||
2006-04-08 Ryan Yeske <rcyeske@gmail.com>
|
||||
|
||||
* rcirc.el (rcirc-default-server): Rename from rcirc-server.
|
||||
(rcirc-default-port): Rename from rcirc-port.
|
||||
(rcirc-default-nick): Rename from rcirc-nick.
|
||||
(rcirc-default-user-name): Rename from rcirc-user-name.
|
||||
(rcirc-default-user-full-name): Rename from rcirc-user-full-name.
|
||||
(rcirc-low-priority-flag): New variable.
|
||||
(rcirc-decode-coding-system): New defcustom.
|
||||
(rcirc-encode-coding-system): New defcustom.
|
||||
(rcirc-coding-system-alist): New defcustom.
|
||||
(rcirc-multiline-major-mode): New defcustom.
|
||||
(rcirc-nick): New internal variable.
|
||||
(rcirc-process): Remove variable.
|
||||
(rcirc-server-buffer): New variable.
|
||||
(rcirc): Update to use rcirc-default-* variables above.
|
||||
(rcirc-connect): Do not add window-configuration-hook-here.
|
||||
(rcirc-server): New internal variable.
|
||||
(rcirc-connect): Do not send keepalive pings if
|
||||
rcirc-keepalive-seconds is nil.
|
||||
(with-rcirc-server-buffer): New macro.
|
||||
(rcirc-send-string): Encode with rcirc-encode-coding-system.
|
||||
(rcirc-server-name): Rename from rcirc-server.
|
||||
(rcirc-buffer-process): New function.
|
||||
(rcirc-buffer-nick): New function.
|
||||
(rcirc-buffer-target): Remove function.
|
||||
(set-rcirc-decode-coding-system, set-rcirc-encode-coding-system):
|
||||
New commands.
|
||||
(rcirc-mode-map): Change binding of C-c C-l to
|
||||
rcirc-toggle-low-priority.
|
||||
(rcirc-mode): Initialize coding system based on
|
||||
rcirc-coding-system-alist. New change-major-mode-hook to part the
|
||||
channel on a mode change. Make kill-buffer-hook buffer-local.
|
||||
(rcirc-change-major-mode-hook): New function.
|
||||
(rcirc-clean-up-buffer): Rename from rcirc-kill-buffer-hook-1.
|
||||
(rcirc-last-post-time): New variable.
|
||||
(rcirc-process-message): Store the last time user posted a message
|
||||
to this target.
|
||||
(rcirc-multiline-minor-mode): New mode.
|
||||
(rcirc-multiline-minor-mode-map): New mode map.
|
||||
(rcirc-edit-multiline): Put multiline-edit buffer in
|
||||
rcirc-multiline-major-mode along with rcirc-multiline-minor-mode.
|
||||
(rcirc-print): Any line starting with an ignored nick will be
|
||||
ignored.
|
||||
(rcirc-print): Decode using rcirc-decode-coding-system.
|
||||
(rcirc-track-minor-mode): Update global-mode-string when disabling
|
||||
this mode.
|
||||
(minor-mode-alist): add LowPri indicator.
|
||||
(rcirc-toggle-low-priority): New function.
|
||||
(rcirc-last-non-irc-buffer): Prefix arg now no means switch to
|
||||
next lowpriority buffer with activity.
|
||||
(rcirc-record-activity): Sort buffers in rcirc-activity by the
|
||||
last time the user posted a message in to the target.
|
||||
(rcirc-update-activity-string): New formatting for low priority
|
||||
buffers.
|
||||
(rcirc-split-activity): New function.
|
||||
(rcirc-handler-PART, rcirc-handler-KICK)
|
||||
(rcirc-handler-PART-or-KICK): Kick responses are printed properly.
|
||||
(rcirc-nick-away-alist): New variable.
|
||||
(rcirc-handler-301): New handler. Away messages are printed once
|
||||
per change.
|
||||
|
||||
2006-04-08 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* info.el (Info-follow-nearest-node): Doc fix.
|
||||
|
||||
* international/mule-cmds.el (set-locale-environment): Make sure
|
||||
the coding-system preferred by the locale's language has the same
|
||||
EOL conversion type as the original buffer-file-coding-system.
|
||||
(locale-language-names): Add a few MS Windows language codes.
|
||||
|
||||
2006-04-07 Richard Stallman <rms@gnu.org>
|
||||
|
||||
* simple.el (eval-expression): Doc fix.
|
||||
|
||||
* emacs-lisp/lisp-mode.el (eval-print-last-sexp, eval-last-sexp)
|
||||
(eval-defun): Doc fixes.
|
||||
|
||||
2006-04-07 Reiner Steib <Reiner.Steib@gmx.de>
|
||||
|
||||
* pgg-gpg.el: Revert to revision 1.8 to allow the use of
|
||||
gpg-agent.
|
||||
|
||||
2006-04-07 Nick Roberts <nickrob@snap.net.nz>
|
||||
|
||||
* progmodes/gdb-ui.el (gdb-init-2): Set current filename using
|
||||
GDB list command without argument for greater generality.
|
||||
|
||||
2006-04-06 Reiner Steib <Reiner.Steib@gmx.de>
|
||||
|
||||
* subr.el (string-or-null-p): New function.
|
||||
|
||||
* textmodes/paragraphs.el (sentence-end): Use string-or-null-p.
|
||||
|
||||
* textmodes/ispell.el (ispell-local-dictionary): Use
|
||||
string-or-null-p.
|
||||
|
||||
* files.el: Update comment about safe-local-variable declarations.
|
||||
|
||||
2006-04-06 J.D. Smith <jdsmith@as.arizona.edu>
|
||||
|
||||
* progmodes/idlwave.el: Updated to IDLWAVE version 6.0. See
|
||||
idlwave.org.
|
||||
|
||||
* progmodes/idlw-shell.el: Updated to IDLWAVE version 6.0. See
|
||||
idlwave.org. Includes code to obsolete idlw-rinfo.el.
|
||||
|
||||
* progmodes/idlw-help.el: Updated to IDLWAVE version 6.0. See
|
||||
idlwave.org.
|
||||
|
||||
* progmodes/idlw-complete-structtag.el: Updated to IDLWAVE
|
||||
version 6.0 (minimal changes). See idlwave.org.
|
||||
|
||||
* progmodes/idlw-toolbar.el: Updated to IDLWAVE version
|
||||
6.0 (minimal changes). See idlwave.org.
|
||||
|
||||
* progmodes/idlw-rinfo.el: File obsoleted and removed.
|
||||
|
||||
2006-04-06 Romain Francoise <romain@orebokech.com>
|
||||
|
||||
* pgg-gpg.el: Sync back with Gnus 5.10, reverting changes that add
|
||||
symmetric encryption features and a new asynchronous interface to
|
||||
GnuPG. This new version is version 1.4, plus whitespace changes.
|
||||
|
||||
2006-04-06 Reiner Steib <Reiner.Steib@gmx.de>
|
||||
|
||||
* files.el: Move some `safe-local-variable' declarations to the
|
||||
respective files.
|
||||
|
||||
* textmodes/ispell.el (ispell-check-comments)
|
||||
(ispell-local-dictionary): Mark as safe.
|
||||
|
||||
* abbrev.el (abbrev-mode): Mark as safe.
|
||||
|
||||
* add-log.el (change-log-default-name): Mark as safe.
|
||||
|
||||
* textmodes/reftex-vars.el (reftex-vref-is-default)
|
||||
(reftex-fref-is-default, reftex-level-indent)
|
||||
(reftex-guess-label-type): Mark as safe.
|
||||
|
||||
* textmodes/fill.el (colon-double-space): Mark as safe.
|
||||
|
||||
* textmodes/paragraphs.el (paragraph-start, paragraph-separate)
|
||||
(sentence-end-double-space, sentence-end-without-period)
|
||||
(sentence-end-without-space, sentence-end, sentence-end-base)
|
||||
(page-delimiter, paragraph-ignore-fill-prefix): Mark as safe.
|
||||
|
||||
2006-04-06 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
* ido.el (ido-mode): Remove ido-ignore-unc-host-regexps from
|
||||
the :set-after list.
|
||||
(ido-downcase-unc-hosts): New user option. Default on.
|
||||
(ido-ignore-unc-host-regexps): Don't reset ido-unc-hosts-cache
|
||||
when it is set, as regexps are now applied on the fly.
|
||||
(ido-unc-hosts): Keep all known hosts in ido-unc-hosts-cache.
|
||||
Make C-a DTRT--filter hosts through ido-ignore-unc-host-regexps
|
||||
on the fly, but only when ido-process-ignore-lists is set.
|
||||
Do case insensitive filtering if ido-downcase-unc-hosts is set.
|
||||
Only downcase names if ido-downcase-unc-hosts is set.
|
||||
|
||||
2006-04-06 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* ido.el (ido-unc-hosts-cache): Fix typo in docstring.
|
||||
|
||||
* woman.el (WoMan-xref-man-page): Fix call to `substring'.
|
||||
|
||||
2006-04-05 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
* ido.el (ido-mode): Set after ido-unc-hosts and
|
||||
ido-ignore-unc-host-regexps.
|
||||
(ido-save-history): Save ido-unc-hosts-cache.
|
||||
(ido-load-history): Load ido-unc-hosts-cache.
|
||||
(ido-reread-directory): Refresh unc hosts cache in // dir.
|
||||
|
||||
* startup.el (fancy-splash-screens): Set emulation-mode-map-alists
|
||||
to nil while displaying slash screen.
|
||||
|
||||
2006-04-05 Daiki Ueno <ueno@unixuser.org>
|
||||
|
||||
* pgg-gpg.el (pgg-gpg-encrypt-region, pgg-gpg-sign-region): Wait
|
||||
for BEGIN_SIGNING too, new in GnuPG 1.4.3.
|
||||
|
||||
2006-04-05 Kenichi Handa <handa@m17n.org>
|
||||
|
||||
* international/characters.el: Setup cases of Latin, Greek, and
|
||||
Cyrillic characters in CJK charsets.
|
||||
|
||||
2006-03-29 Daiki Ueno <ueno@unixuser.org>
|
||||
|
||||
* pgg-gpg.el (pgg-gpg-start-process): Don't bind
|
||||
default-enable-multibyte-characters. This reverts the change from
|
||||
revision 6.17 which is no longer necessary because the passphrase
|
||||
is sent separately now. GnuPG messages are unreadable under
|
||||
multibyte locales with default-enable-multibyte-characters set to
|
||||
nil.
|
||||
|
||||
2006-04-04 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* files.el: Mark `left-margin', `byte-compile-dynamic-docstrings'
|
||||
and `byte-compile-warnings' as `safe-local-variable'.
|
||||
|
||||
2006-04-04 Dan Nicolaescu <dann@ics.uci.edu>
|
||||
|
||||
* man.el (Man-mode-map): Restore the \r binding.
|
||||
(Man-abstract-xref-man-page): If Man-target-string is a function,
|
||||
call it.
|
||||
(Man-highlight-references): Use Man-default-man-entry to get the
|
||||
target. Deal with xrefs too.
|
||||
(Man-highlight-references0): Don't call the target function.
|
||||
|
||||
* woman.el (WoMan-xref-man-page): Strip the section number, woman
|
||||
cannot deal with it.
|
||||
|
||||
2006-04-04 Daiki Ueno <ueno@unixuser.org>
|
||||
|
||||
* pgg-gpg.el: Clean up process buffers every time gpg processes
|
||||
complete.
|
||||
|
||||
2006-04-04 Kenichi Handa <handa@m17n.org>
|
||||
|
||||
* sort.el (sort-build-lists): Don't bind inhibit-field-text-motion
|
||||
here.
|
||||
(sort-lines, sort-numeric-fields, sort-fields, sort-columns):
|
||||
Temporarily bind inhibit-field-text-motion to t.
|
||||
|
||||
2006-04-03 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* startup.el (normal-splash-screen): Only set mode-line-format in the
|
||||
splash buffer, so as not to interfere when debugging the code.
|
||||
Ignore errors when switching buffer.
|
||||
|
||||
2006-04-03 Romain Francoise <romain@orebokech.com>
|
||||
|
||||
* dired.el (dired-dnd-protocol-alist): Fix typo.
|
||||
|
||||
2006-04-03 Reiner Steib <Reiner.Steib@gmx.de>
|
||||
|
||||
* savehist.el (savehist): Add :version.
|
||||
(savehist-ignored-variables): New variable.
|
||||
(savehist-minibuffer-hook): Don't save variables listed in
|
||||
`savehist-ignored-variables'.
|
||||
|
||||
* dired.el (dired-dnd-protocol-alist): Mention that change does
|
||||
only apply to new buffers in doc string.
|
||||
|
||||
2006-04-03 Lennart Borgman <lennart.borgman.073@student.lu.se> (tiny change)
|
||||
|
||||
* recentf.el (recentf-open-files-item): Include newline in button
|
||||
field, so opening a file will work, when the point is at the end
|
||||
of the file name. Allow, for example, to [i]search a file by
|
||||
extension and just push RET to open it.
|
||||
|
||||
2006-04-03 Daiki Ueno <ueno@unixuser.org>
|
||||
|
||||
* pgg-gpg.el (pgg-gpg-process-filter)
|
||||
(pgg-gpg-wait-for-completion): Check if buffer is alive.
|
||||
|
||||
* pgg-gpg.el (pgg-gpg-process-sentinel): Don't remove GNUPG:
|
||||
lines, temporary fix.
|
||||
|
||||
2006-04-02 Dan Nicolaescu <dann@ics.uci.edu>
|
||||
|
||||
* ibuf-macs.el (define-ibuffer-column): Document the new parameter.
|
||||
|
||||
2006-04-02 Richard Stallman <rms@gnu.org>
|
||||
|
||||
* progmodes/compile.el (compilation-message-face): Make it defcustom.
|
||||
|
||||
2006-04-02 Dan Nicolaescu <dann@ics.uci.edu>
|
||||
|
||||
* ibuf-macs.el (define-ibuffer-column): Add a new key:
|
||||
header-mouse-map.
|
||||
|
||||
* ibuffer.el (ibuffer-name-header-map, ibuffer-size-header-map)
|
||||
(ibuffer-mode-header-map): New keymaps.
|
||||
(ibuffer-update-title-and-summary): Enable mouse face highlighting
|
||||
and keybindings for column headers.
|
||||
(name,size,mode) <define-ibuffer-column>: Add a header-mouse-map
|
||||
property.
|
||||
|
||||
2006-04-02 Drew Adams <drew.adams@oracle.com> (tiny change)
|
||||
|
||||
* speedbar.el (speedbar-after-create-hook): Doc fix.
|
||||
|
@ -61,8 +358,7 @@
|
|||
|
||||
2006-03-27 Carsten Dominik <dominik@science.uva.nl>
|
||||
|
||||
* textmodes/org.el (org-get-level-face): Fix bug with level
|
||||
counting.
|
||||
* textmodes/org.el (org-get-level-face): Fix bug with level counting.
|
||||
|
||||
2006-03-26 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
|
@ -97,8 +393,8 @@
|
|||
(cua--init-keymaps): Use it instead of fixed C-return.
|
||||
(cua-mode): Set after it.
|
||||
|
||||
* emulation/cua-rect.el (cua--init-rectangles): Use
|
||||
cua-rectangle-mark-key instead of fixed C-return.
|
||||
* emulation/cua-rect.el (cua--init-rectangles):
|
||||
Use cua-rectangle-mark-key instead of fixed C-return.
|
||||
|
||||
2006-03-25 Nick Roberts <nickrob@snap.net.nz>
|
||||
|
||||
|
@ -134,8 +430,7 @@
|
|||
* progmodes/gdb-ui.el (gdb-continuation): Declare earlier to
|
||||
prevent compiler warnings.
|
||||
(gdb-stopped): Check for gud-last-last-frame (case: signal).
|
||||
(breakpoint-disabled): Make lighter for contrast with overlay
|
||||
arrow.
|
||||
(breakpoint-disabled): Make lighter for contrast with overlay arrow.
|
||||
(gdb-assembler-custom): Use hollow-right-triangle for assembler
|
||||
buffer too.
|
||||
|
||||
|
@ -1060,7 +1355,7 @@
|
|||
(org-format-org-table-html, org-format-table-table-html):
|
||||
Fix typos in docstrings.
|
||||
|
||||
12006-02-23 Carsten Dominik <dominik@science.uva.nl>
|
||||
2006-02-23 Carsten Dominik <dominik@science.uva.nl>
|
||||
|
||||
* textmodes/org.el (org-cleaned-string-for-export)
|
||||
(org-solidify-link-text): New function.
|
||||
|
@ -6372,7 +6667,7 @@
|
|||
|
||||
2005-11-24 Carsten Dominik <dominik@science.uva.nl>
|
||||
|
||||
* textmodes/org.el (org-export-plain-list-max-depth): Renamed from
|
||||
* textmodes/org.el (org-export-plain-list-max-depth): Rename from
|
||||
`org-export-local-list-max-depth'. Change default value to 3.
|
||||
(org-auto-renumber-ordered-lists)
|
||||
(org-plain-list-ordered-item-terminator): New options.
|
||||
|
|
|
@ -58,6 +58,7 @@ Interactively, use the command `abbrev-mode'
|
|||
to enable or disable Abbrev mode in the current buffer."
|
||||
:type 'boolean
|
||||
:group 'abbrev-mode)
|
||||
;;;###autoload(put 'abbrev-mode 'safe-local-variable t)
|
||||
|
||||
|
||||
(defvar edit-abbrevs-map
|
||||
|
|
|
@ -45,6 +45,8 @@
|
|||
:type '(choice (const :tag "default" nil)
|
||||
string)
|
||||
:group 'change-log)
|
||||
(put 'change-log-default-name 'safe-local-variable
|
||||
(lambda (a) (or (stringp a) (null a))))
|
||||
|
||||
(defcustom change-log-mode-hook nil
|
||||
"Normal hook run by `change-log-mode'."
|
||||
|
|
|
@ -206,7 +206,8 @@ with the buffer narrowed to the listing."
|
|||
("^file:" . dired-dnd-handle-local-file))
|
||||
"The functions to call when a drop in `dired-mode' is made.
|
||||
See `dnd-protocol-alist' for more information. When nil, behave
|
||||
as in other buffers."
|
||||
as in other buffers. Changing this option is effective only for
|
||||
new dired buffers."
|
||||
:type '(choice (repeat (cons (regexp) (function)))
|
||||
(const :tag "Behave as in other buffers" nil))
|
||||
:version "22.1"
|
||||
|
|
|
@ -2765,9 +2765,15 @@ If FORM is a lambda or a macro, byte-compile it as a function."
|
|||
(byte-compile-warn "`%s' used from Lisp code\n\
|
||||
That command is designed for interactive use only" fn))
|
||||
(if (and handler
|
||||
(or (not (byte-compile-version-cond
|
||||
byte-compile-compatibility))
|
||||
(not (get (get fn 'byte-opcode) 'emacs19-opcode))))
|
||||
;; Make sure that function exists. This is important
|
||||
;; for CL compiler macros since the symbol may be
|
||||
;; `cl-byte-compile-compiler-macro' but if CL isn't
|
||||
;; loaded, this function doesn't exist.
|
||||
(or (not (memq handler '(cl-byte-compile-compiler-macro)))
|
||||
(fboundp handler))
|
||||
(not (and (byte-compile-version-cond
|
||||
byte-compile-compatibility)
|
||||
(get (get fn 'byte-opcode) 'emacs19-opcode))))
|
||||
(funcall handler form)
|
||||
(when (memq 'callargs byte-compile-warnings)
|
||||
(if (memq fn '(custom-declare-group custom-declare-variable custom-declare-face))
|
||||
|
|
|
@ -443,6 +443,9 @@ if that value is non-nil.")
|
|||
(defun eval-print-last-sexp ()
|
||||
"Evaluate sexp before point; print value into current buffer.
|
||||
|
||||
If `eval-expression-debug-on-error' is non-nil, which is the default,
|
||||
this command arranges for all errors to enter the debugger.
|
||||
|
||||
Note that printing the result is controlled by the variables
|
||||
`eval-expression-print-length' and `eval-expression-print-level',
|
||||
which see."
|
||||
|
@ -614,7 +617,10 @@ With argument, print output into current buffer."
|
|||
|
||||
(defun eval-last-sexp (eval-last-sexp-arg-internal)
|
||||
"Evaluate sexp before point; print value in minibuffer.
|
||||
Interactively, with prefix argument, print output into current buffer."
|
||||
Interactively, with prefix argument, print output into current buffer.
|
||||
|
||||
If `eval-expression-debug-on-error' is non-nil, which is the default,
|
||||
this command arranges for all errors to enter the debugger."
|
||||
(interactive "P")
|
||||
(if (null eval-expression-debug-on-error)
|
||||
(eval-last-sexp-1 eval-last-sexp-arg-internal)
|
||||
|
@ -722,6 +728,9 @@ expression even if the variable already has some other value.
|
|||
\(Normally `defvar' and `defcustom' do not alter the value if there
|
||||
already is one.)
|
||||
|
||||
If `eval-expression-debug-on-error' is non-nil, which is the default,
|
||||
this command arranges for all errors to enter the debugger.
|
||||
|
||||
With a prefix argument, instrument the code for Edebug.
|
||||
|
||||
If acting on a `defun' for FUNCTION, and the function was
|
||||
|
|
|
@ -2322,40 +2322,44 @@ asking you for confirmation."
|
|||
|
||||
;; Safe local variables:
|
||||
;;
|
||||
;; For variables defined by minor modes, put the safety declarations
|
||||
;; here, not in the file defining the minor mode (when Emacs visits a
|
||||
;; file specifying that local variable, the minor mode file may not be
|
||||
;; loaded yet). For variables defined by major modes, the safety
|
||||
;; declarations can go into the major mode's file, since that will be
|
||||
;; loaded before file variables are processed.
|
||||
;; For variables defined by major modes, the safety declarations can go into
|
||||
;; the major mode's file, since that will be loaded before file variables are
|
||||
;; processed.
|
||||
;;
|
||||
;; For variables defined by minor modes, put the safety declarations in the
|
||||
;; file defining the minor mode after the defcustom/defvar using an autoload
|
||||
;; cookie, e.g.:
|
||||
;;
|
||||
;; ;;;###autoload(put 'variable 'safe-local-variable 'stringp)
|
||||
;;
|
||||
;; Otherwise, when Emacs visits a file specifying that local variable, the
|
||||
;; minor mode file may not be loaded yet.
|
||||
;;
|
||||
;; For variables defined in the C source code the declaration should go here:
|
||||
|
||||
;; FIXME: Some variables should be moved according to the rules above.
|
||||
(let ((string-or-null (lambda (a) (or (stringp a) (null a)))))
|
||||
(eval
|
||||
`(mapc (lambda (pair)
|
||||
(put (car pair) 'safe-local-variable (cdr pair)))
|
||||
'((byte-compile-dynamic . t)
|
||||
(byte-compile-dynamic-docstrings . t)
|
||||
(byte-compile-warnings . t)
|
||||
(c-basic-offset . integerp)
|
||||
(c-file-style . stringp)
|
||||
(c-indent-level . integerp)
|
||||
(comment-column . integerp)
|
||||
(compile-command . ,string-or-null)
|
||||
(compile-command . string-or-null-p)
|
||||
(fill-column . integerp)
|
||||
(fill-prefix . ,string-or-null)
|
||||
(fill-prefix . string-or-null-p)
|
||||
(indent-tabs-mode . t)
|
||||
(ispell-check-comments . (lambda (a)
|
||||
(memq a '(nil t exclusive))))
|
||||
(ispell-local-dictionary . ,string-or-null)
|
||||
(kept-new-versions . integerp)
|
||||
(left-margin . t)
|
||||
(no-byte-compile . t)
|
||||
(no-update-autoloads . t)
|
||||
(outline-regexp . ,string-or-null)
|
||||
(page-delimiter . ,string-or-null)
|
||||
(paragraph-start . ,string-or-null)
|
||||
(paragraph-separate . ,string-or-null)
|
||||
(sentence-end . ,string-or-null)
|
||||
(sentence-end-double-space . t)
|
||||
(tab-width . integerp)
|
||||
(truncate-lines . t)
|
||||
(outline-regexp . string-or-null-p)
|
||||
(tab-width . integerp) ;; C source code
|
||||
(truncate-lines . t) ;; C source code
|
||||
(version-control . t)))))
|
||||
|
||||
(put 'c-set-style 'safe-local-eval-function t)
|
||||
|
@ -2388,8 +2392,8 @@ y -- to apply the local variables list.
|
|||
n -- to ignore the local variables list.")
|
||||
(if offer-save
|
||||
(insert "
|
||||
! -- to apply the local variables list, and mark these values (*) as
|
||||
safe (in the future, they can be set automatically.)\n\n")
|
||||
! -- to apply the local variables list, and permanently mark these
|
||||
values (*) as safe (in the future, they will be set automatically.)\n\n")
|
||||
(insert "\n\n"))
|
||||
(dolist (elt vars)
|
||||
(cond ((member elt unsafe-vars)
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
2006-04-06 Reiner Steib <Reiner.Steib@gmx.de>
|
||||
|
||||
* gnus-fun.el (gnus): Require it for gnus-directory.
|
||||
|
||||
2006-04-04 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
|
||||
|
||||
* nnweb.el (nnweb-google-create-mapping): Update regexp. Some
|
||||
whitespace was matched into the url, which broke browsing hits
|
||||
> 100 when mm-url-use-external was nil.
|
||||
|
||||
2006-03-31 Reiner Steib <Reiner.Steib@gmx.de>
|
||||
|
||||
* gnus-group.el (gnus-group-update-tool-bar): Add :initialize and
|
||||
|
@ -2137,6 +2147,10 @@
|
|||
* nnrss.el (nnrss-fetch): Signal an error if w3-parse-buffer also
|
||||
failed.
|
||||
|
||||
2005-04-06 Joakim Verona <joakim@verona.se> (tiny change)
|
||||
|
||||
* nnrss.el (nnrss-read-group-data): Fix off-by-one error.
|
||||
|
||||
2005-04-06 Jesper Harder <harder@ifa.au.dk>
|
||||
|
||||
* mm-util.el (mm-subst-char-in-string): Support inplace.
|
||||
|
@ -2147,9 +2161,8 @@
|
|||
(nnrss-request-delete-group): Use nnrss-make-filename.
|
||||
(nnrss-read-server-data): Use nnrss-make-filename; use load.
|
||||
(nnrss-save-server-data): Use nnrss-make-filename; use gnus-prin1.
|
||||
(nnrss-read-group-data): Fix off-by-one error. From Joakim Verona
|
||||
<joakim@verona.se>; hash on description if link is missing; use
|
||||
nnrss-make-filename; use load.
|
||||
(nnrss-read-group-data): hash on description if link is missing;
|
||||
use nnrss-make-filename; use load.
|
||||
(nnrss-save-group-data): Use nnrss-make-filename; use gnus-prin1.
|
||||
(nnrss-make-filename): New function.
|
||||
(nnrss-close): New function.
|
||||
|
@ -2298,11 +2311,10 @@
|
|||
* nnmaildir.el (nnmaildir-request-accept-article):
|
||||
Use `nnheader-cancel-timer' for compatibility with current XEmacs.
|
||||
|
||||
2005-03-13 Steve Youngs <steve@sxemacs.org>
|
||||
2005-03-13 Andrey Slusar <anrays@gmail.com> (tiny change)
|
||||
|
||||
* gnus.el: Don't try and mark `gnus-agent-save-groups' as an
|
||||
autoloaded function.
|
||||
From: Andrey Slusar <anrays@gmail.com>.
|
||||
|
||||
2005-03-13 Steve Youngs <steve@sxemacs.org>
|
||||
|
||||
|
@ -2664,6 +2676,11 @@
|
|||
article buffer with a draft file. This is a temporary measure
|
||||
against the 2004-08-22 change to gnus-article-edit-mode.
|
||||
|
||||
2004-11-02 From Ilya N. Golubev <gin@mo.msk.ru>.
|
||||
|
||||
* mm-util.el (mm-mime-mule-charset-alist): Add the windows-1251
|
||||
entry.
|
||||
|
||||
2004-11-02 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* html2text.el (html2text-get-attr): Remove unused argument `tag'.
|
||||
|
@ -2672,11 +2689,9 @@
|
|||
* mm-util.el (mm-enrich-utf-8-by-mule-ucs): Fix cleaning of
|
||||
after-load-alist.
|
||||
|
||||
* mm-util.el (mm-mime-mule-charset-alist): Add the windows-1251
|
||||
entry. From Ilya N. Golubev <gin@mo.msk.ru>.
|
||||
(mm-enrich-utf-8-by-mule-ucs): New function run when Mule-UCS is
|
||||
loaded under XEmacs.
|
||||
(): Don't make duplicated entries in mm-mime-mule-charset-alist.
|
||||
* mm-util.el (mm-enrich-utf-8-by-mule-ucs): New function run when
|
||||
Mule-UCS is loaded under XEmacs.
|
||||
(mm-mime-mule-charset-alist): Avoid duplicated entries.
|
||||
|
||||
* mm-util.el (mm-coding-system-p): Return a coding-system.
|
||||
(mm-mime-mule-charset-alist): Use shift_jis instead of
|
||||
|
@ -3282,6 +3297,10 @@
|
|||
|
||||
* mm-decode.el (mm-copy-to-buffer): Don't use set-buffer-multibyte.
|
||||
|
||||
2004-09-26 Christian Neukirchen <chneukirchen@yahoo.de> (tiny change)
|
||||
|
||||
* mm-util.el (mm-image-load-path): Handle nil in load-path.
|
||||
|
||||
2004-09-26 Jesper Harder <harder@ifa.au.dk>
|
||||
|
||||
* gnus-msg.el (gnus-post-news): Use blank Newsgroups line if
|
||||
|
@ -3311,9 +3330,6 @@
|
|||
* gnus-cache.el (gnus-cache-save-buffers): Check if buffer is
|
||||
alive. Reported by Laurent Martelli <laurent@aopsys.com>.
|
||||
|
||||
* mm-util.el (mm-image-load-path): Handle nil in load-path.
|
||||
From Christian Neukirchen <chneukirchen@yahoo.de>.
|
||||
|
||||
* html2text.el (html2text-replace-list): Add & and '.
|
||||
|
||||
* nnheader.el (nnheader-max-head-length): Increase to 8192.
|
||||
|
@ -3537,7 +3553,8 @@
|
|||
|
||||
* gnus-sum.el (gnus-summary-insert-subject): Remove list identifiers.
|
||||
|
||||
From Hiroshi Fujishima <pooh@nature.tsukuba.ac.jp> (tiny change).
|
||||
2004-09-03 Hiroshi Fujishima <pooh@nature.tsukuba.ac.jp> (tiny change)
|
||||
|
||||
* spam-stat.el (spam-stat-reduce-size): Set spam-stat-dirty.
|
||||
(spam-stat-save): Accept prefix argument.
|
||||
|
||||
|
@ -3560,7 +3577,7 @@
|
|||
|
||||
* pgg-pgp.el (pgg-pgp-verify-region): Clean up.
|
||||
|
||||
2004-05-19 Michael Schierl <schierlm-usenet@gmx.de>
|
||||
2004-05-19 Michael Schierl <schierlm-usenet@gmx.de> (tiny change)
|
||||
|
||||
* pgg-pgp.el (pgg-pgp-verify-region): Default when signature
|
||||
isn't a string.
|
||||
|
@ -3679,8 +3696,25 @@
|
|||
|
||||
* gnus-agent.el (gnus-agent-restore-gcc): Use ^ and regexp-quote.
|
||||
|
||||
* gnus-sum.el (gnus-newsgroup-variables): Doc fix (tiny change).
|
||||
From Helmut Waitzmann <Helmut.Waitzmann@web.de>.
|
||||
2004-08-30 Helmut Waitzmann <Helmut.Waitzmann@web.de> (tiny change)
|
||||
|
||||
* gnus-sum.el (gnus-newsgroup-variables): Doc fix.
|
||||
|
||||
2004-08-26 YAGI Tatsuya <ynyaaa@ybb.ne.jp> (tiny change)
|
||||
|
||||
* gnus-art.el (gnus-article-next-page): Fix the way to find a real
|
||||
end-of-buffer.
|
||||
|
||||
2004-08-26 Stefan Wiens <s.wi@gmx.net> (tiny change)
|
||||
|
||||
* gnus-sum.el (gnus-read-header): Don't remove a header for the
|
||||
parent article of a sparse article in the thread hashtb.
|
||||
|
||||
2004-08-26 David Hedbor <dhedbor@real.com> (tiny change)
|
||||
|
||||
* nnmail.el (nnmail-split-lowercase-expanded): New user option.
|
||||
(nnmail-expand-newtext): Lowercase expanded entries if
|
||||
nnmail-split-lowercase-expanded is non-nil.
|
||||
|
||||
* gnus-agent.el (gnus-agent-regenerate-group): Activate the group
|
||||
when the group's active is not available.
|
||||
|
@ -3688,8 +3722,6 @@
|
|||
* gnus-art.el (article-hide-headers): Refer to the values for
|
||||
gnus-ignored-headers and gnus-visible-headers in the summary
|
||||
buffer since a user may have set them as group parameters.
|
||||
(gnus-article-next-page): Fix the way to find a real end-of-buffer
|
||||
(tiny change). From YAGI Tatsuya <ynyaaa@ybb.ne.jp>.
|
||||
(gnus-article-read-summary-keys): Restore new window-start and
|
||||
hscroll to summary window.
|
||||
(gnus-prev-page-map): Remove duplicated one.
|
||||
|
@ -3718,10 +3750,6 @@
|
|||
* gnus-spec.el (gnus-update-format): Replace pp-to-string with
|
||||
gnus-pp-to-string.
|
||||
|
||||
* gnus-sum.el (gnus-read-header): Don't remove a header for the
|
||||
parent article of a sparse article in the thread hashtb.
|
||||
From Stefan Wiens <s.wi@gmx.net>.
|
||||
|
||||
* gnus-util.el (gnus-bind-print-variables): New macro.
|
||||
(gnus-prin1): Use it.
|
||||
(gnus-prin1-to-string): Use it.
|
||||
|
@ -3761,11 +3789,6 @@
|
|||
(nndoc-rfc822-forward-generate-article): New function.
|
||||
(nndoc-rfc822-forward-generate-head): New function.
|
||||
|
||||
From David Hedbor <dhedbor@real.com>.
|
||||
* nnmail.el (nnmail-split-lowercase-expanded): New user option.
|
||||
(nnmail-expand-newtext): Lowercase expanded entries if
|
||||
nnmail-split-lowercase-expanded is non-nil.
|
||||
|
||||
* score-mode.el (gnus-score-pretty-print): Replace pp with gnus-pp.
|
||||
|
||||
* webmail.el (webmail-debug): Replace pp with gnus-pp.
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
(require 'mm-util)
|
||||
(require 'gnus-ems)
|
||||
(require 'gnus-util)
|
||||
(require 'gnus)
|
||||
|
||||
(defcustom gnus-x-face-directory (expand-file-name "x-faces" gnus-directory)
|
||||
"*Directory where X-Face PBM files are stored."
|
||||
|
|
|
@ -415,7 +415,7 @@ Valid types include `google', `dejanews', and `gmane'.")
|
|||
(goto-char (point-min))
|
||||
(incf i 100)
|
||||
(if (or (not (re-search-forward
|
||||
"<a href=\"\n\\([^>\"]+\\)\"><img src=\"[^\"]+next"
|
||||
"<a href=\"\n\\([^>\" \n\t]+\\)[^<]*<img src=[^>]+next"
|
||||
nil t))
|
||||
(>= i nnweb-max-hits))
|
||||
(setq more nil)
|
||||
|
|
|
@ -75,8 +75,8 @@ During evaluation of body, bind `it' to the value returned by TEST."
|
|||
;; (put 'ibuffer-save-marks 'lisp-indent-function 0)
|
||||
|
||||
;;;###autoload
|
||||
(defmacro* define-ibuffer-column (symbol (&key name inline props
|
||||
summarizer) &rest body)
|
||||
(defmacro* define-ibuffer-column (symbol (&key name inline props summarizer
|
||||
header-mouse-map) &rest body)
|
||||
"Define a column SYMBOL for use with `ibuffer-formats'.
|
||||
|
||||
BODY will be called with `buffer' bound to the buffer object, and
|
||||
|
@ -90,6 +90,9 @@ the text, such as `mouse-face'. And SUMMARIZER, if given, is a
|
|||
function which will be passed a list of all the strings in its column;
|
||||
it should return a string to display at the bottom.
|
||||
|
||||
If HEADER-MOUSE-MAP is given, it will be used as a keymap for the
|
||||
title of the column.
|
||||
|
||||
Note that this macro expands into a `defun' for a function named
|
||||
ibuffer-make-column-NAME. If INLINE is non-nil, then the form will be
|
||||
inlined into the compiled format versions. This means that if you
|
||||
|
@ -115,6 +118,7 @@ change its definition, you should explicitly call
|
|||
,(if (stringp name)
|
||||
name
|
||||
(capitalize (symbol-name symbol))))
|
||||
,(if header-mouse-map `(put (quote ,sym) 'header-mouse-map ,header-mouse-map))
|
||||
,(if summarizer
|
||||
;; Store the name of the summarizing function.
|
||||
`(put (quote ,sym) 'ibuffer-column-summarizer
|
||||
|
|
|
@ -829,6 +829,21 @@ directory, like `default-directory'."
|
|||
(define-key map (kbd "RET") 'ibuffer-interactive-filter-by-mode)
|
||||
map))
|
||||
|
||||
(defvar ibuffer-name-header-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map [(mouse-1)] 'ibuffer-do-sort-by-alphabetic)
|
||||
map))
|
||||
|
||||
(defvar ibuffer-size-header-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map [(mouse-1)] 'ibuffer-do-sort-by-size)
|
||||
map))
|
||||
|
||||
(defvar ibuffer-mode-header-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map [(mouse-1)] 'ibuffer-do-sort-by-major-mode)
|
||||
map))
|
||||
|
||||
(defvar ibuffer-mode-filter-group-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map [(mouse-1)] 'ibuffer-mouse-toggle-mark)
|
||||
|
@ -1666,6 +1681,7 @@ If point is on a group name, this function operates on that group."
|
|||
|
||||
(define-ibuffer-column name
|
||||
(:inline t
|
||||
:header-mouse-map ibuffer-name-header-map
|
||||
:props
|
||||
('mouse-face 'highlight 'keymap ibuffer-name-map
|
||||
'ibuffer-name-column t
|
||||
|
@ -1682,6 +1698,7 @@ If point is on a group name, this function operates on that group."
|
|||
|
||||
(define-ibuffer-column size
|
||||
(:inline t
|
||||
:header-mouse-map ibuffer-size-header-map
|
||||
:summarizer
|
||||
(lambda (column-strings)
|
||||
(let ((total 0))
|
||||
|
@ -1695,6 +1712,7 @@ If point is on a group name, this function operates on that group."
|
|||
|
||||
(define-ibuffer-column mode
|
||||
(:inline t
|
||||
:header-mouse-map ibuffer-mode-header-map
|
||||
:props
|
||||
('mouse-face 'highlight
|
||||
'keymap ibuffer-mode-name-map
|
||||
|
@ -2009,12 +2027,18 @@ the value of point at the beginning of the line for that buffer."
|
|||
(setq min (- min)))
|
||||
(let* ((name (or (get sym 'ibuffer-column-name)
|
||||
(error "Unknown column %s in ibuffer-formats" sym)))
|
||||
(len (length name)))
|
||||
(if (< len min)
|
||||
(ibuffer-format-column name
|
||||
(- min len)
|
||||
align)
|
||||
name))))))
|
||||
(len (length name))
|
||||
(hmap (get sym 'header-mouse-map))
|
||||
(strname (if (< len min)
|
||||
(ibuffer-format-column name
|
||||
(- min len)
|
||||
align)
|
||||
name)))
|
||||
(when hmap
|
||||
(setq
|
||||
strname
|
||||
(propertize strname 'mouse-face 'highlight 'keymap hmap)))
|
||||
strname)))))
|
||||
(add-text-properties opos (point) `(ibuffer-title-header t))
|
||||
(insert "\n")
|
||||
;; Add the underlines
|
||||
|
|
89
lisp/ido.el
89
lisp/ido.el
|
@ -360,7 +360,10 @@ use either \\[customize] or the function `ido-mode'."
|
|||
:initialize 'custom-initialize-set
|
||||
:require 'ido
|
||||
:link '(emacs-commentary-link "ido.el")
|
||||
:set-after '(ido-save-directory-list-file)
|
||||
:set-after '(ido-save-directory-list-file
|
||||
;; This will clear ido-unc-hosts-cache, so set it
|
||||
;; before loading history file.
|
||||
ido-unc-hosts)
|
||||
:type '(choice (const :tag "Turn on only buffer" buffer)
|
||||
(const :tag "Turn on only file" file)
|
||||
(const :tag "Turn on both buffer and file" both)
|
||||
|
@ -631,7 +634,7 @@ equivalent function, e.g. `find-file' rather than `ido-find-file'."
|
|||
:group 'ido)
|
||||
|
||||
(defvar ido-unc-hosts-cache t
|
||||
"Cached value from ido-unc-hosts function.")
|
||||
"Cached value from `ido-unc-hosts' function.")
|
||||
|
||||
(defcustom ido-unc-hosts nil
|
||||
"*List of known UNC host names to complete after initial //.
|
||||
|
@ -646,12 +649,15 @@ hosts on first use of UNC path."
|
|||
(setq ido-unc-hosts-cache t))
|
||||
:group 'ido)
|
||||
|
||||
(defcustom ido-downcase-unc-hosts t
|
||||
"*Non-nil if UNC host names should be downcased."
|
||||
:type 'boolean
|
||||
:group 'ido)
|
||||
|
||||
(defcustom ido-ignore-unc-host-regexps nil
|
||||
"*List of regexps matching UNC hosts to ignore."
|
||||
"*List of regexps matching UNC hosts to ignore.
|
||||
Case is ignored if `ido-downcase-unc-hosts' is set."
|
||||
:type '(repeat regexp)
|
||||
:set #'(lambda (symbol value)
|
||||
(set symbol value)
|
||||
(setq ido-unc-hosts-cache t))
|
||||
:group 'ido)
|
||||
|
||||
(defcustom ido-cache-unc-host-shares-time 8.0
|
||||
|
@ -1132,33 +1138,40 @@ it doesn't interfere with other minibuffer usage.")
|
|||
|
||||
(defun ido-unc-hosts (&optional query)
|
||||
"Return list of UNC host names."
|
||||
(cond
|
||||
((listp ido-unc-hosts)
|
||||
ido-unc-hosts) ;; static list or nil
|
||||
((listp ido-unc-hosts-cache)
|
||||
ido-unc-hosts-cache) ;; result of net search
|
||||
((and query (fboundp ido-unc-hosts))
|
||||
(message "Searching for UNC hosts...")
|
||||
(let ((hosts (funcall ido-unc-hosts)) host re-list re)
|
||||
(setq ido-unc-hosts-cache nil)
|
||||
(while hosts
|
||||
(setq host (downcase (car hosts))
|
||||
hosts (cdr hosts)
|
||||
re-list ido-ignore-unc-host-regexps)
|
||||
(while re-list
|
||||
(setq re (car re-list)
|
||||
re-list (cdr re-list))
|
||||
(if (string-match re host)
|
||||
(setq re-list nil
|
||||
host nil)))
|
||||
(if host
|
||||
(setq ido-unc-hosts-cache (cons host ido-unc-hosts-cache)))))
|
||||
(message nil)
|
||||
(setq ido-unc-hosts-cache
|
||||
(sort ido-unc-hosts-cache #'string<)))
|
||||
(query
|
||||
(setq ido-unc-hosts-cache nil))
|
||||
(t (fboundp ido-unc-hosts))))
|
||||
(let ((hosts
|
||||
(cond
|
||||
((listp ido-unc-hosts)
|
||||
ido-unc-hosts) ;; static list or nil
|
||||
((listp ido-unc-hosts-cache)
|
||||
ido-unc-hosts-cache) ;; result of net search
|
||||
((and query (fboundp ido-unc-hosts))
|
||||
(message (propertize "Searching for UNC hosts..." 'face 'highlight))
|
||||
(setq ido-unc-hosts-cache (funcall ido-unc-hosts))
|
||||
(message nil)
|
||||
ido-unc-hosts-cache)
|
||||
(query
|
||||
(setq ido-unc-hosts-cache nil))
|
||||
(t (fboundp ido-unc-hosts)))))
|
||||
(when query
|
||||
(let ((case-fold-search ido-downcase-unc-hosts)
|
||||
res host re-list re)
|
||||
(while hosts
|
||||
(setq host (car hosts)
|
||||
hosts (cdr hosts)
|
||||
re-list (and ido-process-ignore-lists
|
||||
ido-ignore-unc-host-regexps))
|
||||
(while re-list
|
||||
(setq re (car re-list)
|
||||
re-list (cdr re-list))
|
||||
(if (string-match re host)
|
||||
(setq re-list nil
|
||||
host nil)))
|
||||
(when host
|
||||
(when ido-downcase-unc-hosts
|
||||
(setq host (downcase host)))
|
||||
(setq res (cons host res))))
|
||||
(setq hosts (sort res #'string<))))
|
||||
hosts))
|
||||
|
||||
(defun ido-unc-hosts-net-view ()
|
||||
"Query network for list of UNC host names using `NET VIEW'."
|
||||
|
@ -1280,6 +1293,9 @@ it doesn't interfere with other minibuffer usage.")
|
|||
(ido-pp 'ido-work-directory-list)
|
||||
(ido-pp 'ido-work-file-list)
|
||||
(ido-pp 'ido-dir-file-cache "\n\n ")
|
||||
(if (listp ido-unc-hosts-cache)
|
||||
(ido-pp 'ido-unc-hosts-cache)
|
||||
(insert "\n;; ----- ido-unc-hosts-cache -----\nt\n"))
|
||||
(insert "\n")
|
||||
(write-file ido-save-directory-list-file nil))
|
||||
(kill-buffer buf)))))
|
||||
|
@ -1301,7 +1317,8 @@ With prefix argument, reload history unconditionally."
|
|||
(setq ido-last-directory-list (read (current-buffer))
|
||||
ido-work-directory-list (read (current-buffer))
|
||||
ido-work-file-list (read (current-buffer))
|
||||
ido-dir-file-cache (read (current-buffer)))
|
||||
ido-dir-file-cache (read (current-buffer))
|
||||
ido-unc-hosts-cache (read (current-buffer)))
|
||||
(error nil)))
|
||||
(kill-buffer buf)))))
|
||||
(ido-wash-history))
|
||||
|
@ -2582,7 +2599,9 @@ timestamp has not changed (e.g. with ftp or on Windows)."
|
|||
(interactive)
|
||||
(if (and ido-mode (eq ido-cur-item 'file))
|
||||
(progn
|
||||
(ido-remove-cached-dir ido-current-directory)
|
||||
(if (ido-is-unc-root)
|
||||
(setq ido-unc-hosts-cache t)
|
||||
(ido-remove-cached-dir ido-current-directory))
|
||||
(setq ido-text-init ido-text)
|
||||
(setq ido-rotate-temp t)
|
||||
(setq ido-exit 'refresh)
|
||||
|
|
|
@ -3044,7 +3044,11 @@ At end of the node's text, moves to the next node, or up if none."
|
|||
(defun Info-follow-nearest-node (&optional fork)
|
||||
"Follow a node reference near point.
|
||||
If point is on a reference, follow that reference. Otherwise,
|
||||
if point is in a menu item description, follow that menu item."
|
||||
if point is in a menu item description, follow that menu item.
|
||||
|
||||
If FORK is non-nil (interactively with a prefix arg), show the node in
|
||||
a new Info buffer.
|
||||
If FORK is a string, it is the name to use for the new buffer."
|
||||
(interactive "P")
|
||||
(or (Info-try-follow-nearest-node fork)
|
||||
(when (save-excursion
|
||||
|
|
|
@ -135,6 +135,17 @@
|
|||
(map-charset-chars #'modify-category-entry 'chinese-gb2312 ?Y #x2721 #x277E)
|
||||
(map-charset-chars #'modify-category-entry 'chinese-gb2312 ?C #x3021 #x7E7E)
|
||||
|
||||
(let ((tbl (standard-case-table)))
|
||||
(dotimes (i 26)
|
||||
(set-case-syntax-pair (make-char 'chinese-gb2312 #x23 (+ #x41 i))
|
||||
(make-char 'chinese-gb2312 #x23 (+ #x61 i)) tbl))
|
||||
(dotimes (i 24)
|
||||
(set-case-syntax-pair (make-char 'chinese-gb2312 #x26 (+ #x21 i))
|
||||
(make-char 'chinese-gb2312 #x26 (+ #x41 i)) tbl))
|
||||
(dotimes (i 33)
|
||||
(set-case-syntax-pair (make-char 'chinese-gb2312 #x27 (+ #x21 i))
|
||||
(make-char 'chinese-gb2312 #x27 (+ #x51 i)) tbl)))
|
||||
|
||||
;; Chinese character set (BIG5)
|
||||
|
||||
(map-charset-chars #'modify-category-entry 'big5 ?c)
|
||||
|
@ -425,6 +436,17 @@
|
|||
(if lc (modify-category-entry lc ?v)))
|
||||
(setq i (1+ i))))
|
||||
|
||||
(let ((tbl (standard-case-table)))
|
||||
(dotimes (i 22)
|
||||
(set-case-syntax-pair (decode-big5-char (+ #xA2CF i))
|
||||
(decode-big5-char (+ #xA2CF i 26)) tbl))
|
||||
(dotimes (i 4)
|
||||
(set-case-syntax-pair (decode-big5-char (+ #xA2E4 i))
|
||||
(decode-big5-char (+ #xA340 i)) tbl))
|
||||
(dotimes (i 24)
|
||||
(set-case-syntax-pair (decode-big5-char (+ #xA344 i))
|
||||
(decode-big5-char (+ #xA344 i 24)) tbl)))
|
||||
|
||||
|
||||
;; Latin
|
||||
|
||||
|
|
|
@ -2085,6 +2085,7 @@ of `buffer-file-coding-system' set by this function."
|
|||
("cy" "Welsh" iso-8859-14)
|
||||
("da" . "Latin-1") ; Danish
|
||||
("de" "German" iso-8859-1)
|
||||
; dv Divehi
|
||||
; dz Bhutani
|
||||
("el" "Greek" iso-8859-7)
|
||||
;; Users who specify "en" explicitly typically want Latin-1, not ASCII.
|
||||
|
@ -2246,6 +2247,10 @@ of `buffer-file-coding-system' set by this function."
|
|||
("jp" . "Japanese") ; e.g. MS Windows
|
||||
("chs" . "Chinese-GB") ; MS Windows Chinese Simplified
|
||||
("cht" . "Chinese-BIG5") ; MS Windows Chinese Traditional
|
||||
("gbz" . "UTF-8") ; MS Windows Dari Persian
|
||||
("div" . "UTF-8") ; MS Windows Divehi (Maldives)
|
||||
("wee" . "Latin-2") ; MS Windows Lower Sorbian
|
||||
("wen" . "Latin-2") ; MS Windows Upper Sorbian
|
||||
))
|
||||
"Alist of locale regexps vs the corresponding languages and coding systems.
|
||||
Each element has these form:
|
||||
|
@ -2446,6 +2451,8 @@ See also `locale-charset-language-names', `locale-language-names',
|
|||
(locale-name-match locale locale-language-names))
|
||||
(charset-language-name
|
||||
(locale-name-match locale locale-charset-language-names))
|
||||
(default-eol-type (coding-system-eol-type
|
||||
default-buffer-file-coding-system))
|
||||
(coding-system
|
||||
(or (locale-name-match locale locale-preferred-coding-systems)
|
||||
(when locale
|
||||
|
@ -2466,6 +2473,13 @@ See also `locale-charset-language-names', `locale-language-names',
|
|||
(if (not language-name)
|
||||
(setq language-name charset-language-name)))
|
||||
|
||||
;; If a specific EOL conversion was specified in the default
|
||||
;; buffer-file-coding-system, preserve it in the coding system
|
||||
;; we will be using from now on.
|
||||
(if (memq default-eol-type '(0 1 2 unix dos mac))
|
||||
(setq coding-system (coding-system-change-eol-conversion
|
||||
coding-system default-eol-type)))
|
||||
|
||||
(when language-name
|
||||
|
||||
;; Set up for this character set. This is now the right way
|
||||
|
|
27
lisp/man.el
27
lisp/man.el
|
@ -416,6 +416,9 @@ Otherwise, the value is whatever the function
|
|||
(define-key Man-mode-map "k" 'Man-kill)
|
||||
(define-key Man-mode-map "q" 'Man-quit)
|
||||
(define-key Man-mode-map "m" 'man)
|
||||
;; Not all the man references get buttons currently. The text in the
|
||||
;; manual page can contain references to other man pages
|
||||
(define-key Man-mode-map "\r" 'man-follow)
|
||||
(define-key Man-mode-map "?" 'describe-mode))
|
||||
|
||||
;; buttons
|
||||
|
@ -423,10 +426,13 @@ Otherwise, the value is whatever the function
|
|||
'follow-link t
|
||||
'help-echo "mouse-2, RET: display this man page"
|
||||
'func nil
|
||||
'action (lambda (button) (funcall
|
||||
(button-get button 'func)
|
||||
(or (button-get button 'Man-target-string)
|
||||
(button-label button)))))
|
||||
'action (lambda (button)
|
||||
(funcall
|
||||
(button-get button 'func)
|
||||
(let ((func (button-get button 'Man-target-string)))
|
||||
(if func
|
||||
(if (functionp func) (funcall func) func)
|
||||
(button-label button))))))
|
||||
|
||||
(define-button-type 'Man-xref-man-page
|
||||
:supertype 'Man-abstract-xref-man-page
|
||||
|
@ -929,15 +935,14 @@ default type, `Man-xref-man-page' is used for the buttons."
|
|||
(setq Man-arguments ""))
|
||||
(if (string-match "-k " Man-arguments)
|
||||
(progn
|
||||
(Man-highlight-references0 nil Man-reference-regexp 1 nil
|
||||
(Man-highlight-references0 nil Man-reference-regexp 1
|
||||
'Man-default-man-entry
|
||||
(or xref-man-type 'Man-xref-man-page))
|
||||
(Man-highlight-references0 nil Man-apropos-regexp 1
|
||||
(lambda ()
|
||||
(format "%s(%s)"
|
||||
(match-string 1)
|
||||
(match-string 2)))
|
||||
'Man-default-man-entry
|
||||
(or xref-man-type 'Man-xref-man-page)))
|
||||
(Man-highlight-references0 Man-see-also-regexp Man-reference-regexp 1 nil
|
||||
(Man-highlight-references0 Man-see-also-regexp Man-reference-regexp 1
|
||||
'Man-default-man-entry
|
||||
(or xref-man-type 'Man-xref-man-page))
|
||||
(Man-highlight-references0 Man-synopsis-regexp Man-header-regexp 0 2
|
||||
'Man-xref-header-file)
|
||||
|
@ -966,7 +971,7 @@ default type, `Man-xref-man-page' is used for the buttons."
|
|||
((numberp target)
|
||||
(match-string target))
|
||||
((functionp target)
|
||||
(funcall target))
|
||||
target)
|
||||
(t nil)))))))
|
||||
|
||||
(defun Man-cleanup-manpage (&optional interactive)
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2006-04-07 Bill Wohler <wohler@newt.com>
|
||||
|
||||
* mh-e.el (mh-path, mh-variant): Define with mh-defcustom and add
|
||||
:package-version keyword.
|
||||
|
||||
2006-03-31 Bill Wohler <wohler@newt.com>
|
||||
|
||||
* mh-e.el (mh-strip-package-version): Move before use to avoid
|
||||
|
|
|
@ -644,13 +644,66 @@ Set mark after inserted text."
|
|||
|
||||
|
||||
|
||||
;;; MH-E Customization Support Routines
|
||||
|
||||
;; Shush compiler (Emacs 21 and XEmacs).
|
||||
(defvar customize-package-emacs-version-alist)
|
||||
|
||||
;; Temporary function and data structure used customization.
|
||||
;; These will be unbound after the options are defined.
|
||||
(defmacro mh-strip-package-version (args)
|
||||
"Strip :package-version keyword and its value from ARGS.
|
||||
In Emacs versions that support the :package-version keyword,
|
||||
ARGS is returned unchanged."
|
||||
`(if (boundp 'customize-package-emacs-version-alist)
|
||||
,args
|
||||
(let (seen)
|
||||
(loop for keyword in ,args
|
||||
if (cond ((eq keyword ':package-version) (setq seen t) nil)
|
||||
(seen (setq seen nil) nil)
|
||||
(t t))
|
||||
collect keyword))))
|
||||
|
||||
(defmacro mh-defgroup (symbol members doc &rest args)
|
||||
"Declare SYMBOL as a customization group containing MEMBERS.
|
||||
See documentation for `defgroup' for a description of the arguments
|
||||
SYMBOL, MEMBERS, DOC and ARGS.
|
||||
This macro is used by Emacs versions that lack the :package-version
|
||||
keyword, introduced in Emacs 22."
|
||||
(declare (doc-string 3))
|
||||
`(defgroup ,symbol ,members ,doc ,@(mh-strip-package-version args)))
|
||||
(put 'mh-defgroup 'lisp-indent-function 'defun)
|
||||
|
||||
(defmacro mh-defcustom (symbol value doc &rest args)
|
||||
"Declare SYMBOL as a customizable variable that defaults to VALUE.
|
||||
See documentation for `defcustom' for a description of the arguments
|
||||
SYMBOL, VALUE, DOC and ARGS.
|
||||
This macro is used by Emacs versions that lack the :package-version
|
||||
keyword, introduced in Emacs 22."
|
||||
(declare (doc-string 3))
|
||||
`(defcustom ,symbol ,value ,doc ,@(mh-strip-package-version args)))
|
||||
(put 'mh-defcustom 'lisp-indent-function 'defun)
|
||||
|
||||
(defmacro mh-defface (face spec doc &rest args)
|
||||
"Declare FACE as a customizable face that defaults to SPEC.
|
||||
See documentation for `defface' for a description of the arguments
|
||||
FACE, SPEC, DOC and ARGS.
|
||||
This macro is used by Emacs versions that lack the :package-version
|
||||
keyword, introduced in Emacs 22."
|
||||
(declare (doc-string 3))
|
||||
`(defface ,face ,spec ,doc ,@(mh-strip-package-version args)))
|
||||
(put 'mh-defface 'lisp-indent-function 'defun)
|
||||
|
||||
|
||||
|
||||
;;; Variant Support
|
||||
|
||||
(defcustom mh-path nil
|
||||
(mh-defcustom mh-path nil
|
||||
"*Additional list of directories to search for MH.
|
||||
See `mh-variant'."
|
||||
:group 'mh-e
|
||||
:type '(repeat (directory)))
|
||||
:type '(repeat (directory))
|
||||
:package-version '(MH-E "8.0"))
|
||||
|
||||
(defun mh-variants ()
|
||||
"Return a list of installed variants of MH on the system.
|
||||
|
@ -859,7 +912,7 @@ finally GNU mailutils."
|
|||
(mapconcat '(lambda (x) (format "%s" (car x)))
|
||||
(mh-variants) " or "))))))
|
||||
|
||||
(defcustom mh-variant 'autodetect
|
||||
(mh-defcustom mh-variant 'autodetect
|
||||
"*Specifies the variant used by MH-E.
|
||||
|
||||
The default setting of this option is \"Auto-detect\" which means
|
||||
|
@ -884,59 +937,8 @@ necessary and can actually cause problems."
|
|||
:set (lambda (symbol value)
|
||||
(set-default symbol value) ;Done in mh-variant-set-variant!
|
||||
(mh-variant-set value))
|
||||
:group 'mh-e)
|
||||
|
||||
|
||||
|
||||
;;; MH-E Customization Support Routines
|
||||
|
||||
;; Shush compiler (Emacs 21 and XEmacs).
|
||||
(defvar customize-package-emacs-version-alist)
|
||||
|
||||
;; Temporary function and data structure used customization.
|
||||
;; These will be unbound after the options are defined.
|
||||
(defmacro mh-strip-package-version (args)
|
||||
"Strip :package-version keyword and its value from ARGS.
|
||||
In Emacs versions that support the :package-version keyword,
|
||||
ARGS is returned unchanged."
|
||||
`(if (boundp 'customize-package-emacs-version-alist)
|
||||
,args
|
||||
(let (seen)
|
||||
(loop for keyword in ,args
|
||||
if (cond ((eq keyword ':package-version) (setq seen t) nil)
|
||||
(seen (setq seen nil) nil)
|
||||
(t t))
|
||||
collect keyword))))
|
||||
|
||||
(defmacro mh-defgroup (symbol members doc &rest args)
|
||||
"Declare SYMBOL as a customization group containing MEMBERS.
|
||||
See documentation for `defgroup' for a description of the arguments
|
||||
SYMBOL, MEMBERS, DOC and ARGS.
|
||||
This macro is used by Emacs versions that lack the :package-version
|
||||
keyword, introduced in Emacs 22."
|
||||
(declare (doc-string 3))
|
||||
`(defgroup ,symbol ,members ,doc ,@(mh-strip-package-version args)))
|
||||
(put 'mh-defgroup 'lisp-indent-function 'defun)
|
||||
|
||||
(defmacro mh-defcustom (symbol value doc &rest args)
|
||||
"Declare SYMBOL as a customizable variable that defaults to VALUE.
|
||||
See documentation for `defcustom' for a description of the arguments
|
||||
SYMBOL, VALUE, DOC and ARGS.
|
||||
This macro is used by Emacs versions that lack the :package-version
|
||||
keyword, introduced in Emacs 22."
|
||||
(declare (doc-string 3))
|
||||
`(defcustom ,symbol ,value ,doc ,@(mh-strip-package-version args)))
|
||||
(put 'mh-defcustom 'lisp-indent-function 'defun)
|
||||
|
||||
(defmacro mh-defface (face spec doc &rest args)
|
||||
"Declare FACE as a customizable face that defaults to SPEC.
|
||||
See documentation for `defface' for a description of the arguments
|
||||
FACE, SPEC, DOC and ARGS.
|
||||
This macro is used by Emacs versions that lack the :package-version
|
||||
keyword, introduced in Emacs 22."
|
||||
(declare (doc-string 3))
|
||||
`(defface ,face ,spec ,doc ,@(mh-strip-package-version args)))
|
||||
(put 'mh-defface 'lisp-indent-function 'defun)
|
||||
:group 'mh-e
|
||||
:package-version '(MH-E "8.0"))
|
||||
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
474
lisp/pgg-gpg.el
474
lisp/pgg-gpg.el
|
@ -4,7 +4,8 @@
|
|||
;; 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Daiki Ueno <ueno@unixuser.org>
|
||||
;; Symmetric encryption support added by: Sascha Wilde <wilde@sha-bang.de>
|
||||
;; Symmetric encryption and gpg-agent support added by:
|
||||
;; Sascha Wilde <wilde@sha-bang.de>
|
||||
;; Created: 1999/10/28
|
||||
;; Keywords: PGP, OpenPGP, GnuPG
|
||||
|
||||
|
@ -28,6 +29,7 @@
|
|||
;;; Code:
|
||||
|
||||
(eval-when-compile
|
||||
(require 'cl) ; for gpg macros
|
||||
(require 'pgg))
|
||||
|
||||
(defgroup pgg-gpg ()
|
||||
|
@ -58,183 +60,85 @@
|
|||
(defvar pgg-gpg-user-id nil
|
||||
"GnuPG ID of your default identity.")
|
||||
|
||||
(defvar pgg-gpg-user-id-alist nil
|
||||
"An alist mapping from key ID to user ID.")
|
||||
|
||||
(defvar pgg-gpg-read-point nil)
|
||||
(defvar pgg-gpg-output-file-name nil)
|
||||
(defvar pgg-gpg-pending-status-list nil)
|
||||
(defvar pgg-gpg-key-id nil)
|
||||
(defvar pgg-gpg-passphrase nil)
|
||||
(defvar pgg-gpg-debug nil)
|
||||
|
||||
(defun pgg-gpg-start-process (args)
|
||||
(let* ((output-file-name (pgg-make-temp-file "pgg-output"))
|
||||
(defun pgg-gpg-process-region (start end passphrase program args)
|
||||
(let* ((use-agent (pgg-gpg-use-agent-p))
|
||||
(output-file-name (pgg-make-temp-file "pgg-output"))
|
||||
(args
|
||||
(append (list "--no-tty"
|
||||
"--status-fd" "1"
|
||||
"--command-fd" "0"
|
||||
"--yes" ; overwrite
|
||||
"--output" output-file-name)
|
||||
(if pgg-gpg-use-agent '("--use-agent"))
|
||||
pgg-gpg-extra-args
|
||||
args))
|
||||
(coding-system-for-write 'binary)
|
||||
(process-connection-type nil)
|
||||
`("--status-fd" "2"
|
||||
,@(if use-agent '("--use-agent")
|
||||
(if passphrase '("--passphrase-fd" "0")))
|
||||
"--yes" ; overwrite
|
||||
"--output" ,output-file-name
|
||||
,@pgg-gpg-extra-args ,@args))
|
||||
(output-buffer pgg-output-buffer)
|
||||
(errors-buffer pgg-errors-buffer)
|
||||
(orig-mode (default-file-modes))
|
||||
default-enable-multibyte-characters
|
||||
(buffer (generate-new-buffer " *pgg-gpg*"))
|
||||
process)
|
||||
(with-current-buffer buffer
|
||||
(make-local-variable 'pgg-gpg-read-point)
|
||||
(setq pgg-gpg-read-point (point-min))
|
||||
(make-local-variable 'pgg-gpg-output-file-name)
|
||||
(setq pgg-gpg-output-file-name output-file-name)
|
||||
(make-local-variable 'pgg-gpg-pending-status-list)
|
||||
(setq pgg-gpg-pending-status-list nil)
|
||||
(make-local-variable 'pgg-gpg-key-id)
|
||||
(setq pgg-gpg-key-id nil)
|
||||
(make-local-variable 'pgg-gpg-passphrase)
|
||||
(setq pgg-gpg-passphrase nil))
|
||||
(process-connection-type nil)
|
||||
exit-status)
|
||||
(with-current-buffer (get-buffer-create errors-buffer)
|
||||
(buffer-disable-undo)
|
||||
(erase-buffer))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(set-default-file-modes 448)
|
||||
(setq process
|
||||
(apply #'start-process "pgg-gpg" buffer pgg-gpg-program args)))
|
||||
(set-default-file-modes orig-mode))
|
||||
(set-process-filter process #'pgg-gpg-process-filter)
|
||||
(set-process-sentinel process #'pgg-gpg-process-sentinel)
|
||||
process))
|
||||
(let ((coding-system-for-write 'binary)
|
||||
(input (buffer-substring-no-properties start end))
|
||||
(default-enable-multibyte-characters nil))
|
||||
(with-temp-buffer
|
||||
(when passphrase
|
||||
(insert passphrase "\n"))
|
||||
(insert input)
|
||||
(setq exit-status
|
||||
(apply #'call-process-region (point-min) (point-max) program
|
||||
nil errors-buffer nil args))))
|
||||
(with-current-buffer (get-buffer-create output-buffer)
|
||||
(buffer-disable-undo)
|
||||
(erase-buffer)
|
||||
(if (file-exists-p output-file-name)
|
||||
(let ((coding-system-for-read (if pgg-text-mode
|
||||
'raw-text
|
||||
'binary)))
|
||||
(insert-file-contents output-file-name)))
|
||||
(set-buffer errors-buffer)
|
||||
(if (not (equal exit-status 0))
|
||||
(insert (format "\n%s exited abnormally: '%s'\n"
|
||||
program exit-status)))))
|
||||
(if (file-exists-p output-file-name)
|
||||
(delete-file output-file-name))
|
||||
(set-default-file-modes orig-mode))))
|
||||
|
||||
(defun pgg-gpg-process-filter (process input)
|
||||
(save-excursion
|
||||
(if pgg-gpg-debug
|
||||
(save-excursion
|
||||
(set-buffer (get-buffer-create " *pgg-gpg-debug*"))
|
||||
(goto-char (point-max))
|
||||
(insert input)))
|
||||
(set-buffer (process-buffer process))
|
||||
(goto-char (point-max))
|
||||
(insert input)
|
||||
(goto-char pgg-gpg-read-point)
|
||||
(beginning-of-line)
|
||||
(while (looking-at ".*\n") ;the input line is finished
|
||||
(save-excursion
|
||||
(if (looking-at "\\[GNUPG:] \\([A-Z_]+\\)\\>.*")
|
||||
(let* ((status (match-string 1))
|
||||
(symbol (intern-soft (concat "pgg-gpg-status-" status)))
|
||||
(entry (member status pgg-gpg-pending-status-list)))
|
||||
(if entry
|
||||
(setq pgg-gpg-pending-status-list
|
||||
(delq (car entry)
|
||||
pgg-gpg-pending-status-list)))
|
||||
(if (and symbol
|
||||
(fboundp symbol))
|
||||
(funcall symbol process (buffer-substring (match-beginning 1)
|
||||
(match-end 0)))))))
|
||||
(forward-line))
|
||||
(setq pgg-gpg-read-point (point))))
|
||||
(defun pgg-gpg-possibly-cache-passphrase (passphrase &optional key notruncate)
|
||||
(if (and passphrase
|
||||
pgg-cache-passphrase
|
||||
(progn
|
||||
(goto-char (point-min))
|
||||
(re-search-forward "^\\[GNUPG:] \\(GOOD_PASSPHRASE\\>\\)\\|\\(SIG_CREATED\\)" nil t)))
|
||||
(pgg-add-passphrase-to-cache
|
||||
(or key
|
||||
(progn
|
||||
(goto-char (point-min))
|
||||
(if (re-search-forward
|
||||
"^\\[GNUPG:] NEED_PASSPHRASE\\(_PIN\\)? \\w+ ?\\w*" nil t)
|
||||
(substring (match-string 0) -8))))
|
||||
passphrase
|
||||
notruncate)))
|
||||
|
||||
(defun pgg-gpg-process-sentinel (process status)
|
||||
(set-process-filter process nil)
|
||||
(save-excursion
|
||||
;; Copy the contents of process-buffer to pgg-errors-buffer.
|
||||
(set-buffer (get-buffer-create pgg-errors-buffer))
|
||||
(buffer-disable-undo)
|
||||
(erase-buffer)
|
||||
(when (buffer-live-p (process-buffer process))
|
||||
(insert-buffer-substring (process-buffer process))
|
||||
(goto-char (point-min))
|
||||
(delete-matching-lines "^\\[GNUPG:] ")
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward "^gpg: " nil t)
|
||||
(replace-match "")))
|
||||
;; Read the contents of the output file to pgg-output-buffer.
|
||||
(set-buffer (get-buffer-create pgg-output-buffer))
|
||||
(buffer-disable-undo)
|
||||
(erase-buffer)
|
||||
(if (and (equal status "finished\n")
|
||||
(buffer-live-p (process-buffer process)))
|
||||
(let ((output-file-name (with-current-buffer (process-buffer process)
|
||||
pgg-gpg-output-file-name)))
|
||||
(when (file-exists-p output-file-name)
|
||||
(let ((coding-system-for-read (if pgg-text-mode
|
||||
'raw-text
|
||||
'binary)))
|
||||
(insert-file-contents output-file-name))
|
||||
(delete-file output-file-name))))))
|
||||
(defvar pgg-gpg-all-secret-keys 'unknown)
|
||||
|
||||
(defun pgg-gpg-wait-for-status (process status-list)
|
||||
(with-current-buffer (process-buffer process)
|
||||
(setq pgg-gpg-pending-status-list status-list)
|
||||
(while (and (eq (process-status process) 'run)
|
||||
pgg-gpg-pending-status-list)
|
||||
(accept-process-output process 1))))
|
||||
|
||||
(defun pgg-gpg-wait-for-completion (process &optional status-list)
|
||||
(process-send-eof process)
|
||||
(while (eq (process-status process) 'run)
|
||||
(sit-for 0.1))
|
||||
(save-excursion
|
||||
(set-buffer (process-buffer process))
|
||||
(setq status-list (copy-sequence status-list))
|
||||
(let ((pointer status-list))
|
||||
(while pointer
|
||||
(defun pgg-gpg-lookup-all-secret-keys ()
|
||||
"Return all secret keys present in secret key ring."
|
||||
(when (eq pgg-gpg-all-secret-keys 'unknown)
|
||||
(setq pgg-gpg-all-secret-keys '())
|
||||
(let ((args (list "--with-colons" "--no-greeting" "--batch"
|
||||
"--list-secret-keys")))
|
||||
(with-temp-buffer
|
||||
(apply #'call-process pgg-gpg-program nil t nil args)
|
||||
(goto-char (point-min))
|
||||
(unless (re-search-forward
|
||||
(concat "^\\[GNUPG:] " (car pointer) "\\>")
|
||||
nil t)
|
||||
(setq status-list (delq (car pointer) status-list)))
|
||||
(setq pointer (cdr pointer))))
|
||||
(kill-buffer (process-buffer process))
|
||||
status-list))
|
||||
|
||||
(defun pgg-gpg-status-USERID_HINT (process line)
|
||||
(if (string-match "\\`USERID_HINT \\([^ ]+\\) \\(.*\\)" line)
|
||||
(let* ((key-id (match-string 1 line))
|
||||
(user-id (match-string 2 line))
|
||||
(entry (assoc key-id pgg-gpg-user-id-alist)))
|
||||
(if entry
|
||||
(setcdr entry user-id)
|
||||
(setq pgg-gpg-user-id-alist (cons (cons key-id user-id)
|
||||
pgg-gpg-user-id-alist))))))
|
||||
|
||||
(defun pgg-gpg-status-NEED_PASSPHRASE (process line)
|
||||
(if (string-match "\\`NEED_PASSPHRASE \\([^ ]+\\)" line)
|
||||
(setq pgg-gpg-key-id (match-string 1 line))))
|
||||
|
||||
(defun pgg-gpg-status-NEED_PASSPHRASE_SYM (process line)
|
||||
(setq pgg-gpg-key-id 'SYM))
|
||||
|
||||
(defun pgg-gpg-status-NEED_PASSPHRASE_PIN (process line)
|
||||
(setq pgg-gpg-key-id 'PIN))
|
||||
|
||||
(defun pgg-gpg-status-GET_HIDDEN (process line)
|
||||
(let ((entry (assoc pgg-gpg-key-id pgg-gpg-user-id-alist)))
|
||||
(if (setq pgg-gpg-passphrase
|
||||
(if (eq pgg-gpg-key-id 'SYM)
|
||||
(pgg-read-passphrase
|
||||
"GnuPG passphrase for symmetric encryption: ")
|
||||
(pgg-read-passphrase
|
||||
(format "GnuPG passphrase for %s: "
|
||||
(if entry
|
||||
(cdr entry)
|
||||
pgg-gpg-key-id))
|
||||
(if (eq pgg-gpg-key-id 'PIN)
|
||||
"PIN"
|
||||
pgg-gpg-key-id))))
|
||||
(process-send-string process (concat pgg-gpg-passphrase "\n")))))
|
||||
|
||||
(defun pgg-gpg-status-GOOD_PASSPHRASE (process line)
|
||||
(when (and pgg-gpg-passphrase
|
||||
(stringp pgg-gpg-key-id))
|
||||
(pgg-add-passphrase-to-cache pgg-gpg-key-id pgg-gpg-passphrase)
|
||||
(setq pgg-gpg-passphrase nil)))
|
||||
|
||||
(defun pgg-gpg-status-BAD_PASSPHRASE (process line)
|
||||
(when pgg-gpg-passphrase
|
||||
(fillarray pgg-gpg-passphrase 0)
|
||||
(setq pgg-gpg-passphrase nil)))
|
||||
(while (re-search-forward
|
||||
"^\\(sec\\|pub\\):[^:]*:[^:]*:[^:]*:\\([^:]*\\)" nil t)
|
||||
(push (substring (match-string 2) 8)
|
||||
pgg-gpg-all-secret-keys)))))
|
||||
pgg-gpg-all-secret-keys)
|
||||
|
||||
(defun pgg-gpg-lookup-key (string &optional type)
|
||||
"Search keys associated with STRING."
|
||||
|
@ -248,15 +152,52 @@
|
|||
nil t)
|
||||
(substring (match-string 2) 8)))))
|
||||
|
||||
(defun pgg-gpg-lookup-key-owner (string &optional all)
|
||||
"Search keys associated with STRING and return owner of identified key.
|
||||
|
||||
The value may be just the bare key id, or it may be a combination of the
|
||||
user name associated with the key and the key id, with the key id enclosed
|
||||
in \"<...>\" angle brackets.
|
||||
|
||||
Optional ALL non-nil means search all keys, including secret keys."
|
||||
(let ((args (list "--with-colons" "--no-greeting" "--batch"
|
||||
(if all "--list-secret-keys" "--list-keys")
|
||||
string))
|
||||
(key-regexp (concat "^\\(sec\\|pub\\)"
|
||||
":[^:]*:[^:]*:[^:]*:\\([^:]*\\):[^:]*"
|
||||
":[^:]*:[^:]*:[^:]*:\\([^:]*\\):")))
|
||||
(with-temp-buffer
|
||||
(apply #'call-process pgg-gpg-program nil t nil args)
|
||||
(goto-char (point-min))
|
||||
(if (re-search-forward key-regexp
|
||||
nil t)
|
||||
(match-string 3)))))
|
||||
|
||||
(defun pgg-gpg-key-id-from-key-owner (key-owner)
|
||||
(cond ((not key-owner) nil)
|
||||
;; Extract bare key id from outermost paired angle brackets, if any:
|
||||
((string-match "[^<]*<\\(.+\\)>[^>]*" key-owner)
|
||||
(substring key-owner (match-beginning 1)(match-end 1)))
|
||||
(key-owner)))
|
||||
|
||||
(defun pgg-gpg-encrypt-region (start end recipients &optional sign passphrase)
|
||||
"Encrypt the current region between START and END.
|
||||
|
||||
If optional argument SIGN is non-nil, do a combined sign and encrypt."
|
||||
If optional argument SIGN is non-nil, do a combined sign and encrypt.
|
||||
|
||||
If optional PASSPHRASE is not specified, it will be obtained from the
|
||||
passphrase cache or user."
|
||||
(let* ((pgg-gpg-user-id (or pgg-gpg-user-id pgg-default-user-id))
|
||||
(passphrase (or passphrase
|
||||
(when (and sign (not (pgg-gpg-use-agent-p)))
|
||||
(pgg-read-passphrase
|
||||
(format "GnuPG passphrase for %s: "
|
||||
pgg-gpg-user-id)
|
||||
pgg-gpg-user-id))))
|
||||
(args
|
||||
(append
|
||||
'("--armor" "--always-trust" "--encrypt")
|
||||
(if pgg-text-mode '("--textmode"))
|
||||
(list "--batch" "--armor" "--always-trust" "--encrypt")
|
||||
(if pgg-text-mode (list "--textmode"))
|
||||
(if sign (list "--sign" "--local-user" pgg-gpg-user-id))
|
||||
(if recipients
|
||||
(apply #'nconc
|
||||
|
@ -264,71 +205,178 @@ If optional argument SIGN is non-nil, do a combined sign and encrypt."
|
|||
(list pgg-gpg-recipient-argument rcpt))
|
||||
(append recipients
|
||||
(if pgg-encrypt-for-me
|
||||
(list pgg-gpg-user-id))))))))
|
||||
(process (pgg-gpg-start-process args)))
|
||||
(if (and sign (not pgg-gpg-use-agent))
|
||||
(pgg-gpg-wait-for-status process '("GOOD_PASSPHRASE")))
|
||||
(process-send-region process start end)
|
||||
(pgg-gpg-wait-for-completion process '("SIG_CREATED" "END_ENCRYPTION"))))
|
||||
(list pgg-gpg-user-id)))))))))
|
||||
(pgg-gpg-process-region start end passphrase pgg-gpg-program args)
|
||||
(when sign
|
||||
(with-current-buffer pgg-errors-buffer
|
||||
;; Possibly cache passphrase under, e.g. "jas", for future sign.
|
||||
(pgg-gpg-possibly-cache-passphrase passphrase pgg-gpg-user-id)
|
||||
;; Possibly cache passphrase under, e.g. B565716F, for future decrypt.
|
||||
(pgg-gpg-possibly-cache-passphrase passphrase)))
|
||||
(pgg-process-when-success)))
|
||||
|
||||
(defun pgg-gpg-encrypt-symmetric-region (start end &optional passphrase)
|
||||
"Encrypt the current region between START and END with symmetric cipher."
|
||||
(let* ((args
|
||||
(append '("--armor" "--symmetric")
|
||||
(if pgg-text-mode '("--textmode"))))
|
||||
(process (pgg-gpg-start-process args)))
|
||||
(pgg-gpg-wait-for-status process '("BEGIN_ENCRYPTION"))
|
||||
(process-send-region process start end)
|
||||
(pgg-gpg-wait-for-completion process '("END_ENCRYPTION"))))
|
||||
"Encrypt the current region between START and END with symmetric cipher.
|
||||
|
||||
If optional PASSPHRASE is not specified, it will be obtained from the
|
||||
passphrase cache or user."
|
||||
(let* ((passphrase (or passphrase
|
||||
(when (not (pgg-gpg-use-agent-p))
|
||||
(pgg-read-passphrase
|
||||
"GnuPG passphrase for symmetric encryption: "))))
|
||||
(args
|
||||
(append (list "--batch" "--armor" "--symmetric" )
|
||||
(if pgg-text-mode (list "--textmode")))))
|
||||
(pgg-gpg-process-region start end passphrase pgg-gpg-program args)
|
||||
(pgg-process-when-success)))
|
||||
|
||||
(defun pgg-gpg-decrypt-region (start end &optional passphrase)
|
||||
"Decrypt the current region between START and END."
|
||||
(let* ((args '("--decrypt"))
|
||||
(process (pgg-gpg-start-process args)))
|
||||
(process-send-region process start end)
|
||||
(pgg-gpg-wait-for-status process '("BEGIN_DECRYPTION"))
|
||||
(pgg-gpg-wait-for-completion process '("GOODSIG" "DECRYPTION_OKAY"))))
|
||||
"Decrypt the current region between START and END.
|
||||
|
||||
If optional PASSPHRASE is not specified, it will be obtained from the
|
||||
passphrase cache or user."
|
||||
(let* ((current-buffer (current-buffer))
|
||||
(message-keys (with-temp-buffer
|
||||
(insert-buffer-substring current-buffer)
|
||||
(pgg-decode-armor-region (point-min) (point-max))))
|
||||
(secret-keys (pgg-gpg-lookup-all-secret-keys))
|
||||
;; XXX the user is stuck if they need to use the passphrase for
|
||||
;; any but the first secret key for which the message is
|
||||
;; encrypted. ideally, we would incrementally give them a
|
||||
;; chance with subsequent keys each time they fail with one.
|
||||
(key (pgg-gpg-select-matching-key message-keys secret-keys))
|
||||
(key-owner (and key (pgg-gpg-lookup-key-owner key t)))
|
||||
(key-id (pgg-gpg-key-id-from-key-owner key-owner))
|
||||
(pgg-gpg-user-id (or key-id key
|
||||
pgg-gpg-user-id pgg-default-user-id))
|
||||
(passphrase (or passphrase
|
||||
(when (not (pgg-gpg-use-agent-p))
|
||||
(pgg-read-passphrase
|
||||
(format (if (pgg-gpg-symmetric-key-p message-keys)
|
||||
"Passphrase for symmetric decryption: "
|
||||
"GnuPG passphrase for %s: ")
|
||||
(or key-owner "??"))
|
||||
pgg-gpg-user-id))))
|
||||
(args '("--batch" "--decrypt")))
|
||||
(pgg-gpg-process-region start end passphrase pgg-gpg-program args)
|
||||
(with-current-buffer pgg-errors-buffer
|
||||
(pgg-gpg-possibly-cache-passphrase passphrase pgg-gpg-user-id)
|
||||
(goto-char (point-min))
|
||||
(re-search-forward "^\\[GNUPG:] DECRYPTION_OKAY\\>" nil t))))
|
||||
|
||||
;;;###autoload
|
||||
(defun pgg-gpg-symmetric-key-p (message-keys)
|
||||
"True if decoded armor MESSAGE-KEYS has symmetric encryption indicator."
|
||||
(let (result)
|
||||
(dolist (key message-keys result)
|
||||
(when (and (eq (car key) 3)
|
||||
(member '(symmetric-key-algorithm) key))
|
||||
(setq result key)))))
|
||||
|
||||
(defun pgg-gpg-select-matching-key (message-keys secret-keys)
|
||||
"Choose a key from MESSAGE-KEYS that matches one of the keys in SECRET-KEYS."
|
||||
(loop for message-key in message-keys
|
||||
for message-key-id = (and (equal (car message-key) 1)
|
||||
(cdr (assq 'key-identifier
|
||||
(cdr message-key))))
|
||||
for key = (and message-key-id (pgg-lookup-key message-key-id 'encrypt))
|
||||
when (and key (member key secret-keys)) return key))
|
||||
|
||||
(defun pgg-gpg-sign-region (start end &optional cleartext passphrase)
|
||||
"Make detached signature from text between START and END."
|
||||
(let* ((pgg-gpg-user-id (or pgg-gpg-user-id pgg-default-user-id))
|
||||
(passphrase (or passphrase
|
||||
(when (not (pgg-gpg-use-agent-p))
|
||||
(pgg-read-passphrase
|
||||
(format "GnuPG passphrase for %s: "
|
||||
pgg-gpg-user-id)
|
||||
pgg-gpg-user-id))))
|
||||
(args
|
||||
(append (list (if cleartext "--clearsign" "--detach-sign")
|
||||
"--armor" "--verbose"
|
||||
"--armor" "--batch" "--verbose"
|
||||
"--local-user" pgg-gpg-user-id)
|
||||
(if pgg-text-mode '("--textmode"))))
|
||||
(process (pgg-gpg-start-process args)))
|
||||
(unless pgg-gpg-use-agent
|
||||
(pgg-gpg-wait-for-status process '("GOOD_PASSPHRASE")))
|
||||
(process-send-region process start end)
|
||||
(pgg-gpg-wait-for-completion process '("SIG_CREATED"))))
|
||||
(if pgg-text-mode (list "--textmode"))))
|
||||
(inhibit-read-only t)
|
||||
buffer-read-only)
|
||||
(pgg-gpg-process-region start end passphrase pgg-gpg-program args)
|
||||
(with-current-buffer pgg-errors-buffer
|
||||
;; Possibly cache passphrase under, e.g. "jas", for future sign.
|
||||
(pgg-gpg-possibly-cache-passphrase passphrase pgg-gpg-user-id)
|
||||
;; Possibly cache passphrase under, e.g. B565716F, for future decrypt.
|
||||
(pgg-gpg-possibly-cache-passphrase passphrase))
|
||||
(pgg-process-when-success)))
|
||||
|
||||
(defun pgg-gpg-verify-region (start end &optional signature)
|
||||
"Verify region between START and END as the detached signature SIGNATURE."
|
||||
(let ((args '("--verify"))
|
||||
process)
|
||||
(let ((args '("--batch" "--verify")))
|
||||
(when (stringp signature)
|
||||
(setq args (append args (list signature))))
|
||||
(setq process (pgg-gpg-start-process (append args '("-"))))
|
||||
(process-send-region process start end)
|
||||
(pgg-gpg-wait-for-completion process '("GOODSIG"))))
|
||||
(setq args (append args '("-")))
|
||||
(pgg-gpg-process-region start end nil pgg-gpg-program args)
|
||||
(with-current-buffer pgg-errors-buffer
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward "^gpg: \\(.*\\)\n" nil t)
|
||||
(with-current-buffer pgg-output-buffer
|
||||
(insert-buffer-substring pgg-errors-buffer
|
||||
(match-beginning 1) (match-end 0)))
|
||||
(delete-region (match-beginning 0) (match-end 0)))
|
||||
(goto-char (point-min))
|
||||
(re-search-forward "^\\[GNUPG:] GOODSIG\\>" nil t))))
|
||||
|
||||
(defun pgg-gpg-insert-key ()
|
||||
"Insert public key at point."
|
||||
(let* ((pgg-gpg-user-id (or pgg-gpg-user-id pgg-default-user-id))
|
||||
(args (list "--export" "--armor"
|
||||
pgg-gpg-user-id))
|
||||
(process (pgg-gpg-start-process args)))
|
||||
(pgg-gpg-wait-for-completion process)
|
||||
(args (list "--batch" "--export" "--armor"
|
||||
pgg-gpg-user-id)))
|
||||
(pgg-gpg-process-region (point)(point) nil pgg-gpg-program args)
|
||||
(insert-buffer-substring pgg-output-buffer)))
|
||||
|
||||
(defun pgg-gpg-snarf-keys-region (start end)
|
||||
"Add all public keys in region between START and END to the keyring."
|
||||
(let* ((args '("--import" "-"))
|
||||
(process (pgg-gpg-start-process args))
|
||||
status)
|
||||
(process-send-region process start end)
|
||||
(pgg-gpg-wait-for-completion process '("IMPORT_RES"))))
|
||||
(let ((args '("--import" "--batch" "-")) status)
|
||||
(pgg-gpg-process-region start end nil pgg-gpg-program args)
|
||||
(set-buffer pgg-errors-buffer)
|
||||
(goto-char (point-min))
|
||||
(when (re-search-forward "^\\[GNUPG:] IMPORT_RES\\>" nil t)
|
||||
(setq status (buffer-substring (match-end 0)
|
||||
(progn (end-of-line)(point)))
|
||||
status (vconcat (mapcar #'string-to-number (split-string status))))
|
||||
(erase-buffer)
|
||||
(insert (format "Imported %d key(s).
|
||||
\tArmor contains %d key(s) [%d bad, %d old].\n"
|
||||
(+ (aref status 2)
|
||||
(aref status 10))
|
||||
(aref status 0)
|
||||
(aref status 1)
|
||||
(+ (aref status 4)
|
||||
(aref status 11)))
|
||||
(if (zerop (aref status 9))
|
||||
""
|
||||
"\tSecret keys are imported.\n")))
|
||||
(append-to-buffer pgg-output-buffer (point-min)(point-max))
|
||||
(pgg-process-when-success)))
|
||||
|
||||
(defun pgg-gpg-update-agent ()
|
||||
"Try to connet to gpg-agent and send UPDATESTARTUPTTY."
|
||||
(if (fboundp 'make-network-process)
|
||||
(let* ((agent-info (getenv "GPG_AGENT_INFO"))
|
||||
(socket (and agent-info
|
||||
(string-match "^\\([^:]*\\)" agent-info)
|
||||
(match-string 1 agent-info)))
|
||||
(conn (and socket
|
||||
(make-network-process :name "gpg-agent-process"
|
||||
:host 'local :family 'local
|
||||
:service socket))))
|
||||
(when (and conn (eq (process-status conn) 'open))
|
||||
(process-send-string conn "UPDATESTARTUPTTY\n")
|
||||
(delete-process conn)
|
||||
t))
|
||||
;; We can't check, so assume gpg-agent is up.
|
||||
t))
|
||||
|
||||
(defun pgg-gpg-use-agent-p ()
|
||||
"Return t if `pgg-gpg-use-agent' is t and gpg-agent is available."
|
||||
(and pgg-gpg-use-agent (pgg-gpg-update-agent)))
|
||||
|
||||
(provide 'pgg-gpg)
|
||||
|
||||
|
|
|
@ -527,11 +527,14 @@ starting the compilation process.")
|
|||
:group 'compilation
|
||||
:version "22.1")
|
||||
|
||||
(defvar compilation-message-face 'underline
|
||||
(defcustom compilation-message-face 'underline
|
||||
"Face name to use for whole messages.
|
||||
Faces `compilation-error-face', `compilation-warning-face',
|
||||
`compilation-info-face', `compilation-line-face' and
|
||||
`compilation-column-face' get prepended to this, when applicable.")
|
||||
`compilation-column-face' get prepended to this, when applicable."
|
||||
:type 'face
|
||||
:group 'compilation
|
||||
:version "22.1")
|
||||
|
||||
(defvar compilation-error-face 'compilation-error
|
||||
"Face name to use for file name in error messages.")
|
||||
|
|
|
@ -571,9 +571,9 @@ With arg, use separate IO iff arg is positive."
|
|||
'gdb-set-gud-minor-mode-existing-buffers-1))
|
||||
(setq gdb-locals-font-lock-keywords gdb-locals-font-lock-keywords-2))
|
||||
|
||||
;; find source file and compilation directory here
|
||||
(gdb-enqueue-input (list "server list main\n" 'ignore)) ; C program
|
||||
(gdb-enqueue-input (list "server list MAIN__\n" 'ignore)) ; Fortran program
|
||||
;; Find source file and compilation directory here.
|
||||
;; Works for C, C++, Fortran and Ada but not Java (GDB 6.4)
|
||||
(gdb-enqueue-input (list "server list\n" 'ignore))
|
||||
(gdb-enqueue-input (list "server info source\n" 'gdb-source-info))
|
||||
|
||||
(run-hooks 'gdba-mode-hook))
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
;;; idlw-complete-structtag.el --- Completion of structure tags.
|
||||
;; Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006
|
||||
;; Free Software Foundation, Inc.
|
||||
;; Copyright (c) 2001,2002,2003,2004,2005,2006 Free Software Foundation
|
||||
|
||||
;; Author: Carsten Dominik <dominik@science.uva.nl>
|
||||
;; Author: Carsten Dominik <dominik@astro.uva.nl>
|
||||
;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu>
|
||||
;; Version: 1.2
|
||||
;; Keywords: languages
|
||||
|
@ -54,10 +53,10 @@
|
|||
;;
|
||||
;; INSTALLATION
|
||||
;; ============
|
||||
;; Put this file on the emacs load path and load it with the following
|
||||
;; Put this file on the emacs load path and load it with the following
|
||||
;; line in your .emacs file:
|
||||
;;
|
||||
;; (add-hook 'idlwave-load-hook
|
||||
;; (add-hook 'idlwave-load-hook
|
||||
;; (lambda () (require 'idlw-complete-structtag)))
|
||||
;;
|
||||
;; DESCRIPTION
|
||||
|
@ -88,7 +87,7 @@
|
|||
;; - You can force an update of the tag list with the usual command
|
||||
;; to update routine info in IDLWAVE: C-c C-i
|
||||
|
||||
(defvar idlwave-completion-help-info)
|
||||
(require 'idlwave)
|
||||
|
||||
;; Some variables to identify the previously used structure
|
||||
(defvar idlwave-current-tags-var nil)
|
||||
|
@ -107,7 +106,7 @@
|
|||
(add-hook 'idlwave-update-rinfo-hook 'idlwave-structtag-reset)
|
||||
|
||||
;;; The main code follows below
|
||||
|
||||
(defvar idlwave-completion-help-info)
|
||||
(defun idlwave-complete-structure-tag ()
|
||||
"Complete a structure tag.
|
||||
This works by looking in the current file for a structure assignment to a
|
||||
|
@ -146,9 +145,9 @@ an up-to-date completion list."
|
|||
(not (equal start idlwave-current-tags-completion-pos)))
|
||||
(idlwave-prepare-structure-tag-completion var))
|
||||
(setq idlwave-current-tags-completion-pos start)
|
||||
(setq idlwave-completion-help-info
|
||||
(setq idlwave-completion-help-info
|
||||
(list 'idlwave-complete-structure-tag-help))
|
||||
(idlwave-complete-in-buffer 'structtag 'structtag
|
||||
(idlwave-complete-in-buffer 'structtag 'structtag
|
||||
idlwave-current-struct-tags nil
|
||||
"Select a structure tag" "structure tag")
|
||||
t) ; we did the completion: return t to skip other completions
|
||||
|
@ -167,7 +166,7 @@ an up-to-date completion list."
|
|||
(if (eq major-mode 'idlwave-shell-mode)
|
||||
;; OK, we are in the shell, do it dynamically
|
||||
(progn
|
||||
(message "preparing shell tags")
|
||||
(message "preparing shell tags")
|
||||
;; The following call puts the tags into `idlwave-current-struct-tags'
|
||||
(idlwave-complete-structure-tag-query-shell var)
|
||||
;; initialize
|
||||
|
@ -189,7 +188,7 @@ an up-to-date completion list."
|
|||
;; Find possible definitions of the structure.
|
||||
(while (idlwave-find-structure-definition var nil 'all)
|
||||
(let ((tags (idlwave-struct-tags)))
|
||||
(when tags
|
||||
(when tags
|
||||
;; initialize
|
||||
(setq idlwave-sint-structtags nil
|
||||
idlwave-current-tags-buffer (current-buffer)
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
;;; idlw-help.el --- HTML Help code for IDLWAVE
|
||||
;; Copyright (c) 2000 Carsten Dominik
|
||||
;; Copyright (c) 2001, 2002 J.D. Smith
|
||||
;; Copyright (c) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
;; Copyright (c) 2003,2004,2005,2006 Free Software Foundation
|
||||
;;
|
||||
;; Authors: J.D. Smith <jdsmith@as.arizona.edu>
|
||||
;; Carsten Dominik <dominik@science.uva.nl>
|
||||
;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu>
|
||||
;; Version: 5.7_22
|
||||
;; Version: 6.0_em22
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||
|
@ -36,13 +36,12 @@
|
|||
;; information, at:
|
||||
;;
|
||||
;; http://idlwave.org
|
||||
;;
|
||||
;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
||||
;;; Code:
|
||||
(defvar browse-url-generic-args)
|
||||
|
||||
;;; Code:
|
||||
(defvar idlwave-help-browse-url-available nil
|
||||
"Whether browse-url is available")
|
||||
|
||||
|
@ -60,25 +59,32 @@
|
|||
:group 'idlwave-online-help
|
||||
:type 'boolean)
|
||||
|
||||
(defvar idlwave-html-link-sep
|
||||
(defvar idlwave-html-link-sep
|
||||
(if idlwave-html-help-pre-v6 "#" "#wp"))
|
||||
|
||||
(defcustom idlwave-html-help-location
|
||||
(if (memq system-type '(ms-dos windows-nt))
|
||||
nil
|
||||
"/usr/local/etc/")
|
||||
"The directory where the idl_html_help/ dir or idl.chm help file
|
||||
(Windows only) lives."
|
||||
(defcustom idlwave-html-system-help-location "help/online_help/"
|
||||
"The directory, relative to idlwave-system-directory, where the idl
|
||||
HTML help files live, for IDL 6.2 and later. This location, if found,
|
||||
is used in preference to the old idlwave-html-help-location."
|
||||
:group 'idlwave-online-help
|
||||
:type 'directory)
|
||||
|
||||
(defcustom idlwave-help-use-hh nil
|
||||
"Whether to use the HTMLHelp viewer with idl.chm (Windows only)."
|
||||
(defcustom idlwave-html-help-location
|
||||
(if (memq system-type '(ms-dos windows-nt))
|
||||
nil
|
||||
"/usr/local/etc/")
|
||||
"The directory where the idl_html_help/ dir lives. Obsolete for IDL
|
||||
6.2 or later (see idlwave-html-system-help-location)."
|
||||
:group 'idlwave-online-help
|
||||
:type '(choice :tag "use help viewer"
|
||||
(const :tag "<none>" nil)
|
||||
(const :tag "hh" 'hh)
|
||||
(const :tag "keyhh" 'keyhh)))
|
||||
:type 'directory)
|
||||
|
||||
(defvar idlwave-help-use-hh nil
|
||||
"Obsolete variable.")
|
||||
|
||||
(defcustom idlwave-help-use-assistant t
|
||||
"Whether to use the IDL Assistant as the help browser."
|
||||
:group 'idlwave-online-help
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom idlwave-help-browser-function browse-url-browser-function
|
||||
"Function to use to display html help.
|
||||
|
@ -91,7 +97,9 @@ Defaults to `browse-url-browser-function', which see."
|
|||
:group 'idlwave-online-help
|
||||
:type 'string)
|
||||
|
||||
(defcustom idlwave-help-browser-generic-args
|
||||
(defvar browse-url-generic-args)
|
||||
|
||||
(defcustom idlwave-help-browser-generic-args
|
||||
(if (boundp 'browse-url-generic-args)
|
||||
browse-url-generic-args "")
|
||||
"Program args to use if using browse-url-generic-program."
|
||||
|
@ -198,7 +206,7 @@ support."
|
|||
|
||||
(defvar idlwave-help-activate-links-aggressively nil
|
||||
"Obsolete variable.")
|
||||
|
||||
|
||||
(defvar idlwave-completion-help-info)
|
||||
|
||||
(defvar idlwave-help-frame nil
|
||||
|
@ -289,22 +297,39 @@ Here are all keybindings.
|
|||
(set (make-local-variable 'idlwave-help-def-pos) nil)
|
||||
(set (make-local-variable 'idlwave-help-args) nil)
|
||||
(set (make-local-variable 'idlwave-help-in-header) nil)
|
||||
(run-mode-hooks 'idlwave-help-mode-hook))
|
||||
(run-hooks 'idlwave-help-mode-hook))
|
||||
|
||||
(defvar idlwave-system-directory)
|
||||
(defun idlwave-html-help-location ()
|
||||
"Return the help directory where HTML files are, or nil if that is unknown."
|
||||
(or (and (stringp idlwave-html-help-location)
|
||||
(> (length idlwave-html-help-location) 0)
|
||||
(file-directory-p idlwave-html-help-location)
|
||||
idlwave-html-help-location)
|
||||
(getenv "IDLWAVE_HELP_LOCATION")
|
||||
(and (memq system-type '(ms-dos windows-nt)) ; Base it on sysdir
|
||||
idlwave-help-use-hh
|
||||
(stringp idlwave-system-directory)
|
||||
(> (length idlwave-system-directory) 0)
|
||||
(file-directory-p idlwave-system-directory)
|
||||
(expand-file-name "HELP" idlwave-system-directory))))
|
||||
(let ((syshelp-dir (expand-file-name
|
||||
idlwave-html-system-help-location (idlwave-sys-dir)))
|
||||
(help-dir (or (and (stringp idlwave-html-help-location)
|
||||
(> (length idlwave-html-help-location) 0)
|
||||
idlwave-html-help-location)
|
||||
(getenv "IDLWAVE_HELP_LOCATION"))))
|
||||
(if (file-directory-p syshelp-dir)
|
||||
syshelp-dir
|
||||
(setq help-dir (expand-file-name "idl_html_help" help-dir))
|
||||
(if (file-directory-p help-dir) help-dir))))
|
||||
|
||||
(defvar idlwave-help-assistant-available nil)
|
||||
|
||||
(defun idlwave-help-check-locations ()
|
||||
;; Check help locations and assistant.
|
||||
(let ((sys-dir (idlwave-sys-dir))
|
||||
(help-loc (idlwave-html-help-location)))
|
||||
(if (or (not (file-directory-p sys-dir))
|
||||
(not (file-directory-p help-loc)))
|
||||
(message
|
||||
"HTML help location not found: try setting `idlwave-system-directory' and/or `idlwave-html-help-location'."))
|
||||
;; see if we have the assistant
|
||||
(when (and idlwave-help-use-assistant
|
||||
(not (eq (idlwave-help-assistant-available) t)))
|
||||
(message "Cannot locate IDL Assistant, enabling default browser.")
|
||||
(setq idlwave-help-use-assistant nil)
|
||||
(unless idlwave-help-browse-url-available
|
||||
(error "browse-url is not available; install it or IDL Assistant to use HTML help.")))))
|
||||
|
||||
|
||||
(defvar idlwave-current-obj_new-class)
|
||||
(defvar idlwave-help-diagnostics)
|
||||
|
@ -326,7 +351,7 @@ It collects and prints the diagnostics messages."
|
|||
(setq idlwave-last-context-help-pos marker)
|
||||
(idlwave-do-context-help1 arg)
|
||||
(if idlwave-help-diagnostics
|
||||
(message "%s" (mapconcat 'identity
|
||||
(message "%s" (mapconcat 'identity
|
||||
(nreverse idlwave-help-diagnostics)
|
||||
"; "))))))
|
||||
|
||||
|
@ -339,7 +364,7 @@ It collects and prints the diagnostics messages."
|
|||
(defun idlwave-do-context-help1 (&optional arg)
|
||||
"The work-horse version of `idlwave-context-help', which see."
|
||||
(save-excursion
|
||||
(if (equal (char-after) ?/)
|
||||
(if (equal (char-after) ?/)
|
||||
(forward-char 1)
|
||||
(if (equal (char-before) ?=)
|
||||
(backward-char 1)))
|
||||
|
@ -349,15 +374,15 @@ It collects and prints the diagnostics messages."
|
|||
(beg (save-excursion (skip-chars-backward chars) (point)))
|
||||
(end (save-excursion (skip-chars-forward chars) (point)))
|
||||
(this-word (buffer-substring-no-properties beg end))
|
||||
(st-ass (assoc (downcase this-word)
|
||||
idlwave-help-special-topic-words))
|
||||
(st-ass (assoc-string this-word
|
||||
idlwave-help-special-topic-words t))
|
||||
(classtag (and (string-match "self\\." this-word)
|
||||
(< beg (- end 4))))
|
||||
(structtag (and (fboundp 'idlwave-complete-structure-tag)
|
||||
(string-match "\\`\\([^.]+\\)\\." this-word)
|
||||
(< beg (- end 4))))
|
||||
module keyword cw mod1 mod2 mod3)
|
||||
(if (or arg
|
||||
(if (or arg
|
||||
(and (not st-ass)
|
||||
(not classtag)
|
||||
(not structtag)
|
||||
|
@ -376,15 +401,15 @@ It collects and prints the diagnostics messages."
|
|||
(setq module (list "init" 'fun (match-string 1 str))
|
||||
idlwave-current-obj_new-class (match-string 1 str))
|
||||
)))))
|
||||
(cond
|
||||
(cond
|
||||
(arg (setq mod1 module))
|
||||
|
||||
|
||||
;; A special topic -- only system help
|
||||
(st-ass (setq mod1 (list (cdr st-ass))))
|
||||
|
||||
|
||||
;; A system variable -- only system help
|
||||
((string-match
|
||||
"\\`!\\([a-zA-Z0-9_]+\\)\\(\.\\([A-Za-z0-9_]+\\)\\)?"
|
||||
((string-match
|
||||
"\\`!\\([a-zA-Z0-9_]+\\)\\(\.\\([A-Za-z0-9_]+\\)\\)?"
|
||||
this-word)
|
||||
(let* ((word (match-string-no-properties 1 this-word))
|
||||
(entry (assq (idlwave-sintern-sysvar word)
|
||||
|
@ -396,10 +421,10 @@ It collects and prints the diagnostics messages."
|
|||
(cdr (assq 'tags entry))))))
|
||||
(link (nth 1 (assq 'link entry))))
|
||||
(if tag-target
|
||||
(setq link (idlwave-substitute-link-target link
|
||||
(setq link (idlwave-substitute-link-target link
|
||||
tag-target)))
|
||||
(setq mod1 (list link))))
|
||||
|
||||
|
||||
;; An executive command -- only system help
|
||||
((string-match "^\\.\\([A-Z_]+\\)" this-word)
|
||||
(let* ((word (match-string 1 this-word))
|
||||
|
@ -407,7 +432,7 @@ It collects and prints the diagnostics messages."
|
|||
word
|
||||
idlwave-executive-commands-alist t))))
|
||||
(setq mod1 (list link))))
|
||||
|
||||
|
||||
;; A class -- system OR in-text help (via class__define).
|
||||
((and (eq cw 'class)
|
||||
(or (idlwave-in-quote) ; e.g. obj_new
|
||||
|
@ -421,28 +446,28 @@ It collects and prints the diagnostics messages."
|
|||
(name (concat (downcase this-word) "__define"))
|
||||
(link (nth 1 (assq 'link entry))))
|
||||
(setq mod1 (list link name 'pro))))
|
||||
|
||||
|
||||
;; A class structure tag (self.BLAH) -- only in-text help available
|
||||
(classtag
|
||||
(let ((tag (substring this-word (match-end 0)))
|
||||
class-with found-in)
|
||||
(when (setq class-with
|
||||
(when (setq class-with
|
||||
(idlwave-class-or-superclass-with-tag
|
||||
(nth 2 (idlwave-current-routine))
|
||||
tag))
|
||||
(setq found-in (idlwave-class-found-in class-with))
|
||||
(if (assq (idlwave-sintern-class class-with)
|
||||
(if (assq (idlwave-sintern-class class-with)
|
||||
idlwave-system-class-info)
|
||||
(error "No help available for system class tags"))
|
||||
(setq idlwave-help-do-class-struct-tag t)
|
||||
(setq mod1 (list nil
|
||||
(setq mod1 (list nil
|
||||
(if found-in
|
||||
(cons (concat found-in "__define") class-with)
|
||||
(concat class-with "__define"))
|
||||
'pro
|
||||
nil ; no class.... it's a procedure!
|
||||
tag)))))
|
||||
|
||||
|
||||
;; A regular structure tag -- only in text, and if
|
||||
;; optional `complete-structtag' loaded.
|
||||
(structtag
|
||||
|
@ -453,7 +478,7 @@ It collects and prints the diagnostics messages."
|
|||
(setq idlwave-help-do-struct-tag
|
||||
idlwave-structtag-struct-location
|
||||
mod1 (list nil nil nil nil tag))))
|
||||
|
||||
|
||||
;; A routine keyword -- in text or system help
|
||||
((and (memq cw '(function-keyword procedure-keyword))
|
||||
(stringp this-word)
|
||||
|
@ -495,7 +520,7 @@ It collects and prints the diagnostics messages."
|
|||
(setq mod1 (append (list t) module (list keyword))
|
||||
mod2 (list t this-word 'fun nil)
|
||||
mod3 (append (list t) module)))))
|
||||
|
||||
|
||||
;; Everything else
|
||||
(t
|
||||
(setq mod1 (append (list t) module))))
|
||||
|
@ -528,14 +553,14 @@ Needs additional info stored in global `idlwave-completion-help-info'."
|
|||
word link)
|
||||
(mouse-set-point ev)
|
||||
|
||||
|
||||
|
||||
;; See if we can also find help somewhere, e.g. for multiple classes
|
||||
(setq word (idlwave-this-word))
|
||||
(if (string= word "")
|
||||
(error "No help item selected"))
|
||||
(setq link (get-text-property 0 'link word))
|
||||
(select-window cw)
|
||||
(cond
|
||||
(cond
|
||||
;; Routine name
|
||||
((memq what '(procedure function routine))
|
||||
(setq name word)
|
||||
|
@ -546,9 +571,9 @@ Needs additional info stored in global `idlwave-completion-help-info'."
|
|||
type)))
|
||||
(setq link t) ; No specific link valid yet
|
||||
(if sclasses
|
||||
(setq classes (idlwave-members-only
|
||||
(setq classes (idlwave-members-only
|
||||
classes (cons class sclasses))))
|
||||
(setq class (idlwave-popup-select ev classes
|
||||
(setq class (idlwave-popup-select ev classes
|
||||
"Select Class" 'sort))))
|
||||
|
||||
;; XXX is this necessary, given all-method-classes?
|
||||
|
@ -568,7 +593,7 @@ Needs additional info stored in global `idlwave-completion-help-info'."
|
|||
type)))
|
||||
(setq link t) ; Link can't be correct yet
|
||||
(if sclasses
|
||||
(setq classes (idlwave-members-only
|
||||
(setq classes (idlwave-members-only
|
||||
classes (cons class sclasses))))
|
||||
(setq class (idlwave-popup-select ev classes
|
||||
"Select Class" 'sort))
|
||||
|
@ -580,14 +605,14 @@ Needs additional info stored in global `idlwave-completion-help-info'."
|
|||
(if (string= (downcase name) "obj_new")
|
||||
(setq class idlwave-current-obj_new-class
|
||||
name "Init"))))
|
||||
|
||||
|
||||
;; Class name
|
||||
((eq what 'class)
|
||||
(setq class word
|
||||
word nil))
|
||||
|
||||
|
||||
;; A special named function to call which sets some of our variables
|
||||
((and (symbolp what)
|
||||
((and (symbolp what)
|
||||
(fboundp what))
|
||||
(funcall what 'set word))
|
||||
|
||||
|
@ -602,7 +627,7 @@ Needs additional info stored in global `idlwave-completion-help-info'."
|
|||
"Highlight all completions for which help is available and attach link.
|
||||
Those words in `idlwave-completion-help-links' have links. The
|
||||
`idlwave-help-link' face is used for this."
|
||||
(if idlwave-highlight-help-links-in-completion
|
||||
(if idlwave-highlight-help-links-in-completion
|
||||
(with-current-buffer (get-buffer "*Completions*")
|
||||
(save-excursion
|
||||
(let* ((case-fold-search t)
|
||||
|
@ -618,7 +643,7 @@ Those words in `idlwave-completion-help-links' have links. The
|
|||
(setq beg (match-beginning 1) end (match-end 1)
|
||||
word (match-string 1) doit nil)
|
||||
;; Call special completion function test
|
||||
(if (and (symbolp what)
|
||||
(if (and (symbolp what)
|
||||
(fboundp what))
|
||||
(setq doit (funcall what 'test word))
|
||||
;; Look for special link property passed in help-links
|
||||
|
@ -649,13 +674,13 @@ Those words in `idlwave-completion-help-links' have links. The
|
|||
;; Try to select the return frame.
|
||||
;; This can crash on slow network connections, obviously when
|
||||
;; we kill the help frame before the return-frame is selected.
|
||||
;; To protect the workings, we wait for up to one second
|
||||
;; To protect the workings, we wait for up to one second
|
||||
;; and check if the return-frame *is* now selected.
|
||||
;; This is marked "eperimental" since we are not sure when its OK.
|
||||
(let ((maxtime 1.0) (time 0.) (step 0.1))
|
||||
(select-frame idlwave-help-return-frame)
|
||||
(while (and (sit-for step)
|
||||
(not (eq (selected-frame)
|
||||
(not (eq (selected-frame)
|
||||
idlwave-help-return-frame))
|
||||
(< (setq time (+ time step)) maxtime)))))
|
||||
(delete-frame idlwave-help-frame))
|
||||
|
@ -668,7 +693,7 @@ Those words in `idlwave-completion-help-links' have links. The
|
|||
(defvar default-toolbar-visible-p)
|
||||
|
||||
(defun idlwave-help-display-help-window (&optional pos-or-func)
|
||||
"Display the help window.
|
||||
"Display the help window.
|
||||
Move window start to POS-OR-FUNC, if passed as a position, or call it
|
||||
if passed as a function. See `idlwave-help-use-dedicated-frame'."
|
||||
(let ((cw (selected-window))
|
||||
|
@ -679,13 +704,13 @@ if passed as a function. See `idlwave-help-use-dedicated-frame'."
|
|||
(switch-to-buffer buf))
|
||||
;; Do it in this frame and save the window configuration
|
||||
(if (not (get-buffer-window buf nil))
|
||||
(setq idlwave-help-window-configuration
|
||||
(setq idlwave-help-window-configuration
|
||||
(current-window-configuration)))
|
||||
(display-buffer buf nil (selected-frame))
|
||||
(select-window (get-buffer-window buf)))
|
||||
(raise-frame)
|
||||
(if pos-or-func
|
||||
(if (functionp pos-or-func)
|
||||
(if pos-or-func
|
||||
(if (functionp pos-or-func)
|
||||
(funcall pos-or-func)
|
||||
(goto-char pos-or-func)
|
||||
(recenter 0)))
|
||||
|
@ -707,31 +732,43 @@ if passed as a function. See `idlwave-help-use-dedicated-frame'."
|
|||
(select-frame idlwave-help-return-frame)))
|
||||
|
||||
(defun idlwave-online-help (link &optional name type class keyword)
|
||||
"Display HTML or other special help on a certain topic.
|
||||
"Display HTML or other special help on a certain topic.
|
||||
Either loads an HTML link, if LINK is non-nil, or gets special-help on
|
||||
the optional arguments, if any special help is defined. If LINK is
|
||||
`t', first look up the optional arguments in the routine info list to
|
||||
see if a link is set for it. Try extra help functions if necessary."
|
||||
;; Lookup link
|
||||
(if (eq link t)
|
||||
(let ((entry (idlwave-best-rinfo-assoc name type class
|
||||
(if (eq link t)
|
||||
(let ((entry (idlwave-best-rinfo-assoc name type class
|
||||
(idlwave-routines) nil t)))
|
||||
(cond
|
||||
;; Try keyword link
|
||||
((and keyword
|
||||
(setq link (cdr (idlwave-entry-find-keyword entry keyword)))))
|
||||
;; Default, regular entry link
|
||||
(t (setq link (idlwave-entry-has-help entry))))))
|
||||
(if entry
|
||||
(cond
|
||||
;; Try keyword link
|
||||
((and keyword
|
||||
(setq link (cdr
|
||||
(idlwave-entry-find-keyword entry keyword)))))
|
||||
;; Default, regular entry link
|
||||
(t (setq link (idlwave-entry-has-help entry))))
|
||||
(if (and
|
||||
class
|
||||
;; Check for system class help
|
||||
(setq entry (assq (idlwave-sintern-class class)
|
||||
idlwave-system-class-info)
|
||||
link (nth 1 (assq 'link entry))))
|
||||
(message
|
||||
(concat "No routine info for %s"
|
||||
", falling back on class help.")
|
||||
(idlwave-make-full-name class name))))))
|
||||
|
||||
(cond
|
||||
;; An explicit link
|
||||
((stringp link)
|
||||
((stringp link)
|
||||
(idlwave-help-html-link link))
|
||||
|
||||
|
||||
;; Any extra help
|
||||
(idlwave-extra-help-function
|
||||
(idlwave-help-get-special-help name type class keyword))
|
||||
|
||||
|
||||
;; Nothing worked
|
||||
(t (idlwave-help-error name type class keyword))))
|
||||
|
||||
|
@ -742,7 +779,7 @@ see if a link is set for it. Try extra help functions if necessary."
|
|||
(help-pos (save-excursion
|
||||
(set-buffer (idlwave-help-get-help-buffer))
|
||||
(let ((buffer-read-only nil))
|
||||
(funcall idlwave-extra-help-function
|
||||
(funcall idlwave-extra-help-function
|
||||
name type class keyword)))))
|
||||
(if help-pos
|
||||
(idlwave-help-display-help-window help-pos)
|
||||
|
@ -757,36 +794,22 @@ see if a link is set for it. Try extra help functions if necessary."
|
|||
;(browse-url-generic-args idlwave-help-browser-generic-args)
|
||||
full-link)
|
||||
|
||||
(unless idlwave-help-browse-url-available
|
||||
(error "browse-url is not available -- install it to use HTML help."))
|
||||
;; Just a regular file name (+ anchor name)
|
||||
(unless (and (stringp help-loc)
|
||||
(file-directory-p help-loc))
|
||||
(error "Invalid help location."))
|
||||
(setq full-link (browse-url-file-url (expand-file-name link help-loc)))
|
||||
|
||||
(if (and (memq system-type '(ms-dos windows-nt))
|
||||
idlwave-help-use-hh)
|
||||
(progn
|
||||
(setq browse-url-browser-function 'browse-url-generic
|
||||
full-link (concat (expand-file-name "idl.chm" help-loc)
|
||||
"::/"
|
||||
link))
|
||||
(if (memq 'keyhh idlwave-help-use-hh)
|
||||
(setq browse-url-generic-program "KEYHH"
|
||||
browse-url-generic-args '("-IDLWAVE"))
|
||||
(setq browse-url-generic-program "HH")))
|
||||
;; Just a regular file name (+ anchor name)
|
||||
(unless (and (stringp help-loc)
|
||||
(file-directory-p help-loc))
|
||||
(error
|
||||
"Invalid help location; customize `idlwave-html-help-location'."))
|
||||
(setq full-link (concat
|
||||
"file://"
|
||||
(expand-file-name
|
||||
link
|
||||
(expand-file-name "idl_html_help" help-loc)))))
|
||||
;; Select the browser
|
||||
(cond
|
||||
(idlwave-help-use-assistant
|
||||
(idlwave-help-assistant-open-link link))
|
||||
|
||||
;; Check for a local browser
|
||||
(if (or idlwave-help-browser-is-local
|
||||
(string-match "w3" (symbol-name idlwave-help-browser-function)))
|
||||
(idlwave-help-display-help-window '(lambda () (browse-url full-link)))
|
||||
(browse-url full-link))))
|
||||
((or idlwave-help-browser-is-local
|
||||
(string-match "w3" (symbol-name idlwave-help-browser-function)))
|
||||
(idlwave-help-display-help-window '(lambda () (browse-url full-link))))
|
||||
|
||||
(t (browse-url full-link)))))
|
||||
|
||||
;; A special help routine for source-level syntax help in files.
|
||||
(defvar idlwave-help-fontify-source-code)
|
||||
|
@ -814,7 +837,7 @@ This function can be used as `idlwave-extra-help-function'."
|
|||
(if class-only ;Help with class? Using "Init" as source.
|
||||
(setq name "Init"
|
||||
type 'fun))
|
||||
(if (not struct-tag)
|
||||
(if (not struct-tag)
|
||||
(setq file
|
||||
(idlwave-routine-source-file
|
||||
(nth 3 (idlwave-best-rinfo-assoc
|
||||
|
@ -827,16 +850,15 @@ This function can be used as `idlwave-extra-help-function'."
|
|||
(if (or struct-tag (stringp file))
|
||||
(progn
|
||||
(setq in-buf ; structure-tag completion is always in current buffer
|
||||
(if struct-tag
|
||||
(if struct-tag
|
||||
idlwave-current-tags-buffer
|
||||
(idlwave-get-buffer-visiting file)))
|
||||
;; see if file is in a visited buffer, insert those contents
|
||||
(if in-buf
|
||||
(progn
|
||||
(setq file (buffer-file-name in-buf))
|
||||
(erase-buffer)
|
||||
(insert-buffer-substring in-buf)
|
||||
(goto-char (point-min)))
|
||||
(erase-buffer)
|
||||
(insert-buffer-substring in-buf))
|
||||
(if (file-exists-p file) ;; otherwise just load the file
|
||||
(progn
|
||||
(erase-buffer)
|
||||
|
@ -850,19 +872,19 @@ This function can be used as `idlwave-extra-help-function'."
|
|||
;; Try to find a good place to display
|
||||
(setq def-pos
|
||||
;; Find the class structure tag if that's what we're after
|
||||
(cond
|
||||
(cond
|
||||
;; Class structure tags: find the class or named structure
|
||||
;; definition
|
||||
(class-struct-tag
|
||||
(save-excursion
|
||||
(save-excursion
|
||||
(setq class
|
||||
(if (string-match "[a-zA-Z0-9]\\(__\\)" name)
|
||||
(if (string-match "[a-zA-Z0-9]\\(__\\)" name)
|
||||
(substring name 0 (match-beginning 1))
|
||||
idlwave-current-tags-class))
|
||||
(and
|
||||
(idlwave-find-class-definition class nil real-class)
|
||||
(idlwave-find-struct-tag keyword))))
|
||||
|
||||
|
||||
;; Generic structure tags: the structure definition
|
||||
;; location within the file has been recorded in
|
||||
;; `struct-tag'
|
||||
|
@ -872,14 +894,14 @@ This function can be used as `idlwave-extra-help-function'."
|
|||
(integerp struct-tag)
|
||||
(goto-char struct-tag)
|
||||
(idlwave-find-struct-tag keyword))))
|
||||
|
||||
|
||||
;; Just find the routine definition
|
||||
(t
|
||||
(if class-only (point-min)
|
||||
(idlwave-help-find-routine-definition name type class keyword))))
|
||||
idlwave-help-def-pos def-pos)
|
||||
|
||||
(if (and idlwave-help-source-try-header
|
||||
(if (and idlwave-help-source-try-header
|
||||
(not (or struct-tag class-struct-tag)))
|
||||
;; Check if we can find the header
|
||||
(save-excursion
|
||||
|
@ -889,7 +911,7 @@ This function can be used as `idlwave-extra-help-function'."
|
|||
idlwave-help-in-header header-pos)))
|
||||
|
||||
(if (or header-pos def-pos)
|
||||
(progn
|
||||
(progn
|
||||
(if (boundp 'idlwave-help-min-frame-width)
|
||||
(setq idlwave-help-min-frame-width 80))
|
||||
(goto-char (or header-pos def-pos)))
|
||||
|
@ -903,7 +925,7 @@ This function can be used as `idlwave-extra-help-function'."
|
|||
KEYWORD is ignored. Returns the point of match if successful, nil otherwise."
|
||||
(save-excursion
|
||||
(goto-char (point-max))
|
||||
(if (re-search-backward
|
||||
(if (re-search-backward
|
||||
(concat "^[ \t]*"
|
||||
(if (eq type 'pro) "pro"
|
||||
(if (eq type 'fun) "function"
|
||||
|
@ -949,22 +971,22 @@ with spaces allowed between the keyword and the following dash or equal sign.
|
|||
If there is a match, we assume it is the keyword description."
|
||||
(let* ((case-fold-search t)
|
||||
(rname (if (stringp class)
|
||||
(concat
|
||||
(concat
|
||||
"\\("
|
||||
;; Traditional name or class::name
|
||||
"\\("
|
||||
"\\(" (regexp-quote (downcase class)) "::\\)?"
|
||||
(regexp-quote (downcase name))
|
||||
"\\>\\)"
|
||||
(concat
|
||||
(concat
|
||||
"\\|"
|
||||
;; class__define or just class
|
||||
(regexp-quote (downcase class)) "\\(__define\\)?")
|
||||
"\\)")
|
||||
(regexp-quote (downcase name))))
|
||||
|
||||
|
||||
;; NAME tag plus the routine name. The new version is from JD.
|
||||
(name-re (concat
|
||||
(name-re (concat
|
||||
"\\(^;+\\*?[ \t]*"
|
||||
idlwave-help-doclib-name
|
||||
"\\([ \t]*:\\|[ \t]*$\\)[ \t]*\\(\n;+[ \t]*\\)*"
|
||||
|
@ -999,7 +1021,7 @@ If there is a match, we assume it is the keyword description."
|
|||
(regexp-quote (upcase keyword))
|
||||
"\\>")))
|
||||
dstart dend name-pos kwds-pos kwd-pos)
|
||||
(catch 'exit
|
||||
(catch 'exit
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(while (and (setq dstart (re-search-forward idlwave-doclib-start nil t))
|
||||
|
@ -1007,7 +1029,7 @@ If there is a match, we assume it is the keyword description."
|
|||
;; found a routine header
|
||||
(goto-char dstart)
|
||||
(if (setq name-pos (re-search-forward name-re dend t))
|
||||
(progn
|
||||
(progn
|
||||
(if keyword
|
||||
;; We do need a keyword
|
||||
(progn
|
||||
|
@ -1089,7 +1111,7 @@ When DING is non-nil, ring the bell as well."
|
|||
(idlwave-help-find-first-header nil)
|
||||
(setq idlwave-help-in-header nil)
|
||||
(idlwave-help-toggle-header-match-and-def arg 'top)))
|
||||
|
||||
|
||||
(defun idlwave-help-toggle-header-match-and-def (arg &optional top)
|
||||
(interactive "P")
|
||||
(let ((args idlwave-help-args)
|
||||
|
@ -1101,7 +1123,7 @@ When DING is non-nil, ring the bell as well."
|
|||
(setq pos idlwave-help-def-pos))
|
||||
;; Try to display header
|
||||
(setq pos (apply 'idlwave-help-find-in-doc-header
|
||||
(if top
|
||||
(if top
|
||||
(list (car args) (nth 1 args) (nth 2 args) nil)
|
||||
args)))
|
||||
(if pos
|
||||
|
@ -1135,7 +1157,7 @@ Useful when source code is displayed as help. See the option
|
|||
(font-lock-fontify-buffer))
|
||||
(set-syntax-table syntax-table)))))
|
||||
|
||||
|
||||
|
||||
(defun idlwave-help-error (name type class keyword)
|
||||
(error "Can't find help on %s%s %s"
|
||||
(or (and (or class name) (idlwave-make-full-name class name))
|
||||
|
@ -1191,6 +1213,98 @@ Useful when source code is displayed as help. See the option
|
|||
(let ((entry (idlwave-best-rinfo-assoc name type class (idlwave-routines))))
|
||||
(idlwave-entry-has-help entry)))
|
||||
|
||||
;;----- Control the IDL Assistant, which shipped with IDL v6.2
|
||||
(defvar idlwave-help-assistant-process nil)
|
||||
(defvar idlwave-help-assistant-socket nil)
|
||||
|
||||
;; The Windows version does not have a !DIR/bin/* set of front-end
|
||||
;; scripts, but instead only links directly to bin.x86. As a result,
|
||||
;; we must pass the -profile argument as well.
|
||||
(defvar idlwave-help-assistant-command
|
||||
(if (memq system-type '(ms-dos windows-nt))
|
||||
"bin/bin.x86/idl_assistant"
|
||||
"bin/idl_assistant")
|
||||
"The command, rooted at idlwave-system-directory, which invokes the
|
||||
IDL assistant.")
|
||||
|
||||
(defun idlwave-help-assistant-available ()
|
||||
(if idlwave-help-assistant-available
|
||||
(eq idlwave-help-assistant-available t)
|
||||
(setq idlwave-help-assistant-available
|
||||
(if (file-executable-p (idlwave-help-assistant-command))
|
||||
t
|
||||
'not-available))))
|
||||
|
||||
(defun idlwave-help-assistant-command ()
|
||||
(expand-file-name idlwave-help-assistant-command (idlwave-sys-dir)))
|
||||
|
||||
(defun idlwave-help-assistant-start (&optional link)
|
||||
"Start the IDL Assistant, loading LINK, if passed."
|
||||
(when (or (not idlwave-help-assistant-socket)
|
||||
(not (eq (process-status idlwave-help-assistant-socket) 'open)))
|
||||
(let* ((help-loc (idlwave-html-help-location))
|
||||
(command (idlwave-help-assistant-command))
|
||||
(extra-args
|
||||
(nconc
|
||||
(if (memq system-type '(ms-dos windows-nt))
|
||||
`("-profile" ,(expand-file-name "idl.adp" help-loc)))
|
||||
(if link
|
||||
`("-file" ,(expand-file-name link help-loc)))))
|
||||
port)
|
||||
(if idlwave-help-assistant-socket
|
||||
(delete-process idlwave-help-assistant-socket))
|
||||
|
||||
(setq idlwave-help-assistant-process
|
||||
(apply 'start-process
|
||||
"IDL_ASSISTANT_PROC" nil command "-server" extra-args))
|
||||
|
||||
(set-process-filter idlwave-help-assistant-process
|
||||
(lambda (proc string)
|
||||
(setq port (string-to-number string))))
|
||||
(unless (accept-process-output idlwave-help-assistant-process 15)
|
||||
(error "Failed binding IDL_ASSISTANT socket"))
|
||||
(if (not port)
|
||||
(error "Unable to open IDL_ASSISTANT.")
|
||||
(set-process-filter idlwave-help-assistant-process nil)
|
||||
(setq idlwave-help-assistant-socket
|
||||
(open-network-stream "IDL_ASSISTANT_SOCK"
|
||||
nil "localhost" port))
|
||||
(if (eq (process-status idlwave-help-assistant-socket) 'open)
|
||||
(process-send-string idlwave-help-assistant-socket
|
||||
(concat "setHelpPath " help-loc "\n"))
|
||||
(idlwave-help-assistant-close)
|
||||
(error "Cannot communicate with IDL_ASSISTANT"))))))
|
||||
|
||||
(defun idlwave-help-assistant-raise ()
|
||||
(idlwave-help-assistant-start)
|
||||
(process-send-string idlwave-help-assistant-socket "raise\n"))
|
||||
|
||||
(defun idlwave-help-assistant-open-link (&optional link)
|
||||
;; Open a link (file name with anchor, no leading path) in the assistant.
|
||||
(if link
|
||||
(let ((file (expand-file-name link (idlwave-html-help-location))))
|
||||
(idlwave-help-assistant-start link)
|
||||
(process-send-string idlwave-help-assistant-socket
|
||||
(concat "openLink " file "\n"))
|
||||
(string-match "\.html" link)
|
||||
(process-send-string idlwave-help-assistant-socket
|
||||
(concat "searchIndexNoOpen "
|
||||
(substring link 0 (match-beginning 0))
|
||||
"\n")))
|
||||
(idlwave-help-assistant-raise)))
|
||||
|
||||
(defun idlwave-help-assistant-close ()
|
||||
(when (and idlwave-help-assistant-process
|
||||
(eq (process-status idlwave-help-assistant-process) 'run))
|
||||
(when idlwave-help-assistant-socket
|
||||
(process-send-string idlwave-help-assistant-socket "quit\n")
|
||||
(delete-process idlwave-help-assistant-socket))
|
||||
(stop-process idlwave-help-assistant-process)
|
||||
(delete-process idlwave-help-assistant-process)
|
||||
(setq idlwave-help-assistant-socket nil
|
||||
idlwave-help-assistant-process nil)))
|
||||
|
||||
|
||||
(provide 'idlw-help)
|
||||
(provide 'idlwave-help)
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,12 +1,12 @@
|
|||
;; idlw-shell.el --- run IDL as an inferior process of Emacs.
|
||||
;; Copyright (c) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
;; Free Software Foundation, Inc.
|
||||
;; Free Software Foundation
|
||||
|
||||
;; Authors: J.D. Smith <jdsmith@as.arizona.edu>
|
||||
;; Carsten Dominik <dominik@astro.uva.nl>
|
||||
;; Chris Chase <chase@att.com>
|
||||
;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu>
|
||||
;; Version: 5.7_22
|
||||
;; Version: 6.0_em22
|
||||
;; Keywords: processes
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
@ -138,6 +138,11 @@ process output is made by surrounding this name with `*'s."
|
|||
|
||||
;; (defcustom idlwave-shell-automatic-start...) See idlwave.el
|
||||
|
||||
(defcustom idlwave-shell-use-dedicated-window nil
|
||||
"*Non-nil means, never replace the shell frame with another buffer."
|
||||
:group 'idlwave-shell-general-setup
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom idlwave-shell-use-dedicated-frame nil
|
||||
"*Non-nil means, IDLWAVE should use a special frame to display shell buffer."
|
||||
:group 'idlwave-shell-general-setup
|
||||
|
@ -313,8 +318,15 @@ the copious shell traffic to be displayed."
|
|||
(const :tag "All debug and stepping commands" debug)
|
||||
(const :tag "Close, window, retall, etc. commands" misc))))
|
||||
|
||||
(defcustom idlwave-shell-max-print-length 200
|
||||
"Maximum number of array elements to print when examining."
|
||||
:group 'idlwave-shell-command-setup
|
||||
:type 'integer)
|
||||
|
||||
(defcustom idlwave-shell-examine-alist
|
||||
'(("Print" . "print,___")
|
||||
`(("Print" . ,(concat "idlwave_print_safe,___,"
|
||||
(number-to-string
|
||||
idlwave-shell-max-print-length)))
|
||||
("Help" . "help,___")
|
||||
("Structure Help" . "help,___,/STRUCTURE")
|
||||
("Dimensions" . "print,size(___,/DIMENSIONS)")
|
||||
|
@ -322,6 +334,7 @@ the copious shell traffic to be displayed."
|
|||
("N_Elements" . "print,n_elements(___)")
|
||||
("All Size Info" . "help,(__IWsz__=size(___,/STRUCTURE)),/STRUCTURE & print,__IWsz__.DIMENSIONS")
|
||||
("Ptr Valid" . "print,ptr_valid(___)")
|
||||
("Arg Present" . "print,arg_present(___)")
|
||||
("Widget Valid" . "print,widget_info(___,/VALID)")
|
||||
("Widget Geometry" . "help,widget_info(___,/GEOMETRY)"))
|
||||
"Alist of special examine commands for popup selection.
|
||||
|
@ -437,6 +450,11 @@ popup help text on the line."
|
|||
:group 'idlwave-shell-command-setup
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom idlwave-shell-reset-no-prompt nil
|
||||
"If non-nil, skip the yes/no prompt when resetting the IDL session."
|
||||
:group 'idlwave-shell-command-setup
|
||||
:type 'boolean)
|
||||
|
||||
;; Breakpoint Overlays etc
|
||||
(defgroup idlwave-shell-highlighting-and-faces nil
|
||||
"Highlighting and Faces used by the IDLWAVE Shell mode."
|
||||
|
@ -488,11 +506,11 @@ line where IDL is stopped. See also `idlwave-shell-mark-stop-line'."
|
|||
|
||||
(defcustom idlwave-shell-electric-stop-line-face
|
||||
(prog1
|
||||
(copy-face 'modeline 'idlwave-shell-electric-stop-line-face)
|
||||
(set-face-background 'idlwave-shell-electric-stop-line-face
|
||||
(copy-face 'modeline 'idlwave-shell-electric-stop-line)
|
||||
(set-face-background 'idlwave-shell-electric-stop-line
|
||||
idlwave-shell-electric-stop-color)
|
||||
(condition-case nil
|
||||
(set-face-foreground 'idlwave-shell-electric-stop-line-face nil)
|
||||
(set-face-foreground 'idlwave-shell-electric-stop-line nil)
|
||||
(error nil)))
|
||||
"*The face for `idlwave-shell-stop-line-overlay' when in electric debug mode.
|
||||
Allows you to choose the font, color and other properties for the line
|
||||
|
@ -553,6 +571,7 @@ lines which have a breakpoint. See also `idlwave-shell-mark-breakpoints'."
|
|||
"Face for highlighting lines with breakpoints."
|
||||
:group 'idlwave-shell-highlighting-and-faces))
|
||||
|
||||
|
||||
(defcustom idlwave-shell-expression-face 'secondary-selection
|
||||
"*The face for `idlwave-shell-expression-overlay'.
|
||||
Allows you to choose the font, color and other properties for
|
||||
|
@ -652,7 +671,7 @@ the directory stack.")
|
|||
"The overlay for where IDL is currently stopped.")
|
||||
(defvar idlwave-shell-is-stopped nil)
|
||||
(defvar idlwave-shell-expression-overlay nil
|
||||
"The overlay for where IDL is currently stopped.")
|
||||
"The overlay for the examined expression.")
|
||||
(defvar idlwave-shell-output-overlay nil
|
||||
"The overlay for the last IDL output.")
|
||||
|
||||
|
@ -700,10 +719,21 @@ the directory stack.")
|
|||
(setq idlwave-shell-expression-overlay (make-overlay 1 1))
|
||||
(overlay-put idlwave-shell-expression-overlay
|
||||
'face idlwave-shell-expression-face)
|
||||
(overlay-put idlwave-shell-expression-overlay
|
||||
'priority 1)
|
||||
(setq idlwave-shell-output-overlay (make-overlay 1 1))
|
||||
(overlay-put idlwave-shell-output-overlay
|
||||
'face idlwave-shell-output-face)
|
||||
|
||||
(copy-face idlwave-shell-stop-line-face
|
||||
'idlwave-shell-pending-stop)
|
||||
(copy-face idlwave-shell-electric-stop-line-face
|
||||
'idlwave-shell-pending-electric-stop)
|
||||
(set-face-background 'idlwave-shell-pending-stop "gray70")
|
||||
(set-face-background 'idlwave-shell-pending-electric-stop "gray70")
|
||||
|
||||
|
||||
|
||||
(defvar idlwave-shell-bp-query "help,/breakpoints"
|
||||
"Command to obtain list of breakpoints")
|
||||
|
||||
|
@ -823,6 +853,7 @@ IDL has currently stepped.")
|
|||
? Help on expression near point or in region ([C-u ?]).
|
||||
x Examine expression near point or in region ([C-u x]) with
|
||||
letter completion of the examine type.
|
||||
e Prompt for an expression to print.
|
||||
|
||||
Miscellaneous:
|
||||
q Quit - end debugging session and return to the Shell's main level.
|
||||
|
@ -998,6 +1029,8 @@ IDL has currently stepped.")
|
|||
(setq idlwave-shell-default-directory default-directory)
|
||||
(setq idlwave-shell-hide-output nil)
|
||||
|
||||
;; NB: `make-local-hook' needed for older/alternative Emacs compatibility
|
||||
;; (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)
|
||||
|
@ -1040,6 +1073,8 @@ IDL has currently stepped.")
|
|||
(set (make-local-variable 'comment-start) ";")
|
||||
(setq abbrev-mode t)
|
||||
|
||||
;; NB: `make-local-hook' needed for older/alternative Emacs compatibility
|
||||
;; make-local-hook 'post-command-hook)
|
||||
(add-hook 'post-command-hook 'idlwave-command-hook nil t)
|
||||
|
||||
;; Read the command history?
|
||||
|
@ -1061,23 +1096,25 @@ IDL has currently stepped.")
|
|||
(idlwave-shell-send-command
|
||||
(format "defsysv,'!idlwave_version','%s',1" idlwave-mode-version)
|
||||
nil 'hide)
|
||||
;; Get the paths if they weren't read in from file
|
||||
(if (and (not idlwave-path-alist)
|
||||
(or (not (stringp idlwave-system-directory))
|
||||
(eq (length idlwave-system-directory) 0)))
|
||||
(idlwave-shell-send-command idlwave-shell-path-query
|
||||
'idlwave-shell-get-path-info
|
||||
'hide)))
|
||||
;; Read the paths, and save if they changed
|
||||
(idlwave-shell-send-command idlwave-shell-path-query
|
||||
'idlwave-shell-get-path-info
|
||||
'hide))
|
||||
|
||||
(defvar idlwave-system-directory)
|
||||
(defun idlwave-shell-get-path-info (&optional no-write)
|
||||
"Get the path lists, writing to file unless NO-WRITE is set."
|
||||
(let* ((rpl (idlwave-shell-path-filter))
|
||||
(sysdir (car rpl))
|
||||
(dirs (cdr rpl))
|
||||
(old-path-alist idlwave-path-alist))
|
||||
(old-path-alist idlwave-path-alist)
|
||||
(old-sys-dir idlwave-system-directory)
|
||||
path-changed sysdir-changed)
|
||||
(when sysdir
|
||||
(setq idlwave-system-directory sysdir)
|
||||
(put 'idlwave-system-directory 'from-shell t))
|
||||
(if (setq sysdir-changed
|
||||
(not (string= idlwave-system-directory old-sys-dir)))
|
||||
(put 'idlwave-system-directory 'from-shell t)))
|
||||
;; Preserve any existing flags
|
||||
(setq idlwave-path-alist
|
||||
(mapcar (lambda (x)
|
||||
|
@ -1086,11 +1123,13 @@ IDL has currently stepped.")
|
|||
(cons x (cdr old-entry))
|
||||
(list x))))
|
||||
dirs))
|
||||
(put 'idlwave-path-alist 'from-shell t)
|
||||
(if (setq path-changed (not (equal idlwave-path-alist old-path-alist)))
|
||||
(put 'idlwave-path-alist 'from-shell t))
|
||||
(if idlwave-path-alist
|
||||
(if (and idlwave-auto-write-paths
|
||||
(not idlwave-library-path)
|
||||
(not no-write) )
|
||||
(if (and (not no-write)
|
||||
idlwave-auto-write-paths
|
||||
(or sysdir-changed path-changed)
|
||||
(not idlwave-library-path))
|
||||
(idlwave-write-paths))
|
||||
;; Fall back
|
||||
(setq idlwave-path-alist old-path-alist))))
|
||||
|
@ -1199,12 +1238,14 @@ See also the variable `idlwave-shell-prompt-pattern'.
|
|||
(current-window (selected-window)))
|
||||
(select-window window)
|
||||
(goto-char (point-max))
|
||||
(if idlwave-shell-use-dedicated-window
|
||||
(set-window-dedicated-p window t))
|
||||
(select-window current-window)
|
||||
(if idlwave-shell-ready
|
||||
(raise-frame (window-frame window)))
|
||||
(if (eq (selected-frame) (window-frame window))
|
||||
(select-window window))))
|
||||
;; Save the paths at the end
|
||||
;; Save the paths at the end, if they are from the Shell and new.
|
||||
(add-hook 'idlwave-shell-sentinel-hook
|
||||
(lambda ()
|
||||
(if (and
|
||||
|
@ -1518,10 +1559,10 @@ and then calls `idlwave-shell-send-command' for any pending commands."
|
|||
|
||||
|
||||
;;; Test/Debug code
|
||||
; (save-excursion (set-buffer
|
||||
; (get-buffer-create "*idlwave-shell-output*"))
|
||||
; (goto-char (point-max))
|
||||
; (insert "\nSTRING===>\n" string "\n<====\n"))
|
||||
;(with-current-buffer
|
||||
; (get-buffer-create "*idlwave-shell-output*")
|
||||
; (goto-char (point-max))
|
||||
; (insert "\nReceived STRING\n===>\n" string "\n<====\n"))
|
||||
|
||||
;; Check for prompt in current accumulating output
|
||||
(when (setq idlwave-shell-ready
|
||||
|
@ -1536,14 +1577,14 @@ and then calls `idlwave-shell-send-command' for any pending commands."
|
|||
(re-search-backward idlwave-shell-prompt-pattern nil t)
|
||||
(goto-char (match-end 0))
|
||||
(setq idlwave-shell-command-output
|
||||
(buffer-substring (point-min) (point)))
|
||||
(buffer-substring-no-properties (point-min) (point)))
|
||||
(delete-region (point-min) (point)))
|
||||
(setq idlwave-shell-command-output
|
||||
(with-current-buffer (process-buffer proc)
|
||||
(buffer-substring
|
||||
(buffer-substring-no-properties
|
||||
(save-excursion
|
||||
(goto-char (process-mark proc))
|
||||
(forward-line 0)
|
||||
(forward-line 0) ; Emacs 21 (beginning-of-line nil)
|
||||
(point))
|
||||
comint-last-input-end))))
|
||||
|
||||
|
@ -1570,10 +1611,10 @@ and then calls `idlwave-shell-send-command' for any pending commands."
|
|||
;; Call the post-command hook
|
||||
(if (listp idlwave-shell-post-command-hook)
|
||||
(progn
|
||||
;(message "Calling list")
|
||||
;(prin1 idlwave-shell-post-command-hook)
|
||||
;;(message "Calling list")
|
||||
;;(prin1 idlwave-shell-post-command-hook)
|
||||
(eval idlwave-shell-post-command-hook))
|
||||
;(message "Calling command function")
|
||||
;;(message "Calling command function")
|
||||
(funcall idlwave-shell-post-command-hook))
|
||||
|
||||
;; Reset to default state for next command.
|
||||
|
@ -1668,6 +1709,8 @@ 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.")
|
||||
|
||||
(defvar idlwave-shell-electric-debug-mode) ; defined by easy-mmode
|
||||
|
||||
(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
|
||||
|
@ -1688,9 +1731,8 @@ the above."
|
|||
idlwave-shell-command-output)
|
||||
(string-match idlwave-shell-other-error
|
||||
idlwave-shell-command-output))
|
||||
(save-excursion
|
||||
(set-buffer
|
||||
(get-buffer-create idlwave-shell-error-buffer))
|
||||
(with-current-buffer
|
||||
(get-buffer-create idlwave-shell-error-buffer)
|
||||
(erase-buffer)
|
||||
(insert idlwave-shell-command-output)
|
||||
(goto-char (point-min))
|
||||
|
@ -1723,8 +1765,10 @@ the above."
|
|||
(substring idlwave-shell-command-output (match-end 0))))
|
||||
(setq idlwave-shell-current-state 'halt)
|
||||
;; Don't debug trace messages
|
||||
(idlwave-shell-display-line (idlwave-shell-pc-frame) nil
|
||||
(if trace 'no-debug)))
|
||||
(idlwave-shell-display-line
|
||||
(idlwave-shell-pc-frame) nil
|
||||
(if trace 'disable
|
||||
(if idlwave-shell-electric-debug-mode 'force))))
|
||||
|
||||
;; Fourth Priority: Breakpoints
|
||||
((string-match idlwave-shell-break-message
|
||||
|
@ -1763,29 +1807,29 @@ the above."
|
|||
|
||||
|
||||
(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
|
||||
IDL5. These line breaks can be right in the middle of procedure
|
||||
or file names.
|
||||
It is very difficult to come up with a robust solution. This one seems
|
||||
to be pretty good though.
|
||||
|
||||
Here is in what ways it improves over the previous solution:
|
||||
|
||||
1. The procedure name can be split and will be restored.
|
||||
2. The number can be split. I have never seen this, but who knows.
|
||||
3. We do not require the `.pro' extension for files.
|
||||
|
||||
This function can still break when the file name ends on a end line
|
||||
and the message line contains an additional line with garbage. Then
|
||||
the first part of that garbage will be added to the file name.
|
||||
However, the function checks the existence of the files with and
|
||||
without this last part - thus the function only breaks if file name
|
||||
plus garbage match an existing regular file. This is hopefully very
|
||||
unlikely.
|
||||
|
||||
If optional arg SKIP-MAIN is non-nil, don't parse $MAIN$ routine stop
|
||||
statements."
|
||||
"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
|
||||
;IDL5. These line breaks can be right in the middle of procedure
|
||||
;or file names.
|
||||
;It is very difficult to come up with a robust solution. This one seems
|
||||
;to be pretty good though.
|
||||
;
|
||||
;Here is in what ways it improves over the previous solution:
|
||||
;
|
||||
;1. The procedure name can be split and will be restored.
|
||||
;2. The number can be split. I have never seen this, but who knows.
|
||||
;3. We do not require the `.pro' extension for files.
|
||||
;
|
||||
;This function can still break when the file name ends on an end line
|
||||
;and the message line contains an additional line with garbage. Then
|
||||
;the first part of that garbage will be added to the file name.
|
||||
;However, the function checks the existence of the files with and
|
||||
;without this last part - thus the function only breaks if file name
|
||||
;plus garbage match an existing regular file. This is hopefully very
|
||||
;unlikely.
|
||||
;
|
||||
;If optional arg SKIP-MAIN is non-nil, don't parse $MAIN$ routine stop
|
||||
;statements.
|
||||
|
||||
(let (number procedure file)
|
||||
(when (and (not (if skip-main (string-match ":\\s-*\\$MAIN" string)))
|
||||
|
@ -1926,14 +1970,17 @@ CLOSE, /ALL
|
|||
HEAP_GC, /VERBOSE"
|
||||
;; OBJ_DESTROY, OBJ_VALID() FIXME: should this be added?
|
||||
(interactive "P")
|
||||
(message "Resetting IDL")
|
||||
(setq idlwave-shell-calling-stack-index 0)
|
||||
(idlwave-shell-send-command "retall" nil hidden)
|
||||
(idlwave-shell-send-command "widget_control,/reset" nil hidden)
|
||||
(idlwave-shell-send-command "close,/all" nil hidden)
|
||||
;; (idlwave-shell-send-command "obj_destroy, obj_valid()" nil hidden)
|
||||
(idlwave-shell-send-command "heap_gc,/verbose" nil hidden)
|
||||
(idlwave-shell-display-line nil))
|
||||
(when (or idlwave-shell-reset-no-prompt
|
||||
(yes-or-no-p "Really Reset IDL and discard current session? "))
|
||||
(message "Resetting IDL")
|
||||
(setq idlwave-shell-calling-stack-index 0)
|
||||
;; Give widget exit handlers a chance
|
||||
(idlwave-shell-send-command "retall" nil hidden)
|
||||
(idlwave-shell-send-command "widget_control,/reset" nil hidden)
|
||||
(idlwave-shell-send-command "close,/all" nil hidden)
|
||||
;; (idlwave-shell-send-command "obj_destroy, obj_valid()" nil hidden)
|
||||
(idlwave-shell-send-command "heap_gc,/verbose" nil hidden)
|
||||
(idlwave-shell-display-line nil)))
|
||||
|
||||
(defun idlwave-shell-path-filter ()
|
||||
;; Convert the output of the path query into a list of directories
|
||||
|
@ -1978,9 +2025,6 @@ HEAP_GC, /VERBOSE"
|
|||
(message
|
||||
"Routine Info warning: No match for END line in \n>>>\n%s\n<<<\n"
|
||||
idlwave-shell-command-output)))
|
||||
(if (string-match "\\S-" text)
|
||||
;; Obviously, the pro worked. Make a note that we have it now.
|
||||
(setq idlwave-idlwave_routine_info-compiled t))
|
||||
;; Match the output lines
|
||||
(while (string-match "^IDLWAVE-\\(PRO\\|FUN\\): \\(.*\\)" text start)
|
||||
(setq start (match-end 0))
|
||||
|
@ -2208,7 +2252,6 @@ 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.
|
||||
|
@ -2259,14 +2302,14 @@ overlays."
|
|||
(setq idlwave-shell-calling-stack-routine
|
||||
(nth 2 (nth idlwave-shell-calling-stack-index stack)))
|
||||
|
||||
;; only edebug if in that mode already
|
||||
;; force edebug for this frame if we're in that mode already
|
||||
(idlwave-shell-display-line
|
||||
(nth idlwave-shell-calling-stack-index stack) nil
|
||||
(unless idlwave-shell-electric-debug-mode 'no-debug))
|
||||
(if idlwave-shell-electric-debug-mode 'force))
|
||||
(message "%s" (or message
|
||||
(format "In routine %s (stack level %d)"
|
||||
idlwave-shell-calling-stack-routine
|
||||
(- idlwave-shell-calling-stack-index))))))
|
||||
(format "In routine %s (stack level %d)"
|
||||
idlwave-shell-calling-stack-routine
|
||||
(- idlwave-shell-calling-stack-index))))))
|
||||
|
||||
(defun idlwave-shell-stack-up ()
|
||||
"Display the source code one step up the calling stack."
|
||||
|
@ -2302,30 +2345,38 @@ used. Does nothing if the resulting frame is nil."
|
|||
"Check that frame is for an existing file."
|
||||
(file-readable-p (car frame)))
|
||||
|
||||
(defvar idlwave-shell-suppress-electric-debug nil)
|
||||
(defun idlwave-shell-display-line (frame &optional col no-debug)
|
||||
"Display FRAME file in other window with overlay arrow.
|
||||
(defun idlwave-shell-stop-line-pending ()
|
||||
;; Temporarily change the color of the stop line overlay
|
||||
(if idlwave-shell-stop-line-overlay
|
||||
(overlay-put idlwave-shell-stop-line-overlay 'face
|
||||
(if idlwave-shell-electric-debug-mode
|
||||
'idlwave-shell-pending-electric-stop
|
||||
'idlwave-shell-pending-stop))))
|
||||
|
||||
FRAME is a list of file name, line number, and subroutine name. If
|
||||
FRAME is nil then remove overlay. If COL is set, move point to that
|
||||
column in the line. If NO-DEBUG is non-nil, do *not* toggle the electric
|
||||
debug mode."
|
||||
(defvar idlwave-shell-suppress-electric-debug nil)
|
||||
(defun idlwave-shell-display-line (frame &optional col debug)
|
||||
"display frame file in other window with overlay arrow.
|
||||
|
||||
frame is a list of file name, line number, and subroutine name. if
|
||||
frame is nil then remove overlay. if col is set, move point to that
|
||||
column in the line. if debug is non-nil, enable the electric debug
|
||||
mode. if it is 'disable, do not enable no matter what the setting of
|
||||
'idlwave-shell-automatic-electric-debug'. if it is 'force, enable no
|
||||
matter what the settings of that variable."
|
||||
(if (not frame)
|
||||
;; Remove stop-line overlay from old position
|
||||
;; remove stop-line overlay from old position
|
||||
(progn
|
||||
(setq overlay-arrow-string nil)
|
||||
(setq idlwave-shell-mode-line-info nil)
|
||||
(setq idlwave-shell-is-stopped nil)
|
||||
(if idlwave-shell-stop-line-overlay
|
||||
(delete-overlay idlwave-shell-stop-line-overlay))
|
||||
;; Turn off electric debug everywhere, if it's on
|
||||
(if (and (not no-debug)
|
||||
idlwave-shell-automatic-electric-debug)
|
||||
(idlwave-shell-electric-debug-all-off)))
|
||||
;; turn off electric debug everywhere, if it's on
|
||||
(idlwave-shell-electric-debug-all-off))
|
||||
(if (not (idlwave-shell-valid-frame frame))
|
||||
;; FIXME: errors are dangerous in shell filters. But I think I
|
||||
;; fixme: errors are dangerous in shell filters. but i think i
|
||||
;; have never encountered this one.
|
||||
(error (concat "Invalid frame - unable to access file: " (car frame)))
|
||||
(error (concat "invalid frame - unable to access file: " (car frame)))
|
||||
;;;
|
||||
;;; buffer : the buffer to display a line in.
|
||||
;;; select-shell: current buffer is the shell.
|
||||
|
@ -2339,15 +2390,15 @@ debug mode."
|
|||
(select-shell (equal (buffer-name) (idlwave-shell-buffer)))
|
||||
window pos electric)
|
||||
|
||||
;; First make sure the shell window is visible
|
||||
;; first make sure the shell window is visible
|
||||
(idlwave-display-buffer (idlwave-shell-buffer)
|
||||
nil (idlwave-shell-shell-frame))
|
||||
|
||||
;; Now display the buffer and remember which window it is.
|
||||
;; now display the buffer and remember which window it is.
|
||||
(setq window (idlwave-display-buffer buffer
|
||||
nil (idlwave-shell-source-frame)))
|
||||
|
||||
;; Enter the buffer and mark the line
|
||||
;; enter the buffer and mark the line
|
||||
(save-excursion
|
||||
(set-buffer buffer)
|
||||
(save-restriction
|
||||
|
@ -2358,45 +2409,53 @@ debug mode."
|
|||
(setq idlwave-shell-is-stopped t)
|
||||
|
||||
(if idlwave-shell-stop-line-overlay
|
||||
;; Move overlay
|
||||
(move-overlay idlwave-shell-stop-line-overlay
|
||||
(point) (save-excursion (end-of-line) (point))
|
||||
(current-buffer))
|
||||
;; Use the arrow instead, but only if marking is wanted.
|
||||
(progn
|
||||
;; restore face and move overlay
|
||||
(overlay-put idlwave-shell-stop-line-overlay 'face
|
||||
(if idlwave-shell-electric-debug-mode
|
||||
idlwave-shell-electric-stop-line-face
|
||||
idlwave-shell-stop-line-face))
|
||||
(move-overlay idlwave-shell-stop-line-overlay
|
||||
(point) (save-excursion (end-of-line) (point))
|
||||
(current-buffer)))
|
||||
;; use the arrow instead, but only if marking is wanted.
|
||||
(if idlwave-shell-mark-stop-line
|
||||
(setq overlay-arrow-string idlwave-shell-overlay-arrow))
|
||||
(or overlay-arrow-position ; create the marker if necessary
|
||||
(setq overlay-arrow-position (make-marker)))
|
||||
(set-marker overlay-arrow-position (point) buffer)))
|
||||
|
||||
;; If the point is outside the restriction, widen the buffer.
|
||||
;; if the point is outside the restriction, widen the buffer.
|
||||
(if (or (< pos (point-min)) (> pos (point-max)))
|
||||
(progn
|
||||
(widen)
|
||||
(goto-char pos)))
|
||||
|
||||
;; If we have the column of the error, move the cursor there.
|
||||
;; if we have the column of the error, move the cursor there.
|
||||
(if col (move-to-column col))
|
||||
(setq pos (point))
|
||||
|
||||
;; Enter electric debug mode, if not prohibited and not in
|
||||
;; enter electric debug mode, if not prohibited and not in
|
||||
;; it already
|
||||
(when (and (or
|
||||
(eq idlwave-shell-automatic-electric-debug t)
|
||||
(and
|
||||
(eq idlwave-shell-automatic-electric-debug 'breakpoint)
|
||||
(not (eq idlwave-shell-current-state 'error))))
|
||||
(not no-debug)
|
||||
(not idlwave-shell-suppress-electric-debug)
|
||||
(not idlwave-shell-electric-debug-mode))
|
||||
(idlwave-shell-electric-debug-mode)
|
||||
(setq electric t)))
|
||||
(when (and (not idlwave-shell-electric-debug-mode)
|
||||
(or (eq debug 'force)
|
||||
(and
|
||||
(not (eq debug 'disable)) ;; explicitly disabled
|
||||
(or
|
||||
(eq idlwave-shell-automatic-electric-debug t)
|
||||
(and
|
||||
(eq idlwave-shell-automatic-electric-debug
|
||||
'breakpoint)
|
||||
(not (eq idlwave-shell-current-state 'error))))
|
||||
(not idlwave-shell-suppress-electric-debug))))
|
||||
(idlwave-shell-electric-debug-mode t))
|
||||
(setq electric idlwave-shell-electric-debug-mode))
|
||||
|
||||
;; Make sure pos is really displayed in the window.
|
||||
(set-window-point window pos)
|
||||
|
||||
;; If we came from the shell, go back there. Otherwise select
|
||||
;; the window where the error is displayed.
|
||||
;; the window where the error/halt is displayed.
|
||||
(if (or (and idlwave-shell-electric-zap-to-file electric)
|
||||
(and (equal (buffer-name) (idlwave-shell-buffer))
|
||||
(not select-shell)))
|
||||
|
@ -2408,6 +2467,7 @@ debug mode."
|
|||
(interactive "p")
|
||||
(or (not arg) (< arg 1)
|
||||
(setq arg 1))
|
||||
(idlwave-shell-stop-line-pending)
|
||||
(idlwave-shell-send-command
|
||||
(concat ".s " (if (integerp arg) (int-to-string arg) arg))
|
||||
nil (if (idlwave-shell-hide-p 'debug) 'mostly) nil t))
|
||||
|
@ -2419,6 +2479,7 @@ Uses IDL's stepover executive command which does not enter called functions."
|
|||
(interactive "p")
|
||||
(or (not arg) (< arg 1)
|
||||
(setq arg 1))
|
||||
(idlwave-shell-stop-line-pending)
|
||||
(idlwave-shell-send-command
|
||||
(concat ".so " (if (integerp arg) (int-to-string arg) arg))
|
||||
nil (if (idlwave-shell-hide-p 'debug) 'mostly) nil t))
|
||||
|
@ -2462,13 +2523,13 @@ the problem with not being able to set the breakpoint."
|
|||
(beep)
|
||||
(y-or-n-p
|
||||
(concat "Okay to recompile file "
|
||||
(idlwave-shell-bp-get bp 'file) "? ")))
|
||||
(idlwave-shell-bp-get bp 'file) "?")))
|
||||
;; Recompile
|
||||
(progn
|
||||
;; Clean up before retrying
|
||||
(idlwave-shell-command-failure)
|
||||
(idlwave-shell-send-command
|
||||
(concat ".run " (idlwave-shell-bp-get bp 'file)) nil
|
||||
(concat ".run \"" (idlwave-shell-bp-get bp 'file) "\"") nil
|
||||
(if (idlwave-shell-hide-p 'run) 'mostly) nil t)
|
||||
;; Try setting breakpoint again
|
||||
(idlwave-shell-set-bp bp))
|
||||
|
@ -2496,6 +2557,7 @@ breakpoint can not be set."
|
|||
(defun idlwave-shell-cont (&optional no-show)
|
||||
"Continue executing."
|
||||
(interactive)
|
||||
(idlwave-shell-stop-line-pending)
|
||||
(idlwave-shell-send-command ".c" (unless no-show
|
||||
'(idlwave-shell-redisplay 'hide))
|
||||
(if (idlwave-shell-hide-p 'debug) 'mostly)
|
||||
|
@ -2504,6 +2566,7 @@ breakpoint can not be set."
|
|||
(defun idlwave-shell-go ()
|
||||
"Run .GO. This starts the main program of the last compiled file."
|
||||
(interactive)
|
||||
(idlwave-shell-stop-line-pending)
|
||||
(idlwave-shell-send-command ".go" '(idlwave-shell-redisplay 'hide)
|
||||
(if (idlwave-shell-hide-p 'debug) 'mostly)
|
||||
nil t))
|
||||
|
@ -2511,6 +2574,7 @@ breakpoint can not be set."
|
|||
(defun idlwave-shell-return ()
|
||||
"Run .RETURN (continue to next return, but stay in subprogram)."
|
||||
(interactive)
|
||||
(idlwave-shell-stop-line-pending)
|
||||
(idlwave-shell-send-command ".return" '(idlwave-shell-redisplay 'hide)
|
||||
(if (idlwave-shell-hide-p 'debug) 'mostly)
|
||||
nil t))
|
||||
|
@ -2518,6 +2582,7 @@ breakpoint can not be set."
|
|||
(defun idlwave-shell-skip ()
|
||||
"Run .SKIP (skip one line, then step)."
|
||||
(interactive)
|
||||
(idlwave-shell-stop-line-pending)
|
||||
(idlwave-shell-send-command ".skip" '(idlwave-shell-redisplay 'hide)
|
||||
(if (idlwave-shell-hide-p 'debug) 'mostly)
|
||||
nil t))
|
||||
|
@ -2603,6 +2668,7 @@ If ENABLE is non-nil, enable them instead."
|
|||
(defun idlwave-shell-to-here ()
|
||||
"Set a breakpoint with count 1 then continue."
|
||||
(interactive)
|
||||
;; temporarily disable all other breakpoints
|
||||
(let ((disabled (idlwave-shell-enable-all-bp 'disable 'no-update)))
|
||||
(idlwave-shell-break-here 1 nil nil nil 'no-show)
|
||||
(idlwave-shell-cont 'no-show)
|
||||
|
@ -2739,13 +2805,18 @@ Runs to the last statement and then steps 1 statement. Use the .out command."
|
|||
`(lambda (event)
|
||||
"Expansion function for expression examination."
|
||||
(interactive "e")
|
||||
(let ((transient-mark-mode t)
|
||||
(zmacs-regions t)
|
||||
(tracker (if (featurep 'xemacs)
|
||||
(if (fboundp 'default-mouse-track-event-is-with-button)
|
||||
'idlwave-xemacs-hack-mouse-track
|
||||
'mouse-track)
|
||||
'mouse-drag-region)))
|
||||
(let* ((drag-track (fboundp 'mouse-drag-track))
|
||||
(transient-mark-mode t)
|
||||
(zmacs-regions t)
|
||||
(tracker (if (featurep 'xemacs)
|
||||
(if (fboundp
|
||||
'default-mouse-track-event-is-with-button)
|
||||
'idlwave-xemacs-hack-mouse-track
|
||||
'mouse-track)
|
||||
;; Emacs 22 no longer completes the drag with
|
||||
;; mouse-drag-region, without an additional
|
||||
;; event. mouse-drag-track does so.
|
||||
(if drag-track 'mouse-drag-track 'mouse-drag-region))))
|
||||
(funcall tracker event)
|
||||
(idlwave-shell-print (if (idlwave-region-active-p) '(4) nil)
|
||||
,help ,ev))))
|
||||
|
@ -2756,8 +2827,9 @@ Runs to the last statement and then steps 1 statement. Use the .out command."
|
|||
t)
|
||||
|
||||
(defun idlwave-xemacs-hack-mouse-track (event)
|
||||
(if (featurep 'xemacs)
|
||||
(let ((oldfunc (symbol-function 'default-mouse-track-event-is-with-button)))
|
||||
(if (featurep 'xemacs)
|
||||
(let ((oldfunc (symbol-function
|
||||
'default-mouse-track-event-is-with-button)))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(fset 'default-mouse-track-event-is-with-button
|
||||
|
@ -2822,6 +2894,11 @@ idlw-shell-examine-alist from which to select the help command text.
|
|||
If instead COMPLETE-HELP-TYPE is non-nil, choose from
|
||||
idlw-shell-examine-alist via mini-buffer shortcut key."
|
||||
(interactive "P")
|
||||
|
||||
;; For speed: assume the helper routine hasn't been lost, e.g. with
|
||||
;; .FULL_RESET_SESSION. We'll recover if necessary
|
||||
(unless idlwave-idlwave_routine_info-compiled
|
||||
(idlwave-shell-compile-helper-routines))
|
||||
(save-excursion
|
||||
(let* ((process (get-buffer-process (current-buffer)))
|
||||
(process-mark (if process (process-mark process)))
|
||||
|
@ -2831,7 +2908,7 @@ idlw-shell-examine-alist via mini-buffer shortcut key."
|
|||
(format " [-%d:%s]"
|
||||
idlwave-shell-calling-stack-index
|
||||
idlwave-shell-calling-stack-routine)))
|
||||
expr beg end cmd examine-hook)
|
||||
expr beg end cmd)
|
||||
(cond
|
||||
((equal arg '(16))
|
||||
(setq expr (read-string "Expression: ")))
|
||||
|
@ -2874,10 +2951,6 @@ idlw-shell-examine-alist via mini-buffer shortcut key."
|
|||
(current-buffer))
|
||||
(add-hook 'pre-command-hook
|
||||
'idlwave-shell-delete-expression-overlay))
|
||||
(setq examine-hook
|
||||
(if idlwave-shell-separate-examine-output
|
||||
'idlwave-shell-examine-display
|
||||
'idlwave-shell-examine-highlight))
|
||||
(add-hook 'pre-command-hook
|
||||
'idlwave-shell-delete-output-overlay)
|
||||
|
||||
|
@ -2939,7 +3012,7 @@ idlw-shell-examine-alist via mini-buffer shortcut key."
|
|||
;;(idlwave-shell-recenter-shell-window)
|
||||
(idlwave-shell-send-command
|
||||
cmd
|
||||
examine-hook
|
||||
'idlwave-shell-check-compiled-and-display
|
||||
(if idlwave-shell-separate-examine-output 'hide))))))
|
||||
|
||||
(defvar idlwave-shell-examine-window-alist nil
|
||||
|
@ -2949,6 +3022,15 @@ idlw-shell-examine-alist via mini-buffer shortcut key."
|
|||
(define-key idlwave-shell-examine-map "q" 'idlwave-shell-examine-display-quit)
|
||||
(define-key idlwave-shell-examine-map "c" 'idlwave-shell-examine-display-clear)
|
||||
|
||||
|
||||
(defun idlwave-shell-check-compiled-and-display ()
|
||||
"Check examine output for warning about undefined procedure/function."
|
||||
(if (string-match "% Attempt to call undefined" idlwave-shell-command-output)
|
||||
(idlwave-shell-compile-helper-routines))
|
||||
(if idlwave-shell-separate-examine-output
|
||||
(idlwave-shell-examine-display)
|
||||
(idlwave-shell-examine-highlight)))
|
||||
|
||||
(defun idlwave-shell-examine-display ()
|
||||
"View the examine command output in a separate buffer."
|
||||
(let (win cur-beg cur-end)
|
||||
|
@ -3121,13 +3203,16 @@ HELP can be non-nil for `help,', nil for 'print,' or any string into which
|
|||
to insert expression in place of the marker ___, e.g.: print,
|
||||
size(___,/DIMENSIONS)"
|
||||
(cond
|
||||
((null help) (concat "print, " expr))
|
||||
((null help)
|
||||
(concat "idlwave_print_safe, " expr ","
|
||||
(number-to-string idlwave-shell-max-print-length)))
|
||||
((stringp help)
|
||||
(if (string-match "\\(^\\|[^_]\\)\\(___\\)\\([^_]\\|$\\)" help)
|
||||
(concat (substring help 0 (match-beginning 2))
|
||||
expr
|
||||
(substring help (match-end 2)))))
|
||||
(t (concat "help, " expr))))
|
||||
(t
|
||||
(concat "help, " expr))))
|
||||
|
||||
|
||||
(defun idlwave-shell-examine-highlight ()
|
||||
|
@ -3221,7 +3306,8 @@ If there is a prefix argument, display IDL process."
|
|||
(idlwave-look-at "\\<end\\>")))
|
||||
(insert "\nend\n"))
|
||||
(save-buffer 0)))
|
||||
(idlwave-shell-send-command (concat ".run " idlwave-shell-temp-pro-file)
|
||||
(idlwave-shell-send-command (concat ".run \""
|
||||
idlwave-shell-temp-pro-file "\"")
|
||||
nil
|
||||
(if (idlwave-shell-hide-p 'run) 'mostly)
|
||||
nil t)
|
||||
|
@ -3822,8 +3908,11 @@ handled by this command."
|
|||
((eq action 'compile) ".compile ")
|
||||
((eq action 'batch) "@")
|
||||
(t (error "Unknown action %s" action)))
|
||||
idlwave-shell-last-save-and-action-file)
|
||||
'idlwave-shell-maybe-update-routine-info
|
||||
"\""
|
||||
idlwave-shell-last-save-and-action-file
|
||||
"\"")
|
||||
`(idlwave-shell-maybe-update-routine-info nil
|
||||
,idlwave-shell-last-save-and-action-file)
|
||||
(if (idlwave-shell-hide-p 'run) 'mostly) nil t)
|
||||
(idlwave-shell-bp-query))
|
||||
(let ((msg (format "No such file %s"
|
||||
|
@ -3831,14 +3920,14 @@ handled by this command."
|
|||
(setq idlwave-shell-last-save-and-action-file nil)
|
||||
(error msg))))
|
||||
|
||||
(defun idlwave-shell-maybe-update-routine-info (&optional wait)
|
||||
(defun idlwave-shell-maybe-update-routine-info (&optional wait file)
|
||||
"Update the routine info if the shell is not stopped at an error."
|
||||
(if (and (not idlwave-shell-is-stopped)
|
||||
(or (eq t idlwave-auto-routine-info-updates)
|
||||
(memq 'compile-buffer idlwave-auto-routine-info-updates))
|
||||
idlwave-query-shell-for-routine-info
|
||||
idlwave-routines)
|
||||
(idlwave-shell-update-routine-info t nil wait)))
|
||||
(idlwave-shell-update-routine-info t nil wait file)))
|
||||
|
||||
(defvar idlwave-shell-sources-query "help,/source,/full"
|
||||
"IDL command to obtain source files for compiled procedures.")
|
||||
|
@ -3983,7 +4072,7 @@ list elements of the form:
|
|||
(setq idlwave-shell-error-last (point)))
|
||||
(if frame
|
||||
(progn
|
||||
(idlwave-shell-display-line frame col 'no-debug))
|
||||
(idlwave-shell-display-line frame col 'disable))
|
||||
(beep)
|
||||
(message "No more errors."))))
|
||||
|
||||
|
@ -4158,6 +4247,8 @@ Otherwise, just expand the file name."
|
|||
'idlwave-shell-stack-down)
|
||||
(define-key idlwave-shell-electric-debug-mode-map "_"
|
||||
'idlwave-shell-stack-down)
|
||||
(define-key idlwave-shell-electric-debug-mode-map "e"
|
||||
'(lambda () (interactive) (idlwave-shell-print '(16))))
|
||||
(define-key idlwave-shell-electric-debug-mode-map "q" 'idlwave-shell-retall)
|
||||
(define-key idlwave-shell-electric-debug-mode-map "t"
|
||||
'(lambda () (interactive) (idlwave-shell-send-command "help,/TRACE")))
|
||||
|
@ -4181,9 +4272,11 @@ Otherwise, just expand the file name."
|
|||
;; session until we return or hit $MAIN$. Cancel this suppression
|
||||
;; if it's explicitly turned on.
|
||||
(if idlwave-shell-electric-debug-mode
|
||||
(setq idlwave-shell-suppress-electric-debug t)
|
||||
(setq idlwave-shell-suppress-electric-debug nil))
|
||||
(idlwave-shell-electric-debug-mode))
|
||||
(progn ;; Turn it off, and make sure it stays off.
|
||||
(setq idlwave-shell-suppress-electric-debug t)
|
||||
(idlwave-shell-electric-debug-mode 0))
|
||||
(setq idlwave-shell-suppress-electric-debug nil)
|
||||
(idlwave-shell-electric-debug-mode t)))
|
||||
|
||||
(defvar idlwave-shell-electric-debug-read-only)
|
||||
(defvar idlwave-shell-electric-debug-buffers nil)
|
||||
|
@ -4196,9 +4289,9 @@ Null prefix argument turns off the mode.
|
|||
|
||||
When Electric Debug mode is enabled, the many debugging commands are
|
||||
available as single key sequences."
|
||||
nil
|
||||
" *Debugging*"
|
||||
idlwave-shell-electric-debug-mode-map)
|
||||
nil
|
||||
" *Debugging*"
|
||||
idlwave-shell-electric-debug-mode-map)
|
||||
|
||||
(add-hook
|
||||
'idlwave-shell-electric-debug-mode-on-hook
|
||||
|
@ -4249,7 +4342,7 @@ available as single key sequences."
|
|||
(when (and (eq major-mode 'idlwave-mode)
|
||||
buffer-file-name
|
||||
idlwave-shell-electric-debug-mode)
|
||||
(idlwave-shell-electric-debug-mode))))))
|
||||
(idlwave-shell-electric-debug-mode 0))))))
|
||||
(setq idlwave-shell-electric-debug-buffers nil))
|
||||
|
||||
;; Show the help text
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
;;; idlw-toolbar.el --- a debugging toolbar for IDLWAVE
|
||||
;; Copyright (c) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
;; Free Software Foundation, Inc.
|
||||
;; Free Software Foundation
|
||||
|
||||
;; Author: Carsten Dominik <dominik@astro.uva.nl>
|
||||
;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu>
|
||||
;; Version: 5.7_22
|
||||
;; Version: 6.0_em22
|
||||
;; Keywords: processes
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
@ -43,8 +43,8 @@
|
|||
(toolbar-make-button-list image)
|
||||
(list 'image :type 'xpm :data image)))
|
||||
|
||||
(defvar default-toolbar)
|
||||
(defvar idlwave-toolbar)
|
||||
(defvar default-toolbar)
|
||||
(defvar idlwave-toolbar-is-possible)
|
||||
|
||||
(if (not (or (and (featurep 'xemacs) ; This is XEmacs
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1165,7 +1165,7 @@ IGNORE other arguments."
|
|||
:button-prefix ""
|
||||
:button-suffix ""
|
||||
:button-face default
|
||||
:format "%[%t%]\n"
|
||||
:format "%[%t\n%]"
|
||||
:help-echo ,(concat "Open " (cdr menu-element))
|
||||
:action recentf-open-files-action
|
||||
,(cdr menu-element))))
|
||||
|
|
25
lisp/rect.el
25
lisp/rect.el
|
@ -141,8 +141,7 @@ the function is called."
|
|||
;; else
|
||||
(setq pt (point))
|
||||
(move-to-column endcol t)
|
||||
(setcdr lines (cons (buffer-substring pt (point)) (cdr lines)))
|
||||
(delete-region pt (point)))
|
||||
(setcdr lines (cons (filter-buffer-substring pt (point) t) (cdr lines))))
|
||||
))
|
||||
|
||||
;; ### NOTE: this is actually the only function that needs to do complicated
|
||||
|
@ -233,12 +232,22 @@ When called from a program the rectangle's corners are START and END.
|
|||
You might prefer to use `delete-extract-rectangle' from a program.
|
||||
|
||||
With a prefix (or a FILL) argument, also fill lines where nothing has to be
|
||||
deleted."
|
||||
(interactive "*r\nP")
|
||||
(when buffer-read-only
|
||||
(setq killed-rectangle (extract-rectangle start end))
|
||||
(barf-if-buffer-read-only))
|
||||
(setq killed-rectangle (delete-extract-rectangle start end fill)))
|
||||
deleted.
|
||||
|
||||
If the buffer is read-only, Emacs will beep and refrain from deleting
|
||||
the rectangle, but put it in the kill ring anyway. This means that
|
||||
you can use this command to copy text from a read-only buffer.
|
||||
\(If the variable `kill-read-only-ok' is non-nil, then this won't
|
||||
even beep.)"
|
||||
(interactive "r\nP")
|
||||
(condition-case nil
|
||||
(setq killed-rectangle (delete-extract-rectangle start end fill))
|
||||
((buffer-read-only text-read-only)
|
||||
(setq killed-rectangle (extract-rectangle start end))
|
||||
(if kill-read-only-ok
|
||||
(progn (message "Read only text copied to kill ring") nil)
|
||||
(barf-if-buffer-read-only)
|
||||
(signal 'text-read-only (list (current-buffer)))))))
|
||||
|
||||
;; this one is untouched --dv
|
||||
;;;###autoload
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
|
||||
(defgroup savehist nil
|
||||
"Save minibuffer history."
|
||||
:version "22.1"
|
||||
:group 'minibuffer)
|
||||
|
||||
;;;###autoload
|
||||
|
@ -91,6 +92,11 @@ minibuffer histories, such as `compile-command' or `kill-ring'."
|
|||
:type '(repeat variable)
|
||||
:group 'savehist)
|
||||
|
||||
(defcustom savehist-ignored-variables nil ;; '(command-history)
|
||||
"*List of additional variables not to save."
|
||||
:type '(repeat variable)
|
||||
:group 'savehist)
|
||||
|
||||
(defcustom savehist-file
|
||||
(cond
|
||||
;; Backward compatibility with previous versions of savehist.
|
||||
|
@ -371,9 +377,10 @@ trimming of history lists to `history-length' items."
|
|||
(error nil))))))
|
||||
|
||||
(defun savehist-minibuffer-hook ()
|
||||
;; XEmacs sets minibuffer-history-variable to t to mean "no history
|
||||
;; is being recorded".
|
||||
(unless (eq minibuffer-history-variable t)
|
||||
(unless (or (eq minibuffer-history-variable t)
|
||||
;; XEmacs sets minibuffer-history-variable to t to mean "no
|
||||
;; history is being recorded".
|
||||
(memq minibuffer-history-variable savehist-ignored-variables))
|
||||
(add-to-list 'savehist-minibuffer-history-variables
|
||||
minibuffer-history-variable)))
|
||||
|
||||
|
|
|
@ -1050,7 +1050,10 @@ display the result of expression evaluation."
|
|||
Value is also consed on to front of the variable `values'.
|
||||
Optional argument EVAL-EXPRESSION-INSERT-VALUE, if non-nil, means
|
||||
insert the result into the current buffer instead of printing it in
|
||||
the echo area."
|
||||
the echo area.
|
||||
|
||||
If `eval-expression-debug-on-error' is non-nil, which is the default,
|
||||
this command arranges for all errors to enter the debugger."
|
||||
(interactive
|
||||
(list (read-from-minibuffer "Eval: "
|
||||
nil read-expression-map t
|
||||
|
|
63
lisp/sort.el
63
lisp/sort.el
|
@ -121,9 +121,6 @@ it defaults to `<', otherwise it defaults to `string<'."
|
|||
(defun sort-build-lists (nextrecfun endrecfun startkeyfun endkeyfun)
|
||||
(let ((sort-lists ())
|
||||
(start-rec nil)
|
||||
;; To avoid such functins as `end-of-line' being affected by
|
||||
;; fields.
|
||||
(inhibit-field-text-motion t)
|
||||
done key)
|
||||
;; Loop over sort records.
|
||||
;(goto-char (point-min)) -- it is the caller's responsibility to
|
||||
|
@ -205,7 +202,9 @@ the sort order."
|
|||
(save-restriction
|
||||
(narrow-to-region beg end)
|
||||
(goto-char (point-min))
|
||||
(sort-subr reverse 'forward-line 'end-of-line))))
|
||||
(let ;; To make `end-of-line' and etc. to ignore fields.
|
||||
((inhibit-field-text-motion t))
|
||||
(sort-subr reverse 'forward-line 'end-of-line)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun sort-paragraphs (reverse beg end)
|
||||
|
@ -271,25 +270,27 @@ With a negative arg, sorts by the ARGth field counted from the right.
|
|||
Called from a program, there are three arguments:
|
||||
FIELD, BEG and END. BEG and END specify region to sort."
|
||||
(interactive "p\nr")
|
||||
(sort-fields-1 field beg end
|
||||
(lambda ()
|
||||
(sort-skip-fields field)
|
||||
(let* ((case-fold-search t)
|
||||
(base
|
||||
(if (looking-at "\\(0x\\)[0-9a-f]\\|\\(0\\)[0-7]")
|
||||
(cond ((match-beginning 1)
|
||||
(goto-char (match-end 1))
|
||||
16)
|
||||
((match-beginning 2)
|
||||
(goto-char (match-end 2))
|
||||
8)
|
||||
(t nil)))))
|
||||
(string-to-number (buffer-substring (point)
|
||||
(save-excursion
|
||||
(forward-sexp 1)
|
||||
(point)))
|
||||
(or base sort-numeric-base))))
|
||||
nil))
|
||||
(let ;; To make `end-of-line' and etc. to ignore fields.
|
||||
((inhibit-field-text-motion t))
|
||||
(sort-fields-1 field beg end
|
||||
(lambda ()
|
||||
(sort-skip-fields field)
|
||||
(let* ((case-fold-search t)
|
||||
(base
|
||||
(if (looking-at "\\(0x\\)[0-9a-f]\\|\\(0\\)[0-7]")
|
||||
(cond ((match-beginning 1)
|
||||
(goto-char (match-end 1))
|
||||
16)
|
||||
((match-beginning 2)
|
||||
(goto-char (match-end 2))
|
||||
8)
|
||||
(t nil)))))
|
||||
(string-to-number (buffer-substring (point)
|
||||
(save-excursion
|
||||
(forward-sexp 1)
|
||||
(point)))
|
||||
(or base sort-numeric-base))))
|
||||
nil)))
|
||||
|
||||
;;;;;###autoload
|
||||
;;(defun sort-float-fields (field beg end)
|
||||
|
@ -322,11 +323,13 @@ FIELD, BEG and END. BEG and END specify region to sort.
|
|||
The variable `sort-fold-case' determines whether alphabetic case affects
|
||||
the sort order."
|
||||
(interactive "p\nr")
|
||||
(sort-fields-1 field beg end
|
||||
(function (lambda ()
|
||||
(sort-skip-fields field)
|
||||
nil))
|
||||
(function (lambda () (skip-chars-forward "^ \t\n")))))
|
||||
(let ;; To make `end-of-line' and etc. to ignore fields.
|
||||
((inhibit-field-text-motion t))
|
||||
(sort-fields-1 field beg end
|
||||
(function (lambda ()
|
||||
(sort-skip-fields field)
|
||||
nil))
|
||||
(function (lambda () (skip-chars-forward "^ \t\n"))))))
|
||||
|
||||
(defun sort-fields-1 (field beg end startkeyfun endkeyfun)
|
||||
(let ((tbl (syntax-table)))
|
||||
|
@ -471,7 +474,9 @@ it uses the `sort' utility program, which doesn't understand tabs.
|
|||
Use \\[untabify] to convert tabs to spaces before sorting."
|
||||
(interactive "P\nr")
|
||||
(save-excursion
|
||||
(let (beg1 end1 col-beg1 col-end1 col-start col-end)
|
||||
(let ;; To make `end-of-line' and etc. to ignore fields.
|
||||
((inhibit-field-text-motion t)
|
||||
beg1 end1 col-beg1 col-end1 col-start col-end)
|
||||
(goto-char (min beg end))
|
||||
(setq col-beg1 (current-column))
|
||||
(beginning-of-line)
|
||||
|
|
177
lisp/startup.el
177
lisp/startup.el
|
@ -1337,6 +1337,7 @@ mouse."
|
|||
(fancy-splash-outer-buffer (current-buffer))
|
||||
splash-buffer
|
||||
(old-minor-mode-map-alist minor-mode-map-alist)
|
||||
(old-emulation-mode-map-alists emulation-mode-map-alists)
|
||||
(frame (fancy-splash-frame))
|
||||
timer)
|
||||
(save-selected-window
|
||||
|
@ -1355,6 +1356,7 @@ mouse."
|
|||
(setq cursor-type nil
|
||||
display-hourglass nil
|
||||
minor-mode-map-alist nil
|
||||
emulation-mode-map-alists nil
|
||||
buffer-undo-list t
|
||||
mode-line-format (propertize "---- %b %-"
|
||||
'face '(:weight bold))
|
||||
|
@ -1366,7 +1368,8 @@ mouse."
|
|||
(recursive-edit))
|
||||
(cancel-timer timer)
|
||||
(setq display-hourglass old-hourglass
|
||||
minor-mode-map-alist old-minor-mode-map-alist)
|
||||
minor-mode-map-alist old-minor-mode-map-alist
|
||||
emulation-mode-map-alists old-emulation-mode-map-alists)
|
||||
(kill-buffer splash-buffer))))))
|
||||
|
||||
(defun fancy-splash-frame ()
|
||||
|
@ -1403,31 +1406,31 @@ we put it on this frame."
|
|||
(let ((prev-buffer (current-buffer)))
|
||||
(unwind-protect
|
||||
(with-current-buffer (get-buffer-create "GNU Emacs")
|
||||
(let ((tab-width 8)
|
||||
(mode-line-format (propertize "---- %b %-"
|
||||
'face '(:weight bold))))
|
||||
(set (make-local-variable 'tab-width) 8)
|
||||
(set (make-local-variable 'mode-line-format)
|
||||
(propertize "---- %b %-" 'face '(:weight bold)))
|
||||
|
||||
(if pure-space-overflow
|
||||
(insert "Warning Warning Pure space overflow Warning Warning\n"))
|
||||
(if pure-space-overflow
|
||||
(insert "Warning Warning Pure space overflow Warning Warning\n"))
|
||||
|
||||
;; The convention for this piece of code is that
|
||||
;; each piece of output starts with one or two newlines
|
||||
;; and does not end with any newlines.
|
||||
(insert "Welcome to GNU Emacs")
|
||||
(insert
|
||||
(if (eq system-type 'gnu/linux)
|
||||
", one component of the GNU/Linux operating system.\n"
|
||||
", a part of the GNU operating system.\n"))
|
||||
;; The convention for this piece of code is that
|
||||
;; each piece of output starts with one or two newlines
|
||||
;; and does not end with any newlines.
|
||||
(insert "Welcome to GNU Emacs")
|
||||
(insert
|
||||
(if (eq system-type 'gnu/linux)
|
||||
", one component of the GNU/Linux operating system.\n"
|
||||
", a part of the GNU operating system.\n"))
|
||||
|
||||
(unless (equal (buffer-name prev-buffer) "*scratch*")
|
||||
(insert (substitute-command-keys
|
||||
"\nType \\[recenter] to begin editing your file.\n")))
|
||||
(unless (equal (buffer-name prev-buffer) "*scratch*")
|
||||
(insert (substitute-command-keys
|
||||
"\nType \\[recenter] to begin editing your file.\n")))
|
||||
|
||||
(if (display-mouse-p)
|
||||
;; The user can use the mouse to activate menus
|
||||
;; so give help in terms of menu items.
|
||||
(progn
|
||||
(insert "\
|
||||
(if (display-mouse-p)
|
||||
;; The user can use the mouse to activate menus
|
||||
;; so give help in terms of menu items.
|
||||
(progn
|
||||
(insert "\
|
||||
You can do basic editing with the menu bar and scroll bar using the mouse.
|
||||
|
||||
Useful File menu items:
|
||||
|
@ -1443,101 +1446,109 @@ Copying Conditions Conditions for redistributing and changing Emacs
|
|||
Getting New Versions How to obtain the latest version of Emacs
|
||||
More Manuals / Ordering Manuals How to order printed manuals from the FSF
|
||||
")
|
||||
(insert "\n\n" (emacs-version)
|
||||
"
|
||||
(insert "\n\n" (emacs-version)
|
||||
"
|
||||
Copyright (C) 2006 Free Software Foundation, Inc."))
|
||||
|
||||
;; No mouse menus, so give help using kbd commands.
|
||||
;; No mouse menus, so give help using kbd commands.
|
||||
|
||||
;; If keys have their default meanings,
|
||||
;; use precomputed string to save lots of time.
|
||||
(if (and (eq (key-binding "\C-h") 'help-command)
|
||||
(eq (key-binding "\C-xu") 'advertised-undo)
|
||||
(eq (key-binding "\C-x\C-c") 'save-buffers-kill-emacs)
|
||||
(eq (key-binding "\C-ht") 'help-with-tutorial)
|
||||
(eq (key-binding "\C-hi") 'info)
|
||||
(eq (key-binding "\C-hr") 'info-emacs-manual)
|
||||
(eq (key-binding "\C-h\C-n") 'view-emacs-news))
|
||||
(insert "
|
||||
;; If keys have their default meanings,
|
||||
;; use precomputed string to save lots of time.
|
||||
(if (and (eq (key-binding "\C-h") 'help-command)
|
||||
(eq (key-binding "\C-xu") 'advertised-undo)
|
||||
(eq (key-binding "\C-x\C-c") 'save-buffers-kill-emacs)
|
||||
(eq (key-binding "\C-ht") 'help-with-tutorial)
|
||||
(eq (key-binding "\C-hi") 'info)
|
||||
(eq (key-binding "\C-hr") 'info-emacs-manual)
|
||||
(eq (key-binding "\C-h\C-n") 'view-emacs-news))
|
||||
(insert "
|
||||
Get help C-h (Hold down CTRL and press h)
|
||||
Emacs manual C-h r
|
||||
Emacs tutorial C-h t Undo changes C-x u
|
||||
Buy manuals C-h C-m Exit Emacs C-x C-c
|
||||
Browse manuals C-h i")
|
||||
|
||||
(insert (substitute-command-keys
|
||||
(format "\n
|
||||
(insert (substitute-command-keys
|
||||
(format "\n
|
||||
Get help %s
|
||||
Emacs manual \\[info-emacs-manual]
|
||||
Emacs tutorial \\[help-with-tutorial]\tUndo changes\t\\[advertised-undo]
|
||||
Buy manuals \\[view-order-manuals]\tExit Emacs\t\\[save-buffers-kill-emacs]
|
||||
Browse manuals \\[info]"
|
||||
(let ((where (where-is-internal
|
||||
'help-command nil t)))
|
||||
(if where
|
||||
(key-description where)
|
||||
"M-x help"))))))
|
||||
(let ((where (where-is-internal
|
||||
'help-command nil t)))
|
||||
(if where
|
||||
(key-description where)
|
||||
"M-x help"))))))
|
||||
|
||||
;; Say how to use the menu bar with the keyboard.
|
||||
(if (and (eq (key-binding "\M-`") 'tmm-menubar)
|
||||
(eq (key-binding [f10]) 'tmm-menubar))
|
||||
(insert "
|
||||
;; Say how to use the menu bar with the keyboard.
|
||||
(if (and (eq (key-binding "\M-`") 'tmm-menubar)
|
||||
(eq (key-binding [f10]) 'tmm-menubar))
|
||||
(insert "
|
||||
Activate menubar F10 or ESC ` or M-`")
|
||||
(insert (substitute-command-keys "
|
||||
(insert (substitute-command-keys "
|
||||
Activate menubar \\[tmm-menubar]")))
|
||||
|
||||
;; Many users seem to have problems with these.
|
||||
(insert "
|
||||
;; Many users seem to have problems with these.
|
||||
(insert "
|
||||
\(`C-' means use the CTRL key. `M-' means use the Meta (or Alt) key.
|
||||
If you have no Meta key, you may instead type ESC followed by the character.)")
|
||||
|
||||
(insert "\n\n" (emacs-version)
|
||||
"
|
||||
(insert "\n\n" (emacs-version)
|
||||
"
|
||||
Copyright (C) 2006 Free Software Foundation, Inc.")
|
||||
|
||||
(if (and (eq (key-binding "\C-h\C-c") 'describe-copying)
|
||||
(eq (key-binding "\C-h\C-d") 'describe-distribution)
|
||||
(eq (key-binding "\C-h\C-w") 'describe-no-warranty))
|
||||
(insert
|
||||
"\n
|
||||
(if (and (eq (key-binding "\C-h\C-c") 'describe-copying)
|
||||
(eq (key-binding "\C-h\C-d") 'describe-distribution)
|
||||
(eq (key-binding "\C-h\C-w") 'describe-no-warranty))
|
||||
(insert
|
||||
"\n
|
||||
GNU Emacs comes with ABSOLUTELY NO WARRANTY; type C-h C-w for full details.
|
||||
Emacs is Free Software--Free as in Freedom--so you can redistribute copies
|
||||
of Emacs and modify it; type C-h C-c to see the conditions.
|
||||
Type C-h C-d for information on getting the latest version.")
|
||||
(insert (substitute-command-keys
|
||||
"\n
|
||||
(insert (substitute-command-keys
|
||||
"\n
|
||||
GNU Emacs comes with ABSOLUTELY NO WARRANTY; type \\[describe-no-warranty] for full details.
|
||||
Emacs is Free Software--Free as in Freedom--so you can redistribute copies
|
||||
of Emacs and modify it; type \\[describe-copying] to see the conditions.
|
||||
Type \\[describe-distribution] for information on getting the latest version."))))
|
||||
|
||||
;; The rest of the startup screen is the same on all
|
||||
;; kinds of terminals.
|
||||
;; The rest of the startup screen is the same on all
|
||||
;; kinds of terminals.
|
||||
|
||||
;; Give information on recovering, if there was a crash.
|
||||
(and auto-save-list-file-prefix
|
||||
;; Don't signal an error if the
|
||||
;; directory for auto-save-list files
|
||||
;; does not yet exist.
|
||||
(file-directory-p (file-name-directory
|
||||
auto-save-list-file-prefix))
|
||||
(directory-files
|
||||
(file-name-directory auto-save-list-file-prefix)
|
||||
nil
|
||||
(concat "\\`"
|
||||
(regexp-quote (file-name-nondirectory
|
||||
auto-save-list-file-prefix)))
|
||||
t)
|
||||
(insert "\n\nIf an Emacs session crashed recently, "
|
||||
"type M-x recover-session RET\nto recover"
|
||||
" the files you were editing."))
|
||||
;; Give information on recovering, if there was a crash.
|
||||
(and auto-save-list-file-prefix
|
||||
;; Don't signal an error if the
|
||||
;; directory for auto-save-list files
|
||||
;; does not yet exist.
|
||||
(file-directory-p (file-name-directory
|
||||
auto-save-list-file-prefix))
|
||||
(directory-files
|
||||
(file-name-directory auto-save-list-file-prefix)
|
||||
nil
|
||||
(concat "\\`"
|
||||
(regexp-quote (file-name-nondirectory
|
||||
auto-save-list-file-prefix)))
|
||||
t)
|
||||
(insert "\n\nIf an Emacs session crashed recently, "
|
||||
"type M-x recover-session RET\nto recover"
|
||||
" the files you were editing."))
|
||||
|
||||
;; Display the input that we set up in the buffer.
|
||||
(set-buffer-modified-p nil)
|
||||
(goto-char (point-min))
|
||||
(save-window-excursion
|
||||
(switch-to-buffer (current-buffer))
|
||||
(sit-for 120))))
|
||||
;; Display the input that we set up in the buffer.
|
||||
(set-buffer-modified-p nil)
|
||||
(goto-char (point-min))
|
||||
(save-window-excursion
|
||||
(condition-case nil
|
||||
(switch-to-buffer (current-buffer))
|
||||
;; In case we're in a dedicated or minibuffer-only window.
|
||||
(error
|
||||
;; There's no point is using pop-to-buffer since creating
|
||||
;; a new frame will generate enough events that the
|
||||
;; subsequent `sit-for' will immediately return anyway.
|
||||
;; (pop-to-buffer (current-buffer))
|
||||
))
|
||||
(sit-for 120)))
|
||||
;; Unwind ... ensure splash buffer is killed
|
||||
(kill-buffer "GNU Emacs"))))
|
||||
|
||||
|
|
|
@ -1916,6 +1916,12 @@ a system-dependent default device name is used."
|
|||
"\\" (substring argument end (1+ end)))
|
||||
start (1+ end)))
|
||||
(concat result (substring argument start)))))))
|
||||
|
||||
(defun string-or-null-p (object)
|
||||
"Return t if OBJECT is a string or nil.
|
||||
Otherwise, return nil."
|
||||
(or (stringp object) (null object)))
|
||||
|
||||
|
||||
;;;; Support for yanking and text properties.
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ A value of nil means that any change in indentation starts a new paragraph."
|
|||
"*Non-nil means put two spaces after a colon when filling."
|
||||
:type 'boolean
|
||||
:group 'fill)
|
||||
;;;###autoload(put 'colon-double-space 'safe-local-variable t)
|
||||
|
||||
(defvar fill-paragraph-function nil
|
||||
"Mode-specific function to fill a paragraph, or nil if there is none.
|
||||
|
|
|
@ -267,6 +267,7 @@ Warning! Not checking comments, when a comment start is embedded in strings,
|
|||
may produce undesired results."
|
||||
:type '(choice (const exclusive) (const :tag "off" nil) (const :tag "on" t))
|
||||
:group 'ispell)
|
||||
;;;###autoload(put 'ispell-check-comments 'safe-local-variable (lambda (a) (memq a '(nil t exclusive))))
|
||||
|
||||
(defcustom ispell-query-replace-choices nil
|
||||
"*Corrections made throughout region when non-nil.
|
||||
|
@ -461,6 +462,7 @@ is automatically set when defined in the file with either
|
|||
:type '(choice string
|
||||
(const :tag "default" nil))
|
||||
:group 'ispell)
|
||||
;;;###autoload(put 'ispell-local-dictionary 'safe-local-variable 'string-or-null-p)
|
||||
|
||||
(make-variable-buffer-local 'ispell-local-dictionary)
|
||||
|
||||
|
|
|
@ -98,6 +98,7 @@ If the variable `use-hard-newlines' is non-nil, then only lines following a
|
|||
hard newline are considered to match."
|
||||
:group 'paragraphs
|
||||
:type 'regexp)
|
||||
;;;###autoload(put 'paragraph-start 'safe-local-variable 'stringp)
|
||||
|
||||
;; paragraph-start requires a hard newline, but paragraph-separate does not:
|
||||
;; It is assumed that paragraph-separate is distinctive enough to be believed
|
||||
|
@ -115,6 +116,7 @@ ensures that the paragraph functions will work equally within a region of
|
|||
text indented by a margin setting."
|
||||
:group 'paragraphs
|
||||
:type 'regexp)
|
||||
;;;###autoload(put 'paragraph-separate 'safe-local-variable 'stringp)
|
||||
|
||||
(defcustom sentence-end-double-space t
|
||||
"*Non-nil means a single space does not end a sentence.
|
||||
|
@ -126,6 +128,7 @@ regexp describing the end of a sentence, when the value of the variable
|
|||
`sentence-end' is nil. See Info node `(elisp)Standard Regexps'."
|
||||
:type 'boolean
|
||||
:group 'fill)
|
||||
;;;###autoload(put 'sentence-end-double-space 'safe-local-variable t)
|
||||
|
||||
(defcustom sentence-end-without-period nil
|
||||
"*Non-nil means a sentence will end without a period.
|
||||
|
@ -137,6 +140,7 @@ regexp describing the end of a sentence, when the value of the variable
|
|||
`sentence-end' is nil. See Info node `(elisp)Standard Regexps'."
|
||||
:type 'boolean
|
||||
:group 'fill)
|
||||
;;;###autoload(put 'sentence-end-without-period 'safe-local-variable t)
|
||||
|
||||
(defcustom sentence-end-without-space
|
||||
"$B!#!%!)!*$A!##.#?#!$(0!$!%!)!*$(G!$!%!)!*(B"
|
||||
|
@ -147,6 +151,7 @@ regexp describing the end of a sentence, when the value of the variable
|
|||
`sentence-end' is nil. See Info node `(elisp)Standard Regexps'."
|
||||
:group 'paragraphs
|
||||
:type 'string)
|
||||
;;;###autoload(put 'sentence-end-without-space 'safe-local-variable t)
|
||||
|
||||
(defcustom sentence-end nil
|
||||
"*Regexp describing the end of a sentence.
|
||||
|
@ -158,12 +163,14 @@ function `sentence-end'. You should always use this function
|
|||
to obtain the value of this variable."
|
||||
:group 'paragraphs
|
||||
:type '(choice regexp (const :tag "Use default value" nil)))
|
||||
;;;###autoload(put 'sentence-end 'safe-local-variable 'string-or-null-p)
|
||||
|
||||
(defcustom sentence-end-base "[.?!][]\"'$B!I$,1r}(B)}]*"
|
||||
"*Regexp matching the basic end of a sentence, not including following space."
|
||||
:group 'paragraphs
|
||||
:type 'string
|
||||
:version "22.1")
|
||||
;;;###autoload(put 'sentence-end-base 'safe-local-variable 'stringp)
|
||||
|
||||
(defun sentence-end ()
|
||||
"Return the regexp describing the end of a sentence.
|
||||
|
@ -191,12 +198,14 @@ in between. See Info node `(elisp)Standard Regexps'."
|
|||
"*Regexp describing line-beginnings that separate pages."
|
||||
:group 'paragraphs
|
||||
:type 'regexp)
|
||||
;;;###autoload(put 'page-delimiter 'safe-local-variable t)
|
||||
|
||||
(defcustom paragraph-ignore-fill-prefix nil
|
||||
"*Non-nil means the paragraph commands are not affected by `fill-prefix'.
|
||||
This is desirable in modes where blank lines are the paragraph delimiters."
|
||||
:group 'paragraphs
|
||||
:type 'boolean)
|
||||
;;;###autoload(put 'paragraph-ignore-fill-prefix 'safe-local-variable t)
|
||||
|
||||
(defun forward-paragraph (&optional arg)
|
||||
"Move forward to end of paragraph.
|
||||
|
|
|
@ -948,6 +948,7 @@ Instead of nil or t, this may also be a string of type letters indicating
|
|||
the label types for which it should be true."
|
||||
:group 'reftex-referencing-labels
|
||||
:type `(choice :tag "\\vref is default macro" ,@reftex-tmp))
|
||||
;;;###autoload(put 'reftex-vref-is-default 'safe-local-variable t)
|
||||
|
||||
(defcustom reftex-fref-is-default nil
|
||||
"*Non-nil means, the fancyref macro \\fref is used as default.
|
||||
|
@ -958,11 +959,13 @@ Instead of nil or t, this may also be a string of type letters indicating
|
|||
the label types for which it should be true."
|
||||
:group 'reftex-referencing-labels
|
||||
:type `(choice :tag "\\fref is default macro" ,@reftex-tmp))
|
||||
;;;###autoload(put 'reftex-fref-is-default 'safe-local-variable t)
|
||||
|
||||
(defcustom reftex-level-indent 2
|
||||
"*Number of spaces to be used for indentation per section level."
|
||||
:group 'reftex-referencing-labels
|
||||
:type 'integer)
|
||||
;;;###autoload(put 'reftex-level-indent 'safe-local-variable 'integerp)
|
||||
|
||||
(defcustom reftex-guess-label-type t
|
||||
"*Non-nil means, `reftex-reference' will try to guess the label type.
|
||||
|
@ -972,6 +975,7 @@ immediately offer the correct label menu - otherwise it will prompt you for
|
|||
a label type. If you set this variable to nil, RefTeX will always prompt."
|
||||
:group 'reftex-referencing-labels
|
||||
:type 'boolean)
|
||||
;;;###autoload(put 'reftex-guess-label-type 'safe-local-variable t)
|
||||
|
||||
(defcustom reftex-format-ref-function nil
|
||||
"Function which produces the string to insert as a reference.
|
||||
|
|
|
@ -381,7 +381,7 @@
|
|||
;; code fragments, general interest, etc.:
|
||||
;; Jari Aalto <jari.aalto@cs.tpu.fi>
|
||||
;; Dean Andrews <dean@dra.com>
|
||||
;; Juanma Barranquero <barranquero@laley-actualidad.es>
|
||||
;; Juanma Barranquero <lekktu@gmail.com>
|
||||
;; Karl Berry <kb@cs.umb.edu>
|
||||
;; Jim Chapman <jchapman@netcomuk.co.uk>
|
||||
;; Kin Cho <kin@neoscale.com>
|
||||
|
@ -426,9 +426,15 @@
|
|||
|
||||
(require 'man)
|
||||
(require 'button)
|
||||
(define-button-type 'WoMan-xref-man-page
|
||||
(define-button-type 'WoMan-xref-man-page
|
||||
:supertype 'Man-abstract-xref-man-page
|
||||
'func 'woman)
|
||||
'func (lambda (arg)
|
||||
(woman
|
||||
;; `woman' cannot deal with arguments that contain a
|
||||
;; section name, like close(2), so strip the section name.
|
||||
(if (string-match Man-reference-regexp arg)
|
||||
(substring arg 0 (match-end 1))
|
||||
arg))))
|
||||
|
||||
(eval-when-compile ; to avoid compiler warnings
|
||||
(require 'dired)
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
2006-04-08 Thien-Thi Nguyen <ttn@gnu.org>
|
||||
|
||||
* display.texi (Other Display Specs): Arrange a @code{DOTTED-LIST} to
|
||||
be on one line to help makeinfo not render two spaces after the dot.
|
||||
|
||||
2006-04-07 Reiner Steib <Reiner.Steib@gmx.de>
|
||||
|
||||
* strings.texi (Predicates for Strings): Add string-or-null-p.
|
||||
|
||||
2006-03-28 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
* processes.texi (Accepting Output): Remove obsolete (and incorrect)
|
||||
|
|
|
@ -3500,9 +3500,13 @@ not affect the amount of raising or lowering, which is based on the
|
|||
faces used for the text.
|
||||
@end table
|
||||
|
||||
@c We put all the `@code{(when ...)}' on one line to encourage
|
||||
@c makeinfo's end-of-sentence heuristics to DTRT. Previously, the dot
|
||||
@c was at eol; the info file ended up w/ two spaces rendered after it.
|
||||
You can make any display specification conditional. To do that,
|
||||
package it in another list of the form @code{(when @var{condition} .
|
||||
@var{spec})}. Then the specification @var{spec} applies only when
|
||||
package it in another list of the form
|
||||
@code{(when @var{condition} . @var{spec})}.
|
||||
Then the specification @var{spec} applies only when
|
||||
@var{condition} evaluates to a non-@code{nil} value. During the
|
||||
evaluation, @code{object} is bound to the string or buffer having the
|
||||
conditional @code{display} property. @code{position} and
|
||||
|
|
|
@ -102,6 +102,11 @@ This function returns @code{t} if @var{object} is a string, @code{nil}
|
|||
otherwise.
|
||||
@end defun
|
||||
|
||||
@defun string-or-null-p object
|
||||
This function returns @code{t} if @var{object} is a string or nil,
|
||||
@code{nil} otherwise.
|
||||
@end defun
|
||||
|
||||
@defun char-or-string-p object
|
||||
This function returns @code{t} if @var{object} is a string or a
|
||||
character (i.e., an integer), @code{nil} otherwise.
|
||||
|
|
|
@ -1,3 +1,87 @@
|
|||
2006-04-07 Reiner Steib <Reiner.Steib@gmx.de>
|
||||
|
||||
* gnus.texi (Summary Buffer Lines): Add `*'.
|
||||
|
||||
2006-04-07 Jochen K,A|(Bpper <jochen@fhi-berlin.mpg.de>
|
||||
|
||||
* gnus.texi (Group Parameters): Mention
|
||||
gnus-permanently-visible-groups.
|
||||
|
||||
2006-04-06 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* gnus.texi (Face): Fix typo.
|
||||
|
||||
2006-04-05 Reiner Steib <Reiner.Steib@gmx.de>
|
||||
|
||||
* gnus.texi (X-Face): Clarify.
|
||||
(Face): Need Emacs with PNG support.
|
||||
|
||||
2006-04-08 Kevin Ryde <user42@zip.com.au>
|
||||
|
||||
* text.texi (Fill Commands): fill-nobreak-predicate is now a hook.
|
||||
|
||||
2006-04-07 Richard Stallman <rms@gnu.org>
|
||||
|
||||
* programs.texi (Comments, Comment Commands, Options for Comments)
|
||||
(Multi-Line Comments): "Align", not "indent".
|
||||
(Basic Indent): C-j deletes trailing whitespace before the newline.
|
||||
|
||||
2006-04-06 Richard Stallman <rms@gnu.org>
|
||||
|
||||
* idlwave.texi: Delete the blocks "not suitable for inclusion with
|
||||
Emacs".
|
||||
|
||||
* programs.texi (Basic Indent): Clarify relationship of C-j to TAB.
|
||||
|
||||
2006-04-06 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* killing.texi (Rectangles): Add index entry for marking a
|
||||
rectangle.
|
||||
|
||||
2006-04-06 J.D. Smith <jdsmith@as.arizona.edu>
|
||||
|
||||
* idlwave.texi: Updated for IDLWAVE version 6.0, factoring out
|
||||
blocks not suitable for inclusion with Emacs using variable
|
||||
PARTOFEMACS.
|
||||
|
||||
2006-04-05 Richard Stallman <rms@gnu.org>
|
||||
|
||||
* emacs.texi (Top): Update subnode menu.
|
||||
|
||||
* trouble.texi (Unasked-for Search): Node deleted.
|
||||
(Lossage): Delete from menu.
|
||||
|
||||
2006-04-04 Richard Stallman <rms@gnu.org>
|
||||
|
||||
* trouble.texi: Various cleanups.
|
||||
(Checklist): Don't bother saying how to snail a bug report.
|
||||
(Emergency Escape): Much rewriting.
|
||||
(After a Crash): Rename the core dump immediately.
|
||||
(Total Frustration): Call it a psychotherapist.
|
||||
(Bug Criteria): Avoid "illegal instruction".
|
||||
(Sending Patches): We always put the contributor's name in.
|
||||
|
||||
* misc.texi (Thumbnails): Minor correction.
|
||||
|
||||
2006-04-04 Simon Josefsson <jas@extundo.com>
|
||||
|
||||
* gnus.texi (Security): Improve.
|
||||
|
||||
2006-04-03 Richard Stallman <rms@gnu.org>
|
||||
|
||||
* misc.texi (Thumbnails): Minor cleanup.
|
||||
|
||||
2006-04-02 Karl Berry <karl@gnu.org>
|
||||
|
||||
* sending.texi (Mail Sending): pxref to Top needs five args.
|
||||
|
||||
* texinfo.tex: update to current version (2006-03-21.13).
|
||||
|
||||
2006-04-02 Bill Wohler <wohler@newt.com>
|
||||
|
||||
* mh-e.texi (Getting Started, Junk, Bug Reports)
|
||||
(MH FAQ and Support): Fix URLs.
|
||||
|
||||
2006-03-31 Romain Francoise <romain@orebokech.com>
|
||||
|
||||
* gnus.texi (Virtual Groups): `nnvirtual-always-rescan' defaults
|
||||
|
|
|
@ -801,7 +801,6 @@ Dealing with Emacs Trouble
|
|||
* Stuck Recursive:: `[...]' in mode line around the parentheses.
|
||||
* Screen Garbled:: Garbage on the screen.
|
||||
* Text Garbled:: Garbage in the text.
|
||||
* Unasked-for Search:: Spontaneous entry to incremental search.
|
||||
* Memory Full:: How to cope when you run out of memory.
|
||||
* After a Crash:: Recovering editing in an Emacs session that crashed.
|
||||
* Emergency Escape:: Emergency escape---
|
||||
|
|
|
@ -2758,6 +2758,9 @@ If the group parameter list has the element @code{(visible . t)},
|
|||
that group will always be visible in the Group buffer, regardless
|
||||
of whether it has any unread articles.
|
||||
|
||||
This parameter cannot be set via @code{gnus-parameters}. See
|
||||
@code{gnus-permanently-visible-groups} as an alternative.
|
||||
|
||||
@item broken-reply-to
|
||||
@cindex broken-reply-to
|
||||
Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
|
||||
|
@ -3035,8 +3038,9 @@ parameters (@pxref{Topic Parameters}).
|
|||
|
||||
@vindex gnus-parameters
|
||||
Group parameters can be set via the @code{gnus-parameters} variable too.
|
||||
But some variables, such as @code{visible}, have no effect. For
|
||||
example:
|
||||
But some variables, such as @code{visible}, have no effect (For this
|
||||
case see @code{gnus-permanently-visible-groups} as an alternative.).
|
||||
For example:
|
||||
|
||||
@lisp
|
||||
(setq gnus-parameters
|
||||
|
@ -4675,6 +4679,8 @@ article has any children.
|
|||
The line number.
|
||||
@item O
|
||||
Download mark.
|
||||
@item *
|
||||
Desired cursor position (instead of after first colon).
|
||||
@item &user-date;
|
||||
Age sensitive date format. Various date format is defined in
|
||||
@code{gnus-user-date-format-alist}.
|
||||
|
@ -10655,8 +10661,8 @@ or newer is recommended.
|
|||
|
||||
@end enumerate
|
||||
|
||||
More information on how to set things up can be found in the message
|
||||
manual (@pxref{Security, ,Security, message, Message Manual}).
|
||||
The variables that control security functionality on reading messages
|
||||
include:
|
||||
|
||||
@table @code
|
||||
@item mm-verify-option
|
||||
|
@ -10687,6 +10693,15 @@ deprecated.
|
|||
|
||||
@end table
|
||||
|
||||
By default the buttons that display security information are not
|
||||
shown, because they clutter reading the actual e-mail. You can type
|
||||
@kbd{K b} manually to display the information. Use the
|
||||
@code{gnus-buttonized-mime-types} and
|
||||
@code{gnus-unbuttonized-mime-types} variables to control this
|
||||
permanently. @ref{MIME Commands} for further details, and hints on
|
||||
how to customize these variables to always display security
|
||||
information.
|
||||
|
||||
@cindex snarfing keys
|
||||
@cindex importing PGP keys
|
||||
@cindex PGP key ring import
|
||||
|
@ -10707,6 +10722,10 @@ application/pgp-keys; gpg --import --interactive --verbose; needsterminal
|
|||
This happens to also be the default action defined in
|
||||
@code{mailcap-mime-data}.
|
||||
|
||||
More information on how to set things for sending outgoing signed and
|
||||
encrypted messages up can be found in the message manual
|
||||
(@pxref{Security, ,Security, message, Message Manual}).
|
||||
|
||||
@node Mailing List
|
||||
@section Mailing List
|
||||
@cindex mailing list
|
||||
|
@ -22060,10 +22079,20 @@ readers.
|
|||
@end iftex
|
||||
@c @anchor{X-Face}
|
||||
|
||||
Decoding an @code{X-Face} header either requires an Emacs that has
|
||||
Viewing an @code{X-Face} header either requires an Emacs that has
|
||||
@samp{compface} support (which most XEmacs versions has), or that you
|
||||
have @samp{compface} installed on your system. If either is true,
|
||||
Gnus will default to displaying @code{X-Face} headers.
|
||||
have suitable conversion or display programs installed. If your Emacs
|
||||
has image support the default action is to display the face before the
|
||||
@code{From} header. If there's no native @code{X-Face} support, Gnus
|
||||
will try to convert the @code{X-Face} header using external programs
|
||||
from the @code{pbmplus} package and friends. For XEmacs it's faster if
|
||||
XEmacs has been compiled with @code{X-Face} support. The default action
|
||||
under Emacs without image support is to fork off the @code{display}
|
||||
program.
|
||||
|
||||
On a GNU/Linux system, the @code{display} program is from the
|
||||
ImageMagick package. For external conversion programs look for packages
|
||||
with names like @code{netpbm}, @code{libgr-progs} and @code{compface}.
|
||||
|
||||
The variable that controls this is the
|
||||
@code{gnus-article-x-face-command} variable. If this variable is a
|
||||
|
@ -22072,21 +22101,6 @@ function, this function will be called with the face as the argument.
|
|||
If the @code{gnus-article-x-face-too-ugly} (which is a regexp) matches
|
||||
the @code{From} header, the face will not be shown.
|
||||
|
||||
The default action under Emacs without image support is to fork off the
|
||||
@code{display} program@footnote{@code{display} is from the ImageMagick
|
||||
package. For the @code{uncompface} and @code{icontopbm} programs look
|
||||
for a package like @code{compface} or @code{faces-xface} on a GNU/Linux
|
||||
system.} to view the face.
|
||||
|
||||
Under XEmacs or Emacs 21+ with suitable image support, the default
|
||||
action is to display the face before the @code{From} header. (It's
|
||||
nicer if XEmacs has been compiled with @code{X-Face} support---that
|
||||
will make display somewhat faster. If there's no native @code{X-Face}
|
||||
support, Gnus will try to convert the @code{X-Face} header using
|
||||
external programs from the @code{pbmplus} package and
|
||||
friends.@footnote{On a GNU/Linux system look for packages with names
|
||||
like @code{netpbm}, @code{libgr-progs} and @code{compface}.})
|
||||
|
||||
(Note: @code{x-face} is used in the variable/function names, not
|
||||
@code{xface}).
|
||||
|
||||
|
@ -22104,7 +22118,9 @@ default colors are black and white.
|
|||
If you use posting styles, you can use an @code{x-face-file} entry in
|
||||
@code{gnus-posting-styles}, @xref{Posting Styles}. If you don't, Gnus
|
||||
provides a few convenience functions and variables to allow easier
|
||||
insertion of X-Face headers in outgoing messages.
|
||||
insertion of X-Face headers in outgoing messages. You also need the
|
||||
above mentioned ImageMagick, netpbm or other image conversion packages
|
||||
(depending the values of the variables below) for these functions.
|
||||
|
||||
@findex gnus-random-x-face
|
||||
@vindex gnus-convert-pbm-to-x-face-command
|
||||
|
@ -22151,7 +22167,7 @@ Using the last function would be something like this:
|
|||
@subsection Face
|
||||
@cindex face
|
||||
|
||||
@c #### FIXME: faces and x-faces'implementations should really be harmonized.
|
||||
@c #### FIXME: faces and x-faces' implementations should really be harmonized.
|
||||
|
||||
@code{Face} headers are essentially a funkier version of @code{X-Face}
|
||||
ones. They describe a 48x48 pixel colored image that's supposed to
|
||||
|
@ -22163,6 +22179,13 @@ The contents of a @code{Face} header must be a base64 encoded PNG image.
|
|||
See @uref{http://quimby.gnus.org/circus/face/} for the precise
|
||||
specifications.
|
||||
|
||||
Viewing an @code{Face} header requires an Emacs that is able to display
|
||||
PNG images.
|
||||
@c Maybe add this:
|
||||
@c (if (featurep 'xemacs)
|
||||
@c (featurep 'png)
|
||||
@c (image-type-available-p 'png))
|
||||
|
||||
Gnus provides a few convenience functions and variables to allow
|
||||
easier insertion of Face headers in outgoing messages.
|
||||
|
||||
|
|
834
man/idlwave.texi
834
man/idlwave.texi
File diff suppressed because it is too large
Load diff
|
@ -543,6 +543,7 @@ clear them out, fill them with blanks or text, or delete them. Rectangle
|
|||
commands are useful with text in multicolumn formats, and for changing
|
||||
text into or out of such formats.
|
||||
|
||||
@cindex mark rectangle
|
||||
When you must specify a rectangle for a command to work on, you do it
|
||||
by putting the mark at one corner and point at the opposite corner. The
|
||||
rectangle thus specified is called the @dfn{region-rectangle} because
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
@set VERSION 7.93
|
||||
@c Edition of the manual. It is either empty for the first edition or
|
||||
@c has the form ", nth Edition" (without the quotes).
|
||||
@set EDITION , 5th Edition
|
||||
@set UPDATED 2006-03-19
|
||||
@set UPDATE-MONTH March, 2006
|
||||
@set EDITION , 6th Edition
|
||||
@set UPDATED 2006-04-02
|
||||
@set UPDATE-MONTH April, 2006
|
||||
|
||||
@c Other variables.
|
||||
@set MH-BOOK-HOME http://www.ics.uci.edu/~mh/book/mh
|
||||
|
@ -591,9 +591,9 @@ actually cause problems.
|
|||
If you've never run MH before, you need to run @command{install-mh}
|
||||
from the shell before you continue. This sets up your personal MH
|
||||
environment@footnote{See the section
|
||||
@uref{@value{MH-BOOK-HOME}/setup.htm, Setting Up MH} in the MH book.}.
|
||||
If you don't, you'll be greeted with the error message: @samp{Install
|
||||
MH and run install-mh before running MH-E}.
|
||||
@uref{@value{MH-BOOK-HOME}/../overall/setup.htm, Setting Up MH} in the
|
||||
MH book.}. If you don't, you'll be greeted with the error message:
|
||||
@samp{Install MH and run install-mh before running MH-E}.
|
||||
|
||||
@cindex @samp{Path:} MH profile component
|
||||
@cindex MH profile
|
||||
|
@ -7502,7 +7502,7 @@ Spam program that MH-E should use (default: @samp{Auto-detect}).
|
|||
@cindex spam filters, Spamassassin
|
||||
@cindex spam filters, bogofilter
|
||||
|
||||
MH-E depends on @uref{http://www.spamassassin.org/, SpamAssassin},
|
||||
MH-E depends on @uref{http://spamassassin.apache.org/, SpamAssassin},
|
||||
@uref{http://bogofilter.sourceforge.net/, bogofilter}, or
|
||||
@uref{http://spamprobe.sourceforge.net/, SpamProbe} to throw the dreck
|
||||
away. This chapter describes briefly how to configure these programs
|
||||
|
@ -7557,7 +7557,7 @@ MH-E can work with.
|
|||
|
||||
SpamAssassin is one of the more popular spam filtering programs. Get
|
||||
it from your local distribution or from the
|
||||
@uref{http://spamassassin.org/, SpamAssassin web site}.
|
||||
@uref{http://spamassassin.apache.org/, SpamAssassin web site}.
|
||||
|
||||
To use SpamAssassin, add the following recipes to @file{~/.procmailrc}:
|
||||
|
||||
|
@ -8542,12 +8542,12 @@ I also point out some additional sources of information.
|
|||
@kindex M-x mh-version
|
||||
|
||||
Bug reports should be filed at
|
||||
@uref{https://sourceforge.net/bugs/?group_id=13357, SourceForge}. You
|
||||
need to be a SourceForge user to submit bug reports, but this is easy
|
||||
enough to do that it shouldn't be a restriction for you. Please
|
||||
include the output of @kbd{M-x mh-version} (@pxref{Miscellaneous}) in
|
||||
any bug report you send unless you're 110% positive we won't ask for
|
||||
it.
|
||||
@uref{https://sourceforge.net/tracker/?group_id=13357&atid=113357,
|
||||
SourceForge}. You need to be a SourceForge user to submit bug reports,
|
||||
but this is easy enough to do that it shouldn't be a restriction for
|
||||
you. Please include the output of @kbd{M-x mh-version}
|
||||
(@pxref{Miscellaneous}) in any bug report you send unless you're 110%
|
||||
positive we won't ask for it.
|
||||
|
||||
@node Mailing Lists, MH FAQ and Support, Bug Reports, Odds and Ends
|
||||
@appendixsec MH-E Mailing Lists
|
||||
|
@ -8577,10 +8577,10 @@ itself which you will find useful.
|
|||
@cindex support
|
||||
|
||||
You can find FAQs on MH-E at the
|
||||
@uref{https://sourceforge.net/support/?group_id=13357, Support
|
||||
Requests} page on SourceForge. If you don't find the answer to your
|
||||
question, file a support request and your question will become a new
|
||||
FAQ!
|
||||
@uref{https://sourceforge.net/tracker/?group_id=13357&atid=213357,
|
||||
Support Requests} page on SourceForge. If you don't find the answer to
|
||||
your question, file a support request and your question will become a
|
||||
new FAQ!
|
||||
|
||||
@node Getting MH-E, , MH FAQ and Support, Odds and Ends
|
||||
@appendixsec Getting MH-E
|
||||
|
|
|
@ -2360,15 +2360,15 @@ find the one you select (@code{ffap-menu}).
|
|||
@cindex thumbnails
|
||||
|
||||
Tumme is a facility for browsing image files. It provides viewing
|
||||
of the original file, either as a thumbnail or in full size, inside
|
||||
Emacs or in an external viewer.
|
||||
the images either as thumbnails or in full size, either inside Emacs
|
||||
or through an external viewer.
|
||||
|
||||
To enter Tumme, type @kbd{M-x tumme}. It prompts for a directory;
|
||||
specify one that has images files. This creates thumbnails for all
|
||||
the images in that directory, and displays them all in the ``thumbnail
|
||||
buffer''. This takes a long time if the directory contains many image
|
||||
files, and it won't operate if the number of image files exceeds
|
||||
@code{tumme-show-all-from-dir-max-files}.
|
||||
files, and it asks for confirmation if the number of image files
|
||||
exceeds @code{tumme-show-all-from-dir-max-files}.
|
||||
|
||||
@kindex C-t d @r{(Tumme)}
|
||||
@findex tumme-display-thumbs
|
||||
|
@ -2400,24 +2400,23 @@ from the thumbnail buffer with @kbd{C-d} (@code{tumme-delete-char}).
|
|||
|
||||
More advanced features include @dfn{image tags}, which are metadata
|
||||
used to categorize image files. The tags are stored in a plain text
|
||||
file.
|
||||
@c ??? What is the file name?
|
||||
file configured by @code{tumme-db-file}.
|
||||
|
||||
To tag image files, mark them in the dired buffer and type @kbd{C-t
|
||||
t} (@code{tumme-tag-files}). You will be prompted for a tag. To mark
|
||||
files having a certain tag, type @kbd{C-t f}
|
||||
To tag image files, mark them in the dired buffer (you can also mark
|
||||
files in Dired from the thumbnail buffer by typing @kbd{m}) and type
|
||||
@kbd{C-t t} (@code{tumme-tag-files}). You will be prompted for a tag.
|
||||
To mark files having a certain tag, type @kbd{C-t f}
|
||||
(@code{tumme-mark-tagged-files}). After marking image files with a
|
||||
certain tag, you can use @kbd{C-t d} to view them.
|
||||
|
||||
@c ??? Remove what? The tag?
|
||||
You can also tag a file from the thumbnail buffer by typing @kbd{t
|
||||
t} and remove it by typing @kbd{t r}. There is also a special ``tag''
|
||||
called ``comment'' for each file (it is not a tag in the exact same
|
||||
sense as the other tags, it is handled slightly different). That is
|
||||
used to enter a comment or description about the image. You comment a
|
||||
file from the thumbnail buffer by typing @kbd{c}. You will be
|
||||
prompted for a comment. Type @kbd{C-t c} to add a comment from Dired
|
||||
(@code{tumme-dired-comment-files}).
|
||||
You can also tag a file directly from the thumbnail buffer by typing
|
||||
@kbd{t t} and you can remove a tag by typing @kbd{t r}. There is also
|
||||
a special ``tag'' called ``comment'' for each file (it is not a tag in
|
||||
the exact same sense as the other tags, it is handled slightly
|
||||
different). That is used to enter a comment or description about the
|
||||
image. You comment a file from the thumbnail buffer by typing
|
||||
@kbd{c}. You will be prompted for a comment. Type @kbd{C-t c} to add
|
||||
a comment from Dired (@code{tumme-dired-comment-files}).
|
||||
|
||||
Tumme also provides simple image manipulation. In the thumbnail
|
||||
buffer, type @kbd{L} to rotate the original image 90 degrees anti
|
||||
|
|
|
@ -360,7 +360,8 @@ usual conventions of the language you are editing.
|
|||
@item @key{TAB}
|
||||
Adjust indentation of current line.
|
||||
@item C-j
|
||||
Equivalent to @key{RET} followed by @key{TAB} (@code{newline-and-indent}).
|
||||
Insert a newline, then adjust indentation of following line
|
||||
(@code{newline-and-indent}).
|
||||
@end table
|
||||
|
||||
@kindex TAB @r{(programming modes)}
|
||||
|
@ -385,9 +386,11 @@ the characters around it.
|
|||
@kindex C-j
|
||||
@findex newline-and-indent
|
||||
When entering lines of new code, use @kbd{C-j}
|
||||
(@code{newline-and-indent}), which is equivalent to @key{RET}
|
||||
followed by @key{TAB}. @kbd{C-j} at the end of a line creates a
|
||||
blank line and then gives it the appropriate indentation.
|
||||
(@code{newline-and-indent}), which inserts a newline and then adjusts
|
||||
indentation after it. (It also deletes any trailing whitespace which
|
||||
remains before the new newline.) Thus, @kbd{C-j} at the end of a line
|
||||
creates a blank line with appropriate indentation. In programming
|
||||
language modes, it is equivalent to @key{RET} @key{TAB}.
|
||||
|
||||
@key{TAB} indents a line that starts within a parenthetical grouping
|
||||
under the preceding line within the grouping, or the text after the
|
||||
|
@ -851,7 +854,7 @@ also do spell checking on comments with Flyspell Prog mode
|
|||
(@pxref{Spelling}).
|
||||
|
||||
@menu
|
||||
* Comment Commands:: Inserting, killing, and indenting comments.
|
||||
* Comment Commands:: Inserting, killing, and aligning comments.
|
||||
* Multi-Line Comments:: Commands for adding and editing multi-line comments.
|
||||
* Options for Comments::Customizing the comment features.
|
||||
@end menu
|
||||
|
@ -859,6 +862,7 @@ also do spell checking on comments with Flyspell Prog mode
|
|||
@node Comment Commands
|
||||
@subsection Comment Commands
|
||||
@cindex indentation for comments
|
||||
@cindex alignment for comments
|
||||
|
||||
The comment commands in this table insert, kill and align comments.
|
||||
They are described in this section and following sections.
|
||||
|
@ -897,11 +901,11 @@ away. If the major mode has specified a string to terminate comments,
|
|||
@kbd{M-;} inserts that after point, to keep the syntax valid.
|
||||
|
||||
If the text of the line extends past the comment column, this
|
||||
command indents the comment start string to a suitable boundary
|
||||
command aligns the comment start string to a suitable boundary
|
||||
(usually, at least one space is inserted).
|
||||
|
||||
You can also use @kbd{M-;} to align an existing comment. If a line
|
||||
already contains the comment-start string, @kbd{M-;} reindents it to
|
||||
already contains the comment-start string, @kbd{M-;} realigns it to
|
||||
the conventional alignment and moves point after it. (Exception:
|
||||
comments starting in column 0 are not moved.) Even when an existing
|
||||
comment is properly aligned, @kbd{M-;} is still useful for moving
|
||||
|
@ -931,7 +935,7 @@ or else enable Transient Mark mode momentarily (@pxref{Momentary Mark}).
|
|||
A prefix argument used in these circumstances specifies how many
|
||||
comment delimiters to add or how many to delete.
|
||||
|
||||
Some major modes have special rules for indenting certain kinds of
|
||||
Some major modes have special rules for aligning certain kinds of
|
||||
comments in certain contexts. For example, in Lisp code, comments which
|
||||
start with two semicolons are indented as if they were lines of code,
|
||||
instead of at the comment column. Comments which start with three
|
||||
|
@ -982,13 +986,13 @@ commenting them out. With a negative argument, it does the
|
|||
opposite---it deletes comment delimiters from the lines in the region.
|
||||
|
||||
With a positive argument, @code{comment-region} duplicates the last
|
||||
character of the comment start sequence it adds; the argument specifies
|
||||
how many copies of the character to insert. Thus, in Lisp mode,
|
||||
@kbd{C-u 2 M-x comment-region} adds @samp{;;} to each line. Duplicating
|
||||
the comment delimiter is a way of calling attention to the comment. It
|
||||
can also affect how the comment is indented. In Lisp, for proper
|
||||
indentation, you should use an argument of two or three, if between defuns;
|
||||
if within a defun, it must be three.
|
||||
character of the comment start sequence it adds; the argument
|
||||
specifies how many copies of the character to insert. Thus, in Lisp
|
||||
mode, @kbd{C-u 2 M-x comment-region} adds @samp{;;} to each line.
|
||||
Duplicating the comment delimiter is a way of calling attention to the
|
||||
comment. It can also affect how the comment is aligned or indented.
|
||||
In Lisp, for proper indentation, you should use an argument of two or
|
||||
three, if between defuns; if within a defun, it must be three.
|
||||
|
||||
You can configure C Mode such that when you type a @samp{/} at the
|
||||
start of a line in a multi-line block comment, this closes the
|
||||
|
@ -1058,7 +1062,7 @@ The default for this variable depends on the major mode.
|
|||
|
||||
@vindex comment-indent-function
|
||||
The variable @code{comment-indent-function} should contain a function
|
||||
that will be called to compute the indentation for a newly inserted
|
||||
that will be called to compute the alignment for a newly inserted
|
||||
comment or for aligning an existing comment. It is set differently by
|
||||
various major modes. The function is called with no arguments, but with
|
||||
point at the beginning of the comment, or at the end of a line if a new
|
||||
|
|
|
@ -459,9 +459,9 @@ user agent sends mail. It should be set to a function. The default
|
|||
is @code{sendmail-send-it}, which delivers mail using the Sendmail
|
||||
installation on the local host. To send mail through a SMTP server,
|
||||
set it to @code{smtpmail-send-it} and set up the Emacs SMTP library
|
||||
(@pxref{Top,, Sending mail via SMTP,smtpmail}). A third option is
|
||||
@code{feedmail-send-it}, see the commentary section of the
|
||||
@file{feedmail.el} package for more information.
|
||||
(@pxref{Top,,Emacs SMTP Library, Sending mail via SMTP,smtpmail}). A
|
||||
third option is @code{feedmail-send-it}, see the commentary section of
|
||||
the @file{feedmail.el} package for more information.
|
||||
|
||||
@node Header Editing
|
||||
@subsection Mail Header Editing
|
||||
|
|
6736
man/texinfo.tex
6736
man/texinfo.tex
File diff suppressed because it is too large
Load diff
|
@ -557,11 +557,11 @@ two spaces for the end of a sentence, as explained above. @xref{Sentences}.
|
|||
fill commands put two spaces after a colon.
|
||||
|
||||
@vindex fill-nobreak-predicate
|
||||
The variable @code{fill-nobreak-predicate} specifies additional
|
||||
conditions for where line-breaking is allowed. Its value is either
|
||||
@code{nil} or a Lisp function; the function is called with no
|
||||
The variable @code{fill-nobreak-predicate} is a hook (an abnormal
|
||||
hook, @pxref{Hooks}) specifying additional conditions where
|
||||
line-breaking is not allowed. Each function is called with no
|
||||
arguments, with point at a place where Emacs is considering breaking
|
||||
the line. If the function returns a non-@code{nil} value, then that's
|
||||
the line. If a function returns a non-@code{nil} value, then that's
|
||||
a bad place to break the line. Two standard functions you can use are
|
||||
@code{fill-single-word-nobreak-p} (don't break after the first word of
|
||||
a sentence or before the last) and @code{fill-french-nobreak-p} (don't
|
||||
|
|
275
man/trouble.texi
275
man/trouble.texi
|
@ -34,25 +34,25 @@ Abort all recursive editing levels that are currently executing.
|
|||
Cancel a previously made change in the buffer contents (@code{undo}).
|
||||
@end table
|
||||
|
||||
There are two ways of canceling commands which are not finished
|
||||
executing: @dfn{quitting} with @kbd{C-g}, and @dfn{aborting} with
|
||||
@kbd{C-]} or @kbd{M-x top-level}. Quitting cancels a partially typed
|
||||
command or one which is already running. Aborting exits a recursive
|
||||
editing level and cancels the command that invoked the recursive edit.
|
||||
There are two ways of canceling a command before it has finished:
|
||||
@dfn{quitting} with @kbd{C-g}, and @dfn{aborting} with @kbd{C-]} or
|
||||
@kbd{M-x top-level}. Quitting cancels a partially typed command, or
|
||||
one which is still running. Aborting exits a recursive editing level
|
||||
and cancels the command that invoked the recursive edit.
|
||||
(@xref{Recursive Edit}.)
|
||||
|
||||
@cindex quitting
|
||||
@kindex C-g
|
||||
Quitting with @kbd{C-g} is used for getting rid of a partially typed
|
||||
Quitting with @kbd{C-g} is the way to get rid of a partially typed
|
||||
command, or a numeric argument that you don't want. It also stops a
|
||||
running command in the middle in a relatively safe way, so you can use
|
||||
it if you accidentally give a command which takes a long time. In
|
||||
particular, it is safe to quit out of killing; either your text will
|
||||
@emph{all} still be in the buffer, or it will @emph{all} be in the kill
|
||||
ring (or maybe both). Quitting an incremental search does special
|
||||
things documented under searching; in general, it may take two
|
||||
successive @kbd{C-g} characters to get out of a search
|
||||
(@pxref{Incremental Search}).
|
||||
particular, it is safe to quit out of a kill command; either your text
|
||||
will @emph{all} still be in the buffer, or it will @emph{all} be in
|
||||
the kill ring, or maybe both. Quitting an incremental search does
|
||||
special things, documented under searching; it may take two successive
|
||||
@kbd{C-g} characters to get out of a search (@pxref{Incremental
|
||||
Search}).
|
||||
|
||||
On MS-DOS, the character @kbd{C-@key{BREAK}} serves as a quit character
|
||||
like @kbd{C-g}. The reason is that it is not feasible, on MS-DOS, to
|
||||
|
@ -63,7 +63,7 @@ with the user. By contrast, it @emph{is} feasible to recognize
|
|||
@findex keyboard-quit
|
||||
@kbd{C-g} works by setting the variable @code{quit-flag} to @code{t}
|
||||
the instant @kbd{C-g} is typed; Emacs Lisp checks this variable
|
||||
frequently and quits if it is non-@code{nil}. @kbd{C-g} is only
|
||||
frequently, and quits if it is non-@code{nil}. @kbd{C-g} is only
|
||||
actually executed as a command if you type it while Emacs is waiting for
|
||||
input. In that case, the command it runs is @code{keyboard-quit}.
|
||||
|
||||
|
@ -72,15 +72,15 @@ the first @kbd{C-g} is recognized, you activate the ``emergency
|
|||
escape'' feature and return to the shell. @xref{Emergency Escape}.
|
||||
|
||||
@cindex NFS and quitting
|
||||
There may be times when you cannot quit. When Emacs is waiting for
|
||||
the operating system to do something, quitting is impossible unless
|
||||
special pains are taken for the particular system call within Emacs
|
||||
where the waiting occurs. We have done this for the system calls that
|
||||
users are likely to want to quit from, but it's possible you will find
|
||||
another. In one very common case---waiting for file input or output
|
||||
using NFS---Emacs itself knows how to quit, but many NFS implementations
|
||||
simply do not allow user programs to stop waiting for NFS when the NFS
|
||||
server is hung.
|
||||
There are some situations where you cannot quit. When Emacs is
|
||||
waiting for the operating system to do something, quitting is
|
||||
impossible unless special pains are taken for the particular system
|
||||
call within Emacs where the waiting occurs. We have done this for the
|
||||
system calls that users are likely to want to quit from, but it's
|
||||
possible you will a case not handled. In one very common
|
||||
case---waiting for file input or output using NFS---Emacs itself knows
|
||||
how to quit, but many NFS implementations simply do not allow user
|
||||
programs to stop waiting for NFS when the NFS server is hung.
|
||||
|
||||
@cindex aborting recursive edit
|
||||
@findex abort-recursive-edit
|
||||
|
@ -96,16 +96,16 @@ recursive edit.
|
|||
|
||||
@findex keyboard-escape-quit
|
||||
@kindex ESC ESC ESC
|
||||
The command @kbd{@key{ESC} @key{ESC} @key{ESC}}
|
||||
(@code{keyboard-escape-quit}) can either quit or abort. This key was
|
||||
defined because @key{ESC} is used to ``get out'' in many PC programs.
|
||||
It can cancel a prefix argument, clear a selected region, or get out of
|
||||
a Query Replace, like @kbd{C-g}. It can get out of the minibuffer or a
|
||||
recursive edit, like @kbd{C-]}. It can also get out of splitting the
|
||||
frame into multiple windows, like @kbd{C-x 1}. One thing it cannot do,
|
||||
however, is stop a command that is running. That's because it executes
|
||||
as an ordinary command, and Emacs doesn't notice it until it is ready
|
||||
for a command.
|
||||
The sequence @kbd{@key{ESC} @key{ESC} @key{ESC}}
|
||||
(@code{keyboard-escape-quit}) can either quit or abort. (We defined
|
||||
it this way because @key{ESC} means ``get out'' in many PC programs.)
|
||||
It can cancel a prefix argument, clear a selected region, or get out
|
||||
of a Query Replace, like @kbd{C-g}. It can get out of the minibuffer
|
||||
or a recursive edit, like @kbd{C-]}. It can also get out of splitting
|
||||
the frame into multiple windows, as with @kbd{C-x 1}. One thing it
|
||||
cannot do, however, is stop a command that is running. That's because
|
||||
it executes as an ordinary command, and Emacs doesn't notice it until
|
||||
it is ready for the next command.
|
||||
|
||||
@findex top-level
|
||||
The command @kbd{M-x top-level} is equivalent to ``enough'' @kbd{C-]}
|
||||
|
@ -137,7 +137,6 @@ in the Emacs distribution. Type @kbd{C-h C-f} to read the FAQ; type
|
|||
* Stuck Recursive:: `[...]' in mode line around the parentheses.
|
||||
* Screen Garbled:: Garbage on the screen.
|
||||
* Text Garbled:: Garbage in the text.
|
||||
* Unasked-for Search:: Spontaneous entry to incremental search.
|
||||
* Memory Full:: How to cope when you run out of memory.
|
||||
* After a Crash:: Recovering editing in an Emacs session that crashed.
|
||||
* Emergency Escape:: Emergency escape---
|
||||
|
@ -181,10 +180,10 @@ isn't.
|
|||
In all of those cases, the immediate remedy is the same: use the
|
||||
command @kbd{M-x normal-erase-is-backspace-mode}. This toggles
|
||||
between the two modes that Emacs supports for handling @key{DEL}, so
|
||||
if Emacs starts in the wrong mode, it should switch to the right mode.
|
||||
On a text-only terminal, if you want to ask for help when @key{BS} is
|
||||
treated as @key{DEL}, use @key{F1}; @kbd{C-?} may also work, if it
|
||||
sends character code 127.
|
||||
if Emacs starts in the wrong mode, this should switch to the right
|
||||
mode. On a text-only terminal, if you want to ask for help when
|
||||
@key{BS} is treated as @key{DEL}, use @key{F1}; @kbd{C-?} may also
|
||||
work, if it sends character code 127.
|
||||
|
||||
@findex normal-erase-is-backspace-mode
|
||||
To fix the problem automatically for every Emacs session, you can
|
||||
|
@ -244,25 +243,24 @@ the entire screen. If the screen appears correct after this, the
|
|||
problem was entirely in the previous screen update. (Otherwise, see
|
||||
the following section.)
|
||||
|
||||
Display updating problems often result from an incorrect termcap entry
|
||||
for the terminal you are using. The file @file{etc/TERMS} in the Emacs
|
||||
distribution gives the fixes for known problems of this sort.
|
||||
@file{INSTALL} contains general advice for these problems in one of its
|
||||
sections. Very likely there is simply insufficient padding for certain
|
||||
display operations. To investigate the possibility that you have this sort
|
||||
of problem, try Emacs on another terminal made by a different manufacturer.
|
||||
If problems happen frequently on one kind of terminal but not another kind,
|
||||
it is likely to be a bad termcap entry, though it could also be due to a
|
||||
bug in Emacs that appears for terminals that have or that lack specific
|
||||
features.
|
||||
Display updating problems often result from an incorrect terminfo
|
||||
entry for the terminal you are using. The file @file{etc/TERMS} in
|
||||
the Emacs distribution gives the fixes for known problems of this
|
||||
sort. @file{INSTALL} contains general advice for these problems in
|
||||
one of its sections. To investigate the possibility that you have
|
||||
this sort of problem, try Emacs on another terminal made by a
|
||||
different manufacturer. If problems happen frequently on one kind of
|
||||
terminal but not another kind, it is likely to be a bad terminfo entry,
|
||||
though it could also be due to a bug in Emacs that appears for
|
||||
terminals that have or that lack specific features.
|
||||
|
||||
@node Text Garbled
|
||||
@subsection Garbage in the Text
|
||||
|
||||
If @kbd{C-l} shows that the text is wrong, try undoing the changes to it
|
||||
using @kbd{C-x u} until it gets back to a state you consider correct. Also
|
||||
try @kbd{C-h l} to find out what command you typed to produce the observed
|
||||
results.
|
||||
If @kbd{C-l} shows that the text is wrong, first type @kbd{C-h l} to
|
||||
see what commands you typed to produce the observed results. Then try
|
||||
undoing the changes step by step using @kbd{C-x u}, until it gets back
|
||||
to a state you consider correct.
|
||||
|
||||
If a large portion of text appears to be missing at the beginning or
|
||||
end of the buffer, check for the word @samp{Narrow} in the mode line.
|
||||
|
@ -270,42 +268,6 @@ If it appears, the text you don't see is probably still present, but
|
|||
temporarily off-limits. To make it accessible again, type @kbd{C-x n
|
||||
w}. @xref{Narrowing}.
|
||||
|
||||
@node Unasked-for Search
|
||||
@subsection Spontaneous Entry to Incremental Search
|
||||
|
||||
If Emacs spontaneously displays @samp{I-search:} at the bottom of the
|
||||
screen, it means that the terminal is sending @kbd{C-s} and @kbd{C-q}
|
||||
according to the poorly designed xon/xoff ``flow control'' protocol.
|
||||
|
||||
If this happens to you, your best recourse is to put the terminal in a
|
||||
mode where it will not use flow control, or give it so much padding that
|
||||
it will never send a @kbd{C-s}. (One way to increase the amount of
|
||||
padding is to set the variable @code{baud-rate} to a larger value. Its
|
||||
value is the terminal output speed, measured in the conventional units
|
||||
of baud.)
|
||||
|
||||
@cindex flow control
|
||||
@cindex xon-xoff
|
||||
@findex enable-flow-control
|
||||
If you don't succeed in turning off flow control, the next best thing
|
||||
is to tell Emacs to cope with it. To do this, call the function
|
||||
@code{enable-flow-control}.
|
||||
|
||||
@findex enable-flow-control-on
|
||||
Typically there are particular terminal types with which you must use
|
||||
flow control. You can conveniently ask for flow control on those
|
||||
terminal types only, using @code{enable-flow-control-on}. For example,
|
||||
if you find you must use flow control on VT-100 and H19 terminals, put
|
||||
the following in your @file{.emacs} file:
|
||||
|
||||
@example
|
||||
(enable-flow-control-on "vt100" "h19")
|
||||
@end example
|
||||
|
||||
When flow control is enabled, you must type @kbd{C-\} to get the
|
||||
effect of a @kbd{C-s}, and type @kbd{C-^} to get the effect of a
|
||||
@kbd{C-q}.
|
||||
|
||||
@node Memory Full
|
||||
@subsection Running out of Memory
|
||||
@cindex memory full
|
||||
|
@ -342,12 +304,13 @@ session files, each with its date. You must choose which session to
|
|||
recover from. Typically the one you want is the most recent one. Move
|
||||
point to the one you choose, and type @kbd{C-c C-c}.
|
||||
|
||||
Then @code{recover-session} asks about each of the files that you were
|
||||
editing during that session; it asks whether to recover that file. If
|
||||
you answer @kbd{y} for a file, it shows the dates of that file and its
|
||||
auto-save file, then asks once again whether to recover that file. For
|
||||
the second question, you must confirm with @kbd{yes}. If you do, Emacs
|
||||
visits the file but gets the text from the auto-save file.
|
||||
Then @code{recover-session} considers each of the files that you
|
||||
were editing during that session; for each such file, it asks whether
|
||||
to recover that file. If you answer @kbd{y} for a file, it shows the
|
||||
dates of that file and its auto-save file, then asks once again
|
||||
whether to recover that file. For the second question, you must
|
||||
confirm with @kbd{yes}. If you do, Emacs visits the file but gets the
|
||||
text from the auto-save file.
|
||||
|
||||
When @code{recover-session} is done, the files you've chosen to
|
||||
recover are present in Emacs buffers. You should then save them. Only
|
||||
|
@ -361,6 +324,9 @@ retrieve them from a core dump--provided that a core dump was saved,
|
|||
and that the Emacs executable was not stripped of its debugging
|
||||
symbols.
|
||||
|
||||
As soon as you get the core dump, rename it to another name such as
|
||||
@file{core.emacs}, so that another crash won't overwrite it.
|
||||
|
||||
To use this script, run @code{gdb} with the file name of your Emacs
|
||||
executable and the file name of the core dump, e.g. @samp{gdb
|
||||
/usr/bin/emacs core.emacs}. At the @code{(gdb)} prompt, load the
|
||||
|
@ -375,16 +341,18 @@ not make a backup of its old contents.
|
|||
@node Emergency Escape
|
||||
@subsection Emergency Escape
|
||||
|
||||
Because at times there have been bugs causing Emacs to loop without
|
||||
checking @code{quit-flag}, a special feature causes Emacs to be suspended
|
||||
immediately if you type a second @kbd{C-g} while the flag is already set,
|
||||
so you can always get out of GNU Emacs. Normally Emacs recognizes and
|
||||
clears @code{quit-flag} (and quits!) quickly enough to prevent this from
|
||||
happening. (On MS-DOS and compatible systems, type @kbd{C-@key{BREAK}}
|
||||
twice.)
|
||||
On text-only terminals, the @dfn{emergency escape} feature suspends
|
||||
Emacs immediately if you type @kbd{C-g} a second time before Emacs can
|
||||
actually respond to the first one by quitting. This is so you can
|
||||
always get out of GNU Emacs no matter how badly it might be hung.
|
||||
When things are working properly, Emacs recognizes and handles the
|
||||
first @kbd{C-g} so fast that the second one won't trigger emergency
|
||||
escape. However, if some problem prevents Emacs from handling the
|
||||
first @kbd{C-g} properly, then the second one will get you back to the
|
||||
shell.
|
||||
|
||||
When you resume Emacs after a suspension caused by multiple @kbd{C-g}, it
|
||||
asks two questions before going back to what it had been doing:
|
||||
When you resume Emacs after a suspension caused by emergency escape,
|
||||
it asks two questions before going back to what it had been doing:
|
||||
|
||||
@example
|
||||
Auto-save? (y or n)
|
||||
|
@ -394,29 +362,31 @@ Abort (and dump core)? (y or n)
|
|||
@noindent
|
||||
Answer each one with @kbd{y} or @kbd{n} followed by @key{RET}.
|
||||
|
||||
Saying @kbd{y} to @samp{Auto-save?} causes immediate auto-saving of all
|
||||
modified buffers in which auto-saving is enabled.
|
||||
Saying @kbd{y} to @samp{Auto-save?} causes immediate auto-saving of
|
||||
all modified buffers in which auto-saving is enabled. Saying @kbd{n}
|
||||
skips this.
|
||||
|
||||
Saying @kbd{y} to @samp{Abort (and dump core)?} causes an illegal instruction to be
|
||||
executed, dumping core. This is to enable a wizard to figure out why Emacs
|
||||
was failing to quit in the first place. Execution does not continue
|
||||
after a core dump. If you answer @kbd{n}, execution does continue. With
|
||||
luck, GNU Emacs will ultimately check @code{quit-flag} and quit normally.
|
||||
If not, and you type another @kbd{C-g}, it is suspended again.
|
||||
Saying @kbd{y} to @samp{Abort (and dump core)?} causes Emacs to
|
||||
crash, dumping core. This is to enable a wizard to figure out why
|
||||
Emacs was failing to quit in the first place. Execution does not
|
||||
continue after a core dump.
|
||||
|
||||
If you answer this question @kbd{n}, Emacs execution resumes. With
|
||||
luck, Emacs will ultimately do the requested quit. If not, each
|
||||
subsequent @kbd{C-g} invokes emergency escape again.
|
||||
|
||||
If Emacs is not really hung, just slow, you may invoke the double
|
||||
@kbd{C-g} feature without really meaning to. Then just resume and answer
|
||||
@kbd{n} to both questions, and you will arrive at your former state.
|
||||
Presumably the quit you requested will happen soon.
|
||||
@kbd{C-g} feature without really meaning to. Then just resume and
|
||||
answer @kbd{n} to both questions, and you will get back to the former
|
||||
state. The quit you requested will happen by and by.
|
||||
|
||||
The double @kbd{C-g} feature is turned off when Emacs is running under
|
||||
the X Window System, since you can use the window manager to kill Emacs
|
||||
or to create another window and run another program.
|
||||
Emergency escape is active only for text terminals. On a graphical
|
||||
display that supports multiple windows, you can use the window manager
|
||||
to kill Emacs, or to switch to some other program.
|
||||
|
||||
On MS-DOS and compatible systems, the emergency escape feature is
|
||||
sometimes unavailable, even if you press @kbd{C-@key{BREAK}} twice, when
|
||||
some system call (MS-DOS or BIOS) hangs, or when Emacs is stuck in a
|
||||
very tight endless loop (in C code, @strong{not} in Lisp code).
|
||||
On MS-DOS, you must type @kbd{C-@key{BREAK}} (twice) to cause
|
||||
emergency escape---but there are cases where it won't work, when
|
||||
system call hangs or when Emacs is stuck in a tight loop in C code.
|
||||
|
||||
@node Total Frustration
|
||||
@subsection Help for Total Frustration
|
||||
|
@ -433,9 +403,9 @@ you.
|
|||
@findex doctor
|
||||
Second, type @kbd{M-x doctor @key{RET}}.
|
||||
|
||||
The doctor will help you feel better. Each time you say something to
|
||||
the doctor, you must end it by typing @key{RET} @key{RET}. This lets
|
||||
the doctor know you are finished.
|
||||
The Emacs psychotherapist will help you feel better. Each time you
|
||||
say something to the psychotherapist, you must end it by typing
|
||||
@key{RET} @key{RET}. This indicates you are finished typing.
|
||||
|
||||
@node Bugs, Contributing, Lossage, Top
|
||||
@section Reporting Bugs
|
||||
|
@ -467,9 +437,10 @@ work-around, or give you additional information about related issues.
|
|||
@node Bug Criteria
|
||||
@subsection When Is There a Bug
|
||||
|
||||
If Emacs executes an illegal instruction, or dies with an operating
|
||||
system error message that indicates a problem in the program (as opposed to
|
||||
something like ``disk full''), then it is certainly a bug.
|
||||
If Emacs accesses an invalid memory location (``segmentation
|
||||
fault''), or exits with an operating system error message that
|
||||
indicates a problem in the program (as opposed to something like
|
||||
``disk full''), then it is certainly a bug.
|
||||
|
||||
If Emacs updates the display in a way that does not correspond to what is
|
||||
in the buffer, then it is certainly a bug. If a command seems to do the
|
||||
|
@ -502,9 +473,10 @@ come to such a conclusion out of ignorance of some of the existing
|
|||
features. It is probably best not to complain about such a problem
|
||||
until you have checked the documentation in the usual ways, feel
|
||||
confident that you understand it, and know for certain that what you
|
||||
want is not available. If you are not sure what the command is
|
||||
supposed to do after a careful reading of the manual, check the index
|
||||
and glossary for any terms that may be unclear.
|
||||
want is not available. Ask other Emacs users, too. If you are not
|
||||
sure what the command is supposed to do after a careful reading of the
|
||||
manual, check the index and glossary for any terms that may be
|
||||
unclear.
|
||||
|
||||
If after careful rereading of the manual you still do not understand
|
||||
what the command should do, that indicates a bug in the manual, which
|
||||
|
@ -533,10 +505,10 @@ implemented, they will be useless; meanwhile, lacking the facts, we will
|
|||
have no real information about the bug.
|
||||
|
||||
For example, suppose that you type @kbd{C-x C-f /glorp/baz.ugh
|
||||
@key{RET}}, visiting a file which (you know) happens to be rather large,
|
||||
and Emacs displayed @samp{I feel pretty today}. The best way to report
|
||||
the bug is with a sentence like the preceding one, because it gives all
|
||||
the facts.
|
||||
@key{RET}}, visiting a file which (you know) happens to be rather
|
||||
large, and Emacs displays @samp{I feel pretty today}. The best way to
|
||||
report the bug is with a sentence like the preceding one, because it
|
||||
gives all the facts.
|
||||
|
||||
A bad way would be to assume that the problem is due to the size of
|
||||
the file and say, ``I visited a large file, and Emacs displayed @samp{I
|
||||
|
@ -559,7 +531,7 @@ characters you typed since starting the Emacs session.
|
|||
you @emph{know} that it makes no difference which visiting command is used.
|
||||
Similarly, rather than saying ``if I have three characters on the line,''
|
||||
say ``after I type @kbd{@key{RET} A B C @key{RET} C-p},'' if that is
|
||||
the way you entered the text.@refill
|
||||
the way you entered the text.
|
||||
|
||||
So please don't guess any explanations when you report a bug. If you
|
||||
want to actually @emph{debug} the problem, and report explanations that
|
||||
|
@ -591,19 +563,6 @@ in order to ask you for more information. If your data is more than
|
|||
instead, offer to send it on request, or make it available by ftp and
|
||||
say where.
|
||||
|
||||
If you can't send electronic mail, then mail the bug report on paper
|
||||
or machine-readable media to this address:
|
||||
|
||||
@format
|
||||
GNU Emacs Bugs
|
||||
Free Software Foundation
|
||||
51 Franklin Street, Fifth Floor
|
||||
Boston, MA 02110-1301 USA
|
||||
@end format
|
||||
|
||||
We do not promise to fix the bug; but if the bug is serious,
|
||||
or ugly, or easy to fix, chances are we will want to.
|
||||
|
||||
@findex report-emacs-bug
|
||||
A convenient way to send a bug report for Emacs is to use the command
|
||||
@kbd{M-x report-emacs-bug}. This sets up a mail buffer (@pxref{Sending
|
||||
|
@ -658,7 +617,7 @@ The complete text of any files needed to reproduce the bug.
|
|||
If you can tell us a way to cause the problem without visiting any files,
|
||||
please do so. This makes it much easier to debug. If you do need files,
|
||||
make sure you arrange for us to see their exact contents. For example, it
|
||||
can often matter whether there are spaces at the ends of lines, or a
|
||||
can matter whether there are spaces at the ends of lines, or a
|
||||
newline after the last line in the buffer (nothing ought to care whether
|
||||
the last line is terminated, but try telling the bugs that).
|
||||
|
||||
|
@ -668,7 +627,7 @@ The precise commands we need to type to reproduce the bug.
|
|||
@findex open-dribble-file
|
||||
@cindex dribble file
|
||||
@cindex logging keystrokes
|
||||
The easy way to record the input to Emacs precisely is to write a
|
||||
The easy way to record the input to Emacs precisely is to write a
|
||||
dribble file. To start the file, execute the Lisp expression
|
||||
|
||||
@example
|
||||
|
@ -705,7 +664,7 @@ Emacs displays the screen for the first time.
|
|||
|
||||
Be warned: it is often difficult, and sometimes impossible, to fix a
|
||||
terminal-dependent bug without access to a terminal of the type that
|
||||
stimulates the bug.@refill
|
||||
stimulates the bug.
|
||||
|
||||
@item
|
||||
If non-@acronym{ASCII} text or internationalization is relevant, the locale that
|
||||
|
@ -765,7 +724,7 @@ part.
|
|||
@pindex Edebug
|
||||
To make a backtrace for the error, use @kbd{M-x toggle-debug-on-error}
|
||||
before the error happens (that is to say, you must give that command
|
||||
and then make the bug happen). This causes the error to run the Lisp
|
||||
and then make the bug happen). This causes the error to start the Lisp
|
||||
debugger, which shows you a backtrace. Copy the text of the
|
||||
debugger's backtrace into the bug report. @xref{Debugger,, The Lisp
|
||||
Debugger, elisp, the Emacs Lisp Reference Manual}, for information on
|
||||
|
@ -1028,11 +987,9 @@ new function, all you need to say about it is that it is new. If you
|
|||
feel that the purpose needs explaining, it probably does---but put the
|
||||
explanation in comments in the code. It will be more useful there.
|
||||
|
||||
Please read the @file{ChangeLog} files in the @file{src} and @file{lisp}
|
||||
directories to see what sorts of information to put in, and to learn the
|
||||
style that we use. If you would like your name to appear in the header
|
||||
line, showing who made the change, send us the header line.
|
||||
@xref{Change Log}.
|
||||
Please read the @file{ChangeLog} files in the @file{src} and
|
||||
@file{lisp} directories to see what sorts of information to put in,
|
||||
and to learn the style that we use. @xref{Change Log}.
|
||||
|
||||
@item
|
||||
When you write the fix, keep in mind that we can't install a change that
|
||||
|
@ -1071,8 +1028,8 @@ rest of Emacs.
|
|||
|
||||
The development version of Emacs can be downloaded from the CVS
|
||||
repository where it is actively maintained by a group of developers.
|
||||
See the Emacs project page http://savannah.gnu.org/projects/emacs/ for
|
||||
details.
|
||||
See the Emacs project page
|
||||
@url{http://savannah.gnu.org/projects/emacs/} for details.
|
||||
|
||||
@node Service, Copying, Contributing, Top
|
||||
@section How To Get Help with GNU Emacs
|
||||
|
|
|
@ -1,3 +1,64 @@
|
|||
2006-04-08 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* w32fns.c (w32_wnd_proc) <WM_MOUSEMOVE>: Ignore mouse movements
|
||||
if a menu is active on this frame.
|
||||
|
||||
2006-04-08 Dan Nicolaescu <dann@ics.uci.edu>
|
||||
|
||||
* lisp.h (report_file_error): Mark as NO_RETURN.
|
||||
|
||||
2006-04-08 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* alloc.c [STDC_HEADERS]: Include stddef.h.
|
||||
|
||||
* lisp.h (PSEUDOVECSIZE): Fix last change.
|
||||
|
||||
2006-04-08 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* process.h (struct Lisp_Process): Replace Lisp_Objects `pid',
|
||||
`raw_status_high', and `raw_status_low' with plain integers, and move
|
||||
them to the end of the structure.
|
||||
|
||||
* alloc.c (allocate_process): Use PSEUDOVECSIZE to initialize the
|
||||
pseudovector's size field so only the Lisp_Object fields get GC'd.
|
||||
|
||||
* process.c (update_status, make_process, Fdelete_process)
|
||||
(Fprocess_status, list_processes_1, start_process_unwind)
|
||||
(create_process, Fmake_network_process, server_accept_connection)
|
||||
(wait_reading_process_output, send_process, Fprocess_running_child_p)
|
||||
(process_send_signal, proc_encode_coding_system, Fprocess_send_eof)
|
||||
(sigchld_handler, status_notify): Adjust to new non-Lisp fields for
|
||||
`pid' and `raw_status'.
|
||||
(Fprocess_id, Fsignal_process): Same, and additionally use floats when
|
||||
representing PIDs that are larger than most-positive-fixnum.
|
||||
|
||||
* keymap.c (describe_map): Only use XINT if we checked INTEGERP.
|
||||
|
||||
* lisp.h (OFFSETOF, PSEUDOVECSIZE): New macros.
|
||||
|
||||
2006-04-08 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* w32fns.c (Fx_show_tip): Add 3 to the 5th arg of SetWindowPos.
|
||||
|
||||
2006-04-03 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* editfns.c (TM_YEAR_IN_ASCTIME_RANGE): New macro, identical to
|
||||
../lib-src/b2m.c and ../lib-src/editfns.c.
|
||||
(Fcurrent_time_string): Use it.
|
||||
Document that the year might not consume 4 columns if it's outside
|
||||
the range 1000-9999.
|
||||
Check for asctime failure.
|
||||
Don't assume that the output string length is always exactly 24.
|
||||
|
||||
2006-04-03 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
|
||||
|
||||
* macterm.c (XTread_socket): Initialize variable `f' before its use.
|
||||
|
||||
2006-04-03 Kenichi Handa <handa@m17n.org>
|
||||
|
||||
* image.c: Include "charset.h" and "coding.h".
|
||||
(x_find_image_file): Return an encoded file name.
|
||||
|
||||
2006-04-01 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* configure: Regenerated.
|
||||
|
|
20
src/alloc.c
20
src/alloc.c
|
@ -23,6 +23,10 @@ Boston, MA 02110-1301, USA. */
|
|||
#include <stdio.h>
|
||||
#include <limits.h> /* For CHAR_BIT. */
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
#include <stddef.h> /* For offsetof, used by PSEUDOVECSIZE. */
|
||||
#endif
|
||||
|
||||
#ifdef ALLOC_DEBUG
|
||||
#undef INLINE
|
||||
#endif
|
||||
|
@ -3003,13 +3007,17 @@ allocate_frame ()
|
|||
struct Lisp_Process *
|
||||
allocate_process ()
|
||||
{
|
||||
EMACS_INT len = VECSIZE (struct Lisp_Process);
|
||||
struct Lisp_Vector *v = allocate_vectorlike (len, MEM_TYPE_PROCESS);
|
||||
/* Memory-footprint of the object in nb of Lisp_Object fields. */
|
||||
EMACS_INT memlen = VECSIZE (struct Lisp_Process);
|
||||
/* Size if we only count the actual Lisp_Object fields (which need to be
|
||||
traced by the GC). */
|
||||
EMACS_INT lisplen = PSEUDOVECSIZE (struct Lisp_Process, pid);
|
||||
struct Lisp_Vector *v = allocate_vectorlike (memlen, MEM_TYPE_PROCESS);
|
||||
EMACS_INT i;
|
||||
|
||||
for (i = 0; i < len; ++i)
|
||||
for (i = 0; i < lisplen; ++i)
|
||||
v->contents[i] = Qnil;
|
||||
v->size = len;
|
||||
v->size = lisplen;
|
||||
|
||||
return (struct Lisp_Process *) v;
|
||||
}
|
||||
|
@ -5515,6 +5523,10 @@ mark_object (arg)
|
|||
if (size & PSEUDOVECTOR_FLAG)
|
||||
size &= PSEUDOVECTOR_SIZE_MASK;
|
||||
|
||||
/* Note that this size is not the memory-footprint size, but only
|
||||
the number of Lisp_Object fields that we should trace.
|
||||
The distinction is used e.g. by Lisp_Process which places extra
|
||||
non-Lisp_Object fields at the end of the structure. */
|
||||
for (i = 0; i < size; i++) /* and then mark its elements */
|
||||
mark_object (ptr->contents[i]);
|
||||
}
|
||||
|
|
|
@ -74,6 +74,13 @@ extern char **environ;
|
|||
|
||||
#define TM_YEAR_BASE 1900
|
||||
|
||||
/* Nonzero if TM_YEAR is a struct tm's tm_year value that causes
|
||||
asctime to have well-defined behavior. */
|
||||
#ifndef TM_YEAR_IN_ASCTIME_RANGE
|
||||
# define TM_YEAR_IN_ASCTIME_RANGE(tm_year) \
|
||||
(1000 - TM_YEAR_BASE <= (tm_year) && (tm_year) <= 9999 - TM_YEAR_BASE)
|
||||
#endif
|
||||
|
||||
extern size_t emacs_strftimeu P_ ((char *, size_t, const char *,
|
||||
const struct tm *, int));
|
||||
static int tm_diff P_ ((struct tm *, struct tm *));
|
||||
|
@ -1831,7 +1838,8 @@ usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE) */)
|
|||
DEFUN ("current-time-string", Fcurrent_time_string, Scurrent_time_string, 0, 1, 0,
|
||||
doc: /* Return the current time, as a human-readable string.
|
||||
Programs can use this function to decode a time,
|
||||
since the number of columns in each field is fixed.
|
||||
since the number of columns in each field is fixed
|
||||
if the year is in the range 1000-9999.
|
||||
The format is `Sun Sep 16 01:03:52 1973'.
|
||||
However, see also the functions `decode-time' and `format-time-string'
|
||||
which provide a much more powerful and general facility.
|
||||
|
@ -1845,31 +1853,23 @@ but this is considered obsolete. */)
|
|||
Lisp_Object specified_time;
|
||||
{
|
||||
time_t value;
|
||||
char buf[30];
|
||||
struct tm *tm;
|
||||
register char *tem;
|
||||
|
||||
if (! lisp_time_argument (specified_time, &value, NULL))
|
||||
error ("Invalid time specification");
|
||||
/* Do not use ctime, since it has undefined behavior with
|
||||
out-of-range time stamps. This avoids a core dump triggered by
|
||||
(current-time-string '(2814749767106 0)) on 64-bit Solaris 8. See
|
||||
<http://www.opengroup.org/austin/mailarchives/ag/msg09294.html>
|
||||
for more details about this portability problem. */
|
||||
|
||||
/* Convert to a string, checking for out-of-range time stamps.
|
||||
Don't use 'ctime', as that might dump core if VALUE is out of
|
||||
range. */
|
||||
tm = localtime (&value);
|
||||
/* Checking for out-of-range time stamps avoids buffer overruns that
|
||||
cause core dump on some systems (e.g., 64-bit Solaris), and also
|
||||
preserves the historic behavior of always returning a fixed-size
|
||||
24-character string. */
|
||||
if (! (tm && -999 - TM_YEAR_BASE <= tm->tm_year
|
||||
&& tm->tm_year <= 9999 - TM_YEAR_BASE))
|
||||
if (! (tm && TM_YEAR_IN_ASCTIME_RANGE (tm->tm_year) && (tem = asctime (tm))))
|
||||
error ("Specified time is not representable");
|
||||
tem = asctime (tm);
|
||||
|
||||
strncpy (buf, tem, 24);
|
||||
buf[24] = 0;
|
||||
/* Remove the trailing newline. */
|
||||
tem[strlen (tem) - 1] = '\0';
|
||||
|
||||
return build_string (buf);
|
||||
return build_string (tem);
|
||||
}
|
||||
|
||||
/* Yield A - B, measured in seconds.
|
||||
|
|
11
src/image.c
11
src/image.c
|
@ -39,6 +39,8 @@ Boston, MA 02110-1301, USA. */
|
|||
#include "blockinput.h"
|
||||
#include "systime.h"
|
||||
#include <epaths.h>
|
||||
#include "charset.h"
|
||||
#include "coding.h"
|
||||
|
||||
|
||||
#ifdef HAVE_X_WINDOWS
|
||||
|
@ -2246,8 +2248,8 @@ static unsigned char *slurp_file P_ ((char *, int *));
|
|||
|
||||
|
||||
/* Find image file FILE. Look in data-directory, then
|
||||
x-bitmap-file-path. Value is the full name of the file found, or
|
||||
nil if not found. */
|
||||
x-bitmap-file-path. Value is the encoded full name of the file
|
||||
found, or nil if not found. */
|
||||
|
||||
Lisp_Object
|
||||
x_find_image_file (file)
|
||||
|
@ -2267,7 +2269,10 @@ x_find_image_file (file)
|
|||
if (fd == -1)
|
||||
file_found = Qnil;
|
||||
else
|
||||
close (fd);
|
||||
{
|
||||
file_found = ENCODE_FILE (file_found);
|
||||
close (fd);
|
||||
}
|
||||
|
||||
UNGCPRO;
|
||||
return file_found;
|
||||
|
|
|
@ -3362,7 +3362,7 @@ describe_map (map, prefix, elt_describer, partial, shadow,
|
|||
if (INTEGERP (vect[i].event))
|
||||
{
|
||||
while (i + 1 < slots_used
|
||||
&& XINT (vect[i + 1].event) == XINT (vect[i].event) + 1
|
||||
&& EQ (vect[i+1].event, make_number (XINT (vect[i].event) + 1))
|
||||
&& !NILP (Fequal (vect[i + 1].definition, definition))
|
||||
&& vect[i].shadowed == vect[i + 1].shadowed)
|
||||
i++;
|
||||
|
|
34
src/lisp.h
34
src/lisp.h
|
@ -298,7 +298,11 @@ enum pvec_type
|
|||
#endif
|
||||
};
|
||||
|
||||
/* For convenience, we also store the number of elements in these bits. */
|
||||
/* For convenience, we also store the number of elements in these bits.
|
||||
Note that this size is not necessarily the memory-footprint size, but
|
||||
only the number of Lisp_Object fields (that need to be traced by the GC).
|
||||
The distinction is used e.g. by Lisp_Process which places extra
|
||||
non-Lisp_Object fields at the end of the structure. */
|
||||
#define PSEUDOVECTOR_SIZE_MASK 0x1ff
|
||||
|
||||
/* Number of bits to put in each character in the internal representation
|
||||
|
@ -705,12 +709,12 @@ struct Lisp_String
|
|||
unsigned char *data;
|
||||
};
|
||||
|
||||
/* If a struct is made to look like a vector, this macro returns the length
|
||||
of the shortest vector that would hold that struct. */
|
||||
#define VECSIZE(type) ((sizeof (type) - (sizeof (struct Lisp_Vector) \
|
||||
- sizeof (Lisp_Object)) \
|
||||
+ sizeof(Lisp_Object) - 1) /* round up */ \
|
||||
/ sizeof (Lisp_Object))
|
||||
#ifdef offsetof
|
||||
#define OFFSETOF(type,field) offsetof(type,field)
|
||||
#else
|
||||
#define OFFSETOF(type,field) \
|
||||
((int)((char*)&((type*)0)->field - (char*)0))
|
||||
#endif
|
||||
|
||||
struct Lisp_Vector
|
||||
{
|
||||
|
@ -719,6 +723,20 @@ struct Lisp_Vector
|
|||
Lisp_Object contents[1];
|
||||
};
|
||||
|
||||
/* If a struct is made to look like a vector, this macro returns the length
|
||||
of the shortest vector that would hold that struct. */
|
||||
#define VECSIZE(type) ((sizeof (type) - (sizeof (struct Lisp_Vector) \
|
||||
- sizeof (Lisp_Object)) \
|
||||
+ sizeof(Lisp_Object) - 1) /* round up */ \
|
||||
/ sizeof (Lisp_Object))
|
||||
|
||||
/* Like VECSIZE, but used when the pseudo-vector has non-Lisp_Object fields
|
||||
at the end and we need to compute the number of Lisp_Object fields (the
|
||||
ones that the GC needs to trace). */
|
||||
#define PSEUDOVECSIZE(type, nonlispfield) \
|
||||
((OFFSETOF(type, nonlispfield) - OFFSETOF(struct Lisp_Vector, contents[0])) \
|
||||
/ sizeof (Lisp_Object))
|
||||
|
||||
/* A char-table is a kind of vectorlike, with contents are like a
|
||||
vector but with a few other slots. For some purposes, it makes
|
||||
sense to handle a char-table with type struct Lisp_Vector. An
|
||||
|
@ -2880,7 +2898,7 @@ EXFUN (Ffile_readable_p, 1);
|
|||
EXFUN (Ffile_executable_p, 1);
|
||||
EXFUN (Fread_file_name, 6);
|
||||
extern Lisp_Object close_file_unwind P_ ((Lisp_Object));
|
||||
extern void report_file_error P_ ((const char *, Lisp_Object));
|
||||
extern void report_file_error P_ ((const char *, Lisp_Object)) NO_RETURN;
|
||||
extern int internal_delete_file P_ ((Lisp_Object));
|
||||
extern void syms_of_fileio P_ ((void));
|
||||
extern void init_fileio_once P_ ((void));
|
||||
|
|
|
@ -10476,6 +10476,8 @@ XTread_socket (sd, expected, hold_quit)
|
|||
|
||||
ObscureCursor ();
|
||||
|
||||
f = mac_focus_frame (dpyinfo);
|
||||
|
||||
if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
|
||||
&& !EQ (f->tool_bar_window, dpyinfo->mouse_face_window))
|
||||
{
|
||||
|
@ -10521,7 +10523,7 @@ XTread_socket (sd, expected, hold_quit)
|
|||
inev.modifiers |= (extra_keyboard_modifiers
|
||||
& (meta_modifier | alt_modifier
|
||||
| hyper_modifier | super_modifier));
|
||||
XSETFRAME (inev.frame_or_window, mac_focus_frame (dpyinfo));
|
||||
XSETFRAME (inev.frame_or_window, f);
|
||||
break;
|
||||
|
||||
case kHighLevelEvent:
|
||||
|
|
|
@ -414,10 +414,10 @@ update_status (p)
|
|||
struct Lisp_Process *p;
|
||||
{
|
||||
union { int i; WAITTYPE wt; } u;
|
||||
u.i = XFASTINT (p->raw_status_low) + (XFASTINT (p->raw_status_high) << 16);
|
||||
eassert (p->raw_status_new);
|
||||
u.i = p->raw_status;
|
||||
p->status = status_convert (u.wt);
|
||||
p->raw_status_low = Qnil;
|
||||
p->raw_status_high = Qnil;
|
||||
p->raw_status_new = 0;
|
||||
}
|
||||
|
||||
/* Convert a process status word in Unix format to
|
||||
|
@ -619,11 +619,10 @@ make_process (name)
|
|||
|
||||
XSETINT (p->infd, -1);
|
||||
XSETINT (p->outfd, -1);
|
||||
XSETFASTINT (p->pid, 0);
|
||||
XSETFASTINT (p->tick, 0);
|
||||
XSETFASTINT (p->update_tick, 0);
|
||||
p->raw_status_low = Qnil;
|
||||
p->raw_status_high = Qnil;
|
||||
p->pid = 0;
|
||||
p->raw_status_new = 0;
|
||||
p->status = Qrun;
|
||||
p->mark = Fmake_marker ();
|
||||
|
||||
|
@ -790,8 +789,7 @@ nil, indicating the current buffer's process. */)
|
|||
process = get_process (process);
|
||||
p = XPROCESS (process);
|
||||
|
||||
p->raw_status_low = Qnil;
|
||||
p->raw_status_high = Qnil;
|
||||
p->raw_status_new = 0;
|
||||
if (NETCONN1_P (p))
|
||||
{
|
||||
p->status = Fcons (Qexit, Fcons (make_number (0), Qnil));
|
||||
|
@ -841,7 +839,7 @@ nil, indicating the current buffer's process. */)
|
|||
return process;
|
||||
|
||||
p = XPROCESS (process);
|
||||
if (!NILP (p->raw_status_low))
|
||||
if (p->raw_status_new)
|
||||
update_status (p);
|
||||
status = p->status;
|
||||
if (CONSP (status))
|
||||
|
@ -866,7 +864,7 @@ If PROCESS has not yet exited or died, return 0. */)
|
|||
register Lisp_Object process;
|
||||
{
|
||||
CHECK_PROCESS (process);
|
||||
if (!NILP (XPROCESS (process)->raw_status_low))
|
||||
if (XPROCESS (process)->raw_status_new)
|
||||
update_status (XPROCESS (process));
|
||||
if (CONSP (XPROCESS (process)->status))
|
||||
return XCAR (XCDR (XPROCESS (process)->status));
|
||||
|
@ -881,7 +879,9 @@ For a network connection, this value is nil. */)
|
|||
register Lisp_Object process;
|
||||
{
|
||||
CHECK_PROCESS (process);
|
||||
return XPROCESS (process)->pid;
|
||||
return (XPROCESS (process)->pid
|
||||
? make_fixnum_or_float (XPROCESS (process)->pid)
|
||||
: Qnil);
|
||||
}
|
||||
|
||||
DEFUN ("process-name", Fprocess_name, Sprocess_name, 1, 1, 0,
|
||||
|
@ -1363,7 +1363,7 @@ list_processes_1 (query_only)
|
|||
Finsert (1, &p->name);
|
||||
Findent_to (i_status, minspace);
|
||||
|
||||
if (!NILP (p->raw_status_low))
|
||||
if (p->raw_status_new)
|
||||
update_status (p);
|
||||
symbol = p->status;
|
||||
if (CONSP (p->status))
|
||||
|
@ -1735,7 +1735,7 @@ start_process_unwind (proc)
|
|||
abort ();
|
||||
|
||||
/* Was PROC started successfully? */
|
||||
if (XINT (XPROCESS (proc)->pid) <= 0)
|
||||
if (XPROCESS (proc)->pid <= 0)
|
||||
remove_process (proc);
|
||||
|
||||
return Qnil;
|
||||
|
@ -1946,7 +1946,7 @@ create_process (process, new_argv, current_dir)
|
|||
in the table after this function has returned; if it does
|
||||
it might cause call-process to hang and subsequent asynchronous
|
||||
processes to get their return values scrambled. */
|
||||
XSETINT (XPROCESS (process)->pid, -1);
|
||||
XPROCESS (process)->pid = -1;
|
||||
|
||||
BLOCK_INPUT;
|
||||
|
||||
|
@ -2137,7 +2137,7 @@ create_process (process, new_argv, current_dir)
|
|||
else
|
||||
{
|
||||
/* vfork succeeded. */
|
||||
XSETFASTINT (XPROCESS (process)->pid, pid);
|
||||
XPROCESS (process)->pid = pid;
|
||||
|
||||
#ifdef WINDOWSNT
|
||||
register_child (pid, inchannel);
|
||||
|
@ -3350,7 +3350,7 @@ usage: (make-network-process &rest ARGS) */)
|
|||
p->kill_without_query = Qt;
|
||||
if ((tem = Fplist_get (contact, QCstop), !NILP (tem)))
|
||||
p->command = Qt;
|
||||
p->pid = Qnil;
|
||||
p->pid = 0;
|
||||
XSETINT (p->infd, inch);
|
||||
XSETINT (p->outfd, outch);
|
||||
if (is_server && socktype == SOCK_STREAM)
|
||||
|
@ -4066,7 +4066,7 @@ server_accept_connection (server, channel)
|
|||
p->sentinel = ps->sentinel;
|
||||
p->filter = ps->filter;
|
||||
p->command = Qnil;
|
||||
p->pid = Qnil;
|
||||
p->pid = 0;
|
||||
XSETINT (p->infd, s);
|
||||
XSETINT (p->outfd, s);
|
||||
p->status = Qrun;
|
||||
|
@ -4366,9 +4366,9 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display,
|
|||
|
||||
/* Don't wait for output from a non-running process. Just
|
||||
read whatever data has already been received. */
|
||||
if (wait_proc != 0 && !NILP (wait_proc->raw_status_low))
|
||||
if (wait_proc && wait_proc->raw_status_new)
|
||||
update_status (wait_proc);
|
||||
if (wait_proc != 0
|
||||
if (wait_proc
|
||||
&& ! EQ (wait_proc->status, Qrun)
|
||||
&& ! EQ (wait_proc->status, Qconnect))
|
||||
{
|
||||
|
@ -4752,7 +4752,7 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display,
|
|||
/* Preserve status of processes already terminated. */
|
||||
XSETINT (XPROCESS (proc)->tick, ++process_tick);
|
||||
deactivate_process (proc);
|
||||
if (!NILP (XPROCESS (proc)->raw_status_low))
|
||||
if (XPROCESS (proc)->raw_status_new)
|
||||
update_status (XPROCESS (proc));
|
||||
if (EQ (XPROCESS (proc)->status, Qrun))
|
||||
XPROCESS (proc)->status
|
||||
|
@ -5293,7 +5293,7 @@ send_process (proc, buf, len, object)
|
|||
VMS_PROC_STUFF *vs, *get_vms_process_pointer();
|
||||
#endif /* VMS */
|
||||
|
||||
if (! NILP (p->raw_status_low))
|
||||
if (p->raw_status_new)
|
||||
update_status (p);
|
||||
if (! EQ (p->status, Qrun))
|
||||
error ("Process %s not running", SDATA (p->name));
|
||||
|
@ -5550,8 +5550,7 @@ send_process (proc, buf, len, object)
|
|||
proc = process_sent_to;
|
||||
p = XPROCESS (proc);
|
||||
#endif
|
||||
p->raw_status_low = Qnil;
|
||||
p->raw_status_high = Qnil;
|
||||
p->raw_status_new = 0;
|
||||
p->status = Fcons (Qexit, Fcons (make_number (256), Qnil));
|
||||
XSETINT (p->tick, ++process_tick);
|
||||
deactivate_process (proc);
|
||||
|
@ -5666,7 +5665,7 @@ return t unconditionally. */)
|
|||
|
||||
gid = emacs_get_tty_pgrp (p);
|
||||
|
||||
if (gid == XFASTINT (p->pid))
|
||||
if (gid == p->pid)
|
||||
return Qnil;
|
||||
return Qt;
|
||||
}
|
||||
|
@ -5713,7 +5712,7 @@ process_send_signal (process, signo, current_group, nomsg)
|
|||
/* If we are using pgrps, get a pgrp number and make it negative. */
|
||||
if (NILP (current_group))
|
||||
/* Send the signal to the shell's process group. */
|
||||
gid = XFASTINT (p->pid);
|
||||
gid = p->pid;
|
||||
else
|
||||
{
|
||||
#ifdef SIGNALS_VIA_CHARACTERS
|
||||
|
@ -5832,7 +5831,7 @@ process_send_signal (process, signo, current_group, nomsg)
|
|||
if (gid == -1)
|
||||
/* If we can't get the information, assume
|
||||
the shell owns the tty. */
|
||||
gid = XFASTINT (p->pid);
|
||||
gid = p->pid;
|
||||
|
||||
/* It is not clear whether anything really can set GID to -1.
|
||||
Perhaps on some system one of those ioctls can or could do so.
|
||||
|
@ -5842,12 +5841,12 @@ process_send_signal (process, signo, current_group, nomsg)
|
|||
#else /* ! defined (TIOCGPGRP ) */
|
||||
/* Can't select pgrps on this system, so we know that
|
||||
the child itself heads the pgrp. */
|
||||
gid = XFASTINT (p->pid);
|
||||
gid = p->pid;
|
||||
#endif /* ! defined (TIOCGPGRP ) */
|
||||
|
||||
/* If current_group is lambda, and the shell owns the terminal,
|
||||
don't send any signal. */
|
||||
if (EQ (current_group, Qlambda) && gid == XFASTINT (p->pid))
|
||||
if (EQ (current_group, Qlambda) && gid == p->pid)
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -5855,8 +5854,7 @@ process_send_signal (process, signo, current_group, nomsg)
|
|||
{
|
||||
#ifdef SIGCONT
|
||||
case SIGCONT:
|
||||
p->raw_status_low = Qnil;
|
||||
p->raw_status_high = Qnil;
|
||||
p->raw_status_new = 0;
|
||||
p->status = Qrun;
|
||||
XSETINT (p->tick, ++process_tick);
|
||||
if (!nomsg)
|
||||
|
@ -5875,7 +5873,7 @@ process_send_signal (process, signo, current_group, nomsg)
|
|||
#endif
|
||||
case SIGKILL:
|
||||
#ifdef VMS
|
||||
sys$forcex (&(XFASTINT (p->pid)), 0, 1);
|
||||
sys$forcex (&(p->pid), 0, 1);
|
||||
whoosh:
|
||||
#endif
|
||||
flush_pending_output (XINT (p->infd));
|
||||
|
@ -5887,7 +5885,7 @@ process_send_signal (process, signo, current_group, nomsg)
|
|||
obvious alternative. */
|
||||
if (no_pgrp)
|
||||
{
|
||||
kill (XFASTINT (p->pid), signo);
|
||||
kill (p->pid, signo);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -5900,7 +5898,7 @@ process_send_signal (process, signo, current_group, nomsg)
|
|||
}
|
||||
else
|
||||
{
|
||||
gid = - XFASTINT (p->pid);
|
||||
gid = - p->pid;
|
||||
kill (gid, signo);
|
||||
}
|
||||
#else /* ! defined (TIOCSIGSEND) */
|
||||
|
@ -6020,11 +6018,17 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */)
|
|||
(process, sigcode)
|
||||
Lisp_Object process, sigcode;
|
||||
{
|
||||
Lisp_Object pid;
|
||||
pid_t pid;
|
||||
|
||||
if (INTEGERP (process))
|
||||
{
|
||||
pid = process;
|
||||
pid = XINT (process);
|
||||
goto got_it;
|
||||
}
|
||||
|
||||
if (FLOATP (process))
|
||||
{
|
||||
pid = (pid_t) XFLOAT (process);
|
||||
goto got_it;
|
||||
}
|
||||
|
||||
|
@ -6033,8 +6037,8 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */)
|
|||
Lisp_Object tem;
|
||||
if (tem = Fget_process (process), NILP (tem))
|
||||
{
|
||||
pid = Fstring_to_number (process, make_number (10));
|
||||
if (XINT (pid) != 0)
|
||||
pid = XINT (Fstring_to_number (process, make_number (10)));
|
||||
if (pid > 0)
|
||||
goto got_it;
|
||||
}
|
||||
process = tem;
|
||||
|
@ -6047,7 +6051,7 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */)
|
|||
|
||||
CHECK_PROCESS (process);
|
||||
pid = XPROCESS (process)->pid;
|
||||
if (!INTEGERP (pid) || XINT (pid) <= 0)
|
||||
if (pid <= 0)
|
||||
error ("Cannot signal process %s", SDATA (XPROCESS (process)->name));
|
||||
|
||||
got_it:
|
||||
|
@ -6166,7 +6170,7 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */)
|
|||
|
||||
#undef handle_signal
|
||||
|
||||
return make_number (kill (XINT (pid), XINT (sigcode)));
|
||||
return make_number (kill (pid, XINT (sigcode)));
|
||||
}
|
||||
|
||||
DEFUN ("process-send-eof", Fprocess_send_eof, Sprocess_send_eof, 0, 1, 0,
|
||||
|
@ -6190,7 +6194,7 @@ text to PROCESS after you call this function. */)
|
|||
coding = proc_encode_coding_system[XINT (XPROCESS (proc)->outfd)];
|
||||
|
||||
/* Make sure the process is really alive. */
|
||||
if (! NILP (XPROCESS (proc)->raw_status_low))
|
||||
if (XPROCESS (proc)->raw_status_new)
|
||||
update_status (XPROCESS (proc));
|
||||
if (! EQ (XPROCESS (proc)->status, Qrun))
|
||||
error ("Process %s not running", SDATA (XPROCESS (proc)->name));
|
||||
|
@ -6215,7 +6219,7 @@ text to PROCESS after you call this function. */)
|
|||
for communication with the subprocess, call shutdown to cause EOF.
|
||||
(In some old system, shutdown to socketpair doesn't work.
|
||||
Then we just can't win.) */
|
||||
if (NILP (XPROCESS (proc)->pid)
|
||||
if (XPROCESS (proc)->pid == 0
|
||||
|| XINT (XPROCESS (proc)->outfd) == XINT (XPROCESS (proc)->infd))
|
||||
shutdown (XINT (XPROCESS (proc)->outfd), 1);
|
||||
/* In case of socketpair, outfd == infd, so don't close it. */
|
||||
|
@ -6352,7 +6356,7 @@ sigchld_handler (signo)
|
|||
{
|
||||
proc = XCDR (XCAR (tail));
|
||||
p = XPROCESS (proc);
|
||||
if (GC_EQ (p->childp, Qt) && XINT (p->pid) == pid)
|
||||
if (GC_EQ (p->childp, Qt) && p->pid == pid)
|
||||
break;
|
||||
p = 0;
|
||||
}
|
||||
|
@ -6364,7 +6368,7 @@ sigchld_handler (signo)
|
|||
{
|
||||
proc = XCDR (XCAR (tail));
|
||||
p = XPROCESS (proc);
|
||||
if (GC_INTEGERP (p->pid) && XINT (p->pid) == -1)
|
||||
if (p->pid == -1)
|
||||
break;
|
||||
p = 0;
|
||||
}
|
||||
|
@ -6377,8 +6381,8 @@ sigchld_handler (signo)
|
|||
|
||||
XSETINT (p->tick, ++process_tick);
|
||||
u.wt = w;
|
||||
XSETINT (p->raw_status_low, u.i & 0xffff);
|
||||
XSETINT (p->raw_status_high, u.i >> 16);
|
||||
p->raw_status = u.i;
|
||||
p->raw_status_new = 1;
|
||||
|
||||
/* If process has terminated, stop waiting for its output. */
|
||||
if ((WIFSIGNALED (w) || WIFEXITED (w))
|
||||
|
@ -6575,7 +6579,7 @@ status_notify (deleting_process)
|
|||
buffer = p->buffer;
|
||||
|
||||
/* Get the text to use for the message. */
|
||||
if (!NILP (p->raw_status_low))
|
||||
if (p->raw_status_new)
|
||||
update_status (p);
|
||||
msg = status_message (p);
|
||||
|
||||
|
|
|
@ -51,8 +51,6 @@ struct Lisp_Process
|
|||
Lisp_Object log;
|
||||
/* Buffer that output is going to */
|
||||
Lisp_Object buffer;
|
||||
/* Number of this process */
|
||||
Lisp_Object pid;
|
||||
/* t if this is a real child process.
|
||||
For a net connection, it is a plist based on the arguments to make-network-process. */
|
||||
Lisp_Object childp;
|
||||
|
@ -63,10 +61,6 @@ struct Lisp_Process
|
|||
/* Non-nil means kill silently if Emacs is exited.
|
||||
This is the inverse of the `query-on-exit' flag. */
|
||||
Lisp_Object kill_without_query;
|
||||
/* Record the process status in the raw form in which it comes from `wait'.
|
||||
This is to avoid consing in a signal handler. */
|
||||
Lisp_Object raw_status_low;
|
||||
Lisp_Object raw_status_high;
|
||||
/* Symbol indicating status of process.
|
||||
This may be a symbol: run, open, or closed.
|
||||
Or it may be a list, whose car is stop, exit or signal
|
||||
|
@ -112,6 +106,19 @@ struct Lisp_Process
|
|||
Lisp_Object read_output_delay;
|
||||
/* Skip reading this process on next read. */
|
||||
Lisp_Object read_output_skip;
|
||||
|
||||
/* After this point, there are no Lisp_Objects any more. */
|
||||
|
||||
/* Number of this process.
|
||||
allocate_process assumes this is the first non-Lisp_Object field.
|
||||
A value 0 is used for pseudo-processes such as network connections. */
|
||||
pid_t pid;
|
||||
/* Record the process status in the raw form in which it comes from `wait'.
|
||||
This is to avoid consing in a signal handler. The `raw_status_new'
|
||||
flag indicates that `raw_status' contains a new status that still
|
||||
needs to be synced to `status'. */
|
||||
int raw_status_new : 1;
|
||||
int raw_status;
|
||||
};
|
||||
|
||||
/* Every field in the preceding structure except for the first two
|
||||
|
|
15
src/w32fns.c
15
src/w32fns.c
|
@ -3298,6 +3298,14 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
|
|||
return (msg == WM_XBUTTONDOWN || msg == WM_XBUTTONUP);
|
||||
|
||||
case WM_MOUSEMOVE:
|
||||
/* Ignore mouse movements as long as the menu is active. These
|
||||
movements are processed by the window manager anyway, and
|
||||
it's wrong to handle them as if they happened on the
|
||||
underlying frame. */
|
||||
f = x_window_to_frame (dpyinfo, hwnd);
|
||||
if (f && f->output_data.w32->menubar_active)
|
||||
return 0;
|
||||
|
||||
/* If the mouse has just moved into the frame, start tracking
|
||||
it, so we will be notified when it leaves the frame. Mouse
|
||||
tracking only works under W98 and NT4 and later. On earlier
|
||||
|
@ -7730,9 +7738,12 @@ Text larger than the specified size is clipped. */)
|
|||
AdjustWindowRect (&rect, f->output_data.w32->dwStyle,
|
||||
FRAME_EXTERNAL_MENU_BAR (f));
|
||||
|
||||
/* Position and size tooltip, and put it in the topmost group. */
|
||||
/* Position and size tooltip, and put it in the topmost group.
|
||||
The add-on of 3 to the 5th argument is a kludge: without it,
|
||||
some fonts cause the last character of the tip to be truncated,
|
||||
for some obscure reason. */
|
||||
SetWindowPos (FRAME_W32_WINDOW (f), HWND_TOPMOST,
|
||||
root_x, root_y, rect.right - rect.left,
|
||||
root_x, root_y, rect.right - rect.left + 3,
|
||||
rect.bottom - rect.top, SWP_NOACTIVATE);
|
||||
|
||||
/* Ensure tooltip is on top of other topmost windows (eg menus). */
|
||||
|
|
Loading…
Add table
Reference in a new issue