Mercurial > emacs
changeset 90143:146c086df160
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-37
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 241-257)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 59-65)
- Update from CVS
- Merge from emacs--cvs-trunk--0
- (mm-string-to-multibyte): Use Gnus trunk definition.
line wrap: on
line diff
--- a/ChangeLog Mon Apr 11 03:59:40 2005 +0000 +++ b/ChangeLog Thu Apr 14 05:03:52 2005 +0000 @@ -1,3 +1,8 @@ +2005-04-13 Lute Kamstra <lute@gnu.org> + + * make-dist: Don't use DONTCOMPILE from lisp/Makefile.in; check + for "no-byte-compile: t" in the file instead. + 2005-03-16 Stefan Monnier <monnier@iro.umontreal.ca> * configure.in <Motif>: Don't let a special LessTif/Motif1.2 install
--- a/admin/FOR-RELEASE Mon Apr 11 03:59:40 2005 +0000 +++ b/admin/FOR-RELEASE Thu Apr 14 05:03:52 2005 +0000 @@ -20,6 +20,8 @@ ** Enhance scroll-bar to handle tall line (similar to line-move). +** Adapt mouse-sel-mode to mouse-1-click-follows-link. + * FATAL ERRORS @@ -35,8 +37,6 @@ ** Clean up flymake.el to follow Emacs Lisp conventions. -** Fix up url-ldap.el. - * BUGS ** Ange-ftp should ignore irrelevant IPv6 errors: @@ -179,7 +179,7 @@ man/picture.texi Joakim Verona <joakim@verona.se> Chong Yidong man/programs.texi "Stephen Eglen" Chong Yidong man/regs.texi "Luc Teirlinck" Chong Yidong -man/rmail.texi Chong Yidong +man/rmail.texi Chong Yidong "Luc Teirlinck" man/screen.texi "Luc Teirlinck" Chong Yidong man/search.texi "Luc Teirlinck" Chong Yidong man/sending.texi Chong Yidong "Luc Teirlinck" @@ -275,7 +275,7 @@ etc/TUTORIAL.pt_BR Marcelo Toledo etc/TUTORIAL.ro etc/TUTORIAL.ru -etc/TUTORIAL.sk +etc/TUTORIAL.sk Pavel Janík <Pavel@Janik.cz> etc/TUTORIAL.sl Primoz PETERLIN <primoz.peterlin@biofiz.mf.uni-lj.si> etc/TUTORIAL.sv Mats Lidell <matsl@contactor.se> etc/TUTORIAL.th
--- a/etc/ChangeLog Mon Apr 11 03:59:40 2005 +0000 +++ b/etc/ChangeLog Thu Apr 14 05:03:52 2005 +0000 @@ -1,3 +1,24 @@ +2005-04-13 Pavel Jan,Am(Bk <Pavel@Janik.cz> + + * TUTORIAL.sk: Updated header. + +2005-04-12 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * NEWS: Mention cursorBlink resource. + +2005-04-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> + + * NEWS: Mention dynamic change of keyboard-coding-system on Mac. + +2005-04-10 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * NEWS: Mention fontSet for Lucid menus. + +2005-04-10 Masatake YAMATO <jet@gyve.org> + + * compilation.txt (symbol): Added gcov-file + gcov-bb-file gcov-never-called-line gcov-called-line . + 2005-04-08 Kenichi Handa <handa@m17n.org> * TUTORIAL.ja: Updated header, contents synchronized with
--- a/etc/NEWS Mon Apr 11 03:59:40 2005 +0000 +++ b/etc/NEWS Thu Apr 14 05:03:52 2005 +0000 @@ -182,6 +182,19 @@ * Changes in Emacs 22.1 +** Xterm Mouse mode is now enabled by default in terminal emulators +compatible with xterm. This means that simple use of the mouse is +now, by default, controlled by Emacs--basically, only non-modified +single clicks are supported. The normal xterm mouse functionality +for such clicks is still available by holding down the SHIFT key +when you press the mouse button. + +This is not without problems. For instance, clicking with the mouse +on the wrong place may produce unexpected results without warning. +Put `(xterm-mouse-mode 0)' in your .emacs, or disable the option +`xterm-mouse-mode' through Custom, if you prefer all mouse clicks to +be handled by the terminal emulator. + ** Improved Thai support. A new minor mode `thai-word-mode' (which is automatically activated if you select Thai as a language environment) changes key bindings of most word-oriented commands to @@ -427,11 +440,16 @@ ** Telnet now prompts you for a port number with C-u M-x telnet. +++ -** New command line option -Q or --bare-bones. +** New command line option -Q or --quick. This is like using -q --no-site-file, but in addition it also disables -the menu-bar, the tool-bar, the scroll-bars, tool tips, the blinking -cursor, and the fancy startup screen. +the fancy startup screen. + ++++ +** New command line option -D or --basic-display. + +Disables the menu-bar, the tool-bar, the scroll-bars, tool tips, and +the blinking cursor. +++ ** New command line option -nbc or --no-blinking-cursor disables @@ -1038,6 +1056,9 @@ XIM by default, the X resource useXIM can be used to turn it on. +++ +** The X resource cursorBlink can be used to turn off cursor blinking. + ++++ ** `undo-only' does an undo which does not redo any previous undo. --- @@ -1280,6 +1301,11 @@ ** The pop up menus for Lucid now stay up if you do a fast click and can be navigated with the arrow keys (like Gtk+, Mac and W32). ++++ +** The Lucid menus can display multilingual text in your locale. You have +to explicitly specify a fontSet resource for this to work, for example +`-xrm "Emacs*fontSet: -*-helvetica-medium-r-*--*-120-*-*-*-*-*-*,*"'. + --- ** Dialogs for Lucid/Athena and Lesstif/Motif now pops down when pressing ESC, like they do for Gtk+, Mac and W32. @@ -2516,6 +2542,11 @@ ** New command `recode-region' decodes the region again by a specified coding system. +** On Mac OS, the value of the variable `keyboard-coding-system' is +now dynamically changed according to the current keyboard script. The +variable `mac-keyboard-text-encoding' and the constants +`kTextEncodingMacRoman', `kTextEncodingISOLatin1', and +`kTextEncodingISOLatin2' are obsolete. * New modes and packages in Emacs 22.1
--- a/etc/TUTORIAL.sk Mon Apr 11 03:59:40 2005 +0000 +++ b/etc/TUTORIAL.sk Thu Apr 14 05:03:52 2005 +0000 @@ -1,5 +1,5 @@ -tútorial k Emacsu. -Copyright (c) 1985 Free Software Foundation, Inc; podmienky pozri na konci. +Tútorial k Emacsu. Podmienky pozri na konci. +Copyright (c) 1985, 1996, 1998, 2001, 2002, 2005 Free Software Foundation. Do češtiny preložil Milan Zamazal <pdm@zamazal.org>, do slovenčiny Miroslav Vaško <zemiak@zoznam.sk>.
--- a/etc/compilation.txt Mon Apr 11 03:59:40 2005 +0000 +++ b/etc/compilation.txt Thu Apr 14 05:03:52 2005 +0000 @@ -341,6 +341,32 @@ bloofle defined( /users/wolfgang/foo.c(4) ), but never used +* GCOV (test coverage program) + +symbol: gcov-file gcov-bb-file gcov-never-called-line gcov-called-line + + -: 0:Source:foo.c + -: 0:Object:foo.bb + -: 1:/* $ gcc -fprofile-arcs -ftest-coverage foo.c + -: 2: $ ./a.out + -: 3: $ gcov foo.c + -: 4: LANG=C gcov foo.c + -: 5: 62.50% of 8 lines executed in file foo.c + -: 6: Creating foo.c.gcov.*/ + -: 7:int + -: 8:main(int argc, char ** argv) + 1: 9:{ + 1: 10: int r; + 1: 11: if (argc == 1) + 1: 12: r = 1; + #####: 13: else if (argc == 2) + #####: 14: r = 2; + -: 15: else + #####: 16: r = 0; + 1: 17: return r; + -: 18:} + + * Directory tracking Directories are matched via `compilation-directory-matcher'. Files which are
--- a/lisp/ChangeLog Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/ChangeLog Thu Apr 14 05:03:52 2005 +0000 @@ -1,3 +1,304 @@ +2005-04-13 Luc Teirlinck <teirllm@auburn.edu> + + * startup.el (command-line): Handle `xterm-mouse-mode' before + reading init file. + + * xt-mouse.el (xterm-mouse-mode): Adapt to above change. + +2005-04-13 Glenn Morris <gmorris@ast.cam.ac.uk> + + * progmodes/sh-script.el (sh-here-document-word): Make it a + defcustom. Doc fix. + (sh-add): Bash uses $(( )) for arithmetic. + (sh-while-getopts) <sh>: Set OPTIND back to 1 at end. + (sh-maybe-here-document): Remove quotes and leading whitespace + from heredoc word when closing. Indent heredoc with tabs if word + starts with "-". + +2005-04-13 Richard M. Stallman <rms@gnu.org> + + * simple.el (undo): Fix previous change. + + * custom.el (defface): Doc fix. + +2005-04-13 Lute Kamstra <lute@gnu.org> + + * Makefile.in (DONTCOMPILE): Remove list. + (compile, compile-always): Don't use DONTCOMPILE. + (update-authors): Load the library in which batch-update-authors + is defined. + * makefile.w32-in (DONTCOMPILE): Remove list. + (compile, compile-always): Fix comments. + (update-authors): Load the library in which batch-update-authors + is defined. + + * generic-x.el (generic-mode-ini-file-find-file-hook): + Rename to ini-generic-mode-find-file-hook. + Keep generic-mode-ini-file-find-file-hook as an alias. + (ini-generic-mode-find-file-hook): Rename from + generic-mode-ini-file-find-file-hook. Fix docstring. + (ini-generic-mode): Docstring change. + (bat-generic-mode-run-as-comint): Silence the byte compiler. + + * help.el (describe-key-briefly): UNTRANSLATED can be nil when + called from lisp. + + * generic.el: Move to the emacs-lisp subdir. + +2005-04-12 Dan Nicolaescu <dann@ics.uci.edu> + + * term/xterm.el (function-key-map): Add mappings for A-, C-, S- + and C-S- function and cursor motion keys. + +2005-04-12 Luc Teirlinck <teirllm@auburn.edu> + + * startup.el (command-line): Enable Xterm Mouse mode by default. + * xt-mouse.el (xterm-mouse-mode): Provide correct standard value + for Custom. No longer show "Mouse" in mode line when enabled. + Doc fix. + +2005-04-12 Kim F. Storm <storm@cua.dk> + + * emulation/cua-base.el (cua-rectangle-face) + (cua-rectangle-noselect-face): Define face attributes here. + + * emulation/cua-rect.el (cua--init-rectangles): Remove face setup. + +2005-04-12 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * startup.el (command-line): Turn off blinking cursor if + cursorBlink in resources is off or false. + +2005-04-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> + + * term/mac-win.el (dnd): Require dnd. + (mac-drag-n-drop): Call dnd-handle-one-url. + (kTextEncodingMacRoman, kTextEncodingISOLatin1) + (kTextEncodingISOLatin2): Remove constants. + (mac-script-code-coding-systems): New constant. + (mac-handle-language-change): New function. + (special-event-map): Bind it to `language-change' event. + (mac-centraleurroman, mac-cyrillic): New coding systems. + (mac-font-encoder-list, ccl-encode-mac-centraleurroman-font) + (ccl-encode-mac-cyrillic-font): Rename mac-centraleurroman-encoder + and mac-cyrillic-encoder to encode-mac-centraleurroman and + encode-mac-cyrillic, respectively. + +2005-04-12 Nick Roberts <nickrob@snap.net.nz> + + * progmodes/gud.el, progmodes/gdb-ui.el (gdb-assembler-mode): + Don't set overlay-arrow-string to "=>" as this is done + globally in C now. + +2005-04-12 Lute Kamstra <lute@gnu.org> + + * generic-x.el (rc-generic-mode, rul-generic-mode): Fix + auto-mode-alist entries. + (etc-fstab-generic-mode): Tweak fontification. + + * generic.el (generic-make-keywords-list): Fix docstring. + (generic-mode-internal): Simplify generic-font-lock-keywords. + +2005-04-11 Rajesh Vaidheeswarran <rv@gnu.org> + + * whitespace.el (whitespace-buffer-leading, + whitespace-buffer-trailing): Revert the incorrect test + inversion. However, fix the highlight area for the leading and + trailing whitespaces to show space. + +2005-04-11 Rajesh Vaidheeswarran <rv@gnu.org> + + * whitespace.el (whitespace-version): Bump to 3.5 + + (whitespace-buffer-leading, whitespace-buffer-trailing): Invert + sense of the test to highlight the whitespace. + +2005-04-12 Nick Roberts <nickrob@snap.net.nz> + + * progmodes/gud.el (gud-display-line): GUD uses its own + overlay arrow now so don't set overlay-arrow-string. + (gud-pdb-command-name): Revert back to "pdb" (2004-04-26). + +2005-04-11 Dan Nicolaescu <dann@ics.uci.edu> + + * term.el (term-ansi-current-bold, term-ansi-current-underline) + (term-ansi-current-reverse, term-ansi-current-invisible) + (term-ansi-face-already-done): Change to boolean. + (term-reset-terminal, term-handle-colors-array): Handle the above + vars accordingly. + (term-buffer-vertical-motion): Rename from buffer-vertical-motion. + (term-emulate-terminal): Use the new name. + + * faces.el (secondary-selection): Use yellow1, not yellow. + (trailing-whitespace): Use red1, not red. + +2005-04-11 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * dired.el (dired-mode): Use dnd-* instead of x-dnd-* + (dired-dnd-handle-local-file): Call dnd-get-local-file-name. + (dired-dnd-handle-file): Call dnd-get-local-file-uri + + * cus-edit.el (dnd): New group. + + * term/w32-win.el (dnd): Require dnd + (w32-drag-n-drop): Call dnd-handle-one-url. + + * x-dnd.el: Require dnd. + (x-dnd-handle-uri-list, x-dnd-handle-file-name): Call + dnd-handle-one-url. + (x-dnd-types-alist, x-dnd-insert-utf8-text) + (x-dnd-insert-utf16-text, x-dnd-insert-ctext): Change x-dnd-insert-text + to dnd-insert-text. + (x-dnd-protocol-alist, x-dnd-open-file-other-window) + (x-dnd-handle-one-url, x-dnd-get-local-file-uri) + (x-dnd-get-local-file-name, x-dnd-open-local-file) + (x-dnd-open-file, x-dnd-insert-text): Moved to dnd.el (without x-). + + * dnd.el (dnd-protocol-alist): New file with generic DND functions. + +2005-04-11 JUAN-LEON Lahoz Garcia <juanleon1@gmail.com> + + * wdired.el: Doc fixes. + (wdired-confirm-overwrite): Rename from wdired-is-ok-overwrite. + (wdired-use-dired-vertical-movement): Rename from + wdired-always-move-to-filename-beginning. + (wdired-mode-map): Use `ignore' instead of `wdired-newline'. + (wdired-change-to-wdired-mode): Change mode name. + (wdired-newline): Delete. + +2005-04-11 Richard M. Stallman <rms@gnu.org> + + * whitespace.el (whitespace-highlight-the-space): + Don't call whitespace-unhighlight-the-space here. + + * simple.el (undo): Record t in undo-equiv-table + for the redo record made by an undo-in-region. + +2005-04-12 Nick Roberts <nickrob@snap.net.nz> + + * progmodes/gdb-ui.el (gdb-display-inferior-io-buffer) + (gdb-frame-inferior-io-buffer): New Functions to control + display of separate IO buffer. + (menu): Add them to menu-bar. + (gdb-display-buffer): Check for buffer another frame. + Protect GUD buffer. + (gdb-setup-windows): Create IO buffer if not already there. + (gdb-memory-mode): Remove purecopy noops. + +2005-04-11 Glenn Morris <gmorris@ast.cam.ac.uk> + + * progmodes/f90.el (f90-electric-insert): Add optional prefix arg, + and pass to self-insert-command. + +2005-04-11 Lute Kamstra <lute@gnu.org> + + * generic.el: Commentary section cleanup. + (generic): Delete. + (generic-use-find-file-hook, generic-lines-to-scan) + (generic-find-file-regexp, generic-ignore-files-regexp) + (default-generic-mode, generic-mode-find-file-hook) + (generic-mode-ini-file-find-file-hook): Move to generic-x.el. + * generic-x.el (generic-x): Docstring fix. Put it in the data group. + (generic-use-find-file-hook, generic-lines-to-scan) + (generic-find-file-regexp, generic-ignore-files-regexp) + (default-generic-mode, generic-mode-find-file-hook) + (generic-mode-ini-file-find-file-hook): Move from generic.el. + +2005-04-10 Karl Fogel <kfogel@red-bean.com> + + * bookmark.el (bookmark-write-file): Catch errors writing file. + This is the same change as revision 1.30 of saveplace.el. + +2005-04-10 Richard M. Stallman <rms@gnu.org> + + * startup.el (fancy-splash-tail): Update copyright year. + (command-line): Split part of -Q into -D. + (emacs-basic-display): New defvar. + (fancy-splash-text): Correct name of menu item. + + * saveplace.el (save-place-alist-to-file): Catch errors writing file. + + * info.el (Info-fontify-node): Handle fontification of multiple * Menu + lines in one node. + + * comint.el (comint-send-input): New arg ARTIFICIAL. + Callers in this file changed. + + * abbrev.el (define-abbrevs): Read system abbrevs properly. + + * emacs-lisp/map-ynp.el (map-y-or-n-p): Clarify RET/q in help message. + +2005-04-10 Chong Yidong <cyd@stupidchicken.com> + + * url/url-ldap.el (url-ldap): Add docstring. Fix call to + `ldap-search-internal'. + +2005-04-10 Stefan Monnier <monnier@iro.umontreal.ca> + + * files.el (set-auto-mode-1): Use line-end-position. + + * international/latin-1.el: + * international/latin-2.el: + * international/latin-3.el: + * international/latin-4.el: + * international/latin-5.el: + * international/latin-8.el: + * international/latin-9.el: Give punctuation syntax to NBSP. + + * textmodes/bibtex.el (bibtex-autokey-titleword-ignore) + (bibtex-reference-key, bibtex-autokey-demangle-name, bibtex-mode): + Use char-classes to accept non-ascii letters, accepted in some recent + bibtex implementations. + +2005-04-10 Luc Teirlinck <teirllm@auburn.edu> + + * custom.el (custom-set-minor-mode): Any non-nil value for the + variable should enable the mode when set through Custom. + +2005-04-10 Stefan Monnier <monnier@iro.umontreal.ca> + + * progmodes/vhdl-mode.el (vhdl-mode-map-init): Don't override default + TAB binding so tab-always-indent is obeyed. + (vhdl-minibuffer-local-map): Move initialization into declaration. + (vhdl-mode-abbrev-table-init): Mark the abbrevs as `system'. + (vhdl-run-when-idle, vhdl-create-mode-menu, vhdl-character-to-event) + (vhdl-hooked-abbrev): Avoid test for XEmacs. + (vhdl-current-line): Use line-beginning-position. + (vhdl-doc-variable, vhdl-doc-mode): Call help-setup-xref before + with-output-to-temp-buffer, so the current position can be recorded. + +2005-04-10 Masatake YAMATO <jet@gyve.org> + + * progmodes/compile.el (compilation-error-regexp-alist-alist): + Add regexp for gcov. + +2005-04-06 Katsumi Yamaoka <yamaoka@jpl.org> + + * calendar/time-date.el (time-to-seconds, seconds-to-time) + (days-to-time, time-subtract, time-add): Don't use the #xhhhh + syntax which Emacs 20 doesn't support. + +2005-04-09 Richard M. Stallman <rms@gnu.org> + + * help.el (describe-key-briefly, describe-key): Replace + strings as event types with "(any string)". + +2005-04-09 Stefan Monnier <monnier@iro.umontreal.ca> + + * arc-mode.el (archive-mode-map): Move initialization into + the declaration. Override *all* bindings of `undo'. + (archive-lemacs): Remove, use (featurep 'xemacs) instead. + +2005-04-09 Jay Belanger <belanger@truman.edu> + + * calc/calc-units.el (math-standard-units): Redefine Watt hour as W*hr. + +2005-04-09 Dan Nicolaescu <dann@ics.uci.edu> + + * term/xterm.el (xterm-rgb-convert-to-16bit): Simplify. + (xterm-register-default-colors): Update color values computation + to match xterm-200. + 2005-04-09 Kenichi Handa <handa@m17n.org> * international/code-pages.el (iso-latin-7): Fix the map.
--- a/lisp/Makefile.in Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/Makefile.in Thu Apr 14 05:03:52 2005 +0000 @@ -1,5 +1,5 @@ # Maintenance productions for the Lisp directory -# Copyright (C) 2000, 01, 03, 2004 Free Software Foundation, Inc. +# Copyright (C) 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc. # This file is part of GNU Emacs. @@ -39,90 +39,6 @@ lisptagsfiles2 = $(lisp)/[a-zA-Z]*/[a-zA-Z]*.el ETAGS = ../lib-src/etags -# Files which should not be compiled. If you change the name `DONTCOMPILE' -# to something different, you'll have to change make-dist as well, and -# modify the lists in $lisp and $shortlisp on src/Makefile.in. -# -# - emacs-lisp/cl-specs.el: only contains `def-edebug-spec's so there's -# no point compiling it, although it doesn't hurt. - -DONTCOMPILE = \ - $(lisp)/charprop.el \ - $(lisp)/cus-load.el \ - $(lisp)/emacs-lisp/cl-specs.el \ - $(lisp)/eshell/esh-maint.el \ - $(lisp)/eshell/esh-groups.el \ - $(lisp)/finder-inf.el \ - $(lisp)/forms-d2.el \ - $(lisp)/forms-pass.el \ - $(lisp)/generic-x.el \ - $(lisp)/international/latin1-disp.el \ - $(lisp)/international/mule-conf.el \ - $(lisp)/international/uni-bidi.el \ - $(lisp)/international/uni-category.el \ - $(lisp)/international/uni-combining.el \ - $(lisp)/international/uni-comment.el \ - $(lisp)/international/uni-decimal.el \ - $(lisp)/international/uni-decomposition.el \ - $(lisp)/international/uni-digit.el \ - $(lisp)/international/uni-lowercase.el \ - $(lisp)/international/uni-mirrored.el \ - $(lisp)/international/uni-name.el \ - $(lisp)/international/uni-numeric.el \ - $(lisp)/international/uni-old-name.el \ - $(lisp)/international/uni-titlecase.el \ - $(lisp)/international/uni-uppercase.el \ - $(lisp)/language/czech.el \ - $(lisp)/language/devanagari.el \ - $(lisp)/language/malayalam.el \ - $(lisp)/language/tamil.el \ - $(lisp)/language/kannada.el \ - $(lisp)/language/english.el \ - $(lisp)/language/greek.el \ - $(lisp)/language/hebrew.el \ - $(lisp)/language/japanese.el \ - $(lisp)/language/korean.el \ - $(lisp)/language/lao.el \ - $(lisp)/language/misc-lang.el \ - $(lisp)/language/romanian.el \ - $(lisp)/language/slovak.el \ - $(lisp)/language/thai.el \ - $(lisp)/language/utf-8-lang.el \ - $(lisp)/language/georgian.el \ - $(lisp)/language/vietnamese.el \ - $(lisp)/language/cyrillic.el \ - $(lisp)/language/chinese.el \ - $(lisp)/language/indian.el \ - $(lisp)/loaddefs.el \ - $(lisp)/ldefs-boot.el \ - $(lisp)/loadup.el \ - $(lisp)/mail/blessmail.el \ - $(lisp)/patcomp.el \ - $(lisp)/paths.el \ - $(lisp)/play/bruce.el \ - $(lisp)/subdirs.el \ - $(lisp)/term/internal.el \ - $(lisp)/term/AT386.el \ - $(lisp)/term/apollo.el \ - $(lisp)/term/bobcat.el \ - $(lisp)/term/iris-ansi.el \ - $(lisp)/term/keyswap.el \ - $(lisp)/term/linux.el \ - $(lisp)/term/lk201.el \ - $(lisp)/term/news.el \ - $(lisp)/term/vt102.el \ - $(lisp)/term/vt125.el \ - $(lisp)/term/vt200.el \ - $(lisp)/term/vt201.el \ - $(lisp)/term/vt220.el \ - $(lisp)/term/vt240.el \ - $(lisp)/term/vt300.el \ - $(lisp)/term/vt320.el \ - $(lisp)/term/vt400.el \ - $(lisp)/term/vt420.el \ - $(lisp)/term/wyse50.el \ - $(lisp)/version.el - # Elisp files auto-generated. AUTOGENEL = loaddefs.el \ cus-load.el \ @@ -205,7 +121,7 @@ # Update the AUTHORS file. update-authors: - $(emacs) -f batch-update-authors $(srcdir)/AUTHORS $(srcdir) + $(emacs) -l authors -f batch-update-authors $(srcdir)/AUTHORS $(srcdir) TAGS: $(lisptagsfiles1) $(lisptagsfiles2) els=`echo $(lisptagsfiles1) $(lisptagsfiles2) | sed -e "s,$(lisp)/loaddefs[^ ]*,," -e "s,$(lisp)/ldefs-boot[^ ]*,,"`; \ @@ -220,31 +136,23 @@ .el.elc: $(lisp)/subdirs.el -$(emacs) -f batch-byte-compile $< -$(DONTCOMPILE:.el=.elc): - -rm -f $@ - -# Compile all Lisp files, except those from DONTCOMPILE, -# but don't recompile those that are up to date. +# Compile all Lisp files, but don't recompile those that are up to +# date. Some files don't actually get compiled because they set the +# local variable no-byte-compile. -# All .elc files are made writable -# before compilation in case we checked out read-only (CVS option -r). -# Files MUST be compiled one by one. If we compile several files in a -# row we can't make sure that the compilation environment is clean. -# We also set the load-path of the Emacs used for compilation to the -# current directory and its subdirectories, to make sure require's and -# load's in the files being compiled find the right files. - -# NOTE about DONTCOMPILE: in the `echo <foo> | sort | uniq -u' we pass -# $(DONTCOMPILE) twice. This is in case one of the files in DONTCOMPILE -# is absent. -stef +# All .elc files are made writable before compilation in case we +# checked out read-only (CVS option -r). Files MUST be compiled one by +# one. If we compile several files in a row we can't make sure that +# the compilation environment is clean. We also set the load-path of +# the Emacs used for compilation to the current directory and its +# subdirectories, to make sure require's and load's in the files being +# compiled find the right files. compile: $(lisp)/subdirs.el doit find $(lisp) -name "*.elc" -print | xargs chmod +w >/dev/null 2>&1; \ wd=$(lisp); $(setwins); \ - elpat=`echo $$wins | tr ' ' '\012\012' | \ + els=`echo $$wins | tr ' \011' '\012\012' | \ sed -e 's|\(.\)$$|\1/|' -e 's|^\./||' -e 's|$$|*.el|'`; \ - els=`echo $$elpat $(DONTCOMPILE) $(DONTCOMPILE) $(COMPILE_FIRST) | \ - tr ' ' '\012\012' | sort | uniq -u`; \ for el in $(COMPILE_FIRST) $$els; do \ if test -f $$el; \ then \ @@ -253,17 +161,17 @@ fi \ done -# Compile all Lisp files, except those from DONTCOMPILE. This -# is like `compile' but compiles files unconditionally. +# Compile all Lisp files. This is like `compile' but compiles files +# unconditionally. Some files don't actually get compiled because they +# set the local variable no-byte-compile. + compile-always: $(lisp)/subdirs.el doit # `|| true' prevents old Bash versions from getting confused # by an error. find $(lisp) -name "*.elc" -print | xargs chmod +w >/dev/null 2>&1 || true; \ wd=$(lisp); $(setwins); \ - elpat=`echo $$wins | tr ' ' '\012\012' | \ + els=`echo $$wins | tr ' \011' '\012\012' | \ sed -e 's|\(.\)$$|\1/|' -e 's|^\./||' -e 's|$$|*.el|'`; \ - els=`echo $$elpat $(DONTCOMPILE) $(DONTCOMPILE) $(COMPILE_FIRST) | \ - tr ' ' '\012\012' | sort | uniq -u`; \ for el in $(COMPILE_FIRST) $$els; do \ if test -f $$el; \ then \
--- a/lisp/abbrev.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/abbrev.el Thu Apr 14 05:03:52 2005 +0000 @@ -172,15 +172,18 @@ (while (and (not (eobp)) (re-search-forward "^(" nil t)) (let* ((buf (current-buffer)) (table (read buf)) - abbrevs name hook exp count) + abbrevs name hook exp count sys) (forward-line 1) (while (progn (forward-line 1) (not (eolp))) - (setq name (read buf) count (read buf) exp (read buf)) + (setq name (read buf) count (read buf)) + (if (equal count '(sys)) + (setq sys t count (read buf))) + (setq exp (read buf)) (skip-chars-backward " \t\n\f") (setq hook (if (not (eolp)) (read buf))) (skip-chars-backward " \t\n\f") - (setq abbrevs (cons (list name exp hook count) abbrevs))) + (setq abbrevs (cons (list name exp hook count sys) abbrevs))) (define-abbrev-table table abbrevs))))) (defun read-abbrev-file (&optional file quietly)
--- a/lisp/arc-mode.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/arc-mode.el Thu Apr 14 05:03:52 2005 +0000 @@ -1,6 +1,6 @@ ;;; arc-mode.el --- simple editing of archives -;; Copyright (C) 1995, 1997, 1998, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1997, 1998, 2003, 2005 Free Software Foundation, Inc. ;; Author: Morten Welinder <terra@gnu.org> ;; Keywords: archives msdog editing major-mode @@ -330,7 +330,111 @@ (defvar archive-proper-file-start nil "Position of real archive's start.") (defvar archive-read-only nil "Non-nil if the archive is read-only on disk.") (defvar archive-local-name nil "Name of local copy of remote archive.") -(defvar archive-mode-map nil "Local keymap for archive mode listings.") +(defvar archive-mode-map + (let ((map (make-keymap))) + (suppress-keymap map) + (define-key map " " 'archive-next-line) + (define-key map "a" 'archive-alternate-display) + ;;(define-key map "c" 'archive-copy) + (define-key map "d" 'archive-flag-deleted) + (define-key map "\C-d" 'archive-flag-deleted) + (define-key map "e" 'archive-extract) + (define-key map "f" 'archive-extract) + (define-key map "\C-m" 'archive-extract) + (define-key map "g" 'revert-buffer) + (define-key map "h" 'describe-mode) + (define-key map "m" 'archive-mark) + (define-key map "n" 'archive-next-line) + (define-key map "\C-n" 'archive-next-line) + (define-key map [down] 'archive-next-line) + (define-key map "o" 'archive-extract-other-window) + (define-key map "p" 'archive-previous-line) + (define-key map "q" 'quit-window) + (define-key map "\C-p" 'archive-previous-line) + (define-key map [up] 'archive-previous-line) + (define-key map "r" 'archive-rename-entry) + (define-key map "u" 'archive-unflag) + (define-key map "\M-\C-?" 'archive-unmark-all-files) + (define-key map "v" 'archive-view) + (define-key map "x" 'archive-expunge) + (define-key map "\177" 'archive-unflag-backwards) + (define-key map "E" 'archive-extract-other-window) + (define-key map "M" 'archive-chmod-entry) + (define-key map "G" 'archive-chgrp-entry) + (define-key map "O" 'archive-chown-entry) + + (if (fboundp 'command-remapping) + (progn + (define-key map [remap advertised-undo] 'archive-undo) + (define-key map [remap undo] 'archive-undo)) + (substitute-key-definition 'advertised-undo 'archive-undo map global-map) + (substitute-key-definition 'undo 'archive-undo map global-map)) + + (define-key map + (if (featurep 'xemacs) 'button2 [mouse-2]) 'archive-mouse-extract) + + (if (featurep 'xemacs) + () ; out of luck + + (define-key map [menu-bar immediate] + (cons "Immediate" (make-sparse-keymap "Immediate"))) + (define-key map [menu-bar immediate alternate] + '(menu-item "Alternate Display" archive-alternate-display + :enable (boundp (archive-name "alternate-display")) + :help "Toggle alternate file info display")) + (define-key map [menu-bar immediate view] + '(menu-item "View This File" archive-view + :help "Display file at cursor in View Mode")) + (define-key map [menu-bar immediate display] + '(menu-item "Display in Other Window" archive-display-other-window + :help "Display file at cursor in another window")) + (define-key map [menu-bar immediate find-file-other-window] + '(menu-item "Find in Other Window" archive-extract-other-window + :help "Edit file at cursor in another window")) + (define-key map [menu-bar immediate find-file] + '(menu-item "Find This File" archive-extract + :help "Extract file at cursor and edit it")) + + (define-key map [menu-bar mark] + (cons "Mark" (make-sparse-keymap "Mark"))) + (define-key map [menu-bar mark unmark-all] + '(menu-item "Unmark All" archive-unmark-all-files + :help "Unmark all marked files")) + (define-key map [menu-bar mark deletion] + '(menu-item "Flag" archive-flag-deleted + :help "Flag file at cursor for deletion")) + (define-key map [menu-bar mark unmark] + '(menu-item "Unflag" archive-unflag + :help "Unmark file at cursor")) + (define-key map [menu-bar mark mark] + '(menu-item "Mark" archive-mark + :help "Mark file at cursor")) + + (define-key map [menu-bar operate] + (cons "Operate" (make-sparse-keymap "Operate"))) + (define-key map [menu-bar operate chown] + '(menu-item "Change Owner..." archive-chown-entry + :enable (fboundp (archive-name "chown-entry")) + :help "Change owner of marked files")) + (define-key map [menu-bar operate chgrp] + '(menu-item "Change Group..." archive-chgrp-entry + :enable (fboundp (archive-name "chgrp-entry")) + :help "Change group ownership of marked files")) + (define-key map [menu-bar operate chmod] + '(menu-item "Change Mode..." archive-chmod-entry + :enable (fboundp (archive-name "chmod-entry")) + :help "Change mode (permissions) of marked files")) + (define-key map [menu-bar operate rename] + '(menu-item "Rename to..." archive-rename-entry + :enable (fboundp (archive-name "rename-entry")) + :help "Rename marked files")) + ;;(define-key map [menu-bar operate copy] + ;; '(menu-item "Copy to..." archive-copy)) + (define-key map [menu-bar operate expunge] + '(menu-item "Expunge Marked Files" archive-expunge + :help "Delete all flagged files from archive")) + map)) + "Local keymap for archive mode listings.") (defvar archive-file-name-indent nil "Column where file names start.") (defvar archive-remote nil "Non-nil if the archive is outside file system.") @@ -362,9 +466,6 @@ [EXT-FILE-NAME INT-FILE-NAME CASE-FIDDLED MODE ...]") (make-variable-buffer-local 'archive-files) -(defvar archive-lemacs - (string-match "\\(Lucid\\|Xemacs\\)" emacs-version) - "*Non-nil when running under under Lucid Emacs or Xemacs.") ;; ------------------------------------------------------------------------- ;; Section: Support functions. @@ -609,116 +710,9 @@ ;; ------------------------------------------------------------------------- ;; Section: Key maps -(if archive-mode-map nil - (setq archive-mode-map (make-keymap)) - (suppress-keymap archive-mode-map) - (define-key archive-mode-map " " 'archive-next-line) - (define-key archive-mode-map "a" 'archive-alternate-display) - ;;(define-key archive-mode-map "c" 'archive-copy) - (define-key archive-mode-map "d" 'archive-flag-deleted) - (define-key archive-mode-map "\C-d" 'archive-flag-deleted) - (define-key archive-mode-map "e" 'archive-extract) - (define-key archive-mode-map "f" 'archive-extract) - (define-key archive-mode-map "\C-m" 'archive-extract) - (define-key archive-mode-map "g" 'revert-buffer) - (define-key archive-mode-map "h" 'describe-mode) - (define-key archive-mode-map "m" 'archive-mark) - (define-key archive-mode-map "n" 'archive-next-line) - (define-key archive-mode-map "\C-n" 'archive-next-line) - (define-key archive-mode-map [down] 'archive-next-line) - (define-key archive-mode-map "o" 'archive-extract-other-window) - (define-key archive-mode-map "p" 'archive-previous-line) - (define-key archive-mode-map "q" 'quit-window) - (define-key archive-mode-map "\C-p" 'archive-previous-line) - (define-key archive-mode-map [up] 'archive-previous-line) - (define-key archive-mode-map "r" 'archive-rename-entry) - (define-key archive-mode-map "u" 'archive-unflag) - (define-key archive-mode-map "\M-\C-?" 'archive-unmark-all-files) - (define-key archive-mode-map "v" 'archive-view) - (define-key archive-mode-map "x" 'archive-expunge) - (define-key archive-mode-map "\177" 'archive-unflag-backwards) - (define-key archive-mode-map "E" 'archive-extract-other-window) - (define-key archive-mode-map "M" 'archive-chmod-entry) - (define-key archive-mode-map "G" 'archive-chgrp-entry) - (define-key archive-mode-map "O" 'archive-chown-entry) - - (if archive-lemacs - (progn - ;; Not a nice "solution" but it'll have to do - (define-key archive-mode-map "\C-xu" 'archive-undo) - (define-key archive-mode-map "\C-_" 'archive-undo)) - (define-key archive-mode-map [remap advertised-undo] 'archive-undo) - (define-key archive-mode-map [remap undo] 'archive-undo)) - - (define-key archive-mode-map - (if archive-lemacs 'button2 [mouse-2]) 'archive-mouse-extract) - - (if archive-lemacs - () ; out of luck - - (define-key archive-mode-map [menu-bar immediate] - (cons "Immediate" (make-sparse-keymap "Immediate"))) - (define-key archive-mode-map [menu-bar immediate alternate] - '(menu-item "Alternate Display" archive-alternate-display - :enable (boundp (archive-name "alternate-display")) - :help "Toggle alternate file info display")) - (define-key archive-mode-map [menu-bar immediate view] - '(menu-item "View This File" archive-view - :help "Display file at cursor in View Mode")) - (define-key archive-mode-map [menu-bar immediate display] - '(menu-item "Display in Other Window" archive-display-other-window - :help "Display file at cursor in another window")) - (define-key archive-mode-map [menu-bar immediate find-file-other-window] - '(menu-item "Find in Other Window" archive-extract-other-window - :help "Edit file at cursor in another window")) - (define-key archive-mode-map [menu-bar immediate find-file] - '(menu-item "Find This File" archive-extract - :help "Extract file at cursor and edit it")) - - (define-key archive-mode-map [menu-bar mark] - (cons "Mark" (make-sparse-keymap "Mark"))) - (define-key archive-mode-map [menu-bar mark unmark-all] - '(menu-item "Unmark All" archive-unmark-all-files - :help "Unmark all marked files")) - (define-key archive-mode-map [menu-bar mark deletion] - '(menu-item "Flag" archive-flag-deleted - :help "Flag file at cursor for deletion")) - (define-key archive-mode-map [menu-bar mark unmark] - '(menu-item "Unflag" archive-unflag - :help "Unmark file at cursor")) - (define-key archive-mode-map [menu-bar mark mark] - '(menu-item "Mark" archive-mark - :help "Mark file at cursor")) - - (define-key archive-mode-map [menu-bar operate] - (cons "Operate" (make-sparse-keymap "Operate"))) - (define-key archive-mode-map [menu-bar operate chown] - '(menu-item "Change Owner..." archive-chown-entry - :enable (fboundp (archive-name "chown-entry")) - :help "Change owner of marked files")) - (define-key archive-mode-map [menu-bar operate chgrp] - '(menu-item "Change Group..." archive-chgrp-entry - :enable (fboundp (archive-name "chgrp-entry")) - :help "Change group ownership of marked files")) - (define-key archive-mode-map [menu-bar operate chmod] - '(menu-item "Change Mode..." archive-chmod-entry - :enable (fboundp (archive-name "chmod-entry")) - :help "Change mode (permissions) of marked files")) - (define-key archive-mode-map [menu-bar operate rename] - '(menu-item "Rename to..." archive-rename-entry - :enable (fboundp (archive-name "rename-entry")) - :help "Rename marked files")) - ;;(define-key archive-mode-map [menu-bar operate copy] - ;; '(menu-item "Copy to..." archive-copy)) - (define-key archive-mode-map [menu-bar operate expunge] - '(menu-item "Expunge Marked Files" archive-expunge - :help "Delete all flagged files from archive")) - )) - -(let* ((item1 '(archive-subfile-mode " Archive")) - (items (list item1))) +(let ((item1 '(archive-subfile-mode " Archive"))) (or (member item1 minor-mode-alist) - (setq minor-mode-alist (append items minor-mode-alist)))) + (setq minor-mode-alist (cons item1 minor-mode-alist)))) ;; ------------------------------------------------------------------------- (defun archive-find-type () (widen) @@ -784,7 +778,7 @@ ;; Using `concat' here copies the text also, so we can add ;; properties without problems. (let ((text (concat (aref fil 0) "\n"))) - (if archive-lemacs + (if (featurep 'xemacs) () ; out of luck (add-text-properties (aref fil 1) (aref fil 2) @@ -1825,5 +1819,5 @@ (provide 'arc-mode) -;;; arch-tag: e5966a01-35ec-4f27-8095-a043a79b457b +;; arch-tag: e5966a01-35ec-4f27-8095-a043a79b457b ;;; arc-mode.el ends here
--- a/lisp/bookmark.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/bookmark.el Thu Apr 14 05:03:52 2005 +0000 @@ -1355,7 +1355,9 @@ ((eq 'nospecial bookmark-version-control) version-control) (t t)))) - (write-file file) + (condition-case nil + (write-file file) + (file-error (message "Can't write %s" file))) (kill-buffer (current-buffer)) (if (>= baud-rate 9600) (message "Saving bookmarks to file %s...done" file)))))))
--- a/lisp/calc/calc-units.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/calc/calc-units.el Thu Apr 14 05:03:52 2005 +0000 @@ -1,6 +1,6 @@ ;;; calc-units.el --- unit conversion functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <belanger@truman.edu> @@ -137,7 +137,7 @@ ( men "100/invcm" "Inverse energy in meters" ) ( Hzen "h Hz" "Energy in Hertz") ( Ken "k K" "Energy in Kelvins") - ( Wh "W h" "Watt hour") + ( Wh "W hr" "Watt hour") ( Ws "W s" "Watt second") ;; Power
--- a/lisp/calendar/time-date.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/calendar/time-date.el Thu Apr 14 05:03:52 2005 +0000 @@ -1,5 +1,6 @@ ;;; time-date.el --- Date and time handling functions -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. +;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005 +;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Masanobu Umeda <umerin@mse.kyutech.ac.jp> @@ -112,15 +113,15 @@ "Convert time value TIME to a floating point number. You can use `float-time' instead." (with-decoded-time-value ((high low micro time)) - (+ (* 1.0 high #x10000) + (+ (* 1.0 high 65536) low (/ micro 1000000.0)))) ;;;###autoload (defun seconds-to-time (seconds) "Convert SECONDS (a floating point number) to a time value." - (list (floor seconds #x10000) - (floor (mod seconds #x10000)) + (list (floor seconds 65536) + (floor (mod seconds 65536)) (floor (* (- seconds (ffloor seconds)) 1000000)))) ;;;###autoload @@ -138,10 +139,10 @@ (defun days-to-time (days) "Convert DAYS into a time value." (let* ((seconds (* 1.0 days 60 60 24)) - (high (condition-case nil (floor (/ seconds #x10000)) + (high (condition-case nil (floor (/ seconds 65536)) (range-error most-positive-fixnum)))) - (list high (condition-case nil (floor (- seconds (* 1.0 high #x10000))) - (range-error #xffff))))) + (list high (condition-case nil (floor (- seconds (* 1.0 high 65536))) + (range-error 65535))))) ;;;###autoload (defun time-since (time) @@ -170,7 +171,7 @@ micro (+ micro 1000000))) (when (< low 0) (setq high (1- high) - low (+ low #x10000))) + low (+ low 65536))) (encode-time-value high low micro type))) ;;;###autoload @@ -185,9 +186,9 @@ (when (>= micro 1000000) (setq low (1+ low) micro (- micro 1000000))) - (when (>= low #x10000) + (when (>= low 65536) (setq high (1+ high) - low (- low #x10000))) + low (- low 65536))) (encode-time-value high low micro type))) ;;;###autoload
--- a/lisp/comint.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/comint.el Thu Apr 14 05:03:52 2005 +0000 @@ -1388,14 +1388,15 @@ cmd)))) (ring-insert comint-input-ring cmd))) -(defun comint-send-input (&optional no-newline) +(defun comint-send-input (&optional no-newline artificial) "Send input to process. After the process output mark, sends all text from the process mark to point as input to the process. Before the process output mark, calls value of variable `comint-get-old-input' to retrieve old input, copies -it to the process mark, and sends it. A terminal newline is also -inserted into the buffer and sent to the process unless NO-NEWLINE is -non-nil. +it to the process mark, and sends it. + +This command also sends and inserts a final newline, unless +NO-NEWLINE is non-nil. Any history reference may be expanded depending on the value of the variable `comint-input-autoexpand'. The list of function names contained in the value @@ -1409,6 +1410,8 @@ After the input has been sent, if `comint-process-echoes' is non-nil, then `comint-send-input' waits to see if the process outputs a string matching the input, and if so, deletes that part of the output. +If ARTIFICIAL is non-nil, it inhibits such deletion. +Callers sending input not from the user should use ARTIFICIAL = t. The values of `comint-get-old-input', `comint-input-filter-functions', and `comint-input-filter' are chosen according to the command interpreter running @@ -1513,7 +1516,7 @@ (funcall comint-input-sender proc input)) ;; Optionally delete echoed input (after checking it). - (when comint-process-echoes + (when (and comint-process-echoes (not artificial)) (let ((echo-len (- comint-last-input-end comint-last-input-start))) ;; Wait for all input to be echoed: @@ -2088,7 +2091,7 @@ This means mark it as if it had been sent as input, without sending it." (let ((comint-input-sender 'ignore) (comint-input-filter-functions nil)) - (comint-send-input t)) + (comint-send-input t t)) (end-of-line) (let ((pos (point)) (marker (process-mark (get-buffer-process (current-buffer))))) @@ -2115,7 +2118,7 @@ (defun comint-send-eof () "Send an EOF to the current buffer's process." (interactive) - (comint-send-input t) + (comint-send-input t t) (process-send-eof))
--- a/lisp/cus-edit.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/cus-edit.el Thu Apr 14 05:03:52 2005 +0000 @@ -433,6 +433,10 @@ "Input from the menus." :group 'environment) +(defgroup dnd nil + "Handling data from drag and drop." + :group 'environment) + (defgroup auto-save nil "Preventing accidential loss of data." :group 'files)
--- a/lisp/custom.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/custom.el Thu Apr 14 05:03:52 2005 +0000 @@ -287,9 +287,18 @@ SPEC should be an alist of the form ((DISPLAY ATTS)...). -The first element of SPEC where the DISPLAY matches the frame -is the one that takes effect in that frame. The ATTRs in this -element take effect; the other elements are ignored, on that frame. +In the first element, DISPLAY can be :default. The ATTS in that +element then act as defaults for all the following elements. + +Aside from that, DISPLAY specifies conditions to match some or +all frames. For each frame, the first element of SPEC where the +DISPLAY conditions are satisfied is the one that applies to that +frame. The ATTRs in this element take effect, and the following +elements are ignored, on that frame. + +In the last element, DISPLAY can be t. That element applies to a +frame if none of the previous elements (except the :default if +any) did. ATTS is a list of face attributes followed by their values: (ATTR VALUE ATTR VALUE...) @@ -298,11 +307,12 @@ `:slant', `:underline', `:overline', `:strike-through', `:box', `:foreground', `:background', `:stipple', `:inverse-video', and `:inherit'. -DISPLAY can either be the symbol t, which will match all frames, or an -alist of elements of the form \(REQ ITEM...). For the DISPLAY to match a -FRAME, each of these elements must be satisfied, meaning that the -REQ property of the frame must match one of the corresponding ITEMs. -These are the defined REQ values: +DISPLAY can be `:default' (only in the first element), the symbol +t (only in the last element) to match all frames, or an alist of +conditions of the form \(REQ ITEM...). For such an alist to +match a frame, each of the conditions must be satisfied, meaning +that the REQ property of the frame must match one of the +corresponding ITEMs. These are the defined REQ values: `type' (the value of `window-system') Under X, in addition to the values `window-system' can take, @@ -841,8 +851,8 @@ this sets the local binding in that buffer instead." (if custom-local-buffer (with-current-buffer custom-local-buffer - (funcall variable (or value 0))) - (funcall variable (or value 0)))) + (funcall variable (if value 1 0))) + (funcall variable (if value 1 0)))) (defun custom-quote (sexp) "Quote SEXP iff it is not self quoting."
--- a/lisp/dired.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/dired.el Thu Apr 14 05:03:52 2005 +0000 @@ -1523,15 +1523,13 @@ (setq dired-switches-alist nil) (dired-sort-other dired-actual-switches t) (run-mode-hooks 'dired-mode-hook) - (when (featurep 'x-dnd) - (make-variable-buffer-local 'x-dnd-test-function) - (make-variable-buffer-local 'x-dnd-protocol-alist) - (setq x-dnd-test-function 'dired-dnd-test-function) - (setq x-dnd-protocol-alist + (when (featurep 'dnd) + (make-variable-buffer-local 'dnd-protocol-alist) + (setq dnd-protocol-alist (append '(("^file:///" . dired-dnd-handle-local-file) ("^file://" . dired-dnd-handle-file) ("^file:" . dired-dnd-handle-local-file)) - x-dnd-protocol-alist)))) + dnd-protocol-alist)))) ;; Idiosyncratic dired commands that don't deal with marks. @@ -3136,18 +3134,6 @@ (const :tag "Copy directories without asking" always)) :group 'dired) -(defun dired-dnd-test-function (window action types) - "The test function for drag and drop into dired buffers. -WINDOW is where the mouse is when this function is called. It may be a frame -if the mouse is over the menu bar, scroll bar or tool bar. -ACTION is the suggested action from the source, and TYPES are the -types the drop data can have. This function only accepts drops with -types in `x-dnd-known-types'. It returns the action suggested by the source." - (let ((type (x-dnd-choose-type types))) - (if type - (cons action type) - nil))) - (defun dired-dnd-popup-notice () (x-popup-dialog t @@ -3176,7 +3162,7 @@ URI is the file to handle, ACTION is one of copy, move, link or ask. Ask means pop up a menu for the user to select one of copy, move or link." (require 'dired-aux) - (let* ((from (x-dnd-get-local-file-name uri t)) + (let* ((from (dnd-get-local-file-name uri t)) (to (if from (concat (dired-current-directory) (file-name-nondirectory from)) nil))) @@ -3214,7 +3200,7 @@ URI is the file to handle. If the hostname in the URI isn't local, do nothing. ACTION is one of copy, move, link or ask. Ask means pop up a menu for the user to select one of copy, move or link." - (let ((local-file (x-dnd-get-local-file-uri uri))) + (let ((local-file (dnd-get-local-file-uri uri))) (if local-file (dired-dnd-handle-local-file local-file action) nil)))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/dnd.el Thu Apr 14 05:03:52 2005 +0000 @@ -0,0 +1,192 @@ +;;; dnd.el --- drag and drop support. + +;; Copyright (C) 2005 +;; Free Software Foundation, Inc. + +;; Author: Jan Dj,Ad(Brv <jan.h.d@swipnet.se> +;; Maintainer: FSF +;; Keywords: window, drag, drop + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; This file provides the generic handling of the drop part only. +;; Different DND backends (X11, W32, etc.) that handle the platform +;; specific DND parts call the functions here to do final delivery of +;; a drop. + +;;; Code: + +;;; Customizable variables + + +(defcustom dnd-protocol-alist + '( + ("^file:///" . dnd-open-local-file) ; XDND format. + ("^file://" . dnd-open-file) ; URL with host + ("^file:" . dnd-open-local-file) ; Old KDE, Motif, Sun + ) + + "The functions to call for different protocols when a drop is made. +This variable is used by `dnd-handle-one-url' and `dnd-handle-file-name'. +The list contains of (REGEXP . FUNCTION) pairs. +The functions shall take two arguments, URL, which is the URL dropped and +ACTION which is the action to be performed for the drop (move, copy, link, +private or ask). +If no match is found here, and the value of `browse-url-browser-function' +is a pair of (REGEXP . FUNCTION), those regexps are tried for a match. +If no match is found, the URL is inserted as text by calling `dnd-insert-text'. +The function shall return the action done (move, copy, link or private) +if some action was made, or nil if the URL is ignored." + :version "22.1" + :type 'alist + :group 'dnd) + + + +(defcustom dnd-open-file-other-window nil + "If non-nil, always use find-file-other-window to open dropped files." + :version "22.1" + :type 'boolean + :group 'dnd) + + +;; Functions + +(defun dnd-handle-one-url (window action arg) + "Handle one dropped url by calling the appropriate handler. +The handler is first located by looking at `dnd-protocol-alist'. +If no match is found here, and the value of `browse-url-browser-function' +is a pair of (REGEXP . FUNCTION), those regexps are tried for a match. +If no match is found, just call `dnd-insert-text'. +WINDOW is where the drop happend, ACTION is the action for the drop, +ARG is the URL that has been dropped. +Returns ACTION." + (require 'browse-url) + (let* ((uri (replace-regexp-in-string + "%[A-Z0-9][A-Z0-9]" + (lambda (arg) + (format "%c" (string-to-number (substring arg 1) 16))) + arg)) + ret) + (or + (catch 'done + (dolist (bf dnd-protocol-alist) + (when (string-match (car bf) uri) + (setq ret (funcall (cdr bf) uri action)) + (throw 'done t))) + nil) + (when (not (functionp browse-url-browser-function)) + (catch 'done + (dolist (bf browse-url-browser-function) + (when (string-match (car bf) uri) + (setq ret 'private) + (funcall (cdr bf) uri action) + (throw 'done t))) + nil)) + (progn + (dnd-insert-text window action uri) + (setq ret 'private))) + ret)) + + +(defun dnd-get-local-file-uri (uri) + "Return an uri converted to file:/// syntax if uri is a local file. +Return nil if URI is not a local file." + + ;; The hostname may be our hostname, in that case, convert to a local + ;; file. Otherwise return nil. TODO: How about an IP-address as hostname? + (let ((hostname (when (string-match "^file://\\([^/]*\\)" uri) + (downcase (match-string 1 uri)))) + (system-name-no-dot + (downcase (if (string-match "^[^\\.]+" system-name) + (match-string 0 system-name) + system-name)))) + (when (and hostname + (or (string-equal "localhost" hostname) + (string-equal (downcase system-name) hostname) + (string-equal system-name-no-dot hostname))) + (concat "file://" (substring uri (+ 7 (length hostname))))))) + +(defun dnd-get-local-file-name (uri &optional must-exist) + "Return file name converted from file:/// or file: syntax. +URI is the uri for the file. If MUST-EXIST is given and non-nil, +only return non-nil if the file exists. +Return nil if URI is not a local file." + (let ((f (cond ((string-match "^file:///" uri) ; XDND format. + (substring uri (1- (match-end 0)))) + ((string-match "^file:" uri) ; Old KDE, Motif, Sun + (substring uri (match-end 0)))))) + (when (and f must-exist) + (let* ((decoded-f (decode-coding-string + f + (or file-name-coding-system + default-file-name-coding-system))) + (try-f (if (file-readable-p decoded-f) decoded-f f))) + (when (file-readable-p try-f) try-f))))) + + +(defun dnd-open-local-file (uri action) + "Open a local file. +The file is opened in the current window, or a new window if +`dnd-open-file-other-window' is set. URI is the url for the file, +and must have the format file:file-name or file:///file-name. +The last / in file:/// is part of the file name. ACTION is ignored." + + (let* ((f (dnd-get-local-file-name uri t))) + (if (and f (file-readable-p f)) + (progn + (if dnd-open-file-other-window + (find-file-other-window f) + (find-file f)) + 'private) + (error "Can not read %s" uri)))) + +(defun dnd-open-file (uri action) + "Open a local or remote file. +The file is opened in the current window, or a new window if +`dnd-open-file-other-window' is set. URI is the url for the file, +and must have the format file://hostname/file-name. ACTION is ignored. +The last / in file://hostname/ is part of the file name." + + ;; The hostname may be our hostname, in that case, convert to a local + ;; file. Otherwise return nil. + (let ((local-file (dnd-get-local-file-uri uri))) + (if local-file (dnd-open-local-file local-file action) + (error "Remote files not supported")))) + + +(defun dnd-insert-text (window action text) + "Insert text at point or push to the kill ring if buffer is read only. +TEXT is the text as a string, WINDOW is the window where the drop happened." + (if (or buffer-read-only + (not (windowp window))) + (progn + (kill-new text) + (message + (substitute-command-keys + "The dropped text can be accessed with \\[yank]"))) + (insert text)) + action) + + +(provide 'dnd) + +;; arch-tag: 0472f6a5-2e8f-4304-9e44-1a0877c771b7 +;;; dnd.el ends here
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/emacs-lisp/generic.el Thu Apr 14 05:03:52 2005 +0000 @@ -0,0 +1,345 @@ +;;; generic.el --- defining simple major modes with comment and font-lock +;; +;; Copyright (C) 1997, 1999, 2004, 2005 Free Software Foundation, Inc. +;; +;; Author: Peter Breton <pbreton@cs.umb.edu> +;; Created: Fri Sep 27 1996 +;; Keywords: generic, comment, font-lock + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; INTRODUCTION: +;; +;; The macro `define-generic-mode' can be used to define small modes +;; which provide basic comment and font-lock support. These modes are +;; intended for the many configuration files and such which are too +;; small for a "real" mode, but still have a regular syntax, comment +;; characters and the like. +;; +;; Each generic mode can define the following: +;; +;; * List of comment-characters. The entries in this list should be +;; either a character, a one or two character string or a cons pair. +;; If the entry is a character or a string, it is added to the +;; mode's syntax table with `comment-start' syntax. If the entry is +;; a cons pair, the elements of the pair are considered to be +;; `comment-start' and `comment-end' respectively. (The latter +;; should be nil if you want comments to end at end of line.) +;; LIMITATIONS: Emacs does not support comment strings of more than +;; two characters in length. +;; +;; * List of keywords to font-lock. Each keyword should be a string. +;; If you have additional keywords which should be highlighted in a +;; face different from `font-lock-keyword-face', you can use the +;; convenience function `generic-make-keywords-list' (which see), +;; and add the result to the following list: +;; +;; * Additional expressions to font-lock. This should be a list of +;; expressions, each of which should be of the same form as those in +;; `font-lock-keywords'. +;; +;; * List of regular expressions to be placed in auto-mode-alist. +;; +;; * List of functions to call to do some additional setup +;; +;; This should pretty much cover basic functionality; if you need much +;; more than this, or you find yourself writing extensive customizations, +;; perhaps you should be writing a major mode instead! +;; +;; EXAMPLE: +;; +;; You can use `define-generic-mode' like this: +;; +;; (define-generic-mode 'foo-generic-mode +;; (list ?%) +;; (list "keyword") +;; nil +;; (list "\\.FOO\\'") +;; (list 'foo-setup-function)) +;; +;; to define a new generic-mode `foo-generic-mode', which has '%' as a +;; comment character, and "keyword" as a keyword. When files which +;; end in '.FOO' are loaded, Emacs will go into foo-generic-mode and +;; call foo-setup-function. You can also use the function +;; `foo-generic-mode' (which is interactive) to put a buffer into +;; foo-generic-mode. +;; +;; GOTCHAS: +;; +;; Be careful that your font-lock definitions are correct. Getting +;; them wrong can cause Emacs to continually attempt to fontify! This +;; problem is not specific to generic-mode. + +;; Credit for suggestions, brainstorming, help with debugging: +;; ACorreir@pervasive-sw.com (Alfred Correira) +;; Extensive cleanup by: +;; Stefan Monnier (monnier+gnu/emacs@flint.cs.yale.edu) + +;;; Code: + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Internal Variables +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defvar generic-font-lock-keywords nil + "Keywords for `font-lock-defaults' in a generic mode.") +(make-variable-buffer-local 'generic-font-lock-keywords) +(defvaralias 'generic-font-lock-defaults 'generic-font-lock-keywords) +(make-obsolete-variable 'generic-font-lock-defaults 'generic-font-lock-keywords "22.1") + +;;;###autoload +(defvar generic-mode-list nil + "A list of mode names for `generic-mode'. +Do not add entries to this list directly; use `define-generic-mode' +instead (which see).") + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Functions +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;;;###autoload +(defmacro define-generic-mode (mode comment-list keyword-list + font-lock-list auto-mode-list + function-list &optional docstring + &rest custom-keyword-args) + "Create a new generic mode MODE. + +MODE is the name of the command for the generic mode; it need not +be quoted. The optional DOCSTRING is the documentation for the +mode command. If you do not supply it, a default documentation +string will be used instead. + +COMMENT-LIST is a list, whose entries are either a single +character, a one or two character string or a cons pair. If the +entry is a character or a string, it is added to the mode's +syntax table with `comment-start' syntax. If the entry is a cons +pair, the elements of the pair are considered to be +`comment-start' and `comment-end' respectively. (The latter +should be nil if you want comments to end at end of line.) Note +that Emacs has limitations regarding comment characters. + +KEYWORD-LIST is a list of keywords to highlight with +`font-lock-keyword-face'. Each keyword should be a string. + +FONT-LOCK-LIST is a list of additional expressions to highlight. +Each entry in the list should have the same form as an entry in +`font-lock-keywords'. + +AUTO-MODE-LIST is a list of regular expressions to add to +`auto-mode-alist'. These regexps are added to `auto-mode-alist' +as soon as `define-generic-mode' is called. + +FUNCTION-LIST is a list of functions to call to do some +additional setup. + +The optional CUSTOM-KEYWORD-ARGS are pairs of keywords and +values. They will be passed to the generated `defcustom' form of +the mode hook variable MODE-hook. Defaults to MODE without the +possible trailing \"-mode\". (This default may not be a valid +customization group defined with `defgroup'. Make sure it is.) +You can specify keyword arguments without specifying a docstring. + +See the file generic-x.el for some examples of `define-generic-mode'." + (declare (debug (sexp def-form def-form def-form form def-form + [&optional stringp] &rest [keywordp form])) + (indent 1)) + + ;; Backward compatibility. + (when (eq (car-safe mode) 'quote) + (setq mode (eval mode))) + + (when (and docstring (not (stringp docstring))) + ;; DOCSTRING is not a string so we assume that it's actually the + ;; first keyword of CUSTOM-KEYWORD-ARGS. + (push docstring custom-keyword-args) + (setq docstring nil)) + + (let* ((name (symbol-name mode)) + (pretty-name (capitalize (replace-regexp-in-string + "-mode\\'" "" name))) + (mode-hook (intern (concat name "-hook")))) + + (unless (plist-get custom-keyword-args :group) + (setq custom-keyword-args + (plist-put custom-keyword-args + :group `',(intern (replace-regexp-in-string + "-mode\\'" "" name))))) + + `(progn + ;; Add a new entry. + (add-to-list 'generic-mode-list ,name) + + ;; Add it to auto-mode-alist + (dolist (re ,auto-mode-list) + (add-to-list 'auto-mode-alist (cons re ',mode))) + + (defcustom ,mode-hook nil + ,(concat "Hook run when entering " pretty-name " mode.") + :type 'hook + ,@custom-keyword-args) + + (defun ,mode () + ,(or docstring + (concat pretty-name " mode.\n" + "This a generic mode defined with `define-generic-mode'.")) + (interactive) + (generic-mode-internal ',mode ,comment-list ,keyword-list + ,font-lock-list ,function-list))))) + +;;;###autoload +(defun generic-mode-internal (mode comment-list keyword-list + font-lock-list function-list) + "Go into the generic mode MODE." + (let* ((name (symbol-name mode)) + (pretty-name (capitalize (replace-regexp-in-string + "-mode\\'" "" name))) + (mode-hook (intern (concat name "-hook")))) + + (kill-all-local-variables) + + (setq major-mode mode + mode-name pretty-name) + + (generic-mode-set-comments comment-list) + + ;; Font-lock functionality. + ;; Font-lock-defaults is always set even if there are no keywords + ;; or font-lock expressions, so comments can be highlighted. + (setq generic-font-lock-keywords font-lock-list) + (when keyword-list + (push (concat "\\_<" (regexp-opt keyword-list t) "\\_>") + generic-font-lock-keywords)) + (setq font-lock-defaults '(generic-font-lock-keywords nil)) + + ;; Call a list of functions + (mapcar 'funcall function-list) + + (run-mode-hooks mode-hook))) + +;;;###autoload +(defun generic-mode (mode) + "Enter generic mode MODE. + +Generic modes provide basic comment and font-lock functionality +for \"generic\" files. (Files which are too small to warrant their +own mode, but have comment characters, keywords, and the like.) + +To define a generic-mode, use the function `define-generic-mode'. +Some generic modes are defined in `generic-x.el'." + (interactive + (list (completing-read "Generic mode: " generic-mode-list nil t))) + (funcall (intern mode))) + +;;; Comment Functionality +(defun generic-mode-set-comments (comment-list) + "Set up comment functionality for generic mode." + (let ((st (make-syntax-table)) + (chars nil) + (comstyles)) + (make-local-variable 'comment-start) + (make-local-variable 'comment-start-skip) + (make-local-variable 'comment-end) + + ;; Go through all the comments + (dolist (start comment-list) + (let (end (comstyle "")) + ;; Normalize + (when (consp start) + (setq end (cdr start)) + (setq start (car start))) + (when (characterp start) (setq start (char-to-string start))) + (cond + ((characterp end) (setq end (char-to-string end))) + ((zerop (length end)) (setq end "\n"))) + + ;; Setup the vars for `comment-region' + (if comment-start + ;; We have already setup a comment-style, so use style b + (progn + (setq comstyle "b") + (setq comment-start-skip + (concat comment-start-skip "\\|" (regexp-quote start) "+\\s-*"))) + ;; First comment-style + (setq comment-start start) + (setq comment-end (if (string-equal end "\n") "" end)) + (setq comment-start-skip (concat (regexp-quote start) "+\\s-*"))) + + ;; Reuse comstyles if necessary + (setq comstyle + (or (cdr (assoc start comstyles)) + (cdr (assoc end comstyles)) + comstyle)) + (push (cons start comstyle) comstyles) + (push (cons end comstyle) comstyles) + + ;; Setup the syntax table + (if (= (length start) 1) + (modify-syntax-entry (string-to-char start) + (concat "< " comstyle) st) + (let ((c0 (elt start 0)) (c1 (elt start 1))) + ;; Store the relevant info but don't update yet + (push (cons c0 (concat (cdr (assoc c0 chars)) "1")) chars) + (push (cons c1 (concat (cdr (assoc c1 chars)) + (concat "2" comstyle))) chars))) + (if (= (length end) 1) + (modify-syntax-entry (string-to-char end) + (concat ">" comstyle) st) + (let ((c0 (elt end 0)) (c1 (elt end 1))) + ;; Store the relevant info but don't update yet + (push (cons c0 (concat (cdr (assoc c0 chars)) + (concat "3" comstyle))) chars) + (push (cons c1 (concat (cdr (assoc c1 chars)) "4")) chars))))) + + ;; Process the chars that were part of a 2-char comment marker + (dolist (cs (nreverse chars)) + (modify-syntax-entry (car cs) + (concat (char-to-string (char-syntax (car cs))) + " " (cdr cs)) + st)) + (set-syntax-table st))) + +(defun generic-bracket-support () + "Imenu support for [KEYWORD] constructs found in INF, INI and Samba files." + (setq imenu-generic-expression + '((nil "^\\[\\(.*\\)\\]" 1)) + imenu-case-fold-search t)) + +;;;###autoload +(defun generic-make-keywords-list (keyword-list face &optional prefix suffix) + "Return a `font-lock-keywords' construct that highlights KEYWORD-LIST. +KEYWORD-LIST is a list of keyword strings that should be +highlighted with face FACE. This function calculates a regular +expression that matches these keywords and concatenates it with +PREFIX and SUFFIX. Then it returns a construct based on this +regular expression that can be used as an element of +`font-lock-keywords'." + (unless (listp keyword-list) + (error "Keywords argument must be a list of strings")) + (list (concat prefix "\\_<" + ;; Use an optimized regexp. + (regexp-opt keyword-list t) + "\\_>" suffix) + 1 + face)) + +(provide 'generic) + +;; arch-tag: 239c1fc4-1303-48d9-9ac0-657d655669ea +;;; generic.el ends here
--- a/lisp/emacs-lisp/map-ynp.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/emacs-lisp/map-ynp.el Thu Apr 14 05:03:52 2005 +0000 @@ -200,10 +200,10 @@ (concat (format "Type SPC or `y' to %s the current %s; DEL or `n' to skip the current %s; -RET or `q' to exit (skip all remaining %s); -C-g to quit (cancel the operation); +RET or `q' to give up on the %s (skip all remaining %s); +C-g to quit (cancel the whole command); ! to %s all remaining %s;\n" - action object object objects action + action object object action objects action objects) (mapconcat (function (lambda (elt)
--- a/lisp/emulation/cua-base.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/emulation/cua-base.el Thu Apr 14 05:03:52 2005 +0000 @@ -384,11 +384,15 @@ :type 'boolean :group 'cua) -(defface cua-rectangle-face 'nil +(defface cua-rectangle-face + '((default :inherit region) + (((class color)) :foreground "white" :background "maroon")) "*Font used by CUA for highlighting the rectangle." :group 'cua) -(defface cua-rectangle-noselect-face 'nil +(defface cua-rectangle-noselect-face + '((default :inherit region) + (((class color)) :foreground "white" :background "dimgray")) "*Font used by CUA for highlighting the non-selected rectangle lines." :group 'cua) @@ -400,10 +404,9 @@ :type 'boolean :group 'cua) -(defface cua-global-mark-face '((((class color)) - :foreground "black" - :background "yellow") - (t :bold t)) +(defface cua-global-mark-face + '((((class color)) :foreground "black" :background "yellow") + (t :bold t)) "*Font used by CUA for highlighting the global mark." :group 'cua)
--- a/lisp/emulation/cua-rect.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/emulation/cua-rect.el Thu Apr 14 05:03:52 2005 +0000 @@ -1402,16 +1402,6 @@ (cua--M/H-key cua--rectangle-keymap key cmd)) (defun cua--init-rectangles () - (unless (face-background 'cua-rectangle-face) - (copy-face 'region 'cua-rectangle-face) - (set-face-background 'cua-rectangle-face "maroon") - (set-face-foreground 'cua-rectangle-face "white")) - - (unless (face-background 'cua-rectangle-noselect-face) - (copy-face 'region 'cua-rectangle-noselect-face) - (set-face-background 'cua-rectangle-noselect-face "dimgray") - (set-face-foreground 'cua-rectangle-noselect-face "white")) - (unless (eq cua-use-hyper-key 'only) (define-key cua--rectangle-keymap [(shift return)] 'cua-clear-rectangle-mark) (define-key cua--region-keymap [(shift return)] 'cua-toggle-rectangle-mark))
--- a/lisp/faces.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/faces.el Thu Apr 14 05:03:52 2005 +0000 @@ -2016,7 +2016,7 @@ (defface secondary-selection '((((class color) (min-colors 88) (background light)) - :background "yellow") + :background "yellow1") (((class color) (min-colors 88) (background dark)) :background "SkyBlue4") (((class color) (min-colors 16) (background light)) @@ -2042,9 +2042,9 @@ (defface trailing-whitespace '((((class color) (background light)) - :background "red") + :background "red1") (((class color) (background dark)) - :background "red") + :background "red1") (t :inverse-video t)) "Basic face for highlighting trailing whitespace." :version "21.1"
--- a/lisp/files.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/files.el Thu Apr 14 05:03:52 2005 +0000 @@ -2113,22 +2113,19 @@ (setq temp (cdr temp))) (not temp)) - (search-forward "-*-" (save-excursion - ;; If the file begins with "#!" - ;; (exec interpreter magic), look - ;; for mode frobs in the first two - ;; lines. You cannot necessarily - ;; put them in the first line of - ;; such a file without screwing up - ;; the interpreter invocation. - (end-of-line (and (looking-at "^#!") 2)) - (point)) t) + (search-forward "-*-" (line-end-position + ;; If the file begins with "#!" + ;; (exec interpreter magic), look + ;; for mode frobs in the first two + ;; lines. You cannot necessarily + ;; put them in the first line of + ;; such a file without screwing up + ;; the interpreter invocation. + (and (looking-at "^#!") 2)) t) (progn (skip-chars-forward " \t") (setq beg (point)) - (search-forward "-*-" - (save-excursion (end-of-line) (point)) - t)) + (search-forward "-*-" (line-end-position) t)) (progn (forward-char -3) (skip-chars-backward " \t")
--- a/lisp/generic-x.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/generic-x.el Thu Apr 14 05:03:52 2005 +0000 @@ -41,6 +41,16 @@ ;; You can also send in new modes; if the file types a reasonably common, ;; we would like to install them. ;; +;; DEFAULT GENERIC MODE: +;; +;; This file provides a hook which automatically puts a file into +;; `default-generic-mode' if the first few lines of a file in +;; fundamental mode start with a hash comment character. To disable +;; this functionality, set the variable `generic-use-find-file-hook' +;; to nil BEFORE loading generic-x. See the variables +;; `generic-lines-to-scan' and `generic-find-file-regexp' for +;; customization options. +;; ;; PROBLEMS WHEN USED WITH FOLDING MODE: ;; ;; [The following relates to the obsolete selective-display technique. @@ -95,11 +105,86 @@ (require 'font-lock) (defgroup generic-x nil - "Extra modes for generic mode." + "A collection of generic modes." :prefix "generic-" - :group 'generic + :group 'data :version "20.3") +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Default-Generic mode +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defcustom generic-use-find-file-hook t + "*If non-nil, add a hook to enter `default-generic-mode' automatically. +This is done if the first few lines of a file in fundamental mode +start with a hash comment character." + :group 'generic-x + :type 'boolean) + +(defcustom generic-lines-to-scan 3 + "*Number of lines that `generic-mode-find-file-hook' looks at. +Relevant when deciding whether to enter Default-Generic mode automatically. +This variable should be set to a small positive number." + :group 'generic-x + :type 'integer) + +(defcustom generic-find-file-regexp "^#" + "*Regular expression used by `generic-mode-find-file-hook'. +Files in fundamental mode whose first few lines contain a match +for this regexp, should be put into Default-Generic mode instead. +The number of lines tested for the matches is specified by the +value of the variable `generic-lines-to-scan', which see." + :group 'generic-x + :type 'regexp) + +(defcustom generic-ignore-files-regexp "[Tt][Aa][Gg][Ss]\\'" + "*Regular expression used by `generic-mode-find-file-hook'. +Files whose names match this regular expression should not be put +into Default-Generic mode, even if they have lines which match +the regexp in `generic-find-file-regexp'. If the value is nil, +`generic-mode-find-file-hook' does not check the file names." + :group 'generic-x + :type '(choice (const :tag "Don't check file names" nil) regexp)) + +;; This generic mode is always defined +(define-generic-mode default-generic-mode (list ?#) nil nil nil nil :group 'generic) + +;; A more general solution would allow us to enter generic-mode for +;; *any* comment character, but would require us to synthesize a new +;; generic-mode on the fly. I think this gives us most of what we +;; want. +(defun generic-mode-find-file-hook () + "Hook function to enter Default-Generic mode automatically. + +Done if the first few lines of a file in Fundamental mode start +with a match for the regexp in `generic-find-file-regexp', unless +the file's name matches the regexp which is the value of the +variable `generic-ignore-files-regexp'. + +This hook will be installed if the variable +`generic-use-find-file-hook' is non-nil. The variable +`generic-lines-to-scan' determines the number of lines to look at." + (when (and (eq major-mode 'fundamental-mode) + (or (null generic-ignore-files-regexp) + (not (string-match + generic-ignore-files-regexp + (file-name-sans-versions buffer-file-name))))) + (save-excursion + (goto-char (point-min)) + (when (re-search-forward generic-find-file-regexp + (save-excursion + (forward-line generic-lines-to-scan) + (point)) t) + (goto-char (point-min)) + (default-generic-mode))))) + +(and generic-use-find-file-hook + (add-hook 'find-file-hook 'generic-mode-find-file-hook)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Other Generic modes +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + (defcustom generic-extras-enable-list nil "*List of generic modes to enable by default. Each entry in the list should be a symbol. The variables @@ -150,10 +235,6 @@ etc-fstab-generic-mode) generic-extras-enable-list))) -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Generic-modes -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - ;;; Apache (when (memq 'apache-conf-generic-mode generic-extras-enable-list) @@ -284,8 +365,21 @@ (setq imenu-generic-expression '((nil "^\\[\\(.*\\)\\]" 1) ("*Variables*" "^\\s-*\\([^=]+\\)\\s-*=" 1)))))) - "Generic mode for MS-Windows INI files." - :group 'generic-x)) + "Generic mode for MS-Windows INI files. +You can use `ini-generic-mode-find-file-hook' to enter this mode +automatically for INI files whose names do not end in \".ini\"." + :group 'generic-x) + +(defun ini-generic-mode-find-file-hook () + "Hook function to enter Ini-Generic mode automatically for INI files. +Done if the first few lines of a file in Fundamental mode look +like an INI file. You can add this hook to `find-file-hook'." + (and (eq major-mode 'fundamental-mode) + (save-excursion + (goto-char (point-min)) + (and (looking-at "^\\s-*\\[.*\\]") + (ini-generic-mode))))) +(defalias 'generic-mode-ini-file-find-file-hook 'ini-generic-mode-find-file-hook)) ;;; Windows REG files ;;; Unfortunately, Windows 95 and Windows NT have different REG file syntax! @@ -396,6 +490,7 @@ (compile (concat (w32-shell-name) " -c " (buffer-file-name))))) +(eval-when-compile (require 'comint)) (defun bat-generic-mode-run-as-comint () "Run the current BAT file in a comint buffer." (interactive) @@ -785,7 +880,7 @@ '("^#[ \t]*\\(\\sw+\\)\\>[ \t]*\\(\\sw+\\)?" (1 font-lock-constant-face) (2 font-lock-variable-name-face nil t)))) - '("\\.[rR][cC]$") + '("\\.[rR][cC]\\'") nil "Generic mode for MS-Windows Resource files." :group 'generic-x)) @@ -1406,7 +1501,7 @@ (generic-make-keywords-list installshield-funarg-constants-list font-lock-variable-name-face "[^_]" "[^_]"))) ; is this face the best choice? - '("\\.[rR][uU][lL]$") + '("\\.[rR][uU][lL]\\'") '(generic-rul-mode-setup-function) "Generic mode for InstallShield RUL files." :group 'generic-x) @@ -1584,8 +1679,8 @@ "auto" "ignore") '(("^\\([/-A-Za-z0-9_]+\\)\\s-+\\([/-A-Za-z0-9_]+\\)" - (1 font-lock-type-face) - (2 font-lock-variable-name-face))) + (1 font-lock-type-face t) + (2 font-lock-variable-name-face t))) '("/etc/[v]*fstab\\'") (list (function @@ -1667,7 +1762,7 @@ ;; List of additional font-lock-expressions '(("\\([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\\)" 1 font-lock-constant-face) ("^\\([.A-Za-z0-9]+\\)" 1 font-lock-variable-name-face)) - ;; List of additional automode-alist expressions + ;; List of additional auto-mode-alist expressions nil ;; List of set up functions to call nil @@ -1688,7 +1783,7 @@ '("nameserver" "domain" "search" "sortlist" "options") ;; List of additional font-lock-expressions nil - ;; List of additional automode-alist expressions + ;; List of additional auto-mode-alist expressions '("/etc/resolv[e]?.conf\\'") ;; List of set up functions to call nil
--- a/lisp/generic.el Mon Apr 11 03:59:40 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,455 +0,0 @@ -;;; generic.el --- defining simple major modes with comment and font-lock -;; -;; Copyright (C) 1997, 1999, 2004, 2005 Free Software Foundation, Inc. -;; -;; Author: Peter Breton <pbreton@cs.umb.edu> -;; Created: Fri Sep 27 1996 -;; Keywords: generic, comment, font-lock - -;; This file is part of GNU Emacs. - -;; GNU Emacs is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;; Purpose: - -;; Meta-mode to create simple major modes -;; with basic comment and font-lock support - -;;; Commentary: - -;; INTRODUCTION: - -;; Generic-mode is a meta-mode which can be used to define small modes -;; which provide basic comment and font-lock support. These modes are -;; intended for the many configuration files and such which are too -;; small for a "real" mode, but still have a regular syntax, comment -;; characters and the like. -;; -;; Each generic mode can define the following: -;; -;; * List of comment-characters. The entries in this list should be -;; either a character, a one or two character string or a cons pair. -;; If the entry is a character or a string, it is added to the -;; mode's syntax table with `comment-start' syntax. If the entry is -;; a cons pair, the elements of the pair are considered to be -;; `comment-start' and `comment-end' respectively. (The latter -;; should be nil if you want comments to end at end of line.) -;; LIMITATIONS: Emacs does not support comment strings of more than -;; two characters in length. -;; -;; * List of keywords to font-lock. Each keyword should be a string. -;; If you have additional keywords which should be highlighted in a -;; face different from `font-lock-keyword-face', you can use the -;; convenience function `generic-make-keywords-list' (which see), -;; and add the result to the following list: -;; -;; * Additional expressions to font-lock. This should be a list of -;; expressions, each of which should be of the same form as those in -;; `font-lock-keywords'. -;; -;; * List of regular expressions to be placed in auto-mode-alist. -;; -;; * List of functions to call to do some additional setup -;; -;; This should pretty much cover basic functionality; if you need much -;; more than this, or you find yourself writing extensive customizations, -;; perhaps you should be writing a major mode instead! -;; -;; LOCAL VARIABLES: -;; -;; To put a file into generic mode using local variables, use a line -;; like this in a Local Variables block: -;; -;; mode: default-generic -;; -;; Do NOT use "mode: generic"! -;; See also "AUTOMATICALLY ENTERING GENERIC MODE" below. -;; -;; DEFINING NEW GENERIC MODES: -;; -;; Use the `define-generic-mode' function to define new modes. -;; For example: -;; -;; (define-generic-mode 'foo-generic-mode -;; (list ?%) -;; (list "keyword") -;; nil -;; (list "\\.FOO\\'") -;; (list 'foo-setup-function)) -;; -;; defines a new generic-mode `foo-generic-mode', which has '%' as a -;; comment character, and "keyword" as a keyword. When files which -;; end in '.FOO' are loaded, Emacs will go into foo-generic-mode and -;; call foo-setup-function. You can also use the function -;; `foo-generic-mode' (which is interactive) to put a buffer into -;; foo-generic-mode. -;; -;; AUTOMATICALLY ENTERING GENERIC MODE: -;; -;; Generic-mode provides a hook which automatically puts a file into -;; default-generic-mode if the first few lines of a file in -;; fundamental mode start with a hash comment character. To disable -;; this functionality, set the variable `generic-use-find-file-hook' -;; to nil BEFORE loading generic-mode. See the variables -;; `generic-lines-to-scan' and `generic-find-file-regexp' for -;; customization options. -;; -;; GOTCHAS: -;; -;; Be careful that your font-lock definitions are correct. Getting -;; them wrong can cause Emacs to continually attempt to fontify! This -;; problem is not specific to generic-mode. -;; - -;; Credit for suggestions, brainstorming, help with debugging: -;; ACorreir@pervasive-sw.com (Alfred Correira) -;; Extensive cleanup by: -;; Stefan Monnier (monnier+gnu/emacs@flint.cs.yale.edu) -;; -;;; Code: - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Internal Variables -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(defvar generic-font-lock-keywords nil - "Keywords for `font-lock-defaults' in a generic mode.") -(make-variable-buffer-local 'generic-font-lock-keywords) -(defvaralias 'generic-font-lock-defaults 'generic-font-lock-keywords) -(make-obsolete-variable 'generic-font-lock-defaults 'generic-font-lock-keywords "22.1") - -;;;###autoload -(defvar generic-mode-list nil - "A list of mode names for `generic-mode'. -Do not add entries to this list directly; use `define-generic-mode' -instead (which see).") - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Customization Variables -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(defgroup generic nil - "Define simple major modes with comment and font-lock support." - :prefix "generic-" - :group 'extensions) - -(defcustom generic-use-find-file-hook t - "*If non-nil, add a hook to enter `default-generic-mode' automatically. -This is done if the first few lines of a file in fundamental mode -start with a hash comment character." - :group 'generic - :type 'boolean) - -(defcustom generic-lines-to-scan 3 - "*Number of lines that `generic-mode-find-file-hook' looks at. -Relevant when deciding whether to enter Default-Generic mode automatically. -This variable should be set to a small positive number." - :group 'generic - :type 'integer) - -(defcustom generic-find-file-regexp "^#" - "*Regular expression used by `generic-mode-find-file-hook'. -Files in fundamental mode whose first few lines contain a match -for this regexp, should be put into Default-Generic mode instead. -The number of lines tested for the matches is specified by the -value of the variable `generic-lines-to-scan', which see." - :group 'generic - :type 'regexp) - -(defcustom generic-ignore-files-regexp "[Tt][Aa][Gg][Ss]\\'" - "*Regular expression used by `generic-mode-find-file-hook'. -Files whose names match this regular expression should not be put -into Default-Generic mode, even if they have lines which match -the regexp in `generic-find-file-regexp'. If the value is nil, -`generic-mode-find-file-hook' does not check the file names." - :group 'generic - :type '(choice (const :tag "Don't check file names" nil) regexp)) - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Functions -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -;;;###autoload -(defmacro define-generic-mode (mode comment-list keyword-list - font-lock-list auto-mode-list - function-list &optional docstring - &rest custom-keyword-args) - "Create a new generic mode MODE. - -MODE is the name of the command for the generic mode; it need not -be quoted. The optional DOCSTRING is the documentation for the -mode command. If you do not supply it, a default documentation -string will be used instead. - -COMMENT-LIST is a list, whose entries are either a single -character, a one or two character string or a cons pair. If the -entry is a character or a string, it is added to the mode's -syntax table with `comment-start' syntax. If the entry is a cons -pair, the elements of the pair are considered to be -`comment-start' and `comment-end' respectively. (The latter -should be nil if you want comments to end at end of line.) Note -that Emacs has limitations regarding comment characters. - -KEYWORD-LIST is a list of keywords to highlight with -`font-lock-keyword-face'. Each keyword should be a string. - -FONT-LOCK-LIST is a list of additional expressions to highlight. -Each entry in the list should have the same form as an entry in -`font-lock-keywords'. - -AUTO-MODE-LIST is a list of regular expressions to add to -`auto-mode-alist'. These regexps are added to `auto-mode-alist' -as soon as `define-generic-mode' is called. - -FUNCTION-LIST is a list of functions to call to do some -additional setup. - -The optional CUSTOM-KEYWORD-ARGS are pairs of keywords and -values. They will be passed to the generated `defcustom' form of -the mode hook variable MODE-hook. Defaults to MODE without the -possible trailing \"-mode\". (This default may not be a valid -customization group defined with `defgroup'. Make sure it is.) -You can specify keyword arguments without specifying a docstring. - -See the file generic-x.el for some examples of `define-generic-mode'." - (declare (debug (sexp def-form def-form def-form form def-form - [&optional stringp] &rest [keywordp form])) - (indent 1)) - - ;; Backward compatibility. - (when (eq (car-safe mode) 'quote) - (setq mode (eval mode))) - - (when (and docstring (not (stringp docstring))) - ;; DOCSTRING is not a string so we assume that it's actually the - ;; first keyword of CUSTOM-KEYWORD-ARGS. - (push docstring custom-keyword-args) - (setq docstring nil)) - - (let* ((name (symbol-name mode)) - (pretty-name (capitalize (replace-regexp-in-string - "-mode\\'" "" name))) - (mode-hook (intern (concat name "-hook")))) - - (unless (plist-get custom-keyword-args :group) - (setq custom-keyword-args - (plist-put custom-keyword-args - :group `',(intern (replace-regexp-in-string - "-mode\\'" "" name))))) - - `(progn - ;; Add a new entry. - (add-to-list 'generic-mode-list ,name) - - ;; Add it to auto-mode-alist - (dolist (re ,auto-mode-list) - (add-to-list 'auto-mode-alist (cons re ',mode))) - - (defcustom ,mode-hook nil - ,(concat "Hook run when entering " pretty-name " mode.") - :type 'hook - ,@custom-keyword-args) - - (defun ,mode () - ,(or docstring - (concat pretty-name " mode.\n" - "This a generic mode defined with `define-generic-mode'.")) - (interactive) - (generic-mode-internal ',mode ,comment-list ,keyword-list - ,font-lock-list ,function-list))))) - -;;;###autoload -(defun generic-mode-internal (mode comment-list keyword-list - font-lock-list function-list) - "Go into the generic mode MODE." - (let* ((name (symbol-name mode)) - (pretty-name (capitalize (replace-regexp-in-string - "-mode\\'" "" name))) - (mode-hook (intern (concat name "-hook")))) - - (kill-all-local-variables) - - (setq major-mode mode - mode-name pretty-name) - - (generic-mode-set-comments comment-list) - - ;; Font-lock functionality. - ;; Font-lock-defaults is always set even if there are no keywords - ;; or font-lock expressions, so comments can be highlighted. - (setq generic-font-lock-keywords - (append - (when keyword-list - (list (generic-make-keywords-list keyword-list - font-lock-keyword-face))) - font-lock-list)) - (setq font-lock-defaults '(generic-font-lock-keywords nil)) - - ;; Call a list of functions - (mapcar 'funcall function-list) - - (run-mode-hooks mode-hook))) - -;;;###autoload -(defun generic-mode (mode) - "Enter generic mode MODE. - -Generic modes provide basic comment and font-lock functionality -for \"generic\" files. (Files which are too small to warrant their -own mode, but have comment characters, keywords, and the like.) - -To define a generic-mode, use the function `define-generic-mode'. -Some generic modes are defined in `generic-x.el'." - (interactive - (list (completing-read "Generic mode: " generic-mode-list nil t))) - (funcall (intern mode))) - -;;; Comment Functionality -(defun generic-mode-set-comments (comment-list) - "Set up comment functionality for generic mode." - (let ((st (make-syntax-table)) - (chars nil) - (comstyles)) - (make-local-variable 'comment-start) - (make-local-variable 'comment-start-skip) - (make-local-variable 'comment-end) - - ;; Go through all the comments - (dolist (start comment-list) - (let (end (comstyle "")) - ;; Normalize - (when (consp start) - (setq end (cdr start)) - (setq start (car start))) - (when (characterp start) (setq start (char-to-string start))) - (cond - ((characterp end) (setq end (char-to-string end))) - ((zerop (length end)) (setq end "\n"))) - - ;; Setup the vars for `comment-region' - (if comment-start - ;; We have already setup a comment-style, so use style b - (progn - (setq comstyle "b") - (setq comment-start-skip - (concat comment-start-skip "\\|" (regexp-quote start) "+\\s-*"))) - ;; First comment-style - (setq comment-start start) - (setq comment-end (if (string-equal end "\n") "" end)) - (setq comment-start-skip (concat (regexp-quote start) "+\\s-*"))) - - ;; Reuse comstyles if necessary - (setq comstyle - (or (cdr (assoc start comstyles)) - (cdr (assoc end comstyles)) - comstyle)) - (push (cons start comstyle) comstyles) - (push (cons end comstyle) comstyles) - - ;; Setup the syntax table - (if (= (length start) 1) - (modify-syntax-entry (string-to-char start) - (concat "< " comstyle) st) - (let ((c0 (elt start 0)) (c1 (elt start 1))) - ;; Store the relevant info but don't update yet - (push (cons c0 (concat (cdr (assoc c0 chars)) "1")) chars) - (push (cons c1 (concat (cdr (assoc c1 chars)) - (concat "2" comstyle))) chars))) - (if (= (length end) 1) - (modify-syntax-entry (string-to-char end) - (concat ">" comstyle) st) - (let ((c0 (elt end 0)) (c1 (elt end 1))) - ;; Store the relevant info but don't update yet - (push (cons c0 (concat (cdr (assoc c0 chars)) - (concat "3" comstyle))) chars) - (push (cons c1 (concat (cdr (assoc c1 chars)) "4")) chars))))) - - ;; Process the chars that were part of a 2-char comment marker - (dolist (cs (nreverse chars)) - (modify-syntax-entry (car cs) - (concat (char-to-string (char-syntax (car cs))) - " " (cdr cs)) - st)) - (set-syntax-table st))) - -(defun generic-bracket-support () - "Imenu support for [KEYWORD] constructs found in INF, INI and Samba files." - (setq imenu-generic-expression - '((nil "^\\[\\(.*\\)\\]" 1)) - imenu-case-fold-search t)) - -;; This generic mode is always defined -(define-generic-mode default-generic-mode (list ?#) nil nil nil nil :group 'generic) - -;; A more general solution would allow us to enter generic-mode for -;; *any* comment character, but would require us to synthesize a new -;; generic-mode on the fly. I think this gives us most of what we -;; want. -(defun generic-mode-find-file-hook () - "Hook function to enter Default-Generic mode automatically. - -Done if the first few lines of a file in Fundamental mode start -with a match for the regexp in `generic-find-file-regexp', unless -the file's name matches the regexp which is the value of the -variable `generic-ignore-files-regexp'. - -This hook will be installed if the variable -`generic-use-find-file-hook' is non-nil. The variable -`generic-lines-to-scan' determines the number of lines to look at." - (when (and (eq major-mode 'fundamental-mode) - (or (null generic-ignore-files-regexp) - (not (string-match - generic-ignore-files-regexp - (file-name-sans-versions buffer-file-name))))) - (save-excursion - (goto-char (point-min)) - (when (re-search-forward generic-find-file-regexp - (save-excursion - (forward-line generic-lines-to-scan) - (point)) t) - (goto-char (point-min)) - (default-generic-mode))))) - -(defun generic-mode-ini-file-find-file-hook () - "Hook function to enter Default-Generic mode automatically for INI files. -Done if the first few lines of a file in Fundamental mode look like an -INI file. This hook is NOT installed by default." - (and (eq major-mode 'fundamental-mode) - (save-excursion - (goto-char (point-min)) - (and (looking-at "^\\s-*\\[.*\\]") - (ini-generic-mode))))) - -(and generic-use-find-file-hook - (add-hook 'find-file-hook 'generic-mode-find-file-hook)) - -;;;###autoload -(defun generic-make-keywords-list (keywords-list face &optional prefix suffix) - "Return a regular expression matching the specified KEYWORDS-LIST. -The regexp is highlighted with FACE." - (unless (listp keywords-list) - (error "Keywords argument must be a list of strings")) - (list (concat prefix "\\_<" - ;; Use an optimized regexp. - (regexp-opt keywords-list t) - "\\_>" suffix) - 1 - face)) - -(provide 'generic) - -;; arch-tag: 239c1fc4-1303-48d9-9ac0-657d655669ea -;;; generic.el ends here
--- a/lisp/gnus/ChangeLog Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/gnus/ChangeLog Thu Apr 14 05:03:52 2005 +0000 @@ -1,3 +1,160 @@ +2005-04-13 Katsumi Yamaoka <yamaoka@jpl.org> + + * gnus-art.el (gnus-mime-inline-part): Use mm-string-to-multibyte. + * qp.el (quoted-printable-encode-region): Use mm-string-to-multibyte. + +2005-04-13 Miles Bader <miles@gnu.org> + + * mm-util.el (mm-string-to-multibyte): Use Gnus trunk definition. + +2005-04-12 Katsumi Yamaoka <yamaoka@jpl.org> + + * nnrss.el (nnrss-node-text): Replace CRLFs (which might be + contained in text because xml.el decodes entities) with LFs. + +2005-04-11 Lute Kamstra <lute@gnu.org> + + * message.el (message-make-date): Handle byte-compiler warnings + differently. + * nnimap.el (nnimap-date-days-ago): Ditto. + +2005-04-10 Stefan Monnier <monnier@iro.umontreal.ca> + + * mm-util.el (mm-string-to-multibyte): New function. + (mm-detect-coding-region): Typo. + +2005-04-11 Katsumi Yamaoka <yamaoka@jpl.org> + + * gnus-art.el (gnus-article-read-summary-keys): Fix misplaced parens. + +2005-04-06 Katsumi Yamaoka <yamaoka@jpl.org> + + * mm-util.el (mm-coding-system-p): Don't return binary for the nil + argument in XEmacs. + + * nnrss.el (nnrss-compatible-encoding-alist): New variable. + (nnrss-request-group): Decode group name first. + (nnrss-request-article): Make a text/plain article if mml-to-mime + failed. + (nnrss-get-encoding): Return a compatible encoding according to + nnrss-compatible-encoding-alist. + (nnrss-opml-export): Use dolist. + (nnrss-find-el): Use consp instead of listp. + (nnrss-order-hrefs): Use dolist. + +2005-04-06 Arne J,Ax(Brgensen <arne@arnested.dk> + + * nnrss.el (nnrss-verbose): Remove. + (nnrss-request-group): Use `nnheader-message' instead. + +2005-04-06 Mark Plaksin <happy@usg.edu> (tiny change) + + * nnrss.el (nnrss-verbose): New variable. + (nnrss-request-group): Make it say nnrss is requesting a group. + +2005-04-06 Katsumi Yamaoka <yamaoka@jpl.org> + + * gnus-agent.el (gnus-agent-group-path): Decode group name. + (gnus-agent-group-pathname): Ditto. + + * gnus-cache.el (gnus-cache-file-name): Decode group name. + + * gnus-group.el (gnus-group-line-format-alist): Use decoded group + name for only %g and %c. + (gnus-group-insert-group-line): Bind gnus-tmp-decoded-group + instead of gnus-tmp-group to decoded group name. + (gnus-group-make-group): Decode group name. + (gnus-group-delete-group): Ditto. + (gnus-group-make-rss-group): Exclude `/'s from group names; + register the group data after opening the nnrss group; unify + non-ASCII group names; encode group name. + (gnus-group-catchup-current): Decode group name. + (gnus-group-expire-articles-1): Ditto. + (gnus-group-set-current-level): Ditto. + (gnus-group-kill-group): Ditto. + + * gnus-spec.el (gnus-update-format-specifications): Flush the + group format spec cache if it doesn't support decoded group names. + + * mm-url.el (mm-url-predefined-programs): Add --silent arg to curl. + + * nnrss.el: Require rfc2047 and mml. + (nnrss-file-coding-system): New variable. + (nnrss-format-string): Redefine it as an inline function. + (nnrss-decode-group-name): New function. + (nnrss-string-as-multibyte): Remove. + (nnrss-retrieve-headers): Decode group name; don't use + nnrss-format-string. + (nnrss-request-group): Decode group name. + (nnrss-request-article): Decode group name; allow a Message-ID as + well as an article number; don't use nnrss-format-string; encode a + Message-ID string which may contain non-ASCII characters; use + mml-to-mime to compose a MIME article; use search-forward instead + of re-search-forward. + (nnrss-request-expire-articles): Decode group name. + (nnrss-request-delete-group): Delete entries in nnrss-group-alist + as well; decode group name. + (nnrss-get-encoding): Fix regexp. + (nnrss-fetch): Clarify error message. + (nnrss-read-server-data): Use insert-file-contents instead of load; + bind file-name-coding-system; use multibyte buffer. + (nnrss-save-server-data): Insert newline; bind + coding-system-for-write to the value of nnrss-file-coding-system; + bind file-name-coding-system; add coding cookie. + (nnrss-read-group-data): Use insert-file-contents instead of load; + bind file-name-coding-system; use multibyte buffer. + (nnrss-save-group-data): Bind coding-system-for-write to the + value of nnrss-file-coding-system; bind file-name-coding-system. + (nnrss-decode-entities-string): Rename from n-d-e-unibyte-string; + make it work with non-ASCII text. + (nnrss-opml-export): Use mm-set-buffer-file-coding-system instead + of set-buffer-file-coding-system. + (nnrss-find-el): Check carefully whether there's a list of string + which old xml.el may return rather than a string; make it work + with old xml.el as well. + +2005-04-06 Tsuyoshi AKIHO <akiho@kawachi.zaq.ne.jp> + + * gnus-sum.el (gnus-summary-walk-group-buffer): Decode group name. + + * nnrss.el (nnrss-get-encoding): New function. + (nnrss-fetch): Use unibyte buffer initially; bind + coding-system-for-read while performing mm-url-insert; remove ^Ms; + decode contents according to the encoding attribute. + (nnrss-save-group-data): Add coding cookie. + (nnrss-mime-encode-string): New function. + (nnrss-check-group): Use it to encode subject and author. + +2005-04-06 Maciek Pasternacki <maciekp@japhy.fnord.org> (tiny change) + + * nnrss.el (nnrss-fetch): Signal an error if w3-parse-buffer also + failed. + +2005-04-06 Jesper Harder <harder@ifa.au.dk> + + * mm-util.el (mm-subst-char-in-string): Support inplace. + + * nnrss.el: Pedantic docstring and whitespace fixes (courtesy of + checkdoc.el). + (nnrss-request-article): Cleanup. + (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-save-group-data): Use nnrss-make-filename; use gnus-prin1. + (nnrss-make-filename): New function. + (nnrss-close): New function. + (nnrss-check-group): Hash on description if link is missing. + (nnrss-get-namespace-prefix): Use string= to compare strings! + Reported by David D. Smith <davidsmith@acm.org>. + (nnrss-opml-export): Turn on sgml-mode. + +2005-04-06 Mark A. Hershberger <mah@everybody.org> + + * nnrss.el (nnrss-opml-import, nnrss-opml-export): New functions. + 2005-04-04 Reiner Steib <Reiner.Steib@gmx.de> * message.el (message-make-date): Add defvars in order to silence @@ -393,9 +550,6 @@ 2004-11-26 Katsumi Yamaoka <yamaoka@jpl.org> - * lpath.el: Remove bbdb-create-internal, bbdb-records, - spam-BBDB-register-routine and spam-enter-ham-BBDB. - * nnrss.el (nnrss-string-as-multibyte): Redefine it as a macro in order to silence the byte compiler.
--- a/lisp/gnus/gnus-agent.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/gnus/gnus-agent.el Thu Apr 14 05:03:52 2005 +0000 @@ -1,5 +1,5 @@ ;;; gnus-agent.el --- unplugged support for Gnus -;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> @@ -1371,7 +1371,7 @@ (nnheader-translate-file-chars (nnheader-replace-duplicate-chars-in-string (nnheader-replace-chars-in-string - (gnus-group-real-name group) + (gnus-group-real-name (gnus-group-decoded-name group)) ?/ ?_) ?. ?_))) (if (or nnmail-use-long-file-names @@ -1387,8 +1387,10 @@ ;; unplugged. The agent must, therefore, use the same directory ;; while plugged. (let ((gnus-command-method (or gnus-command-method - (gnus-find-method-for-group group)))) - (nnmail-group-pathname (gnus-group-real-name group) (gnus-agent-directory)))) + (gnus-find-method-for-group group)))) + (nnmail-group-pathname (gnus-group-real-name + (gnus-group-decoded-name group)) + (gnus-agent-directory)))) (defun gnus-agent-get-function (method) (if (gnus-online method)
--- a/lisp/gnus/gnus-art.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/gnus/gnus-art.el Thu Apr 14 05:03:52 2005 +0000 @@ -4358,21 +4358,16 @@ (mm-read-coding-system "Charset: ")))) (t (if (mm-handle-undisplayer handle) - (mm-remove-part handle)) - (setq contents - (if (fboundp 'string-to-multibyte) - (string-to-multibyte contents) - (mapconcat - (lambda (ch) (mm-string-as-multibyte (char-to-string ch))) - contents ""))))) + (mm-remove-part handle)))) (forward-line 2) - (mm-insert-inline handle - (if (and charset - (setq charset (mm-charset-to-coding-system - charset)) - (not (eq charset 'ascii))) - (mm-decode-coding-string contents charset) - contents)) + (mm-insert-inline + handle + (if (and charset + (setq charset (mm-charset-to-coding-system + charset)) + (not (eq charset 'ascii))) + (mm-decode-coding-string contents charset) + (mm-string-to-multibyte contents))) (goto-char b))))) (defun gnus-mime-view-part-as-charset (&optional handle arg) @@ -5309,7 +5304,7 @@ (when (eq win (selected-window)) (setq new-sum-point (point) new-sum-start (window-start win) - new-sum-hscroll (window-hscroll win)) + new-sum-hscroll (window-hscroll win))) (when (eq in-buffer (current-buffer)) (setq selected (gnus-summary-select-article)) (set-buffer obuf) @@ -5325,7 +5320,7 @@ new-sum-point) (set-window-point win new-sum-point) (set-window-start win new-sum-start) - (set-window-hscroll win new-sum-hscroll))))) + (set-window-hscroll win new-sum-hscroll)))) (set-window-configuration owin) (ding))))))
--- a/lisp/gnus/gnus-cache.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/gnus/gnus-cache.el Thu Apr 14 05:03:52 2005 +0000 @@ -1,6 +1,6 @@ ;;; gnus-cache.el --- cache interface for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -;; Free Software Foundation, Inc. +;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, +;; 2004, 2005 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news @@ -421,6 +421,7 @@ (and (not unread) (not ticked) (not dormant) (memq 'read class)))) (defun gnus-cache-file-name (group article) + (setq group (gnus-group-decoded-name group)) (expand-file-name (if (stringp article) article (int-to-string article)) (file-name-as-directory
--- a/lisp/gnus/gnus-group.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/gnus/gnus-group.el Thu Apr 14 05:03:52 2005 +0000 @@ -482,9 +482,15 @@ (?T (gnus-range-length (cdr (assq 'tick gnus-tmp-marked))) ?d) (?i (+ (gnus-range-length (cdr (assq 'dormant gnus-tmp-marked))) (gnus-range-length (cdr (assq 'tick gnus-tmp-marked)))) ?d) - (?g gnus-tmp-group ?s) + (?g (if (boundp 'gnus-tmp-decoded-group) + gnus-tmp-decoded-group + gnus-tmp-group) + ?s) (?G gnus-tmp-qualified-group ?s) - (?c (gnus-short-group-name gnus-tmp-group) ?s) + (?c (gnus-short-group-name (if (boundp 'gnus-tmp-decoded-group) + gnus-tmp-decoded-group + gnus-tmp-group)) + ?s) (?C gnus-tmp-comment ?s) (?D gnus-tmp-newsgroup-description ?s) (?o gnus-tmp-moderated ?c) @@ -1441,8 +1447,8 @@ (point) (prog1 (1+ (point)) ;; Insert the text. - (let ((gnus-tmp-group (gnus-group-name-decode - gnus-tmp-group group-name-charset))) + (let ((gnus-tmp-decoded-group (gnus-group-name-decode + gnus-tmp-group group-name-charset))) (eval gnus-group-line-format-spec))) `(gnus-group ,(gnus-intern-safe gnus-tmp-group gnus-active-hashtb) gnus-unread ,(if (numberp number) @@ -2244,7 +2250,7 @@ (nname (if method (gnus-group-prefixed-name name meth) name)) backend info) (when (gnus-gethash nname gnus-newsrc-hashtb) - (error "Group %s already exists" nname)) + (error "Group %s already exists" (gnus-group-decoded-name nname))) ;; Subscribe to the new group. (gnus-group-change-level (setq info (list t nname gnus-level-default-subscribed nil nil meth)) @@ -2305,20 +2311,21 @@ (unless (gnus-check-backend-function 'request-delete-group group) (error "This back end does not support group deletion")) (prog1 - (if (and (not no-prompt) - (not (gnus-yes-or-no-p - (format - "Do you really want to delete %s%s? " - group (if force " and all its contents" ""))))) - () ; Whew! - (gnus-message 6 "Deleting group %s..." group) - (if (not (gnus-request-delete-group group force)) - (gnus-error 3 "Couldn't delete group %s" group) - (gnus-message 6 "Deleting group %s...done" group) - (gnus-group-goto-group group) - (gnus-group-kill-group 1 t) - (gnus-sethash group nil gnus-active-hashtb) - t)) + (let ((group-decoded (gnus-group-decoded-name group))) + (if (and (not no-prompt) + (not (gnus-yes-or-no-p + (format + "Do you really want to delete %s%s? " + group-decoded (if force " and all its contents" ""))))) + () ; Whew! + (gnus-message 6 "Deleting group %s..." group-decoded) + (if (not (gnus-request-delete-group group force)) + (gnus-error 3 "Couldn't delete group %s" group-decoded) + (gnus-message 6 "Deleting group %s...done" group-decoded) + (gnus-group-goto-group group) + (gnus-group-kill-group 1 t) + (gnus-sethash group nil gnus-active-hashtb) + t))) (gnus-group-position-point))) (defun gnus-group-rename-group (group new-name) @@ -2588,16 +2595,26 @@ (setq url (read-from-minibuffer "URL to Search for RSS: "))) (let ((feedinfo (nnrss-discover-feed url))) (if feedinfo - (let ((title (read-from-minibuffer "Title: " - (cdr (assoc 'title - feedinfo)))) + (let ((title (gnus-newsgroup-savable-name + (read-from-minibuffer "Title: " + (gnus-newsgroup-savable-name + (or (cdr (assoc 'title + feedinfo)) + ""))))) (desc (read-from-minibuffer "Description: " (cdr (assoc 'description feedinfo)))) - (href (cdr (assoc 'href feedinfo)))) - (push (list title href desc) - nnrss-group-alist) - (gnus-group-make-group title '(nnrss "")) + (href (cdr (assoc 'href feedinfo))) + (encodable (mm-coding-system-p 'utf-8))) + (when encodable + ;; Unify non-ASCII text. + (setq title (mm-decode-coding-string + (mm-encode-coding-string title 'utf-8) 'utf-8))) + (gnus-group-make-group (if encodable + (mm-encode-coding-string title 'utf-8) + title) + '(nnrss "")) + (push (list title href desc) nnrss-group-alist) (nnrss-save-server-data nil)) (error "No feeds found for %s" url)))) @@ -3101,7 +3118,7 @@ "Do you really want to mark all articles in %s as read? " "Mark all unread articles in %s as read? ") (if (= (length groups) 1) - (car groups) + (gnus-group-decoded-name (car groups)) (format "these %d groups" (length groups))))))) n (while (setq group (pop groups)) @@ -3179,7 +3196,8 @@ (defun gnus-group-expire-articles-1 (group) (when (gnus-check-backend-function 'request-expire-articles group) - (gnus-message 6 "Expiring articles in %s..." group) + (gnus-message 6 "Expiring articles in %s..." + (gnus-group-decoded-name group)) (let* ((info (gnus-get-info group)) (expirable (if (gnus-group-total-expirable-p group) (cons nil (gnus-list-of-read-articles group)) @@ -3204,7 +3222,8 @@ (gnus-request-expire-articles (gnus-uncompress-sequence (cdr expirable)) group)))) (gnus-close-group group)) - (gnus-message 6 "Expiring articles in %s...done" group) + (gnus-message 6 "Expiring articles in %s...done" + (gnus-group-decoded-name group)) ;; Return the list of un-expired articles. (cdr expirable)))) @@ -3243,7 +3262,8 @@ (while (setq group (pop groups)) (gnus-group-remove-mark group) (gnus-message 6 "Changed level of %s from %d to %d" - group (or (gnus-group-group-level) gnus-level-killed) + (gnus-group-decoded-name group) + (or (gnus-group-group-level) gnus-level-killed) level) (gnus-group-change-level group level (or (gnus-group-group-level) gnus-level-killed)) @@ -3392,7 +3412,7 @@ gnus-list-of-killed-groups)) (gnus-group-change-level (if entry entry group) gnus-level-killed (if entry nil level)) - (message "Killed group %s" group)) + (message "Killed group %s" (gnus-group-decoded-name group))) ;; If there are lots and lots of groups to be killed, we use ;; this thing instead. (dolist (group (nreverse groups))
--- a/lisp/gnus/gnus-spec.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/gnus/gnus-spec.el Thu Apr 14 05:03:52 2005 +0000 @@ -1,5 +1,5 @@ ;;; gnus-spec.el --- format spec functions for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> @@ -196,6 +196,13 @@ (not (equal emacs-version (cdr (assq 'version gnus-format-specs))))) (setq gnus-format-specs nil)) + ;; Flush the group format spec cache if it doesn't support decoded + ;; group names. + (when (memq 'group types) + (let ((spec (assq 'group gnus-format-specs))) + (unless (string-match " gnus-tmp-decoded-group[ )]" + (gnus-prin1-to-string (nth 2 spec))) + (setq gnus-format-specs (delq spec gnus-format-specs))))) ;; Go through all the formats and see whether they need updating. (let (new-format entry type val updated)
--- a/lisp/gnus/gnus-sum.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/gnus/gnus-sum.el Thu Apr 14 05:03:52 2005 +0000 @@ -7254,11 +7254,12 @@ (if (and group (not (gnus-ephemeral-group-p gnus-newsgroup-name))) (format " (Type %s for %s [%s])" - (single-key-description cmd) group + (single-key-description cmd) + (gnus-group-decoded-name group) (car (gnus-gethash group gnus-newsrc-hashtb))) (format " (Type %s to exit %s)" (single-key-description cmd) - gnus-newsgroup-name)))) + (gnus-group-decoded-name gnus-newsgroup-name))))) ;; Confirm auto selection. (setq key (car (setq keve (gnus-read-event-char prompt))) ended t)
--- a/lisp/gnus/message.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/gnus/message.el Thu Apr 14 05:03:52 2005 +0000 @@ -4564,12 +4564,11 @@ (when (re-search-forward ",+$" nil t) (replace-match "" t t)))))) +(eval-when-compile (require 'parse-time)) (defun message-make-date (&optional now) "Make a valid data header. If NOW, use that time instead." (require 'parse-time) - (defvar parse-time-weekdays) - (defvar parse-time-months) (let* ((now (or now (current-time))) (zone (nth 8 (decode-time now))) (sign "+"))
--- a/lisp/gnus/mm-url.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/gnus/mm-url.el Thu Apr 14 05:03:52 2005 +0000 @@ -59,7 +59,7 @@ '((wget "wget" "--user-agent=mm-url" "-q" "-O" "-") (w3m "w3m" "-dump_source") (lynx "lynx" "-source") - (curl "curl"))) + (curl "curl" "--silent"))) (defcustom mm-url-program (cond
--- a/lisp/gnus/mm-util.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/gnus/mm-util.el Thu Apr 14 05:03:52 2005 +0000 @@ -57,9 +57,11 @@ mm-mime-mule-charset-alist) nil t)))) (subst-char-in-string - . (lambda (from to string) ;; stolen (and renamed) from nnheader.el - "Replace characters in STRING from FROM to TO." - (let ((string (substring string 0)) ;Copy string. + . (lambda (from to string &optional inplace) + ;; stolen (and renamed) from nnheader.el + "Replace characters in STRING from FROM to TO. + Unless optional argument INPLACE is non-nil, return a new string." + (let ((string (if inplace string (copy-sequence string))) (len (length string)) (idx 0)) ;; Replace all occurrences of FROM with TO. @@ -70,7 +72,31 @@ string))) (string-as-unibyte . identity) (string-make-unibyte . identity) + ;; string-as-multibyte often doesn't really do what you think it does. + ;; Example: + ;; (aref (string-as-multibyte "\201") 0) -> 129 (aka ?\201) + ;; (aref (string-as-multibyte "\300") 0) -> 192 (aka ?\300) + ;; (aref (string-as-multibyte "\300\201") 0) -> 192 (aka ?\300) + ;; (aref (string-as-multibyte "\300\201") 1) -> 129 (aka ?\201) + ;; but + ;; (aref (string-as-multibyte "\201\300") 0) -> 2240 + ;; (aref (string-as-multibyte "\201\300") 1) -> <error> + ;; Better use string-to-multibyte or encode-coding-string. + ;; If you really need string-as-multibyte somewhere it's usually + ;; because you're using the internal emacs-mule representation (maybe + ;; because you're using string-as-unibyte somewhere), which is + ;; generally a problem in itself. + ;; Here is an approximate equivalence table to help think about it: + ;; (string-as-multibyte s) ~= (decode-coding-string s 'emacs-mule) + ;; (string-to-multibyte s) ~= (decode-coding-string s 'binary) + ;; (string-make-multibyte s) ~= (decode-coding-string s locale-coding-system) (string-as-multibyte . identity) + (string-to-multibyte + . (lambda (string) + "Return a multibyte string with the same individual chars as string." + (mapconcat + (lambda (ch) (mm-string-as-multibyte (char-to-string ch))) + string ""))) (multibyte-string-p . ignore) ;; It is not a MIME function, but some MIME functions use it. (make-temp-file . (lambda (prefix &optional dir-flag) @@ -153,7 +179,7 @@ If CS is available, return CS itself in Emacs, and return a coding system object in XEmacs." (if (fboundp 'find-coding-system) - (find-coding-system cs) + (and cs (find-coding-system cs)) (if (fboundp 'coding-system-p) (when (coding-system-p cs) cs) @@ -878,7 +904,7 @@ (defun mm-detect-coding-region (start end) "Like `detect-coding-region' except returning the best one." (let ((coding-systems - (detect-coding-region (point) (point-max)))) + (detect-coding-region start end))) (or (car-safe coding-systems) coding-systems))) (defun mm-detect-coding-region (start end) @@ -902,5 +928,5 @@ (provide 'mm-util) -;;; arch-tag: 94dc5388-825d-4fd1-bfa5-2100aa351238 +;; arch-tag: 94dc5388-825d-4fd1-bfa5-2100aa351238 ;;; mm-util.el ends here
--- a/lisp/gnus/nnimap.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/gnus/nnimap.el Thu Apr 14 05:03:52 2005 +0000 @@ -1386,10 +1386,10 @@ (list (- ms 1) (+ (expt 2 16) ls)) (list ms ls)))) +(eval-when-compile (require 'parse-time)) (defun nnimap-date-days-ago (daysago) "Return date, in format \"3-Aug-1998\", for DAYSAGO days ago." (require 'parse-time) - (defvar parse-time-months) (let* ((time (nnimap-time-substract (current-time) (days-to-time daysago))) (date (format-time-string (format "%%d-%s-%%Y"
--- a/lisp/gnus/nnrss.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/gnus/nnrss.el Thu Apr 14 05:03:52 2005 +0000 @@ -1,5 +1,5 @@ ;;; nnrss.el --- interfacing with RSS -;; Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +;; Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu> ;; Keywords: RSS @@ -36,9 +36,11 @@ (require 'time-date) (require 'rfc2231) (require 'mm-url) +(require 'rfc2047) +(require 'mml) (eval-when-compile (ignore-errors - (require 'xml))) + (require 'xml))) (eval '(require 'xml)) (nnoo-declare nnrss) @@ -75,20 +77,32 @@ (defvar nnrss-content-function nil "A function which is called in `nnrss-request-article'. The arguments are (ENTRY GROUP ARTICLE). -ENTRY is the record of the current headline. GROUP is the group name. +ENTRY is the record of the current headline. GROUP is the group name. ARTICLE is the article number of the current headline.") +(defvar nnrss-file-coding-system mm-universal-coding-system + "Coding system used when reading and writing files.") + +(defvar nnrss-compatible-encoding-alist '((iso-8859-1 . windows-1252)) + "Alist of encodings and those supersets. +The cdr of each element is used to decode data if it is available when +the car is what the data specify as the encoding. Or, the car is used +for decoding when the cdr that the data specify is not available.") + (nnoo-define-basics nnrss) ;;; Interface functions -(eval-when-compile - (defmacro nnrss-string-as-multibyte (string) - (if (featurep 'xemacs) - string - `(string-as-multibyte ,string)))) +(defsubst nnrss-format-string (string) + (gnus-replace-in-string string " *\n *" " ")) + +(defun nnrss-decode-group-name (group) + (if (and group (mm-coding-system-p 'utf-8)) + (setq group (mm-decode-coding-string group 'utf-8)) + group)) (deffoo nnrss-retrieve-headers (articles &optional group server fetch-old) + (setq group (nnrss-decode-group-name group)) (nnrss-possibly-change-group group server) (let (e) (save-excursion @@ -97,21 +111,26 @@ (dolist (article articles) (if (setq e (assq article nnrss-group-data)) (insert (number-to-string (car e)) "\t" ;; number - (if (nth 3 e) - (nnrss-format-string (nth 3 e)) "") - "\t" ;; subject - (if (nth 4 e) - (nnrss-format-string (nth 4 e)) - "(nobody)") - "\t" ;;from + ;; subject + (or (nth 3 e) "") + "\t" + ;; from + (or (nth 4 e) "(nobody)") + "\t" + ;; date (or (nth 5 e) "") - "\t" ;; date + "\t" + ;; id (format "<%d@%s.nnrss>" (car e) group) - "\t" ;; id - "\t" ;; refs - "-1" "\t" ;; chars - "-1" "\t" ;; lines - "" "\t" ;; Xref + "\t" + ;; refs + "\t" + ;; chars + "-1" "\t" + ;; lines + "-1" "\t" + ;; Xref + "" "\t" (if (and (nth 6 e) (memq nnrss-description-field nnmail-extra-headers)) @@ -132,69 +151,102 @@ 'nov) (deffoo nnrss-request-group (group &optional server dont-check) + (setq group (nnrss-decode-group-name group)) + (nnheader-message 6 "nnrss: Requesting %s..." group) (nnrss-possibly-change-group group server) - (if dont-check - t - (nnrss-check-group group server) - (nnheader-report 'nnrss "Opened group %s" group) - (nnheader-insert - "211 %d %d %d %s\n" nnrss-group-max nnrss-group-min nnrss-group-max - (prin1-to-string group) - t))) + (prog1 + (if dont-check + t + (nnrss-check-group group server) + (nnheader-report 'nnrss "Opened group %s" group) + (nnheader-insert + "211 %d %d %d %s\n" nnrss-group-max nnrss-group-min nnrss-group-max + (prin1-to-string group) + t)) + (nnheader-message 6 "nnrss: Requesting %s...done" group))) (deffoo nnrss-close-group (group &optional server) t) (deffoo nnrss-request-article (article &optional group server buffer) + (setq group (nnrss-decode-group-name group)) + (when (stringp article) + (setq article (if (string-match "\\`<\\([0-9]+\\)@" article) + (string-to-number (match-string 1 article)) + 0))) (nnrss-possibly-change-group group server) (let ((e (assq article nnrss-group-data)) - (boundary "=-=-=-=-=-=-=-=-=-") (nntp-server-buffer (or buffer nntp-server-buffer)) post err) (when e - (catch 'error - (with-current-buffer nntp-server-buffer - (erase-buffer) - (goto-char (point-min)) - (insert "Mime-Version: 1.0\nContent-Type: multipart/alternative; boundary=\"" boundary "\"\n") - (if group - (insert "Newsgroups: " group "\n")) - (if (nth 3 e) - (insert "Subject: " (nnrss-format-string (nth 3 e)) "\n")) - (if (nth 4 e) - (insert "From: " (nnrss-format-string (nth 4 e)) "\n")) - (if (nth 5 e) - (insert "Date: " (nnrss-format-string (nth 5 e)) "\n")) - (insert "Message-ID: " (format "<%d@%s.nnrss>" (car e) group) "\n") - (insert "\n") - (let ((text (if (nth 6 e) - (nnrss-string-as-multibyte (nth 6 e)))) - (link (if (nth 2 e) - (nth 2 e)))) - (insert "\n\n--" boundary "\nContent-Type: text/plain\n\n") - (let ((point (point))) - (if text - (progn (insert text) - (goto-char point) - (while (re-search-forward "\n" nil t) - (replace-match " ")) - (goto-char (point-max)) - (insert "\n\n"))) - (if link - (insert link))) - (insert "\n\n--" boundary "\nContent-Type: text/html\n\n") - (let ((point (point))) - (if text - (progn (insert "<html><head></head><body>\n" text "\n</body></html>") - (goto-char point) - (while (re-search-forward "\n" nil t) - (replace-match " ")) - (goto-char (point-max)) - (insert "\n\n"))) - (if link - (insert "<p><a href=\"" link "\">link</a></p>\n")))) - (if nnrss-content-function - (funcall nnrss-content-function e group article))))) + (with-current-buffer nntp-server-buffer + (erase-buffer) + (if group + (insert "Newsgroups: " group "\n")) + (if (nth 3 e) + (insert "Subject: " (nth 3 e) "\n")) + (if (nth 4 e) + (insert "From: " (nth 4 e) "\n")) + (if (nth 5 e) + (insert "Date: " (nnrss-format-string (nth 5 e)) "\n")) + (let ((header (buffer-string)) + (text (if (nth 6 e) + (mapconcat 'identity + (delete "" (split-string (nth 6 e) "\n+")) + " "))) + (link (nth 2 e)) + ;; Enable encoding of Newsgroups header in XEmacs. + (default-enable-multibyte-characters t) + (rfc2047-header-encoding-alist + (if (mm-coding-system-p 'utf-8) + (cons '("Newsgroups" . utf-8) + rfc2047-header-encoding-alist) + rfc2047-header-encoding-alist)) + rfc2047-encode-encoded-words body) + (when (or text link) + (insert "\n") + (insert "<#multipart type=alternative>\n" + "<#part type=\"text/plain\">\n") + (setq body (point)) + (if text + (progn + (insert text "\n") + (when link + (insert "\n" link "\n"))) + (when link + (insert link "\n"))) + (setq body (buffer-substring body (point))) + (insert "<#/part>\n" + "<#part type=\"text/html\">\n" + "<html><head></head><body>\n") + (when text + (insert text "\n")) + (when link + (insert "<p><a href=\"" link "\">link</a></p>\n")) + (insert "</body></html>\n" + "<#/part>\n" + "<#/multipart>\n")) + (condition-case nil + (mml-to-mime) + (error + (erase-buffer) + (insert header + "Content-Type: text/plain; charset=gnus-decoded\n" + "Content-Transfer-Encoding: 8bit\n\n" + body) + (nnheader-message + 3 "Warning - there might be invalid characters")))) + (goto-char (point-min)) + (search-forward "\n\n") + (forward-line -1) + (insert (format "Message-ID: <%d@%s.nnrss>\n" + (car e) + (let ((rfc2047-encoding-type 'mime) + rfc2047-encode-max-chars) + (rfc2047-encode-string + (gnus-replace-in-string group "[\t\n ]+" "_"))))) + (when nnrss-content-function + (funcall nnrss-content-function e group article)))) (cond (err (nnheader-report 'nnrss err)) @@ -217,6 +269,7 @@ (deffoo nnrss-request-expire-articles (articles group &optional server force) + (setq group (nnrss-decode-group-name group)) (nnrss-possibly-change-group group server) (let (e days not-expirable changed) (dolist (art articles) @@ -234,18 +287,18 @@ not-expirable)) (deffoo nnrss-request-delete-group (group &optional force server) + (setq group (nnrss-decode-group-name group)) (nnrss-possibly-change-group group server) + (let (elem) + ;; There may be two or more entries in `nnrss-group-alist' since + ;; this function didn't delete them formerly. + (while (setq elem (assoc group nnrss-group-alist)) + (setq nnrss-group-alist (delq elem nnrss-group-alist)))) (setq nnrss-server-data (delq (assoc group nnrss-server-data) nnrss-server-data)) (nnrss-save-server-data server) - (let ((file (expand-file-name - (nnrss-translate-file-chars - (concat group (and server - (not (equal server "")) - "-") - server ".el")) nnrss-directory))) - (ignore-errors - (delete-file file))) + (ignore-errors + (delete-file (nnrss-make-filename group server))) t) (deffoo nnrss-request-list-newsgroups (&optional server) @@ -262,34 +315,67 @@ ;;; Internal functions (eval-when-compile (defun xml-rpc-method-call (&rest args))) + +(defun nnrss-get-encoding () + "Return an encoding attribute specified in the current xml contents. +If `nnrss-compatible-encoding-alist' specifies the compatible encoding, +it is used instead. If the xml contents doesn't specify the encoding, +return `utf-8' which is the default encoding for xml if it is available, +otherwise return nil." + (goto-char (point-min)) + (if (re-search-forward + "<\\?[^>]*encoding=\\(\"\\([^\">]+\\)\"\\|'\\([^'>]+\\)'\\)" + nil t) + (let ((encoding (intern (downcase (or (match-string 2) + (match-string 3)))))) + (or + (mm-coding-system-p (cdr (assq encoding + nnrss-compatible-encoding-alist))) + (mm-coding-system-p encoding) + (mm-coding-system-p (car (rassq encoding + nnrss-compatible-encoding-alist))))) + (mm-coding-system-p 'utf-8))) + (defun nnrss-fetch (url &optional local) - "Fetch the url and put it in a the expected lisp structure." - (with-temp-buffer - ;some CVS versions of url.el need this to close the connection quickly - (let* (xmlform htmlform) + "Fetch URL and put it in a the expected Lisp structure." + (mm-with-unibyte-buffer + ;;some CVS versions of url.el need this to close the connection quickly + (let (cs xmlform htmlform) ;; bit o' work necessary for w3 pre-cvs and post-cvs (if local (let ((coding-system-for-read 'binary)) (insert-file-contents url)) - (mm-url-insert url)) - -;; Because xml-parse-region can't deal with anything that isn't -;; xml and w3-parse-buffer can't deal with some xml, we have to -;; parse with xml-parse-region first and, if that fails, parse -;; with w3-parse-buffer. Yuck. Eventually, someone should find out -;; why w3-parse-buffer fails to parse some well-formed xml and -;; fix it. + ;; FIXME: shouldn't binding `coding-system-for-read' be moved + ;; to `mm-url-insert'? + (let ((coding-system-for-read 'binary)) + (mm-url-insert url))) + (nnheader-remove-cr-followed-by-lf) + ;; Decode text according to the encoding attribute. + (when (setq cs (nnrss-get-encoding)) + (mm-decode-coding-region (point-min) (point-max) cs) + (mm-enable-multibyte)) + (goto-char (point-min)) - (condition-case err - (setq xmlform (xml-parse-region (point-min) (point-max))) - (error (if (fboundp 'w3-parse-buffer) - (setq htmlform (caddar (w3-parse-buffer - (current-buffer)))) - (message "nnrss: Not valid XML and w3 parse not available (%s)" - url)))) - (if htmlform - htmlform - xmlform)))) + ;; Because xml-parse-region can't deal with anything that isn't + ;; xml and w3-parse-buffer can't deal with some xml, we have to + ;; parse with xml-parse-region first and, if that fails, parse + ;; with w3-parse-buffer. Yuck. Eventually, someone should find out + ;; why w3-parse-buffer fails to parse some well-formed xml and + ;; fix it. + + (condition-case err1 + (setq xmlform (xml-parse-region (point-min) (point-max))) + (error + (condition-case err2 + (setq htmlform (caddar (w3-parse-buffer + (current-buffer)))) + (error + (message "\ +nnrss: %s: Not valid XML %s and w3-parse doesn't work %s" + url err1 err2))))) + (if htmlform + htmlform + xmlform)))) (defun nnrss-possibly-change-group (&optional group server) (when (and server @@ -302,9 +388,9 @@ (defvar nnrss-extra-categories '(nnrss-snarf-moreover-categories)) (defun nnrss-generate-active () - (if (y-or-n-p "fetch extra categories? ") - (dolist (func nnrss-extra-categories) - (funcall func))) + (when (y-or-n-p "Fetch extra categories? ") + (dolist (func nnrss-extra-categories) + (funcall func))) (save-excursion (set-buffer nntp-server-buffer) (erase-buffer) @@ -318,41 +404,26 @@ (defun nnrss-read-server-data (server) (setq nnrss-server-data nil) - (let ((file (expand-file-name - (nnrss-translate-file-chars - (concat "nnrss" (and server - (not (equal server "")) - "-") - server - ".el")) - nnrss-directory))) + (let ((file (nnrss-make-filename "nnrss" server))) (when (file-exists-p file) - (with-temp-buffer - (let ((coding-system-for-read 'binary) - emacs-lisp-mode-hook) + ;; In Emacs 21.3 and earlier, `load' doesn't support non-ASCII + ;; file names. So, we use `insert-file-contents' instead. + (mm-with-multibyte-buffer + (let ((coding-system-for-read nnrss-file-coding-system) + (file-name-coding-system nnmail-pathname-coding-system)) (insert-file-contents file) - (emacs-lisp-mode) - (goto-char (point-min)) - (eval-buffer)))))) + (eval-region (point-min) (point-max))))))) (defun nnrss-save-server-data (server) (gnus-make-directory nnrss-directory) - (let ((file (expand-file-name - (nnrss-translate-file-chars - (concat "nnrss" (and server - (not (equal server "")) - "-") - server ".el")) - nnrss-directory))) - (let ((coding-system-for-write 'binary) - print-level print-length) - (with-temp-file file - (insert "(setq nnrss-group-alist '" - (prin1-to-string nnrss-group-alist) - ")\n") - (insert "(setq nnrss-server-data '" - (prin1-to-string nnrss-server-data) - ")\n"))))) + (let ((coding-system-for-write nnrss-file-coding-system) + (file-name-coding-system nnmail-pathname-coding-system)) + (with-temp-file (nnrss-make-filename "nnrss" server) + (insert (format ";; -*- coding: %s; -*-\n" + nnrss-file-coding-system)) + (gnus-prin1 `(setq nnrss-group-alist ',nnrss-group-alist)) + (insert "\n") + (gnus-prin1 `(setq nnrss-server-data ',nnrss-server-data))))) (defun nnrss-read-group-data (group server) (setq nnrss-group-data nil) @@ -360,43 +431,50 @@ (let ((pair (assoc group nnrss-server-data))) (setq nnrss-group-max (or (cadr pair) 0)) (setq nnrss-group-min (+ nnrss-group-max 1))) - (let ((file (expand-file-name - (nnrss-translate-file-chars - (concat group (and server - (not (equal server "")) - "-") - server ".el")) - nnrss-directory))) + (let ((file (nnrss-make-filename group server))) (when (file-exists-p file) - (with-temp-buffer - (let ((coding-system-for-read 'binary) - emacs-lisp-mode-hook) + ;; In Emacs 21.3 and earlier, `load' doesn't support non-ASCII + ;; file names. So, we use `insert-file-contents' instead. + (mm-with-multibyte-buffer + (let ((coding-system-for-read nnrss-file-coding-system) + (file-name-coding-system nnmail-pathname-coding-system)) (insert-file-contents file) - (emacs-lisp-mode) - (goto-char (point-min)) - (eval-buffer))) + (eval-region (point-min) (point-max)))) (dolist (e nnrss-group-data) - (gnus-sethash (nth 2 e) e nnrss-group-hashtb) - (if (and (car e) (> nnrss-group-min (car e))) - (setq nnrss-group-min (car e))) - (if (and (car e) (< nnrss-group-max (car e))) - (setq nnrss-group-max (car e))))))) + (gnus-sethash (or (nth 2 e) (nth 6 e)) t nnrss-group-hashtb) + (when (and (car e) (> nnrss-group-min (car e))) + (setq nnrss-group-min (car e))) + (when (and (car e) (< nnrss-group-max (car e))) + (setq nnrss-group-max (car e))))))) (defun nnrss-save-group-data (group server) (gnus-make-directory nnrss-directory) - (let ((file (expand-file-name - (nnrss-translate-file-chars - (concat group (and server - (not (equal server "")) - "-") - server ".el")) - nnrss-directory))) - (let ((coding-system-for-write 'binary) - print-level print-length) - (with-temp-file file - (insert "(setq nnrss-group-data '" - (prin1-to-string nnrss-group-data) - ")\n"))))) + (let ((coding-system-for-write nnrss-file-coding-system) + (file-name-coding-system nnmail-pathname-coding-system)) + (with-temp-file (nnrss-make-filename group server) + (insert (format ";; -*- coding: %s; -*-\n" + nnrss-file-coding-system)) + (gnus-prin1 `(setq nnrss-group-data ',nnrss-group-data))))) + +(defun nnrss-make-filename (name server) + (expand-file-name + (nnrss-translate-file-chars + (concat name + (and server + (not (equal server "")) + "-") + server + ".el")) + nnrss-directory)) + +(gnus-add-shutdown 'nnrss-close 'gnus) + +(defun nnrss-close () + "Clear internal nnrss variables." + (setq nnrss-group-data nil + nnrss-server-data nil + nnrss-group-hashtb nil + nnrss-group-alist nil)) ;;; URL interface @@ -407,15 +485,36 @@ (mm-with-unibyte-current-buffer (mm-url-insert url))) -(defun nnrss-decode-entities-unibyte-string (string) +(defun nnrss-decode-entities-string (string) (if string - (mm-with-unibyte-buffer + (mm-with-multibyte-buffer (insert string) (mm-url-decode-entities-nbsp) (buffer-string)))) (defalias 'nnrss-insert 'nnrss-insert-w3) +(defun nnrss-mime-encode-string (string) + (mm-with-multibyte-buffer + (insert string) + (mm-url-decode-entities-nbsp) + (goto-char (point-min)) + (while (re-search-forward "[\t\n ]+" nil t) + (replace-match " ")) + (goto-char (point-min)) + (skip-chars-forward " ") + (delete-region (point-min) (point)) + (goto-char (point-max)) + (skip-chars-forward " ") + (delete-region (point) (point-max)) + (let ((rfc2047-encoding-type 'mime) + rfc2047-encode-max-chars) + (rfc2047-encode-region (point-min) (point-max))) + (goto-char (point-min)) + (while (search-forward "\n" nil t) + (delete-backward-char 1)) + (buffer-string))) + ;;; Snarf functions (defun nnrss-check-group (group server) @@ -431,11 +530,11 @@ (second (assoc group nnrss-group-alist)))) (unless url (setq url - (cdr - (assoc 'href - (nnrss-discover-feed - (read-string - (format "URL to search for %s: " group) "http://"))))) + (cdr + (assoc 'href + (nnrss-discover-feed + (read-string + (format "URL to search for %s: " group) "http://"))))) (let ((pair (assoc group nnrss-server-data))) (if pair (setcdr (cdr pair) (list url)) @@ -451,12 +550,16 @@ content-ns (nnrss-get-namespace-prefix xml "http://purl.org/rss/1.0/modules/content/")) (dolist (item (nreverse (nnrss-find-el (intern (concat rss-ns "item")) xml))) (when (and (listp item) - (eq (intern (concat rss-ns "item")) (car item)) - (setq url (nnrss-decode-entities-unibyte-string - (nnrss-node-text rss-ns 'link (cddr item)))) - (not (gnus-gethash url nnrss-group-hashtb))) + (string= (concat rss-ns "item") (car item)) + (if (setq url (nnrss-decode-entities-string + (nnrss-node-text rss-ns 'link (cddr item)))) + (not (gnus-gethash url nnrss-group-hashtb)) + (setq extra (or (nnrss-node-text content-ns 'encoded item) + (nnrss-node-text rss-ns 'description item))) + (not (gnus-gethash extra nnrss-group-hashtb)))) (setq subject (nnrss-node-text rss-ns 'title item)) - (setq extra (or (nnrss-node-text content-ns 'encoded item) + (setq extra (or extra + (nnrss-node-text content-ns 'encoded item) (nnrss-node-text rss-ns 'description item))) (setq author (or (nnrss-node-text rss-ns 'author item) (nnrss-node-text dc-ns 'creator item) @@ -469,13 +572,14 @@ (incf nnrss-group-max) (current-time) url - (and subject (nnrss-decode-entities-unibyte-string subject)) - (and author (nnrss-decode-entities-unibyte-string author)) + (and subject (nnrss-mime-encode-string subject)) + (and author (nnrss-mime-encode-string author)) date - (and extra (nnrss-decode-entities-unibyte-string extra))) + (and extra (nnrss-decode-entities-string extra))) nnrss-group-data) - (gnus-sethash url (car nnrss-group-data) nnrss-group-hashtb) - (setq changed t))) + (gnus-sethash (or url extra) t nnrss-group-hashtb) + (setq changed t)) + (setq extra nil)) (when changed (nnrss-save-group-data group server) (let ((pair (assoc group nnrss-server-data))) @@ -484,6 +588,45 @@ (push (list group nnrss-group-max) nnrss-server-data))) (nnrss-save-server-data server)))) +(defun nnrss-opml-import (opml-file) + "OPML subscriptions import. +Read the file and attempt to subscribe to each Feed in the file." + (interactive "fImport file: ") + (mapcar + (lambda (node) (gnus-group-make-rss-group + (cdr (assq 'xmlUrl (cadr node))))) + (nnrss-find-el 'outline + (progn + (find-file opml-file) + (xml-parse-region (point-min) + (point-max)))))) + +(defun nnrss-opml-export () + "OPML subscription export. +Export subscriptions to a buffer in OPML Format." + (interactive) + (with-current-buffer (get-buffer-create "*OPML Export*") + (mm-set-buffer-file-coding-system 'utf-8) + (insert "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + "<!-- OPML generated by Emacs Gnus' nnrss.el -->\n" + "<opml version=\"1.1\">\n" + " <head>\n" + " <title>mySubscriptions</title>\n" + " <dateCreated>" (format-time-string "%a, %d %b %Y %T %z") + "</dateCreated>\n" + " <ownerEmail>" user-mail-address "</ownerEmail>\n" + " <ownerName>" (user-full-name) "</ownerName>\n" + " </head>\n" + " <body>\n") + (dolist (sub nnrss-group-alist) + (insert " <outline text=\"" (car sub) + "\" xmlUrl=\"" (cadr sub) "\"/>\n")) + (insert " </body>\n" + "</opml>\n")) + (pop-to-buffer "*OPML Export*") + (when (fboundp 'sgml-mode) + (sgml-mode))) + (defun nnrss-generate-download-script () "Generate a download script in the current buffer. It is useful when `(setq nnrss-use-local t)'." @@ -530,17 +673,17 @@ (if changed (nnrss-save-server-data "")))) -(defun nnrss-format-string (string) - (gnus-replace-in-string (nnrss-string-as-multibyte string) " *\n *" " ")) - (defun nnrss-node-text (namespace local-name element) (let* ((node (assq (intern (concat namespace (symbol-name local-name))) element)) (text (if (and node (listp node)) (nnrss-node-just-text node) node)) - (cleaned-text (if text (gnus-replace-in-string - text "^[\000-\037\177]+\\|^ +\\| +$" "")))) + (cleaned-text (if text + (gnus-replace-in-string + (gnus-replace-in-string + text "^[\000-\037\177]+\\|^ +\\| +$" "") + "\r\n" "\n")))) (if (string-equal "" cleaned-text) nil cleaned-text))) @@ -551,56 +694,59 @@ node)) (defun nnrss-find-el (tag data &optional found-list) - "Find the all matching elements in the data. Careful with this on -large documents!" - (if (listp data) - (mapcar (lambda (bit) - (if (car-safe bit) - (progn (if (equal tag (car bit)) - (setq found-list - (append found-list - (list bit)))) - (if (and (listp (car-safe (caddr bit))) - (not (stringp (caddr bit)))) - (setq found-list - (append found-list - (nnrss-find-el - tag (caddr bit)))) - (setq found-list - (append found-list - (nnrss-find-el - tag (cddr bit)))))))) - data)) + "Find the all matching elements in the data. +Careful with this on large documents!" + (when (consp data) + (dolist (bit data) + (when (car-safe bit) + (when (equal tag (car bit)) + ;; Old xml.el may return a list of string. + (when (and (consp (caddr bit)) + (stringp (caaddr bit))) + (setcar (cddr bit) (caaddr bit))) + (setq found-list + (append found-list + (list bit)))) + (if (and (consp (car-safe (caddr bit))) + (not (stringp (caddr bit)))) + (setq found-list + (append found-list + (nnrss-find-el + tag (caddr bit)))) + (setq found-list + (append found-list + (nnrss-find-el + tag (cddr bit)))))))) found-list) (defun nnrss-rsslink-p (el) "Test if the element we are handed is an RSS autodiscovery link." (and (eq (car-safe el) 'link) (string-equal (cdr (assoc 'rel (cadr el))) "alternate") - (or (string-equal (cdr (assoc 'type (cadr el))) + (or (string-equal (cdr (assoc 'type (cadr el))) "application/rss+xml") (string-equal (cdr (assoc 'type (cadr el))) "text/xml")))) (defun nnrss-get-rsslinks (data) "Extract the <link> elements that are links to RSS from the parsed data." - (delq nil (mapcar + (delq nil (mapcar (lambda (el) (if (nnrss-rsslink-p el) el)) (nnrss-find-el 'link data)))) (defun nnrss-extract-hrefs (data) - "Recursively extract hrefs from a page's source. DATA should be -the output of xml-parse-region or w3-parse-buffer." + "Recursively extract hrefs from a page's source. +DATA should be the output of `xml-parse-region' or +`w3-parse-buffer'." (mapcar (lambda (ahref) (cdr (assoc 'href (cadr ahref)))) (nnrss-find-el 'a data))) -(defmacro nnrss-match-macro (base-uri item - onsite-list offsite-list) +(defmacro nnrss-match-macro (base-uri item onsite-list offsite-list) `(cond ((or (string-match (concat "^" ,base-uri) ,item) - (not (string-match "://" ,item))) - (setq ,onsite-list (append ,onsite-list (list ,item)))) - (t (setq ,offsite-list (append ,offsite-list (list ,item)))))) + (not (string-match "://" ,item))) + (setq ,onsite-list (append ,onsite-list (list ,item)))) + (t (setq ,offsite-list (append ,offsite-list (list ,item)))))) (defun nnrss-order-hrefs (base-uri hrefs) "Given a list of hrefs, sort them using the following priorities: @@ -615,29 +761,28 @@ (let (rss-onsite-end rdf-onsite-end xml-onsite-end rss-onsite-in rdf-onsite-in xml-onsite-in rss-offsite-end rdf-offsite-end xml-offsite-end - rss-offsite-in rdf-offsite-in xml-offsite-in) - (mapcar (lambda (href) - (if (not (null href)) - (cond ((string-match "\\.rss$" href) - (nnrss-match-macro - base-uri href rss-onsite-end rss-offsite-end)) - ((string-match "\\.rdf$" href) - (nnrss-match-macro - base-uri href rdf-onsite-end rdf-offsite-end)) - ((string-match "\\.xml$" href) - (nnrss-match-macro - base-uri href xml-onsite-end xml-offsite-end)) - ((string-match "rss" href) - (nnrss-match-macro - base-uri href rss-onsite-in rss-offsite-in)) - ((string-match "rdf" href) - (nnrss-match-macro - base-uri href rdf-onsite-in rdf-offsite-in)) - ((string-match "xml" href) - (nnrss-match-macro - base-uri href xml-onsite-in xml-offsite-in))))) - hrefs) - (append + rss-offsite-in rdf-offsite-in xml-offsite-in) + (dolist (href hrefs) + (cond ((null href)) + ((string-match "\\.rss$" href) + (nnrss-match-macro + base-uri href rss-onsite-end rss-offsite-end)) + ((string-match "\\.rdf$" href) + (nnrss-match-macro + base-uri href rdf-onsite-end rdf-offsite-end)) + ((string-match "\\.xml$" href) + (nnrss-match-macro + base-uri href xml-onsite-end xml-offsite-end)) + ((string-match "rss" href) + (nnrss-match-macro + base-uri href rss-onsite-in rss-offsite-in)) + ((string-match "rdf" href) + (nnrss-match-macro + base-uri href rdf-onsite-in rdf-offsite-in)) + ((string-match "xml" href) + (nnrss-match-macro + base-uri href xml-onsite-in xml-offsite-in)))) + (append rss-onsite-end rdf-onsite-end xml-onsite-end rss-onsite-in rdf-onsite-in xml-onsite-in rss-offsite-end rdf-offsite-end xml-offsite-end @@ -670,23 +815,23 @@ ;; - offsite links containing any of the above (let* ((base-uri (progn (string-match ".*://[^/]+/?" url) (match-string 0 url))) - (hrefs (nnrss-order-hrefs + (hrefs (nnrss-order-hrefs base-uri (nnrss-extract-hrefs parsed-page))) (rss-link nil)) - (while (and (eq rss-link nil) (not (eq hrefs nil))) - (let ((href-data (nnrss-fetch (car hrefs)))) - (if (nnrss-rss-p href-data) - (let* ((rss-ns (nnrss-get-namespace-prefix href-data "http://purl.org/rss/1.0/"))) - (setq rss-link (nnrss-rss-title-description - rss-ns href-data (car hrefs)))) - (setq hrefs (cdr hrefs))))) - (if rss-link rss-link + (while (and (eq rss-link nil) (not (eq hrefs nil))) + (let ((href-data (nnrss-fetch (car hrefs)))) + (if (nnrss-rss-p href-data) + (let* ((rss-ns (nnrss-get-namespace-prefix href-data "http://purl.org/rss/1.0/"))) + (setq rss-link (nnrss-rss-title-description + rss-ns href-data (car hrefs)))) + (setq hrefs (cdr hrefs))))) + (if rss-link rss-link ;; 4. check syndic8 - (nnrss-find-rss-via-syndic8 url)))))))) + (nnrss-find-rss-via-syndic8 url)))))))) (defun nnrss-find-rss-via-syndic8 (url) - "query syndic8 for the rss feeds it has for the url." + "Query syndic8 for the rss feeds it has for URL." (if (not (locate-library "xml-rpc")) (progn (message "XML-RPC is not available... not checking Syndic8.") @@ -697,22 +842,22 @@ 'syndic8.FindSites url))) (when feedid - (let* ((feedinfo (xml-rpc-method-call + (let* ((feedinfo (xml-rpc-method-call "http://www.syndic8.com/xmlrpc.php" 'syndic8.GetFeedInfo feedid)) (urllist - (delq nil + (delq nil (mapcar (lambda (listinfo) - (if (string-equal + (if (string-equal (cdr (assoc "status" listinfo)) "Syndicated") (cons (cdr (assoc "sitename" listinfo)) (list (cons 'title - (cdr (assoc + (cdr (assoc "sitename" listinfo))) (cons 'href (cdr (assoc @@ -721,20 +866,20 @@ (if (not (> (length urllist) 1)) (cdar urllist) (let ((completion-ignore-case t) - (selection + (selection (mapcar (lambda (listinfo) - (cons (cdr (assoc "sitename" listinfo)) - (string-to-int + (cons (cdr (assoc "sitename" listinfo)) + (string-to-int (cdr (assoc "feedid" listinfo))))) feedinfo))) - (cdr (assoc + (cdr (assoc (completing-read "Multiple feeds found. Select one: " selection nil t) urllist))))))))) (defun nnrss-rss-p (data) - "Test if data is an RSS feed. Simply ensures that the first -element is rss or rdf." + "Test if DATA is an RSS feed. +Simply ensures that the first element is rss or rdf." (or (eq (caar data) 'rss) (eq (caar data) 'rdf:RDF))) @@ -755,13 +900,13 @@ that gives the URI for which you want to retrieve the namespace prefix), return the prefix." (let* ((prefix (car (rassoc uri (cadar el)))) - (nslist (if prefix + (nslist (if prefix (split-string (symbol-name prefix) ":"))) (ns (cond ((eq (length nslist) 1) ; no prefix given "") ((eq (length nslist) 2) ; extract prefix (cadr nslist))))) - (if (and ns (not (eq ns ""))) + (if (and ns (not (string= ns ""))) (concat ns ":") ns)))
--- a/lisp/gnus/qp.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/gnus/qp.el Thu Apr 14 05:03:52 2005 +0000 @@ -100,15 +100,10 @@ If `mm-use-ultra-safe-encoding' is set, fold lines unconditionally and encode lines starting with \"From\"." (interactive "r") - (save-excursion - (goto-char from) - (if (fboundp 'string-to-multibyte) ; Emacs 23 - (if (re-search-forward (string-to-multibyte "[^\x0-\x7f\x80-\xff]") - to t) - ;; Fixme: This is somewhat misleading. - (error "Multibyte character in QP encoding region")) - (if (re-search-forward (mm-string-as-multibyte "[^\0-\377]") to t) - (error "Multibyte character in QP encoding region")))) + (goto-char from) + (if (re-search-forward (mm-string-to-multibyte "[^\x0-\x7f\x80-\xff]") + to t) + (error "Multibyte character in QP encoding region")) (unless class ;; Avoid using 8bit characters. = is \075. ;; Equivalent to "^\000-\007\013\015-\037\200-\377="
--- a/lisp/help.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/help.el Thu Apr 14 05:03:52 2005 +0000 @@ -586,7 +586,16 @@ ;; Ok, now look up the key and name the command. (let ((defn (or (string-key-binding key) (key-binding key))) - (key-desc (help-key-description key untranslated))) + key-desc) + ;; Don't bother user with strings from (e.g.) the select-paste menu. + (if (stringp (aref key (1- (length key)))) + (aset key (1- (length key)) "(any string)")) + (if (and (> (length untranslated) 0) + (stringp (aref untranslated (1- (length untranslated))))) + (aset untranslated (1- (length untranslated)) + "(any string)")) + ;; Now describe the key, perhaps as changed. + (setq key-desc (help-key-description key untranslated)) (if (or (null defn) (integerp defn) (equal defn 'undefined)) (princ (format "%s is undefined" key-desc)) (princ (format (if (windowp window) @@ -595,7 +604,6 @@ key-desc (if (symbolp defn) defn (prin1-to-string defn))))))))) - (defun describe-key (key &optional untranslated up-event) "Display documentation of the function invoked by KEY. KEY should be a key sequence--when calling from a program, @@ -623,6 +631,12 @@ (if (or (null defn) (integerp defn) (equal defn 'undefined)) (message "%s is undefined" (help-key-description key untranslated)) (help-setup-xref (list #'describe-function defn) (interactive-p)) + ;; Don't bother user with strings from (e.g.) the select-paste menu. + (if (stringp (aref key (1- (length key)))) + (aset key (1- (length key)) "(any string)")) + (if (stringp (aref untranslated (1- (length untranslated)))) + (aset untranslated (1- (length untranslated)) + "(any string)")) (with-output-to-temp-buffer (help-buffer) (princ (help-key-description key untranslated)) (if (windowp window)
--- a/lisp/info.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/info.el Thu Apr 14 05:03:52 2005 +0000 @@ -3799,77 +3799,78 @@ (let ((n 0) cont) (while (re-search-forward - (concat "^\\* +\\(" Info-menu-entry-name-re "\\)\\(:" - Info-node-spec-re "\\([ \t]*\\)\\)") + (concat "^\\* Menu:\\|\\(?:^\\* +\\(" Info-menu-entry-name-re "\\)\\(:" + Info-node-spec-re "\\([ \t]*\\)\\)\\)") nil t) - (when not-fontified-p - (setq n (1+ n)) - (if (and (<= n 9) (zerop (% n 3))) ; visual aids to help with 1-9 keys - (put-text-property (match-beginning 0) - (1+ (match-beginning 0)) - 'font-lock-face 'info-menu-5))) - (when not-fontified-p - (add-text-properties - (match-beginning 1) (match-end 1) - (list - 'help-echo (if (and (match-end 3) - (not (equal (match-string 3) ""))) - (concat "mouse-2: go to " (match-string 3)) - "mouse-2: go to this node") - 'mouse-face 'highlight))) - (when (or not-fontified-p fontify-visited-p) - (add-text-properties - (match-beginning 1) (match-end 1) - (list - 'font-lock-face - ;; Display visited menu items in a different face - (if (and Info-fontify-visited-nodes - (save-match-data - (let ((node (if (equal (match-string 3) "") - (match-string 1) - (match-string 3))) - (file (file-name-nondirectory Info-current-file)) - (hl Info-history-list) - res) - (if (string-match "(\\([^)]+\\))\\([^)]*\\)" node) - (setq file (file-name-nondirectory - (match-string 1 node)) - node (if (equal (match-string 2 node) "") - "Top" - (match-string 2 node)))) - (while hl - (if (and (string-equal node (nth 1 (car hl))) - (string-equal file - (file-name-nondirectory - (nth 0 (car hl))))) - (setq res (car hl) hl nil) - (setq hl (cdr hl)))) - res))) 'info-xref-visited 'info-xref)))) - (when (and not-fontified-p (memq Info-hide-note-references '(t hide))) - (put-text-property (match-beginning 2) (1- (match-end 6)) - 'invisible t) - ;; Unhide the file name in parens - (if (and (match-end 4) (not (eq (char-after (match-end 4)) ?.))) - (remove-text-properties (match-beginning 4) (match-end 4) - '(invisible t))) - ;; We need a stretchable space like :align-to but with - ;; a minimum value. - (put-text-property (1- (match-end 6)) (match-end 6) 'display - (if (>= 22 (- (match-end 1) - (match-beginning 0))) - '(space :align-to 24) - '(space :width 2))) - (setq cont (looking-at ".")) - (while (and (= (forward-line 1) 0) - (looking-at "\\([ \t]+\\)[^*\n]")) - (put-text-property (match-beginning 1) (1- (match-end 1)) - 'invisible t) - (put-text-property (1- (match-end 1)) (match-end 1) - 'display - (if cont - '(space :align-to 26) - '(space :align-to 24))) - (setq cont t)))))) + (when (match-beginning 1) + (when not-fontified-p + (setq n (1+ n)) + (if (and (<= n 9) (zerop (% n 3))) ; visual aids to help with 1-9 keys + (put-text-property (match-beginning 0) + (1+ (match-beginning 0)) + 'font-lock-face 'info-menu-5))) + (when not-fontified-p + (add-text-properties + (match-beginning 1) (match-end 1) + (list + 'help-echo (if (and (match-end 3) + (not (equal (match-string 3) ""))) + (concat "mouse-2: go to " (match-string 3)) + "mouse-2: go to this node") + 'mouse-face 'highlight))) + (when (or not-fontified-p fontify-visited-p) + (add-text-properties + (match-beginning 1) (match-end 1) + (list + 'font-lock-face + ;; Display visited menu items in a different face + (if (and Info-fontify-visited-nodes + (save-match-data + (let ((node (if (equal (match-string 3) "") + (match-string 1) + (match-string 3))) + (file (file-name-nondirectory Info-current-file)) + (hl Info-history-list) + res) + (if (string-match "(\\([^)]+\\))\\([^)]*\\)" node) + (setq file (file-name-nondirectory + (match-string 1 node)) + node (if (equal (match-string 2 node) "") + "Top" + (match-string 2 node)))) + (while hl + (if (and (string-equal node (nth 1 (car hl))) + (string-equal file + (file-name-nondirectory + (nth 0 (car hl))))) + (setq res (car hl) hl nil) + (setq hl (cdr hl)))) + res))) 'info-xref-visited 'info-xref)))) + (when (and not-fontified-p (memq Info-hide-note-references '(t hide))) + (put-text-property (match-beginning 2) (1- (match-end 6)) + 'invisible t) + ;; Unhide the file name in parens + (if (and (match-end 4) (not (eq (char-after (match-end 4)) ?.))) + (remove-text-properties (match-beginning 4) (match-end 4) + '(invisible t))) + ;; We need a stretchable space like :align-to but with + ;; a minimum value. + (put-text-property (1- (match-end 6)) (match-end 6) 'display + (if (>= 22 (- (match-end 1) + (match-beginning 0))) + '(space :align-to 24) + '(space :width 2))) + (setq cont (looking-at ".")) + (while (and (= (forward-line 1) 0) + (looking-at "\\([ \t]+\\)[^*\n]")) + (put-text-property (match-beginning 1) (1- (match-end 1)) + 'invisible t) + (put-text-property (1- (match-end 1)) (match-end 1) + 'display + (if cont + '(space :align-to 26) + '(space :align-to 24))) + (setq cont t))))))) ;; Fontify menu headers ;; Add the face `info-menu-header' to any header before a menu entry
--- a/lisp/makefile.w32-in Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/makefile.w32-in Thu Apr 14 05:03:52 2005 +0000 @@ -1,5 +1,5 @@ # -*- Makefile -*- for GNU Emacs on the Microsoft W32 API. -# Copyright (c) 2000,2001,2004 Free Software Foundation, Inc. +# Copyright (c) 2000, 2001, 2004, 2005 Free Software Foundation, Inc. # # This file is part of GNU Emacs. # @@ -49,75 +49,6 @@ lisptagsfiles2 = $(lisp)/*/*.el ETAGS = "../lib-src/$(BLD)/etags" -# Files which should not be compiled. If you change the name `DONTCOMPILE' -# to something different, you'll have to change make-dist as well, and -# modify the lists in $lisp and $shortlisp on src/Makefile.in. -# -# - emacs-lisp/cl-specs.el: only contains `def-edebug-spec's so there's -# no point compiling it, although it doesn't hurt. - -DONTCOMPILE = \ - $(lisp)/cus-load.el \ - $(lisp)/emacs-lisp/cl-specs.el \ - $(lisp)/eshell/esh-maint.el \ - $(lisp)/eshell/esh-groups.el \ - $(lisp)/finder-inf.el \ - $(lisp)/forms-d2.el \ - $(lisp)/forms-pass.el \ - $(lisp)/generic-x.el \ - $(lisp)/international/latin1-disp.el \ - $(lisp)/international/mule-conf.el \ - $(lisp)/language/czech.el \ - $(lisp)/language/devanagari.el \ - $(lisp)/language/kannada.el \ - $(lisp)/language/malayalam.el \ - $(lisp)/language/tamil.el \ - $(lisp)/language/english.el \ - $(lisp)/language/greek.el \ - $(lisp)/language/hebrew.el \ - $(lisp)/language/japanese.el \ - $(lisp)/language/korean.el \ - $(lisp)/language/lao.el \ - $(lisp)/language/misc-lang.el \ - $(lisp)/language/romanian.el \ - $(lisp)/language/slovak.el \ - $(lisp)/language/thai.el \ - $(lisp)/language/utf-8-lang.el \ - $(lisp)/language/georgian.el \ - $(lisp)/language/vietnamese.el \ - $(lisp)/language/cyrillic.el \ - $(lisp)/language/chinese.el \ - $(lisp)/language/indian.el \ - $(lisp)/loaddefs.el \ - $(lisp)/ldefs-boot.el \ - $(lisp)/loadup.el \ - $(lisp)/mail/blessmail.el \ - $(lisp)/patcomp.el \ - $(lisp)/paths.el \ - $(lisp)/play/bruce.el \ - $(lisp)/subdirs.el \ - $(lisp)/term/internal.el \ - $(lisp)/term/AT386.el \ - $(lisp)/term/apollo.el \ - $(lisp)/term/bobcat.el \ - $(lisp)/term/iris-ansi.el \ - $(lisp)/term/keyswap.el \ - $(lisp)/term/linux.el \ - $(lisp)/term/lk201.el \ - $(lisp)/term/news.el \ - $(lisp)/term/vt102.el \ - $(lisp)/term/vt125.el \ - $(lisp)/term/vt200.el \ - $(lisp)/term/vt201.el \ - $(lisp)/term/vt220.el \ - $(lisp)/term/vt240.el \ - $(lisp)/term/vt300.el \ - $(lisp)/term/vt320.el \ - $(lisp)/term/vt400.el \ - $(lisp)/term/vt420.el \ - $(lisp)/term/wyse50.el \ - $(lisp)/version.el - # Files to compile before others during a bootstrap. This is done to # speed up the bootstrap process. The CC files are compiled first # because CC mode tweaks the compilation process, and requiring @@ -252,7 +183,7 @@ # Update the AUTHORS file. update-authors: - $(emacs) -f batch-update-authors $(srcdir)/AUTHORS $(srcdir) + $(emacs) -l authors -f batch-update-authors $(srcdir)/AUTHORS $(srcdir) TAGS: $(lisptagsfiles1) $(lisptagsfiles2) $(ETAGS) $(lisptagsfiles1) $(lisptagsfiles2) @@ -265,19 +196,17 @@ .el.elc: -$(emacs) -f batch-byte-compile $< -$(DONTCOMPILE:.el=.elc): - -$(DEL) $@ - -# Compile all Lisp files, except those from DONTCOMPILE, -# but don't recompile those that are up to date. +# Compile all Lisp files, but don't recompile those that are up to +# date. Some files don't actually get compiled because they set the +# local variable no-byte-compile. -# All .elc files are made writable -# before compilation in case we checked out read-only (CVS option -r). -# Files MUST be compiled one by one. If we compile several files in a -# row we can't make sure that the compilation environment is clean. -# We also set the load-path of the Emacs used for compilation to the -# current directory and its subdirectories, to make sure require's and -# load's in the files being compiled find the right files. +# All .elc files are made writable before compilation in case we +# checked out read-only (CVS option -r). Files MUST be compiled one by +# one. If we compile several files in a row we can't make sure that +# the compilation environment is clean. We also set the load-path of +# the Emacs used for compilation to the current directory and its +# subdirectories, to make sure require's and load's in the files being +# compiled find the right files. # Need separate version for sh and native cmd.exe compile: subdirs.el compile-$(SHELLTYPE) doit @@ -305,8 +234,10 @@ done; \ done -# Compile all Lisp files, except those from DONTCOMPILE. This -# is like `compile' but compiles files unconditionally. +# Compile all Lisp files. This is like `compile' but compiles files +# unconditionally. Some files don't actually get compiled because they +# set the local variable no-byte-compile. + compile-always: subdirs.el compile-always-$(SHELLTYPE) doit compile-always-CMD:
--- a/lisp/progmodes/compile.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/progmodes/compile.el Thu Apr 14 05:03:52 2005 +0000 @@ -280,7 +280,18 @@ (4bsd "\\(?:^\\|:: \\|\\S ( \\)\\(/[^ \n\t()]+\\)(\\([0-9]+\\))\ -\\(?:: \\(warning:\\)?\\|$\\| ),\\)" 1 2 nil (3))) +\\(?:: \\(warning:\\)?\\|$\\| ),\\)" 1 2 nil (3)) + + (gcov-file + "^ +-: \\(0\\):Source:\\(.+\\)$" 2 1 nil 0) + (gcov-bb-file + "^ +-: \\(0\\):Object:\\(?:.+\\)$" nil 1 nil 0) + (gcov-never-called-line + "^ +\\(#####\\): +\\([0-9]+\\):.+$" nil 2 nil 2 nil + (1 compilation-error-face)) + (gcov-called-line + "^ +[-0-9]+: +\\([1-9]\\|[0-9]\\{2,\\}\\):.*$" nil 1 nil 0) +) "Alist of values for `compilation-error-regexp-alist'.") (defcustom compilation-error-regexp-alist @@ -1846,6 +1857,9 @@ ;; don't use a marker. --Stef (if (> pos (point-min)) (copy-marker (1- pos)) pos)))) +;;;###autoload +(add-to-list 'auto-mode-alist '("\\.gcov\\'" . compilation-mode)) + (provide 'compile) ;; arch-tag: 12465727-7382-4f72-b234-79855a00dd8c
--- a/lisp/progmodes/f90.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/progmodes/f90.el Thu Apr 14 05:03:52 2005 +0000 @@ -1055,10 +1055,10 @@ (f90-change-keywords f90-auto-keyword-case (line-beginning-position) (line-end-position)))) -(defun f90-electric-insert () +(defun f90-electric-insert (&optional arg) "Change keyword case and auto-fill line as operators are inserted." - (interactive) - (self-insert-command 1) + (interactive "*p") + (self-insert-command arg) (if auto-fill-function (f90-do-auto-fill) ; also updates line (f90-update-line)))
--- a/lisp/progmodes/gdb-ui.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/progmodes/gdb-ui.el Thu Apr 14 05:03:52 2005 +0000 @@ -79,7 +79,7 @@ (defvar gdb-overlay-arrow-position nil) (defvar gdb-server-prefix nil) (defvar gdb-flush-pending-output nil) -(defvar gdb-location-list nil "List of directories for source files.") +(defvar gdb-location-list nil "Alist of breakpoint numbers and full filenames.") (defvar gdb-find-file-unhook nil) (defvar gdb-buffer-type nil @@ -258,6 +258,7 @@ 'gdb-mouse-set-clear-breakpoint) (define-key gud-minor-mode-map [left-margin mouse-3] 'gdb-mouse-toggle-breakpoint) +; Currently only works in margin. ; (define-key gud-minor-mode-map [left-fringe mouse-3] ; 'gdb-mouse-toggle-breakpoint) @@ -606,6 +607,21 @@ (gdb-get-target-string) "*")) +(defun gdb-display-inferior-io-buffer () + "Display IO of inferior in a separate window." + (interactive) + (if gdb-use-inferior-io-buffer + (gdb-display-buffer + (gdb-get-create-buffer 'gdb-inferior-io)))) + +(defun gdb-frame-inferior-io-buffer () + "Display IO of inferior in a new frame." + (interactive) + (if gdb-use-inferior-io-buffer + (let ((special-display-regexps (append special-display-regexps '(".*"))) + (special-display-frame-alist gdb-frame-parameters)) + (display-buffer (gdb-get-create-buffer 'gdb-inferior-io))))) + (defvar gdb-inferior-io-mode-map (let ((map (make-sparse-keymap))) (define-key map "\C-c\C-c" 'gdb-inferior-io-interrupt) @@ -1372,9 +1388,9 @@ (file (match-string 2)) (line (match-string 3))) (save-selected-window - (let* ((buf (find-file-noselect (if (file-exists-p file) - file - (cdr (assoc bptno gdb-location-list))))) + (let* ((buf (find-file-noselect + (if (file-exists-p file) file + (cdr (assoc bptno gdb-location-list))))) (window (display-buffer buf))) (with-current-buffer buf (goto-line (string-to-number line)) @@ -1810,26 +1826,26 @@ "Read address: " (propertize gdb-memory-address 'face font-lock-warning-face - 'help-echo (purecopy "mouse-1: Set memory address") - 'local-map (purecopy (gdb-make-header-line-mouse-map - 'mouse-1 - #'gdb-memory-set-address))) + 'help-echo "mouse-1: Set memory address" + 'local-map (gdb-make-header-line-mouse-map + 'mouse-1 + #'gdb-memory-set-address)) " Repeat Count: " (propertize (number-to-string gdb-memory-repeat-count) 'face font-lock-warning-face - 'help-echo (purecopy "mouse-1: Set repeat count") - 'local-map (purecopy (gdb-make-header-line-mouse-map - 'mouse-1 - #'gdb-memory-set-repeat-count))) + 'help-echo "mouse-1: Set repeat count" + 'local-map (gdb-make-header-line-mouse-map + 'mouse-1 + #'gdb-memory-set-repeat-count)) " Display Format: " (propertize gdb-memory-format 'face font-lock-warning-face - 'help-echo (purecopy "mouse-3: Select display format") + 'help-echo "mouse-3: Select display format" 'local-map gdb-memory-format-keymap) " Unit Size: " (propertize gdb-memory-unit 'face font-lock-warning-face - 'help-echo (purecopy "mouse-3: Select unit size") + 'help-echo "mouse-3: Select unit size" 'local-map gdb-memory-unit-keymap)))) (run-mode-hooks 'gdb-memory-mode-hook) 'gdb-invalidate-memory) @@ -1936,11 +1952,12 @@ (let ((answer (get-buffer-window buf 0)) (must-split nil)) (if answer - (display-buffer buf) ;Raise the frame if necessary. + (display-buffer buf nil 0) ;Raise the frame if necessary. ;; The buffer is not yet displayed. (pop-to-buffer gud-comint-buffer) ;Select the right frame. (let ((window (get-lru-window))) - (if window + (if (and window + (not (eq window (get-buffer-window gud-comint-buffer)))) (progn (set-window-buffer window buf) (setq answer window)) @@ -1965,6 +1982,9 @@ (define-key menu [memory] '("Memory" . gdb-display-memory-buffer)) (define-key menu [assembler] '("Machine" . gdb-display-assembler-buffer)) (define-key menu [registers] '("Registers" . gdb-display-registers-buffer)) + (define-key menu [inferior] + '(menu-item "Inferior IO" gdb-display-inferior-io-buffer + :enable gdb-use-inferior-io-buffer)) (define-key menu [locals] '("Locals" . gdb-display-locals-buffer)) (define-key menu [frames] '("Stack" . gdb-display-stack-buffer)) (define-key menu [breakpoints] '("Breakpoints" . gdb-display-breakpoints-buffer))) @@ -1977,6 +1997,9 @@ (define-key menu [memory] '("Memory" . gdb-frame-memory-buffer)) (define-key menu [assembler] '("Machine" . gdb-frame-assembler-buffer)) (define-key menu [registers] '("Registers" . gdb-frame-registers-buffer)) + (define-key menu [inferior] + '(menu-item "Inferior IO" gdb-frame-inferior-io-buffer + :enable gdb-use-inferior-io-buffer)) (define-key menu [locals] '("Locals" . gdb-frame-locals-buffer)) (define-key menu [frames] '("Stack" . gdb-frame-stack-buffer)) (define-key menu [breakpoints] '("Breakpoints" . gdb-frame-breakpoints-buffer))) @@ -1985,11 +2008,21 @@ (define-key gud-menu-map [ui] `(menu-item "GDB-UI" ,menu :visible (eq gud-minor-mode 'gdba))) (define-key menu [gdb-restore-windows] - '("Restore Window Layout" . gdb-restore-windows)) + '(menu-item "Restore Window Layout" gdb-restore-windows + :help "Restore standard layout for debug session.")) (define-key menu [gdb-many-windows] - (menu-bar-make-toggle gdb-many-windows gdb-many-windows - "Display Other Windows" "Many windows %s" - "Toggle display of locals, stack and breakpoint information"))) + '(menu-item "Display Other Windows" gdb-many-windows + :help "Toggle display of locals, stack and breakpoint information" + :button (:toggle . gdb-many-windows))) + (define-key menu [gdb-use-inferior-io] + (menu-bar-make-toggle toggle-gdb-use-inferior-io-buffer + gdb-use-inferior-io-buffer + "Separate inferior IO" "Use separate IO %s" + "Toggle separate IO for inferior."))) + +(defadvice toggle-gdb-use-inferior-io-buffer (after gdb-kill-io-buffer activate) + (unless gdb-use-inferior-io-buffer + (kill-buffer (gdb-inferior-io-name)))) (defun gdb-frame-gdb-buffer () "Display GUD buffer in a new frame." @@ -2038,7 +2071,8 @@ (when gdb-use-inferior-io-buffer (split-window-horizontally) (other-window 1) - (gdb-set-window-buffer (gdb-inferior-io-name))) + (gdb-set-window-buffer + (gdb-get-create-buffer 'gdb-inferior-io))) (other-window 1) (gdb-set-window-buffer (gdb-stack-buffer-name)) (split-window-horizontally) @@ -2337,7 +2371,6 @@ (setq mode-name "Machine") (setq gdb-overlay-arrow-position nil) (add-to-list 'overlay-arrow-variable-list 'gdb-overlay-arrow-position) - (put 'gdb-overlay-arrow-position 'overlay-arrow-string "=>") (setq fringes-outside-margins t) (setq buffer-read-only t) (use-local-map gdb-assembler-mode-map)
--- a/lisp/progmodes/gud.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/progmodes/gud.el Thu Apr 14 05:03:52 2005 +0000 @@ -1417,7 +1417,7 @@ output)) -(defcustom gud-pdb-command-name "pydb" +(defcustom gud-pdb-command-name "pdb" "File name for executing the Python debugger. This should be an executable on your path, or an absolute file name." :type 'string @@ -2518,7 +2518,6 @@ (defvar gud-minor-mode-type nil) (defvar gud-overlay-arrow-position nil) -(put 'gud-overlay-arrow-position 'overlay-arrow-string "=>") (add-to-list 'overlay-arrow-variable-list 'gud-overlay-arrow-position) (defun gud-sentinel (proc msg) @@ -2614,7 +2613,6 @@ (widen) (goto-line line) (setq pos (point)) - (setq overlay-arrow-string "=>") (or gud-overlay-arrow-position (setq gud-overlay-arrow-position (make-marker))) (set-marker gud-overlay-arrow-position (point) (current-buffer)))
--- a/lisp/progmodes/sh-script.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/progmodes/sh-script.el Thu Apr 14 05:03:52 2005 +0000 @@ -555,14 +555,24 @@ -(defvar sh-here-document-word "EOF" +(defcustom sh-here-document-word "EOF" "Word to delimit here documents. -If the first character of this string is \"-\", this character will -be removed from the string when it is used to close the here document. -This convention is used by the Bash shell, for example, to indicate -that leading tabs inside the here document should be ignored. -Note that Emacs currently has no support for indenting inside here -documents - you must insert literal tabs by hand.") +If the first character of this string is \"-\", this is taken as +part of the redirection operator, rather than part of the +word (that is, \"<<-\" instead of \"<<\"). This is a feature +used by some shells (for example Bash) to indicate that leading +tabs inside the here document should be ignored. In this case, +Emacs indents the initial body and end of the here document with +tabs, to the same level as the start (note that apart from this +there is no support for indentation of here documents). This +will only work correctly if `sh-basic-offset' is a multiple of +`tab-width'. + +Any quote characters or leading whitespace in the word are +removed when closing the here document." + :type 'string + :group 'sh-script) + (defvar sh-test '((sh "[ ]" . 3) @@ -3247,7 +3257,7 @@ (let ((sh-add-buffer (current-buffer))) (list (completing-read "Variable: " 'sh-add-completer) (prefix-numeric-value current-prefix-arg)))) - (insert (sh-feature '((bash . "$[ ") + (insert (sh-feature '((bash . "$(( ") (ksh88 . "$(( ") (posix . "$(( ") (rc . "`{expr $") @@ -3256,7 +3266,7 @@ (sh-remember-variable var) (if (< delta 0) " - " " + ") (number-to-string (abs delta)) - (sh-feature '((bash . " ]") + (sh-feature '((bash . " ))") (ksh88 . " ))") (posix . " ))") (rc . "}") @@ -3482,7 +3492,8 @@ "esac" > \n "done" > \n - "shift " (sh-add "OPTIND" -1) \n)) + "shift " (sh-add "OPTIND" -1) \n + "OPTIND=1" \n)) @@ -3500,7 +3511,6 @@ (match-string 1)))))) - (defun sh-maybe-here-document (arg) "Insert self. Without prefix, following unquoted `<' inserts here document. The document is bounded by `sh-here-document-word'." @@ -3511,18 +3521,21 @@ (save-excursion (backward-char 2) (sh-quoted-p)) - (progn + (let ((tabs (if (string-match "\\`-" sh-here-document-word) + (make-string (/ (current-indentation) tab-width) ?\t) + "")) + (delim (replace-regexp-in-string "['\"]" "" + sh-here-document-word))) (insert sh-here-document-word) (or (eolp) (looking-at "[ \t]") (insert ? )) (end-of-line 1) (while (sh-quoted-p) (end-of-line 2)) - (newline) + (insert ?\n tabs) (save-excursion - (insert ?\n (substring - sh-here-document-word - (if (string-match "^-" sh-here-document-word) 1 0))))))) + (insert ?\n tabs (replace-regexp-in-string + "\\`-?[ \t]*" "" delim)))))) ;; various other commands @@ -3574,7 +3587,7 @@ This function does not modify the last line of the region if the region ends right at the start of the following line; it does not modify blank lines -at the start of the region. So you can put the region around an entire +at the start of the region. So you can put the region around an entire shell command and conveniently use this command." (interactive "r\nP") (save-excursion
--- a/lisp/progmodes/vhdl-mode.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/progmodes/vhdl-mode.el Thu Apr 14 05:03:52 2005 +0000 @@ -2039,7 +2039,7 @@ (defun vhdl-run-when-idle (secs repeat function) "Wait until idle, then run FUNCTION." - (if vhdl-xemacs + (if (fboundp 'start-itimer) (start-itimer "vhdl-mode" function secs repeat t) ; (run-with-idle-timer secs repeat function))) ;; explicitely activate timer (necessary when Emacs is already idle) @@ -2679,7 +2679,9 @@ (define-key vhdl-mode-map " " 'vhdl-electric-space) (if vhdl-intelligent-tab (define-key vhdl-mode-map "\t" 'vhdl-electric-tab) - (define-key vhdl-mode-map "\t" 'indent-according-to-mode)) + ;; The default binding of TAB already calls `indent-according-to-mode'. + ;; (define-key vhdl-mode-map "\t" 'indent-according-to-mode) + ) (define-key vhdl-mode-map "\r" 'vhdl-electric-return) (define-key vhdl-mode-map "-" 'vhdl-electric-dash) (define-key vhdl-mode-map "[" 'vhdl-electric-open-bracket) @@ -2696,12 +2698,14 @@ ;; define special minibuffer keymap for enabling word completion in minibuffer ;; (useful in template generator prompts) -(defvar vhdl-minibuffer-local-map (copy-keymap minibuffer-local-map) +(defvar vhdl-minibuffer-local-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map minibuffer-local-map) + (when vhdl-word-completion-in-minibuffer + (define-key map "\t" 'vhdl-minibuffer-tab)) + map) "Keymap for minibuffer used in VHDL Mode.") -(when vhdl-word-completion-in-minibuffer - (define-key vhdl-minibuffer-local-map "\t" 'vhdl-minibuffer-tab)) - ;; set up electric character functions to work with ;; `delete-selection-mode' (Emacs) and `pending-delete-mode' (XEmacs) (mapcar @@ -2792,134 +2796,134 @@ (when (memq 'vhdl vhdl-electric-keywords) ;; VHDL'93 keywords '( - ("--" "" vhdl-template-display-comment-hook 0) - ("abs" "" vhdl-template-default-hook 0) - ("access" "" vhdl-template-default-hook 0) - ("after" "" vhdl-template-default-hook 0) - ("alias" "" vhdl-template-alias-hook 0) - ("all" "" vhdl-template-default-hook 0) - ("and" "" vhdl-template-default-hook 0) - ("arch" "" vhdl-template-architecture-hook 0) - ("architecture" "" vhdl-template-architecture-hook 0) - ("array" "" vhdl-template-default-hook 0) - ("assert" "" vhdl-template-assert-hook 0) - ("attr" "" vhdl-template-attribute-hook 0) - ("attribute" "" vhdl-template-attribute-hook 0) - ("begin" "" vhdl-template-default-indent-hook 0) - ("block" "" vhdl-template-block-hook 0) - ("body" "" vhdl-template-default-hook 0) - ("buffer" "" vhdl-template-default-hook 0) - ("bus" "" vhdl-template-default-hook 0) - ("case" "" vhdl-template-case-hook 0) - ("comp" "" vhdl-template-component-hook 0) - ("component" "" vhdl-template-component-hook 0) - ("cond" "" vhdl-template-conditional-signal-asst-hook 0) - ("conditional" "" vhdl-template-conditional-signal-asst-hook 0) - ("conf" "" vhdl-template-configuration-hook 0) - ("configuration" "" vhdl-template-configuration-hook 0) - ("cons" "" vhdl-template-constant-hook 0) - ("constant" "" vhdl-template-constant-hook 0) - ("disconnect" "" vhdl-template-disconnect-hook 0) - ("downto" "" vhdl-template-default-hook 0) - ("else" "" vhdl-template-else-hook 0) - ("elseif" "" vhdl-template-elsif-hook 0) - ("elsif" "" vhdl-template-elsif-hook 0) - ("end" "" vhdl-template-default-indent-hook 0) - ("entity" "" vhdl-template-entity-hook 0) - ("exit" "" vhdl-template-exit-hook 0) - ("file" "" vhdl-template-file-hook 0) - ("for" "" vhdl-template-for-hook 0) - ("func" "" vhdl-template-function-hook 0) - ("function" "" vhdl-template-function-hook 0) - ("generic" "" vhdl-template-generic-hook 0) - ("group" "" vhdl-template-group-hook 0) - ("guarded" "" vhdl-template-default-hook 0) - ("if" "" vhdl-template-if-hook 0) - ("impure" "" vhdl-template-default-hook 0) - ("in" "" vhdl-template-default-hook 0) - ("inertial" "" vhdl-template-default-hook 0) - ("inout" "" vhdl-template-default-hook 0) - ("inst" "" vhdl-template-instance-hook 0) - ("instance" "" vhdl-template-instance-hook 0) - ("is" "" vhdl-template-default-hook 0) - ("label" "" vhdl-template-default-hook 0) - ("library" "" vhdl-template-library-hook 0) - ("linkage" "" vhdl-template-default-hook 0) - ("literal" "" vhdl-template-default-hook 0) - ("loop" "" vhdl-template-bare-loop-hook 0) - ("map" "" vhdl-template-map-hook 0) - ("mod" "" vhdl-template-default-hook 0) - ("nand" "" vhdl-template-default-hook 0) - ("new" "" vhdl-template-default-hook 0) - ("next" "" vhdl-template-next-hook 0) - ("nor" "" vhdl-template-default-hook 0) - ("not" "" vhdl-template-default-hook 0) - ("null" "" vhdl-template-default-hook 0) - ("of" "" vhdl-template-default-hook 0) - ("on" "" vhdl-template-default-hook 0) - ("open" "" vhdl-template-default-hook 0) - ("or" "" vhdl-template-default-hook 0) - ("others" "" vhdl-template-others-hook 0) - ("out" "" vhdl-template-default-hook 0) - ("pack" "" vhdl-template-package-hook 0) - ("package" "" vhdl-template-package-hook 0) - ("port" "" vhdl-template-port-hook 0) - ("postponed" "" vhdl-template-default-hook 0) - ("procedure" "" vhdl-template-procedure-hook 0) - ("process" "" vhdl-template-process-hook 0) - ("pure" "" vhdl-template-default-hook 0) - ("range" "" vhdl-template-default-hook 0) - ("record" "" vhdl-template-default-hook 0) - ("register" "" vhdl-template-default-hook 0) - ("reject" "" vhdl-template-default-hook 0) - ("rem" "" vhdl-template-default-hook 0) - ("report" "" vhdl-template-report-hook 0) - ("return" "" vhdl-template-return-hook 0) - ("rol" "" vhdl-template-default-hook 0) - ("ror" "" vhdl-template-default-hook 0) - ("select" "" vhdl-template-selected-signal-asst-hook 0) - ("severity" "" vhdl-template-default-hook 0) - ("shared" "" vhdl-template-default-hook 0) - ("sig" "" vhdl-template-signal-hook 0) - ("signal" "" vhdl-template-signal-hook 0) - ("sla" "" vhdl-template-default-hook 0) - ("sll" "" vhdl-template-default-hook 0) - ("sra" "" vhdl-template-default-hook 0) - ("srl" "" vhdl-template-default-hook 0) - ("subtype" "" vhdl-template-subtype-hook 0) - ("then" "" vhdl-template-default-hook 0) - ("to" "" vhdl-template-default-hook 0) - ("transport" "" vhdl-template-default-hook 0) - ("type" "" vhdl-template-type-hook 0) - ("unaffected" "" vhdl-template-default-hook 0) - ("units" "" vhdl-template-default-hook 0) - ("until" "" vhdl-template-default-hook 0) - ("use" "" vhdl-template-use-hook 0) - ("var" "" vhdl-template-variable-hook 0) - ("variable" "" vhdl-template-variable-hook 0) - ("wait" "" vhdl-template-wait-hook 0) - ("when" "" vhdl-template-when-hook 0) - ("while" "" vhdl-template-while-loop-hook 0) - ("with" "" vhdl-template-with-hook 0) - ("xnor" "" vhdl-template-default-hook 0) - ("xor" "" vhdl-template-default-hook 0) + ("--" "" vhdl-template-display-comment-hook 0 t) + ("abs" "" vhdl-template-default-hook 0 t) + ("access" "" vhdl-template-default-hook 0 t) + ("after" "" vhdl-template-default-hook 0 t) + ("alias" "" vhdl-template-alias-hook 0 t) + ("all" "" vhdl-template-default-hook 0 t) + ("and" "" vhdl-template-default-hook 0 t) + ("arch" "" vhdl-template-architecture-hook 0 t) + ("architecture" "" vhdl-template-architecture-hook 0 t) + ("array" "" vhdl-template-default-hook 0 t) + ("assert" "" vhdl-template-assert-hook 0 t) + ("attr" "" vhdl-template-attribute-hook 0 t) + ("attribute" "" vhdl-template-attribute-hook 0 t) + ("begin" "" vhdl-template-default-indent-hook 0 t) + ("block" "" vhdl-template-block-hook 0 t) + ("body" "" vhdl-template-default-hook 0 t) + ("buffer" "" vhdl-template-default-hook 0 t) + ("bus" "" vhdl-template-default-hook 0 t) + ("case" "" vhdl-template-case-hook 0 t) + ("comp" "" vhdl-template-component-hook 0 t) + ("component" "" vhdl-template-component-hook 0 t) + ("cond" "" vhdl-template-conditional-signal-asst-hook 0 t) + ("conditional" "" vhdl-template-conditional-signal-asst-hook 0 t) + ("conf" "" vhdl-template-configuration-hook 0 t) + ("configuration" "" vhdl-template-configuration-hook 0 t) + ("cons" "" vhdl-template-constant-hook 0 t) + ("constant" "" vhdl-template-constant-hook 0 t) + ("disconnect" "" vhdl-template-disconnect-hook 0 t) + ("downto" "" vhdl-template-default-hook 0 t) + ("else" "" vhdl-template-else-hook 0 t) + ("elseif" "" vhdl-template-elsif-hook 0 t) + ("elsif" "" vhdl-template-elsif-hook 0 t) + ("end" "" vhdl-template-default-indent-hook 0 t) + ("entity" "" vhdl-template-entity-hook 0 t) + ("exit" "" vhdl-template-exit-hook 0 t) + ("file" "" vhdl-template-file-hook 0 t) + ("for" "" vhdl-template-for-hook 0 t) + ("func" "" vhdl-template-function-hook 0 t) + ("function" "" vhdl-template-function-hook 0 t) + ("generic" "" vhdl-template-generic-hook 0 t) + ("group" "" vhdl-template-group-hook 0 t) + ("guarded" "" vhdl-template-default-hook 0 t) + ("if" "" vhdl-template-if-hook 0 t) + ("impure" "" vhdl-template-default-hook 0 t) + ("in" "" vhdl-template-default-hook 0 t) + ("inertial" "" vhdl-template-default-hook 0 t) + ("inout" "" vhdl-template-default-hook 0 t) + ("inst" "" vhdl-template-instance-hook 0 t) + ("instance" "" vhdl-template-instance-hook 0 t) + ("is" "" vhdl-template-default-hook 0 t) + ("label" "" vhdl-template-default-hook 0 t) + ("library" "" vhdl-template-library-hook 0 t) + ("linkage" "" vhdl-template-default-hook 0 t) + ("literal" "" vhdl-template-default-hook 0 t) + ("loop" "" vhdl-template-bare-loop-hook 0 t) + ("map" "" vhdl-template-map-hook 0 t) + ("mod" "" vhdl-template-default-hook 0 t) + ("nand" "" vhdl-template-default-hook 0 t) + ("new" "" vhdl-template-default-hook 0 t) + ("next" "" vhdl-template-next-hook 0 t) + ("nor" "" vhdl-template-default-hook 0 t) + ("not" "" vhdl-template-default-hook 0 t) + ("null" "" vhdl-template-default-hook 0 t) + ("of" "" vhdl-template-default-hook 0 t) + ("on" "" vhdl-template-default-hook 0 t) + ("open" "" vhdl-template-default-hook 0 t) + ("or" "" vhdl-template-default-hook 0 t) + ("others" "" vhdl-template-others-hook 0 t) + ("out" "" vhdl-template-default-hook 0 t) + ("pack" "" vhdl-template-package-hook 0 t) + ("package" "" vhdl-template-package-hook 0 t) + ("port" "" vhdl-template-port-hook 0 t) + ("postponed" "" vhdl-template-default-hook 0 t) + ("procedure" "" vhdl-template-procedure-hook 0 t) + ("process" "" vhdl-template-process-hook 0 t) + ("pure" "" vhdl-template-default-hook 0 t) + ("range" "" vhdl-template-default-hook 0 t) + ("record" "" vhdl-template-default-hook 0 t) + ("register" "" vhdl-template-default-hook 0 t) + ("reject" "" vhdl-template-default-hook 0 t) + ("rem" "" vhdl-template-default-hook 0 t) + ("report" "" vhdl-template-report-hook 0 t) + ("return" "" vhdl-template-return-hook 0 t) + ("rol" "" vhdl-template-default-hook 0 t) + ("ror" "" vhdl-template-default-hook 0 t) + ("select" "" vhdl-template-selected-signal-asst-hook 0 t) + ("severity" "" vhdl-template-default-hook 0 t) + ("shared" "" vhdl-template-default-hook 0 t) + ("sig" "" vhdl-template-signal-hook 0 t) + ("signal" "" vhdl-template-signal-hook 0 t) + ("sla" "" vhdl-template-default-hook 0 t) + ("sll" "" vhdl-template-default-hook 0 t) + ("sra" "" vhdl-template-default-hook 0 t) + ("srl" "" vhdl-template-default-hook 0 t) + ("subtype" "" vhdl-template-subtype-hook 0 t) + ("then" "" vhdl-template-default-hook 0 t) + ("to" "" vhdl-template-default-hook 0 t) + ("transport" "" vhdl-template-default-hook 0 t) + ("type" "" vhdl-template-type-hook 0 t) + ("unaffected" "" vhdl-template-default-hook 0 t) + ("units" "" vhdl-template-default-hook 0 t) + ("until" "" vhdl-template-default-hook 0 t) + ("use" "" vhdl-template-use-hook 0 t) + ("var" "" vhdl-template-variable-hook 0 t) + ("variable" "" vhdl-template-variable-hook 0 t) + ("wait" "" vhdl-template-wait-hook 0 t) + ("when" "" vhdl-template-when-hook 0 t) + ("while" "" vhdl-template-while-loop-hook 0 t) + ("with" "" vhdl-template-with-hook 0 t) + ("xnor" "" vhdl-template-default-hook 0 t) + ("xor" "" vhdl-template-default-hook 0 t) )) ;; VHDL-AMS keywords (when (and (memq 'vhdl vhdl-electric-keywords) (vhdl-standard-p 'ams)) '( - ("across" "" vhdl-template-default-hook 0) - ("break" "" vhdl-template-break-hook 0) - ("limit" "" vhdl-template-limit-hook 0) - ("nature" "" vhdl-template-nature-hook 0) - ("noise" "" vhdl-template-default-hook 0) - ("procedural" "" vhdl-template-procedural-hook 0) - ("quantity" "" vhdl-template-quantity-hook 0) - ("reference" "" vhdl-template-default-hook 0) - ("spectrum" "" vhdl-template-default-hook 0) - ("subnature" "" vhdl-template-subnature-hook 0) - ("terminal" "" vhdl-template-terminal-hook 0) - ("through" "" vhdl-template-default-hook 0) - ("tolerance" "" vhdl-template-default-hook 0) + ("across" "" vhdl-template-default-hook 0 t) + ("break" "" vhdl-template-break-hook 0 t) + ("limit" "" vhdl-template-limit-hook 0 t) + ("nature" "" vhdl-template-nature-hook 0 t) + ("noise" "" vhdl-template-default-hook 0 t) + ("procedural" "" vhdl-template-procedural-hook 0 t) + ("quantity" "" vhdl-template-quantity-hook 0 t) + ("reference" "" vhdl-template-default-hook 0 t) + ("spectrum" "" vhdl-template-default-hook 0 t) + ("subnature" "" vhdl-template-subnature-hook 0 t) + ("terminal" "" vhdl-template-terminal-hook 0 t) + ("through" "" vhdl-template-default-hook 0 t) + ("tolerance" "" vhdl-template-default-hook 0 t) )) ;; user model keywords (when (memq 'user vhdl-electric-keywords) @@ -2931,7 +2935,7 @@ (setq abbrev-list (cons (list keyword "" (vhdl-function-name - "vhdl-model" (nth 0 (car alist)) "hook") 0) + "vhdl-model" (nth 0 (car alist)) "hook") 0 t) abbrev-list))) (setq alist (cdr alist))) abbrev-list))))) @@ -3746,7 +3750,8 @@ ("Highlight" ["Highlighting On/Off..." (customize-option - (if vhdl-xemacs 'font-lock-auto-fontify 'global-font-lock-mode)) t] + (if (fboundp 'global-font-lock-mode) + 'global-font-lock-mode 'font-lock-auto-fontify)) t] ["Highlight Keywords" (progn (customize-set-variable 'vhdl-highlight-keywords (not vhdl-highlight-keywords)) @@ -7854,7 +7859,7 @@ ;; correct different behavior of function `unread-command-events' in XEmacs (defun vhdl-character-to-event (arg)) (defalias 'vhdl-character-to-event - (if vhdl-xemacs 'character-to-event 'identity)) + (if (fboundp 'character-to-event) 'character-to-event 'identity)) (defun vhdl-work-library () "Return the working library name of the current project or \"work\" if no @@ -10399,7 +10404,7 @@ (when (stringp caught) (message caught))) (when (= invoke-char ?-) (setq abbrev-start-location (point))) ;; delete CR which is still in event queue - (if vhdl-xemacs + (if (fboundp 'enqueue-eval-event) (enqueue-eval-event 'delete-char -1) (setq unread-command-events ; push back a delete char (list (vhdl-character-to-event ?\177)))))))) @@ -11923,9 +11928,7 @@ "Return the line number of the line containing point." (save-restriction (widen) - (save-excursion - (beginning-of-line) - (1+ (count-lines 1 (point)))))) + (1+ (count-lines (point-min) (line-beginning-position))))) (defun vhdl-line-kill-entire (&optional arg) "Delete entire line." @@ -16559,26 +16562,24 @@ (defun vhdl-doc-variable (variable) "Display VARIABLE's documentation in *Help* buffer." (interactive) - (with-output-to-temp-buffer "*Help*" + (unless vhdl-xemacs + (help-setup-xref (list #'vhdl-doc-variable variable) (interactive-p))) + (with-output-to-temp-buffer (if (fboundp 'help-buffer) (help-buffer) "*Help*") (princ (documentation-property variable 'variable-documentation)) - (unless vhdl-xemacs - (help-setup-xref (list #'vhdl-doc-variable variable) (interactive-p))) - (save-excursion - (set-buffer standard-output) + (with-current-buffer standard-output (help-mode)) (print-help-return-message))) (defun vhdl-doc-mode () "Display VHDL Mode documentation in *Help* buffer." (interactive) - (with-output-to-temp-buffer "*Help*" + (unless vhdl-xemacs + (help-setup-xref (list #'vhdl-doc-mode) (interactive-p))) + (with-output-to-temp-buffer (if (fboundp 'help-buffer) (help-buffer) "*Help*") (princ mode-name) (princ " mode:\n") (princ (documentation 'vhdl-mode)) - (unless vhdl-xemacs - (help-setup-xref (list #'vhdl-doc-mode) (interactive-p))) - (save-excursion - (set-buffer standard-output) + (with-current-buffer standard-output (help-mode)) (print-help-return-message))) @@ -16587,5 +16588,5 @@ (provide 'vhdl-mode) -;;; arch-tag: 780d7073-9b5d-4c6c-b0d8-26b28783aba3 +;; arch-tag: 780d7073-9b5d-4c6c-b0d8-26b28783aba3 ;;; vhdl-mode.el ends here
--- a/lisp/saveplace.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/saveplace.el Thu Apr 14 05:03:52 2005 +0000 @@ -220,7 +220,9 @@ ((eq 'nospecial save-place-version-control) version-control) (t t)))) - (write-file file) + (condition-case nil + (write-file file) + (file-error (message "Can't write %s" file))) (kill-buffer (current-buffer)) (message "Saving places to %s...done" file)))))
--- a/lisp/simple.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/simple.el Thu Apr 14 05:03:52 2005 +0000 @@ -1279,7 +1279,9 @@ (defalias 'advertised-undo 'undo) (defconst undo-equiv-table (make-hash-table :test 'eq :weakness t) - "Table mapping redo records to the corresponding undo one.") + "Table mapping redo records to the corresponding undo one. +A redo record for undo-in-region maps to t. +A redo record for ordinary undo maps to the following (earlier) undo.") (defvar undo-in-region nil "Non-nil if `pending-undo-list' is not just a tail of `buffer-undo-list'.") @@ -1339,7 +1341,7 @@ (message (if undo-in-region (if equiv "Redo in region!" "Undo in region!") (if equiv "Redo!" "Undo!")))) - (when (and equiv undo-no-redo) + (when (and (consp equiv) undo-no-redo) ;; The equiv entry might point to another redo record if we have done ;; undo-redo-undo-redo-... so skip to the very last equiv. (while (let ((next (gethash equiv undo-equiv-table))) @@ -1350,10 +1352,13 @@ (prefix-numeric-value arg) 1)) ;; Record the fact that the just-generated undo records come from an - ;; undo operation, so we can skip them later on. + ;; undo operation--that is, they are redo records. + ;; In the ordinary case (not within a region), map the redo + ;; record to the following undos. ;; I don't know how to do that in the undo-in-region case. - (unless undo-in-region - (puthash buffer-undo-list pending-undo-list undo-equiv-table)) + (puthash buffer-undo-list + (if undo-in-region t pending-undo-list) + undo-equiv-table) ;; Don't specify a position in the undo record for the undo command. ;; Instead, undoing this should move point to where the change is. (let ((tail buffer-undo-list)
--- a/lisp/startup.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/startup.el Thu Apr 14 05:03:52 2005 +0000 @@ -277,6 +277,8 @@ (defvar emacs-quick-startup nil) +(defvar emacs-basic-display nil) + (defvar init-file-debug nil) (defvar init-file-had-error nil) @@ -677,11 +679,13 @@ (setq argval nil argi orig-argi))))) (cond - ((member argi '("-Q" "-bare-bones")) + ((member argi '("-Q" "-quick")) (setq init-file-user nil site-run-file nil - no-blinking-cursor t - emacs-quick-startup t) + emacs-quick-startup t)) + ((member argi '("-D" "-basic-display")) + (setq no-blinking-cursor t + emacs-basic-display t) (push '(vertical-scroll-bars . nil) initial-frame-alist)) ((member argi '("-q" "-no-init-file")) (setq init-file-user nil)) @@ -710,20 +714,29 @@ (and command-line-args (setcdr command-line-args args))) - ;; Under X Windows, this creates the X frame and deletes the terminal frame. + ;; Under X Window, this creates the X frame and deletes the terminal frame. (when (fboundp 'frame-initialize) (frame-initialize)) + ;; Turn off blinking cursor if so specified in X resources. This is here + ;; only because all other settings of no-blinking-cursor is here. + (unless (or noninteractive + emacs-basic-display + (and (memq window-system '(x w32 mac)) + (not (member (x-get-resource "cursorBlink" "CursorBlink") + '("off" "false"))))) + (setq no-blinking-cursor t)) + ;; If frame was created with a menu bar, set menu-bar-mode on. (unless (or noninteractive - emacs-quick-startup + emacs-basic-display (and (memq window-system '(x w32)) (<= (frame-parameter nil 'menu-bar-lines) 0))) (menu-bar-mode 1)) ;; If frame was created with a tool bar, switch tool-bar-mode on. (unless (or noninteractive - emacs-quick-startup + emacs-basic-display (not (display-graphic-p)) (<= (frame-parameter nil 'tool-bar-lines) 0)) (tool-bar-mode 1)) @@ -734,11 +747,21 @@ (custom-reevaluate-setting 'normal-erase-is-backspace) (unless (or noninteractive - emacs-quick-startup + emacs-basic-display (not (display-graphic-p)) (not (fboundp 'x-show-tip))) (tooltip-mode 1)) + ;; If you change the code below, you need to also change the + ;; corresponding code in the xterm-mouse-mode defcustom. The two need + ;; to be equivalent under all conditions, or Custom will get confused. + (unless (or noninteractive + window-system) + (let ((term (getenv "TERM"))) + (and term + (string-match "^\\(xterm\\|rxvt\\|dtterm\\|eterm\\)" term) + (xterm-mouse-mode 1)))) + ;; Register default TTY colors for the case the terminal hasn't a ;; terminal init file. (unless (memq window-system '(x w32)) @@ -1041,7 +1064,7 @@ "Useful File menu items:\n" :face variable-pitch "\ Exit Emacs\t(Or type Control-x followed by Control-c) -Recover Session\tRecover files you were editing before a crash +Recover Crashed Session\tRecover files you were editing before a crash @@ -1168,7 +1191,7 @@ (emacs-version) "\n" :face '(variable-pitch :height 0.5) - "Copyright (C) 2004 Free Software Foundation, Inc.") + "Copyright (C) 2005 Free Software Foundation, Inc.") (and auto-save-list-file-prefix ;; Don't signal an error if the ;; directory for auto-save-list files
--- a/lisp/term.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/term.el Thu Apr 14 05:03:52 2005 +0000 @@ -684,14 +684,13 @@ (defvar term-ansi-at-save-user nil) (defvar term-ansi-at-save-pwd nil) (defvar term-ansi-at-save-anon nil) -(defvar term-ansi-current-bold 0) +(defvar term-ansi-current-bold nil) (defvar term-ansi-current-color 0) -(defvar term-ansi-face-already-done 0) +(defvar term-ansi-face-already-done nil) (defvar term-ansi-current-bg-color 0) -(defvar term-ansi-current-underline 0) -(defvar term-ansi-current-highlight 0) -(defvar term-ansi-current-reverse 0) -(defvar term-ansi-current-invisible 0) +(defvar term-ansi-current-underline nil) +(defvar term-ansi-current-reverse nil) +(defvar term-ansi-current-invisible nil) ;;; Four should be enough, if you want more, just add. -mm (defvar term-terminal-more-parameters 0) @@ -732,8 +731,7 @@ [ "Enable paging" term-pager-toggle (not term-pager-count)] [ "Disable paging" term-pager-toggle term-pager-count]))) -(if term-mode-map - nil +(unless term-mode-map (setq term-mode-map (make-sparse-keymap)) (define-key term-mode-map "\ep" 'term-previous-input) (define-key term-mode-map "\en" 'term-next-input) @@ -1060,7 +1058,6 @@ (make-local-variable 'term-ansi-face-already-done) (make-local-variable 'term-ansi-current-bg-color) (make-local-variable 'term-ansi-current-underline) - (make-local-variable 'term-ansi-current-highlight) (make-local-variable 'term-ansi-current-reverse) (make-local-variable 'term-ansi-current-invisible) @@ -2507,14 +2504,14 @@ (defun term-horizontal-column () (- (term-current-column) (term-start-line-column))) -;; Calls either vertical-motion or buffer-vertical-motion +;; Calls either vertical-motion or term-buffer-vertical-motion (defmacro term-vertical-motion (count) (list 'funcall 'term-vertical-motion count)) ;; An emulation of vertical-motion that is independent of having a window. ;; Instead, it uses the term-width variable as the logical window width. -(defun buffer-vertical-motion (count) +(defun term-buffer-vertical-motion (count) (cond ((= count 0) (move-to-column (* term-width (/ (current-column) term-width))) 0) @@ -2699,7 +2696,7 @@ (setq term-vertical-motion (symbol-function 'vertical-motion)) (term-check-size proc)) (setq term-vertical-motion - (symbol-function 'buffer-vertical-motion))) + (symbol-function 'term-buffer-vertical-motion))) (setq save-marker (copy-marker (process-mark proc))) @@ -3039,12 +3036,12 @@ (setq term-current-column 1) (setq term-insert-mode nil) (setq term-current-face nil) - (setq term-ansi-current-underline 0) - (setq term-ansi-current-bold 0) - (setq term-ansi-current-reverse 0) + (setq term-ansi-current-underline nil) + (setq term-ansi-current-bold nil) + (setq term-ansi-current-reverse nil) (setq term-ansi-current-color 0) - (setq term-ansi-current-invisible 0) - (setq term-ansi-face-already-done 0) + (setq term-ansi-current-invisible nil) + (setq term-ansi-face-already-done nil) (setq term-ansi-current-bg-color 0)) ;;; New function to deal with ansi colorized output, as you can see you can @@ -3055,32 +3052,32 @@ ;;; Bold (terminfo: bold) ((eq parameter 1) - (setq term-ansi-current-bold 1)) + (setq term-ansi-current-bold t)) ;;; Underline ((eq parameter 4) - (setq term-ansi-current-underline 1)) + (setq term-ansi-current-underline t)) ;;; Blink (unsupported by Emacs), will be translated to bold. ;;; This may change in the future though. ((eq parameter 5) - (setq term-ansi-current-bold 1)) + (setq term-ansi-current-bold t)) ;;; Reverse ((eq parameter 7) - (setq term-ansi-current-reverse 1)) + (setq term-ansi-current-reverse t)) ;;; Invisible ((eq parameter 8) - (setq term-ansi-current-invisible 1)) + (setq term-ansi-current-invisible t)) ;;; Reset underline (i.e. terminfo rmul) ((eq parameter 24) - (setq term-ansi-current-underline 0)) + (setq term-ansi-current-underline nil)) ;;; Reset reverse (i.e. terminfo rmso) ((eq parameter 27) - (setq term-ansi-current-reverse 0)) + (setq term-ansi-current-reverse nil)) ;;; Foreground ((and (>= parameter 30) (<= parameter 37)) @@ -3101,12 +3098,12 @@ ;;; 0 (Reset) or unknown (reset anyway) (t (setq term-current-face nil) - (setq term-ansi-current-underline 0) - (setq term-ansi-current-bold 0) - (setq term-ansi-current-reverse 0) + (setq term-ansi-current-underline nil) + (setq term-ansi-current-bold nil) + (setq term-ansi-current-reverse nil) (setq term-ansi-current-color 0) - (setq term-ansi-current-invisible 0) - (setq term-ansi-face-already-done 1) + (setq term-ansi-current-invisible nil) + (setq term-ansi-face-already-done t) (setq term-ansi-current-bg-color 0))) ; (message "Debug: U-%d R-%d B-%d I-%d D-%d F-%d B-%d" @@ -3119,9 +3116,9 @@ ; term-ansi-current-bg-color) - (if (= term-ansi-face-already-done 0) - (if (= term-ansi-current-reverse 1) - (if (= term-ansi-current-invisible 1) + (unless term-ansi-face-already-done + (if term-ansi-current-reverse + (if term-ansi-current-invisible (setq term-current-face (if (= term-ansi-current-color 0) (list :background @@ -3143,13 +3140,13 @@ (if (= term-ansi-current-bg-color 0) (face-background 'default) (elt ansi-term-color-vector term-ansi-current-bg-color)))) - (if (= term-ansi-current-bold 1) + (when term-ansi-current-bold (setq term-current-face (append '(:weight bold) term-current-face))) - (if (= term-ansi-current-underline 1) + (when term-ansi-current-underline (setq term-current-face (append '(:underline t) term-current-face)))) - (if (= term-ansi-current-invisible 1) + (if term-ansi-current-invisible (setq term-current-face (if (= term-ansi-current-bg-color 0) (list :background @@ -3167,15 +3164,15 @@ (elt ansi-term-color-vector term-ansi-current-color) :background (elt ansi-term-color-vector term-ansi-current-bg-color))) - (if (= term-ansi-current-bold 1) + (when term-ansi-current-bold (setq term-current-face (append '(:weight bold) term-current-face))) - (if (= term-ansi-current-underline 1) + (when term-ansi-current-underline (setq term-current-face (append '(:underline t) term-current-face)))))) ;;; (message "Debug %S" term-current-face) - (setq term-ansi-face-already-done 0)) + (setq term-ansi-face-already-done nil)) ;;; Handle a character assuming (eq terminal-state 2) -
--- a/lisp/term/mac-win.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/term/mac-win.el Thu Apr 14 05:03:52 2005 +0000 @@ -77,7 +77,7 @@ ;;(require 'select) (require 'menu-bar) (require 'fontset) -(require 'x-dnd) +(require 'dnd) (defvar x-invocation-args) @@ -1085,13 +1085,29 @@ (put 'escape 'ascii-character ?\e) -;;;; Keysyms +;;;; Keyboard layout/language change events +(defconst mac-script-code-coding-systems + '((0 . mac-roman) ; smRoman + (1 . japanese-shift-jis) ; smJapanese + (2 . chinese-big5) ; smTradChinese + (3 . korean-iso-8bit) ; smKorean + (7 . mac-cyrillic) ; smCyrillic + (25 . chinese-iso-8bit) ; smSimpChinese + (29 . mac-centraleurroman) ; smCentralEuroRoman + ) + "Alist of Mac script codes vs Emacs coding systems.") -;; Define constant values to be set to mac-keyboard-text-encoding -(defconst kTextEncodingMacRoman 0) -(defconst kTextEncodingISOLatin1 513 "0x201") -(defconst kTextEncodingISOLatin2 514 "0x202") +;;;; Keyboard layout/language change events +(defun mac-handle-language-change (event) + (interactive "e") + (let ((coding-system + (cdr (assq (car (cadr event)) mac-script-code-coding-systems)))) + (set-keyboard-coding-system (or coding-system 'mac-roman)) + ;; MacJapanese maps reverse solidus to ?\x80. + (if (eq coding-system 'japanese-shift-jis) + (define-key key-translation-map [?\x80] "\\")))) +(define-key special-event-map [language-change] 'mac-handle-language-change) ;;;; Selections and cut buffers @@ -1249,8 +1265,8 @@ (if (and (> start 0) (> end 0)) (progn (set-mark start) (goto-char end))))) - (x-dnd-handle-one-url window 'private - (concat "file:" file-name)))) + (dnd-handle-one-url window 'private + (concat "file:" file-name)))) (car (cdr (cdr event))))) (raise-frame))
--- a/lisp/term/w32-win.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/term/w32-win.el Thu Apr 14 05:03:52 2005 +0000 @@ -76,7 +76,7 @@ (require 'faces) (require 'select) (require 'menu-bar) -(require 'x-dnd) +(require 'dnd) (require 'code-pages) ;; Conditional on new-fontset so bootstrapping works on non-GUI compiles @@ -109,8 +109,8 @@ (if (and (> x 0) (> y 0)) (set-frame-selected-window nil window)) (mapcar (lambda (file-name) - (x-dnd-handle-one-url window 'private - (concat "file:" file-name))) + (dnd-handle-one-url window 'private + (concat "file:" file-name))) (car (cdr (cdr event))))) (raise-frame)))
--- a/lisp/term/xterm.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/term/xterm.el Thu Apr 14 05:03:52 2005 +0000 @@ -51,15 +51,85 @@ (define-key map "\e[24~" [f12]) (define-key map "\e[29~" [print]) + (define-key map "\e[11;2~" [S-f1]) + (define-key map "\e[12;2~" [S-f2]) + (define-key map "\e[13;2~" [S-f3]) + (define-key map "\e[14;2~" [S-f4]) + (define-key map "\e[15;2~" [S-f5]) + (define-key map "\e[17;2~" [S-f6]) + (define-key map "\e[18;2~" [S-f7]) + (define-key map "\e[19;2~" [S-f8]) + (define-key map "\e[20;2~" [S-f9]) + (define-key map "\e[21;2~" [S-f10]) + (define-key map "\e[23;2~" [S-f11]) + (define-key map "\e[24;2~" [S-f12]) + + (define-key map "\e[11;5~" [C-f1]) + (define-key map "\e[12;5~" [C-f2]) + (define-key map "\e[13;5~" [C-f3]) + (define-key map "\e[14;5~" [C-f4]) + (define-key map "\e[15;5~" [C-f5]) + (define-key map "\e[17;5~" [C-f6]) + (define-key map "\e[18;5~" [C-f7]) + (define-key map "\e[19;5~" [C-f8]) + (define-key map "\e[20;5~" [C-f9]) + (define-key map "\e[21;5~" [C-f10]) + (define-key map "\e[23;5~" [C-f11]) + (define-key map "\e[24;5~" [C-f12]) + + (define-key map "\e[11;6~" [C-S-f1]) + (define-key map "\e[12;6~" [C-S-f2]) + (define-key map "\e[13;6~" [C-S-f3]) + (define-key map "\e[14;6~" [C-S-f4]) + (define-key map "\e[15;6~" [C-S-f5]) + (define-key map "\e[17;6~" [C-S-f6]) + (define-key map "\e[18;6~" [C-S-f7]) + (define-key map "\e[19;6~" [C-S-f8]) + (define-key map "\e[20;6~" [C-S-f9]) + (define-key map "\e[21;6~" [C-S-f10]) + (define-key map "\e[23;6~" [C-S-f11]) + (define-key map "\e[24;6~" [C-S-f12]) + + (define-key map "\e[11;3~" [A-f1]) + (define-key map "\e[12;3~" [A-f2]) + (define-key map "\e[13;3~" [A-f3]) + (define-key map "\e[14;3~" [A-f4]) + (define-key map "\e[15;3~" [A-f5]) + (define-key map "\e[17;3~" [A-f6]) + (define-key map "\e[18;3~" [A-f7]) + (define-key map "\e[19;3~" [A-f8]) + (define-key map "\e[20;3~" [A-f9]) + (define-key map "\e[21;3~" [A-f10]) + (define-key map "\e[23;3~" [A-f11]) + (define-key map "\e[24;3~" [A-f12]) + (define-key map "\e[1;2A" [S-up]) (define-key map "\e[1;2B" [S-down]) (define-key map "\e[1;2C" [S-right]) (define-key map "\e[1;2D" [S-left]) + (define-key map "\e[1;2F" [S-end]) + (define-key map "\e[1;2H" [S-home]) (define-key map "\e[1;5A" [C-up]) (define-key map "\e[1;5B" [C-down]) (define-key map "\e[1;5C" [C-right]) (define-key map "\e[1;5D" [C-left]) + (define-key map "\e[1;5F" [C-end]) + (define-key map "\e[1;5H" [C-home]) + + (define-key map "\e[1;6A" [C-S-up]) + (define-key map "\e[1;6B" [C-S-down]) + (define-key map "\e[1;6C" [C-S-right]) + (define-key map "\e[1;6D" [C-S-left]) + (define-key map "\e[1;6F" [C-S-end]) + (define-key map "\e[1;6H" [C-S-home]) + + (define-key map "\e[1;3A" [A-up]) + (define-key map "\e[1;3B" [A-down]) + (define-key map "\e[1;3C" [A-right]) + (define-key map "\e[1;3D" [A-left]) + (define-key map "\e[1;3F" [A-end]) + (define-key map "\e[1;3H" [A-home]) (define-key map "\e[2;2~" [S-insert]) (define-key map "\e[3;2~" [S-delete]) @@ -71,6 +141,16 @@ (define-key map "\e[5;5~" [C-prior]) (define-key map "\e[6;5~" [C-next]) + (define-key map "\e[2;6~" [C-S-insert]) + (define-key map "\e[3;6~" [C-S-delete]) + (define-key map "\e[5;6~" [C-S-prior]) + (define-key map "\e[6;6~" [C-S-next]) + + (define-key map "\e[2;3~" [A-insert]) + (define-key map "\e[3;3~" [A-delete]) + (define-key map "\e[5;3~" [A-prior]) + (define-key map "\e[6;3~" [A-next]) + (define-key map "\eOA" [up]) (define-key map "\eOB" [down]) (define-key map "\eOC" [right]) @@ -123,7 +203,7 @@ (defun xterm-rgb-convert-to-16bit (prim) "Convert an 8-bit primary color value PRIM to a corresponding 16-bit value." - (min 65535 (round (* (/ prim 255.0) 65535.0)))) + (logior prim (lsh prim 8))) (defun xterm-register-default-colors () "Register the default set of colors for xterm or compatible emulator. @@ -160,9 +240,10 @@ (tty-color-define (format "color-%d" (- 256 ncolors)) (- 256 ncolors) (mapcar 'xterm-rgb-convert-to-16bit - (list (round (* r 42.5)) - (round (* g 42.5)) - (round (* b 42.5))))) + (list (if (zerop r) 0 (+ (* r 40) 55)) + (if (zerop g) 0 (+ (* g 40) 55)) + (if (zerop b) 0 (+ (* b 40) 55))))) + (setq b (1+ b)) (if (> b 5) (setq g (1+ g) @@ -200,7 +281,7 @@ ;; Now the 8 gray colors (while (> ncolors 0) (setq color (xterm-rgb-convert-to-16bit - (round + (floor (if (= ncolors 8) 46.36363636 (+ (* (- 8 ncolors) 23.18181818) 69.54545454)))))
--- a/lisp/textmodes/bibtex.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/textmodes/bibtex.el Thu Apr 14 05:03:52 2005 +0000 @@ -652,7 +652,7 @@ (defcustom bibtex-autokey-titleword-ignore '("A" "An" "On" "The" "Eine?" "Der" "Die" "Das" - "[^A-Z].*" ".*[^A-Z0-9].*") + "[^[:upper:]].*" ".*[^[:upper:]0-9].*") "Determines words from the title that are not to be used in the key. Each item of the list is a regexp. If a word of the title matches a regexp from that list, it is not included in the title part of the key. @@ -1078,10 +1078,10 @@ (defconst bibtex-entry-type (concat "@" bibtex-field-name) "Regexp matching the type part of a BibTeX entry.") -(defconst bibtex-reference-key "[][a-zA-Z0-9.:;?!`'/*@+|()<>&_^$-]+" +(defconst bibtex-reference-key "[][[:alnum:].:;?!`'/*@+|()<>&_^$-]+" "Regexp matching the reference key part of a BibTeX entry.") -(defconst bibtex-field-const "[][a-zA-Z0-9.:;?!`'/*@+=|<>&_^$-]+" +(defconst bibtex-field-const "[][[:alnum:].:;?!`'/*@+=|<>&_^$-]+" "Regexp matching a BibTeX field constant.") (defconst bibtex-entry-head @@ -2103,7 +2103,7 @@ (defun bibtex-autokey-demangle-name (fullname) "Get the last part from a well-formed FULLNAME and perform abbreviations." (let* (case-fold-search - (name (cond ((string-match "\\([A-Z][^, ]*\\)[^,]*," fullname) + (name (cond ((string-match "\\([[:upper:]][^, ]*\\)[^,]*," fullname) ;; Name is of the form "von Last, First" or ;; "von Last, Jr, First" ;; --> Take the first capital part before the comma @@ -2112,7 +2112,7 @@ ;; Strange name: we have a comma, but nothing capital ;; So we accept even lowercase names (match-string 1 fullname)) - ((string-match "\\(\\<[a-z][^ ]* +\\)+\\([A-Z][^ ]*\\)" + ((string-match "\\(\\<[[:lower:]][^ ]* +\\)+\\([[:upper:]][^ ]*\\)" fullname) ;; name is of the form "First von Last", "von Last", ;; "First von von Last", or "d'Last" @@ -2796,7 +2796,7 @@ (set (make-local-variable 'comment-start-skip) (concat (regexp-quote bibtex-comment-start) "\\>[ \t]*")) (set (make-local-variable 'comment-column) 0) - (set (make-local-variable 'defun-prompt-regexp) "^[ \t]*@[a-zA-Z0-9]+[ \t]*") + (set (make-local-variable 'defun-prompt-regexp) "^[ \t]*@[[:alnum:]]+[ \t]*") (set (make-local-variable 'outline-regexp) "[ \t]*@") (set (make-local-variable 'fill-paragraph-function) 'bibtex-fill-field) (set (make-local-variable 'fill-prefix) (make-string (+ bibtex-entry-offset @@ -2825,7 +2825,7 @@ ;; XEmacs needs easy-menu-add, Emacs does not care (easy-menu-add bibtex-edit-menu) (easy-menu-add bibtex-entry-menu) - (run-hooks 'bibtex-mode-hook)) + (run-mode-hooks 'bibtex-mode-hook)) (defun bibtex-field-list (entry-type) "Return list of allowed fields for entry ENTRY-TYPE.
--- a/lisp/url/url-ldap.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/url/url-ldap.el Thu Apr 14 05:03:52 2005 +0000 @@ -1,5 +1,5 @@ ;;; url-ldap.el --- LDAP Uniform Resource Locator retrieval code -;; Copyright (c) 1998 - 1999, 2004 Free Software Foundation, Inc. +;; Copyright (c) 1998, 1999, 2004, 2005 Free Software Foundation, Inc. ;; Keywords: comm, data, processes @@ -112,10 +112,16 @@ (format "<img alt='JPEG Photo' src='data:image/jpeg;base64,%s'>" (url-hexify-string (base64-encode-string data)))) -;; FIXME: This needs sorting out for the Emacs LDAP functions, specifically -;; calls of ldap-open, ldap-close, ldap-search-internal ;;;###autoload (defun url-ldap (url) + "Perform an LDAP search specified by URL. +The return value is a buffer displaying the search results in HTML. +URL can be a URL string, or a URL vector of the type returned by +`url-generic-parse-url'." + (if (stringp url) + (setq url (url-generic-parse-url (url-unhex-string url))) + (if (not (vectorp url)) + (error "Argument is not a valid URL"))) (save-excursion (set-buffer (generate-new-buffer " *url-ldap*")) (setq url-current-object url) @@ -142,10 +148,7 @@ (scope nil) (filter nil) (extensions nil) - (connection nil) - (results nil) - (extract-dn (and (fboundp 'function-max-args) - (= (function-max-args 'ldap-search-internal) 7)))) + (results nil)) ;; Get rid of leading / (if (string-match "^/" data) @@ -163,7 +166,7 @@ scope (intern (url-unhex-string (or scope "base"))) filter (url-unhex-string (or filter "(objectClass=*)"))) - (if (not (memq scope '(base one tree))) + (if (not (memq scope '(base one sub))) (error "Malformed LDAP URL: Unknown scope: %S" scope)) ;; Convert to the internal LDAP support scoping names. @@ -188,12 +191,14 @@ (assoc "!bindname" extensions)))) ;; Now, let's actually do something with it. - (setq connection (ldap-open host (if binddn (list 'binddn binddn))) - results (if extract-dn - (ldap-search-internal connection filter base-object scope attributes nil t) - (ldap-search-internal connection filter base-object scope attributes nil))) - - (ldap-close connection) + (setq results (cdr (ldap-search-internal + (list 'host (concat host ":" (number-to-string port)) + 'base base-object + 'attributes attributes + 'scope scope + 'filter filter + 'binddn binddn)))) + (insert "<html>\n" " <head>\n" " <title>LDAP Search Results</title>\n" @@ -205,8 +210,6 @@ (mapc (lambda (obj) (insert " <hr>\n" " <table border=1>\n") - (if extract-dn - (insert " <tr><th colspan=2>" (car obj) "</th></tr>\n")) (mapc (lambda (attr) (if (= (length (cdr attr)) 1) ;; single match, easy @@ -225,7 +228,7 @@ "<br>\n") "</td>" " </tr>\n"))) - (if extract-dn (cdr obj) obj)) + obj) (insert " </table>\n")) results)
--- a/lisp/wdired.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/wdired.el Thu Apr 14 05:03:52 2005 +0000 @@ -31,8 +31,8 @@ ;; ;; Have you ever wished to use C-x r t (string-rectangle), M-% ;; (query-replace), M-c (capitalize-word), etc. to change the name of -;; the files in a "dired" buffer? Now you can do this. All the power -;; of emacs commands are available to renaming files! +;; the files in a "dired" buffer? Now you can do this. All the power +;; of Emacs commands are available to renaming files! ;; ;; This package provides a function that makes the filenames of a a ;; dired buffer editable, by changing the buffer mode (which inhibits @@ -40,7 +40,7 @@ ;; one or more files and directories, and when you press C-c C-c, the ;; renaming takes effect and you are back to dired mode. ;; -;; Another things you can do with wdired: +;; Another things you can do with WDired: ;; ;; - To move files to another directory (by typing their path, ;; absolute or relative, as a part of the new filename). @@ -49,21 +49,16 @@ ;; ;; - To change the permission bits of the filenames (in systems with a ;; working unix-alike `dired-chmod-program'). See and customize the -;; variable `wdired-allow-to-change-permissions'. To change a single +;; variable `wdired-allow-to-change-permissions'. To change a single ;; char (toggling between its two more usual values) you can press -;; the space bar over it or left-click the mouse. To set any char to +;; the space bar over it or left-click the mouse. To set any char to ;; an specific value (this includes the SUID, SGID and STI bits) you -;; can use the key labeled as the letter you want. Please note that +;; can use the key labeled as the letter you want. Please note that ;; permissions of the links cannot be changed in that way, because ;; the change would affect to their targets, and this would not be ;; WYSIWYG :-). ;; ;; - To mark files for deletion, by deleting their whole filename. -;; -;; I do not have a URL to hang wdired, but you can use the one below -;; to find the latest version: -;; -;; http://groups.google.com/groups?as_ugroup=gnu.emacs.sources&as_q=wdired ;;; Installation: @@ -75,21 +70,19 @@ ;; (require 'wdired) ;; (define-key dired-mode-map "r" 'wdired-change-to-wdired-mode) ;; -;; This is recommended way for faster emacs startup time and lower -;; memory consumption, but remind to add these lines before dired.el -;; gets loaded (i.e., near the beginning of your .emacs file): +;; This is the recommended way for faster Emacs startup time and lower +;; memory consumption: ;; ;; (autoload 'wdired-change-to-wdired-mode "wdired") -;; (add-hook 'dired-load-hook +;; (eval-after-load "dired" ;; '(lambda () ;; (define-key dired-mode-map "r" 'wdired-change-to-wdired-mode) ;; (define-key dired-mode-map ;; [menu-bar immediate wdired-change-to-wdired-mode] ;; '("Edit File Names" . wdired-change-to-wdired-mode)))) ;; -;; -;; Type "M-x customize-group RET wdired" if you want make changes to -;; the default behavior. +;; Type "M-x customize-group RET wdired" if you want to make changes +;; to the default behavior. ;;; Usage: @@ -103,60 +96,12 @@ ;;; Change Log: -;; From 1.9 to 1.91 -;; -;; - Fixed a bug (introduced in 1.9) so now files can be marked for -;; deletion again, by deleting their whole filename. - -;; From 1.8 to 1.9 -;; -;; - Another alternative way of editing permissions allowed, see -;; `wdired-allow-to-change-permissions' for details. -;; -;; - Now wdired doesn't rely on regexp so much. As a consequence of -;; this, you can add newlines to filenames and symlinks targets -;; (although this is not very usual, IMHO). Please note that dired -;; (at least in Emacs 21.1 and previous) does not work very well -;; with filenames with newlines in them, so RET is deactivated in -;; wdired mode. But you can activate it if you want. -;; -;; - Now `upcase-word' `capitalize-word' and `downcase-word' are not -;; advised to work better with wdired mode, but the keys bound to -;; them use wdired versions of those commands. -;; -;; - Now "undo" actions are not inherited from wdired mode when -;; changing to dired mode. -;; -;; - Code and documentation cleanups. -;; -;; - Fixed a bug that was making wdired to fail on users with -;; `dired-backup-overwrite' set to t. -;; -;; - C-c C-[ now abort changes. - -;; From 1.7 to 1.8 -;; -;; - Now permission (access-control) bits of the files can be changed. -;; Please see the commentary section and the custom variable -;; `wdired-allow-to-change-permissions' for details. -;; -;; - Added another possible value for the variable -;; `wdired-always-move-to-filename-beginning', useful to change -;; permission bits of several files without the cursor jumping to -;; filenames when changing lines. - -;; From 0.1 to 1.7 - -;; - I've moved the list of changes to another file, because it was -;; huge. Ask me for it or search older versions in google. - -;;; TODO: - -;; - Make it to work in XEmacs. Any volunteer? +;; Google is your friend (previous versions with complete changelogs +;; were posted to gnu.emacs.sources) ;;; Code: -(defvar dired-backup-overwrite) ; Only in emacs 20.x this is a custom var +(defvar dired-backup-overwrite) ; Only in Emacs 20.x this is a custom var (eval-when-compile (set (make-local-variable 'byte-compile-dynamic) t)) @@ -170,22 +115,22 @@ :group 'dired) (defcustom wdired-use-interactive-rename nil - "*If t, confirmation is required before actually rename the files. -Confirmation is required also for overwriting files. If nil, no -confirmation is required for change the file names, and the variable -`wdired-is-ok-overwrite' is used to see if it is ok to overwrite files -without asking." + "*If non-nil, WDired requires confirmation before actually renaming files. +If nil, WDired doesn't require confirmation to change the file names, +and the variable `wdired-confirm-overwrite' controls whether it is ok +to overwrite files without asking." :type 'boolean :group 'wdired) -(defcustom wdired-is-ok-overwrite nil - "*If non-nil the renames can overwrite files without asking. -This variable is used only if `wdired-use-interactive-rename' is nil." +(defcustom wdired-confirm-overwrite t + "*If nil the renames can overwrite files without asking. +This variable has no effect at all if `wdired-use-interactive-rename' +is not nil." :type 'boolean :group 'wdired) -(defcustom wdired-always-move-to-filename-beginning nil - "*If t the \"up\" and \"down\" movement is done as in dired mode. +(defcustom wdired-use-dired-vertical-movement nil + "*If t, the \"up\" and \"down\" movement works as in Dired mode. That is, always move the point to the beginning of the filename at line. If `sometimes, only move to the beginning of filename if the point is @@ -199,20 +144,20 @@ :group 'wdired) (defcustom wdired-allow-to-redirect-links t - "*If non-nil, the target of the symbolic links can be changed also. + "*If non-nil, the target of the symbolic links are editable. In systems without symbolic links support, this variable has no effect at all." :type 'boolean :group 'wdired) (defcustom wdired-allow-to-change-permissions nil - "*If non-nil, the permissions bits of the files can be changed also. + "*If non-nil, the permissions bits of the files are editable. If t, to change a single bit, put the cursor over it and press the space bar, or left click over it. You can also hit the letter you want to set: if this value is allowed, the character in the buffer will be changed. Anyway, the point is advanced one position, so, for example, -you can keep the \"x\" key pressed to give execution permissions to +you can keep the <x> key pressed to give execution permissions to everybody to that file. If `advanced, the bits are freely editable. You can use @@ -220,7 +165,7 @@ newlines), but if you want your changes to be useful, you better put a intelligible value. -Anyway, the real change of the permissions is done with the external +Anyway, the real change of the permissions is done by the external program `dired-chmod-program', which must exist." :type '(choice (const :tag "Not allowed" nil) (const :tag "Toggle/set bits" t) @@ -233,9 +178,9 @@ (define-key map "\C-c\C-c" 'wdired-finish-edit) (define-key map "\C-c\C-k" 'wdired-abort-changes) (define-key map "\C-c\C-[" 'wdired-abort-changes) - (define-key map "\C-m" 'wdired-newline) - (define-key map "\C-j" 'wdired-newline) - (define-key map "\C-o" 'wdired-newline) + (define-key map "\C-m" 'ignore) + (define-key map "\C-j" 'ignore) + (define-key map "\C-o" 'ignore) (define-key map [up] 'wdired-previous-line) (define-key map "\C-p" 'wdired-previous-line) (define-key map [down] 'wdired-next-line) @@ -261,7 +206,7 @@ map)) (defvar wdired-mode-hook nil - "Hook run when changing to wdired mode.") + "Hooks run when changing to WDired mode.") ;; Local variables (put here to avoid compilation gripes) (defvar wdired-col-perm) ;; Column where the permission bits start @@ -271,15 +216,15 @@ (defun wdired-mode () "\\<wdired-mode-map>File Names Editing mode. -Press \\[wdired-finish-edit] to make the changes to take effect and -exit. To abort the edit, use \\[wdired-abort-changes]. +Press \\[wdired-finish-edit] to make the changes to take effect +and exit. To abort the edit, use \\[wdired-abort-changes]. -In this mode you can edit the names of the files, the target of the -links and the permission bits of the files. You can `customize-group' -wdired. +In this mode you can edit the names of the files, the target of +the links and the permission bits of the files. You can use +\\[customize-group] RET wdired to customize WDired behavior. -Editing things out of the filenames, or adding or deleting lines is -not allowed, because the rest of the buffer is read-only." +The only editable texts in a WDired buffer are filenames, +symbolic link targets, and filenames permission." (interactive) (error "This mode can be enabled only by `wdired-change-to-wdired-mode'")) (put 'wdired-mode 'mode-class 'special) @@ -288,8 +233,10 @@ ;;;###autoload (defun wdired-change-to-wdired-mode () "Put a dired buffer in a mode in which filenames are editable. -In this mode the names of the files can be changed, and after -typing C-c C-c the files and directories in disk are renamed. +\\<wdired-mode-map> +This mode allows the user to change the names of the files, and after +typing \\[wdired-finish-edit] Emacs renames the files and directories +in disk. See `wdired-mode'." (interactive) @@ -302,7 +249,7 @@ (dired-unadvertise default-directory) (add-hook 'kill-buffer-hook 'wdired-check-kill-buffer nil t) (setq major-mode 'wdired-mode) - (setq mode-name "Edit filenames") + (setq mode-name "Editable Dired") (setq revert-buffer-function 'wdired-revert) ;; I temp disable undo for performance: since I'm going to clear the ;; undo list, it can save more than a 9% of time with big @@ -359,7 +306,7 @@ (defun wdired-get-filename (&optional no-dir old) "Return the filename at line. Similar to `dired-get-filename' but it doesn't rely on regexps. It -relies on wdired buffer's properties. Optional arg NO-DIR with value +relies on WDired buffer's properties. Optional arg NO-DIR with value non-nil means don't include directory. Optional arg OLD with value non-nil means return old filename." ;; FIXME: Use dired-get-filename's new properties. @@ -411,7 +358,7 @@ "Actually rename files based on your editing in the Dired buffer." (interactive) (wdired-change-to-dired-mode) - (let ((overwrite (or wdired-is-ok-overwrite 1)) + (let ((overwrite (or (not wdired-confirm-overwrite) 1)) (changes nil) (files-deleted nil) (errors 0) @@ -510,12 +457,13 @@ (forward-line))))) (defun wdired-customize () - "Customize wdired options." + "Customize WDired options." (interactive) (customize-apropos "wdired" 'groups)) (defun wdired-revert (&optional arg noconfirm) - "Discard changes in the buffer and update the changes in the disk." + "Discard changes in the buffer and update it based on changes on disk. +Optional arguments are ignored." (wdired-change-to-dired-mode) (revert-buffer) (wdired-change-to-wdired-mode)) @@ -529,12 +477,12 @@ (defun wdired-next-line (arg) "Move down lines then position at filename or the current column. -See `wdired-always-move-to-filename-beginning'. Optional prefix ARG +See `wdired-use-dired-vertical-movement'. Optional prefix ARG says how many lines to move; default is one line." (interactive "p") (next-line arg) - (if (or (eq wdired-always-move-to-filename-beginning t) - (and wdired-always-move-to-filename-beginning + (if (or (eq wdired-use-dired-vertical-movement t) + (and wdired-use-dired-vertical-movement (< (current-column) (save-excursion (dired-move-to-filename) (current-column))))) @@ -542,22 +490,17 @@ (defun wdired-previous-line (arg) "Move up lines then position at filename or the current column. -See `wdired-always-move-to-filename-beginning'. Optional prefix ARG +See `wdired-use-dired-vertical-movement'. Optional prefix ARG says how many lines to move; default is one line." (interactive "p") (previous-line arg) - (if (or (eq wdired-always-move-to-filename-beginning t) - (and wdired-always-move-to-filename-beginning + (if (or (eq wdired-use-dired-vertical-movement t) + (and wdired-use-dired-vertical-movement (< (current-column) (save-excursion (dired-move-to-filename) (current-column))))) (dired-move-to-filename))) -;; dired doesn't works well with newlines, so ... -(defun wdired-newline () - "Do nothing." - (interactive)) - ;; Put the needed properties to allow the user to change links' targets (defun wdired-preprocess-symlinks () (let ((inhibit-read-only t)) @@ -634,19 +577,19 @@ (setq arg 0)))))))) (defun wdired-downcase-word (arg) - "Wdired version of `downcase-word'. + "WDired version of `downcase-word'. Like original function but it skips read-only words." (interactive "p") (wdired-xcase-word 'downcase-word arg)) (defun wdired-upcase-word (arg) - "Wdired version of `upcase-word'. + "WDired version of `upcase-word'. Like original function but it skips read-only words." (interactive "p") (wdired-xcase-word 'upcase-word arg)) (defun wdired-capitalize-word (arg) - "Wdired version of `capitalize-word'. + "WDired version of `capitalize-word'. Like original function but it skips read-only words." (interactive "p") (wdired-xcase-word 'capitalize-word arg))
--- a/lisp/whitespace.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/whitespace.el Thu Apr 14 05:03:52 2005 +0000 @@ -86,7 +86,7 @@ ;;; Code: -(defvar whitespace-version "3.4" "Version of the whitespace library.") +(defvar whitespace-version "3.5" "Version of the whitespace library.") (defvar whitespace-all-buffer-files nil "An associated list of buffers and files checked for whitespace cleanliness. @@ -599,7 +599,7 @@ (setq pmax (point)) (if (equal pmin pmax) (progn - (whitespace-highlight-the-space pmin pmax) + (whitespace-highlight-the-space pmin (1+ pmax)) t) nil)))) @@ -637,7 +637,7 @@ (setq pmax (point)) (if (equal pmin pmax) (progn - (whitespace-highlight-the-space pmin pmax) + (whitespace-highlight-the-space (- pmin 1) pmax) t) nil)) nil)))) @@ -733,12 +733,11 @@ "Highlight the current line, unhighlighting a previously jumped to line." (if whitespace-display-spaces-in-color (let ((ol (whitespace-make-overlay b e))) - (whitespace-unhighlight-the-space) (push ol whitespace-highlighted-space) (whitespace-overlay-put ol 'face 'whitespace-highlight-face)))) ;; (add-hook 'pre-command-hook 'whitespace-unhighlight-the-space)) -(defun whitespace-unhighlight-the-space () +(defun whitespace-unhighlight-the-space() "Unhighlight the currently highlight line." (if (and whitespace-display-spaces-in-color whitespace-highlighted-space) (progn
--- a/lisp/x-dnd.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/x-dnd.el Thu Apr 14 05:03:52 2005 +0000 @@ -31,9 +31,9 @@ ;;; Code: -;;; Customizable variables +(require 'dnd) - +;;; Customizable variables (defcustom x-dnd-test-function 'x-dnd-default-test-function "The function drag and drop uses to determine if to accept or reject a drop. The function takes three arguments, WINDOW ACTION and TYPES. @@ -51,28 +51,6 @@ :type 'symbol :group 'x) -(defcustom x-dnd-protocol-alist - '( - ("^file:///" . x-dnd-open-local-file) ; XDND format. - ("^file://" . x-dnd-open-file) ; URL with host - ("^file:" . x-dnd-open-local-file) ; Old KDE, Motif, Sun - ) - - "The functions to call for different protocols when a drop is made. -This variable is used by `x-dnd-handle-uri-list', `x-dnd-handle-file-name' -and `x-dnd-handle-moz-url'. The list contains of (REGEXP . FUNCTION) pairs. -The functions shall take two arguments, URL, which is the URL dropped and -ACTION which is the action to be performed for the drop (move, copy, link, -private or ask). -If no match is found here, and the value of `browse-url-browser-function' -is a pair of (REGEXP . FUNCTION), those regexps are tried for a match. -Insertion of text is not handeled by these functions, see `x-dnd-types-alist' -for that. -The function shall return the action done (move, copy, link or private) -if some action was made, or nil if the URL is ignored." - :version "22.1" - :type 'alist - :group 'x) (defcustom x-dnd-types-alist @@ -85,10 +63,10 @@ ("text/plain;charset=UTF-8" . x-dnd-insert-utf8-text) ("text/plain;charset=utf-8" . x-dnd-insert-utf8-text) ("text/unicode" . x-dnd-insert-utf16-text) - ("text/plain" . x-dnd-insert-text) + ("text/plain" . dnd-insert-text) ("COMPOUND_TEXT" . x-dnd-insert-ctext) - ("STRING" . x-dnd-insert-text) - ("TEXT" . x-dnd-insert-text) + ("STRING" . dnd-insert-text) + ("TEXT" . dnd-insert-text) ) "Which function to call to handle a drop of that type. If the type for the drop is not present, or the function is nil, @@ -102,12 +80,6 @@ :type 'alist :group 'x) -(defcustom x-dnd-open-file-other-window nil - "If non-nil, always use find-file-other-window to open dropped files." - :version "22.1" - :type 'boolean - :group 'x) - (defcustom x-dnd-known-types '("text/uri-list" "text/x-moz-url" @@ -235,109 +207,6 @@ (setcdr (x-dnd-get-state-cons-for-frame window) current-state))) -(defun x-dnd-handle-one-url (window action arg) - "Handle one dropped url by calling the appropriate handler. -The handler is first localted by looking at `x-dnd-protocol-alist'. -If no match is found here, and the value of `browse-url-browser-function' -is a pair of (REGEXP . FUNCTION), those regexps are tried for a match. -If no match is found, just call `x-dnd-insert-text'. -WINDOW is where the drop happend, ACTION is the action for the drop, -ARG is the URL that has been dropped. -Returns ACTION." - (require 'browse-url) - (let* ((uri (replace-regexp-in-string - "%[A-Z0-9][A-Z0-9]" - (lambda (arg) - (format "%c" (string-to-number (substring arg 1) 16))) - arg)) - ret) - (or - (catch 'done - (dolist (bf x-dnd-protocol-alist) - (when (string-match (car bf) uri) - (setq ret (funcall (cdr bf) uri action)) - (throw 'done t))) - nil) - (when (not (functionp browse-url-browser-function)) - (catch 'done - (dolist (bf browse-url-browser-function) - (when (string-match (car bf) uri) - (setq ret 'private) - (funcall (cdr bf) uri action) - (throw 'done t))) - nil)) - (progn - (x-dnd-insert-text window action uri) - (setq ret 'private))) - ret)) - - -(defun x-dnd-get-local-file-uri (uri) - "Return an uri converted to file:/// syntax if uri is a local file. -Return nil if URI is not a local file." - - ;; The hostname may be our hostname, in that case, convert to a local - ;; file. Otherwise return nil. TODO: How about an IP-address as hostname? - (let ((hostname (when (string-match "^file://\\([^/]*\\)" uri) - (downcase (match-string 1 uri)))) - (system-name-no-dot - (downcase (if (string-match "^[^\\.]+" system-name) - (match-string 0 system-name) - system-name)))) - (when (and hostname - (or (string-equal "localhost" hostname) - (string-equal (downcase system-name) hostname) - (string-equal system-name-no-dot hostname))) - (concat "file://" (substring uri (+ 7 (length hostname))))))) - -(defun x-dnd-get-local-file-name (uri &optional must-exist) - "Return file name converted from file:/// or file: syntax. -URI is the uri for the file. If MUST-EXIST is given and non-nil, -only return non-nil if the file exists. -Return nil if URI is not a local file." - (let ((f (cond ((string-match "^file:///" uri) ; XDND format. - (substring uri (1- (match-end 0)))) - ((string-match "^file:" uri) ; Old KDE, Motif, Sun - (substring uri (match-end 0)))))) - (when (and f must-exist) - (let* ((decoded-f (decode-coding-string - f - (or file-name-coding-system - default-file-name-coding-system))) - (try-f (if (file-readable-p decoded-f) decoded-f f))) - (when (file-readable-p try-f) try-f))))) - - -(defun x-dnd-open-local-file (uri action) - "Open a local file. -The file is opened in the current window, or a new window if -`x-dnd-open-file-other-window' is set. URI is the url for the file, -and must have the format file:file-name or file:///file-name. -The last / in file:/// is part of the file name. ACTION is ignored." - - (let* ((f (x-dnd-get-local-file-name uri t))) - (if (and f (file-readable-p f)) - (progn - (if x-dnd-open-file-other-window - (find-file-other-window f) - (find-file f)) - 'private) - (error "Can not read %s" uri)))) - -(defun x-dnd-open-file (uri action) - "Open a local or remote file. -The file is opened in the current window, or a new window if -`x-dnd-open-file-other-window' is set. URI is the url for the file, -and must have the format file://hostname/file-name. ACTION is ignored. -The last / in file://hostname/ is part of the file name." - - ;; The hostname may be our hostname, in that case, convert to a local - ;; file. Otherwise return nil. - (let ((local-file (x-dnd-get-local-file-uri uri))) - (if local-file (x-dnd-open-local-file local-file action) - (error "Remote files not supported")))) - - (defun x-dnd-handle-moz-url (window action data) "Handle one item of type text/x-moz-url. WINDOW is the window where the drop happened. ACTION is ignored. @@ -359,49 +228,36 @@ (defun x-dnd-insert-utf8-text (window action text) "Decode the UTF-8 text and insert it at point. TEXT is the text as a string, WINDOW is the window where the drop happened." - (x-dnd-insert-text window action (decode-coding-string text 'utf-8))) + (dnd-insert-text window action (decode-coding-string text 'utf-8))) (defun x-dnd-insert-utf16-text (window action text) "Decode the UTF-16 text and insert it at point. TEXT is the text as a string, WINDOW is the window where the drop happened." ;; See comment in x-dnd-handle-moz-url about coding. (let ((coding (if (eq (byteorder) ?B) 'utf-16be 'utf-16le))) - (x-dnd-insert-text window action (decode-coding-string text coding)))) + (dnd-insert-text window action (decode-coding-string text coding)))) (defun x-dnd-insert-ctext (window action text) "Decode the compound text and insert it at point. TEXT is the text as a string, WINDOW is the window where the drop happened." - (x-dnd-insert-text window action - (decode-coding-string text - 'compound-text-with-extensions))) - -(defun x-dnd-insert-text (window action text) - "Insert text at point or push to the kill ring if buffer is read only. -TEXT is the text as a string, WINDOW is the window where the drop happened." - (if (or buffer-read-only - (not (windowp window))) - (progn - (kill-new text) - (message - (substitute-command-keys - "The dropped text can be accessed with \\[yank]"))) - (insert text)) - action) + (dnd-insert-text window action + (decode-coding-string text + 'compound-text-with-extensions))) (defun x-dnd-handle-uri-list (window action string) - "Split an uri-list into separate URIs and call `x-dnd-handle-one-url'. + "Split an uri-list into separate URIs and call `dnd-handle-one-url'. WINDOW is the window where the drop happened. STRING is the uri-list as a string. The URIs are separated by \r\n." (let ((uri-list (split-string string "[\0\r\n]" t)) retval) (dolist (bf uri-list) ;; If one URL is handeled, treat as if the whole drop succeeded. - (let ((did-action (x-dnd-handle-one-url window action bf))) + (let ((did-action (dnd-handle-one-url window action bf))) (when did-action (setq retval did-action)))) retval)) (defun x-dnd-handle-file-name (window action string) - "Prepend file:// to file names and call `x-dnd-handle-one-url'. + "Prepend file:// to file names and call `dnd-handle-one-url'. WINDOW is the window where the drop happened. STRING is the file names as a string, separated by nulls." (let ((uri-list (split-string string "[\0\r\n]" t)) @@ -409,7 +265,7 @@ (dolist (bf uri-list) ;; If one URL is handeled, treat as if the whole drop succeeded. (let* ((file-uri (concat "file://" bf)) - (did-action (x-dnd-handle-one-url window action file-uri))) + (did-action (dnd-handle-one-url window action file-uri))) (when did-action (setq retval did-action)))) retval)) @@ -455,10 +311,10 @@ (if (and (windowp w) (window-live-p w)) ;; If dropping in a window, open files in that window rather ;; than in a new widow. - (let ((x-dnd-open-file-other-window nil)) + (let ((dnd-open-file-other-window nil)) (goto-char (posn-point (event-start event))) (funcall handler window action data)) - (let ((x-dnd-open-file-other-window t)) ;; Dropping on non-window. + (let ((dnd-open-file-other-window t)) ;; Dropping on non-window. (select-frame frame) (funcall handler window action data)))))) @@ -880,7 +736,6 @@ ;;; - (provide 'x-dnd) ;;; arch-tag: b621fb7e-50da-4323-850b-5fc71ae64621
--- a/lisp/xt-mouse.el Mon Apr 11 03:59:40 2005 +0000 +++ b/lisp/xt-mouse.el Thu Apr 14 05:03:52 2005 +0000 @@ -156,10 +156,21 @@ With prefix arg, turn XTerm mouse mode on iff arg is positive. Turn it on to use Emacs mouse commands, and off to use xterm mouse commands. -This works in terminal emulators compatible with xterm. Only single clicks -are supported. When turned on, the normal xterm mouse functionality is still -available by holding down the SHIFT key while pressing the mouse button." - nil " Mouse" nil :global t :group 'mouse +This works in terminal emulators compatible with xterm. It only +works for simple uses of the mouse. Basically, only non-modified +single clicks are supported. When turned on, the normal xterm +mouse functionality for such clicks is still available by holding +down the SHIFT key while pressing the mouse button." + :global t :group 'mouse + ;; If you change the code below, you also need to change the + ;; corresponding code in startup.el. + :init-value (unless (or noninteractive + window-system) + (let ((term (getenv "TERM"))) + (and term + (string-match "^\\(xterm\\|rxvt\\|dtterm\\|eterm\\)" + term) + t))) (if xterm-mouse-mode ;; Turn it on (unless window-system
--- a/lwlib/xlwmenuP.h Mon Apr 11 03:59:40 2005 +0000 +++ b/lwlib/xlwmenuP.h Thu Apr 14 05:03:52 2005 +0000 @@ -1,5 +1,5 @@ /* Internals of a lightweight menubar widget. - Copyright (C) 1999, 2000, 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2002, 2004, 2005 Free Software Foundation, Inc. This file is part of the Lucid Widget Library.
--- a/make-dist Mon Apr 11 03:59:40 2005 +0000 +++ b/make-dist Thu Apr 14 05:03:52 2005 +0000 @@ -6,7 +6,8 @@ #### be distributed. This means that if you add a file with an odd name, #### you should make sure that this script will include it. -# Copyright (C) 1995, 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. +# Copyright (C) 1995, 1997, 1998, 2000, 2001, 2002, 2005 +# Free Software Foundation, Inc. # # This file is part of GNU Emacs. # @@ -195,21 +196,17 @@ rm -f /tmp/el /tmp/elc ### Check for .el files with no corresponding .elc file. - (cd lisp; ls -1 [a-z]*.el [a-z]*/[a-z]*.el ; \ - cd ../leim; ls -1 [a-z]*/[a-z]*.el) > /tmp/el - (cd lisp; ls -1 [a-z]*.elc [a-z]*/[a-z]*.elc; \ - cd ../leim; ls -1 [a-z]*/[a-z]*.elc) | sed 's/\.elc$/.el/' > /tmp/elc + ls -1 lisp/[a-z]*.el lisp/[a-z]*/[a-z]*.el \ + leim/[a-z]*/[a-z]*.el > /tmp/el + ls -1 lisp/[a-z]*.elc lisp/[a-z]*/[a-z]*.elc \ + leim/[a-z]*/[a-z]*.elc | sed 's/\.elc$/.el/' > /tmp/elc losers="`comm -23 /tmp/el /tmp/elc`" bogosities= for file in $losers; do - file1=`echo $file | sed -e "s|.*/||"` - if ! sed -n -e "/^DONTCOMPILE/,/[^\\]\$/p" lisp/Makefile.in | - grep -q "[ ]$file1\($\| \)"; then + if ! grep -q "no-byte-compile: t" $file; then case $file in site-init.el | site-load.el | site-start.el | default.el) ;; - term/*) - ;; *) bogosities="$file $bogosities" ;;
--- a/man/ChangeLog Mon Apr 11 03:59:40 2005 +0000 +++ b/man/ChangeLog Thu Apr 14 05:03:52 2005 +0000 @@ -1,3 +1,60 @@ +2005-04-13 Lute Kamstra <lute@gnu.org> + + * cc-mode.texi: Prevent creating an unnecessary empty cc-mode.ss file. + +2005-04-12 Luc Teirlinck <teirllm@auburn.edu> + + * frames.texi (XTerm Mouse): Xterm Mouse mode is now enabled by + default. + +2005-04-12 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * xresources.texi (Table of Resources): Add cursorBlink. + +2005-04-11 Luc Teirlinck <teirllm@auburn.edu> + + * rmail.texi (Rmail Summary Edit): Explain numeric arguments to + `d', `C-d' and `u'. + +2005-04-11 Richard M. Stallman <rms@gnu.org> + + * cmdargs.texi (Initial Options): -Q is now --quick, and does less. + (Misc X): Add -D, --basic-display. + + * maintaining.texi (Change Log): Correct the description of + the example. + + * major.texi (Choosing Modes): Document magic-mode-alist. + +2005-04-10 Thien-Thi Nguyen <ttn@gnu.org> + + * cl.texi (Porting Common Lisp): Fix typo. + +2005-04-10 Luc Teirlinck <teirllm@auburn.edu> + + * rmail.texi (Rmail Basics): Clarify description of `q' and `b'. + (Rmail Deletion): `C-d' in RMAIL buffer does not accept a numeric + argument. + (Rmail Inbox): Give full name of `rmail-primary-inbox-list'. + (Rmail Output): Clarify which statements apply to `o', `C-o' and + `w', respectively. + (Rmail Labels): Mention `l'. + (Rmail Attributes): Correct pxref. Mention `stored' attribute. + (Rmail Summary Edit): Describe `j' and RET. + +2005-04-10 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * xresources.texi (Lucid Resources): Added fonSet resource. + +2005-04-06 Katsumi Yamaoka <yamaoka@jpl.org> + + * gnus.texi (RSS): Addition. + +2005-04-09 Luc Teirlinck <teirllm@auburn.edu> + + * display.texi (Useless Whitespace): `indicate-unused-lines' is + now called `indicate-empty-lines'. + 2005-04-06 Kim F. Storm <storm@cua.dk> * cmdargs.texi (Initial Options): Add --bare-bones alias for -Q. @@ -24,6 +81,10 @@ * calendar.texi (Diary): Mention shell utility `calendar'. +2005-04-01 Richard M. Stallman <rms@gnu.org> + + * cmdargs.texi (Misc X): Explain horizontal scroll bars don't exist. + 2005-04-01 Jay Belanger <belanger@truman.edu> * calc.texi (Troubleshooting Commands): Remove comment about @@ -849,7 +910,7 @@ 2005-01-15 Sergey Poznyakoff <gray@Mirddin.farlep.net> - * man/rmail.texi (Movemail): Explain differences + * rmail.texi (Movemail): Explain differences between standard and mailutils versions of movemail. Describe command line and configuration options introduced with the latter.
--- a/man/cc-mode.texi Mon Apr 11 03:59:40 2005 +0000 +++ b/man/cc-mode.texi Thu Apr 14 05:03:52 2005 +0000 @@ -55,7 +55,9 @@ @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @comment Define an index for syntactic symbols. +@ifnottex @defindex ss +@end ifnottex @comment Combine key, syntactic symbol and concept indices into one. @syncodeindex ss cp
--- a/man/cl.texi Mon Apr 11 03:59:40 2005 +0000 +++ b/man/cl.texi Thu Apr 14 05:03:52 2005 +0000 @@ -5144,7 +5144,7 @@ one, some of the features in this package are not fully compliant with ANSI or Steele; @pxref{Common Lisp Compatibility}. But there are also quite a few features that this package does not provide -at all. Here are some major omissions that you will want watch out +at all. Here are some major omissions that you will want to watch out for when bringing Common Lisp code into Emacs. @itemize @bullet
--- a/man/cmdargs.texi Mon Apr 11 03:59:40 2005 +0000 +++ b/man/cmdargs.texi Thu Apr 14 05:03:52 2005 +0000 @@ -268,12 +268,10 @@ @item -Q @opindex -Q -@itemx --bare-bones -@opindex --bare-bones -Start emacs with minimum customizations and window decorations. -This is like using @samp{-q} and @samp{--no-site-file}, but in -addition it also disables the menu-bar, the tool-bar, the scroll-bars, -tool tips, the blinking cursor, and the fancy startup screen. +@itemx --quick +@opindex --quick +Start emacs with minimum customizations. This is like using @samp{-q} +and @samp{--no-site-file}, but also disables the startup screen. @item --no-splash @opindex --no-splash @@ -1222,6 +1220,14 @@ @opindex --no-blinking-cursor @cindex blinking cursor disable, command-line argument Disable the blinking cursor on graphical terminals. + +@item -D +@opindex -D +@itemx --basic-display +@opindex --basic-display +Disable the menu-bar, the tool-bar, the scroll-bars, and tool tips, +and turn off the blinking cursor. This can be useful for making a +test case that simplifies debugging of display problems. @end table The @samp{--xrm} option (@pxref{Resources}) specifies additional
--- a/man/display.texi Mon Apr 11 03:59:40 2005 +0000 +++ b/man/display.texi Thu Apr 14 05:03:52 2005 +0000 @@ -679,7 +679,7 @@ delete-trailing-whitespace @key{RET}}. (This command does not remove the form-feed characters.) -@vindex indicate-unused-lines +@vindex indicate-empty-lines @vindex default-indicate-empty-lines @cindex unused lines @cindex fringes, and unused line indication @@ -690,9 +690,9 @@ this image in the fringe. To enable this feature, set the buffer-local variable -@code{indicate-unused-lines} to a non-@code{nil} value. The default +@code{indicate-empty-lines} to a non-@code{nil} value. The default value of this variable is controlled by the variable -@code{default-indicate-unused-lines}; by setting that variable, you +@code{default-indicate-empty-lines}; by setting that variable, you can enable or disable this feature for all new buffers. (This feature currently doesn't work on character terminals.)
--- a/man/frames.texi Mon Apr 11 03:59:40 2005 +0000 +++ b/man/frames.texi Thu Apr 14 05:03:52 2005 +0000 @@ -1055,10 +1055,15 @@ Some terminal emulators under X support mouse clicks in the terminal window. In a terminal emulator which is compatible with @code{xterm}, -you can use @kbd{M-x xterm-mouse-mode} to enable simple use of the -mouse---only single clicks are supported. The normal @code{xterm} mouse -functionality is still available by holding down the @kbd{SHIFT} key -when you press the mouse button. +simple use of the mouse is, by default, controlled by Emacs---basically, +only non-modified single clicks are supported. The normal +@code{xterm} mouse functionality for such clicks is still available by +holding down the @kbd{SHIFT} key when you press the mouse button. + +Put @code{(xterm-mouse-mode 0)} in your @file{.emacs}, or disable the +option @code{xterm-mouse-mode} through the @samp{Customize} interface +(@pxref{Easy Customization}), if you prefer all mouse clicks to be +handled by the terminal emulator. @ignore arch-tag: 7dcf3a31-a43b-45d4-a900-445b10d77e49
--- a/man/gnus.texi Mon Apr 11 03:59:40 2005 +0000 +++ b/man/gnus.texi Thu Apr 14 05:03:52 2005 +0000 @@ -15873,14 +15873,45 @@ @acronym{RSS} has a quite regular and nice interface, and it's possible to get the information Gnus needs to keep groups updated. +Note: you had better use Emacs which supports the @code{utf-8} coding +system because @acronym{RSS} uses UTF-8 for encoding non-@acronym{ASCII} +text by default. It is also used by default for non-@acronym{ASCII} +group names. + @kindex G R (Summary) -Use @kbd{G R} from the summary buffer to subscribe to a feed---you -will be prompted for the location of the feed. +Use @kbd{G R} from the summary buffer to subscribe to a feed---you will +be prompted for the location, the title and the description of the feed. +The title, which allows any characters, will be used for the group name +and the name of the group data file. The description can be omitted. An easy way to get started with @code{nnrss} is to say something like the following in the group buffer: @kbd{B nnrss RET RET y}, then subscribe to groups. +The @code{nnrss} back end saves the group data file in +@code{nnrss-directory} (see below) for each @code{nnrss} group. File +names containing non-@acronym{ASCII} characters will be encoded by the +coding system specified with the @code{nnmail-pathname-coding-system} +variable. If it is @code{nil}, in Emacs the coding system defaults to +the value of @code{default-file-name-coding-system}. If you are using +XEmacs and want to use non-@acronym{ASCII} group names, you should set +the value for the @code{nnmail-pathname-coding-system} variable properly. + +@cindex OPML +You can also use the following commands to import and export your +subscriptions from a file in @acronym{OPML} format (Outline Processor +Markup Language). + +@defun nnrss-opml-import file +Prompt for an @acronym{OPML} file, and subscribe to each feed in the +file. +@end defun + +@defun nnrss-opml-export +Write your current @acronym{RSS} subscriptions to a buffer in +@acronym{OPML} format. +@end defun + The following @code{nnrss} variables can be altered: @table @code @@ -15889,6 +15920,13 @@ The directory where @code{nnrss} stores its files. The default is @file{~/News/rss/}. +@item nnrss-file-coding-system +@vindex nnrss-file-coding-system +The coding system used when reading and writing the @code{nnrss} groups +data files. The default is the value of +@code{mm-universal-coding-system} (which defaults to @code{emacs-mule} +in Emacs or @code{escape-quoted} in XEmacs). + @item nnrss-use-local @vindex nnrss-use-local @findex nnrss-generate-download-script
--- a/man/maintaining.texi Mon Apr 11 03:59:40 2005 +0000 +++ b/man/maintaining.texi Thu Apr 14 05:03:52 2005 +0000 @@ -58,7 +58,7 @@ line in the change log starts with a space or a tab. The bulk of the entry consists of @dfn{items}, each of which starts with a line starting with whitespace and a star. Here are two entries, both dated in May -1993, each with two items: +1993, with two items and one item respectively. @iftex @medbreak @@ -79,10 +79,10 @@ @end smallexample One entry can describe several changes; each change should have its -own item. Normally there should be a blank line between items. When -items are related (parts of the same change, in different places), group -them by leaving no blank line between them. The second entry above -contains two items grouped in this way. +own item, or its own line in an item. Normally there should be a +blank line between items. When items are related (parts of the same +change, in different places), group them by leaving no blank line +between them. @kbd{C-x 4 a} visits the change log file and creates a new entry unless the most recent entry is for today's date and your name. It @@ -92,8 +92,8 @@ @vindex add-log-keep-changes-together When the variable @code{add-log-keep-changes-together} is -non-@code{nil}, @kbd{C-x 4 a} adds to any existing entry for the file -rather than starting a new entry. +non-@code{nil}, @kbd{C-x 4 a} adds to any existing item for the file +rather than starting a new item. @vindex change-log-version-info-enabled @vindex change-log-version-number-regexp-list
--- a/man/major.texi Mon Apr 11 03:59:40 2005 +0000 +++ b/man/major.texi Thu Apr 14 05:03:52 2005 +0000 @@ -98,6 +98,21 @@ @var{mode-function}, Emacs discards the suffix that matched @var{regexp} and searches the list again for another match. +@vindex magic-mode-alist + Sometimes the major mode is determined from the way the file's text +begins. The variable @code{magic-mode-alist} controls this. Its value +is a list of elements of this form: + +@example +(@var{regexp} . @var{mode-function}) +@end example + +@noindent +This looks like an element of @code{auto-mode-alist}, but it doesn't work +the same: this @var{regexp} is matched against the text at the start +of the buffer, not against the file name. @code{magic-mode-alist} +takes priority over @code{auto-mode-alist}. + You can specify the major mode to use for editing a certain file by special text in the first nonblank line of the file. The mode name should appear in this line both preceded and followed by
--- a/man/rmail.texi Mon Apr 11 03:59:40 2005 +0000 +++ b/man/rmail.texi Thu Apr 14 05:03:52 2005 +0000 @@ -84,14 +84,16 @@ @findex rmail-quit @kindex b @r{(Rmail)} @findex rmail-bury - You can exit Rmail with @kbd{q} (@code{rmail-quit}); this expunges and -saves the Rmail file and then switches to another buffer. But there is -no need to ``exit'' formally. If you switch from Rmail to editing in -other buffers, and never happen to switch back, you have exited. (The -Rmail command @kbd{b}, @code{rmail-bury}, does this for you.) Just make -sure to save the Rmail file eventually (like any other file you have -changed). @kbd{C-x s} is a good enough way to do this -(@pxref{Saving}). + You can exit Rmail with @kbd{q} (@code{rmail-quit}); this expunges +and saves the Rmail file, then buries the Rmail buffer as well as its +summary buffer, if present (@pxref{Rmail Summary}). But there is no +need to ``exit'' formally. If you switch from Rmail to editing in +other buffers, and never happen to switch back, you have exited. Just +make sure to save the Rmail file eventually (like any other file you +have changed). @kbd{C-x s} is a good enough way to do this +(@pxref{Saving}). The Rmail command @kbd{b}, @code{rmail-bury}, +buries the Rmail buffer and its summary buffer without expunging and +saving the Rmail file. @node Rmail Scrolling @section Scrolling Within a Message @@ -255,8 +257,8 @@ messages already deleted, while @kbd{C-d} (@code{rmail-delete-backward}) moves to the previous nondeleted message. If there is no nondeleted message to move to in the specified direction, the message that was just -deleted remains current. A numeric argument to either command reverses -the direction of motion after deletion. +deleted remains current. @kbd{d} with a numeric argument is +equivalent to @kbd{C-d}. @vindex rmail-delete-message-hook Whenever Rmail deletes a message, it runs the hook @@ -317,7 +319,7 @@ or @file{/usr/mail/@var{username}}, depending on your operating system. To see what the default is on your system, use @kbd{C-h v -rmail-primary-inbox @key{RET}}. You can specify the inbox file(s) for +rmail-primary-inbox-list @key{RET}}. You can specify the inbox file(s) for any Rmail file with the command @code{set-rmail-inbox-list}; see @ref{Rmail Files}. @@ -508,13 +510,14 @@ the regular expression). @vindex rmail-delete-after-output - Copying a message gives the original copy of the message the -@samp{filed} attribute, so that @samp{filed} appears in the mode line -when such a message is current. If you like to keep just a single copy -of every mail message, set the variable @code{rmail-delete-after-output} -to @code{t}; then the @kbd{o} and @kbd{C-o} commands delete the original -message after copying it. (You can undelete the original afterward if -you wish.) + Copying a message with @kbd{o} or @kbd{C-o} gives the original copy +of the message the @samp{filed} attribute, so that @samp{filed} +appears in the mode line when such a message is current. @kbd{w} +gives it the @samp{stored} attribute. If you like to keep just a +single copy of every mail message, set the variable +@code{rmail-delete-after-output} to @code{t}; then the @kbd{o}, +@kbd{C-o} and @kbd{w} commands delete the original message after +copying it. (You can undelete the original afterward if you wish.) Copying messages into files in system inbox format uses the header fields that are displayed in Rmail at the time. Thus, if you use the @@ -567,7 +570,8 @@ @item C-M-p @var{labels} @key{RET} Move to the previous message that has one of the labels @var{labels} (@code{rmail-previous-labeled-message}). -@item C-M-l @var{labels} @key{RET} +@item l @var{labels} @key{RET} +@itemx C-M-l @var{labels} @key{RET} Make a summary of all messages containing any of the labels @var{labels} (@code{rmail-summary-by-labels}). @end table @@ -626,7 +630,9 @@ removed by undeletion commands (@pxref{Rmail Deletion}). @item filed Means the message has been copied to some other file. Assigned by the -file output commands (@pxref{Rmail Files}). +@kbd{o} and @kbd{C-o} file output commands (@pxref{Rmail Output}). +@item stored +Assigned by the @kbd{w} file output command (@pxref{Rmail Output}). @item answered Means you have mailed an answer to the message. Assigned by the @kbd{r} command (@code{rmail-reply}). @xref{Rmail Reply}. @@ -885,10 +891,13 @@ Almost all Rmail commands work in the summary buffer as well as in the Rmail buffer. Thus, @kbd{d} in the summary buffer deletes the current -message, @kbd{u} undeletes, and @kbd{x} expunges. @kbd{o} and @kbd{C-o} -output the current message to a file; @kbd{r} starts a reply to it. You -can scroll the current message while remaining in the summary buffer -using @key{SPC} and @key{DEL}. +message, @kbd{u} undeletes, and @kbd{x} expunges. (However, in the +summary buffer, a numeric argument to @kbd{d}, @kbd{C-d} and @kbd{u} +serves as a repeat count. A negative argument reverses the meaning of +@kbd{d} and @kbd{C-d}.) @kbd{o} and @kbd{C-o} output the current +message to a file; @kbd{r} starts a reply to it. You can scroll the +current message while remaining in the summary buffer using @key{SPC} +and @key{DEL}. The Rmail commands to move between messages also work in the summary buffer, but with a twist: they move through the set of messages included @@ -912,6 +921,12 @@ Move to the last line, and select its message. @item < Move to the first line, and select its message. +@item j +@itemx @key{RET} +Select the message on the current line (ensuring that the RMAIL buffer +appears on the screen). With argument @var{n}, select message number +@var{n} and move to its line in the summary buffer; this signals an +error if the message is not listed in the summary buffer. @item M-s @var{pattern} @key{RET} Search through messages for @var{pattern} starting with the current message; select the message found, and move point in the summary buffer @@ -1263,7 +1278,7 @@ specify the user password, @var{host-or-file-name} is the name or IP address of the remote mail server to connect to; e.g., @code{pop://smith:guessme@@remote.server.net}. - + @item imap A remote mailbox to be accessed via IMAP4 protocol. @var{User} specifies the remote user name to use, @var{pass} may be used to @@ -1287,7 +1302,7 @@ @code{nil}, Rmail searches for @code{movemail} in the directories listed in @code{rmail-movemail-search-path} and @code{exec-path}, then in @code{exec-directory}. - + @node Remote Mailboxes @section Retrieving Mail from Remote Mailboxes @pindex movemail @@ -1317,11 +1332,11 @@ @samp{pop://@var{username}:@var{password}@@@var{hostname}}. In this case, @var{password} takes preference over the one set by @code{rmail-remote-password}. This is especially useful if you have -several remote mailboxes with different passwords. +several remote mailboxes with different passwords. For backward compatibility Rmail also supports two alternative ways of specifying remote POP mailboxes. Specifying inbox name in the form -@samp{po:@var{username}:@var{hostname}} is equivalent to +@samp{po:@var{username}:@var{hostname}} is equivalent to @samp{pop://@var{username}@@@var{hostname}}. Alternatively, you may set a ``file name'' of @samp{po:@var{username}} in the inbox list of an Rmail file. @code{Movemail} will handle such a name by opening a @@ -1333,7 +1348,7 @@ supported only by the @code{mailutils movemail}. To specify an IMAP mailbox in the inbox list, use the following mailbox @acronym{URL}: @samp{imap://@var{username}[:@var{password}]@@@var{hostname}}. The -@var{password} part is optional, as descrbed above. +@var{password} part is optional, as described above. @vindex rmail-remote-password @vindex rmail-remote-password-required @@ -1343,10 +1358,10 @@ following algorithm to retrieve it: @enumerate -@item +@item If the @var{password} is present in mailbox URL (see above), it is used. -@item +@item If the variable @code{rmail-remote-password} is non-@code{nil}, its value is used. @item
--- a/man/xresources.texi Mon Apr 11 03:59:40 2005 +0000 +++ b/man/xresources.texi Thu Apr 14 05:03:52 2005 +0000 @@ -175,6 +175,10 @@ @item @code{cursorColor} (class @code{Foreground}) Color name for text cursor (point). +@item @code{cursorBlink} (class @code{CursorBlink}) +Specifies whether to make the cursor blink. The default is @samp{on}. Use +@samp{off} or @samp{false} to turn cursor blinking off. + @item @code{font} (class @code{Font}) Font name for text (or fontset name, @pxref{Fontsets}). @@ -393,6 +397,19 @@ @end example @noindent +The Lucid menus can display multilingual text in your locale. For more +information about fontsets see the man page for XCreateFontSet. To enable +multilingual menu text you specify a fontSet resource instead of the font +resource. If both font and fontSet resources are specified, the fontSet +resource is used. To specify +@samp{-*-helvetica-medium-r-*--*-120-*-*-*-*-*-*,*} for both the popup and +menu bar menus, write this: + +@example +Emacs*fontSet: -*-helvetica-medium-r-*--*-120-*-*-*-*-*-*,* +@end example + +@noindent Experience shows that on some systems you may need to add @samp{shell.}@: before the @samp{pane.menubar} or @samp{menu*}. On some other systems, you must not add @samp{shell.}. @@ -402,6 +419,8 @@ @table @code @item font Font for menu item text. +@item fontSet +Fontset for menu item text. @item foreground Color of the foreground. @item background
--- a/src/ChangeLog Mon Apr 11 03:59:40 2005 +0000 +++ b/src/ChangeLog Thu Apr 14 05:03:52 2005 +0000 @@ -1,3 +1,52 @@ +2005-04-12 Stefan Monnier <monnier@iro.umontreal.ca> + + * window.c (Fset_window_configuration): Be careful when you choose + among several possible points for the new_current_buffer. + +2005-04-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> + + * keyboard.c (poll_for_input) [SYNC_INPUT]: Don't call + poll_for_input_1. Set interrupt_input_pending to 1 instead. + (Qlanguage_change) [MAC_OS]: New variable. + (syms_of_keyboard) [MAC_OS]: Intern and staticpro it. + (kbd_buffer_get_event) [MAC_OS]: Make event for LANGUAGE_CHANGE_EVENT. + + * macterm.c (mac_keyboard_text_encoding) + (current_mac_keyboard_text_encoding): Remove variables. + (XTread_socket): Store language-change event if keyboard script + change is detected. Don't convert input to + `mac_keyboard_text_encoding'. + (syms_of_macterm): Delete DEFVAR_INT for mac-keyboard-text-encoding. + + * termhooks.h (enum event_kind) [MAC_OS]: + Add LANGUAGE_CHANGE_EVENT. + +2005-04-10 Richard M. Stallman <rms@gnu.org> + + * emacs.c (standard_args): Rename --bare-bones to --quick. + Add -D aka --basic-display. + + * buffer.c (Fmake_indirect_buffer): Clear out some local variables. + +2005-04-09 Richard M. Stallman <rms@gnu.org> + + * keymap.c (where_is_internal): Convert a string used as event type + into "(any string)". + + * lread.c (Vloads_in_progress): Not static. + + * fns.c (Vloads_in_progress): Add extern. + (Frequire): Don't do LOADHIST_ATTACH if Vloads_in_progress is nil. + +2005-04-09 Thien-Thi Nguyen <ttn@surf.glug.org> + + * dispnew.c (mirror_line_dance): Avoid crash if W2 is null. + +2005-04-09 Lute Kamstra <lute@gnu.org> + + * print.c (PRINTPREPARE): Check if the marker PRINTCHARFUN is + within the accessible part of the buffer. + 2005-04-09 Kim F. Storm <storm@cua.dk> * lread.c (readevalloop): Add args START and END as region in @@ -22,8 +71,8 @@ * mac.c (cfdate_to_lisp): Add `const' for variable `epoch_gdate'. (Fmac_get_preference): Doc fix. - * macfns.c (Fx_create_frame, x_create_tip_frame): Add - "fontset-mac" to fallback font/fontsets. + * macfns.c (Fx_create_frame, x_create_tip_frame): + Add "fontset-mac" to fallback font/fontsets. 2005-04-04 Kim F. Storm <storm@cua.dk> @@ -41,8 +90,8 @@ 2005-04-01 Kenichi Handa <handa@m17n.org> - * lisp.h (Vascii_upcase_table, Vascii_canon_table, - Vascii_eqv_table): Extern them. + * lisp.h (Vascii_upcase_table, Vascii_canon_table) + (Vascii_eqv_table): Extern them. * casetab.c (set_case_table): If standard is nonzero, setup Vascii_upcase_table, Vascii_canon_table, and Vascii_eqv_table. @@ -54,8 +103,8 @@ Vascii_downcase_table. (fast_string_match_ignore_case): Likewise. (search_buffer): Fix checking of boyer-moore usability. - (boyer_moore): Calculate translate_prev_byte1/2/3 in advance. No - need of tranlating characters in PAT. Fix calculation of + (boyer_moore): Calculate translate_prev_byte1/2/3 in advance. + No need of tranlating characters in PAT. Fix calculation of simple_translate. 2005-03-31 Stefan Monnier <monnier@iro.umontreal.ca>
--- a/src/buffer.c Mon Apr 11 03:59:40 2005 +0000 +++ b/src/buffer.c Thu Apr 14 05:03:52 2005 +0000 @@ -631,7 +631,21 @@ XMARKER (b->zv_marker)->insertion_type = 1; } else - clone_per_buffer_values (b->base_buffer, b); + { + struct buffer *old_b = current_buffer; + + clone_per_buffer_values (b->base_buffer, b); + b->filename = Qnil; + b->file_truename = Qnil; + b->display_count = make_number (0); + b->backed_up = Qnil; + b->auto_save_file_name = Qnil; + set_buffer_internal_1 (b); + Fset (intern ("buffer-save-without-query"), Qnil); + Fset (intern ("buffer-file-number"), Qnil); + Fset (intern ("buffer-stale-function"), Qnil); + set_buffer_internal_1 (old_b); + } return buf; } @@ -932,7 +946,7 @@ } /* Return an alist of the Lisp-level buffer-local bindings of - buffer BUF. That is, do't include the variables maintained + buffer BUF. That is, don't include the variables maintained in special slots in the buffer object. */ static Lisp_Object
--- a/src/dispnew.c Mon Apr 11 03:59:40 2005 +0000 +++ b/src/dispnew.c Thu Apr 14 05:03:52 2005 +0000 @@ -3151,14 +3151,20 @@ int m2_from; w2 = frame_row_to_window (root, frame_from); - m2 = w2->current_matrix; - m2_from = frame_from - m2->matrix_y; - copy_row_except_pointers (m->rows + window_to, - m2->rows + m2_from); - - /* If frame line is empty, window line is empty, too. */ - if (!retained_p[copy_from[i]]) - m->rows[window_to].enabled_p = 0; + /* ttn@surf.glug.org: when enabling menu bar using `emacs + -nw', FROM_FRAME sometimes has no associated window. + This check avoids a segfault if W2 is null. */ + if (w2) + { + m2 = w2->current_matrix; + m2_from = frame_from - m2->matrix_y; + copy_row_except_pointers (m->rows + window_to, + m2->rows + m2_from); + + /* If frame line is empty, window line is empty, too. */ + if (!retained_p[copy_from[i]]) + m->rows[window_to].enabled_p = 0; + } sync_p = 1; } else if (from_inside_window_p)
--- a/src/emacs.c Mon Apr 11 03:59:40 2005 +0000 +++ b/src/emacs.c Thu Apr 14 05:03:52 2005 +0000 @@ -1814,8 +1814,8 @@ { "-d", "--display", 60, 1 }, { "-display", 0, 60, 1 }, /* Now for the options handled in startup.el. */ - { "-Q", "--bare-bones", 55, 0 }, - { "-bare-bones", 0, 55, 0 }, + { "-Q", "--quick", 55, 0 }, + { "-quick", 0, 55, 0 }, { "-q", "--no-init-file", 50, 0 }, { "-no-init-file", 0, 50, 0 }, { "-no-site-file", "--no-site-file", 40, 0 }, @@ -1826,6 +1826,8 @@ { "-i", "--icon-type", 15, 0 }, { "-itype", 0, 15, 0 }, { "-iconic", "--iconic", 15, 0 }, + { "-D", "--basic-display", 12, 0}, + { "--basic-display", 0, 12, 0}, { "-bg", "--background-color", 10, 1 }, { "-background", 0, 10, 1 }, { "-fg", "--foreground-color", 10, 1 },
--- a/src/fns.c Mon Apr 11 03:59:40 2005 +0000 +++ b/src/fns.c Thu Apr 14 05:03:52 2005 +0000 @@ -1,6 +1,6 @@ /* Random utility Lisp functions. - Copyright (C) 1985, 86, 87, 93, 94, 95, 97, 98, 99, 2000, 2001, 02, 03, 2004 - Free Software Foundation, Inc. + Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 1998, 1999, 2000, + 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -66,6 +66,7 @@ extern int minibuffer_auto_raise; extern Lisp_Object minibuf_window; extern Lisp_Object Vlocale_coding_system; +extern Lisp_Object Vloads_in_progress; Lisp_Object Qstring_lessp, Qprovide, Qrequire; Lisp_Object Qyes_or_no_p_history; @@ -2907,9 +2908,15 @@ CHECK_SYMBOL (feature); /* Record the presence of `require' in this file - even if the feature specified is already loaded. */ - LOADHIST_ATTACH (Fcons (Qrequire, feature)); - + even if the feature specified is already loaded. + But not more than once in any file, + and not when we aren't loading a file. */ + if (! NILP (Vloads_in_progress)) + { + tem = Fcons (Qrequire, feature); + if (NILP (Fmember (tem, Vcurrent_load_list))) + LOADHIST_ATTACH (tem); + } tem = Fmemq (feature, Vfeatures); if (NILP (tem))
--- a/src/keyboard.c Mon Apr 11 03:59:40 2005 +0000 +++ b/src/keyboard.c Thu Apr 14 05:03:52 2005 +0000 @@ -530,7 +530,7 @@ /* Symbols to denote kinds of events. */ Lisp_Object Qfunction_key; Lisp_Object Qmouse_click; -#ifdef WINDOWSNT +#if defined (WINDOWSNT) || defined (MAC_OS) Lisp_Object Qlanguage_change; #endif Lisp_Object Qdrag_n_drop; @@ -2115,7 +2115,11 @@ struct atimer *timer; { if (poll_suppress_count == 0) +#ifdef SYNC_INPUT + interrupt_input_pending = 1; +#else poll_for_input_1 (); +#endif } #endif /* POLL_FOR_INPUT */ @@ -2258,12 +2262,16 @@ return c; } -/* Display help echo in the echo area. - - HELP a string means display that string, HELP nil means clear the - help echo. If HELP is a function, call it with OBJECT and POS as - arguments; the function should return a help string or nil for - none. For all other types of HELP evaluate it to obtain a string. +/* Display the help-echo property of the character after the mouse pointer. + Either show it in the echo area, or call show-help-function to display + it by other means (maybe in a tooltip). + + If HELP is nil, that means clear the previous help echo. + + If HELP is a string, display that string. If HELP is a function, + call it with OBJECT and POS as arguments; the function should + return a help string or nil for none. For all other types of HELP, + evaluate it to obtain a string. WINDOW is the window in which the help was generated, if any. It is nil if not in a window. @@ -4027,11 +4035,16 @@ x_activate_menubar (XFRAME (event->frame_or_window)); } #endif -#ifdef WINDOWSNT +#if defined (WINDOWSNT) || defined (MAC_OS) else if (event->kind == LANGUAGE_CHANGE_EVENT) { +#ifdef MAC_OS + /* Make an event (language-change (KEY_SCRIPT)). */ + obj = Fcons (make_number (event->code), Qnil); +#else /* Make an event (language-change (FRAME CHARSET LCID)). */ obj = Fcons (event->frame_or_window, Qnil); +#endif obj = Fcons (Qlanguage_change, Fcons (obj, Qnil)); kbd_fetch_ptr = event + 1; } @@ -10835,7 +10848,7 @@ staticpro (&Qfunction_key); Qmouse_click = intern ("mouse-click"); staticpro (&Qmouse_click); -#ifdef WINDOWSNT +#if defined (WINDOWSNT) || defined (MAC_OS) Qlanguage_change = intern ("language-change"); staticpro (&Qlanguage_change); #endif
--- a/src/keymap.c Mon Apr 11 03:59:40 2005 +0000 +++ b/src/keymap.c Thu Apr 14 05:03:52 2005 +0000 @@ -739,7 +739,9 @@ remove that. Also remove a menu help string as second element. If AUTOLOAD is nonzero, load autoloadable keymaps - that are referred to with indirection. */ + that are referred to with indirection. + + This can GC because menu_item_eval_property calls Feval. */ Lisp_Object get_keyelt (object, autoload) @@ -2543,6 +2545,19 @@ continue; record_sequence: + /* Don't annoy user with strings from a menu such as + Select Paste. Change them all to "(any string)", + so that there seems to be only one menu item + to report. */ + if (! NILP (sequence)) + { + Lisp_Object tem; + tem = Faref (sequence, make_number (XVECTOR (sequence)->size - 1)); + if (STRINGP (tem)) + Faset (sequence, make_number (XVECTOR (sequence)->size - 1), + build_string ("(any string)")); + } + /* It is a true unshadowed match. Record it, unless it's already been seen (as could happen when inheriting keymaps). */ if (NILP (Fmember (sequence, found))) @@ -2750,7 +2765,7 @@ } -/* This function cannot GC. */ +/* This function can GC because get_keyelt can. */ static Lisp_Object where_is_internal_1 (binding, key, definition, noindirect, this, last,
--- a/src/lread.c Mon Apr 11 03:59:40 2005 +0000 +++ b/src/lread.c Thu Apr 14 05:03:52 2005 +0000 @@ -203,7 +203,7 @@ /* A list of file names for files being loaded in Fload. Used to check for recursive loads. */ -static Lisp_Object Vloads_in_progress; +Lisp_Object Vloads_in_progress; /* Non-zero means load dangerous compiled Lisp files. */
--- a/src/macterm.c Mon Apr 11 03:59:40 2005 +0000 +++ b/src/macterm.c Thu Apr 14 05:03:52 2005 +0000 @@ -7172,11 +7172,6 @@ Lisp_Object Vmac_pass_control_to_system; #endif -/* convert input from Mac keyboard (assumed to be in Mac Roman coding) - to this text encoding */ -int mac_keyboard_text_encoding; -int current_mac_keyboard_text_encoding = kTextEncodingMacRoman; - /* Set in term/mac-win.el to indicate that event loop can now generate drag and drop events. */ Lisp_Object Qmac_ready_for_drag_n_drop; @@ -8990,6 +8985,23 @@ break; } #endif + { + static SInt16 last_key_script = -1; + SInt16 current_key_script = GetScriptManagerVariable (smKeyScript); + + if (last_key_script != current_key_script) + { + struct input_event event; + + EVENT_INIT (event); + event.kind = LANGUAGE_CHANGE_EVENT; + event.arg = Qnil; + event.code = current_key_script; + kbd_buffer_store_event (&event); + count++; + } + last_key_script = current_key_script; + } ObscureCursor (); @@ -9042,70 +9054,6 @@ } } - /* If variable mac-convert-keyboard-input-to-latin-1 is - non-nil, convert non-ASCII characters typed at the Mac - keyboard (presumed to be in the Mac Roman encoding) to - iso-latin-1 encoding before they are passed to Emacs. - This enables the Mac keyboard to be used to enter - non-ASCII iso-latin-1 characters directly. */ - if (mac_keyboard_text_encoding != kTextEncodingMacRoman - && inev.kind == ASCII_KEYSTROKE_EVENT && inev.code >= 128) - { - static TECObjectRef converter = NULL; - OSStatus the_err = noErr; - OSStatus convert_status = noErr; - - if (converter == NULL) - { - the_err = TECCreateConverter (&converter, - kTextEncodingMacRoman, - mac_keyboard_text_encoding); - current_mac_keyboard_text_encoding - = mac_keyboard_text_encoding; - } - else if (mac_keyboard_text_encoding - != current_mac_keyboard_text_encoding) - { - /* Free the converter for the current encoding - before creating a new one. */ - TECDisposeConverter (converter); - the_err = TECCreateConverter (&converter, - kTextEncodingMacRoman, - mac_keyboard_text_encoding); - current_mac_keyboard_text_encoding - = mac_keyboard_text_encoding; - } - - if (the_err == noErr) - { - unsigned char ch = inev.code; - ByteCount actual_input_length, actual_output_length; - unsigned char outbuf[32]; - - convert_status = TECConvertText (converter, &ch, 1, - &actual_input_length, - outbuf, 1, - &actual_output_length); - if (convert_status == noErr - && actual_input_length == 1 - && actual_output_length == 1) - inev.code = *outbuf; - - /* Reset internal states of the converter object. - If it fails, create another one. */ - convert_status = TECFlushText (converter, outbuf, - sizeof (outbuf), - &actual_output_length); - if (convert_status != noErr) - { - TECDisposeConverter (converter); - TECCreateConverter (&converter, - kTextEncodingMacRoman, - mac_keyboard_text_encoding); - } - } - } - #if USE_CARBON_EVENTS inev.modifiers = mac_event_to_emacs_modifiers (eventRef); #else @@ -9918,21 +9866,6 @@ The text will be rendered using Core Graphics text rendering which may anti-alias the text. */); Vmac_use_core_graphics = Qnil; - - DEFVAR_INT ("mac-keyboard-text-encoding", &mac_keyboard_text_encoding, - doc: /* One of the Text Encoding Base constant values defined in the -Basic Text Constants section of Inside Macintosh - Text Encoding -Conversion Manager. Its value determines the encoding characters -typed at the Mac keyboard (presumed to be in the MacRoman encoding) -will convert into. E.g., if it is set to kTextEncodingMacRoman (0), -its default value, no conversion takes place. If it is set to -kTextEncodingISOLatin1 (0x201) or kTextEncodingISOLatin2 (0x202), -characters typed on Mac keyboard are first converted into the -ISO Latin-1 or ISO Latin-2 encoding, respectively before being -passed to Emacs. Together with Emacs's set-keyboard-coding-system -command, this enables the Mac keyboard to be used to enter non-ASCII -characters directly. */); - mac_keyboard_text_encoding = kTextEncodingMacRoman; } /* arch-tag: f2259165-4454-4c04-a029-a133c8af7b5b
--- a/src/print.c Mon Apr 11 03:59:40 2005 +0000 +++ b/src/print.c Thu Apr 14 05:03:52 2005 +0000 @@ -1,6 +1,6 @@ /* Lisp object printing and output streams. - Copyright (C) 1985, 86, 88, 93, 94, 95, 97, 98, 1999, 2000, 01, 03, 2004 - Free Software Foundation, Inc. + Copyright (C) 1985, 1986, 1988, 1993, 1994, 1995, 1997, 1998, 1999, + 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -212,13 +212,17 @@ } \ if (MARKERP (printcharfun)) \ { \ - if (!(XMARKER (original)->buffer)) \ + EMACS_INT marker_pos; \ + if (!(XMARKER (printcharfun)->buffer)) \ error ("Marker does not point anywhere"); \ - if (XMARKER (original)->buffer != current_buffer) \ - set_buffer_internal (XMARKER (original)->buffer); \ + if (XMARKER (printcharfun)->buffer != current_buffer) \ + set_buffer_internal (XMARKER (printcharfun)->buffer); \ + marker_pos = marker_position (printcharfun); \ + if (marker_pos < BEGV || marker_pos > ZV) \ + error ("Marker is outside the accessible part of the buffer"); \ old_point = PT; \ old_point_byte = PT_BYTE; \ - SET_PT_BOTH (marker_position (printcharfun), \ + SET_PT_BOTH (marker_pos, \ marker_byte_position (printcharfun)); \ start_point = PT; \ start_point_byte = PT_BYTE; \
--- a/src/termhooks.h Mon Apr 11 03:59:40 2005 +0000 +++ b/src/termhooks.h Thu Apr 14 05:03:52 2005 +0000 @@ -252,10 +252,11 @@ the wheel event occurred in. .timestamp gives a timestamp (in milliseconds) for the event. */ -#ifdef WINDOWSNT - LANGUAGE_CHANGE_EVENT, /* A LANGUAGE_CHANGE_EVENT is generated - on WINDOWSNT when the keyboard layout - or input language is changed by the +#if defined (WINDOWSNT) || defined (MAC_OS) + LANGUAGE_CHANGE_EVENT, /* A LANGUAGE_CHANGE_EVENT is + generated on WINDOWSNT or Mac OS + when the keyboard layout or input + language is changed by the user. */ #endif SCROLL_BAR_CLICK_EVENT, /* .code gives the number of the mouse button
--- a/src/window.c Mon Apr 11 03:59:40 2005 +0000 +++ b/src/window.c Thu Apr 14 05:03:52 2005 +0000 @@ -1,7 +1,7 @@ /* Window creation, deletion and examination for GNU Emacs. Does not include redisplay. - Copyright (C) 1985,86,87, 1993,94,95,96,97,98, 2000,01,02,03,04 - Free Software Foundation, Inc. + Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 2000, + 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -3171,6 +3171,9 @@ if (EQ (window, selected_window)) return window; + /* Store the current buffer's actual point into the + old selected window. It belongs to that window, + and when the window is not selected, must be in the window. */ if (!NILP (selected_window)) { ow = XWINDOW (selected_window); @@ -5591,7 +5594,20 @@ if (XBUFFER (new_current_buffer) == current_buffer) old_point = PT; else - old_point = BUF_PT (XBUFFER (new_current_buffer)); + /* BUF_PT (XBUFFER (new_current_buffer)) gives us the position of + point in new_current_buffer as of the last time this buffer was + used. This can be non-deterministic since it can be changed by + things like jit-lock by mere temporary selection of some random + window that happens to show this buffer. + So if possible we want this arbitrary choice of "which point" to + be the one from the to-be-selected-window so as to prevent this + window's cursor from being copied from another window. */ + if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer) + /* If current_window = selected_window, its point is in BUF_PT. */ + && !EQ (selected_window, data->current_window)) + old_point = XMARKER (XWINDOW (data->current_window)->pointm)->charpos; + else + old_point = BUF_PT (XBUFFER (new_current_buffer)); } frame = XWINDOW (SAVED_WINDOW_N (saved_windows, 0)->window)->frame; @@ -5636,8 +5652,9 @@ #endif #endif - /* "Swap out" point from the selected window - into its buffer. We do this now, before + /* "Swap out" point from the selected window's buffer + into the window itself. (Normally the pointm of the selected + window holds garbage.) We do this now, before restoring the window contents, and prevent it from being done later on when we select a new window. */ if (! NILP (XWINDOW (selected_window)->buffer)) @@ -5787,10 +5804,11 @@ FRAME_ROOT_WINDOW (f) = data->root_window; /* Prevent "swapping out point" in the old selected window using the buffer that has been restored into it. - Use the point value from the beginning of this function - since unshow_buffer (called from delete_all_subwindows) - could have altered it. */ + We already swapped out point that from that window's old buffer. */ selected_window = Qnil; + + /* Arrange *not* to restore point in the buffer that was + current when the window configuration was saved. */ if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer)) set_marker_restricted (XWINDOW (data->current_window)->pointm, make_number (old_point),