diff options
author | Miles Bader <miles@gnu.org> | 2007-04-24 21:56:25 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2007-04-24 21:56:25 +0000 |
commit | 9d989e2f0e613cb0802489eac8e52babdb7ca179 (patch) | |
tree | 0af4b34ec40ca8efbde60a8940d59f2c04897296 /lisp | |
parent | b6cb499791717c7026dfee3ee3c0adb6338635a3 (diff) | |
parent | 553674da06302c3d5c7f74e57012ced311b44e74 (diff) | |
download | emacs-9d989e2f0e613cb0802489eac8e52babdb7ca179.tar.gz |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 698-710)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 216)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-196
Diffstat (limited to 'lisp')
117 files changed, 2232 insertions, 1584 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e77f238bffc..0ac89981e57 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,367 @@ +2007-04-24 J.D. Smith <jdsmith@as.arizona.edu> + + * progmodes/idlw-shell.el (idlwave-shell-clear-all-bp): Don't + re-query for each cleared BP. + (idlwave-shell-clear-bp): Optionally skip BP query. + (idlwave-shell-update-bp-overlays): Use set-window-margins + instead of set-window-buffer, which incorrectly moves displayed + region. + +2007-04-23 Jay Belanger <jay.p.belanger@gmail.com> + + * calc/calc.el (calc-bug-address): Update maintainer's address. + * calc/*: Update maintainer's address. + +2007-04-23 Richard Stallman <rms@gnu.org> + + * simple.el (set-mark-command-repeat-pop): Doc fix. + Put in `editing-basics' group. + +2007-04-23 Chong Yidong <cyd@stupidchicken.com> + + * info.el (Info-mouse-scroll-up, Info-mouse-scroll-down): New + functions. + (Info-mode-line-node-keymap): Bind mouse commands to + Info-mouse-scroll-up/down instead of Info-scroll-up/down. + +2007-04-23 Luc Teirlinck <teirllm@auburn.edu> + + * locate.el (locate-local-prompt): New var. + (locate-prompt-for-command): Doc fix. + (locate-prompt-for-search-string): New function. + (locate): New optional arg. Make locate-local-prompt + buffer-local. Use locate-prompt-for-search-string. + (locate-with-filter): New optional arg. Use + locate-prompt-for-search-string. + (locate-update): Bind locate-prompt-for-command. + +2007-04-23 Glenn Morris <rgm@gnu.org> + + * files.el (magic-mode-alist): `<!DOCTYPE HTML' in html-mode. + +2007-04-23 Nick Roberts <nickrob@snap.net.nz> + + * button.el (button): Inherit from link face on a tty. + +2007-04-23 Glenn Morris <rgm@gnu.org> + + * button.el (button): Use color for this face on a tty. + + * files.el (magic-mode-alist): Allow for carriage-returns in + html-mode and sgml-mode entries. + +2007-04-22 Richard Stallman <rms@gnu.org> + + * emacs-lisp/easy-mmode.el (define-globalized-minor-mode): + Improve doc string of generated command. + + * subr.el (read-number): Catch errors. + + * hi-lock.el (hi-lock-file-patterns-policy): Doc fix. + +2007-04-22 Chong Yidong <cyd@stupidchicken.com> + + * image-dired.el: Rename from thumbnails.el. All instances of + "thumbnails" replaced with "image-dired". + + * dired.el (dired-mode-map): Rename "thumbnails" again, to + "image-dired". + +2007-04-22 Kim F. Storm <storm@cua.dk> + + * ido.el (ido-kill-buffer-at-head, ido-delete-file-at-head): + Don't use kill-line. + +2007-04-22 Nick Roberts <nickrob@snap.net.nz> + + * t-mouse.el (t-mouse-make-event): Pass on mev's more informative + error message. + +2007-04-22 Chong Yidong <cyd@stupidchicken.com> + + * dired.el: Rename "tumme" to "thumbnails". + + * thumbnails.el: Rename from tumme.el. All instances of "tumme" + replaced with "thumbnails". + +2007-04-22 Glenn Morris <rgm@gnu.org> + + * hi-lock.el (hi-lock-file-patterns-policy): Make it a defcustom, + and give it the risky-local-variable property. + + * textmodes/flyspell.el (flyspell-define-abbrev): Downcase abbrev + before defining it. + +2007-04-21 Martin Rudalics <rudalics@gmx.at> + + * progmodes/cc-mode.el (c-remove-any-local-eval-or-mode-variables): + Use delete-region instead of kill-line. + +2007-04-21 Alan Mackenzie <acm@muc.de> + + * progmodes/cc-cmds.el (c-electric-slash): Replace wrong use of + `kill-region' by `delete-region'. + +2007-04-21 Chong Yidong <cyd@stupidchicken.com> + + * progmodes/perl-mode.el (perl-indent-command): Use delete-region + instead of kill-region. + + * progmodes/mantemp.el (mantemp-make-mantemps-region) + (mantemp-insert-cxx-syntax, mantemp-sort-and-unique-lines) + (mantemp-remove-memfuncs): Use delete-region instead of kill-word + and kill-line. + + * progmodes/vhdl-mode.el (vhdl-template-type) + (vhdl-template-record, vhdl-template-nature) + (vhdl-template-configuration-spec, vhdl-template-component-inst) + (vhdl-template-break, vhdl-regress-line, vhdl-electric-tab): Use + delete-region instead of kill-word and kill-line. + +2007-04-21 Johan Bockg,Ae(Brd <bojohan@dd.chalmers.se> + + * dired-x.el (dired-virtual-mode): Doc fix. + +2007-04-21 Richard Stallman <rms@gnu.org> + + * font-lock.el (font-lock-keywords-alist): Mark as risky. + + * subr.el (read-number): Doc fix. + + * simple.el (pop-to-mark-command): Display message "mark popped" + if point does not move. + (set-mark-command): Doc fix. + +2007-04-21 Luc Teirlinck <teirllm@auburn.edu> + + * locate.el: Revert 2006-09-09 and 2007-04-20 changes. + (locate-local-filter, locate-local-search): New vars. + (locate): Make variables local. + (locate-update): Bind locate-buffer-name. Call locate using + locate-local-filter and locate-local-search. + +2007-04-20 David Koppelman <koppel@ece.lsu.edu> + + * hi-lock.el (hi-lock-file-patterns-policy): New var. + (hi-lock-find-patterns): Use hi-lock-file-patterns-policy. + (hi-lock-mode): Update docstring. + +2007-04-20 Stefan Monnier <monnier@iro.umontreal.ca> + + * textmodes/fill.el (fill-move-to-break-point): Don't inhibit + fill-nobreak-predicate when the break is past fill-column. + +2007-04-20 Francesco Potort,Al(B <pot@gnu.org> + + * locate.el (locate): Output from shell-command should go in the + current buffer rather than *Shell Command Output*. + +2007-04-20 Chong Yidong <cyd@stupidchicken.com> + + * paren.el (show-paren-function): Fix last fix. + +2007-04-19 Kevin Ryde <user42@zip.com.au> + + * arc-mode.el (archive-find-type): lzh-exe for lzh self-extracting exe. + (archive-lzh-summarize): Add optional start arg for where to start + looking at the archive. + (archive-lzh-exe-summarize, archive-lzh-exe-extract): New functions. + + * international/mule.el (auto-coding-alist): no-conversion for .exe + and .EXE. + +2007-04-19 Alan Mackenzie <acm@muc.de> + + * progmodes/cc-cmds.el (c-in-function-trailer-p): Fix this: when a + function return type contains "struct", "union", etc. + c-end-of-defun goes too far forward. + +2007-04-19 Chong Yidong <cyd@stupidchicken.com> + + * paren.el (show-paren-function): Reset window-start to avoid + recentering. + +2007-04-19 Glenn Morris <rgm@gnu.org> + + * calendar/todo-mode.el: Fix typo: "threshhold" -> "threshold". + +2007-04-18 Glenn Morris <rgm@gnu.org> + + * calendar/diary-lib.el (diary-header-line-format): Add a custom + :set function. + (diary-list-entries): Only switch to diary-mode from + default-major-mode (reverts 2007-03-21 change). Otherwise, if in + diary-mode set header-line-format, in case of any customization. + +2007-04-18 Levin Du <zslevin@gmail.com> (tiny change) + + * calendar/parse-time.el (parse-time-string-chars): Check if CHAR + is less than the length of parse-time-syntax. + +2007-04-17 David Kastrup <dak@gnu.org> + + * replace.el (query-replace-regexp-eval): Deprecate. + +2007-04-17 Alan Mackenzie <acm@muc.de> + + * progmodes/cc-cmds.el (c-beginning-of-defun): With -ve arg and + point too close to EOB, leave point at EOB rather than last `}'. + +2007-04-17 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> + + * textmodes/bibtex.el (bibtex-include-OPTkey) + (bibtex-user-optional-fields, bibtex-entry-field-alist): + Fix defcustom. + +2007-04-17 Glenn Morris <rgm@gnu.org> + + * calendar/cal-dst.el (calendar-dst-find-startend): If YEAR cannot + be encoded, fall back to current year. + +2007-04-14 Kevin Ryde <user42@zip.com.au> + + * arc-mode.el (archive-lzh-summarize): Only apply the "downcase if + all upcase" rule to OS-ID 0 "generic". Always downcase for OS-ID + M "MSDOS". + +2007-04-16 Chong Yidong <cyd@stupidchicken.com> + + * progmodes/python.el (python-end-of-block): Avoid looping forever + if python-next-statement fails. + +2007-04-16 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> + + * textmodes/bibtex.el (bibtex-entry-field-alist): Use defcustom. + +2007-04-16 Dan Nicolaescu <dann@ics.uci.edu> + + * progmodes/perl-mode.el (perl-indent-level): Mark as safe local var. + * progmodes/cperl-mode.el (cperl-indent-level): Likewise. + +2007-04-15 Jay Belanger <belanger@truman.edu> + + * calc/calc.el (calc-version): New function. + (calc-trail-mode): Shorten the title. + +2007-04-15 Chong Yidong <cyd@stupidchicken.com> + + * mail/footnote.el (footnote-style): Clarify docstring to state + that customizing this only applies to future footnotes. + +2007-04-15 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> + + * textmodes/bibtex.el (bibtex-field-list): Use functionp. + (bibtex-make-field): Check that INIT is a string. Use functionp. + +2007-04-14 Glenn Morris <rgm@gnu.org> + + * complete.el (PC-goto-end): New buffer-local variable. + (PC-do-completion-end): Make buffer-local. + (partial-completion-mode) <choose-completion-string-functions>: + Do not go to the end of the minibuffer if PC-goto-end is non-nil. + (PC-do-completion): New optional fourth argument GOTO-END. Add a + doc string. Set PC-goto-end for choose-completion. + (PC-lisp-complete-symbol): Pass non-nil GOTO-END arg to + PC-do-completion. + + * textmodes/bibtex.el (bibtex-insert-kill): Pass non-nil NODELIM + arg to bibtex-make-field. + (bibtex-make-field): Add optional fourth arg NODELIM. + Insert delimiters around INIT unless this arg is non-nil. + +2007-04-14 Nick Roberts <nickrob@snap.net.nz> + + * tmm.el (tmm-get-keybind): Use copy-sequence to ensure that the + global map isn't modified + +2007-04-14 Glenn Morris <rgm@gnu.org> + + * calendar/appt.el (appt-disp-window): Do not split small windows. + Suggested by Jeff Miller <jmiller@cablespeed.com>. + +2007-04-13 Chong Yidong <cyd@stupidchicken.com> + + * progmodes/compile.el (compilation-start): Revert 2007-03-25 change. + + * files.el: Ditto. + +2007-04-13 Juanma Barranquero <lekktu@gmail.com> + + * cus-edit.el (minibuffer, auto-save): Fix typos in docstrings. + + * term.el (term-buffer-maximum-size, term-exec, term-escape-char) + (term-set-escape-char, term-termcap-format, term-get-old-input-default) + (term-skip-prompt, term-send-string, term-send-region, term-pager-page) + (term-pager-help): Fix typos in docstrings. + + * wid-edit.el (widget-documentation): Fix typo in docstring. + + * progmodes/ebnf2ps.el (ebnf-insert-style, ebnf-merge-style): + Fix typos in error messages. + +2007-04-13 Martin Rudalics <rudalics@gmx.at> + + * emacs-lisp/edebug.el (edebug-pop-to-buffer): Don't select + window marked as dedicated. + + * mail/footnote.el (footnote-latin-string): New variable. + (footnote-latin-regexp): Redefine as regexp alternative. + (Footnote-latin): Use footnote-latin-string instead of + footnote-latin-regexp. + +2007-04-13 Glenn Morris <rgm@gnu.org> + + * tmm.el (tmm-get-keybind): Use car-safe to avoid errors with + inherited keymaps. + +2007-04-12 Chong Yidong <cyd@stupidchicken.com> + + * outline.el (outline-get-next-sibling): Clarify docstring. + (outline-get-last-sibling): Handle case where we are at the first + heading. Clarify docstring. + +2007-04-12 Nick Roberts <nickrob@snap.net.nz> + + * progmodes/gud.el (gud-minor-mode-map): Make go button same + length as stop button to lessen flicker. + (jdb): Add gud-print. + (gud-find-expr): Jdb prints the expression with the value, so + don't insert it in the output. + +2007-04-11 Jason Rumney <jasonr@gnu.org> + + * dnd.el (dnd-get-local-file-name): Decode both upper and lower + case hex. Do not try to decode non-hex letters. + +2007-04-11 Markus Triska <markus.triska@gmx.at> + + * emacs-lisp/byte-opt.el (byte-optimize-backward-char) + (byte-optimize-backward-word): Remove (move to bytecomp.el). + (byte-optimize-form-code-walker): Evaluate pure function calls if + possible. + (byte-optimize-all-constp): New function. + + * emacs-lisp/bytecomp.el (byte-compile-char-before): + Improve numeric argument case. + (byte-compile-backward-char, byte-compile-backward-word): + New functions, performing rewriting previously done in byte-opt.el. + Fix their "Fixme" item (restriction to numeric arguments). + +2007-04-11 Stefan Monnier <monnier@iro.umontreal.ca> + + * desktop.el (desktop-save, desktop-create-buffer): Replace mapcar + with dolist. + (after-init-hook): Don't quote lambda. + (desktop-first-buffer): Don't wrap it in eval-when-compile. + (desktop-internal-v2s): Remove unused var `el'. + (desktop-buffer-major-mode, desktop-buffer-locals): Move out of + desktop-restore-file-buffer. + (desktop-buffer-ok-count, desktop-buffer-fail-count): Move out of + desktop-create-buffer. + 2007-04-10 Chong Yidong <cyd@stupidchicken.com> - * woman.el (woman-decode-buffer): Postphone macro-set check... + * woman.el (woman-decode-buffer): Postpone macro-set check... (woman-decode-region): ...to here. 2007-04-10 Thien-Thi Nguyen <ttn@gnu.org> @@ -25,8 +386,8 @@ * emacs-lisp/byte-opt.el (byte-optimize-char-before): Remove (move to bytecomp.el as byte-compile-char-before). - * emacs-lisp/bytecomp.el (byte-compile-char-before): New - function (modified replacement for byte-optimize-char-before in + * emacs-lisp/bytecomp.el (byte-compile-char-before): + New function (modified replacement for byte-optimize-char-before in byte-opt.el). 2007-04-09 Alan Mackenzie <acm@muc.de> @@ -74,10 +435,10 @@ * cus-start.el <scroll-preserve-screen-position>: Add choices. -2007-04-08 Johan Bockg,Ae(Brd <bojohan+news@dd.chalmers.se> +2007-04-08 Johan Bockg,Ae(Brd <bojohan@dd.chalmers.se> - * term/xterm.el (terminal-init-xterm): Fix key definitions. Add - binding for C-M-SPC. + * term/xterm.el (terminal-init-xterm): Fix key definitions. + Add binding for C-M-SPC. 2007-04-08 Richard Stallman <rms@gnu.org> @@ -142,8 +503,8 @@ * menu-bar.el (menu-bar-tools-menu): Revert 2003-07-25 change. - * desktop.el (desktop-create-buffer, desktop-save): Revert - 2004-11-12 change. + * desktop.el (desktop-create-buffer, desktop-save): + Revert 2004-11-12 change for lack of copyright papers. * dired-x.el (dired-guess-shell-case-fold-search): Delete var. (dired-guess-default): Respect case. @@ -432,7 +793,7 @@ * textmodes/flyspell.el (flyspell-large-region): Use ispell-call-process-region. -2007-03-26 Johan Bockg,Ae(Brd <bojohan+sf@dd.chalmers.se> +2007-03-26 Johan Bockg,Ae(Brd <bojohan@dd.chalmers.se> * emacs-lisp/bytecomp.el (byte-compile-file-form-defmumble): Use prin1 instead of princ. @@ -568,6 +929,13 @@ (number-of-diary-entries): Change :set to use diary-set-maybe-redraw. (diary-list-entries): Always run diary-mode. +2007-03-20 Kenichi Handa <handa@m17n.org> + + * international/quail.el (quail-setup-completion-buf): Make the + completion buffer read-only. + (quail-completion): Adjusted for the above change. Leave the + modified flag nil. + 2007-03-20 David Kastrup <dak@gnu.org> * files.el (magic-mode-alist): Require literal "%!PS" string for @@ -5385,7 +5753,7 @@ * dired.el (dired-build-subdir-alist): Fix previous change. -2006-10-01 Johan Bockg,Ae(Brd <bojohan+mail@dd.chalmers.se> +2006-10-01 Johan Bockg,Ae(Brd <bojohan@dd.chalmers.se> * simple.el (undo-elt-crosses-region): Fix the inequalities. @@ -21085,7 +21453,7 @@ * net/newsticker.el: Get rid of CVS keyword. -2005-09-19 Johan Bockg,Ae(Brd <bojohan+sf@dd.chalmers.se> +2005-09-19 Johan Bockg,Ae(Brd <bojohan@dd.chalmers.se> * dired-aux.el (dired-handle-overwrite): Don't use `format' here. The prompt is formatted later. @@ -30153,7 +30521,7 @@ (mail-directory-process defvar): Doc fix. (mail-names): Doc fix. -2005-03-25 Johan Bockg,Ae(Brd <bojohan+mail@dd.chalmers.se> (tiny change) +2005-03-25 Johan Bockg,Ae(Brd <bojohan@dd.chalmers.se> (tiny change) * textmodes/flyspell.el (mail-mode-flyspell-verify): Fix regexp syntax. diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index 07a48c761aa..657e2ed87d6 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el @@ -723,6 +723,10 @@ archive. (string-match "\\.[aA][rR][cC]$" (or buffer-file-name (buffer-name)))) 'arc) + ;; This pattern modelled on the BSD/GNU+Linux `file' command. + ;; Have seen capital "LHA's", and file has lower case "LHa's" too. + ;; Note this regexp is also in archive-exe-p. + ((looking-at "MZ\\(.\\|\n\\)\\{34\\}LH[aA]'s SFX ") 'lzh-exe) (t (error "Buffer format not recognized"))))) ;; ------------------------------------------------------------------------- (defun archive-summarize (&optional shut-up) @@ -1421,8 +1425,8 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." ;; ------------------------------------------------------------------------- ;; Section: Lzh Archives -(defun archive-lzh-summarize () - (let ((p 1) +(defun archive-lzh-summarize (&optional start) + (let ((p (or start 1)) ;; 1 for .lzh, something further on for .exe (totalsize 0) (maxlen 8) files @@ -1438,7 +1442,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." (time2 (archive-l-e (+ p 17) 2)) ;and UNIX format in level 2 header.) (hdrlvl (byte-after (+ p 20))) ;header level thsize ;total header size (base + extensions) - fnlen efnname fiddle ifnname width p2 + fnlen efnname osid fiddle ifnname width p2 neh ;beginning of next extension header (level 1 and 2) mode modestr uid gid text dir prname gname uname modtime moddate) @@ -1496,7 +1500,22 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." (setq thsize (- neh p)))) (if (= hdrlvl 0) ;total header size (setq thsize hsize)) - (setq fiddle (if efnname (string= efnname (upcase efnname)))) + ;; OS ID field not present in level 0 header, use code 0 "generic" + ;; in that case as per lha program header.c get_header() + (setq osid (cond ((= hdrlvl 0) 0) + ((= hdrlvl 1) (char-after (+ p 22 fnlen 2))) + ((= hdrlvl 2) (char-after (+ p 23))))) + ;; Filename fiddling must follow the lha program, otherwise the name + ;; passed to "lha pq" etc won't match (which for an extract silently + ;; results in no output). As of version 1.14i it goes from the OS ID, + ;; - For 'M' MSDOS: msdos_to_unix_filename() downcases always, and + ;; converts "\" to "/". + ;; - For 0 generic: generic_to_unix_filename() downcases if there's + ;; no lower case already present, and converts "\" to "/". + ;; - For 'm' MacOS: macos_to_unix_filename() changes "/" to ":" and + ;; ":" to "/" + (setq fiddle (cond ((= ?M osid) t) + ((= 0 osid) (string= efnname (upcase efnname))))) (setq ifnname (if fiddle (downcase efnname) efnname)) (setq prname (if dir (concat dir ifnname) ifnname)) (setq width (if prname (string-width prname) 0)) @@ -1625,6 +1644,34 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." ;; This should work even though newmode will be dynamically accessed. (lambda (old) (archive-calc-mode old newmode t)) files "a unix-style mode" 8)) + +;; ------------------------------------------------------------------------- +;; Section: Lzh Self-Extracting .exe Archives +;; +;; No support for modifying these files. It looks like the lha for unix +;; program (as of version 1.14i) can't create or retain the DOS exe part. +;; If you do an "lha a" on a .exe for instance it renames and writes to a +;; plain .lzh. + +(defun archive-lzh-exe-summarize () + "Summarize the contents of an LZH self-extracting exe, for `archive-mode'." + + ;; Skip the initial executable code part and apply archive-lzh-summarize + ;; to the archive part proper. The "-lh5-" etc regexp here for the start + ;; is the same as in archive-find-type. + ;; + ;; The lha program (version 1.14i) does this in skip_msdos_sfx1_code() by + ;; a similar scan. It looks for "..-l..-" plus for level 0 or 1 a test of + ;; the header checksum, or level 2 a test of the "attribute" and size. + ;; + (re-search-forward "..-l[hz][0-9ds]-" nil) + (archive-lzh-summarize (match-beginning 0))) + +;; `archive-lzh-extract' runs "lha pq", and that works for .exe as well as +;; .lzh files +(defalias 'archive-lzh-exe-extract 'archive-lzh-extract + "Extract a member from an LZH self-extracting exe, for `archive-mode'.") + ;; ------------------------------------------------------------------------- ;; Section: Zip Archives diff --git a/lisp/button.el b/lisp/button.el index 423aef5f78f..8c3681854e7 100644 --- a/lisp/button.el +++ b/lisp/button.el @@ -52,8 +52,10 @@ ;; Globals ;; Use color for the MS-DOS port because it doesn't support underline. +;; Also for the linux console. (defface button '((((type pc) (class color)) (:foreground "lightblue")) + (((type tty)) (:inherit link)) (t :underline t)) "Default face used for buttons." :group 'basic-faces) diff --git a/lisp/calc/README b/lisp/calc/README index a93092f3b11..5dfaf57403c 100644 --- a/lisp/calc/README +++ b/lisp/calc/README @@ -17,7 +17,7 @@ Written by: daveg@synaptics.com, uunet!synaptx!daveg Currently maintained by: - Jay Belanger <belanger@truman.edu> + Jay Belanger <jay.p.belanger@gmail.com> From the introduction to the manual: @@ -59,7 +59,7 @@ From the introduction to the manual: Calc is written entirely in Emacs Lisp, for maximum portability. I am anxious to hear about your experiences using Calc. Send mail to -"belanger@truman.edu". A bug report is most useful if you include the +"jay.p.belanger@gmail.com". A bug report is most useful if you include the exact input and output that occurred, any modes in effect (such as the current precision), and so on. If you find Calc is difficult to operate in any way, or if you have other suggestions, don't hesitate to let me diff --git a/lisp/calc/calc-aent.el b/lisp/calc/calc-aent.el index 988b0240067..4b954fabd0c 100644 --- a/lisp/calc/calc-aent.el +++ b/lisp/calc/calc-aent.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: Dave Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-alg.el b/lisp/calc/calc-alg.el index 2037ed099af..70900b9e5c3 100644 --- a/lisp/calc/calc-alg.el +++ b/lisp/calc/calc-alg.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-arith.el b/lisp/calc/calc-arith.el index 6d56365fc9c..1b291cbb84e 100644 --- a/lisp/calc/calc-arith.el +++ b/lisp/calc/calc-arith.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-bin.el b/lisp/calc/calc-bin.el index 07be863a99a..3963700a599 100644 --- a/lisp/calc/calc-bin.el +++ b/lisp/calc/calc-bin.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-comb.el b/lisp/calc/calc-comb.el index eed8124494f..6c30177a0b0 100644 --- a/lisp/calc/calc-comb.el +++ b/lisp/calc/calc-comb.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-cplx.el b/lisp/calc/calc-cplx.el index de2cfd8354c..0879e308a86 100644 --- a/lisp/calc/calc-cplx.el +++ b/lisp/calc/calc-cplx.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el index eb35b8a7a4b..a064905943f 100644 --- a/lisp/calc/calc-embed.el +++ b/lisp/calc/calc-embed.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index 22b366a04d9..ca89928d46e 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-fin.el b/lisp/calc/calc-fin.el index 24516f65535..443ab99a8fe 100644 --- a/lisp/calc/calc-fin.el +++ b/lisp/calc/calc-fin.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-forms.el b/lisp/calc/calc-forms.el index 3f368499395..10bbf7dc3dd 100644 --- a/lisp/calc/calc-forms.el +++ b/lisp/calc/calc-forms.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-frac.el b/lisp/calc/calc-frac.el index b30fcd1d145..2fa3bce8508 100644 --- a/lisp/calc/calc-frac.el +++ b/lisp/calc/calc-frac.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-funcs.el b/lisp/calc/calc-funcs.el index bd8aa753ddf..479116b0c76 100644 --- a/lisp/calc/calc-funcs.el +++ b/lisp/calc/calc-funcs.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-graph.el b/lisp/calc/calc-graph.el index 734f7615329..e5ffd2263fa 100644 --- a/lisp/calc/calc-graph.el +++ b/lisp/calc/calc-graph.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-help.el b/lisp/calc/calc-help.el index 90a89c079fa..9f324a67785 100644 --- a/lisp/calc/calc-help.el +++ b/lisp/calc/calc-help.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-incom.el b/lisp/calc/calc-incom.el index 5d1034cf2fc..ee20476938e 100644 --- a/lisp/calc/calc-incom.el +++ b/lisp/calc/calc-incom.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-keypd.el b/lisp/calc/calc-keypd.el index d044335e94c..1f71c648ef3 100644 --- a/lisp/calc/calc-keypd.el +++ b/lisp/calc/calc-keypd.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-lang.el b/lisp/calc/calc-lang.el index 5e91fe153af..79c33b473c3 100644 --- a/lisp/calc/calc-lang.el +++ b/lisp/calc/calc-lang.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-macs.el b/lisp/calc/calc-macs.el index 692770030fc..68b42876e94 100644 --- a/lisp/calc/calc-macs.el +++ b/lisp/calc/calc-macs.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-map.el b/lisp/calc/calc-map.el index 9ae9a9b5cfd..b9eb0019ab7 100644 --- a/lisp/calc/calc-map.el +++ b/lisp/calc/calc-map.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-math.el b/lisp/calc/calc-math.el index 32a3f0409c8..b6481d30b73 100644 --- a/lisp/calc/calc-math.el +++ b/lisp/calc/calc-math.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-misc.el b/lisp/calc/calc-misc.el index 178734c1f1d..e9674ff938b 100644 --- a/lisp/calc/calc-misc.el +++ b/lisp/calc/calc-misc.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-mode.el b/lisp/calc/calc-mode.el index 136ca2e91a9..7240009a8e8 100644 --- a/lisp/calc/calc-mode.el +++ b/lisp/calc/calc-mode.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-mtx.el b/lisp/calc/calc-mtx.el index 012600f86ab..0ab90a4a51d 100644 --- a/lisp/calc/calc-mtx.el +++ b/lisp/calc/calc-mtx.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-poly.el b/lisp/calc/calc-poly.el index 31e026e4ffe..0bcf78af861 100644 --- a/lisp/calc/calc-poly.el +++ b/lisp/calc/calc-poly.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el index b0a0feccec8..4dff6f04013 100644 --- a/lisp/calc/calc-prog.el +++ b/lisp/calc/calc-prog.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-rewr.el b/lisp/calc/calc-rewr.el index d1dc4a27f1c..bf9ac13c6cf 100644 --- a/lisp/calc/calc-rewr.el +++ b/lisp/calc/calc-rewr.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-rules.el b/lisp/calc/calc-rules.el index 5053a0a9fa1..09f71014a0d 100644 --- a/lisp/calc/calc-rules.el +++ b/lisp/calc/calc-rules.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-sel.el b/lisp/calc/calc-sel.el index 61b0dd70bd8..fe67127d649 100644 --- a/lisp/calc/calc-sel.el +++ b/lisp/calc/calc-sel.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-stat.el b/lisp/calc/calc-stat.el index d1c481d16fd..967d45e7ba8 100644 --- a/lisp/calc/calc-stat.el +++ b/lisp/calc/calc-stat.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-store.el b/lisp/calc/calc-store.el index 517106f9d7d..8fa77563211 100644 --- a/lisp/calc/calc-store.el +++ b/lisp/calc/calc-store.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-stuff.el b/lisp/calc/calc-stuff.el index cafe298fb0e..89cf044c097 100644 --- a/lisp/calc/calc-stuff.el +++ b/lisp/calc/calc-stuff.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-trail.el b/lisp/calc/calc-trail.el index 2f3de0c5e28..ba18a633c43 100644 --- a/lisp/calc/calc-trail.el +++ b/lisp/calc/calc-trail.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-undo.el b/lisp/calc/calc-undo.el index e1cec48abf5..9df08597956 100644 --- a/lisp/calc/calc-undo.el +++ b/lisp/calc/calc-undo.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el index 750dc53a54a..81062b356fa 100644 --- a/lisp/calc/calc-units.el +++ b/lisp/calc/calc-units.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-vec.el b/lisp/calc/calc-vec.el index d2ec77ceab7..e85d1259b5f 100644 --- a/lisp/calc/calc-vec.el +++ b/lisp/calc/calc-vec.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el index 17997c1f8e1..abd78e5f926 100644 --- a/lisp/calc/calc-yank.el +++ b/lisp/calc/calc-yank.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 75e1c83df03..4ca5662afdc 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; Keywords: convenience, extensions ;; Version: 2.1 @@ -401,7 +401,7 @@ This is not required to be present for user-written mode annotations." :group 'calc :type '(choice (string) (sexp))) -(defvar calc-bug-address "belanger@truman.edu" +(defvar calc-bug-address "jay.p.belanger@gmail.com" "Address of the maintainer of Calc, for use by `report-calc-bug'.") (defvar calc-scan-for-dels t @@ -1148,6 +1148,11 @@ If nil, selections displayed but ignored.") (defvar calc-alg-map) ; Defined in calc-ext.el +(defun calc-version () + "Return version of this version of Calc." + (interactive) + (message (concat "Calc version " calc-version))) + (defun calc-mode () "Calculator major mode. @@ -1258,8 +1263,7 @@ commands given here will actually operate on the *Calculator* stack." (set (make-local-variable 'calc-main-buffer) buf)) (when (= (buffer-size) 0) (let ((buffer-read-only nil)) - (insert (propertize (concat "Emacs Calculator v" calc-version - " by Dave Gillespie\n") + (insert (propertize (concat "Emacs Calculator Trail\n") 'font-lock-face 'italic)))) (run-mode-hooks 'calc-trail-mode-hook)) diff --git a/lisp/calc/calcalg2.el b/lisp/calc/calcalg2.el index 5bf388b7431..8b1d4a2c9b3 100644 --- a/lisp/calc/calcalg2.el +++ b/lisp/calc/calcalg2.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calcalg3.el b/lisp/calc/calcalg3.el index f5053689fe7..5864091614a 100644 --- a/lisp/calc/calcalg3.el +++ b/lisp/calc/calcalg3.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calccomp.el b/lisp/calc/calccomp.el index 1bc844af481..7b385261735 100644 --- a/lisp/calc/calccomp.el +++ b/lisp/calc/calccomp.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calcsel2.el b/lisp/calc/calcsel2.el index f28efba30b8..afc3bb45a1e 100644 --- a/lisp/calc/calcsel2.el +++ b/lisp/calc/calcsel2.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainer: Jay Belanger <belanger@truman.edu> +;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> ;; This file is part of GNU Emacs. diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el index 82fa0e66dbf..02865c994e3 100644 --- a/lisp/calendar/appt.el +++ b/lisp/calendar/appt.el @@ -233,8 +233,8 @@ The variable `appt-audible' controls the audible reminder." ;; vars appt-msg-window and appt-visible are dropped. (let ((appt-display-format (if (eq appt-display-format 'ignore) - (cond (appt-msg-window 'window) - (appt-visible 'echo)) + (cond (appt-msg-window 'window) + (appt-visible 'echo)) appt-display-format))) (cond ((eq appt-display-format 'window) (funcall appt-disp-window-function @@ -457,7 +457,9 @@ NEW-TIME is a string giving the date." (same-window-p (buffer-name appt-disp-buf))) ;; By default, split the bottom window and use the lower part. (appt-select-lowest-window) - (select-window (split-window))) + ;; Split the window, unless it's too small to do so. + (when (>= (window-height) (* 2 window-min-height)) + (select-window (split-window)))) (switch-to-buffer appt-disp-buf)) (calendar-set-mode-line (format " Appointment in %s minutes. %s " min-to-app new-time)) diff --git a/lisp/calendar/cal-china.el b/lisp/calendar/cal-china.el index a838141db1c..7f6646dda64 100644 --- a/lisp/calendar/cal-china.el +++ b/lisp/calendar/cal-china.el @@ -43,12 +43,6 @@ ;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold ;; and Nachum Dershowitz, Cambridge University Press (2001). -;; Comments, corrections, and improvements should be sent to -;; Edward M. Reingold Department of Computer Science -;; (217) 333-6733 University of Illinois at Urbana-Champaign -;; reingold@cs.uiuc.edu 1304 West Springfield Avenue -;; Urbana, Illinois 61801 - ;;; Code: (defvar date) diff --git a/lisp/calendar/cal-coptic.el b/lisp/calendar/cal-coptic.el index 23de17a16a8..b5cf96949c6 100644 --- a/lisp/calendar/cal-coptic.el +++ b/lisp/calendar/cal-coptic.el @@ -34,12 +34,6 @@ ;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold ;; and Nachum Dershowitz, Cambridge University Press (2001). -;; Comments, corrections, and improvements should be sent to -;; Edward M. Reingold Department of Computer Science -;; (217) 333-6733 University of Illinois at Urbana-Champaign -;; reingold@cs.uiuc.edu 1304 West Springfield Avenue -;; Urbana, Illinois 61801 - ;;; Code: (defvar date) diff --git a/lisp/calendar/cal-dst.el b/lisp/calendar/cal-dst.el index 3aea69b8ccf..6159d7e9dc1 100644 --- a/lisp/calendar/cal-dst.el +++ b/lisp/calendar/cal-dst.el @@ -31,12 +31,6 @@ ;; This collection of functions implements the features of calendar.el and ;; holiday.el that deal with daylight saving time. -;; Comments, corrections, and improvements should be sent to -;; Edward M. Reingold Department of Computer Science -;; (217) 333-6733 University of Illinois at Urbana-Champaign -;; reingold@cs.uiuc.edu 1304 West Springfield Avenue -;; Urbana, Illinois 61801 - ;;; Code: (require 'calendar) @@ -266,12 +260,20 @@ Returns a list (YEAR START END), where START and END are expressions that when evaluated return the start and end dates, respectively. This function first attempts to use pre-calculated data from `calendar-dst-transition-cache', otherwise it calls -`calendar-dst-find-data' (and adds the results to the cache)." +`calendar-dst-find-data' (and adds the results to the cache). +If dates in YEAR cannot be handled by `encode-time' (e.g. if they +are too large to be represented as a lisp integer), then rather +than an error this function returns the result appropriate for +the current year." (let ((e (assoc year calendar-dst-transition-cache)) f) (or e (progn - (setq e (calendar-dst-find-data (encode-time 1 0 0 1 1 year)) + (setq e (calendar-dst-find-data + (condition-case nil + (encode-time 1 0 0 1 1 year) + (error + (encode-time 1 0 0 1 1 (nth 5 (decode-time)))))) f (nth 4 e) e (list year f (nth 5 e)) calendar-dst-transition-cache diff --git a/lisp/calendar/cal-french.el b/lisp/calendar/cal-french.el index 99af7042472..439dbd34632 100644 --- a/lisp/calendar/cal-french.el +++ b/lisp/calendar/cal-french.el @@ -37,12 +37,6 @@ ;; E. M. Reingold, N. Dershowitz, and S. M. Clamen, Software--Practice and ;; Experience, Volume 23, Number 4 (April, 1993), pages 383-404. -;; Comments, corrections, and improvements should be sent to -;; Edward M. Reingold Department of Computer Science -;; (217) 333-6733 University of Illinois at Urbana-Champaign -;; reingold@cs.uiuc.edu 1304 West Springfield Avenue -;; Urbana, Illinois 61801 - ;;; Code: (defvar date) diff --git a/lisp/calendar/cal-hebrew.el b/lisp/calendar/cal-hebrew.el index a61bea8eacf..9f32d9df471 100644 --- a/lisp/calendar/cal-hebrew.el +++ b/lisp/calendar/cal-hebrew.el @@ -35,12 +35,6 @@ ;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold ;; and Nachum Dershowitz, Cambridge University Press (2001). -;; Comments, corrections, and improvements should be sent to -;; Edward M. Reingold Department of Computer Science -;; (217) 333-6733 University of Illinois at Urbana-Champaign -;; reingold@cs.uiuc.edu 1304 West Springfield Avenue -;; Urbana, Illinois 61801 - ;;; Code: (defvar date) diff --git a/lisp/calendar/cal-islam.el b/lisp/calendar/cal-islam.el index 28faed4d397..57c0f9de65e 100644 --- a/lisp/calendar/cal-islam.el +++ b/lisp/calendar/cal-islam.el @@ -34,12 +34,6 @@ ;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold ;; and Nachum Dershowitz, Cambridge University Press (2001). -;; Comments, corrections, and improvements should be sent to -;; Edward M. Reingold Department of Computer Science -;; (217) 333-6733 University of Illinois at Urbana-Champaign -;; reingold@cs.uiuc.edu 1304 West Springfield Avenue -;; Urbana, Illinois 61801 - ;;; Code: (defvar date) diff --git a/lisp/calendar/cal-iso.el b/lisp/calendar/cal-iso.el index 93b39cd4d15..052087e2558 100644 --- a/lisp/calendar/cal-iso.el +++ b/lisp/calendar/cal-iso.el @@ -34,12 +34,6 @@ ;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold ;; and Nachum Dershowitz, Cambridge University Press (2001). -;; Comments, corrections, and improvements should be sent to -;; Edward M. Reingold Department of Computer Science -;; (217) 333-6733 University of Illinois at Urbana-Champaign -;; reingold@cs.uiuc.edu 1304 West Springfield Avenue -;; Urbana, Illinois 61801 - ;;; Code: (defvar date) diff --git a/lisp/calendar/cal-julian.el b/lisp/calendar/cal-julian.el index 768e57bbab5..ff6a3f72e1b 100644 --- a/lisp/calendar/cal-julian.el +++ b/lisp/calendar/cal-julian.el @@ -34,12 +34,6 @@ ;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold ;; and Nachum Dershowitz, Cambridge University Press (2001). -;; Comments, corrections, and improvements should be sent to -;; Edward M. Reingold Department of Computer Science -;; (217) 333-6733 University of Illinois at Urbana-Champaign -;; reingold@cs.uiuc.edu 1304 West Springfield Avenue -;; Urbana, Illinois 61801 - ;;; Code: (defvar date) diff --git a/lisp/calendar/cal-mayan.el b/lisp/calendar/cal-mayan.el index 20703cb85b6..2cb6d31022e 100644 --- a/lisp/calendar/cal-mayan.el +++ b/lisp/calendar/cal-mayan.el @@ -43,8 +43,6 @@ ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue ;; Urbana, Illinois 61801 -;; Comments, improvements, and bug reports should be sent to Reingold. - ;; Technical details of the Mayan calendrical calculations can be found in ;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold ;; and Nachum Dershowitz, Cambridge University Press (2001), and in diff --git a/lisp/calendar/cal-menu.el b/lisp/calendar/cal-menu.el index 1320f778cc6..25929976dbd 100644 --- a/lisp/calendar/cal-menu.el +++ b/lisp/calendar/cal-menu.el @@ -31,12 +31,6 @@ ;; This collection of functions implements menu bar and popup menu support for ;; calendar.el. -;; Comments, corrections, and improvements should be sent to -;; Edward M. Reingold Department of Computer Science -;; (217) 333-6733 University of Illinois at Urbana-Champaign -;; reingold@cs.uiuc.edu 1304 West Springfield Avenue -;; Urbana, Illinois 61801 - ;;; Code: (defvar displayed-month) diff --git a/lisp/calendar/cal-move.el b/lisp/calendar/cal-move.el index b12289c7456..3a08b98bf00 100644 --- a/lisp/calendar/cal-move.el +++ b/lisp/calendar/cal-move.el @@ -30,12 +30,6 @@ ;; This collection of functions implements movement in the calendar for ;; calendar.el. -;; Comments, corrections, and improvements should be sent to -;; Edward M. Reingold Department of Computer Science -;; (217) 333-6733 University of Illinois at Urbana-Champaign -;; reingold@cs.uiuc.edu 1304 West Springfield Avenue -;; Urbana, Illinois 61801 - ;;; Code: (defvar displayed-month) diff --git a/lisp/calendar/cal-persia.el b/lisp/calendar/cal-persia.el index 6055de121af..a37f9c1f27e 100644 --- a/lisp/calendar/cal-persia.el +++ b/lisp/calendar/cal-persia.el @@ -30,16 +30,6 @@ ;; This collection of functions implements the features of calendar.el and ;; diary.el that deal with the Persian calendar. -;; Technical details of all the calendrical calculations can be found in -;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold -;; and Nachum Dershowitz, Cambridge University Press (2001). - -;; Comments, corrections, and improvements should be sent to -;; Edward M. Reingold Department of Computer Science -;; (217) 333-6733 University of Illinois at Urbana-Champaign -;; reingold@cs.uiuc.edu 1304 West Springfield Avenue -;; Urbana, Illinois 61801 - ;;; Code: (defvar date) diff --git a/lisp/calendar/cal-x.el b/lisp/calendar/cal-x.el index b7f1748ff34..5f2c89e82c5 100644 --- a/lisp/calendar/cal-x.el +++ b/lisp/calendar/cal-x.el @@ -31,12 +31,6 @@ ;; This collection of functions implements dedicated frames in X for ;; calendar.el. -;; Comments, corrections, and improvements should be sent to -;; Edward M. Reingold Department of Computer Science -;; (217) 333-6733 University of Illinois at Urbana-Champaign -;; reingold@cs.uiuc.edu 1304 West Springfield Avenue -;; Urbana, Illinois 61801 - ;;; Code: (require 'calendar) diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 78f0ad115ec..03f9a95fe37 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -90,12 +90,6 @@ ;; reingold@cs.uiuc.edu with the SUBJECT "send-paper-cal" (no quotes) and ;; the message BODY containing your mailing address (snail). -;; Comments, corrections, and improvements should be sent to -;; Edward M. Reingold Department of Computer Science -;; (217) 333-6733 University of Illinois at Urbana-Champaign -;; reingold@cs.uiuc.edu 1304 West Springfield Avenue -;; Urbana, Illinois 61801 - ;;; Code: (defvar displayed-month) diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 2adec8750c3..ee93b60eb98 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -29,12 +29,6 @@ ;; This collection of functions implements the diary features as described ;; in calendar.el. -;; Comments, corrections, and improvements should be sent to -;; Edward M. Reingold Department of Computer Science -;; (217) 333-6733 University of Illinois at Urbana-Champaign -;; reingold@cs.uiuc.edu 1304 West Springfield Avenue -;; Urbana, Illinois 61801 - ;;; Code: (require 'calendar) @@ -282,6 +276,7 @@ The format of the header is specified by `diary-header-line-format'." :group 'diary :type 'boolean :initialize 'custom-initialize-default + ;; FIXME overkill. :set 'diary-set-maybe-redraw :version "22.1") @@ -298,6 +293,9 @@ before edit/copy" Only used if `diary-header-line-flag' is non-nil." :group 'diary :type 'sexp + :initialize 'custom-initialize-default + ;; FIXME overkill. + :set 'diary-set-maybe-redraw :version "22.1") (defvar diary-saved-point) ; internal @@ -440,10 +438,17 @@ If LIST-ONLY is non-nil don't modify or display the buffer, only return a list." (or (verify-visited-file-modtime diary-buffer) (revert-buffer t t)))) ;; Setup things like the header-line-format and invisibility-spec. - ;; This used to only run if the major-mode was default-major-mode, - ;; but that meant eg changes to header-line-format did not - ;; take effect from one diary invocation to the next. - (diary-mode) + (if (eq major-mode default-major-mode) + (diary-mode) + ;; This kludge is to make customizations to + ;; diary-header-line-flag after diary has been displayed + ;; take effect. Unconditionally calling (diary-mode) + ;; clobbers file local variables. + ;; http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-03/msg00363.html + ;; http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-04/msg00404.html + (if (eq major-mode 'diary-mode) + (setq header-line-format (and diary-header-line-flag + diary-header-line-format)))) ;; d-s-p is passed to the diary display function. (let ((diary-saved-point (point))) (save-excursion diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el index 6f53a47221a..fc6e6315916 100644 --- a/lisp/calendar/holidays.el +++ b/lisp/calendar/holidays.el @@ -45,12 +45,6 @@ ;; reingold@cs.uiuc.edu with the SUBJECT "send-paper-cal" (no quotes) and ;; the message BODY containing your mailing address (snail). -;; Comments, corrections, and improvements should be sent to -;; Edward M. Reingold Department of Computer Science -;; (217) 333-6733 University of Illinois at Urbana-Champaign -;; reingold@cs.uiuc.edu 1304 West Springfield Avenue -;; Urbana, Illinois 61801 - ;;; Code: (defvar displayed-month) diff --git a/lisp/calendar/lunar.el b/lisp/calendar/lunar.el index 33da7cef8e0..8aa062d69c3 100644 --- a/lisp/calendar/lunar.el +++ b/lisp/calendar/lunar.el @@ -43,12 +43,6 @@ ;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold ;; and Nachum Dershowitz, Cambridge University Press (2001). -;; Comments, corrections, and improvements should be sent to -;; Edward M. Reingold Department of Computer Science -;; (217) 333-6733 University of Illinois at Urbana-Champaign -;; reingold@cs.uiuc.edu 1304 West Springfield Avenue -;; Urbana, Illinois 61801 - ;;; Code: (defvar date) diff --git a/lisp/calendar/parse-time.el b/lisp/calendar/parse-time.el index 4a786da7726..0913bc92160 100644 --- a/lisp/calendar/parse-time.el +++ b/lisp/calendar/parse-time.el @@ -66,7 +66,8 @@ (aref parse-time-digits char)) (defsubst parse-time-string-chars (char) - (aref parse-time-syntax char)) + (and (< char (length parse-time-syntax)) + (aref parse-time-syntax char))) (put 'parse-error 'error-conditions '(parse-error error)) (put 'parse-error 'error-message "Parsing error") diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el index c4a8352a8d8..4281c0e1307 100644 --- a/lisp/calendar/solar.el +++ b/lisp/calendar/solar.el @@ -53,12 +53,6 @@ ;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold ;; and Nachum Dershowitz, Cambridge University Press (2001). -;; Comments, corrections, and improvements should be sent to -;; Edward M. Reingold Department of Computer Science -;; (217) 333-6733 University of Illinois at Urbana-Champaign -;; reingold@cs.uiuc.edu 1304 West Springfield Avenue -;; Urbana, Illinois 61801 - ;;; Code: (defvar date) diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index 9449c84cb2a..fc222c2d839 100644 --- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el @@ -205,11 +205,11 @@ ;; by the binary insertion algorithm. However, you may not ;; really have a need for such accurate priorities amongst your ;; TODO items. If you now think about the binary insertion -;; halfing the size of the window each time, then the threshhold +;; halving the size of the window each time, then the threshold ;; is the window size at which it will stop. If you set the -;; threshhold to zero, the upper and lower bound will coincide at +;; threshold to zero, the upper and lower bound will coincide at ;; the end of the loop and you will insert your item just before -;; that point. If you set the threshhold to, e.g. 8, it will stop +;; that point. If you set the threshold to, e.g. 8, it will stop ;; as soon as the window size drops below that amount and will ;; insert the item in the approximate centre of that window. I ;; got the idea for this feature after reading a very helpful @@ -231,7 +231,7 @@ ;; an event (unless marked by &) ;; o The optional COUNT variable of todo-forward-item should be ;; applied to the other functions performing similar tasks -;; o Modularization could be done for repeaded elements of +;; o Modularization could be done for repeated elements of ;; the code, like the completing-read lines of code. ;; o license / version function ;; o export to diary file @@ -241,7 +241,7 @@ ;; outline mode) ;; o rewrite complete package to store data as lisp objects ;; and have display modes for display, for diary export, -;; etc. (Richard Stallman pointed out this is a bad idea) +;; etc. (Richard Stallman pointed out this is a bad idea) ;; o so base todo-mode.el on generic-mode.el instead ;; ;; History and Gossip @@ -254,7 +254,7 @@ ;; things to my parents' address! ;; ;; Oliver Seidel -;; (Lessingstr. 8, 65760 Eschborn, Federal Republic of Germany) +;; (Lessingstr. 8, 65760 Eschborn, Federal Republic of Germany) ;;; Code: @@ -280,7 +280,7 @@ in your diary file to include your todo list file as part of your diary. With the default value \"*/*\" the diary displays each entry every day and it may also be marked on every day of the calendar. Using \"&%%(equal (calendar-current-date) date)\" instead will only -show and mark todo entreis for today, but may slow down processing of +show and mark todo entries for today, but may slow down processing of the diary file somewhat." :type 'string :group 'todo) @@ -306,11 +306,11 @@ the diary file somewhat." If you have 8 items in your TODO list, then you may get asked 4 questions by the binary insertion algorithm. However, you may not really have a need for such accurate priorities amongst your TODO -items. If you now think about the binary insertion halfing the size -of the window each time, then the threshhold is the window size at -which it will stop. If you set the threshhold to zero, the upper and +items. If you now think about the binary insertion halving the size +of the window each time, then the threshold is the window size at +which it will stop. If you set the threshold to zero, the upper and lower bound will coincide at the end of the loop and you will insert -your item just before that point. If you set the threshhold to, +your item just before that point. If you set the threshold to, e.g. 8, it will stop as soon as the window size drops below that amount and will insert the item in the approximate center of that window." diff --git a/lisp/complete.el b/lisp/complete.el index 1cdff0d9acd..b1bb36f9dfa 100644 --- a/lisp/complete.el +++ b/lisp/complete.el @@ -190,6 +190,14 @@ If nil, means use the colon-separated path in the variable $INCPATH instead." (defvar PC-do-completion-end nil "Internal variable used by `PC-do-completion'.") +(make-variable-buffer-local 'PC-do-completion-end) + +(defvar PC-goto-end nil + "Internal variable set in `PC-do-completion', used in +`choose-completion-string-functions'.") + +(make-variable-buffer-local 'PC-goto-end) + ;;;###autoload (define-minor-mode partial-completion-mode "Toggle Partial Completion mode. @@ -242,11 +250,16 @@ second TAB brings up the `*Completions*' buffer." (if partial-completion-mode 'add-hook 'remove-hook) 'choose-completion-string-functions (lambda (choice buffer mini-p base-size) - (if mini-p (goto-char (point-max)) + ;; When completing M-: (lisp- ) with point before the ), it is + ;; not appropriate to go to point-max (unlike the filename case). + (if (and (not PC-goto-end) + mini-p) + (goto-char (point-max)) ;; Need a similar hack for the non-minibuffer-case -- gm. (when PC-do-completion-end (goto-char PC-do-completion-end) (setq PC-do-completion-end nil))) + (setq PC-goto-end nil) nil)) ;; Build the env-completion and mapping table. (when (and partial-completion-mode (null PC-env-vars-alist)) @@ -417,7 +430,13 @@ of `minibuffer-completion-table' and the minibuffer contents.") (let ((result (try-completion string alist predicate))) (if (eq result t) string result))) -(defun PC-do-completion (&optional mode beg end) +;; TODO document MODE magic... +(defun PC-do-completion (&optional mode beg end goto-end) + "Internal function to do the work of partial completion. +Text to be completed lies between BEG and END. Normally when +replacing text in the minibuffer, this function replaces up to +point-max (as is appropriate for completing a file name). If +GOTO-END is non-nil, however, it instead replaces up to END." (or beg (setq beg (minibuffer-prompt-end))) (or end (setq end (point-max))) (let* ((table minibuffer-completion-table) @@ -753,6 +772,8 @@ of `minibuffer-completion-table' and the minibuffer contents.") (let ((prompt-end (minibuffer-prompt-end))) (with-output-to-temp-buffer "*Completions*" (display-completion-list (sort helpposs 'string-lessp)) + (setq PC-do-completion-end end + PC-goto-end goto-end) (with-current-buffer standard-output ;; Record which part of the buffer we are completing ;; so that choosing a completion from the list @@ -771,8 +792,7 @@ of `minibuffer-completion-table' and the minibuffer contents.") ;; plays around with point. (setq completion-base-size (if dirname dirlength - (- beg prompt-end)) - PC-do-completion-end end)))) + (- beg prompt-end)))))) (PC-temp-minibuffer-message " [Next char not unique]")) nil))))) @@ -886,11 +906,11 @@ or properties are considered." ;; Alternatively alternatively, maybe end should be computed in ;; the same way as beg. That would change the behaviour though. (if (equal last-command 'PC-lisp-complete-symbol) - (PC-do-completion nil beg PC-lisp-complete-end) + (PC-do-completion nil beg PC-lisp-complete-end t) (if PC-lisp-complete-end (move-marker PC-lisp-complete-end end) (setq PC-lisp-complete-end (copy-marker end t))) - (PC-do-completion nil beg end)))) + (PC-do-completion nil beg end t)))) (defun PC-complete-as-file-name () "Perform completion on file names preceding point. diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index d8fdf966374..4dae3bab018 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -422,7 +422,7 @@ :group 'development) (defgroup minibuffer nil - "Controling the behavior of the minibuffer." + "Controlling the behavior of the minibuffer." :link '(custom-manual "(emacs)Minibuffer") :group 'environment) @@ -443,7 +443,7 @@ :group 'environment) (defgroup auto-save nil - "Preventing accidential loss of data." + "Preventing accidental loss of data." :group 'files) (defgroup processes-basics nil diff --git a/lisp/desktop.el b/lisp/desktop.el index 8d7776be36c..31de08bdc26 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -45,9 +45,9 @@ ;; "Saving Emacs Sessions" in the GNU Emacs Manual. ;; When the desktop module is loaded, the function `desktop-kill' is -;; added to the `kill-emacs-hook'. This function is responsible for +;; added to the `kill-emacs-hook'. This function is responsible for ;; saving the desktop when Emacs is killed. Furthermore an anonymous -;; function is added to the `after-init-hook'. This function is +;; function is added to the `after-init-hook'. This function is ;; responsible for loading the desktop when Emacs is started. ;; Special handling. @@ -55,12 +55,12 @@ ;; Variables `desktop-buffer-mode-handlers' and `desktop-minor-mode-handlers' ;; are supplied to handle special major and minor modes respectively. ;; `desktop-buffer-mode-handlers' is an alist of major mode specific functions -;; to restore a desktop buffer. Elements must have the form +;; to restore a desktop buffer. Elements must have the form ;; ;; (MAJOR-MODE . RESTORE-BUFFER-FUNCTION). ;; ;; Functions listed are called by `desktop-create-buffer' when `desktop-read' -;; evaluates the desktop file. Buffers with a major mode not specified here, +;; evaluates the desktop file. Buffers with a major mode not specified here, ;; are restored by the default handler `desktop-restore-file-buffer'. ;; `desktop-minor-mode-handlers' is an alist of functions to restore ;; non-standard minor modes. Elements must have the form @@ -85,7 +85,7 @@ ;; '(bar-mode . bar-desktop-restore)) ;; in the module itself, and make shure that the mode function is -;; autoloaded. See the docstrings of `desktop-buffer-mode-handlers' and +;; autoloaded. See the docstrings of `desktop-buffer-mode-handlers' and ;; `desktop-minor-mode-handlers' for more info. ;; Minor modes. @@ -100,7 +100,7 @@ ;; The variables `desktop-minor-mode-table' and `desktop-minor-mode-handlers' ;; are used to handle non-conventional minor modes. `desktop-save' uses ;; `desktop-minor-mode-table' to map minor mode variables to minor mode -;; functions before writing `desktop-minor-modes'. If a minor mode has a +;; functions before writing `desktop-minor-modes'. If a minor mode has a ;; variable name that is different form its function name, an entry ;; (NAME RESTORE-FUNCTION) @@ -619,8 +619,7 @@ QUOTE may be `may' (value may be quoted), (setq newlist (cons q.txt newlist))) (setq p (cdr p))) (if p - (let ((last (desktop-internal-v2s p)) - (el (car newlist))) + (let ((last (desktop-internal-v2s p))) (or anynil (setq anynil (null (car last)))) (or anynil (setq newlist (cons '(must . ".") newlist))) @@ -782,7 +781,8 @@ See also `desktop-base-file-name'." ";; Desktop file format version " desktop-file-version "\n" ";; Emacs version " emacs-version "\n\n" ";; Global section:\n") - (mapcar (function desktop-outvar) desktop-globals-to-save) + (dolist (varspec desktop-globals-to-save) + (desktop-outvar varspec)) (if (memq 'kill-ring desktop-globals-to-save) (insert "(setq kill-ring-yank-pointer (nthcdr " @@ -790,22 +790,20 @@ See also `desktop-base-file-name'." " kill-ring))\n")) (insert "\n;; Buffer section -- buffers listed in same order as in buffer list:\n") - (mapcar #'(lambda (l) - (when (apply 'desktop-save-buffer-p l) - (insert "(" - (if (or (not (integerp eager)) - (unless (zerop eager) - (setq eager (1- eager)) - t)) - "desktop-create-buffer" - "desktop-append-buffer-args") - " " - desktop-file-version) - (mapcar #'(lambda (e) - (insert "\n " (desktop-value-to-string e))) - l) - (insert ")\n\n"))) - info) + (dolist (l info) + (when (apply 'desktop-save-buffer-p l) + (insert "(" + (if (or (not (integerp eager)) + (unless (zerop eager) + (setq eager (1- eager)) + t)) + "desktop-create-buffer" + "desktop-append-buffer-args") + " " + desktop-file-version) + (dolist (e l) + (insert "\n " (desktop-value-to-string e))) + (insert ")\n\n"))) (setq default-directory dirname) (let ((coding-system-for-write 'utf-8-emacs)) (write-region (point-min) (point-max) filename nil 'nomessage))))) @@ -941,14 +939,13 @@ directory DIRNAME." (desktop-clear) (desktop-read desktop-dirname)) +(defvar desktop-buffer-major-mode) +(defvar desktop-buffer-locals) ;; ---------------------------------------------------------------------------- (defun desktop-restore-file-buffer (desktop-buffer-file-name desktop-buffer-name desktop-buffer-misc) "Restore a file buffer." - (eval-when-compile ; Just to silence the byte compiler - (defvar desktop-buffer-major-mode) - (defvar desktop-buffer-locals)) (if desktop-buffer-file-name (if (or (file-exists-p desktop-buffer-file-name) (let ((msg (format "Desktop: File \"%s\" no longer exists." @@ -985,8 +982,12 @@ directory DIRNAME." ;; called from Desktop file only. ;; Just to silence the byte compiler. -(eval-when-compile - (defvar desktop-first-buffer)) ; Dynamically bound in `desktop-read' + +(defvar desktop-first-buffer) ; Dynamically bound in `desktop-read' + +;; Bound locally in `desktop-read'. +(defvar desktop-buffer-ok-count) +(defvar desktop-buffer-fail-count) (defun desktop-create-buffer (desktop-file-version @@ -1000,10 +1001,6 @@ directory DIRNAME." desktop-buffer-misc &optional desktop-buffer-locals) - ;; Just to silence the byte compiler. Bound locally in `desktop-read'. - (eval-when-compile - (defvar desktop-buffer-ok-count) - (defvar desktop-buffer-fail-count)) ;; To make desktop files with relative file names possible, we cannot ;; allow `default-directory' to change. Therefore we save current buffer. (save-current-buffer @@ -1045,21 +1042,22 @@ directory DIRNAME." ((equal '(nil) desktop-buffer-minor-modes) ; backwards compatible (auto-fill-mode 0)) (t - (mapcar #'(lambda (minor-mode) - ;; Give minor mode module a chance to add a handler. - (desktop-load-file minor-mode) - (let ((handler (cdr (assq minor-mode desktop-minor-mode-handlers)))) - (if handler - (funcall handler desktop-buffer-locals) - (when (functionp minor-mode) - (funcall minor-mode 1))))) - desktop-buffer-minor-modes))) - ;; Even though point and mark are non-nil when written by `desktop-save', - ;; they may be modified by handlers wanting to set point or mark themselves. + (dolist (minor-mode desktop-buffer-minor-modes) + ;; Give minor mode module a chance to add a handler. + (desktop-load-file minor-mode) + (let ((handler (cdr (assq minor-mode desktop-minor-mode-handlers)))) + (if handler + (funcall handler desktop-buffer-locals) + (when (functionp minor-mode) + (funcall minor-mode 1))))))) + ;; Even though point and mark are non-nil when written by + ;; `desktop-save', they may be modified by handlers wanting to set + ;; point or mark themselves. (when desktop-buffer-point (goto-char (condition-case err - ;; Evaluate point. Thus point can be something like '(search-forward ... + ;; Evaluate point. Thus point can be something like + ;; '(search-forward ... (eval desktop-buffer-point) (error (message "%s" (error-message-string err)) 1)))) (when desktop-buffer-mark @@ -1167,7 +1165,7 @@ If there are no buffers left to create, kill the timer." ;; functions are processed after `after-init-hook'. (add-hook 'after-init-hook - '(lambda () + (lambda () (let ((key "--no-desktop")) (when (member key command-line-args) (setq command-line-args (delete key command-line-args)) @@ -1176,5 +1174,5 @@ If there are no buffers left to create, kill the timer." (provide 'desktop) -;;; arch-tag: 221907c3-1771-4fd3-9c2e-c6f700c6ede9 +;; arch-tag: 221907c3-1771-4fd3-9c2e-c6f700c6ede9 ;;; desktop.el ends here diff --git a/lisp/dired-x.el b/lisp/dired-x.el index f5e6250b475..eecb1dbb709 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el @@ -790,21 +790,18 @@ nil." (revert-buffer))) ;; A zero-arg version of dired-virtual. -;; You need my modified version of set-auto-mode for the -;; `buffer-contents-mode-alist'. -;; Or you use infer-mode.el and infer-mode-alist, same syntax. (defun dired-virtual-mode () "Put current buffer into Virtual Dired mode (see `dired-virtual'). -Useful on `buffer-contents-mode-alist' (which see) with the regexp +Useful on `magic-mode-alist' with the regexp - \"^ \\(/[^ /]+\\)/?+:$\" + \"^ \\\\(/[^ /]+\\\\)+/?:$\" to put saved dired buffers automatically into Virtual Dired mode. -Also useful for `auto-mode-alist' (which see) like this: +Also useful for `auto-mode-alist' like this: - \(setq auto-mode-alist (cons '(\"[^/]\\.dired\\'\" . dired-virtual-mode) - auto-mode-alist)\)" + (add-to-list 'auto-mode-alist + '(\"[^/]\\\\.dired\\\\'\" . dired-virtual-mode))" (interactive) (dired-virtual (dired-virtual-guess-dir))) diff --git a/lisp/dired.el b/lisp/dired.el index 7734a9bd69f..c618eec5159 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1251,19 +1251,19 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." (define-key map "\177" 'dired-unmark-backward) (define-key map [remap undo] 'dired-undo) (define-key map [remap advertised-undo] 'dired-undo) - ;; thumbnail manipulation (tumme) - (define-key map "\C-td" 'tumme-display-thumbs) - (define-key map "\C-tt" 'tumme-tag-files) - (define-key map "\C-tr" 'tumme-delete-tag) - (define-key map "\C-tj" 'tumme-jump-thumbnail-buffer) - (define-key map "\C-ti" 'tumme-dired-display-image) - (define-key map "\C-tx" 'tumme-dired-display-external) - (define-key map "\C-ta" 'tumme-display-thumbs-append) - (define-key map "\C-t." 'tumme-display-thumb) - (define-key map "\C-tc" 'tumme-dired-comment-files) - (define-key map "\C-tf" 'tumme-mark-tagged-files) - (define-key map "\C-t\C-t" 'tumme-dired-insert-marked-thumbs) - (define-key map "\C-te" 'tumme-dired-edit-comment-and-tags) + ;; thumbnail manipulation (image-dired) + (define-key map "\C-td" 'image-dired-display-thumbs) + (define-key map "\C-tt" 'image-dired-tag-files) + (define-key map "\C-tr" 'image-dired-delete-tag) + (define-key map "\C-tj" 'image-dired-jump-thumbnail-buffer) + (define-key map "\C-ti" 'image-dired-dired-display-image) + (define-key map "\C-tx" 'image-dired-dired-display-external) + (define-key map "\C-ta" 'image-dired-display-thumbs-append) + (define-key map "\C-t." 'image-dired-display-thumb) + (define-key map "\C-tc" 'image-dired-dired-comment-files) + (define-key map "\C-tf" 'image-dired-mark-tagged-files) + (define-key map "\C-t\C-t" 'image-dired-dired-insert-marked-thumbs) + (define-key map "\C-te" 'image-dired-dired-edit-comment-and-tags) ;; Make menu bar items. @@ -1310,12 +1310,12 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." (cons "Immediate" (make-sparse-keymap "Immediate"))) (define-key map - [menu-bar immediate tumme-dired-display-external] - '(menu-item "Display Image Externally" tumme-dired-display-external + [menu-bar immediate image-dired-dired-display-external] + '(menu-item "Display Image Externally" image-dired-dired-display-external :help "Display image in external viewer")) (define-key map - [menu-bar immediate tumme-dired-display-image] - '(menu-item "Display Image" tumme-dired-display-image + [menu-bar immediate image-dired-dired-display-image] + '(menu-item "Display Image" image-dired-dired-display-image :help "Display sized image in a separate window")) (define-key map [menu-bar immediate dashes-4] @@ -1358,8 +1358,8 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." (cons "Regexp" (make-sparse-keymap "Regexp"))) (define-key map - [menu-bar regexp tumme-mark-tagged-files] - '(menu-item "Mark From Image Tag..." tumme-mark-tagged-files + [menu-bar regexp image-dired-mark-tagged-files] + '(menu-item "Mark From Image Tag..." image-dired-mark-tagged-files :help "Mark files whose image tags matches regexp")) (define-key map [menu-bar regexp dashes-1] @@ -1456,21 +1456,21 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." '("--")) (define-key map - [menu-bar operate tumme-delete-tag] - '(menu-item "Delete Image Tag..." tumme-delete-tag + [menu-bar operate image-dired-delete-tag] + '(menu-item "Delete Image Tag..." image-dired-delete-tag :help "Delete image tag from current or marked files")) (define-key map - [menu-bar operate tumme-tag-files] - '(menu-item "Add Image Tags..." tumme-tag-files + [menu-bar operate image-dired-tag-files] + '(menu-item "Add Image Tags..." image-dired-tag-files :help "Add image tags to current or marked files")) (define-key map - [menu-bar operate tumme-dired-comment-files] - '(menu-item "Add Image Comment..." tumme-dired-comment-files + [menu-bar operate image-dired-dired-comment-files] + '(menu-item "Add Image Comment..." image-dired-dired-comment-files :help "Add image comment to current or marked files")) (define-key map - [menu-bar operate tumme-display-thumbs] - '(menu-item "Display Thumbnails" tumme-display-thumbs - :help "Display thumbnails for current or marked image files")) + [menu-bar operate image-dired-display-thumbs] + '(menu-item "Display Image-Dired" image-dired-display-thumbs + :help "Display image-dired for current or marked image files")) (define-key map [menu-bar operate dashes-3] '("--")) diff --git a/lisp/dnd.el b/lisp/dnd.el index 972354f3908..56a619490aa 100644 --- a/lisp/dnd.el +++ b/lisp/dnd.el @@ -146,7 +146,7 @@ Return nil if URI is not a local file." (substring uri (match-end 0)))))) (when (and f must-exist) (setq f (replace-regexp-in-string - "%[A-Z0-9][A-Z0-9]" + "%[A-Fa-f0-9][A-Fa-f0-9]" (lambda (arg) (let ((str (make-string 1 0))) (aset str 0 (string-to-number (substring arg 1) 16)) diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index d0589b3eb00..be135850d56 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -557,8 +557,20 @@ ;; Otherwise, no args can be considered to be for-effect, ;; even if the called function is for-effect, because we ;; don't know anything about that function. - (cons fn (mapcar 'byte-optimize-form (cdr form))))))) - + (let ((args (mapcar #'byte-optimize-form (cdr form)))) + (if (and (get fn 'pure) + (byte-optimize-all-constp args)) + (list 'quote (apply fn (mapcar #'eval args))) + (cons fn args))))))) + +(defun byte-optimize-all-constp (list) + "Non-nil iff all elements of LIST satisfy `byte-compile-constp'." + (let ((constant t)) + (while (and list constant) + (unless (byte-compile-constp (car list)) + (setq constant nil)) + (setq list (cdr list))) + constant)) (defun byte-optimize-form (form &optional for-effect) "The source-level pass of the optimizer." @@ -1117,26 +1129,6 @@ (byte-optimize-predicate form)) form)) -;; Avoid having to write forward-... with a negative arg for speed. -;; Fixme: don't be limited to constant args. -(put 'backward-char 'byte-optimizer 'byte-optimize-backward-char) -(defun byte-optimize-backward-char (form) - (cond ((and (= 2 (safe-length form)) - (numberp (nth 1 form))) - (list 'forward-char (eval (- (nth 1 form))))) - ((= 1 (safe-length form)) - '(forward-char -1)) - (t form))) - -(put 'backward-word 'byte-optimizer 'byte-optimize-backward-word) -(defun byte-optimize-backward-word (form) - (cond ((and (= 2 (safe-length form)) - (numberp (nth 1 form))) - (list 'forward-word (eval (- (nth 1 form))))) - ((= 1 (safe-length form)) - '(forward-word -1)) - (t form))) - ;; Fixme: delete-char -> delete-region (byte-coded) ;; optimize string-as-unibyte, string-as-multibyte, string-make-unibyte, ;; string-make-multibyte for constant args. @@ -1266,6 +1258,18 @@ (setq side-effect-and-error-free-fns (cdr side-effect-and-error-free-fns))) nil) + +;; pure functions are side-effect free functions whose values depend +;; only on their arguments. For these functions, calls with constant +;; arguments can be evaluated at compile time. This may shift run time +;; errors to compile time. + +(let ((pure-fns + '(concat symbol-name regexp-opt regexp-quote string-to-syntax))) + (while pure-fns + (put (car pure-fns) 'pure t) + (setq pure-fns (cdr pure-fns))) + nil) (defun byte-compile-splice-in-already-compiled-code (form) ;; form is (byte-code "..." [...] n) diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 2a32ff9a016..8606f1ae2b8 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -3149,6 +3149,8 @@ That command is designed for interactive use only" fn)) ;; more complicated compiler macros (byte-defop-compiler char-before) +(byte-defop-compiler backward-char) +(byte-defop-compiler backward-word) (byte-defop-compiler list) (byte-defop-compiler concat) (byte-defop-compiler fset) @@ -3162,10 +3164,31 @@ That command is designed for interactive use only" fn)) (defun byte-compile-char-before (form) (cond ((= 2 (length form)) - (byte-compile-form `(char-after (1- ,(nth 1 form))))) - ((= 1 (length form)) - (byte-compile-form '(char-after (1- (point))))) - (t (byte-compile-subr-wrong-args form "0-1")))) + (byte-compile-form (list 'char-after (if (numberp (nth 1 form)) + (1- (nth 1 form)) + `(1- ,(nth 1 form)))))) + ((= 1 (length form)) + (byte-compile-form '(char-after (1- (point))))) + (t (byte-compile-subr-wrong-args form "0-1")))) + +;; backward-... ==> forward-... with negated argument. +(defun byte-compile-backward-char (form) + (cond ((= 2 (length form)) + (byte-compile-form (list 'forward-char (if (numberp (nth 1 form)) + (- (nth 1 form)) + `(- ,(nth 1 form)))))) + ((= 1 (length form)) + (byte-compile-form '(forward-char -1))) + (t (byte-compile-subr-wrong-args form "0-1")))) + +(defun byte-compile-backward-word (form) + (cond ((= 2 (length form)) + (byte-compile-form (list 'forward-word (if (numberp (nth 1 form)) + (- (nth 1 form)) + `(- ,(nth 1 form)))))) + ((= 1 (length form)) + (byte-compile-form '(forward-word -1))) + (t (byte-compile-subr-wrong-args form "0-1")))) (defun byte-compile-list (form) (let ((count (length (cdr form)))) diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 8b8dc6ba09d..2ce4ca8cf38 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -327,11 +327,12 @@ call another major mode in their body." (make-variable-buffer-local ',MODE-major-mode) ;; The actual global minor-mode (define-minor-mode ,global-mode - ,(format "Toggle %s in every buffer. + ,(format "Toggle %s in every possible buffer. With prefix ARG, turn %s on if and only if ARG is positive. -%s is actually not turned on in every buffer but only in those -in which `%s' turns it on." - pretty-name pretty-global-name pretty-name turn-on) +%s is enabled in all buffers where `%s' would do it. +See `%s' for more information on %s." + pretty-name pretty-global-name pretty-name turn-on + mode pretty-name) :global t ,@group ,@(nreverse extra-keywords) ;; Setup hook to handle future mode changes and new buffers. diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 151bbd2bd9e..9ae33599f09 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -364,31 +364,39 @@ Return the result of the last expression in BODY." (defun edebug-pop-to-buffer (buffer &optional window) ;; Like pop-to-buffer, but select window where BUFFER was last shown. - ;; Select WINDOW if it provided and it still exists. Otherwise, + ;; Select WINDOW if it is provided and still exists. Otherwise, ;; if buffer is currently shown in several windows, choose one. ;; Otherwise, find a new window, possibly splitting one. - (setq window (if (and (windowp window) (edebug-window-live-p window) - (eq (window-buffer window) buffer)) - window - (if (eq (window-buffer (selected-window)) buffer) - (selected-window) - (edebug-get-buffer-window buffer)))) - (if window - (select-window window) - (if (one-window-p) - (split-window)) - ;; (message "next window: %s" (next-window)) (sit-for 1) - (if (eq (get-buffer-window edebug-trace-buffer) (next-window)) - ;; Don't select trace window - nil - (select-window (next-window)))) - (set-window-buffer (selected-window) buffer) - (set-window-hscroll (selected-window) 0);; should this be?? + (setq window + (cond + ((and (windowp window) (edebug-window-live-p window) + (eq (window-buffer window) buffer)) + window) + ((eq (window-buffer (selected-window)) buffer) + ;; Selected window already displays BUFFER. + (selected-window)) + ((edebug-get-buffer-window buffer)) + ((one-window-p 'nomini) + ;; When there's one window only, split it. + (split-window)) + ((let ((trace-window (get-buffer-window edebug-trace-buffer))) + (catch 'found + (dolist (elt (window-list nil 'nomini)) + (unless (or (eq elt (selected-window)) (eq elt trace-window) + (window-dedicated-p elt)) + ;; Found a non-dedicated window not showing + ;; `edebug-trace-buffer', use it. + (throw 'found elt)))))) + ;; All windows are dedicated or show `edebug-trace-buffer', split + ;; selected one. + (t (split-window)))) + (select-window window) + (set-window-buffer window buffer) + (set-window-hscroll window 0);; should this be?? ;; Selecting the window does not set the buffer until command loop. ;;(set-buffer buffer) ) - (defun edebug-get-displayed-buffer-points () ;; Return a list of buffer point pairs, for all displayed buffers. (let (list) diff --git a/lisp/files.el b/lisp/files.el index b96ab2e96fb..1b6a94766d3 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2123,19 +2123,20 @@ associated with that interpreter in `interpreter-mode-alist'.") `((image-type-auto-detected-p . image-mode) ;; The < comes before the groups (but the first) to reduce backtracking. ;; TODO: UTF-16 <?xml may be preceded by a BOM 0xff 0xfe or 0xfe 0xff. - ;; We use [ \t\n] instead of `\\s ' to make regex overflow less likely. + ;; We use [ \t\r\n] instead of `\\s ' to make regex overflow less likely. (,(let* ((incomment-re "\\(?:[^-]\\|-[^-]\\)") - (comment-re (concat "\\(?:!--" incomment-re "*-->[ \t\n]*<\\)"))) - (concat "\\(?:<\\?xml[ \t\n]+[^>]*>\\)?[ \t\n]*<" + (comment-re (concat "\\(?:!--" incomment-re "*-->[ \t\r\n]*<\\)"))) + (concat "\\(?:<\\?xml[ \t\r\n]+[^>]*>\\)?[ \t\r\n]*<" comment-re "*" - "\\(?:!DOCTYPE[ \t\n]+[^>]*>[ \t\n]*<[ \t\n]*" comment-re "*\\)?" + "\\(?:!DOCTYPE[ \t\r\n]+[^>]*>[ \t\r\n]*<[ \t\r\n]*" comment-re "*\\)?" "[Hh][Tt][Mm][Ll]")) . html-mode) + ("<!DOCTYPE[ \t\r\n]+[Hh][Tt][Mm][Ll]" . html-mode) ;; These two must come after html, because they are more general: ("<\\?xml " . xml-mode) (,(let* ((incomment-re "\\(?:[^-]\\|-[^-]\\)") - (comment-re (concat "\\(?:!--" incomment-re "*-->[ \t\n]*<\\)"))) - (concat "[ \t\n]*<" comment-re "*!DOCTYPE ")) + (comment-re (concat "\\(?:!--" incomment-re "*-->[ \t\r\n]*<\\)"))) + (concat "[ \t\r\n]*<" comment-re "*!DOCTYPE ")) . sgml-mode) ("%!PS" . ps-mode) ("# xmcd " . conf-unix-mode)) @@ -2434,13 +2435,14 @@ asking you for confirmation." (mapc (lambda (pair) (put (car pair) 'safe-local-variable (cdr pair))) - '((buffer-read-only . booleanp) ;; C source code - (fill-column . integerp) ;; C source code - (indent-tabs-mode . booleanp) ;; C source code - (left-margin . integerp) ;; C source code - (no-update-autoloads . booleanp) - (tab-width . integerp) ;; C source code - (truncate-lines . booleanp))) ;; C source code + '((buffer-read-only . booleanp) ;; C source code + (default-directory . stringp) ;; C source code + (fill-column . integerp) ;; C source code + (indent-tabs-mode . booleanp) ;; C source code + (left-margin . integerp) ;; C source code + (no-update-autoloads . booleanp) + (tab-width . integerp) ;; C source code + (truncate-lines . booleanp))) ;; C source code (put 'c-set-style 'safe-local-eval-function t) diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 4bc79fc6ee5..306cf5fd399 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -468,6 +468,7 @@ they are added at the end. This is normally set via `font-lock-add-keywords' and `font-lock-remove-keywords'.") +(put 'font-lock-keywords-alist 'risky-local-variable t) (defvar font-lock-removed-keywords-alist nil "Alist of `font-lock-keywords' elements to be removed for major modes. diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 8f094dd6537..b02dc6c2f8e 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,15 @@ +2007-04-19 Katsumi Yamaoka <yamaoka@jpl.org> + + * gnus-art.el (gnus-mime-strip-charset-parameters): New function. + (gnus-mime-view-part-as-charset): Use it; redisplay subpart currently + displayed of multipart/alternative part if it is invoked from summary + buffer. + (gnus-article-part-wrapper): Select article window. + + * mm-view.el (mm-inline-text-html-render-with-w3m) + (mm-inline-text-html-render-with-w3m-standalone) + (mm-inline-render-with-function): Use mail-parse-charset by default. + 2007-04-10 Katsumi Yamaoka <yamaoka@jpl.org> * gnus-msg.el (gnus-inews-yank-articles): Use diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 552f3a68f49..6ae52b5eedd 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -4606,6 +4606,21 @@ are decompressed." (mm-string-to-multibyte contents))) (goto-char b))))) +(defun gnus-mime-strip-charset-parameters (handle) + "Strip charset parameters from HANDLE." + (if (stringp (car handle)) + (mapc #'gnus-mime-strip-charset-parameters (cdr handle)) + (let* ((type (mm-handle-type (if (equal (mm-handle-media-type handle) + "message/external-body") + (progn + (unless (mm-handle-cache handle) + (mm-extern-cache-contents handle)) + (mm-handle-cache handle)) + handle))) + (charset (assq 'charset (cdr type)))) + (when charset + (delq charset type))))) + (defun gnus-mime-view-part-as-charset (&optional handle arg) "Insert the MIME part under point into the current buffer using the specified charset." @@ -4614,7 +4629,7 @@ specified charset." (let ((handle (or handle (get-text-property (point) 'gnus-data))) (fun (get-text-property (point) 'gnus-callback)) (gnus-newsgroup-ignored-charsets 'gnus-all) - gnus-newsgroup-charset type charset) + gnus-newsgroup-charset form preferred parts) (when handle (if (mm-handle-undisplayer handle) (mm-remove-part handle)) @@ -4622,17 +4637,24 @@ specified charset." (setq gnus-newsgroup-charset (or (cdr (assq arg gnus-summary-show-article-charset-alist)) (mm-read-coding-system "Charset: "))) - ;; Strip the charset parameter from `handle'. - (setq type (mm-handle-type - (if (equal (mm-handle-media-type handle) - "message/external-body") - (progn - (unless (mm-handle-cache handle) - (mm-extern-cache-contents handle)) - (mm-handle-cache handle)) - handle)) - charset (assq 'charset (cdr type))) - (delq charset type) + (gnus-mime-strip-charset-parameters handle) + (when (and (consp (setq form (cdr-safe fun))) + (setq form (ignore-errors + (assq 'gnus-mime-display-alternative form))) + (setq preferred (caddr form)) + (progn + (when (eq (car preferred) 'quote) + (setq preferred (cadr preferred))) + (not (equal preferred + (get-text-property (point) 'gnus-data)))) + (setq parts (get-text-property (point) 'gnus-part)) + (setq parts (cdr (assq parts + gnus-article-mime-handle-alist))) + (equal (mm-handle-media-type parts) "multipart/alternative") + (setq parts (reverse (cdr parts)))) + (setcar (cddr form) + (list 'quote (or (cadr (member preferred parts)) + (car parts))))) (funcall fun handle))))) (defun gnus-mime-view-part-externally (&optional handle) @@ -4688,13 +4710,22 @@ If no internal viewer is available, use an external viewer." (funcall (cdr action-pair))))) (defun gnus-article-part-wrapper (n function) - (save-current-buffer - (set-buffer gnus-article-buffer) - (when (> n (length gnus-article-mime-handle-alist)) - (error "No such part")) - (gnus-article-goto-part n) - (let ((handle (cdr (assq n gnus-article-mime-handle-alist)))) - (funcall function handle)))) + (let ((window (get-buffer-window gnus-article-buffer 'visible)) + frame) + (when window + ;; It is necessary to select the article window so that + ;; `gnus-article-goto-part' may really move the point. + (setq frame (selected-frame)) + (gnus-select-frame-set-input-focus (window-frame window)) + (unwind-protect + (save-window-excursion + (select-window window) + (when (> n (length gnus-article-mime-handle-alist)) + (error "No such part")) + (gnus-article-goto-part n) + (let ((handle (cdr (assq n gnus-article-mime-handle-alist)))) + (funcall function handle))) + (gnus-select-frame-set-input-focus frame))))) (defun gnus-article-pipe-part (n) "Pipe MIME part N, which is the numerical prefix." diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el index 14d480fe7df..888c814bf24 100644 --- a/lisp/gnus/mm-view.el +++ b/lisp/gnus/mm-view.el @@ -238,7 +238,8 @@ (mm-setup-w3m) (let ((text (mm-get-part handle)) (b (point)) - (charset (mail-content-type-get (mm-handle-type handle) 'charset))) + (charset (or (mail-content-type-get (mm-handle-type handle) 'charset) + mail-parse-charset))) (save-excursion (insert (if charset (mm-decode-string text charset) text)) (save-restriction @@ -302,7 +303,9 @@ "Render a text/html part using w3m." (if (mm-w3m-standalone-supports-m17n-p) (let ((source (mm-get-part handle)) - (charset (mail-content-type-get (mm-handle-type handle) 'charset)) + (charset (or (mail-content-type-get (mm-handle-type handle) + 'charset) + (symbol-name mail-parse-charset))) cs) (unless (and charset (setq cs (mm-charset-to-coding-system charset)) @@ -368,7 +371,8 @@ (defun mm-inline-render-with-function (handle func &rest args) (let ((source (mm-get-part handle)) - (charset (mail-content-type-get (mm-handle-type handle) 'charset))) + (charset (or (mail-content-type-get (mm-handle-type handle) 'charset) + mail-parse-charset))) (mm-insert-inline handle (mm-with-multibyte-buffer diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index 889b13cfa59..d97d0407ab8 100644 --- a/lisp/hi-lock.el +++ b/lisp/hi-lock.el @@ -3,7 +3,7 @@ ;; Copyright (C) 2000, 2001, 2002, 2003, 2004, ;; 2005, 2006, 2007 Free Software Foundation, Inc. -;; Author: David M. Koppelman, koppel@ee.lsu.edu +;; Author: David M. Koppelman, koppel@ece.lsu.edu ;; Keywords: faces, minor-mode, matching, display ;; This file is part of GNU Emacs. @@ -33,7 +33,8 @@ ;; will remove the highlighting. Any existing face can be used for ;; highlighting and a set of appropriate faces is provided. The ;; regexps can be written into the current buffer in a form that will -;; be recognized the next time the corresponding file is read. +;; be recognized the next time the corresponding file is read (when +;; file patterns is turned on). ;; ;; Applications: ;; @@ -60,6 +61,14 @@ ;; ;; (global-hi-lock-mode 1) ;; +;; To enable the use of patterns found in files (presumably placed +;; there by hi-lock) include the following in your .emacs file: +;; +;; (setq hi-lock-file-patterns-policy 'ask) +;; +;; If you get tired of being asked each time a file is loaded replace +;; `ask' with a function that returns t if patterns should be read. +;; ;; You might also want to bind the hi-lock commands to more ;; finger-friendly sequences: @@ -115,6 +124,20 @@ calls." :type '(repeat symbol) :group 'hi-lock) +(defcustom hi-lock-file-patterns-policy 'never + "Specify when hi-lock should use patterns found in file. +If `ask', prompt when patterns found in buffer; if bound to a function, +use patterns when function returns t (function is called with patterns +as first argument); if nil or `never' or anything else, don't use file +patterns." + :type '(choice (const :tag "Do not use file patterns" never) + (const :tag "Ask about file patterns" ask) + (function :tag "Function to check file patterns")) + :group 'hi-lock + :version "22.1") + +;; It can have a function value. +(put 'hi-lock-file-patterns-policy 'risky-local-variable t) (defgroup hi-lock-faces nil "Faces for hi-lock." @@ -196,7 +219,7 @@ calls." "History of regexps used for interactive fontification.") (defvar hi-lock-file-patterns-prefix "Hi-lock" - "Regexp for finding hi-lock patterns at top of file.") + "Search target for finding hi-lock patterns at top of file.") (defvar hi-lock-archaic-interface-message-used nil "True if user alerted that `global-hi-lock-mode' is now the global switch. @@ -283,17 +306,22 @@ called interactively, are: Remove highlighting on matches of REGEXP in current buffer. \\[hi-lock-write-interactive-patterns] - Write active REGEXPs into buffer as comments (if possible). They will + Write active REGEXPs into buffer as comments (if possible). They may be read the next time file is loaded or when the \\[hi-lock-find-patterns] command is issued. The inserted regexps are in the form of font lock keywords. - (See `font-lock-keywords'.) They may be edited and re-loaded with \\[hi-lock-find-patterns], - any valid `font-lock-keywords' form is acceptable. + (See `font-lock-keywords'.) They may be edited and re-loaded with \\[hi-lock-find-patterns], + any valid `font-lock-keywords' form is acceptable. When a file is + loaded the patterns are read if `hi-lock-file-patterns-policy is + 'ask and the user responds y to the prompt, or if + `hi-lock-file-patterns-policy' is bound to a function and that + function returns t. \\[hi-lock-find-patterns] Re-read patterns stored in buffer (in the format produced by \\[hi-lock-write-interactive-patterns]). -When hi-lock is started and if the mode is not excluded, the -beginning of the buffer is searched for lines of the form: +When hi-lock is started and if the mode is not excluded or patterns +rejected, the beginning of the buffer is searched for lines of the +form: Hi-lock: FOO where FOO is a list of patterns. These are added to the font lock keywords already present. The patterns must start before position @@ -590,9 +618,18 @@ not suitable." (setq all-patterns (append (read (current-buffer)) all-patterns)) (error (message "Invalid pattern list expression at %d" (line-number-at-pos))))))) - (when hi-lock-mode (hi-lock-set-file-patterns all-patterns)) - (if (interactive-p) - (message "Hi-lock added %d patterns." (length all-patterns)))))) + (when (and all-patterns + hi-lock-mode + (cond + ((eq this-command 'hi-lock-find-patterns) t) + ((functionp hi-lock-file-patterns-policy) + (funcall hi-lock-file-patterns-policy all-patterns)) + ((eq hi-lock-file-patterns-policy 'ask) + (y-or-n-p "Add patterns from this buffer to hi-lock? ")) + (t nil))) + (hi-lock-set-file-patterns all-patterns) + (if (interactive-p) + (message "Hi-lock added %d patterns." (length all-patterns))))))) (defun hi-lock-font-lock-hook () "Add hi-lock patterns to font-lock's." diff --git a/lisp/ido.el b/lisp/ido.el index 80ed82c2583..5a7be3e5ae6 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -3817,7 +3817,7 @@ for first matching file." If cursor is not at the end of the user input, delete to end of input." (interactive) (if (not (eobp)) - (kill-line) + (delete-region (point) (line-end-position)) (let ((enable-recursive-minibuffers t) (buf (ido-name (car ido-matches)))) (when buf @@ -3835,7 +3835,7 @@ If cursor is not at the end of the user input, delete to end of input." If cursor is not at the end of the user input, delete to end of input." (interactive) (if (not (eobp)) - (kill-line) + (delete-region (point) (line-end-position)) (let ((enable-recursive-minibuffers t) (file (ido-name (car ido-matches)))) (if file diff --git a/lisp/tumme.el b/lisp/image-dired.el index 8d4527d8ff4..ed330410d88 100644 --- a/lisp/tumme.el +++ b/lisp/image-dired.el @@ -1,4 +1,4 @@ -;;; tumme.el --- use dired to browse and manipulate your images +;;; image-dired.el --- use dired to browse and manipulate your images ;; ;; Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. ;; @@ -45,20 +45,15 @@ ;; powerful than this package, it did not work the way I wanted to. It ;; was too slow to created thumbnails of all files in a directory (I ;; currently keep all my 2000+ images in the same directory) and -;; browsing the thumbnail buffer was slow too. tumme.el will not +;; browsing the thumbnail buffer was slow too. image-dired.el will not ;; create thumbnails until they are needed and the browsing is done ;; quickly and easily in dired. I copied a great deal of ideas and ;; code from there though... :) ;; -;; About the name: tumme means thumb in Swedish and it is used for -;; working with thumbnails, so... :) If you want to know how to -;; pronounce it, go to the page on EmacsWiki and download the .ogg -;; file from there. -;; -;; `tumme' stores the thumbnail files in `tumme-dir' using the file -;; name format ORIGNAME.thumb.ORIGEXT. For example -;; ~/.emacs.d/tumme/myimage01.thumb.jpg. The "database" is for now -;; just a plain text file with the following format: +;; `image-dired' stores the thumbnail files in `image-dired-dir' +;; using the file name format ORIGNAME.thumb.ORIGEXT. For example +;; ~/.emacs.d/image-dired/myimage01.thumb.jpg. The "database" is for +;; now just a plain text file with the following format: ;; ;; file-name-non-directory;comment:comment-text;tag1;tag2;tag3;...;tagN ;; @@ -72,13 +67,13 @@ ;; * For non-lossy rotation of JPEG images, the JpegTRAN program is ;; needed. ;; -;; * For `tumme-get-exif-data' and `tumme-write-exif-data' to work, +;; * For `image-dired-get-exif-data' and `image-dired-write-exif-data' to work, ;; the command line tool `exiftool' is needed. It can be found here: ;; http://www.sno.phy.queensu.ca/~phil/exiftool/. These two functions ;; are, among other things, used for writing comments to image files -;; using `tumme-thumbnail-set-image-description' and to create -;; "unique" file names using `tumme-get-exif-file-name' (used by -;; `tumme-copy-with-exif-file-name'). +;; using `image-dired-thumbnail-set-image-description' and to create +;; "unique" file names using `image-dired-get-exif-file-name' (used by +;; `image-dired-copy-with-exif-file-name'). ;; ;; ;; USAGE @@ -88,7 +83,7 @@ ;; the Emacs manual and go to the node Thumbnails by typing `g ;; Thumbnails RET'. ;; -;; Quickstart: M-x tumme RET DIRNAME RET +;; Quickstart: M-x image-dired RET DIRNAME RET ;; ;; where DIRNAME is a directory containing image files. ;; @@ -99,7 +94,7 @@ ;; the thumbnails are hard-coded to JPEG format. ;; ;; * WARNING: The "database" format used might be changed so keep a -;; backup of `tumme-db-file' when testing new versions. +;; backup of `image-dired-db-file' when testing new versions. ;; ;; ;; TODO @@ -122,7 +117,7 @@ ;; ;; * From thumbs.el: Add setroot function. ;; -;; * From thumbs.el: Add image resizing, if useful (tumme's automatic +;; * From thumbs.el: Add image resizing, if useful (image-dired's automatic ;; "image fit" might be enough) ;; ;; * From thumbs.el: Add the "modify" commands (emboss, negate, @@ -130,26 +125,26 @@ ;; ;; * Asynchronous creation of thumbnails. ;; -;; * Add `tumme-display-thumbs-ring' and functions to cycle that. Find +;; * Add `image-dired-display-thumbs-ring' and functions to cycle that. Find ;; out which is best, saving old batch just before inserting new, or ;; saving the current batch in the ring when inserting it. Adding it -;; probably needs rewriting `tumme-display-thumbs' to be more general. +;; probably needs rewriting `image-dired-display-thumbs' to be more general. ;; ;; * Find some way of toggling on and off really nice keybindings in ;; dired (for example, using C-n or <down> instead of C-S-n). Richard -;; suggested that we could keep C-t as prefix for tumme commands as it -;; is currently not used in dired. He also suggested that -;; `dired-next-line' and `dired-previous-line' figure out if tumme is -;; enabled in the current buffer and, if it is, call -;; `tumme-dired-next-line' and `tumme-dired-previous-line', -;; respectively. Update: This is partly done; some bindings have now -;; been added to dired. +;; suggested that we could keep C-t as prefix for image-dired commands +;; as it is currently not used in dired. He also suggested that +;; `dired-next-line' and `dired-previous-line' figure out if +;; image-dired is enabled in the current buffer and, if it is, call +;; `image-dired-dired-next-line' and +;; `image-dired-dired-previous-line', respectively. Update: This is +;; partly done; some bindings have now been added to dired. ;; ;; * Enhanced gallery creation with basic CSS-support and pagination ;; of tag pages with many pictures. ;; -;; * Rewrite `tumme-modify-mark-on-thumb-original-file' to be less -;; ugly. +;; * Rewrite `image-dired-modify-mark-on-thumb-original-file' to be +;; less ugly. ;; ;; * In some way keep track of buffers and windows and stuff so that ;; it works as the user expects. @@ -166,135 +161,135 @@ (eval-when-compile (require 'wid-edit)) -(defgroup tumme nil +(defgroup image-dired nil "Use dired to browse your images as thumbnails, and more." - :prefix "tumme-" + :prefix "image-dired-" :group 'multimedia) -(defcustom tumme-dir "~/.emacs.d/tumme/" +(defcustom image-dired-dir "~/.emacs.d/image-dired/" "Directory where thumbnail images are stored." :type 'string - :group 'tumme) + :group 'image-dired) -(defcustom tumme-thumbnail-storage 'use-tumme-dir - "How to store tumme's thumbnail files. -Tumme can store thumbnail files in one of two ways and this is -controlled by this variable. \"Use tumme dir\" means that the +(defcustom image-dired-thumbnail-storage 'use-image-dired-dir + "How to store image-dired's thumbnail files. +Image-Dired can store thumbnail files in one of two ways and this is +controlled by this variable. \"Use image-dired dir\" means that the thumbnails are stored in a central directory. \"Per directory\" means that each thumbnail is stored in a subdirectory called -\".tumme\" in the same directory where the image file is. +\".image-dired\" in the same directory where the image file is. \"Thumbnail Managing Standard\" means that the thumbnails are stored and generated according to the Thumbnail Managing Standard that allows sharing of thumbnails across different programs." :type '(choice :tag "How to store thumbnail files" (const :tag "Thumbnail Managing Standard" standard) - (const :tag "Use tumme-dir" use-tumme-dir) + (const :tag "Use image-dired-dir" use-image-dired-dir) (const :tag "Per-directory" per-directory)) - :group 'tumme) + :group 'image-dired) -(defcustom tumme-db-file "~/.emacs.d/tumme/.tumme_db" +(defcustom image-dired-db-file "~/.emacs.d/image-dired/.image-dired_db" "Database file where file names and their associated tags are stored." :type 'string - :group 'tumme) + :group 'image-dired) -(defcustom tumme-temp-image-file "~/.emacs.d/tumme/.tumme_temp" +(defcustom image-dired-temp-image-file "~/.emacs.d/image-dired/.image-dired_temp" "Name of temporary image file used by various commands." :type 'string - :group 'tumme) + :group 'image-dired) -(defcustom tumme-gallery-dir "~/.emacs.d/tumme/.tumme_gallery" +(defcustom image-dired-gallery-dir "~/.emacs.d/image-dired/.image-dired_gallery" "Directory to store generated gallery html pages. This path needs to be \"shared\" to the public so that it can access -the index.html page that tumme creates." +the index.html page that image-dired creates." :type 'string - :group 'tumme) + :group 'image-dired) -(defcustom tumme-gallery-image-root-url -"http://your.own.server/tummepics" +(defcustom image-dired-gallery-image-root-url +"http://your.own.server/image-diredpics" "URL where the full size images are to be found. -Note that this path has to be configured in your web server. Tumme +Note that this path has to be configured in your web server. Image-Dired expects to find pictures in this directory." :type 'string - :group 'tumme) + :group 'image-dired) -(defcustom tumme-gallery-thumb-image-root-url -"http://your.own.server/tummethumbs" +(defcustom image-dired-gallery-thumb-image-root-url +"http://your.own.server/image-diredthumbs" "URL where the thumbnail images are to be found. -Note that this path has to be configured in your web server. Tumme +Note that this path has to be configured in your web server. Image-Dired expects to find pictures in this directory." :type 'string - :group 'tumme) + :group 'image-dired) -(defcustom tumme-cmd-create-thumbnail-program +(defcustom image-dired-cmd-create-thumbnail-program "convert" "Executable used to create thumbnail. -Used together with `tumme-cmd-create-thumbnail-options'." +Used together with `image-dired-cmd-create-thumbnail-options'." :type 'string - :group 'tumme) + :group 'image-dired) -(defcustom tumme-cmd-create-thumbnail-options +(defcustom image-dired-cmd-create-thumbnail-options "%p -size %wx%h \"%f\" -resize %wx%h +profile \"*\" jpeg:\"%t\"" "Format of command used to create thumbnail image. Available options are %p which is replaced by -`tumme-cmd-create-thumbnail-program', %w which is replaced by -`tumme-thumb-width', %h which is replaced by `tumme-thumb-height', +`image-dired-cmd-create-thumbnail-program', %w which is replaced by +`image-dired-thumb-width', %h which is replaced by `image-dired-thumb-height', %f which is replaced by the file name of the original image and %t which is replaced by the file name of the thumbnail file." :type 'string - :group 'tumme) + :group 'image-dired) -(defcustom tumme-cmd-create-temp-image-program +(defcustom image-dired-cmd-create-temp-image-program "convert" "Executable used to create temporary image. -Used together with `tumme-cmd-create-temp-image-options'." +Used together with `image-dired-cmd-create-temp-image-options'." :type 'string - :group 'tumme) + :group 'image-dired) -(defcustom tumme-cmd-create-temp-image-options +(defcustom image-dired-cmd-create-temp-image-options "%p -size %wx%h \"%f\" -resize %wx%h +profile \"*\" jpeg:\"%t\"" "Format of command used to create temporary image for display window. Available options are %p which is replaced by -`tumme-cmd-create-temp-image-program', %w and %h which is replaced by +`image-dired-cmd-create-temp-image-program', %w and %h which is replaced by the calculated max size for width and height in the image display window, %f which is replaced by the file name of the original image and %t which is replaced by the file name of the temporary file." :type 'string - :group 'tumme) + :group 'image-dired) -(defcustom tumme-cmd-pngnq-program (executable-find "pngnq") +(defcustom image-dired-cmd-pngnq-program (executable-find "pngnq") "The file name of the `pngnq' program. It quantizes colors of PNG images down to 256 colors." :type '(choice (const :tag "Not Set" nil) string) - :group 'tumme) + :group 'image-dired) -(defcustom tumme-cmd-pngcrush-program (executable-find "pngcrush") +(defcustom image-dired-cmd-pngcrush-program (executable-find "pngcrush") "The file name of the `pngcrush' program. It optimizes the compression of PNG images. Also it adds PNG textual chunks with the information required by the Thumbnail Managing Standard." :type '(choice (const :tag "Not Set" nil) string) - :group 'tumme) + :group 'image-dired) -(defcustom tumme-cmd-create-standard-thumbnail-command +(defcustom image-dired-cmd-create-standard-thumbnail-command (concat - tumme-cmd-create-thumbnail-program " " + image-dired-cmd-create-thumbnail-program " " "-size %wx%h \"%f\" " - (unless (or tumme-cmd-pngcrush-program tumme-cmd-pngnq-program) + (unless (or image-dired-cmd-pngcrush-program image-dired-cmd-pngnq-program) (concat "-set \"Thumb::MTime\" \"%m\" " "-set \"Thumb::URI\" \"file://%f\" " "-set \"Description\" \"Thumbnail of file://%f\" " "-set \"Software\" \"" (emacs-version) "\" ")) "-thumbnail %wx%h png:\"%t\"" - (if tumme-cmd-pngnq-program + (if image-dired-cmd-pngnq-program (concat - " ; " tumme-cmd-pngnq-program " -f \"%t\"" - (unless tumme-cmd-pngcrush-program + " ; " image-dired-cmd-pngnq-program " -f \"%t\"" + (unless image-dired-cmd-pngcrush-program " ; mv %q %t"))) - (if tumme-cmd-pngcrush-program + (if image-dired-cmd-pngcrush-program (concat - (unless tumme-cmd-pngcrush-program + (unless image-dired-cmd-pngcrush-program " ; cp %t %q") - " ; " tumme-cmd-pngcrush-program " -q " + " ; " image-dired-cmd-pngcrush-program " -q " "-text b \"Description\" \"Thumbnail of file://%f\" " "-text b \"Software\" \"" (emacs-version) "\" " ;; "-text b \"Thumb::Image::Height\" \"%oh\" " @@ -307,194 +302,194 @@ with the information required by the Thumbnail Managing Standard." " ; rm %q"))) "Command to create thumbnails according to the Thumbnail Managing Standard." :type 'string - :group 'tumme) + :group 'image-dired) -(defcustom tumme-cmd-rotate-thumbnail-program +(defcustom image-dired-cmd-rotate-thumbnail-program "mogrify" "Executable used to rotate thumbnail. -Used together with `tumme-cmd-rotate-thumbnail-options'." +Used together with `image-dired-cmd-rotate-thumbnail-options'." :type 'string - :group 'tumme) + :group 'image-dired) -(defcustom tumme-cmd-rotate-thumbnail-options +(defcustom image-dired-cmd-rotate-thumbnail-options "%p -rotate %d \"%t\"" "Format of command used to rotate thumbnail image. Available options are %p which is replaced by -`tumme-cmd-rotate-thumbnail-program', %d which is replaced by the +`image-dired-cmd-rotate-thumbnail-program', %d which is replaced by the number of (positive) degrees to rotate the image, normally 90 or 270 \(for 90 degrees right and left), %t which is replaced by the file name of the thumbnail file." :type 'string - :group 'tumme) + :group 'image-dired) -(defcustom tumme-cmd-rotate-original-program +(defcustom image-dired-cmd-rotate-original-program "jpegtran" "Executable used to rotate original image. -Used together with `tumme-cmd-rotate-original-options'." +Used together with `image-dired-cmd-rotate-original-options'." :type 'string - :group 'tumme) + :group 'image-dired) -(defcustom tumme-cmd-rotate-original-options +(defcustom image-dired-cmd-rotate-original-options "%p -rotate %d -copy all -outfile %t \"%o\"" "Format of command used to rotate original image. Available options are %p which is replaced by -`tumme-cmd-rotate-original-program', %d which is replaced by the +`image-dired-cmd-rotate-original-program', %d which is replaced by the number of (positive) degrees to rotate the image, normally 90 or 270 \(for 90 degrees right and left), %o which is replaced by the original image file name and %t which is replaced by -`tumme-temp-image-file'." +`image-dired-temp-image-file'." :type 'string - :group 'tumme) + :group 'image-dired) -(defcustom tumme-temp-rotate-image-file - "~/.emacs.d/tumme/.tumme_rotate_temp" +(defcustom image-dired-temp-rotate-image-file + "~/.emacs.d/image-dired/.image-dired_rotate_temp" "Temporary file for rotate operations." :type 'string - :group 'tumme) + :group 'image-dired) -(defcustom tumme-rotate-original-ask-before-overwrite t +(defcustom image-dired-rotate-original-ask-before-overwrite t "Confirm overwrite of original file after rotate operation. If non-nil, ask user for confirmation before overwriting the -original file with `tumme-temp-rotate-image-file'." +original file with `image-dired-temp-rotate-image-file'." :type 'boolean - :group 'tumme) + :group 'image-dired) -(defcustom tumme-cmd-write-exif-data-program +(defcustom image-dired-cmd-write-exif-data-program "exiftool" "Program used to write EXIF data to image. -Used together with `tumme-cmd-write-exif-data-options'." +Used together with `image-dired-cmd-write-exif-data-options'." :type 'string - :group 'tumme) + :group 'image-dired) -(defcustom tumme-cmd-write-exif-data-options +(defcustom image-dired-cmd-write-exif-data-options "%p -%t=\"%v\" \"%f\"" "Format of command used to write EXIF data. Available options are %p which is replaced by -`tumme-cmd-write-exif-data-program', %f which is replaced by the +`image-dired-cmd-write-exif-data-program', %f which is replaced by the image file name, %t which is replaced by the tag name and %v which is replaced by the tag value." :type 'string - :group 'tumme) + :group 'image-dired) -(defcustom tumme-cmd-read-exif-data-program +(defcustom image-dired-cmd-read-exif-data-program "exiftool" "Program used to read EXIF data to image. -Used together with `tumme-cmd-read-exif-data-program-options'." +Used together with `image-dired-cmd-read-exif-data-program-options'." :type 'string - :group 'tumme) + :group 'image-dired) -(defcustom tumme-cmd-read-exif-data-options +(defcustom image-dired-cmd-read-exif-data-options "%p -s -s -s -%t \"%f\"" "Format of command used to read EXIF data. Available options are %p which is replaced by -`tumme-cmd-write-exif-data-options', %f which is replaced +`image-dired-cmd-write-exif-data-options', %f which is replaced by the image file name and %t which is replaced by the tag name." :type 'string - :group 'tumme) + :group 'image-dired) -(defcustom tumme-gallery-hidden-tags +(defcustom image-dired-gallery-hidden-tags (list "private" "hidden" "pending") "List of \"hidden\" tags. -Used by `tumme-gallery-generate' to leave out \"hidden\" images." +Used by `image-dired-gallery-generate' to leave out \"hidden\" images." :type '(repeat string) - :group 'tumme) + :group 'image-dired) -(defcustom tumme-thumb-size (if (eq 'standard tumme-thumbnail-storage) 128 100) +(defcustom image-dired-thumb-size (if (eq 'standard image-dired-thumbnail-storage) 128 100) "Size of thumbnails, in pixels. -This is the default size for both `tumme-thumb-width' and `tumme-thumb-height'." +This is the default size for both `image-dired-thumb-width' and `image-dired-thumb-height'." :type 'integer - :group 'tumme) + :group 'image-dired) -(defcustom tumme-thumb-width tumme-thumb-size +(defcustom image-dired-thumb-width image-dired-thumb-size "Width of thumbnails, in pixels." :type 'integer - :group 'tumme) + :group 'image-dired) -(defcustom tumme-thumb-height tumme-thumb-size +(defcustom image-dired-thumb-height image-dired-thumb-size "Height of thumbnails, in pixels." :type 'integer - :group 'tumme) + :group 'image-dired) -(defcustom tumme-thumb-relief 2 +(defcustom image-dired-thumb-relief 2 "Size of button-like border around thumbnails." :type 'integer - :group 'tumme) + :group 'image-dired) -(defcustom tumme-thumb-margin 2 +(defcustom image-dired-thumb-margin 2 "Size of the margin around thumbnails. This is where you see the cursor." :type 'integer - :group 'tumme) + :group 'image-dired) -(defcustom tumme-line-up-method 'dynamic +(defcustom image-dired-line-up-method 'dynamic "Default method for line-up of thumbnails in thumbnail buffer. -Used by `tumme-display-thumbs' and other functions that needs to +Used by `image-dired-display-thumbs' and other functions that needs to line-up thumbnails. Dynamic means to use the available width of the window containing the thumbnail buffer, Fixed means to use -`tumme-thumbs-per-row', Interactive is for asking the user, and No +`image-dired-thumbs-per-row', Interactive is for asking the user, and No line-up means that no automatic line-up will be done." :type '(choice :tag "Default line-up method" (const :tag "Dynamic" dynamic) (const :tag "Fixed" fixed) (const :tag "Interactive" interactive) (const :tag "No line-up" none)) - :group 'tumme) + :group 'image-dired) -(defcustom tumme-thumbs-per-row 3 +(defcustom image-dired-thumbs-per-row 3 "Number of thumbnails to display per row in thumb buffer." :type 'integer - :group 'tumme) + :group 'image-dired) -(defcustom tumme-display-window-width-correction 1 +(defcustom image-dired-display-window-width-correction 1 "Number to be used to correct image display window width. Change if the default (1) does not work (i.e. if the image does not completely fit)." :type 'integer - :group 'tumme) + :group 'image-dired) -(defcustom tumme-display-window-height-correction 0 +(defcustom image-dired-display-window-height-correction 0 "Number to be used to correct image display window height. Change if the default (0) does not work (i.e. if the image does not completely fit)." :type 'integer - :group 'tumme) + :group 'image-dired) -(defcustom tumme-track-movement t +(defcustom image-dired-track-movement t "The current state of the tracking and mirroring. For more information, see the documentation for -`tumme-toggle-movement-tracking'." +`image-dired-toggle-movement-tracking'." :type 'boolean - :group 'tumme) + :group 'image-dired) -(defcustom tumme-append-when-browsing nil +(defcustom image-dired-append-when-browsing nil "Append thumbnails in thumbnail buffer when browsing. -If non-nil, using `tumme-next-line-and-display' and -`tumme-previous-line-and-display' will leave a trail of thumbnail +If non-nil, using `image-dired-next-line-and-display' and +`image-dired-previous-line-and-display' will leave a trail of thumbnail images in the thumbnail buffer. If you enable this and want to clean the thumbnail buffer because it is filled with too many thumbmnails, -just call `tumme-display-thumb' to display only the image at point. -This value can be toggled using `tumme-toggle-append-browsing'." +just call `image-dired-display-thumb' to display only the image at point. +This value can be toggled using `image-dired-toggle-append-browsing'." :type 'boolean - :group 'tumme) + :group 'image-dired) -(defcustom tumme-dired-disp-props t +(defcustom image-dired-dired-disp-props t "If non-nil, display properties for dired file when browsing. -Used by `tumme-next-line-and-display', -`tumme-previous-line-and-display' and `tumme-mark-and-display-next'. +Used by `image-dired-next-line-and-display', +`image-dired-previous-line-and-display' and `image-dired-mark-and-display-next'. If the database file is large, this can slow down image browsing in dired and you might want to turn it off." :type 'boolean - :group 'tumme) + :group 'image-dired) -(defcustom tumme-display-properties-format "%b: %f (%t): %c" +(defcustom image-dired-display-properties-format "%b: %f (%t): %c" "Display format for thumbnail properties. %b is replaced with associated dired buffer name, %f with file name \(without path) of original image file, %t with the list of tags and %c with the comment." :type 'string - :group 'tumme) + :group 'image-dired) -(defcustom tumme-external-viewer +(defcustom image-dired-external-viewer ;; TODO: Use mailcap, dired-guess-shell-alist-default, ;; dired-view-command-alist. (cond ((executable-find "display")) @@ -502,33 +497,33 @@ with the comment." ((executable-find "qiv") "qiv -t")) "Name of external viewer. Including parameters. Used when displaying original image from -`tumme-thumbnail-mode'." +`image-dired-thumbnail-mode'." :type 'string - :group 'tumme) + :group 'image-dired) -(defcustom tumme-main-image-directory "~/pics/" +(defcustom image-dired-main-image-directory "~/pics/" "Name of main image directory, if any. -Used by `tumme-copy-with-exif-file-name'." +Used by `image-dired-copy-with-exif-file-name'." :type 'string - :group 'tumme) + :group 'image-dired) -(defcustom tumme-show-all-from-dir-max-files 50 - "Maximum number of files to show using `tumme-show-all-from-dir'. +(defcustom image-dired-show-all-from-dir-max-files 50 + "Maximum number of files to show using `image-dired-show-all-from-dir'. before warning the user." :type 'integer - :group 'tumme) + :group 'image-dired) -(defun tumme-dir () - "Return the current thumbnails directory (from variable `tumme-dir'). +(defun image-dired-dir () + "Return the current thumbnails directory (from variable `image-dired-dir'). Create the thumbnails directory if it does not exist." - (let ((tumme-dir (file-name-as-directory - (expand-file-name tumme-dir)))) - (unless (file-directory-p tumme-dir) - (make-directory tumme-dir t) + (let ((image-dired-dir (file-name-as-directory + (expand-file-name image-dired-dir)))) + (unless (file-directory-p image-dired-dir) + (make-directory image-dired-dir t) (message "Creating thumbnails directory")) - tumme-dir)) + image-dired-dir)) -(defun tumme-insert-image (file type relief margin) +(defun image-dired-insert-image (file type relief margin) "Insert image FILE of image TYPE, using RELIEF and MARGIN, at point." (let ((i `(image :type ,type @@ -537,56 +532,56 @@ Create the thumbnails directory if it does not exist." :margin ,margin))) (insert-image i))) -(defun tumme-get-thumbnail-image (file) +(defun image-dired-get-thumbnail-image (file) "Return the image descriptor for a thumbnail of image file FILE." (unless (string-match (image-file-name-regexp) file) (error "%s is not a valid image file" file)) - (let ((thumb-file (tumme-thumb-name file))) + (let ((thumb-file (image-dired-thumb-name file))) (unless (and (file-exists-p thumb-file) (<= (float-time (nth 5 (file-attributes file))) (float-time (nth 5 (file-attributes thumb-file))))) - (tumme-create-thumb file thumb-file)) + (image-dired-create-thumb file thumb-file)) (create-image thumb-file) ;; (list 'image :type 'jpeg ;; :file thumb-file -;; :relief tumme-thumb-relief :margin tumme-thumb-margin) +;; :relief image-dired-thumb-relief :margin image-dired-thumb-margin) )) -(defun tumme-insert-thumbnail (file original-file-name +(defun image-dired-insert-thumbnail (file original-file-name associated-dired-buffer) "Insert thumbnail image FILE. Add text properties ORIGINAL-FILE-NAME and ASSOCIATED-DIRED-BUFFER." (let (beg end) (setq beg (point)) - (tumme-insert-image file + (image-dired-insert-image file ;; TODO: this should depend on the real file type - (if (eq 'standard tumme-thumbnail-storage) + (if (eq 'standard image-dired-thumbnail-storage) 'png 'jpeg) - tumme-thumb-relief - tumme-thumb-margin) + image-dired-thumb-relief + image-dired-thumb-margin) (setq end (point)) (add-text-properties beg end - (list 'tumme-thumbnail t + (list 'image-dired-thumbnail t 'original-file-name original-file-name 'associated-dired-buffer associated-dired-buffer - 'tags (tumme-list-tags original-file-name) + 'tags (image-dired-list-tags original-file-name) 'mouse-face 'highlight - 'comment (tumme-get-comment original-file-name))))) + 'comment (image-dired-get-comment original-file-name))))) -(defun tumme-thumb-name (file) +(defun image-dired-thumb-name (file) "Return thumbnail file name for FILE. -Depending on the value of `tumme-thumbnail-storage', the file +Depending on the value of `image-dired-thumbnail-storage', the file name will vary. For central thumbnail file storage, make a MD5-hash of the image file's directory name and add that to make the thumbnail file name unique. For per-directory storage, just add a subdirectory. For standard storage, produce the file name according to the Thumbnail Managing Standard." - (cond ((eq 'standard tumme-thumbnail-storage) + (cond ((eq 'standard image-dired-thumbnail-storage) (expand-file-name (concat "~/.thumbnails/normal/" (md5 (concat "file://" (expand-file-name file))) ".png"))) - ((eq 'use-tumme-dir tumme-thumbnail-storage) + ((eq 'use-image-dired-dir image-dired-thumbnail-storage) (let* ((f (expand-file-name file)) (md5-hash ;; Is MD5 hashes fast enough? The checksum of a @@ -595,32 +590,32 @@ according to the Thumbnail Managing Standard." ;; be used here. (md5 (file-name-as-directory (file-name-directory f))))) (format "%s%s%s.thumb.%s" - (file-name-as-directory (expand-file-name (tumme-dir))) + (file-name-as-directory (expand-file-name (image-dired-dir))) (file-name-sans-extension (file-name-nondirectory f)) (if md5-hash (concat "_" md5-hash) "") (file-name-extension f)))) - ((eq 'per-directory tumme-thumbnail-storage) + ((eq 'per-directory image-dired-thumbnail-storage) (let ((f (expand-file-name file))) - (format "%s.tumme/%s.thumb.%s" + (format "%s.image-dired/%s.thumb.%s" (file-name-directory f) (file-name-sans-extension (file-name-nondirectory f)) (file-name-extension f)))))) -(defun tumme-create-thumb (original-file thumbnail-file) +(defun image-dired-create-thumb (original-file thumbnail-file) "For ORIGINAL-FILE, create thumbnail image named THUMBNAIL-FILE." - (let* ((width (int-to-string tumme-thumb-width)) - (height (int-to-string tumme-thumb-height)) + (let* ((width (int-to-string image-dired-thumb-width)) + (height (int-to-string image-dired-thumb-height)) (modif-time (format "%.0f" (float-time (nth 5 (file-attributes original-file))))) (thumbnail-nq8-file (replace-regexp-in-string ".png\\'" "-nq8.png" thumbnail-file)) (command (format-spec - (if (eq 'standard tumme-thumbnail-storage) - tumme-cmd-create-standard-thumbnail-command - tumme-cmd-create-thumbnail-options) + (if (eq 'standard image-dired-thumbnail-storage) + image-dired-cmd-create-standard-thumbnail-command + image-dired-cmd-create-thumbnail-options) (list - (cons ?p tumme-cmd-create-thumbnail-program) + (cons ?p image-dired-cmd-create-thumbnail-program) (cons ?w width) (cons ?h height) (cons ?m modif-time) @@ -635,13 +630,13 @@ according to the Thumbnail Managing Standard." (call-process shell-file-name nil nil nil shell-command-switch command))) ;;;###autoload -(defun tumme-dired-insert-marked-thumbs () +(defun image-dired-dired-insert-marked-thumbs () "Insert thumbnails before file names of marked files in the dired buffer." (interactive) (dired-map-over-marks (let* ((image-pos (dired-move-to-filename)) (image-file (dired-get-filename)) - (thumb-file (tumme-get-thumbnail-image image-file)) + (thumb-file (image-dired-get-thumbnail-image image-file)) overlay) ;; If image is not already added, then add it. (unless (delq nil (mapcar (lambda (o) (overlay-get o 'put-image)) @@ -655,9 +650,9 @@ according to the Thumbnail Managing Standard." (overlay-put overlay 'image-file image-file) (overlay-put overlay 'thumb-file thumb-file))) nil) - (add-hook 'dired-after-readin-hook 'tumme-dired-after-readin-hook nil t)) + (add-hook 'dired-after-readin-hook 'image-dired-dired-after-readin-hook nil t)) -(defun tumme-dired-after-readin-hook () +(defun image-dired-dired-after-readin-hook () "Relocate existing thumbnail overlays in dired buffer after reverting. Move them to their corresponding files if they are still exist. Otherwise, delete overlays." @@ -670,82 +665,82 @@ Otherwise, delete overlays." (delete-overlay overlay))))) (overlays-in (point-min) (point-max)))) -(defun tumme-next-line-and-display () +(defun image-dired-next-line-and-display () "Move to next dired line and display thumbnail image." (interactive) (dired-next-line 1) - (tumme-display-thumbs - t (or tumme-append-when-browsing nil) t) - (if tumme-dired-disp-props - (tumme-dired-display-properties))) + (image-dired-display-thumbs + t (or image-dired-append-when-browsing nil) t) + (if image-dired-dired-disp-props + (image-dired-dired-display-properties))) -(defun tumme-previous-line-and-display () +(defun image-dired-previous-line-and-display () "Move to previous dired line and display thumbnail image." (interactive) (dired-previous-line 1) - (tumme-display-thumbs - t (or tumme-append-when-browsing nil) t) - (if tumme-dired-disp-props - (tumme-dired-display-properties))) + (image-dired-display-thumbs + t (or image-dired-append-when-browsing nil) t) + (if image-dired-dired-disp-props + (image-dired-dired-display-properties))) -(defun tumme-toggle-append-browsing () - "Toggle `tumme-append-when-browsing'." +(defun image-dired-toggle-append-browsing () + "Toggle `image-dired-append-when-browsing'." (interactive) - (setq tumme-append-when-browsing - (not tumme-append-when-browsing)) + (setq image-dired-append-when-browsing + (not image-dired-append-when-browsing)) (message "Append browsing %s." - (if tumme-append-when-browsing + (if image-dired-append-when-browsing "on" "off"))) -(defun tumme-mark-and-display-next () +(defun image-dired-mark-and-display-next () "Mark current file in dired and display next thumbnail image." (interactive) (dired-mark 1) - (tumme-display-thumbs - t (or tumme-append-when-browsing nil) t) - (if tumme-dired-disp-props - (tumme-dired-display-properties))) + (image-dired-display-thumbs + t (or image-dired-append-when-browsing nil) t) + (if image-dired-dired-disp-props + (image-dired-dired-display-properties))) -(defun tumme-toggle-dired-display-properties () - "Toggle `tumme-dired-disp-props'." +(defun image-dired-toggle-dired-display-properties () + "Toggle `image-dired-dired-disp-props'." (interactive) - (setq tumme-dired-disp-props - (not tumme-dired-disp-props)) + (setq image-dired-dired-disp-props + (not image-dired-dired-disp-props)) (message "Dired display properties %s." - (if tumme-dired-disp-props + (if image-dired-dired-disp-props "on" "off"))) -(defvar tumme-thumbnail-buffer "*tumme*" - "Tumme's thumbnail buffer.") +(defvar image-dired-thumbnail-buffer "*image-dired*" + "Image-Dired's thumbnail buffer.") -(defun tumme-create-thumbnail-buffer () - "Create thumb buffer and set `tumme-thumbnail-mode'." - (let ((buf (get-buffer-create tumme-thumbnail-buffer))) +(defun image-dired-create-thumbnail-buffer () + "Create thumb buffer and set `image-dired-thumbnail-mode'." + (let ((buf (get-buffer-create image-dired-thumbnail-buffer))) (with-current-buffer buf (setq buffer-read-only t) - (if (not (eq major-mode 'tumme-thumbnail-mode)) - (tumme-thumbnail-mode))) + (if (not (eq major-mode 'image-dired-thumbnail-mode)) + (image-dired-thumbnail-mode))) buf)) -(defvar tumme-display-image-buffer "*tumme-display-image*" +(defvar image-dired-display-image-buffer "*image-dired-display-image*" "Where larger versions of the images are display.") -(defun tumme-create-display-image-buffer () - "Create image display buffer and set `tumme-display-image-mode'." - (let ((buf (get-buffer-create tumme-display-image-buffer))) +(defun image-dired-create-display-image-buffer () + "Create image display buffer and set `image-dired-display-image-mode'." + (let ((buf (get-buffer-create image-dired-display-image-buffer))) (with-current-buffer buf (setq buffer-read-only t) - (if (not (eq major-mode 'tumme-display-image-mode)) - (tumme-display-image-mode))) + (if (not (eq major-mode 'image-dired-display-image-mode)) + (image-dired-display-image-mode))) buf)) -(defvar tumme-saved-window-configuration nil +(defvar image-dired-saved-window-configuration nil "Saved window configuration.") ;;;###autoload -(defun tumme-dired-with-window-configuration (dir &optional arg) +(defun image-dired-dired-with-window-configuration (dir &optional arg) "Open directory DIR and create a default window configuration. Convenience command that: @@ -756,16 +751,16 @@ Convenience command that: After the command has finished, you would typically mark some image files in dired and type -\\[tumme-display-thumbs] (`tumme-display-thumbs'). +\\[image-dired-display-thumbs] (`image-dired-display-thumbs'). If called with prefix argument ARG, skip splitting of windows. The current window configuration is saved and can be restored by -calling `tumme-restore-window-configuration'." +calling `image-dired-restore-window-configuration'." (interactive "DDirectory: \nP") - (let ((buf (tumme-create-thumbnail-buffer)) - (buf2 (tumme-create-display-image-buffer))) - (setq tumme-saved-window-configuration + (let ((buf (image-dired-create-thumbnail-buffer)) + (buf2 (image-dired-create-display-image-buffer))) + (setq image-dired-saved-window-configuration (current-window-configuration)) (dired dir) (delete-other-windows) @@ -780,18 +775,18 @@ calling `tumme-restore-window-configuration'." (switch-to-buffer buf2) (other-window -2))))) -(defun tumme-restore-window-configuration () +(defun image-dired-restore-window-configuration () "Restore window configuration. Restore any changes to the window configuration made by calling -`tumme-dired-with-window-configuration'." +`image-dired-dired-with-window-configuration'." (interactive) - (if tumme-saved-window-configuration - (set-window-configuration tumme-saved-window-configuration) + (if image-dired-saved-window-configuration + (set-window-configuration image-dired-saved-window-configuration) (message "No saved window configuration"))) ;;;###autoload -(defun tumme-display-thumbs (&optional arg append do-not-pop) - "Display thumbnails of all marked files, in `tumme-thumbnail-buffer'. +(defun image-dired-display-thumbs (&optional arg append do-not-pop) + "Display thumbnails of all marked files, in `image-dired-thumbnail-buffer'. If a thumbnail image does not exist for a file, it is created on the fly. With prefix argument ARG, display only thumbnail for file at point (this is useful if you have marked some files but want to show @@ -799,7 +794,7 @@ another one). Recommended usage is to split the current frame horizontally so that you have the dired buffer in the left window and the -`tumme-thumbnail-buffer' buffer in the right window. +`image-dired-thumbnail-buffer' buffer in the right window. With optional argument APPEND, append thumbnail to thumbnail buffer instead of erasing it first. @@ -807,11 +802,11 @@ instead of erasing it first. Option argument DO-NOT-POP controls if `pop-to-buffer' should be used or not. If non-nil, use `display-buffer' instead of `pop-to-buffer'. This is used from functions like -`tumme-next-line-and-display' and -`tumme-previous-line-and-display' where we do not want the +`image-dired-next-line-and-display' and +`image-dired-previous-line-and-display' where we do not want the thumbnail buffer to be selected." (interactive "P") - (let ((buf (tumme-create-thumbnail-buffer)) + (let ((buf (image-dired-create-thumbnail-buffer)) curr-file thumb-name files count dired-buf beg) (if arg (setq files (list (dired-get-filename))) @@ -824,58 +819,61 @@ thumbnail buffer to be selected." (goto-char (point-max))) (mapcar (lambda (curr-file) - (setq thumb-name (tumme-thumb-name curr-file)) + (setq thumb-name (image-dired-thumb-name curr-file)) (if (and (not (file-exists-p thumb-name)) - (not (= 0 (tumme-create-thumb curr-file thumb-name)))) + (not (= 0 (image-dired-create-thumb curr-file thumb-name)))) (message "Thumb could not be created for file %s" curr-file) - (tumme-insert-thumbnail thumb-name curr-file dired-buf))) + (image-dired-insert-thumbnail thumb-name curr-file dired-buf))) files)) - (cond ((eq 'dynamic tumme-line-up-method) - (tumme-line-up-dynamic)) - ((eq 'fixed tumme-line-up-method) - (tumme-line-up)) - ((eq 'interactive tumme-line-up-method) - (tumme-line-up-interactive)) - ((eq 'none tumme-line-up-method) + (cond ((eq 'dynamic image-dired-line-up-method) + (image-dired-line-up-dynamic)) + ((eq 'fixed image-dired-line-up-method) + (image-dired-line-up)) + ((eq 'interactive image-dired-line-up-method) + (image-dired-line-up-interactive)) + ((eq 'none image-dired-line-up-method) nil) (t - (tumme-line-up-dynamic)))) + (image-dired-line-up-dynamic)))) (if do-not-pop - (display-buffer tumme-thumbnail-buffer) - (pop-to-buffer tumme-thumbnail-buffer)))) + (display-buffer image-dired-thumbnail-buffer) + (pop-to-buffer image-dired-thumbnail-buffer)))) ;;;###autoload -(defun tumme-show-all-from-dir (dir) +(defun image-dired-show-all-from-dir (dir) "Make a preview buffer for all images in DIR and display it. If the number of files in DIR matching `image-file-name-regexp' -exceeds `tumme-show-all-from-dir-max-files', a warning will be +exceeds `image-dired-show-all-from-dir-max-files', a warning will be displayed." (interactive "DDir: ") (dired dir) (dired-mark-files-regexp (image-file-name-regexp)) (let ((files (dired-get-marked-files))) - (if (or (<= (length files) tumme-show-all-from-dir-max-files) - (and (> (length files) tumme-show-all-from-dir-max-files) + (if (or (<= (length files) image-dired-show-all-from-dir-max-files) + (and (> (length files) image-dired-show-all-from-dir-max-files) (y-or-n-p (format "Directory contains more than %d image files. Proceed? " - tumme-show-all-from-dir-max-files)))) + image-dired-show-all-from-dir-max-files)))) (progn - (tumme-display-thumbs) - (pop-to-buffer tumme-thumbnail-buffer)) + (image-dired-display-thumbs) + (pop-to-buffer image-dired-thumbnail-buffer)) (message "Cancelled.")))) ;;;###autoload -(defalias 'tumme 'tumme-show-all-from-dir) +(defalias 'image-dired 'image-dired-show-all-from-dir) + +;;;###autoload +(defalias 'tumme 'image-dired-show-all-from-dir) -(defun tumme-write-tags (file-tags) +(defun image-dired-write-tags (file-tags) "Write file tags to database. Write each file and tag in FILE-TAGS to the database. FILE-TAGS is an alist in the following form: ((FILE . TAG) ... )" (let (end file tag) - (with-temp-file tumme-db-file - (insert-file-contents tumme-db-file) + (with-temp-file image-dired-db-file + (insert-file-contents image-dired-db-file) (dolist (elt file-tags) (setq file (car elt) tag (cdr elt)) @@ -890,11 +888,11 @@ is an alist in the following form: (goto-char (point-max)) (insert (format "\n%s;%s" file tag))))))) -(defun tumme-remove-tag (files tag) +(defun image-dired-remove-tag (files tag) "For all FILES, remove TAG from the image database." (save-excursion (let (end buf start) - (setq buf (find-file tumme-db-file)) + (setq buf (find-file image-dired-db-file)) (if (not (listp files)) (if (stringp files) (setq files (list files)) @@ -924,11 +922,11 @@ is an alist in the following form: (save-buffer) (kill-buffer buf)))) -(defun tumme-list-tags (file) +(defun image-dired-list-tags (file) "Read all tags for image FILE from the image database." (save-excursion (let (end buf (tags "")) - (setq buf (find-file tumme-db-file)) + (setq buf (find-file image-dired-db-file)) (goto-char (point-min)) (when (search-forward-regexp (format "^%s" file) nil t) @@ -944,7 +942,7 @@ is an alist in the following form: (split-string tags ";")))) ;;;###autoload -(defun tumme-tag-files (arg) +(defun image-dired-tag-files (arg) "Tag marked file(s) in dired. With prefix ARG, tag file at point." (interactive "P") (let ((tag (read-string "Tags to add (separate tags with a semicolon): ")) @@ -952,22 +950,22 @@ is an alist in the following form: (if arg (setq files (list (dired-get-filename))) (setq files (dired-get-marked-files))) - (tumme-write-tags + (image-dired-write-tags (mapcar (lambda (x) (cons x tag)) files)))) -(defun tumme-tag-thumbnail () +(defun image-dired-tag-thumbnail () "Tag current thumbnail." (interactive) (let ((tag (read-string "Tags to add (separate tags with a semicolon): "))) - (tumme-write-tags (list (cons (tumme-original-file-name) tag)))) - (tumme-update-property - 'tags (tumme-list-tags (tumme-original-file-name)))) + (image-dired-write-tags (list (cons (image-dired-original-file-name) tag)))) + (image-dired-update-property + 'tags (image-dired-list-tags (image-dired-original-file-name)))) ;;;###autoload -(defun tumme-delete-tag (arg) +(defun image-dired-delete-tag (arg) "Remove tag for selected file(s). With prefix argument ARG, remove tag from file at point." (interactive "P") @@ -976,39 +974,39 @@ With prefix argument ARG, remove tag from file at point." (if arg (setq files (list (dired-get-filename))) (setq files (dired-get-marked-files))) - (tumme-remove-tag files tag))) + (image-dired-remove-tag files tag))) -(defun tumme-tag-thumbnail-remove () +(defun image-dired-tag-thumbnail-remove () "Remove tag from thumbnail." (interactive) (let ((tag (read-string "Tag to remove: "))) - (tumme-remove-tag (tumme-original-file-name) tag)) - (tumme-update-property - 'tags (tumme-list-tags (tumme-original-file-name)))) + (image-dired-remove-tag (image-dired-original-file-name) tag)) + (image-dired-update-property + 'tags (image-dired-list-tags (image-dired-original-file-name)))) -(defun tumme-original-file-name () +(defun image-dired-original-file-name () "Get original file name for thumbnail or display image at point." (get-text-property (point) 'original-file-name)) -(defun tumme-associated-dired-buffer () +(defun image-dired-associated-dired-buffer () "Get associated dired buffer at point." (get-text-property (point) 'associated-dired-buffer)) -(defun tumme-get-buffer-window (buf) +(defun image-dired-get-buffer-window (buf) "Return window where buffer BUF is." (get-window-with-predicate (lambda (window) (equal (window-buffer window) buf)) nil t)) -(defun tumme-track-original-file () +(defun image-dired-track-original-file () "Track the original file in the associated dired buffer. -See documentation for `tumme-toggle-movement-tracking'. Interactive -use only useful if `tumme-track-movement' is nil." +See documentation for `image-dired-toggle-movement-tracking'. Interactive +use only useful if `image-dired-track-movement' is nil." (interactive) (let ((old-buf (current-buffer)) - (dired-buf (tumme-associated-dired-buffer)) - (file-name (tumme-original-file-name))) + (dired-buf (image-dired-associated-dired-buffer)) + (file-name (image-dired-original-file-name))) (when (and (buffer-live-p dired-buf) file-name) (setq file-name (file-name-nondirectory file-name)) (set-buffer dired-buf) @@ -1017,28 +1015,28 @@ use only useful if `tumme-track-movement' is nil." (message "Could not track file") (dired-move-to-filename) (set-window-point - (tumme-get-buffer-window dired-buf) (point))) + (image-dired-get-buffer-window dired-buf) (point))) (set-buffer old-buf)))) -(defun tumme-toggle-movement-tracking () - "Turn on and off `tumme-track-movement'. +(defun image-dired-toggle-movement-tracking () + "Turn on and off `image-dired-track-movement'. Tracking of the movements between thumbnail and dired buffer so that they are \"mirrored\" in the dired buffer. When this is on, moving around in the thumbnail or dired buffer will find the matching position in the other buffer." (interactive) - (setq tumme-track-movement (not tumme-track-movement)) - (message "Tracking %s" (if tumme-track-movement "on" "off"))) + (setq image-dired-track-movement (not image-dired-track-movement)) + (message "Tracking %s" (if image-dired-track-movement "on" "off"))) -(defun tumme-track-thumbnail () - "Track current dired file's thumb in `tumme-thumbnail-buffer'. -This is almost the same as what `tumme-track-original-file' does, but +(defun image-dired-track-thumbnail () + "Track current dired file's thumb in `image-dired-thumbnail-buffer'. +This is almost the same as what `image-dired-track-original-file' does, but the other way around." (let ((file (dired-get-filename)) (old-buf (current-buffer)) prop-val found) - (when (get-buffer tumme-thumbnail-buffer) - (set-buffer tumme-thumbnail-buffer) + (when (get-buffer image-dired-thumbnail-buffer) + (set-buffer image-dired-thumbnail-buffer) (goto-char (point-min)) (while (and (not (eobp)) (not found)) @@ -1050,29 +1048,29 @@ the other way around." (forward-char 1))) (when found (set-window-point - (tumme-thumbnail-window) (point)) - (tumme-display-thumb-properties)) + (image-dired-thumbnail-window) (point)) + (image-dired-display-thumb-properties)) (set-buffer old-buf)))) -(defun tumme-dired-next-line (&optional arg) +(defun image-dired-dired-next-line (&optional arg) "Call `dired-next-line', then track thumbnail. This can safely replace `dired-next-line'. With prefix argument, move ARG lines." (interactive "P") (dired-next-line (or arg 1)) - (if tumme-track-movement - (tumme-track-thumbnail))) + (if image-dired-track-movement + (image-dired-track-thumbnail))) -(defun tumme-dired-previous-line (&optional arg) +(defun image-dired-dired-previous-line (&optional arg) "Call `dired-previous-line', then track thumbnail. This can safely replace `dired-previous-line'. With prefix argument, move ARG lines." (interactive "P") (dired-previous-line (or arg 1)) - (if tumme-track-movement - (tumme-track-thumbnail))) + (if image-dired-track-movement + (image-dired-track-thumbnail))) -(defun tumme-forward-image (&optional arg) +(defun image-dired-forward-image (&optional arg) "Move to next image and display properties. Optional prefix ARG says how many images to move; default is one image." @@ -1083,17 +1081,17 @@ image." (save-excursion (forward-char) (while (and (not (eobp)) - (not (tumme-image-at-point-p))) + (not (image-dired-image-at-point-p))) (forward-char)) (setq pos (point)) - (tumme-image-at-point-p))) + (image-dired-image-at-point-p))) (goto-char pos) (error "At last image")))) - (when tumme-track-movement - (tumme-track-original-file)) - (tumme-display-thumb-properties)) + (when image-dired-track-movement + (image-dired-track-original-file)) + (image-dired-display-thumb-properties)) -(defun tumme-backward-image (&optional arg) +(defun image-dired-backward-image (&optional arg) "Move to previous image and display properties. Optional prefix ARG says how many images to move; default is one image." @@ -1104,29 +1102,29 @@ image." (save-excursion (backward-char) (while (and (not (bobp)) - (not (tumme-image-at-point-p))) + (not (image-dired-image-at-point-p))) (backward-char)) (setq pos (point)) - (tumme-image-at-point-p))) + (image-dired-image-at-point-p))) (goto-char pos) (error "At first image")))) - (when tumme-track-movement - (tumme-track-original-file)) - (tumme-display-thumb-properties)) + (when image-dired-track-movement + (image-dired-track-original-file)) + (image-dired-display-thumb-properties)) -(defun tumme-next-line () +(defun image-dired-next-line () "Move to next line and display properties." (interactive) (next-line 1) ;; If we end up in an empty spot, back up to the next thumbnail. - (if (not (tumme-image-at-point-p)) - (tumme-backward-image)) - (if tumme-track-movement - (tumme-track-original-file)) - (tumme-display-thumb-properties)) + (if (not (image-dired-image-at-point-p)) + (image-dired-backward-image)) + (if image-dired-track-movement + (image-dired-track-original-file)) + (image-dired-display-thumb-properties)) -(defun tumme-previous-line () +(defun image-dired-previous-line () "Move to previous line and display properties." (interactive) (previous-line 1) @@ -1134,30 +1132,30 @@ image." ;; thumbnail. This should only happen if the user deleted a ;; thumbnail and did not refresh, so it is not very common. But we ;; can handle it in a good manner, so why not? - (if (not (tumme-image-at-point-p)) - (tumme-backward-image)) - (if tumme-track-movement - (tumme-track-original-file)) - (tumme-display-thumb-properties)) + (if (not (image-dired-image-at-point-p)) + (image-dired-backward-image)) + (if image-dired-track-movement + (image-dired-track-original-file)) + (image-dired-display-thumb-properties)) -(defun tumme-format-properties-string (buf file props comment) +(defun image-dired-format-properties-string (buf file props comment) "Format display properties. BUF is the associated dired buffer, FILE is the original image file name, PROPS is a list of tags and COMMENT is the image files's comment." (format-spec - tumme-display-properties-format + image-dired-display-properties-format (list (cons ?b (or buf "")) (cons ?f file) (cons ?t (or (princ props) "")) (cons ?c (or comment ""))))) -(defun tumme-display-thumb-properties () +(defun image-dired-display-thumb-properties () "Display thumbnail properties in the echo area." (if (not (eobp)) - (let ((file-name (file-name-nondirectory (tumme-original-file-name))) - (dired-buf (buffer-name (tumme-associated-dired-buffer))) + (let ((file-name (file-name-nondirectory (image-dired-original-file-name))) + (dired-buf (buffer-name (image-dired-associated-dired-buffer))) (props (mapconcat 'princ (get-text-property (point) 'tags) @@ -1165,26 +1163,26 @@ comment." (comment (get-text-property (point) 'comment))) (if file-name (message - (tumme-format-properties-string + (image-dired-format-properties-string dired-buf file-name props comment)))))) -(defun tumme-dired-file-marked-p () +(defun image-dired-dired-file-marked-p () "Check whether file on current line is marked or not." (save-excursion (beginning-of-line) (not (looking-at "^ .*$")))) -(defun tumme-modify-mark-on-thumb-original-file (command) +(defun image-dired-modify-mark-on-thumb-original-file (command) "Modify mark in dired buffer. This is quite ugly but I don't know how to implemented in a better way. COMMAND is one of 'mark for marking file in dired, 'unmark for unmarking file in dired or 'flag for flagging file for delete in dired." - (let ((file-name (tumme-original-file-name)) - (dired-buf (tumme-associated-dired-buffer))) + (let ((file-name (image-dired-original-file-name)) + (dired-buf (image-dired-associated-dired-buffer))) (if (not (and dired-buf file-name)) (message "No image, or image with correct properties, at point.") (with-current-buffer dired-buf @@ -1195,42 +1193,42 @@ dired." (cond ((eq command 'mark) (dired-mark 1)) ((eq command 'unmark) (dired-unmark 1)) ((eq command 'toggle) - (if (tumme-dired-file-marked-p) + (if (image-dired-dired-file-marked-p) (dired-unmark 1) (dired-mark 1))) ((eq command 'flag) (dired-flag-file-deletion 1)))))))) -(defun tumme-mark-thumb-original-file () +(defun image-dired-mark-thumb-original-file () "Mark original image file in associated dired buffer." (interactive) - (tumme-modify-mark-on-thumb-original-file 'mark) - (tumme-forward-image)) + (image-dired-modify-mark-on-thumb-original-file 'mark) + (image-dired-forward-image)) -(defun tumme-unmark-thumb-original-file () +(defun image-dired-unmark-thumb-original-file () "Unmark original image file in associated dired buffer." (interactive) - (tumme-modify-mark-on-thumb-original-file 'unmark) - (tumme-forward-image)) + (image-dired-modify-mark-on-thumb-original-file 'unmark) + (image-dired-forward-image)) -(defun tumme-flag-thumb-original-file () +(defun image-dired-flag-thumb-original-file () "Flag original image file for deletion in associated dired buffer." (interactive) - (tumme-modify-mark-on-thumb-original-file 'flag) - (tumme-forward-image)) + (image-dired-modify-mark-on-thumb-original-file 'flag) + (image-dired-forward-image)) -(defun tumme-toggle-mark-thumb-original-file () +(defun image-dired-toggle-mark-thumb-original-file () "Toggle mark on original image file in associated dired buffer." (interactive) - (tumme-modify-mark-on-thumb-original-file 'toggle)) + (image-dired-modify-mark-on-thumb-original-file 'toggle)) -(defun tumme-jump-original-dired-buffer () +(defun image-dired-jump-original-dired-buffer () "Jump to the dired buffer associated with the current image file. You probably want to use this together with -`tumme-track-original-file'." +`image-dired-track-original-file'." (interactive) - (let ((buf (tumme-associated-dired-buffer)) + (let ((buf (image-dired-associated-dired-buffer)) window frame) - (setq window (tumme-get-buffer-window buf)) + (setq window (image-dired-get-buffer-window buf)) (if window (progn (if (not (equal (selected-frame) (setq frame (window-frame window)))) @@ -1239,10 +1237,10 @@ You probably want to use this together with (message "Associated dired buffer not visible")))) ;;;###autoload -(defun tumme-jump-thumbnail-buffer () +(defun image-dired-jump-thumbnail-buffer () "Jump to thumbnail buffer." (interactive) - (let ((window (tumme-thumbnail-window)) + (let ((window (image-dired-thumbnail-window)) frame) (if window (progn @@ -1251,327 +1249,327 @@ You probably want to use this together with (select-window window)) (message "Thumbnail buffer not visible")))) -(defvar tumme-thumbnail-mode-map (make-sparse-keymap) - "Keymap for `tumme-thumbnail-mode'.") +(defvar image-dired-thumbnail-mode-map (make-sparse-keymap) + "Keymap for `image-dired-thumbnail-mode'.") -(defvar tumme-thumbnail-mode-line-up-map (make-sparse-keymap) - "Keymap for line-up commands in `tumme-thumbnail-mode'.") +(defvar image-dired-thumbnail-mode-line-up-map (make-sparse-keymap) + "Keymap for line-up commands in `image-dired-thumbnail-mode'.") -(defvar tumme-thumbnail-mode-tag-map (make-sparse-keymap) - "Keymap for tag commands in `tumme-thumbnail-mode'.") +(defvar image-dired-thumbnail-mode-tag-map (make-sparse-keymap) + "Keymap for tag commands in `image-dired-thumbnail-mode'.") -(defun tumme-define-thumbnail-mode-keymap () - "Define keymap for `tumme-thumbnail-mode'." +(defun image-dired-define-thumbnail-mode-keymap () + "Define keymap for `image-dired-thumbnail-mode'." ;; Keys - (define-key tumme-thumbnail-mode-map [right] 'tumme-forward-image) - (define-key tumme-thumbnail-mode-map [left] 'tumme-backward-image) - (define-key tumme-thumbnail-mode-map [up] 'tumme-previous-line) - (define-key tumme-thumbnail-mode-map [down] 'tumme-next-line) - (define-key tumme-thumbnail-mode-map "\C-f" 'tumme-forward-image) - (define-key tumme-thumbnail-mode-map "\C-b" 'tumme-backward-image) - (define-key tumme-thumbnail-mode-map "\C-p" 'tumme-previous-line) - (define-key tumme-thumbnail-mode-map "\C-n" 'tumme-next-line) - - (define-key tumme-thumbnail-mode-map "d" 'tumme-flag-thumb-original-file) - (define-key tumme-thumbnail-mode-map [delete] - 'tumme-flag-thumb-original-file) - (define-key tumme-thumbnail-mode-map "m" 'tumme-mark-thumb-original-file) - (define-key tumme-thumbnail-mode-map "u" 'tumme-unmark-thumb-original-file) - (define-key tumme-thumbnail-mode-map "." 'tumme-track-original-file) - (define-key tumme-thumbnail-mode-map [tab] 'tumme-jump-original-dired-buffer) + (define-key image-dired-thumbnail-mode-map [right] 'image-dired-forward-image) + (define-key image-dired-thumbnail-mode-map [left] 'image-dired-backward-image) + (define-key image-dired-thumbnail-mode-map [up] 'image-dired-previous-line) + (define-key image-dired-thumbnail-mode-map [down] 'image-dired-next-line) + (define-key image-dired-thumbnail-mode-map "\C-f" 'image-dired-forward-image) + (define-key image-dired-thumbnail-mode-map "\C-b" 'image-dired-backward-image) + (define-key image-dired-thumbnail-mode-map "\C-p" 'image-dired-previous-line) + (define-key image-dired-thumbnail-mode-map "\C-n" 'image-dired-next-line) + + (define-key image-dired-thumbnail-mode-map "d" 'image-dired-flag-thumb-original-file) + (define-key image-dired-thumbnail-mode-map [delete] + 'image-dired-flag-thumb-original-file) + (define-key image-dired-thumbnail-mode-map "m" 'image-dired-mark-thumb-original-file) + (define-key image-dired-thumbnail-mode-map "u" 'image-dired-unmark-thumb-original-file) + (define-key image-dired-thumbnail-mode-map "." 'image-dired-track-original-file) + (define-key image-dired-thumbnail-mode-map [tab] 'image-dired-jump-original-dired-buffer) ;; add line-up map - (define-key tumme-thumbnail-mode-map "g" tumme-thumbnail-mode-line-up-map) + (define-key image-dired-thumbnail-mode-map "g" image-dired-thumbnail-mode-line-up-map) ;; map it to "g" so that the user can press it more quickly - (define-key tumme-thumbnail-mode-line-up-map "g" 'tumme-line-up-dynamic) + (define-key image-dired-thumbnail-mode-line-up-map "g" 'image-dired-line-up-dynamic) ;; "f" for "fixed" number of thumbs per row - (define-key tumme-thumbnail-mode-line-up-map "f" 'tumme-line-up) + (define-key image-dired-thumbnail-mode-line-up-map "f" 'image-dired-line-up) ;; "i" for "interactive" - (define-key tumme-thumbnail-mode-line-up-map "i" 'tumme-line-up-interactive) + (define-key image-dired-thumbnail-mode-line-up-map "i" 'image-dired-line-up-interactive) ;; add tag map - (define-key tumme-thumbnail-mode-map "t" tumme-thumbnail-mode-tag-map) + (define-key image-dired-thumbnail-mode-map "t" image-dired-thumbnail-mode-tag-map) ;; map it to "t" so that the user can press it more quickly - (define-key tumme-thumbnail-mode-tag-map "t" 'tumme-tag-thumbnail) + (define-key image-dired-thumbnail-mode-tag-map "t" 'image-dired-tag-thumbnail) ;; "r" for "remove" - (define-key tumme-thumbnail-mode-tag-map "r" 'tumme-tag-thumbnail-remove) + (define-key image-dired-thumbnail-mode-tag-map "r" 'image-dired-tag-thumbnail-remove) - (define-key tumme-thumbnail-mode-map "\C-m" - 'tumme-display-thumbnail-original-image) - (define-key tumme-thumbnail-mode-map [C-return] - 'tumme-thumbnail-display-external) + (define-key image-dired-thumbnail-mode-map "\C-m" + 'image-dired-display-thumbnail-original-image) + (define-key image-dired-thumbnail-mode-map [C-return] + 'image-dired-thumbnail-display-external) - (define-key tumme-thumbnail-mode-map "l" 'tumme-rotate-thumbnail-left) - (define-key tumme-thumbnail-mode-map "r" 'tumme-rotate-thumbnail-right) + (define-key image-dired-thumbnail-mode-map "l" 'image-dired-rotate-thumbnail-left) + (define-key image-dired-thumbnail-mode-map "r" 'image-dired-rotate-thumbnail-right) - (define-key tumme-thumbnail-mode-map "L" 'tumme-rotate-original-left) - (define-key tumme-thumbnail-mode-map "R" 'tumme-rotate-original-right) + (define-key image-dired-thumbnail-mode-map "L" 'image-dired-rotate-original-left) + (define-key image-dired-thumbnail-mode-map "R" 'image-dired-rotate-original-right) - (define-key tumme-thumbnail-mode-map "D" - 'tumme-thumbnail-set-image-description) + (define-key image-dired-thumbnail-mode-map "D" + 'image-dired-thumbnail-set-image-description) - (define-key tumme-thumbnail-mode-map "\C-d" 'tumme-delete-char) - (define-key tumme-thumbnail-mode-map " " - 'tumme-display-next-thumbnail-original) - (define-key tumme-thumbnail-mode-map - (kbd "DEL") 'tumme-display-previous-thumbnail-original) - (define-key tumme-thumbnail-mode-map "c" 'tumme-comment-thumbnail) - (define-key tumme-thumbnail-mode-map "q" 'tumme-kill-buffer-and-window) + (define-key image-dired-thumbnail-mode-map "\C-d" 'image-dired-delete-char) + (define-key image-dired-thumbnail-mode-map " " + 'image-dired-display-next-thumbnail-original) + (define-key image-dired-thumbnail-mode-map + (kbd "DEL") 'image-dired-display-previous-thumbnail-original) + (define-key image-dired-thumbnail-mode-map "c" 'image-dired-comment-thumbnail) + (define-key image-dired-thumbnail-mode-map "q" 'image-dired-kill-buffer-and-window) ;; Mouse - (define-key tumme-thumbnail-mode-map [mouse-2] 'tumme-mouse-display-image) - (define-key tumme-thumbnail-mode-map [mouse-1] 'tumme-mouse-select-thumbnail) + (define-key image-dired-thumbnail-mode-map [mouse-2] 'image-dired-mouse-display-image) + (define-key image-dired-thumbnail-mode-map [mouse-1] 'image-dired-mouse-select-thumbnail) ;; Seems I must first set C-down-mouse-1 to undefined, or else it ;; will trigger the buffer menu. If I try to instead bind - ;; C-down-mouse-1 to `tumme-mouse-toggle-mark', I get a message + ;; C-down-mouse-1 to `image-dired-mouse-toggle-mark', I get a message ;; about C-mouse-1 not being defined afterwards. Annoying, but I ;; probably do not completely understand mouse events. - (define-key tumme-thumbnail-mode-map [C-down-mouse-1] 'undefined) - (define-key tumme-thumbnail-mode-map [C-mouse-1] 'tumme-mouse-toggle-mark) + (define-key image-dired-thumbnail-mode-map [C-down-mouse-1] 'undefined) + (define-key image-dired-thumbnail-mode-map [C-mouse-1] 'image-dired-mouse-toggle-mark) ;; Menu - (define-key tumme-thumbnail-mode-map [menu-bar tumme] - (cons "Tumme" (make-sparse-keymap "Tumme"))) - - (define-key tumme-thumbnail-mode-map - [menu-bar tumme tumme-kill-buffer-and-window] - '("Quit" . tumme-kill-buffer-and-window)) - - (define-key tumme-thumbnail-mode-map - [menu-bar tumme tumme-delete-char] - '("Delete thumbnail from buffer" . tumme-delete-char)) - - (define-key tumme-thumbnail-mode-map - [menu-bar tumme tumme-tag-thumbnail-remove] - '("Remove tag from thumbnail" . tumme-tag-thumbnail-remove)) - - (define-key tumme-thumbnail-mode-map - [menu-bar tumme tumme-tag-thumbnail] - '("Tag thumbnail" . tumme-tag-thumbnail)) - - (define-key tumme-thumbnail-mode-map - [menu-bar tumme tumme-comment-thumbnail] - '("Comment thumbnail" . tumme-comment-thumbnail)) - - (define-key tumme-thumbnail-mode-map - [menu-bar tumme tumme-refresh-thumb] - '("Refresh thumb" . tumme-refresh-thumb)) - (define-key tumme-thumbnail-mode-map - [menu-bar tumme tumme-line-up-dynamic] - '("Dynamic line up" . tumme-line-up-dynamic)) - (define-key tumme-thumbnail-mode-map - [menu-bar tumme tumme-line-up] - '("Line up thumbnails" . tumme-line-up)) - - (define-key tumme-thumbnail-mode-map - [menu-bar tumme tumme-rotate-thumbnail-left] - '("Rotate thumbnail left" . tumme-rotate-thumbnail-left)) - (define-key tumme-thumbnail-mode-map - [menu-bar tumme tumme-rotate-thumbnail-right] - '("Rotate thumbnail right" . tumme-rotate-thumbnail-right)) - - (define-key tumme-thumbnail-mode-map - [menu-bar tumme tumme-rotate-original-left] - '("Rotate original left" . tumme-rotate-original-left)) - (define-key tumme-thumbnail-mode-map - [menu-bar tumme tumme-rotate-original-right] - '("Rotate original right" . tumme-rotate-original-right)) - - (define-key tumme-thumbnail-mode-map - [menu-bar tumme tumme-toggle-movement-tracking] - '("Toggle movement tracking on/off" . tumme-toggle-movement-tracking)) - - (define-key tumme-thumbnail-mode-map - [menu-bar tumme tumme-jump-original-dired-buffer] - '("Jump to dired buffer" . tumme-jump-original-dired-buffer)) - (define-key tumme-thumbnail-mode-map - [menu-bar tumme tumme-track-original-file] - '("Track original" . tumme-track-original-file)) - - (define-key tumme-thumbnail-mode-map - [menu-bar tumme tumme-flag-thumb-original-file] - '("Flag original for deletion" . tumme-flag-thumb-original-file)) - (define-key tumme-thumbnail-mode-map - [menu-bar tumme tumme-unmark-thumb-original-file] - '("Unmark original" . tumme-unmark-thumb-original-file)) - (define-key tumme-thumbnail-mode-map - [menu-bar tumme tumme-mark-thumb-original-file] - '("Mark original" . tumme-mark-thumb-original-file)) - - (define-key tumme-thumbnail-mode-map - [menu-bar tumme tumme-thumbnail-display-external] - '("Display in external viewer" . tumme-thumbnail-display-external)) - (define-key tumme-thumbnail-mode-map - [menu-bar tumme tumme-display-thumbnail-original-image] - '("Display image" . tumme-display-thumbnail-original-image))) - -(defvar tumme-display-image-mode-map (make-sparse-keymap) - "Keymap for `tumme-display-image-mode'.") - -(defun tumme-define-display-image-mode-keymap () - "Define keymap for `tumme-display-image-mode'." + (define-key image-dired-thumbnail-mode-map [menu-bar image-dired] + (cons "Image-Dired" (make-sparse-keymap "Image-Dired"))) + + (define-key image-dired-thumbnail-mode-map + [menu-bar image-dired image-dired-kill-buffer-and-window] + '("Quit" . image-dired-kill-buffer-and-window)) + + (define-key image-dired-thumbnail-mode-map + [menu-bar image-dired image-dired-delete-char] + '("Delete thumbnail from buffer" . image-dired-delete-char)) + + (define-key image-dired-thumbnail-mode-map + [menu-bar image-dired image-dired-tag-thumbnail-remove] + '("Remove tag from thumbnail" . image-dired-tag-thumbnail-remove)) + + (define-key image-dired-thumbnail-mode-map + [menu-bar image-dired image-dired-tag-thumbnail] + '("Tag thumbnail" . image-dired-tag-thumbnail)) + + (define-key image-dired-thumbnail-mode-map + [menu-bar image-dired image-dired-comment-thumbnail] + '("Comment thumbnail" . image-dired-comment-thumbnail)) + + (define-key image-dired-thumbnail-mode-map + [menu-bar image-dired image-dired-refresh-thumb] + '("Refresh thumb" . image-dired-refresh-thumb)) + (define-key image-dired-thumbnail-mode-map + [menu-bar image-dired image-dired-line-up-dynamic] + '("Dynamic line up" . image-dired-line-up-dynamic)) + (define-key image-dired-thumbnail-mode-map + [menu-bar image-dired image-dired-line-up] + '("Line up thumbnails" . image-dired-line-up)) + + (define-key image-dired-thumbnail-mode-map + [menu-bar image-dired image-dired-rotate-thumbnail-left] + '("Rotate thumbnail left" . image-dired-rotate-thumbnail-left)) + (define-key image-dired-thumbnail-mode-map + [menu-bar image-dired image-dired-rotate-thumbnail-right] + '("Rotate thumbnail right" . image-dired-rotate-thumbnail-right)) + + (define-key image-dired-thumbnail-mode-map + [menu-bar image-dired image-dired-rotate-original-left] + '("Rotate original left" . image-dired-rotate-original-left)) + (define-key image-dired-thumbnail-mode-map + [menu-bar image-dired image-dired-rotate-original-right] + '("Rotate original right" . image-dired-rotate-original-right)) + + (define-key image-dired-thumbnail-mode-map + [menu-bar image-dired image-dired-toggle-movement-tracking] + '("Toggle movement tracking on/off" . image-dired-toggle-movement-tracking)) + + (define-key image-dired-thumbnail-mode-map + [menu-bar image-dired image-dired-jump-original-dired-buffer] + '("Jump to dired buffer" . image-dired-jump-original-dired-buffer)) + (define-key image-dired-thumbnail-mode-map + [menu-bar image-dired image-dired-track-original-file] + '("Track original" . image-dired-track-original-file)) + + (define-key image-dired-thumbnail-mode-map + [menu-bar image-dired image-dired-flag-thumb-original-file] + '("Flag original for deletion" . image-dired-flag-thumb-original-file)) + (define-key image-dired-thumbnail-mode-map + [menu-bar image-dired image-dired-unmark-thumb-original-file] + '("Unmark original" . image-dired-unmark-thumb-original-file)) + (define-key image-dired-thumbnail-mode-map + [menu-bar image-dired image-dired-mark-thumb-original-file] + '("Mark original" . image-dired-mark-thumb-original-file)) + + (define-key image-dired-thumbnail-mode-map + [menu-bar image-dired image-dired-thumbnail-display-external] + '("Display in external viewer" . image-dired-thumbnail-display-external)) + (define-key image-dired-thumbnail-mode-map + [menu-bar image-dired image-dired-display-thumbnail-original-image] + '("Display image" . image-dired-display-thumbnail-original-image))) + +(defvar image-dired-display-image-mode-map (make-sparse-keymap) + "Keymap for `image-dired-display-image-mode'.") + +(defun image-dired-define-display-image-mode-keymap () + "Define keymap for `image-dired-display-image-mode'." ;; Keys - (define-key tumme-display-image-mode-map "q" 'tumme-kill-buffer-and-window) + (define-key image-dired-display-image-mode-map "q" 'image-dired-kill-buffer-and-window) - (define-key tumme-display-image-mode-map "f" - 'tumme-display-current-image-full) + (define-key image-dired-display-image-mode-map "f" + 'image-dired-display-current-image-full) - (define-key tumme-display-image-mode-map "s" - 'tumme-display-current-image-sized) + (define-key image-dired-display-image-mode-map "s" + 'image-dired-display-current-image-sized) ;; Menu - (define-key tumme-display-image-mode-map [menu-bar tumme] - (cons "Tumme" (make-sparse-keymap "Tumme"))) + (define-key image-dired-display-image-mode-map [menu-bar image-dired] + (cons "Image-Dired" (make-sparse-keymap "Image-Dired"))) - (define-key tumme-display-image-mode-map - [menu-bar tumme tumme-kill-buffer-and-window] - '("Quit" . tumme-kill-buffer-and-window)) + (define-key image-dired-display-image-mode-map + [menu-bar image-dired image-dired-kill-buffer-and-window] + '("Quit" . image-dired-kill-buffer-and-window)) - (define-key tumme-display-image-mode-map - [menu-bar tumme tumme-display-current-image-sized] - '("Display original, sized to fit" . tumme-display-current-image-sized)) + (define-key image-dired-display-image-mode-map + [menu-bar image-dired image-dired-display-current-image-sized] + '("Display original, sized to fit" . image-dired-display-current-image-sized)) - (define-key tumme-display-image-mode-map - [menu-bar tumme tumme-display-current-image-full] - '("Display original, full size" . tumme-display-current-image-full)) + (define-key image-dired-display-image-mode-map + [menu-bar image-dired image-dired-display-current-image-full] + '("Display original, full size" . image-dired-display-current-image-full)) ) -(defun tumme-display-current-image-full () +(defun image-dired-display-current-image-full () "Display current image in full size." (interactive) - (let ((file (tumme-original-file-name))) + (let ((file (image-dired-original-file-name))) (if file (progn - (tumme-display-image file t) + (image-dired-display-image file t) (message "Full size image displayed")) (error "No original file name at point")))) -(defun tumme-display-current-image-sized () +(defun image-dired-display-current-image-sized () "Display current image in sized to fit window dimensions." (interactive) - (let ((file (tumme-original-file-name))) + (let ((file (image-dired-original-file-name))) (if file (progn - (tumme-display-image file) + (image-dired-display-image file) (message "Full size image displayed")) (error "No original file name at point")))) -(define-derived-mode tumme-thumbnail-mode - fundamental-mode "tumme-thumbnail" +(define-derived-mode image-dired-thumbnail-mode + fundamental-mode "image-dired-thumbnail" "Browse and manipulate thumbnail images using dired. -Use `tumme-dired' and `tumme-setup-dired-keybindings' to get a +Use `image-dired-dired' and `image-dired-setup-dired-keybindings' to get a nice setup to start with." - (tumme-define-thumbnail-mode-keymap) - (message "tumme-thumbnail-mode enabled")) + (image-dired-define-thumbnail-mode-keymap) + (message "image-dired-thumbnail-mode enabled")) -(define-derived-mode tumme-display-image-mode - fundamental-mode "tumme-image-display" +(define-derived-mode image-dired-display-image-mode + fundamental-mode "image-dired-image-display" "Mode for displaying and manipulating original image. Resized or in full-size." - (tumme-define-display-image-mode-keymap) - (message "tumme-display-image-mode enabled")) + (image-dired-define-display-image-mode-keymap) + (message "image-dired-display-image-mode enabled")) ;;;###autoload -(defun tumme-setup-dired-keybindings () +(defun image-dired-setup-dired-keybindings () "Setup easy-to-use keybindings for the commands to be used in dired mode. Note that n, p and <down> and <up> will be hijacked and bound to -`tumme-dired-x-line'." +`image-dired-dired-x-line'." (interactive) ;; Hijack previous and next line movement. Let C-p and C-b be ;; though... - (define-key dired-mode-map "p" 'tumme-dired-previous-line) - (define-key dired-mode-map "n" 'tumme-dired-next-line) - (define-key dired-mode-map [up] 'tumme-dired-previous-line) - (define-key dired-mode-map [down] 'tumme-dired-next-line) - - (define-key dired-mode-map (kbd "C-S-n") 'tumme-next-line-and-display) - (define-key dired-mode-map (kbd "C-S-p") 'tumme-previous-line-and-display) - (define-key dired-mode-map (kbd "C-S-m") 'tumme-mark-and-display-next) - - (define-key dired-mode-map "\C-td" 'tumme-display-thumbs) - (define-key dired-mode-map "\C-tt" 'tumme-tag-files) - (define-key dired-mode-map "\C-tr" 'tumme-delete-tag) - (define-key dired-mode-map [tab] 'tumme-jump-thumbnail-buffer) - (define-key dired-mode-map "\C-ti" 'tumme-dired-display-image) - (define-key dired-mode-map "\C-tx" 'tumme-dired-display-external) - (define-key dired-mode-map "\C-ta" 'tumme-display-thumbs-append) - (define-key dired-mode-map "\C-t." 'tumme-display-thumb) - (define-key dired-mode-map "\C-tc" 'tumme-dired-comment-files) - (define-key dired-mode-map "\C-tf" 'tumme-mark-tagged-files) + (define-key dired-mode-map "p" 'image-dired-dired-previous-line) + (define-key dired-mode-map "n" 'image-dired-dired-next-line) + (define-key dired-mode-map [up] 'image-dired-dired-previous-line) + (define-key dired-mode-map [down] 'image-dired-dired-next-line) + + (define-key dired-mode-map (kbd "C-S-n") 'image-dired-next-line-and-display) + (define-key dired-mode-map (kbd "C-S-p") 'image-dired-previous-line-and-display) + (define-key dired-mode-map (kbd "C-S-m") 'image-dired-mark-and-display-next) + + (define-key dired-mode-map "\C-td" 'image-dired-display-thumbs) + (define-key dired-mode-map "\C-tt" 'image-dired-tag-files) + (define-key dired-mode-map "\C-tr" 'image-dired-delete-tag) + (define-key dired-mode-map [tab] 'image-dired-jump-thumbnail-buffer) + (define-key dired-mode-map "\C-ti" 'image-dired-dired-display-image) + (define-key dired-mode-map "\C-tx" 'image-dired-dired-display-external) + (define-key dired-mode-map "\C-ta" 'image-dired-display-thumbs-append) + (define-key dired-mode-map "\C-t." 'image-dired-display-thumb) + (define-key dired-mode-map "\C-tc" 'image-dired-dired-comment-files) + (define-key dired-mode-map "\C-tf" 'image-dired-mark-tagged-files) ;; Menu for dired - (define-key dired-mode-map [menu-bar tumme] - (cons "Tumme" (make-sparse-keymap "Tumme"))) + (define-key dired-mode-map [menu-bar image-dired] + (cons "Image-Dired" (make-sparse-keymap "Image-Dired"))) - (define-key dired-mode-map [menu-bar tumme tumme-copy-with-exif-file-name] - '("Copy with EXIF file name" . tumme-copy-with-exif-file-name)) + (define-key dired-mode-map [menu-bar image-dired image-dired-copy-with-exif-file-name] + '("Copy with EXIF file name" . image-dired-copy-with-exif-file-name)) - (define-key dired-mode-map [menu-bar tumme tumme-dired-comment-files] - '("Comment files" . tumme-dired-comment-files)) + (define-key dired-mode-map [menu-bar image-dired image-dired-dired-comment-files] + '("Comment files" . image-dired-dired-comment-files)) - (define-key dired-mode-map [menu-bar tumme tumme-mark-tagged-files] - '("Mark tagged files" . tumme-mark-tagged-files)) + (define-key dired-mode-map [menu-bar image-dired image-dired-mark-tagged-files] + '("Mark tagged files" . image-dired-mark-tagged-files)) - (define-key dired-mode-map [menu-bar tumme tumme-delete-tag] - '("Remove tag from files" . tumme-delete-tag)) + (define-key dired-mode-map [menu-bar image-dired image-dired-delete-tag] + '("Remove tag from files" . image-dired-delete-tag)) - (define-key dired-mode-map [menu-bar tumme tumme-tag-files] - '("Tag files" . tumme-tag-files)) + (define-key dired-mode-map [menu-bar image-dired image-dired-tag-files] + '("Tag files" . image-dired-tag-files)) - (define-key dired-mode-map [menu-bar tumme tumme-jump-thumbnail-buffer] - '("Jump to thumbnail buffer" . tumme-jump-thumbnail-buffer)) + (define-key dired-mode-map [menu-bar image-dired image-dired-jump-thumbnail-buffer] + '("Jump to thumbnail buffer" . image-dired-jump-thumbnail-buffer)) - (define-key dired-mode-map [menu-bar tumme tumme-toggle-movement-tracking] - '("Toggle movement tracking" . tumme-toggle-movement-tracking)) + (define-key dired-mode-map [menu-bar image-dired image-dired-toggle-movement-tracking] + '("Toggle movement tracking" . image-dired-toggle-movement-tracking)) (define-key dired-mode-map - [menu-bar tumme tumme-toggle-append-browsing] - '("Toggle append browsing" . tumme-toggle-append-browsing)) + [menu-bar image-dired image-dired-toggle-append-browsing] + '("Toggle append browsing" . image-dired-toggle-append-browsing)) (define-key dired-mode-map - [menu-bar tumme tumme-toggle-disp-props] - '("Toggle display properties" . tumme-toggle-dired-display-properties)) + [menu-bar image-dired image-dired-toggle-disp-props] + '("Toggle display properties" . image-dired-toggle-dired-display-properties)) (define-key dired-mode-map - [menu-bar tumme tumme-dired-display-external] - '("Display in external viewer" . tumme-dired-display-external)) + [menu-bar image-dired image-dired-dired-display-external] + '("Display in external viewer" . image-dired-dired-display-external)) (define-key dired-mode-map - [menu-bar tumme tumme-dired-display-image] - '("Display image" . tumme-dired-display-image)) + [menu-bar image-dired image-dired-dired-display-image] + '("Display image" . image-dired-dired-display-image)) (define-key dired-mode-map - [menu-bar tumme tumme-display-thumb] - '("Display this thumbnail" . tumme-display-thumb)) + [menu-bar image-dired image-dired-display-thumb] + '("Display this thumbnail" . image-dired-display-thumb)) (define-key dired-mode-map - [menu-bar tumme tumme-display-thumbs-append] - '("Display thumbnails append" . tumme-display-thumbs-append)) + [menu-bar image-dired image-dired-display-thumbs-append] + '("Display thumbnails append" . image-dired-display-thumbs-append)) (define-key dired-mode-map - [menu-bar tumme tumme-display-thumbs] - '("Display thumbnails" . tumme-display-thumbs)) + [menu-bar image-dired image-dired-display-thumbs] + '("Display thumbnails" . image-dired-display-thumbs)) (define-key dired-mode-map - [menu-bar tumme tumme-create-thumbs] - '("Create thumbnails for marked files" . tumme-create-thumbs)) + [menu-bar image-dired image-dired-create-thumbs] + '("Create thumbnails for marked files" . image-dired-create-thumbs)) (define-key dired-mode-map - [menu-bar tumme tumme-mark-and-display-next] - '("Mark and display next" . tumme-mark-and-display-next)) + [menu-bar image-dired image-dired-mark-and-display-next] + '("Mark and display next" . image-dired-mark-and-display-next)) (define-key dired-mode-map - [menu-bar tumme tumme-previous-line-and-display] - '("Display thumb for previous file" . tumme-previous-line-and-display)) + [menu-bar image-dired image-dired-previous-line-and-display] + '("Display thumb for previous file" . image-dired-previous-line-and-display)) (define-key dired-mode-map - [menu-bar tumme tumme-next-line-and-display] - '("Display thumb for next file" . tumme-next-line-and-display))) + [menu-bar image-dired image-dired-next-line-and-display] + '("Display thumb for next file" . image-dired-next-line-and-display))) -(defun tumme-create-thumbs (&optional arg) +(defun image-dired-create-thumbs (&optional arg) "Create thumbnail images for all marked files in dired. With prefix argument ARG, create thumbnails even if they already exist \(i.e. use this to refresh your thumbnails)." @@ -1580,7 +1578,7 @@ With prefix argument ARG, create thumbnails even if they already exist (setq files (dired-get-marked-files)) (mapcar (lambda (curr-file) - (setq thumb-name (tumme-thumb-name curr-file)) + (setq thumb-name (image-dired-thumb-name curr-file)) ;; If the user overrides the exist check, we must clear the ;; image cache so that if the user wants to display the ;; thumnail, it is not fetched from cache. @@ -1588,49 +1586,49 @@ With prefix argument ARG, create thumbnails even if they already exist (clear-image-cache)) (if (or (not (file-exists-p thumb-name)) arg) - (if (not (= 0 (tumme-create-thumb curr-file - (tumme-thumb-name curr-file)))) + (if (not (= 0 (image-dired-create-thumb curr-file + (image-dired-thumb-name curr-file)))) (error "Thumb could not be created")))) files))) -(defvar tumme-slideshow-timer nil +(defvar image-dired-slideshow-timer nil "Slideshow timer.") -(defvar tumme-slideshow-count 0 +(defvar image-dired-slideshow-count 0 "Keeping track on number of images in slideshow.") -(defvar tumme-slideshow-times 0 +(defvar image-dired-slideshow-times 0 "Number of pictures to display in slideshow.") -(defun tumme-slideshow-step () - "Step to next file, if `tumme-slideshow-times' has not been reached." - (if (< tumme-slideshow-count tumme-slideshow-times) +(defun image-dired-slideshow-step () + "Step to next file, if `image-dired-slideshow-times' has not been reached." + (if (< image-dired-slideshow-count image-dired-slideshow-times) (progn - (message "%s" (1+ tumme-slideshow-count)) - (setq tumme-slideshow-count (1+ tumme-slideshow-count)) - (tumme-next-line-and-display)) - (tumme-slideshow-stop))) + (message "%s" (1+ image-dired-slideshow-count)) + (setq image-dired-slideshow-count (1+ image-dired-slideshow-count)) + (image-dired-next-line-and-display)) + (image-dired-slideshow-stop))) -(defun tumme-slideshow-start () +(defun image-dired-slideshow-start () "Start slideshow. Ask user for number of images to show and the delay in between." (interactive) - (setq tumme-slideshow-count 0) - (setq tumme-slideshow-times (string-to-number (read-string "How many: "))) + (setq image-dired-slideshow-count 0) + (setq image-dired-slideshow-times (string-to-number (read-string "How many: "))) (let ((repeat (string-to-number (read-string "Delay, in seconds. Decimals are accepted : " "1")))) - (setq tumme-slideshow-timer + (setq image-dired-slideshow-timer (run-with-timer 0 repeat - 'tumme-slideshow-step)))) + 'image-dired-slideshow-step)))) -(defun tumme-slideshow-stop () +(defun image-dired-slideshow-stop () "Cancel slideshow." (interactive) - (cancel-timer tumme-slideshow-timer)) + (cancel-timer image-dired-slideshow-timer)) -(defun tumme-delete-char () +(defun image-dired-delete-char () "Remove current thumbnail from thumbnail buffer and line up." (interactive) (let ((inhibit-read-only t)) @@ -1639,133 +1637,133 @@ Ask user for number of images to show and the delay in between." (delete-char 1)))) ;;;###autoload -(defun tumme-display-thumbs-append () - "Append thumbnails to `tumme-thumbnail-buffer'." +(defun image-dired-display-thumbs-append () + "Append thumbnails to `image-dired-thumbnail-buffer'." (interactive) - (tumme-display-thumbs nil t t)) + (image-dired-display-thumbs nil t t)) ;;;###autoload -(defun tumme-display-thumb () - "Shorthand for `tumme-display-thumbs' with prefix argument." +(defun image-dired-display-thumb () + "Shorthand for `image-dired-display-thumbs' with prefix argument." (interactive) - (tumme-display-thumbs t nil t)) + (image-dired-display-thumbs t nil t)) -(defun tumme-line-up () - "Line up thumbnails according to `tumme-thumbs-per-row'. -See also `tumme-line-up-dynamic'." +(defun image-dired-line-up () + "Line up thumbnails according to `image-dired-thumbs-per-row'. +See also `image-dired-line-up-dynamic'." (interactive) (let ((inhibit-read-only t)) (goto-char (point-min)) - (while (and (not (tumme-image-at-point-p)) + (while (and (not (image-dired-image-at-point-p)) (not (eobp))) (delete-char 1)) (while (not (eobp)) (forward-char) - (while (and (not (tumme-image-at-point-p)) + (while (and (not (image-dired-image-at-point-p)) (not (eobp))) (delete-char 1))) (goto-char (point-min)) (let ((count 0)) (while (not (eobp)) (forward-char) - (if (= tumme-thumbs-per-row 1) + (if (= image-dired-thumbs-per-row 1) (insert "\n") (insert " ") (setq count (1+ count)) - (when (and (= count (- tumme-thumbs-per-row 1)) + (when (and (= count (- image-dired-thumbs-per-row 1)) (not (eobp))) (forward-char) (insert "\n") (setq count 0))))) (goto-char (point-min)))) -(defun tumme-line-up-dynamic () +(defun image-dired-line-up-dynamic () "Line up thumbnails images dynamically. Calculate how many thumbnails fit." (interactive) (let* ((char-width (frame-char-width)) - (width (tumme-window-width-pixels (tumme-thumbnail-window))) - (tumme-thumbs-per-row + (width (image-dired-window-width-pixels (image-dired-thumbnail-window))) + (image-dired-thumbs-per-row (/ width - (+ (* 2 tumme-thumb-relief) - (* 2 tumme-thumb-margin) - tumme-thumb-width char-width)))) - (tumme-line-up))) + (+ (* 2 image-dired-thumb-relief) + (* 2 image-dired-thumb-margin) + image-dired-thumb-width char-width)))) + (image-dired-line-up))) -(defun tumme-line-up-interactive () +(defun image-dired-line-up-interactive () "Line up thumbnails interactively. Ask user how many thumbnails should be displayed per row." (interactive) - (let ((tumme-thumbs-per-row + (let ((image-dired-thumbs-per-row (string-to-number (read-string "How many thumbs per row: ")))) - (if (not (> tumme-thumbs-per-row 0)) + (if (not (> image-dired-thumbs-per-row 0)) (message "Number must be greater than 0") - (tumme-line-up)))) + (image-dired-line-up)))) -(defun tumme-thumbnail-display-external () +(defun image-dired-thumbnail-display-external () "Display original image for thumbnail at point using external viewer." (interactive) - (let ((file (tumme-original-file-name))) - (if (not (tumme-image-at-point-p)) + (let ((file (image-dired-original-file-name))) + (if (not (image-dired-image-at-point-p)) (message "No thumbnail at point") (if (not file) (message "No original file name found") (call-process shell-file-name nil nil nil shell-command-switch - (format "%s \"%s\"" tumme-external-viewer file)))))) + (format "%s \"%s\"" image-dired-external-viewer file)))))) ;;;###autoload -(defun tumme-dired-display-external () +(defun image-dired-dired-display-external () "Display file at point using an external viewer." (interactive) (let ((file (dired-get-filename))) (call-process shell-file-name nil nil nil shell-command-switch - (format "%s \"%s\"" tumme-external-viewer file)))) + (format "%s \"%s\"" image-dired-external-viewer file)))) -(defun tumme-window-width-pixels (window) +(defun image-dired-window-width-pixels (window) "Calculate WINDOW width in pixels." (* (window-width window) (frame-char-width))) -(defun tumme-window-height-pixels (window) +(defun image-dired-window-height-pixels (window) "Calculate WINDOW height in pixels." ;; Note: The mode-line consumes one line (* (- (window-height window) 1) (frame-char-height))) -(defun tumme-display-window () - "Return window where `tumme-display-image-buffer' is visible." +(defun image-dired-display-window () + "Return window where `image-dired-display-image-buffer' is visible." (get-window-with-predicate (lambda (window) - (equal (buffer-name (window-buffer window)) tumme-display-image-buffer)) + (equal (buffer-name (window-buffer window)) image-dired-display-image-buffer)) nil t)) -(defun tumme-thumbnail-window () - "Return window where `tumme-thumbnail-buffer' is visible." +(defun image-dired-thumbnail-window () + "Return window where `image-dired-thumbnail-buffer' is visible." (get-window-with-predicate (lambda (window) - (equal (buffer-name (window-buffer window)) tumme-thumbnail-buffer)) + (equal (buffer-name (window-buffer window)) image-dired-thumbnail-buffer)) nil t)) -(defun tumme-associated-dired-buffer-window () +(defun image-dired-associated-dired-buffer-window () "Return window where associated dired buffer is visible." (let (buf) - (if (tumme-image-at-point-p) + (if (image-dired-image-at-point-p) (progn - (setq buf (tumme-associated-dired-buffer)) + (setq buf (image-dired-associated-dired-buffer)) (get-window-with-predicate (lambda (window) (equal (window-buffer window) buf)))) (error "No thumbnail image at point")))) -(defun tumme-display-window-width () - "Return width, in pixels, of tumme's image display window." - (- (tumme-window-width-pixels (tumme-display-window)) - tumme-display-window-width-correction)) +(defun image-dired-display-window-width () + "Return width, in pixels, of image-dired's image display window." + (- (image-dired-window-width-pixels (image-dired-display-window)) + image-dired-display-window-width-correction)) -(defun tumme-display-window-height () - "Return height, in pixels, of tumme's image display window." - (- (tumme-window-height-pixels (tumme-display-window)) - tumme-display-window-height-correction)) +(defun image-dired-display-window-height () + "Return height, in pixels, of image-dired's image display window." + (- (image-dired-window-height-pixels (image-dired-display-window)) + image-dired-display-window-height-correction)) -(defun tumme-display-image (file &optional original-size) +(defun image-dired-display-image (file &optional original-size) "Display image FILE in image buffer. Use this when you want to display the image, semi sized, in a new window. The image is sized to fit the display window (using a @@ -1775,18 +1773,18 @@ should feel snappy enough. If optional argument ORIGINAL-SIZE is non-nil, display image in its original size." - (let ((new-file (expand-file-name tumme-temp-image-file)) + (let ((new-file (expand-file-name image-dired-temp-image-file)) width height command ret) (setq file (expand-file-name file)) (if (not original-size) (progn - (setq width (tumme-display-window-width)) - (setq height (tumme-display-window-height)) + (setq width (image-dired-display-window-width)) + (setq height (image-dired-display-window-height)) (setq command (format-spec - tumme-cmd-create-temp-image-options + image-dired-cmd-create-temp-image-options (list - (cons ?p tumme-cmd-create-temp-image-program) + (cons ?p image-dired-cmd-create-temp-image-program) (cons ?w width) (cons ?h height) (cons ?f file) @@ -1796,55 +1794,55 @@ original size." (if (not (= 0 ret)) (error "Could not resize image"))) (copy-file file new-file t)) - (with-current-buffer (tumme-create-display-image-buffer) + (with-current-buffer (image-dired-create-display-image-buffer) (let ((inhibit-read-only t)) (erase-buffer) (clear-image-cache) - (tumme-insert-image tumme-temp-image-file 'jpeg 0 0) + (image-dired-insert-image image-dired-temp-image-file 'jpeg 0 0) (goto-char (point-min)) - (tumme-update-property 'original-file-name file))))) + (image-dired-update-property 'original-file-name file))))) -(defun tumme-display-thumbnail-original-image (&optional arg) +(defun image-dired-display-thumbnail-original-image (&optional arg) "Display current thumbnail's original image in display buffer. -See documentation for `tumme-display-image' for more information. +See documentation for `image-dired-display-image' for more information. With prefix argument ARG, display image in its original size." (interactive "P") - (let ((file (tumme-original-file-name))) - (if (not (string-equal major-mode "tumme-thumbnail-mode")) - (message "Not in tumme-thumbnail-mode") - (if (not (tumme-image-at-point-p)) + (let ((file (image-dired-original-file-name))) + (if (not (string-equal major-mode "image-dired-thumbnail-mode")) + (message "Not in image-dired-thumbnail-mode") + (if (not (image-dired-image-at-point-p)) (message "No thumbnail at point") (if (not file) (message "No original file name found") - (tumme-create-display-image-buffer) - (display-buffer tumme-display-image-buffer) - (tumme-display-image file arg)))))) + (image-dired-create-display-image-buffer) + (display-buffer image-dired-display-image-buffer) + (image-dired-display-image file arg)))))) ;;;###autoload -(defun tumme-dired-display-image (&optional arg) +(defun image-dired-dired-display-image (&optional arg) "Display current image file. -See documentation for `tumme-display-image' for more information. +See documentation for `image-dired-display-image' for more information. With prefix argument ARG, display image in its original size." (interactive "P") - (tumme-create-display-image-buffer) - (display-buffer tumme-display-image-buffer) - (tumme-display-image (dired-get-filename) arg)) + (image-dired-create-display-image-buffer) + (display-buffer image-dired-display-image-buffer) + (image-dired-display-image (dired-get-filename) arg)) -(defun tumme-image-at-point-p () - "Return true if there is a tumme thumbnail at point." - (get-text-property (point) 'tumme-thumbnail)) +(defun image-dired-image-at-point-p () + "Return true if there is a image-dired thumbnail at point." + (get-text-property (point) 'image-dired-thumbnail)) -(defun tumme-rotate-thumbnail (degrees) +(defun image-dired-rotate-thumbnail (degrees) "Rotate thumbnail DEGREES degrees." - (if (not (tumme-image-at-point-p)) + (if (not (image-dired-image-at-point-p)) (message "No thumbnail at point") - (let ((file (tumme-thumb-name (tumme-original-file-name))) + (let ((file (image-dired-thumb-name (image-dired-original-file-name))) command) (setq command (format-spec - tumme-cmd-rotate-thumbnail-options + image-dired-cmd-rotate-thumbnail-options (list - (cons ?p tumme-cmd-rotate-thumbnail-program) + (cons ?p image-dired-cmd-rotate-thumbnail-program) (cons ?d degrees) (cons ?t (expand-file-name file))))) (call-process shell-file-name nil nil nil shell-command-switch command) @@ -1852,76 +1850,76 @@ With prefix argument ARG, display image in its original size." ;; the current file but I do not know how to do that. Yet... (clear-image-cache)))) -(defun tumme-rotate-thumbnail-left () +(defun image-dired-rotate-thumbnail-left () "Rotate thumbnail left (counter clockwise) 90 degrees. The result of the rotation is displayed in the image display area and a confirmation is needed before the original image files is overwritten. This confirmation can be turned off using -`tumme-rotate-original-ask-before-overwrite'." +`image-dired-rotate-original-ask-before-overwrite'." (interactive) - (tumme-rotate-thumbnail "270")) + (image-dired-rotate-thumbnail "270")) -(defun tumme-rotate-thumbnail-right () +(defun image-dired-rotate-thumbnail-right () "Rotate thumbnail counter right (clockwise) 90 degrees. The result of the rotation is displayed in the image display area and a confirmation is needed before the original image files is overwritten. This confirmation can be turned off using -`tumme-rotate-original-ask-before-overwrite'." +`image-dired-rotate-original-ask-before-overwrite'." (interactive) - (tumme-rotate-thumbnail "90")) + (image-dired-rotate-thumbnail "90")) -(defun tumme-refresh-thumb () +(defun image-dired-refresh-thumb () "Force creation of new image for current thumbnail." (interactive) - (let ((file (tumme-original-file-name))) + (let ((file (image-dired-original-file-name))) (clear-image-cache) - (tumme-create-thumb file (tumme-thumb-name file)))) + (image-dired-create-thumb file (image-dired-thumb-name file)))) -(defun tumme-rotate-original (degrees) +(defun image-dired-rotate-original (degrees) "Rotate original image DEGREES degrees." - (if (not (tumme-image-at-point-p)) + (if (not (image-dired-image-at-point-p)) (message "No image at point") - (let ((file (tumme-original-file-name)) + (let ((file (image-dired-original-file-name)) command temp-file) (if (not (string-match "\.[jJ][pP[eE]?[gG]$" file)) (error "Only JPEG images can be rotated!")) (setq command (format-spec - tumme-cmd-rotate-original-options + image-dired-cmd-rotate-original-options (list - (cons ?p tumme-cmd-rotate-original-program) + (cons ?p image-dired-cmd-rotate-original-program) (cons ?d degrees) (cons ?o (expand-file-name file)) - (cons ?t tumme-temp-rotate-image-file)))) + (cons ?t image-dired-temp-rotate-image-file)))) (if (not (= 0 (call-process shell-file-name nil nil nil shell-command-switch command))) (error "Could not rotate image") - (tumme-display-image tumme-temp-rotate-image-file) - (if (or (and tumme-rotate-original-ask-before-overwrite + (image-dired-display-image image-dired-temp-rotate-image-file) + (if (or (and image-dired-rotate-original-ask-before-overwrite (y-or-n-p "Rotate to temp file OK. Overwrite original image? ")) - (not tumme-rotate-original-ask-before-overwrite)) + (not image-dired-rotate-original-ask-before-overwrite)) (progn - (copy-file tumme-temp-rotate-image-file file t) - (tumme-refresh-thumb)) - (tumme-display-image file)))))) + (copy-file image-dired-temp-rotate-image-file file t) + (image-dired-refresh-thumb)) + (image-dired-display-image file)))))) -(defun tumme-rotate-original-left () +(defun image-dired-rotate-original-left () "Rotate original image left (counter clockwise) 90 degrees." (interactive) - (tumme-rotate-original "270")) + (image-dired-rotate-original "270")) -(defun tumme-rotate-original-right () +(defun image-dired-rotate-original-right () "Rotate original image right (clockwise) 90 degrees." (interactive) - (tumme-rotate-original "90")) + (image-dired-rotate-original "90")) -(defun tumme-get-exif-file-name (file) +(defun image-dired-get-exif-file-name (file) "Use the image's EXIF information to return a unique file name. The file name should be unique as long as you do not take more than one picture per second. The original file name is suffixed at the end for traceability. The format of the returned file name is YYYY_MM_DD_HH_MM_DD_ORIG_FILE_NAME.jpg. Used from -`tumme-copy-with-exif-file-name'." +`image-dired-copy-with-exif-file-name'." (let (data no-exif-data-found) (if (not (string-match "\.[Jj][Pp][Ee]?[Gg]$" (expand-file-name file))) (progn @@ -1930,7 +1928,7 @@ YYYY_MM_DD_HH_MM_DD_ORIG_FILE_NAME.jpg. Used from (format-time-string "%Y:%m:%d %H:%M:%S" (nth 5 (file-attributes (expand-file-name file)))))) - (setq data (tumme-get-exif-data (expand-file-name file) + (setq data (image-dired-get-exif-data (expand-file-name file) "DateTimeOriginal"))) (while (string-match "[ :]" data) (setq data (replace-match "_" nil nil data))) @@ -1940,42 +1938,42 @@ YYYY_MM_DD_HH_MM_DD_ORIG_FILE_NAME.jpg. Used from "_") (file-name-nondirectory file)))) -(defun tumme-thumbnail-set-image-description () +(defun image-dired-thumbnail-set-image-description () "Set the ImageDescription EXIF tag for the original image. If the image already has a value for this tag, it is used as the default value at the prompt." (interactive) - (if (not (tumme-image-at-point-p)) + (if (not (image-dired-image-at-point-p)) (message "No thumbnail at point") - (let* ((file (tumme-original-file-name)) - (old-value (tumme-get-exif-data file "ImageDescription"))) + (let* ((file (image-dired-original-file-name)) + (old-value (image-dired-get-exif-data file "ImageDescription"))) (if (eq 0 - (tumme-set-exif-data file "ImageDescription" + (image-dired-set-exif-data file "ImageDescription" (read-string "Value of ImageDescription: " old-value))) (message "Successfully wrote ImageDescription tag.") (error "Could not write ImageDescription tag"))))) -(defun tumme-set-exif-data (file tag-name tag-value) +(defun image-dired-set-exif-data (file tag-name tag-value) "In FILE, set EXIF tag TAG-NAME to value TAG-VALUE." (let (command) (setq command (format-spec - tumme-cmd-write-exif-data-options + image-dired-cmd-write-exif-data-options (list - (cons ?p tumme-cmd-write-exif-data-program) + (cons ?p image-dired-cmd-write-exif-data-program) (cons ?f (expand-file-name file)) (cons ?t tag-name) (cons ?v tag-value)))) (call-process shell-file-name nil nil nil shell-command-switch command))) -(defun tumme-get-exif-data (file tag-name) +(defun image-dired-get-exif-data (file tag-name) "From FILE, return EXIF tag TAG-NAME." - (let ((buf (get-buffer-create "*tumme-get-exif-data*")) + (let ((buf (get-buffer-create "*image-dired-get-exif-data*")) command tag-value) (setq command (format-spec - tumme-cmd-read-exif-data-options + image-dired-cmd-read-exif-data-options (list - (cons ?p tumme-cmd-read-exif-data-program) + (cons ?p image-dired-cmd-read-exif-data-program) (cons ?f file) (cons ?t tag-name)))) (with-current-buffer buf @@ -1991,17 +1989,17 @@ default value at the prompt." (setq tag-value (buffer-substring (point-min) (point-max))))) tag-value)) -(defun tumme-copy-with-exif-file-name () +(defun image-dired-copy-with-exif-file-name () "Copy file with unique name to main image directory. Copy current or all marked files in dired to a new file in your main image directory, using a file name generated by -`tumme-get-exif-file-name'. A typical usage for this if when +`image-dired-get-exif-file-name'. A typical usage for this if when copying images from a digital camera into the image directory. Typically, you would open up the folder with the incoming digital images, mark the files to be copied, and execute this function. The result is a couple of new files in -`tumme-main-image-directory' called +`image-dired-main-image-directory' called 2005_05_08_12_52_00_dscn0319.jpg, 2005_05_08_14_27_45_dscn0320.jpg etc." (interactive) @@ -2012,32 +2010,32 @@ function. The result is a couple of new files in (setq new-name (format "%s/%s" (file-name-as-directory - (expand-file-name tumme-main-image-directory)) - (tumme-get-exif-file-name curr-file))) + (expand-file-name image-dired-main-image-directory)) + (image-dired-get-exif-file-name curr-file))) (message "Copying %s to %s" curr-file new-name) (copy-file curr-file new-name)) files))) -(defun tumme-display-next-thumbnail-original () +(defun image-dired-display-next-thumbnail-original () "In thubnail buffer, move to next thumbnail and display the image." (interactive) - (tumme-forward-image) - (tumme-display-thumbnail-original-image)) + (image-dired-forward-image) + (image-dired-display-thumbnail-original-image)) -(defun tumme-display-previous-thumbnail-original () +(defun image-dired-display-previous-thumbnail-original () "Move to previous thumbnail and display image." (interactive) - (tumme-backward-image) - (tumme-display-thumbnail-original-image)) + (image-dired-backward-image) + (image-dired-display-thumbnail-original-image)) -(defun tumme-write-comments (file-comments) +(defun image-dired-write-comments (file-comments) "Write file comments to database. Write file comments to one or more files. FILE-COMMENTS is an alist on the following form: ((FILE . COMMENT) ... )" (let (end comment-beg-pos comment-end-pos file comment) - (with-temp-file tumme-db-file - (insert-file-contents tumme-db-file) + (with-temp-file image-dired-db-file + (insert-file-contents image-dired-db-file) (dolist (elt file-comments) (setq file (car elt) comment (cdr elt)) @@ -2065,7 +2063,7 @@ the following form: (goto-char (point-max)) (insert (format "\n%s;comment:%s" file comment))))))) -(defun tumme-update-property (prop value) +(defun image-dired-update-property (prop value) "Update text property PROP with value VALUE at point." (let ((inhibit-read-only t)) (put-text-property @@ -2074,40 +2072,40 @@ the following form: value))) ;;;###autoload -(defun tumme-dired-comment-files () +(defun image-dired-dired-comment-files () "Add comment to current or marked files in dired." (interactive) - (let ((comment (tumme-read-comment))) - (tumme-write-comments + (let ((comment (image-dired-read-comment))) + (image-dired-write-comments (mapcar (lambda (curr-file) (cons curr-file comment)) (dired-get-marked-files))))) -(defun tumme-comment-thumbnail () +(defun image-dired-comment-thumbnail () "Add comment to current thumbnail in thumbnail buffer." (interactive) - (let* ((file (tumme-original-file-name)) - (comment (tumme-read-comment file))) - (tumme-write-comments (list (cons file comment))) - (tumme-update-property 'comment comment)) - (tumme-display-thumb-properties)) + (let* ((file (image-dired-original-file-name)) + (comment (image-dired-read-comment file))) + (image-dired-write-comments (list (cons file comment))) + (image-dired-update-property 'comment comment)) + (image-dired-display-thumb-properties)) -(defun tumme-read-comment (&optional file) +(defun image-dired-read-comment (&optional file) "Read comment for an image. Read comment for an image, optionally using old comment from FILE as initial value." (let ((comment (read-string "Comment: " - (if file (tumme-get-comment file))))) + (if file (image-dired-get-comment file))))) comment)) -(defun tumme-get-comment (file) +(defun image-dired-get-comment (file) "Get comment for file FILE." (save-excursion (let (end buf comment-beg-pos comment-end-pos comment) - (setq buf (find-file tumme-db-file)) + (setq buf (find-file image-dired-db-file)) (goto-char (point-min)) (when (search-forward-regexp (format "^%s" file) nil t) @@ -2125,10 +2123,10 @@ as initial value." comment))) ;;;###autoload -(defun tumme-mark-tagged-files () +(defun image-dired-mark-tagged-files () "Use regexp to mark files with matching tag. A `tag' is a keyword, a piece of meta data, associated with an -image file and stored in tumme's database file. This command +image file and stored in image-dired's database file. This command lets you input a regexp and this will be matched against all tags on all image files in the database file. The files that have a matching tags will be marked in the dired buffer." @@ -2137,7 +2135,7 @@ matching tags will be marked in the dired buffer." (hits 0) files buf) (save-excursion - (setq buf (find-file tumme-db-file)) + (setq buf (find-file image-dired-db-file)) (goto-char (point-min)) ;; Collect matches (while (search-forward-regexp @@ -2163,46 +2161,46 @@ matching tags will be marked in the dired buffer." files)) (message "%d files with matching tag marked." hits))) -(defun tumme-mouse-display-image (event) - "Use mouse EVENT, call `tumme-display-image' to display image. -Track this in associated dired buffer if `tumme-track-movement' is +(defun image-dired-mouse-display-image (event) + "Use mouse EVENT, call `image-dired-display-image' to display image. +Track this in associated dired buffer if `image-dired-track-movement' is non-nil." (interactive "e") (let (file) (mouse-set-point event) (goto-char (posn-point (event-end event))) - (setq file (tumme-original-file-name)) - (if tumme-track-movement - (tumme-track-original-file)) - (tumme-create-display-image-buffer) - (display-buffer tumme-display-image-buffer) - (tumme-display-image file))) - -(defun tumme-mouse-select-thumbnail (event) + (setq file (image-dired-original-file-name)) + (if image-dired-track-movement + (image-dired-track-original-file)) + (image-dired-create-display-image-buffer) + (display-buffer image-dired-display-image-buffer) + (image-dired-display-image file))) + +(defun image-dired-mouse-select-thumbnail (event) "Use mouse EVENT to select thumbnail image. -Track this in associated dired buffer if `tumme-track-movement' is +Track this in associated dired buffer if `image-dired-track-movement' is non-nil." (interactive "e") (let (file) (mouse-set-point event) (goto-char (posn-point (event-end event))) - (if tumme-track-movement - (tumme-track-original-file))) - (tumme-display-thumb-properties)) + (if image-dired-track-movement + (image-dired-track-original-file))) + (image-dired-display-thumb-properties)) -(defun tumme-mouse-toggle-mark (event) +(defun image-dired-mouse-toggle-mark (event) "Use mouse EVENT to toggle dired mark for thumbnail. -Track this in associated dired buffer if `tumme-track-movement' is +Track this in associated dired buffer if `image-dired-track-movement' is non-nil." (interactive "e") (let (file) (mouse-set-point event) (goto-char (posn-point (event-end event))) - (if tumme-track-movement - (tumme-track-original-file))) - (tumme-toggle-mark-thumb-original-file)) + (if image-dired-track-movement + (image-dired-track-original-file))) + (image-dired-toggle-mark-thumb-original-file)) -(defun tumme-dired-display-properties () +(defun image-dired-dired-display-properties () "Display properties for dired file in the echo area." (interactive) (let* ((file (dired-get-filename)) @@ -2210,98 +2208,98 @@ non-nil." (dired-buf (buffer-name (current-buffer))) (props (mapconcat 'princ - (tumme-list-tags file) + (image-dired-list-tags file) ", ")) - (comment (tumme-get-comment file))) + (comment (image-dired-get-comment file))) (if file-name (message - (tumme-format-properties-string + (image-dired-format-properties-string dired-buf file-name props comment))))) -(defvar tumme-tag-file-list nil +(defvar image-dired-tag-file-list nil "List to store tag-file structure.") -(defvar tumme-file-tag-list nil +(defvar image-dired-file-tag-list nil "List to store file-tag structure.") -(defvar tumme-file-comment-list nil +(defvar image-dired-file-comment-list nil "List to store file comments.") -(defun tumme-add-to-tag-file-list (tag file) +(defun image-dired-add-to-tag-file-list (tag file) "Add relation between TAG and FILE." (let (curr) - (if tumme-tag-file-list - (if (setq curr (assoc tag tumme-tag-file-list)) + (if image-dired-tag-file-list + (if (setq curr (assoc tag image-dired-tag-file-list)) (if (not (member file curr)) (setcdr curr (cons file (cdr curr)))) - (setcdr tumme-tag-file-list - (cons (list tag file) (cdr tumme-tag-file-list)))) - (setq tumme-tag-file-list (list (list tag file)))))) + (setcdr image-dired-tag-file-list + (cons (list tag file) (cdr image-dired-tag-file-list)))) + (setq image-dired-tag-file-list (list (list tag file)))))) -(defun tumme-add-to-tag-file-lists (tag file) - "Helper function used from `tumme-create-gallery-lists'. +(defun image-dired-add-to-tag-file-lists (tag file) + "Helper function used from `image-dired-create-gallery-lists'. Add TAG to FILE in one list and FILE to TAG in the other. Lisp structures look like the following: -tumme-file-tag-list: +image-dired-file-tag-list: ((\"filename1\" \"tag1\" \"tag2\" \"tag3\" ...) (\"filename2\" \"tag1\" \"tag2\" \"tag3\" ...) ...) -tumme-tag-file-list: +image-dired-tag-file-list: ((\"tag1\" \"filename1\" \"filename2\" \"filename3\" ...) (\"tag2\" \"filename1\" \"filename2\" \"filename3\" ...) ...)" ;; Add tag to file list (let (curr) - (if tumme-file-tag-list - (if (setq curr (assoc file tumme-file-tag-list)) + (if image-dired-file-tag-list + (if (setq curr (assoc file image-dired-file-tag-list)) (setcdr curr (cons tag (cdr curr))) - (setcdr tumme-file-tag-list - (cons (list file tag) (cdr tumme-file-tag-list)))) - (setq tumme-file-tag-list (list (list file tag)))) + (setcdr image-dired-file-tag-list + (cons (list file tag) (cdr image-dired-file-tag-list)))) + (setq image-dired-file-tag-list (list (list file tag)))) ;; Add file to tag list - (if tumme-tag-file-list - (if (setq curr (assoc tag tumme-tag-file-list)) + (if image-dired-tag-file-list + (if (setq curr (assoc tag image-dired-tag-file-list)) (if (not (member file curr)) (setcdr curr (cons file (cdr curr)))) - (setcdr tumme-tag-file-list - (cons (list tag file) (cdr tumme-tag-file-list)))) - (setq tumme-tag-file-list (list (list tag file)))))) + (setcdr image-dired-tag-file-list + (cons (list tag file) (cdr image-dired-tag-file-list)))) + (setq image-dired-tag-file-list (list (list tag file)))))) -(defun tumme-add-to-file-comment-list (file comment) - "Helper function used from `tumme-create-gallery-lists'. +(defun image-dired-add-to-file-comment-list (file comment) + "Helper function used from `image-dired-create-gallery-lists'. For FILE, add COMMENT to list. Lisp structure looks like the following: -tumme-file-comment-list: +image-dired-file-comment-list: ((\"filename1\" . \"comment1\") (\"filename2\" . \"comment2\") ...)" - (if tumme-file-comment-list - (if (not (assoc file tumme-file-comment-list)) - (setcdr tumme-file-comment-list + (if image-dired-file-comment-list + (if (not (assoc file image-dired-file-comment-list)) + (setcdr image-dired-file-comment-list (cons (cons file comment) - (cdr tumme-file-comment-list)))) - (setq tumme-file-comment-list (list (cons file comment))))) + (cdr image-dired-file-comment-list)))) + (setq image-dired-file-comment-list (list (cons file comment))))) -(defun tumme-create-gallery-lists () - "Create temporary lists used by `tumme-gallery-generate'." - (let ((buf (find-file tumme-db-file)) +(defun image-dired-create-gallery-lists () + "Create temporary lists used by `image-dired-gallery-generate'." + (let ((buf (find-file image-dired-db-file)) end beg file row-tags) - (setq tumme-tag-file-list nil) - (setq tumme-file-tag-list nil) - (setq tumme-file-comment-list nil) + (setq image-dired-tag-file-list nil) + (setq image-dired-file-tag-list nil) + (setq image-dired-file-comment-list nil) (goto-char (point-min)) (while (search-forward-regexp "^." nil t) (end-of-line) @@ -2316,51 +2314,51 @@ tumme-file-comment-list: (mapc (lambda (x) (if (not (string-match "^comment:\\(.*\\)" x)) - (tumme-add-to-tag-file-lists x file) - (tumme-add-to-file-comment-list file (match-string 1 x)))) + (image-dired-add-to-tag-file-lists x file) + (image-dired-add-to-file-comment-list file (match-string 1 x)))) (cdr row-tags))) (kill-buffer buf)) ;; Sort tag-file list - (setq tumme-tag-file-list - (sort tumme-tag-file-list + (setq image-dired-tag-file-list + (sort image-dired-tag-file-list (lambda (x y) (string< (car x) (car y)))))) -(defun tumme-hidden-p (file) +(defun image-dired-hidden-p (file) "Return t if image FILE has a \"hidden\" tag." (let (hidden) (mapc (lambda (tag) - (if (member tag tumme-gallery-hidden-tags) + (if (member tag image-dired-gallery-hidden-tags) (setq hidden t))) - (cdr (assoc file tumme-file-tag-list))) + (cdr (assoc file image-dired-file-tag-list))) hidden)) -(defun tumme-gallery-generate () +(defun image-dired-gallery-generate () "Generate gallery pages. First we create a couple of Lisp structures from the database to make it easier to generate, then HTML-files are created in -`tumme-gallery-dir'" +`image-dired-gallery-dir'" (interactive) - (if (eq 'per-directory tumme-thumbnail-storage) + (if (eq 'per-directory image-dired-thumbnail-storage) (error "Currently, gallery generation is not supported \ when using per-directory thumbnail file storage")) - (tumme-create-gallery-lists) - (let ((tags tumme-tag-file-list) + (image-dired-create-gallery-lists) + (let ((tags image-dired-tag-file-list) count curr tag index-buf tag-buf comment file-tags tag-link tag-link-list) ;; Make sure gallery root exist - (if (file-exists-p tumme-gallery-dir) - (if (not (file-directory-p tumme-gallery-dir)) - (error "Variable tumme-gallery-dir is not a directory")) - (make-directory tumme-gallery-dir)) + (if (file-exists-p image-dired-gallery-dir) + (if (not (file-directory-p image-dired-gallery-dir)) + (error "Variable image-dired-gallery-dir is not a directory")) + (make-directory image-dired-gallery-dir)) ;; Open index file (setq index-buf (find-file - (format "%s/index.html" tumme-gallery-dir))) + (format "%s/index.html" image-dired-gallery-dir))) (erase-buffer) (insert "<html>\n") (insert " <body>\n") - (insert " <h2>Tumme Gallery</h2>\n") + (insert " <h2>Image-Dired Gallery</h2>\n") (insert (format "<p>\n Gallery generated %s\n <p>\n" (current-time-string))) (insert " <h3>Tag index</h3>\n") @@ -2369,7 +2367,7 @@ when using per-directory thumbnail file storage")) (mapc (lambda (curr) (setq tag (car curr)) - (when (not (member tag tumme-gallery-hidden-tags)) + (when (not (member tag image-dired-gallery-hidden-tags)) (setq tag-link (format "<a href=\"%d.html\">%s</a>" count tag)) (if tag-link-list (setq tag-link-list @@ -2383,12 +2381,12 @@ when using per-directory thumbnail file storage")) (lambda (curr) (setq tag (car curr)) ;; Don't display hidden tags - (when (not (member tag tumme-gallery-hidden-tags)) + (when (not (member tag image-dired-gallery-hidden-tags)) ;; Insert link to tag page in index (insert (format " %s<br>\n" (cdr (assoc tag tag-link-list)))) ;; Open per-tag file (setq tag-buf (find-file - (format "%s/%s.html" tumme-gallery-dir count))) + (format "%s/%s.html" image-dired-gallery-dir count))) (erase-buffer) (insert "<html>\n") (insert " <body>\n") @@ -2397,21 +2395,21 @@ when using per-directory thumbnail file storage")) ;; Main loop for files per tag page (mapc (lambda (file) - (when (not (tumme-hidden-p file)) + (when (not (image-dired-hidden-p file)) ;; Insert thumbnail with link to full image (insert (format "<a href=\"%s/%s\"><img src=\"%s/%s\"%s></a>\n" - tumme-gallery-image-root-url + image-dired-gallery-image-root-url (file-name-nondirectory file) - tumme-gallery-thumb-image-root-url - (file-name-nondirectory (tumme-thumb-name file)) file)) + image-dired-gallery-thumb-image-root-url + (file-name-nondirectory (image-dired-thumb-name file)) file)) ;; Insert comment, if any - (if (setq comment (cdr (assoc file tumme-file-comment-list))) + (if (setq comment (cdr (assoc file image-dired-file-comment-list))) (insert (format "<br>\n%s<br>\n" comment)) (insert "<br>\n")) ;; Insert links to other tags, if any (when (> (length - (setq file-tags (assoc file tumme-file-tag-list))) 2) + (setq file-tags (assoc file image-dired-file-tag-list))) 2) (insert "[ ") (mapc (lambda (extra-tag) @@ -2435,7 +2433,7 @@ when using per-directory thumbnail file storage")) (save-buffer) (kill-buffer index-buf))) -(defun tumme-kill-buffer-and-window () +(defun image-dired-kill-buffer-and-window () "Kill the current buffer and, if possible, also the window." (interactive) (let ((buffer (current-buffer))) @@ -2444,19 +2442,19 @@ when using per-directory thumbnail file storage")) (error nil)) (kill-buffer buffer))) -(defvar tumme-widget-list nil +(defvar image-dired-widget-list nil "List to keep track of meta data in edit buffer.") ;;;###autoload -(defun tumme-dired-edit-comment-and-tags () +(defun image-dired-dired-edit-comment-and-tags () "Edit comment and tags of current or marked image files. Edit comment and tags for all marked image files in an easy-to-use form." (interactive) - (setq tumme-widget-list nil) + (setq image-dired-widget-list nil) ;; Setup buffer. (let ((files (dired-get-marked-files))) - (switch-to-buffer "*Tumme Edit Meta Data*") + (switch-to-buffer "*Image-Dired Edit Meta Data*") (kill-all-local-variables) (make-local-variable 'widget-example-repeat) (let ((inhibit-read-only t)) @@ -2475,7 +2473,7 @@ the operation by activating the Cancel button.\n\n") (dolist (file files) - (setq thumb-file (tumme-thumb-name file) + (setq thumb-file (image-dired-thumb-name file) img (create-image thumb-file)) (insert-image img) @@ -2484,7 +2482,7 @@ the operation by activating the Cancel button.\n\n") (widget-create 'editable-field :size 60 :format "%v " - :value (or (tumme-get-comment file) ""))) + :value (or (image-dired-get-comment file) ""))) (widget-insert "\nTags: ") (setq tag-widget (widget-create 'editable-field @@ -2493,12 +2491,12 @@ the operation by activating the Cancel button.\n\n") :value (or (mapconcat (lambda (tag) tag) - (tumme-list-tags file) + (image-dired-list-tags file) ",") ""))) ;; Save information in all widgets so that we can use it when ;; the user saves the form. - (setq tumme-widget-list - (append tumme-widget-list + (setq image-dired-widget-list + (append image-dired-widget-list (list (list file comment-widget tag-widget)))) (widget-insert "\n\n"))) @@ -2507,7 +2505,7 @@ the operation by activating the Cancel button.\n\n") (widget-create 'push-button :notify (lambda (&rest ignore) - (tumme-save-information-from-widgets) + (image-dired-save-information-from-widgets) (bury-buffer) (message "Done.")) "Save") @@ -2524,21 +2522,21 @@ the operation by activating the Cancel button.\n\n") ;; Jump to the first widget. (widget-forward 1))) -(defun tumme-save-information-from-widgets () - "Save information found in `tumme-widget-list'. -Use the information in `tumme-widget-list' to save comments and +(defun image-dired-save-information-from-widgets () + "Save information found in `image-dired-widget-list'. +Use the information in `image-dired-widget-list' to save comments and tags to their respective image file. Internal function used by -`tumme-dired-edit-comment-and-tags'." +`image-dired-dired-edit-comment-and-tags'." (let (file comment tag-string tag-list lst) - (tumme-write-comments + (image-dired-write-comments (mapcar (lambda (widget) (setq file (car widget) comment (widget-value (cadr widget))) (cons file comment)) - tumme-widget-list)) - (tumme-write-tags - (dolist (widget tumme-widget-list lst) + image-dired-widget-list)) + (image-dired-write-tags + (dolist (widget image-dired-widget-list lst) (setq file (car widget) tag-string (widget-value (car (cddr widget))) tag-list (split-string tag-string ",")) @@ -2549,12 +2547,12 @@ tags to their respective image file. Internal function used by ;;;;;;;;; TEST-SECTION ;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (defvar tumme-dir-max-size 12300000) +;; (defvar image-dired-dir-max-size 12300000) -;; (defun tumme-test-clean-old-files () -;; "Clean `tumme-dir' from old thumbnail files. +;; (defun image-dired-test-clean-old-files () +;; "Clean `image-dired-dir' from old thumbnail files. ;; \"Oldness\" measured using last access time. If the total size of all -;; thumbnail files in `tumme-dir' is larger than 'tumme-dir-max-size', +;; thumbnail files in `image-dired-dir' is larger than 'image-dired-dir-max-size', ;; old files are deleted until the max size is reached." ;; (let* ((files ;; (sort @@ -2563,12 +2561,12 @@ tags to their respective image file. Internal function used by ;; (let ((fattribs (file-attributes f))) ;; ;; Get last access time and file size ;; `(,(nth 4 fattribs) ,(nth 7 fattribs) ,f))) -;; (directory-files (tumme-dir) t ".+\.thumb\..+$")) +;; (directory-files (image-dired-dir) t ".+\.thumb\..+$")) ;; ;; Sort function. Compare time between two files. ;; '(lambda (l1 l2) ;; (time-less-p (car l1) (car l2))))) ;; (dirsize (apply '+ (mapcar (lambda (x) (cadr x)) files)))) -;; (while (> dirsize tumme-dir-max-size) +;; (while (> dirsize image-dired-dir-max-size) ;; (y-or-n-p ;; (format "Size of thumbnail directory: %d, delete old file %s? " ;; dirsize (cadr (cdar files)))) @@ -2579,8 +2577,8 @@ tags to their respective image file. Internal function used by ;;;;;;;;;;;;;;;;;;;;;;, ;; (defun dired-speedbar-buttons (dired-buffer) -;; (when (and (boundp 'tumme-use-speedbar) -;; tumme-use-speedbar) +;; (when (and (boundp 'image-dired-use-speedbar) +;; image-dired-use-speedbar) ;; (let ((filename (with-current-buffer dired-buffer ;; (dired-get-filename)))) ;; (when (and (not (string-equal filename (buffer-string))) @@ -2589,11 +2587,11 @@ tags to their respective image file. Internal function used by ;; (insert (propertize ;; filename ;; 'display -;; (tumme-get-thumbnail-image filename))))))) +;; (image-dired-get-thumbnail-image filename))))))) -;; (setq tumme-use-speedbar t) +;; (setq image-dired-use-speedbar t) -(provide 'tumme) +(provide 'image-dired) ;; arch-tag: 9d11411d-331f-4380-8b44-8adfe3a0343e -;;; tumme.el ends here +;;; image-dired.el ends here diff --git a/lisp/info.el b/lisp/info.el index 6757929424b..4d1e1d8e3e9 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -1400,8 +1400,8 @@ any double quotes or backslashes must be escaped (\\\",\\\\)." (defvar Info-mode-line-node-keymap (let ((map (make-sparse-keymap))) - (define-key map [mode-line mouse-1] 'Info-scroll-up) - (define-key map [mode-line mouse-3] 'Info-scroll-down) + (define-key map [mode-line mouse-1] 'Info-mouse-scroll-up) + (define-key map [mode-line mouse-3] 'Info-mouse-scroll-down) map) "Keymap to put on the Info node name in the mode line.") @@ -2620,6 +2620,15 @@ in other ways.)" (t (Info-next-preorder))) (scroll-up)))) +(defun Info-mouse-scroll-up (e) + "Scroll one screenful forward in Info, using the mouse. +See `Info-scroll-up'." + (interactive "e") + (save-selected-window + (if (eventp e) + (select-window (posn-window (event-start e)))) + (Info-scroll-up))) + (defun Info-scroll-down () "Scroll one screenful back in Info, considering all nodes as one sequence. If point is within the menu of a node, and `Info-scroll-prefer-subnodes' @@ -2646,6 +2655,15 @@ parent node." (Info-last-preorder) (scroll-down)))) +(defun Info-mouse-scroll-down (e) + "Scroll one screenful backward in Info, using the mouse. +See `Info-scroll-down'." + (interactive "e") + (save-selected-window + (if (eventp e) + (select-window (posn-window (event-start e)))) + (Info-scroll-down))) + (defun Info-next-reference (&optional recur) "Move cursor to the next cross-reference or menu item in the node." (interactive) diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 92573c0d417..e94a2fb81f5 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -1567,8 +1567,10 @@ text, and convert it in the temporary buffer. Otherwise, convert in-place." ;;; FILE I/O (defcustom auto-coding-alist - '(("\\.\\(arc\\|zip\\|lzh\\|lha\\|zoo\\|[jew]ar\\|xpi\\)\\'" . no-conversion) - ("\\.\\(ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\)\\'" . no-conversion) + ;; .exe and .EXE are added to support archive-mode looking at DOS + ;; self-extracting exe archives. + '(("\\.\\(arc\\|zip\\|lzh\\|lha\\|zoo\\|[jew]ar\\|xpi\\|exe\\)\\'" . no-conversion) + ("\\.\\(ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|EXE\\)\\'" . no-conversion) ("\\.\\(sx[dmicw]\\|odt\\|tar\\|tgz\\)\\'" . no-conversion) ("\\.\\(gz\\|Z\\|bz\\|bz2\\|gpg\\)\\'" . no-conversion) ("\\.\\(jpe?g\\|png\\|gif\\|tiff?\\|p[bpgn]m\\)\\'" . no-conversion) diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 342dd04b936..12391dd774d 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -4,7 +4,7 @@ ;;;### (autoloads (5x5-crack 5x5-crack-xor-mutate 5x5-crack-mutating-best ;;;;;; 5x5-crack-mutating-current 5x5-crack-randomly 5x5) "5x5" -;;;;;; "play/5x5.el" (17876 15555)) +;;;;;; "play/5x5.el" (17941 38806)) ;;; Generated autoloads from play/5x5.el (autoload (quote 5x5) "5x5" "\ @@ -852,7 +852,7 @@ Not documented ;;;*** ;;;### (autoloads (animate-birthday-present animate-sequence animate-string) -;;;;;; "animate" "play/animate.el" (17842 55395)) +;;;;;; "animate" "play/animate.el" (17941 38806)) ;;; Generated autoloads from play/animate.el (autoload (quote animate-string) "animate" "\ @@ -945,7 +945,7 @@ Used in `antlr-mode'. Also a useful function in `java-mode-hook'. ;;;### (autoloads (appt-activate appt-make-list appt-delete appt-add ;;;;;; appt-display-diary appt-display-duration appt-display-mode-line ;;;;;; appt-msg-window appt-visible appt-audible appt-message-warning-time -;;;;;; appt-issue-message) "appt" "calendar/appt.el" (17842 53792)) +;;;;;; appt-issue-message) "appt" "calendar/appt.el" (17952 17513)) ;;; Generated autoloads from calendar/appt.el (defvar appt-issue-message t "\ @@ -1129,8 +1129,8 @@ Returns list of symbols and documentation found. ;;;*** -;;;### (autoloads (archive-mode) "arc-mode" "arc-mode.el" (17842 -;;;;;; 58280)) +;;;### (autoloads (archive-mode) "arc-mode" "arc-mode.el" (17956 +;;;;;; 9517)) ;;; Generated autoloads from arc-mode.el (autoload (quote archive-mode) "arc-mode" "\ @@ -1794,8 +1794,8 @@ non-interactive use see also `benchmark-run' and ;;;*** -;;;### (autoloads (bibtex-mode) "bibtex" "textmodes/bibtex.el" (17843 -;;;;;; 28300)) +;;;### (autoloads (bibtex-mode) "bibtex" "textmodes/bibtex.el" (17956 +;;;;;; 9518)) ;;; Generated autoloads from textmodes/bibtex.el (autoload (quote bibtex-mode) "bibtex" "\ @@ -2671,7 +2671,7 @@ Also see `make-text-button'. ;;;;;; batch-byte-compile-if-not-done display-call-tree byte-compile ;;;;;; compile-defun byte-compile-file byte-recompile-directory ;;;;;; byte-force-recompile byte-compile-warnings-safe-p) "bytecomp" -;;;;;; "emacs-lisp/bytecomp.el" (17927 20254)) +;;;;;; "emacs-lisp/bytecomp.el" (17949 41467)) ;;; Generated autoloads from emacs-lisp/bytecomp.el (put 'byte-compile-dynamic 'safe-local-variable 'booleanp) (put 'byte-compile-disable-print-circle 'safe-local-variable 'booleanp) @@ -2802,7 +2802,7 @@ from the cursor position. ;;;### (autoloads (defmath calc-embedded-activate calc-embedded calc-grab-rectangle ;;;;;; calc-grab-region full-calc-keypad calc-keypad calc-eval quick-calc ;;;;;; full-calc calc calc-dispatch calc-settings-file) "calc" "calc/calc.el" -;;;;;; (17919 4936)) +;;;;;; (17955 4296)) ;;; Generated autoloads from calc/calc.el (defvar calc-settings-file (convert-standard-filename "~/.calc.el") "\ @@ -2909,7 +2909,7 @@ See the documentation for `calculator-mode' for more information. ;;;;;; mark-holidays-in-calendar view-calendar-holidays-initially ;;;;;; calendar-remove-frame-by-deleting mark-diary-entries-in-calendar ;;;;;; view-diary-entries-initially calendar-offset) "calendar" -;;;;;; "calendar/calendar.el" (17929 8808)) +;;;;;; "calendar/calendar.el" (17944 20140)) ;;; Generated autoloads from calendar/calendar.el (defvar calendar-offset 0 "\ @@ -3507,7 +3507,7 @@ it fails. ;;;*** ;;;### (autoloads (c-guess-basic-syntax) "cc-engine" "progmodes/cc-engine.el" -;;;;;; (17926 45410)) +;;;;;; (17942 63381)) ;;; Generated autoloads from progmodes/cc-engine.el (autoload (quote c-guess-basic-syntax) "cc-engine" "\ @@ -3728,14 +3728,14 @@ and exists only for compatibility reasons. ;;;*** -;;;### (autoloads nil "cc-subword" "progmodes/cc-subword.el" (17842 -;;;;;; 56333)) +;;;### (autoloads nil "cc-subword" "progmodes/cc-subword.el" (17949 +;;;;;; 41467)) ;;; Generated autoloads from progmodes/cc-subword.el (autoload 'c-subword-mode "cc-subword" "Mode enabling subword movement and editing keys." t) ;;;*** -;;;### (autoloads nil "cc-vars" "progmodes/cc-vars.el" (17854 7681)) +;;;### (autoloads nil "cc-vars" "progmodes/cc-vars.el" (17941 38806)) ;;; Generated autoloads from progmodes/cc-vars.el (put 'c-basic-offset 'safe-local-variable 'integerp) (put 'c-backslash-column 'safe-local-variable 'integerp) @@ -4535,7 +4535,7 @@ on third call it again advances points to the next difference and so on. ;;;;;; compilation-shell-minor-mode compilation-mode compilation-start ;;;;;; compile compilation-disable-input compile-command compilation-search-path ;;;;;; compilation-ask-about-save compilation-window-height compilation-mode-hook) -;;;;;; "compile" "progmodes/compile.el" (17928 33291)) +;;;;;; "compile" "progmodes/compile.el" (17952 11093)) ;;; Generated autoloads from progmodes/compile.el (defvar compilation-mode-hook nil "\ @@ -4698,7 +4698,7 @@ This is the value of `next-error-function' in Compilation buffers. ;;;*** ;;;### (autoloads (partial-completion-mode) "complete" "complete.el" -;;;;;; (17931 55720)) +;;;;;; (17954 15344)) ;;; Generated autoloads from complete.el (defvar partial-completion-mode nil "\ @@ -5200,7 +5200,7 @@ Insert a copyright by $ORGANIZATION notice at cursor. ;;;*** ;;;### (autoloads (cperl-perldoc-at-point cperl-perldoc cperl-mode) -;;;;;; "cperl-mode" "progmodes/cperl-mode.el" (17899 1957)) +;;;;;; "cperl-mode" "progmodes/cperl-mode.el" (17955 36604)) ;;; Generated autoloads from progmodes/cperl-mode.el (autoload (quote cperl-mode) "cperl-mode" "\ @@ -5538,7 +5538,7 @@ Enable CUA selection mode without the C-z/C-x/C-c/C-v bindings. ;;;;;; customize-mode customize customize-save-variable customize-set-variable ;;;;;; customize-set-value custom-menu-sort-alphabetically custom-buffer-sort-alphabetically ;;;;;; custom-browse-sort-alphabetically) "cus-edit" "cus-edit.el" -;;;;;; (17900 13368)) +;;;;;; (17952 11093)) ;;; Generated autoloads from cus-edit.el (defvar custom-browse-sort-alphabetically nil "\ @@ -6044,8 +6044,8 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]. ;;;*** -;;;### (autoloads (dcl-mode) "dcl-mode" "progmodes/dcl-mode.el" (17842 -;;;;;; 56333)) +;;;### (autoloads (dcl-mode) "dcl-mode" "progmodes/dcl-mode.el" (17949 +;;;;;; 41468)) ;;; Generated autoloads from progmodes/dcl-mode.el (autoload (quote dcl-mode) "dcl-mode" "\ @@ -6442,7 +6442,7 @@ as well as widgets, buttons, overlays, and text properties. ;;;### (autoloads (desktop-revert desktop-save-in-desktop-dir desktop-change-dir ;;;;;; desktop-load-default desktop-read desktop-remove desktop-save ;;;;;; desktop-clear desktop-locals-to-save desktop-save-mode) "desktop" -;;;;;; "desktop.el" (17893 17506)) +;;;;;; "desktop.el" (17949 41467)) ;;; Generated autoloads from desktop.el (defvar desktop-save-mode nil "\ @@ -6676,7 +6676,7 @@ Not documented ;;;*** ;;;### (autoloads (diary-mode diary-mail-entries diary) "diary-lib" -;;;;;; "calendar/diary-lib.el" (17929 8808)) +;;;;;; "calendar/diary-lib.el" (17944 20140)) ;;; Generated autoloads from calendar/diary-lib.el (autoload (quote diary) "diary-lib" "\ @@ -6756,14 +6756,13 @@ With prefix arg, prompt for diff switches. ;;;*** ;;;### (autoloads (diff-minor-mode diff-mode) "diff-mode" "diff-mode.el" -;;;;;; (17907 56729)) +;;;;;; (17942 63381)) ;;; Generated autoloads from diff-mode.el (autoload (quote diff-mode) "diff-mode" "\ Major mode for viewing/editing context diffs. Supports unified and context diffs as well as (to a lesser extent) -normal diffs. If you edit the buffer manually, diff-mode will try -to update the hunk headers for you on-the-fly. +normal diffs. When the buffer is read-only, the ESC prefix is not necessary. If you edit the buffer manually, diff-mode will try to update the hunk @@ -6773,9 +6772,6 @@ You can also switch between context diff and unified diff with \\[diff-context-> or vice versa with \\[diff-unified->context] and you can also reverse the direction of a diff with \\[diff-reverse-direction]. -When the buffer is read-only, the Meta- modifier is not necessary -to run the Diff mode commands: - \\{diff-mode-map} \(fn)" t nil) @@ -7412,7 +7408,7 @@ true then the type of the file linked to by FILE is printed instead. ;;;*** ;;;### (autoloads (dired-do-relsymlink dired-jump) "dired-x" "dired-x.el" -;;;;;; (17859 33405)) +;;;;;; (17942 63381)) ;;; Generated autoloads from dired-x.el (autoload (quote dired-jump) "dired-x" "\ @@ -7596,7 +7592,7 @@ for users who call this function in `.emacs'. ;;;*** ;;;### (autoloads (dissociated-press) "dissociate" "play/dissociate.el" -;;;;;; (17842 55395)) +;;;;;; (17941 38806)) ;;; Generated autoloads from play/dissociate.el (autoload (quote dissociated-press) "dissociate" "\ @@ -7612,7 +7608,7 @@ Default is 2. ;;;*** -;;;### (autoloads (dnd-protocol-alist) "dnd" "dnd.el" (17842 58280)) +;;;### (autoloads (dnd-protocol-alist) "dnd" "dnd.el" (17949 41467)) ;;; Generated autoloads from dnd.el (defvar dnd-protocol-alist (quote (("^file:///" . dnd-open-local-file) ("^file://" . dnd-open-file) ("^file:" . dnd-open-local-file) ("^\\(https?\\|ftp\\|file\\|nfs\\)://" . dnd-open-file))) "\ @@ -7657,7 +7653,7 @@ Locate SOA record and increment the serial field. ;;;*** -;;;### (autoloads (doctor) "doctor" "play/doctor.el" (17842 55395)) +;;;### (autoloads (doctor) "doctor" "play/doctor.el" (17941 38806)) ;;; Generated autoloads from play/doctor.el (autoload (quote doctor) "doctor" "\ @@ -7956,7 +7952,7 @@ To implement dynamic menus, either call this from ;;;;;; ebnf-eps-directory ebnf-spool-region ebnf-spool-buffer ebnf-spool-file ;;;;;; ebnf-spool-directory ebnf-print-region ebnf-print-buffer ;;;;;; ebnf-print-file ebnf-print-directory ebnf-customize) "ebnf2ps" -;;;;;; "progmodes/ebnf2ps.el" (17859 54480)) +;;;;;; "progmodes/ebnf2ps.el" (17952 11093)) ;;; Generated autoloads from progmodes/ebnf2ps.el (autoload (quote ebnf-customize) "ebnf2ps" "\ @@ -8413,7 +8409,7 @@ With prefix arg NOCONFIRM, execute current line as-is without editing. ;;;### (autoloads (edebug-all-forms edebug-all-defs edebug-eval-top-level-form ;;;;;; edebug-basic-spec edebug-all-forms edebug-all-defs) "edebug" -;;;;;; "emacs-lisp/edebug.el" (17930 34071)) +;;;;;; "emacs-lisp/edebug.el" (17952 11093)) ;;; Generated autoloads from emacs-lisp/edebug.el (defvar edebug-all-defs nil "\ @@ -10719,7 +10715,7 @@ you can set `feedmail-queue-reminder-alist' to nil. ;;;*** ;;;### (autoloads (ffap-bindings dired-at-point ffap-at-mouse ffap-menu -;;;;;; find-file-at-point ffap-next) "ffap" "ffap.el" (17829 31540)) +;;;;;; find-file-at-point ffap-next) "ffap" "ffap.el" (17943 4602)) ;;; Generated autoloads from ffap.el (autoload (quote ffap-next) "ffap" "\ @@ -11271,7 +11267,7 @@ Turn flymake mode off. ;;;### (autoloads (flyspell-buffer flyspell-region flyspell-mode-off ;;;;;; turn-off-flyspell turn-on-flyspell flyspell-mode flyspell-prog-mode) -;;;;;; "flyspell" "textmodes/flyspell.el" (17927 20254)) +;;;;;; "flyspell" "textmodes/flyspell.el" (17942 63381)) ;;; Generated autoloads from textmodes/flyspell.el (autoload (quote flyspell-prog-mode) "flyspell" "\ @@ -11414,8 +11410,8 @@ in your `~/.emacs' file, replacing [f7] by your favourite key: ;;;*** -;;;### (autoloads (footnote-mode) "footnote" "mail/footnote.el" (17842 -;;;;;; 55035)) +;;;### (autoloads (footnote-mode) "footnote" "mail/footnote.el" (17954 +;;;;;; 24686)) ;;; Generated autoloads from mail/footnote.el (autoload (quote footnote-mode) "footnote" "\ @@ -11609,7 +11605,7 @@ and choose the directory as the fortune-file. ;;;*** ;;;### (autoloads (gdb-enable-debug gdba) "gdb-ui" "progmodes/gdb-ui.el" -;;;;;; (17893 61665)) +;;;;;; (17941 38806)) ;;; Generated autoloads from progmodes/gdb-ui.el (autoload (quote gdba) "gdb-ui" "\ @@ -12303,7 +12299,7 @@ Update the .newsrc.eld file to reflect the change of nntp server. ;;;*** ;;;### (autoloads (gnus-button-reply gnus-button-mailto gnus-msg-mail) -;;;;;; "gnus-msg" "gnus/gnus-msg.el" (17938 61442)) +;;;;;; "gnus-msg" "gnus/gnus-msg.el" (17949 41467)) ;;; Generated autoloads from gnus/gnus-msg.el (autoload (quote gnus-msg-mail) "gnus-msg" "\ @@ -12543,7 +12539,7 @@ Add the window configuration CONF to `gnus-buffer-configuration'. ;;;*** -;;;### (autoloads (gomoku) "gomoku" "play/gomoku.el" (17842 55395)) +;;;### (autoloads (gomoku) "gomoku" "play/gomoku.el" (17941 38806)) ;;; Generated autoloads from play/gomoku.el (autoload (quote gomoku) "gomoku" "\ @@ -12600,7 +12596,7 @@ Also fontifies the buffer appropriately (see `goto-address-fontify-p' and ;;;### (autoloads (rgrep lgrep grep-find grep grep-mode grep-compute-defaults ;;;;;; grep-process-setup grep-setup-hook grep-find-command grep-command -;;;;;; grep-window-height) "grep" "progmodes/grep.el" (17908 16392)) +;;;;;; grep-window-height) "grep" "progmodes/grep.el" (17944 20144)) ;;; Generated autoloads from progmodes/grep.el (defvar grep-window-height nil "\ @@ -12643,10 +12639,10 @@ The default find program for `grep-find-command'. This variable's value takes effect when `grep-compute-defaults' is called.") (defvar grep-find-use-xargs nil "\ -Whether \\[grep-find] uses the `xargs' utility by default. - -If `exec', it uses `find -exec'; if `gnu', it uses `find -print0' and `xargs -0'; -if not nil and not `gnu', it uses `find -print' and `xargs'. +Non-nil means that `grep-find' uses the `xargs' utility by default. +If `exec', use `find -exec'. +If `gnu', use `find -print0' and `xargs -0'. +Any other non-nil value means to use `find -print' and `xargs'. This variable's value takes effect when `grep-compute-defaults' is called.") @@ -12754,7 +12750,7 @@ the form \"WINDOW-ID PIXMAP-ID\". Value is non-nil if successful. ;;;*** ;;;### (autoloads (gdb-script-mode jdb pdb perldb xdb dbx sdb gdb) -;;;;;; "gud" "progmodes/gud.el" (17938 61442)) +;;;;;; "gud" "progmodes/gud.el" (17950 21759)) ;;; Generated autoloads from progmodes/gud.el (autoload (quote gdb) "gud" "\ @@ -16488,7 +16484,7 @@ Not documented ;;;*** ;;;### (autoloads (lm lm-test-run) "landmark" "play/landmark.el" -;;;;;; (17842 55395)) +;;;;;; (17941 38806)) ;;; Generated autoloads from play/landmark.el (defalias (quote landmark-repeat) (quote lm-test-run)) @@ -16711,8 +16707,8 @@ generations (this defaults to 1). ;;;*** -;;;### (autoloads (unload-feature) "loadhist" "loadhist.el" (17870 -;;;;;; 63949)) +;;;### (autoloads (unload-feature) "loadhist" "loadhist.el" (17942 +;;;;;; 63381)) ;;; Generated autoloads from loadhist.el (autoload (quote unload-feature) "loadhist" "\ @@ -17450,8 +17446,8 @@ yourself the value of `master-of' by calling `master-show-slave'. ;;;*** -;;;### (autoloads (menu-bar-mode) "menu-bar" "menu-bar.el" (17842 -;;;;;; 58279)) +;;;### (autoloads (menu-bar-mode) "menu-bar" "menu-bar.el" (17942 +;;;;;; 63381)) ;;; Generated autoloads from menu-bar.el (put (quote menu-bar-mode) (quote standard-value) (quote (t))) @@ -17486,7 +17482,7 @@ turn on menu bars; otherwise, turn off menu bars. ;;;;;; message-cite-function message-yank-prefix message-citation-line-function ;;;;;; message-send-mail-function message-user-organization-file ;;;;;; message-signature-separator message-from-style) "message" -;;;;;; "gnus/message.el" (17929 33467)) +;;;;;; "gnus/message.el" (17949 41467)) ;;; Generated autoloads from gnus/message.el (defvar message-from-style (quote default) "\ @@ -19570,7 +19566,7 @@ The file is stored under the name `org-combined-agenda-icalendar-file'. ;;;*** ;;;### (autoloads (outline-minor-mode outline-mode) "outline" "outline.el" -;;;;;; (17881 61722)) +;;;;;; (17952 11093)) ;;; Generated autoloads from outline.el (put 'outline-regexp 'safe-local-variable 'string-or-null-p) @@ -19949,8 +19945,8 @@ Completion for the `chgrp' command. ;;;### (autoloads (pcomplete-shell-setup pcomplete-comint-setup pcomplete-list ;;;;;; pcomplete-help pcomplete-expand pcomplete-continue pcomplete-expand-and-complete -;;;;;; pcomplete-reverse pcomplete) "pcomplete" "pcomplete.el" (17900 -;;;;;; 30230)) +;;;;;; pcomplete-reverse pcomplete) "pcomplete" "pcomplete.el" (17944 +;;;;;; 62194)) ;;; Generated autoloads from pcomplete.el (autoload (quote pcomplete) "pcomplete" "\ @@ -20094,7 +20090,7 @@ The exact behavior is determined also by `cvs-dired-use-hook'." (when (stringp d ;;;*** ;;;### (autoloads (perl-mode) "perl-mode" "progmodes/perl-mode.el" -;;;;;; (17842 56332)) +;;;;;; (17955 36604)) ;;; Generated autoloads from progmodes/perl-mode.el (autoload (quote perl-mode) "perl-mode" "\ @@ -21451,7 +21447,7 @@ If EXTENSION is any other symbol, it is ignored. ;;;*** ;;;### (autoloads (jython-mode python-mode run-python) "python" "progmodes/python.el" -;;;;;; (17930 34071)) +;;;;;; (17956 9518)) ;;; Generated autoloads from progmodes/python.el (add-to-list (quote interpreter-mode-alist) (quote ("jython" . jython-mode))) @@ -23470,7 +23466,7 @@ during scrolling. ;;;;;; mail-alias-file mail-default-reply-to mail-archive-file-name ;;;;;; mail-header-separator send-mail-function mail-interactive ;;;;;; mail-self-blind mail-specify-envelope-from mail-from-style) -;;;;;; "sendmail" "mail/sendmail.el" (17842 55035)) +;;;;;; "sendmail" "mail/sendmail.el" (17942 63381)) ;;; Generated autoloads from mail/sendmail.el (defvar mail-from-style (quote angles) "\ @@ -23667,16 +23663,16 @@ Like Text Mode but with these additional commands: \\[mail-send-and-exit] mail-send-and-exit (send the message and exit) Here are commands that move to a header field (and create it if there isn't): - \\[mail-to] move to To: \\[mail-subject] move to Subject: - \\[mail-cc] move to CC: \\[mail-bcc] move to BCC: + \\[mail-to] move to To: \\[mail-subject] move to Subj: + \\[mail-bcc] move to BCC: \\[mail-cc] move to CC: \\[mail-fcc] move to FCC: \\[mail-reply-to] move to Reply-To: \\[mail-mail-reply-to] move to Mail-Reply-To: \\[mail-mail-followup-to] move to Mail-Followup-To: -\\[mail-text] mail-text (move to beginning of message text). +\\[mail-text] move to message text. \\[mail-signature] mail-signature (insert `mail-signature-file' file). \\[mail-yank-original] mail-yank-original (insert current message, in Rmail). \\[mail-fill-yanked-message] mail-fill-yanked-message (fill what was yanked). -\\[mail-sent-via] mail-sent-via (add a Sent-via field for each To or CC). +\\[mail-sent-via] mail-sent-via (add a sent-via field for each To or CC). Turning on Mail mode runs the normal hooks `text-mode-hook' and `mail-mode-hook' (in that order). @@ -24141,7 +24137,7 @@ Turning on Sieve mode runs `sieve-mode-hook'. ;;;*** -;;;### (autoloads nil "simple" "simple.el" (17938 22875)) +;;;### (autoloads nil "simple" "simple.el" (17949 41467)) ;;; Generated autoloads from simple.el (put 'fill-prefix 'safe-local-variable 'string-or-null-p) @@ -24344,7 +24340,7 @@ interactively. If there's no argument, do it at the current buffer ;;;*** ;;;### (autoloads (smtpmail-send-queued-mail smtpmail-send-it) "smtpmail" -;;;;;; "mail/smtpmail.el" (17938 24686)) +;;;;;; "mail/smtpmail.el" (17939 50716)) ;;; Generated autoloads from mail/smtpmail.el (autoload (quote smtpmail-send-it) "smtpmail" "\ @@ -25404,7 +25400,7 @@ Studlify-case the current buffer. ;;;*** -;;;### (autoloads (locate-library) "subr" "subr.el" (17938 61442)) +;;;### (autoloads (locate-library) "subr" "subr.el" (17949 41467)) ;;; Generated autoloads from subr.el (autoload (quote locate-library) "subr" "\ @@ -26215,8 +26211,8 @@ Normally input is edited in Emacs and sent a line at a time. ;;;*** -;;;### (autoloads (ansi-term term make-term) "term" "term.el" (17922 -;;;;;; 37595)) +;;;### (autoloads (ansi-term term make-term) "term" "term.el" (17952 +;;;;;; 11093)) ;;; Generated autoloads from term.el (autoload (quote make-term) "term" "\ @@ -26292,7 +26288,7 @@ Start coverage on function under point. ;;;*** -;;;### (autoloads (tetris) "tetris" "play/tetris.el" (17897 26294)) +;;;### (autoloads (tetris) "tetris" "play/tetris.el" (17941 38806)) ;;; Generated autoloads from play/tetris.el (autoload (quote tetris) "tetris" "\ @@ -27396,7 +27392,7 @@ PATTERN regexp. ;;;*** ;;;### (autoloads (tmm-prompt tmm-menubar-mouse tmm-menubar) "tmm" -;;;;;; "tmm.el" (17938 22875)) +;;;;;; "tmm.el" (17952 58711)) ;;; Generated autoloads from tmm.el (define-key global-map "\M-`" 'tmm-menubar) (define-key global-map [f10] 'tmm-menubar) @@ -28469,7 +28465,7 @@ Not documented ;;;*** ;;;### (autoloads (url-http-options url-http-file-attributes url-http-file-exists-p -;;;;;; url-http) "url-http" "url/url-http.el" (17935 53395)) +;;;;;; url-http) "url-http" "url/url-http.el" (17952 11683)) ;;; Generated autoloads from url/url-http.el (autoload (quote url-http) "url-http" "\ @@ -28665,7 +28661,7 @@ Not documented ;;;*** ;;;### (autoloads (url-generic-parse-url url-recreate-url) "url-parse" -;;;;;; "url/url-parse.el" (17842 56569)) +;;;;;; "url/url-parse.el" (17954 22157)) ;;; Generated autoloads from url/url-parse.el (autoload (quote url-recreate-url) "url-parse" "\ @@ -30415,8 +30411,8 @@ With arg, turn widget mode on if and only if arg is positive. ;;;*** ;;;### (autoloads (widget-setup widget-insert widget-delete widget-create -;;;;;; widget-prompt-value widgetp) "wid-edit" "wid-edit.el" (17884 -;;;;;; 58614)) +;;;;;; widget-prompt-value widgetp) "wid-edit" "wid-edit.el" (17952 +;;;;;; 11093)) ;;; Generated autoloads from wid-edit.el (autoload (quote widgetp) "wid-edit" "\ @@ -30533,7 +30529,7 @@ With arg, turn Winner mode on if and only if arg is positive. ;;;*** ;;;### (autoloads (woman-find-file woman-dired-find-file woman) "woman" -;;;;;; "woman.el" (17934 34122)) +;;;;;; "woman.el" (17949 41467)) ;;; Generated autoloads from woman.el (autoload (quote woman) "woman" "\ @@ -30778,7 +30774,7 @@ Zippy goes to the analyst. ;;;*** -;;;### (autoloads (zone) "zone" "play/zone.el" (17842 55395)) +;;;### (autoloads (zone) "zone" "play/zone.el" (17941 38806)) ;;; Generated autoloads from play/zone.el (autoload (quote zone) "zone" "\ @@ -30918,7 +30914,7 @@ Zone out, completely. ;;;;;; "url/url-vars.el" "url/vc-dav.el" "vc-hooks.el" "vcursor.el" ;;;;;; "version.el" "vms-patch.el" "vmsproc.el" "vt-control.el" ;;;;;; "vt100-led.el" "w32-fns.el" "w32-vars.el" "widget.el" "window.el" -;;;;;; "x-dnd.el") (17938 62045 277063)) +;;;;;; "x-dnd.el") (17956 9728 35408)) ;;;*** diff --git a/lisp/locate.el b/lisp/locate.el index e8dafa79048..74a76fa4889 100644 --- a/lisp/locate.el +++ b/lisp/locate.el @@ -114,8 +114,10 @@ ;; Variables -(defvar locate-current-search nil) (defvar locate-current-filter nil) +(defvar locate-local-filter nil) +(defvar locate-local-search nil) +(defvar locate-local-prompt nil) (defgroup locate nil "Interface to the locate command." @@ -220,7 +222,10 @@ option to \"/\"." (defcustom locate-prompt-for-command nil "If non-nil, the `locate' command prompts for a command to run. -Otherwise, that behavior is invoked via a prefix argument." +Otherwise, that behavior is invoked via a prefix argument. + +Setting this option non-nil actually inverts the meaning of a prefix arg; +that is, with a prefix arg, you get the default behavior." :group 'locate :type 'boolean) @@ -240,8 +245,32 @@ Otherwise, that behavior is invoked via a prefix argument." (skip-chars-backward "." pt) (point))))) +;; Function for use in interactive declarations. +(defun locate-prompt-for-search-string () + (if (or (and current-prefix-arg + (not locate-prompt-for-command)) + (and (not current-prefix-arg) locate-prompt-for-command)) + (let ((locate-cmd (funcall locate-make-command-line ""))) + (read-from-minibuffer + "Run locate (like this): " + (cons + (concat (car locate-cmd) " " + (mapconcat 'identity (cdr locate-cmd) " ")) + (+ 2 (length (car locate-cmd)))) + nil nil 'locate-history-list)) + (let* ((default (locate-word-at-point)) + (input + (read-from-minibuffer + (if (> (length default) 0) + (format "Locate (default %s): " default) + (format "Locate: ")) + nil nil nil 'locate-history-list default t))) + (and (equal input "") default + (setq input default)) + input))) + ;;;###autoload -(defun locate (search-string &optional filter) +(defun locate (search-string &optional filter arg) "Run the program `locate', putting results in `*Locate*' buffer. Pass it SEARCH-STRING as argument. Interactively, prompt for SEARCH-STRING. With prefix arg, prompt for the exact shell command to run instead. @@ -258,68 +287,49 @@ You can specify another program for this command to run by customizing the variables `locate-command' or `locate-make-command-line'. The main use of FILTER is to implement `locate-with-filter'. See -the docstring of that function for its meaning." +the docstring of that function for its meaning. + +ARG is the interactive prefix arg." (interactive - (list - (if (or (and current-prefix-arg - (not locate-prompt-for-command)) - (and (not current-prefix-arg) locate-prompt-for-command)) - (let ((locate-cmd (funcall locate-make-command-line ""))) - (read-from-minibuffer - "Run locate (like this): " - (cons - (concat (car locate-cmd) " " - (mapconcat 'identity (cdr locate-cmd) " ")) - (+ 2 (length (car locate-cmd)))) - nil nil 'locate-history-list)) - (let* ((default (locate-word-at-point)) - (input - (read-from-minibuffer - (if (> (length default) 0) - (format "Locate (default %s): " default) - (format "Locate: ")) - nil nil nil 'locate-history-list default t))) - (and (equal input "") default - (setq input default)) - input)))) + (list + (locate-prompt-for-search-string) + nil + current-prefix-arg)) + (if (equal search-string "") (error "Please specify a filename to search for")) (let* ((locate-cmd-list (funcall locate-make-command-line search-string)) (locate-cmd (car locate-cmd-list)) (locate-cmd-args (cdr locate-cmd-list)) (run-locate-command - (or (and current-prefix-arg (not locate-prompt-for-command)) - (and (not current-prefix-arg) locate-prompt-for-command))) - locate-buffer + (or (and arg (not locate-prompt-for-command)) + (and (not arg) locate-prompt-for-command))) ) ;; Find the Locate buffer - (setq locate-buffer (if (eq major-mode 'locate-mode) - (current-buffer) - (get-buffer-create locate-buffer-name))) - - (save-excursion - (set-buffer locate-buffer) + (save-window-excursion + (set-buffer (get-buffer-create locate-buffer-name)) (locate-mode) - (let ((inhibit-read-only t) - (buffer-undo-list t)) - (erase-buffer) + (buffer-undo-list t)) + (erase-buffer) - (set (make-local-variable 'locate-current-search) search-string) - (set (make-local-variable 'locate-current-filter) filter) + (setq locate-current-filter filter) + (set (make-local-variable 'locate-local-search) search-string) + (set (make-local-variable 'locate-local-filter) filter) + (set (make-local-variable 'locate-local-prompt) run-locate-command) - (if run-locate-command - (shell-command search-string) - (apply 'call-process locate-cmd nil t nil locate-cmd-args)) + (if run-locate-command + (shell-command search-string locate-buffer-name) + (apply 'call-process locate-cmd nil t nil locate-cmd-args)) - (and filter - (locate-filter-output filter)) + (and filter + (locate-filter-output filter)) - (locate-do-setup search-string))) - - (unless (eq (current-buffer) locate-buffer) - (switch-to-buffer-other-window locate-buffer)) + (locate-do-setup search-string) + )) + (and (not (string-equal (buffer-name) locate-buffer-name)) + (switch-to-buffer-other-window locate-buffer-name)) (run-hooks 'dired-mode-hook) (dired-next-line 3) ;move to first matching file. @@ -328,7 +338,7 @@ the docstring of that function for its meaning." ) ;;;###autoload -(defun locate-with-filter (search-string filter) +(defun locate-with-filter (search-string filter &optional arg) "Run the executable program `locate' with a filter. This function is similar to the function `locate', which see. The difference is that, when invoked interactively, the present function @@ -338,14 +348,17 @@ that lists only those lines in the output of the locate program that contain a match for the regular expression FILTER; this is often useful to constrain a big search. +ARG is the interactive prefix arg, which has the same effect as in `locate'. + When called from Lisp, this function is identical with `locate', except that FILTER is not optional." (interactive - (list (read-from-minibuffer "Locate: " nil nil - nil 'locate-history-list) - (read-from-minibuffer "Filter: " nil nil - nil 'locate-grep-history-list))) - (locate search-string filter)) + (list + (locate-prompt-for-search-string) + (read-from-minibuffer "Filter: " nil nil + nil 'locate-grep-history-list) + current-prefix-arg)) + (locate search-string filter arg)) (defun locate-filter-output (filter) "Filter output from the locate command." @@ -469,7 +482,6 @@ do not work in subdirectories. default-directory "/" buffer-read-only t selective-display t) - (buffer-disable-undo) (dired-alist-add-1 default-directory (point-min-marker)) (set (make-local-variable 'dired-directory) "/") (set (make-local-variable 'dired-subdir-switches) locate-ls-subdir-switches) @@ -501,12 +513,11 @@ do not work in subdirectories. ;; Nothing returned from locate command? (and (eobp) (progn - (let ((filter locate-current-filter)) ; local - (kill-buffer (current-buffer)) - (if filter - (error "Locate: no match for %s in database using filter %s" - search-string filter) - (error "Locate: no match for %s in database" search-string))))) + (kill-buffer locate-buffer-name) + (if locate-current-filter + (error "Locate: no match for %s in database using filter %s" + search-string locate-current-filter) + (error "Locate: no match for %s in database" search-string)))) (locate-insert-header search-string) @@ -590,14 +601,16 @@ do not work in subdirectories. "Revert the *Locate* buffer. If `locate-update-when-revert' is non-nil, offer to update the locate database using the shell command in `locate-update-command'." - (and locate-update-when-revert - (yes-or-no-p "Update locate database (may take a few seconds)? ") - ;; `expand-file-name' is used in order to autoload Tramp if - ;; necessary. It cannot be loaded when `default-directory' - ;; is remote. - (let ((default-directory (expand-file-name locate-update-path))) - (shell-command locate-update-command))) - (locate locate-current-search locate-current-filter)) + (let ((locate-buffer-name (buffer-name)) + (locate-prompt-for-command locate-local-prompt)) + (and locate-update-when-revert + (yes-or-no-p "Update locate database (may take a few seconds)? ") + ;; `expand-file-name' is used in order to autoload Tramp if + ;; necessary. It cannot be loaded when `default-directory' + ;; is remote. + (let ((default-directory (expand-file-name locate-update-path))) + (shell-command locate-update-command))) + (locate locate-local-search locate-local-filter))) ;;; Modified three functions from `dired.el': ;;; dired-find-directory, diff --git a/lisp/mail/footnote.el b/lisp/mail/footnote.el index 2dd2e7af175..7992438df25 100644 --- a/lisp/mail/footnote.el +++ b/lisp/mail/footnote.el @@ -267,14 +267,17 @@ Wrapping around the alphabet implies successive repetitions of letters." ;; Latin-1 -(defconst footnote-latin-regexp "¹²³ºª§¶" +(defconst footnote-latin-string "¹²³ºª§¶" + "String of Latin-1 footnoting characters.") + +(defconst footnote-latin-regexp (concat "[" footnote-latin-string "]") "Regexp for Latin-1 footnoting characters.") (defun Footnote-latin (n) "Latin-1 footnote style. Use a range of Latin-1 non-ASCII characters for footnoting." - (string (aref footnote-latin-regexp - (mod (1- n) (length footnote-latin-regexp))))) + (string (aref footnote-latin-string + (mod (1- n) (length footnote-latin-string))))) ;;; list of all footnote styles (defvar footnote-style-alist @@ -291,14 +294,18 @@ See footnote-han.el, footnote-greek.el and footnote-hebrew.el for more exciting styles.") (defcustom footnote-style 'numeric - "*Style used for footnoting. + "*Default style used for footnoting. numeric == 1, 2, 3, ... english-lower == a, b, c, ... english-upper == A, B, C, ... roman-lower == i, ii, iii, iv, v, ... roman-upper == I, II, III, IV, V, ... latin == ¹ ² ³ º ª § ¶ -See also variables `footnote-start-tag' and `footnote-end-tag'." +See also variables `footnote-start-tag' and `footnote-end-tag'. + +Customizing this variable has no effect on buffers already +displaying footnotes. You can change the style of existing +buffers using the command `Footnote-set-style'." :type (cons 'choice (mapcar (lambda (x) (list 'const (car x))) footnote-style-alist)) :group 'footnote) @@ -654,7 +661,7 @@ delete the footnote with that number." (while (< i notes) (setq alist-ptr (nth i footnote-pointer-marker-alist)) (setq alist-txt (nth i footnote-text-marker-alist)) - (unless (eq (1+ i) (car alist-ptr)) + (unless (= (1+ i) (car alist-ptr)) (Footnote-renumber (car alist-ptr) (1+ i) alist-ptr alist-txt)) (setq i (1+ i)))))) diff --git a/lisp/outline.el b/lisp/outline.el index 579997754f2..d0c121a12c4 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -1000,7 +1000,8 @@ Stop at the first and last subheadings of a superior heading." (error "No following same-level heading")))))) (defun outline-get-next-sibling () - "Move to next heading of the same level, and return point or nil if none." + "Move to next heading of the same level, and return point. +If there is no such heading, return nil." (let ((level (funcall outline-level))) (outline-next-visible-heading 1) (while (and (not (eobp)) (> (funcall outline-level) level)) @@ -1026,15 +1027,18 @@ Stop at the first and last subheadings of a superior heading." (error "No previous same-level heading")))))) (defun outline-get-last-sibling () - "Move to previous heading of the same level, and return point or nil if none." - (let ((level (funcall outline-level))) + "Move to previous heading of the same level, and return point. +If there is no such heading, return nil." + (let ((opoint (point)) + (level (funcall outline-level))) (outline-previous-visible-heading 1) - (while (and (> (funcall outline-level) level) - (not (bobp))) - (outline-previous-visible-heading 1)) - (if (< (funcall outline-level) level) - nil - (point)))) + (when (and (/= (point) opoint) (outline-on-heading-p)) + (while (and (> (funcall outline-level) level) + (not (bobp))) + (outline-previous-visible-heading 1)) + (if (< (funcall outline-level) level) + nil + (point))))) (defun outline-headers-as-kill (beg end) "Save the visible outline headers in region at the start of the kill ring. diff --git a/lisp/paren.el b/lisp/paren.el index 95f718d5683..38ac150b402 100644 --- a/lisp/paren.el +++ b/lisp/paren.el @@ -143,6 +143,7 @@ in `show-paren-style' after `show-paren-delay' seconds of Emacs idle time." (let ((oldpos (point)) (dir (cond ((eq (syntax-class (syntax-after (1- (point)))) 5) -1) ((eq (syntax-class (syntax-after (point))) 4) 1))) + (window-start (window-start)) pos mismatch face) ;; ;; Find the other end of the sexp. @@ -247,7 +248,13 @@ in `show-paren-style' after `show-paren-delay' seconds of Emacs idle time." ;; ;; Always set the overlay face, since it varies. (overlay-put show-paren-overlay 'priority show-paren-priority) - (overlay-put show-paren-overlay 'face face))) + (overlay-put show-paren-overlay 'face face)) + ;; If there are continued lines, the above operations can + ;; force redisplay to recenter the window (since there is no + ;; way for it to know that the overlay changes to the buffer + ;; are harmless). So reset the window-start. + (unless (window-minibuffer-p) + (set-window-start (selected-window) window-start))) ;; show-paren-mode is nil in this buffer. (and show-paren-overlay (delete-overlay show-paren-overlay)) diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 79043c87b63..079ebb02622 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -856,8 +856,8 @@ is inhibited." (narrow-to-region (point-min) (point)) (back-to-indentation) (looking-at (concat c-current-comment-prefix "[ \t]*$"))))) - (kill-region (progn (forward-line 0) (point)) - (progn (end-of-line) (point))) + (delete-region (progn (forward-line 0) (point)) + (progn (end-of-line) (point))) (insert-char ?* 1)) ; the / comes later. ; Do I need a t (retain sticky properties) here? (setq indentp (and (not arg) @@ -1360,10 +1360,24 @@ No indentation or other \"electric\" behavior is performed." (and c-opt-block-decls-with-vars-key (save-excursion (c-syntactic-skip-backward "^;}" lim) - (and (eq (char-before) ?\}) - (eq (car (c-beginning-of-decl-1 lim)) 'previous) - (looking-at c-opt-block-decls-with-vars-key) - (point))))) + (let ((eo-block (point)) + bod) + (and (eq (char-before) ?\}) + (eq (car (c-beginning-of-decl-1 lim)) 'previous) + (setq bod (point)) + ;; Look for struct or union or ... If we find one, it might + ;; be the return type of a function, or the like. Exclude + ;; this case. + (c-syntactic-re-search-forward + (concat "[;=\(\[{]\\|\\(" + c-opt-block-decls-with-vars-key + "\\)") + eo-block t t t) + (match-beginning 1) ; Is there a "struct" etc., somewhere? + (not (eq (char-before) ?_)) + (c-syntactic-re-search-forward "[;=\(\[{]" eo-block t t t) + (eq (char-before) ?\{) + bod))))) (defun c-where-wrt-brace-construct () ;; Determine where we are with respect to functions (or other brace @@ -1531,7 +1545,7 @@ defun." (setq arg (c-forward-to-nth-EOF-} (- arg) where))) ;; Move forward to the next opening brace.... (when (and (= arg 0) - (c-syntactic-re-search-forward "{" nil t)) + (c-syntactic-re-search-forward "{" nil 'eob)) (backward-char) ;; ... and backward to the function header. (c-beginning-of-decl-1) diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index f5da0eecc2e..c3c17a6f3c5 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -820,7 +820,7 @@ compatible with old code; callers should always specify it." "$") nil t) (beginning-of-line) - (kill-line 1))) + (delete-region (point) (progn (end-of-line) (point))))) ;; Delete the first line, if we've got one, in case it contains a mode spec. (unless (and lv-point @@ -828,8 +828,7 @@ compatible with old code; callers should always specify it." (forward-line 0) (bobp))) (goto-char (point-min)) - (unless (eobp) - (kill-line 1))))) + (delete-region (point) (progn (end-of-line) (point)))))) (defun c-postprocess-file-styles () "Function that post processes relevant file local variables in CC Mode. diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 7fd5f83ea78..ce933cb13d5 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1042,7 +1042,7 @@ Returns the compilation buffer created." highlight-regexp)) ;; Output a mode setter, for saving and later reloading this buffer. (insert "-*- mode: " name-of-mode - "; compilation-directory: " (prin1-to-string compilation-directory) + "; default-directory: " (prin1-to-string default-directory) " -*-\n" (format "%s started at %s\n\n" mode-name diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 96c94591531..a07fb5ee44f 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -233,6 +233,7 @@ for constructs with multiline if/unless/while/until/for/foreach condition." "*Indentation of CPerl statements with respect to containing block." :type 'integer :group 'cperl-indentation-details) +(put 'cperl-indent-level 'safe-local-variable 'integerp) (defcustom cperl-lineup-step nil "*`cperl-lineup' will always lineup at multiple of this number. diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el index 77d20792442..7ba4ffdc749 100644 --- a/lisp/progmodes/ebnf2ps.el +++ b/lisp/progmodes/ebnf2ps.el @@ -2830,7 +2830,7 @@ See `ebnf-style-database' documentation." (and (assoc name ebnf-style-database) (error "Style name already exists: %s" name)) (or (assoc inherits ebnf-style-database) - (error "Style inheritance name does'nt exist: %s" inherits)) + (error "Style inheritance name doesn't exist: %s" inherits)) (setq ebnf-style-database (cons (cons name (cons inherits (ebnf-check-style-values values))) ebnf-style-database))) @@ -2860,7 +2860,7 @@ See `ebnf-style-database' documentation." See `ebnf-style-database' documentation." (interactive "SStyle name: \nXStyle values: ") (let ((style (or (assoc name ebnf-style-database) - (error "Style name does'nt exist: %s" name))) + (error "Style name doesn't exist: %s" name))) (merge (ebnf-check-style-values values)) val elt new check) ;; modify value of existing variables diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 1ec9e978229..3d252190eff 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -238,7 +238,7 @@ Used to grey out relevant toolbar icons.") ,(propertize "run" 'face 'font-lock-doc-face) gud-run :visible (memq gud-minor-mode '(gdbmi gdb dbx jdb))) ([menu-bar go] menu-item - ,(propertize "go" 'face 'font-lock-doc-face) gud-go + ,(propertize " go " 'face 'font-lock-doc-face) gud-go :visible (and (not gud-running) (eq gud-minor-mode 'gdba))) ([menu-bar stop] menu-item @@ -2304,6 +2304,8 @@ gud, see `gud-mode'." (gud-def gud-up "up\C-Mwhere" "<" "Up one stack frame.") (gud-def gud-down "down\C-Mwhere" ">" "Up one stack frame.") (gud-def gud-run "run" nil "Run the program.") ;if VM start using jdb + (gud-def gud-print "print %e" "\C-p" "Evaluate Java expression at point.") + (setq comint-prompt-regexp "^> \\|^[^ ]+\\[[0-9]+\\] ") (setq paragraph-start comint-prompt-regexp) @@ -2853,7 +2855,9 @@ Obeying it means displaying in another window the specified file and line." (when (looking-at comint-prompt-regexp) (set-marker gud-delete-prompt-marker (point)) (set-marker-insertion-type gud-delete-prompt-marker t)) - (insert (concat expr " = "))))) + (unless (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) + 'jdb) + (insert (concat expr " = ")))))) expr)) ;; The next eight functions are hacked from gdbsrc.el by diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index bcecdeafa0f..3b9fb5a896a 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el @@ -2586,7 +2586,7 @@ breakpoint can not be set." (if (idlwave-shell-hide-p 'debug) 'mostly) nil t)) -(defun idlwave-shell-clear-bp (bp) +(defun idlwave-shell-clear-bp (bp &optional no-query) "Clear breakpoint BP. Clears in IDL and in `idlwave-shell-bp-alist'." (let ((index (idlwave-shell-bp-get bp))) @@ -2595,7 +2595,7 @@ Clears in IDL and in `idlwave-shell-bp-alist'." (idlwave-shell-send-command (concat "breakpoint,/clear," (int-to-string index)) nil (idlwave-shell-hide-p 'breakpoint) nil t) - (idlwave-shell-bp-query))))) + (unless no-query (idlwave-shell-bp-query)))))) (defun idlwave-shell-current-frame () "Return a list containing the current file name and line point is in. @@ -3722,17 +3722,22 @@ Existing overlays are recycled, in order to minimize consumption." (setq old-buffers (delq (current-buffer) old-buffers))) (if (fboundp 'set-specifier) ;; XEmacs (set-specifier left-margin-width (cons (current-buffer) 2)) - (setq left-margin-width 2)) - (if (setq win (get-buffer-window (current-buffer) t)) - (set-window-buffer win (current-buffer)))))) + (if (< left-margin-width 2) + (setq left-margin-width 2))) + (let ((window (get-buffer-window (current-buffer) 0))) + (if window + (set-window-margins + window left-margin-width right-margin-width)))))) (if use-glyph (while (setq buf (pop old-buffers)) (with-current-buffer buf (if (fboundp 'set-specifier) ;; XEmacs (set-specifier left-margin-width (cons (current-buffer) 0)) (setq left-margin-width 0)) - (if (setq win (get-buffer-window buf t)) - (set-window-buffer win buf)))))))) + (let ((window (get-buffer-window buf 0))) + (if window + (set-window-margins + window left-margin-width right-margin-width))))))))) (defun idlwave-shell-make-new-bp-overlay (&optional type disabled) "Make a new overlay for highlighting breakpoints. @@ -4055,7 +4060,9 @@ list elements of the form: idlwave-shell-bp-query '(progn (idlwave-shell-filter-bp) - (mapcar 'idlwave-shell-clear-bp idlwave-shell-bp-alist)) + (mapcar (lambda (x) (idlwave-shell-clear-bp x 'no-query)) + idlwave-shell-bp-alist) + (idlwave-shell-bp-query)) 'hide)) (defun idlwave-shell-list-all-bp () diff --git a/lisp/progmodes/mantemp.el b/lisp/progmodes/mantemp.el index 61b8d3d4d3d..2084f364d55 100644 --- a/lisp/progmodes/mantemp.el +++ b/lisp/progmodes/mantemp.el @@ -105,14 +105,14 @@ "^[A-z :&*<>~=,0-9+]*>::operator " nil t nil) (progn (backward-char 11) - (kill-line))) + (delete-region (point) (line-end-position)))) ;; Remove other member function extensions. (goto-char (point-min)) (message "Removing member function extensions") (while (re-search-forward "^[A-z :&*<>~=,0-9+]*>::" nil t nil) (progn (backward-char 2) - (kill-line))))) + (delete-region (point) (line-end-position)))))) (defun mantemp-sort-and-unique-lines () "Eliminate all consecutive duplicate lines in the buffer." @@ -127,7 +127,7 @@ (progn (forward-line -1) (beginning-of-line) - (kill-line 1))))) + (delete-region (point) (progn (forward-line 1) (point))))))) (defun mantemp-insert-cxx-syntax () "Insert C++ syntax around each template class and function. @@ -161,7 +161,7 @@ the lines." (progn (beginning-of-line) (forward-word 1) - (kill-word 1))))) + (delete-region (point) (progn (forward-word 1) (point))))))) (defun mantemp-make-mantemps () "Gathering interface to the functions modifying the buffer." @@ -189,16 +189,16 @@ This function does the same thing as `mantemp-make-mantemps-buffer', but operates on the region." (interactive) (let ((cur-buf (current-buffer)) - (mantemp-buffer (generate-new-buffer "*mantemp*"))) + (mantemp-buffer (generate-new-buffer "*mantemp*")) + (str (buffer-substring (mark) (point)))) ;; Copy the region to a temporary buffer, make the C++ code there ;; and copy the result back to the current buffer. - (kill-region (mark) (point)) (set-buffer mantemp-buffer) - (yank) + (insert str) (mantemp-make-mantemps) - (kill-region (point-min) (point-max)) + (setq str (buffer-string)) (set-buffer cur-buf) - (yank) + (insert str) (kill-buffer mantemp-buffer)) (message "Done")) diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index 8b6bc4462d6..35ae6b80901 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -391,6 +391,7 @@ The expansion is entirely correct because it uses the C preprocessor." "*Indentation of Perl statements with respect to containing block." :type 'integer :group 'perl) +(put 'perl-indent-level 'safe-local-variable 'integerp) (defcustom perl-continued-statement-offset 4 "*Extra indent for lines not starting new statements." :type 'integer @@ -646,10 +647,10 @@ possible action from the following list: (if (and comment-start-skip (re-search-forward comment-start-skip eol 'move)) (if (eolp) - (progn ; kill existing comment + (progn ; delete existing comment (goto-char (match-beginning 0)) (skip-chars-backward " \t") - (kill-region (point) eol)) + (delete-region (point) eol)) (if (or (< oldpnt (point)) (= oldpnt eol)) (indent-for-comment) ; indent existing comment (end-of-line))) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 1709428a611..e57c7e639c9 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -981,11 +981,15 @@ don't move and return nil. Otherwise return t." (_ (if (python-comment-line-p) (python-skip-comments/blanks t))) (ci (current-indentation)) - (open (python-open-block-statement-p))) + (open (python-open-block-statement-p)) + opoint) (if (and (zerop ci) (not open)) (not (goto-char point)) (catch 'done - (while (zerop (python-next-statement)) + (setq opoint (point)) + (while (and (zerop (python-next-statement)) + (not (= opoint (point)))) + (setq opoint (point)) (when (or (and open (<= (current-indentation) ci)) (< (current-indentation) ci)) (python-skip-comments/blanks t) diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index 2d7bbd79c6b..c549d066b64 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -7028,7 +7028,7 @@ else indent `correctly'." (indent-to comment-column) (indent-according-to-mode)) (t ; inline comment indent - (kill-line -0)))) + (delete-region (line-beginning-position) (point))))) ;; dedent ((and (>= (current-indentation) vhdl-basic-offset) (or (eq last-command 'vhdl-electric-tab) @@ -7161,7 +7161,7 @@ ENDPOS is encountered." (when (not (looking-at "^\\s-*\\(--.*\\)?$")) (end-of-line) (if (search-backward " -- ((" (vhdl-point 'bol) t) - (kill-line)) + (delete-region (point) (line-end-position))) (insert " -- ") (insert (format "%s" expurgated)))))) (vhdl-keep-region-active)) @@ -8346,7 +8346,9 @@ Turn on if ARG positive, turn off if ARG negative, toggle if ARG zero or nil." (progn (vhdl-insert-keyword "FOR ") (if (vhdl-template-field "[quantity name]" " USE " t) (progn (vhdl-template-field "quantity name" " => ") t) - (kill-word -1) nil)) + (delete-region (point) + (progn (forward-word -1) (point))) + nil)) (vhdl-template-field "[quantity name]" " => " t)) (vhdl-template-field "expression") (setq position (point)) @@ -8482,7 +8484,7 @@ since these are almost equivalent)." (setq position (point)) (vhdl-insert-keyword "PORT ") (unless (vhdl-template-map position t t) - (kill-line -0) + (delete-region (line-beginning-position) (point)) (delete-char -1)) (insert ";")))) @@ -8573,7 +8575,7 @@ a configuration declaration if not within a design unit." (setq position (point)) (vhdl-insert-keyword "PORT ") (unless (vhdl-template-map position t t) - (kill-line -0) + (delete-region (line-beginning-position) (point)) (delete-char -1)) (insert ";") t) @@ -9116,11 +9118,11 @@ otherwise." (cond ((equal definition "") (insert ";")) ((equal definition "ARRAY") - (kill-word -1) + (delete-region (point) (progn (forward-word -1) (point))) (vhdl-template-array 'nature t)) ((equal definition "RECORD") (setq mid-pos (point-marker)) - (kill-word -1) + (delete-region (point) (progn (forward-word -1) (point))) (vhdl-template-record 'nature name t)) (t (vhdl-insert-keyword " ACROSS ") @@ -9435,7 +9437,7 @@ otherwise." (insert "\n") (indent-to (+ margin vhdl-basic-offset)) (setq first nil)) - (kill-line -0) + (delete-region (line-beginning-position) (point)) (indent-to margin) (vhdl-insert-keyword "END RECORD") (unless (vhdl-standard-p '87) (and name (insert " " name))) @@ -9600,11 +9602,11 @@ otherwise." (delete-backward-char 4) (insert ";")) ((equal definition "ARRAY") - (kill-word -1) + (delete-region (point) (progn (forward-word -1) (point))) (vhdl-template-array 'type t)) ((equal definition "RECORD") (setq mid-pos (point-marker)) - (kill-word -1) + (delete-region (point) (progn (forward-word -1) (point))) (vhdl-template-record 'type name t)) ((equal definition "ACCESS") (insert " ") diff --git a/lisp/replace.el b/lisp/replace.el index a8dfd043c72..ed1fa9a6b59 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -303,6 +303,11 @@ Use \\[repeat-complex-command] after this command for details." (defun query-replace-regexp-eval (regexp to-expr &optional delimited start end) "Replace some things after point matching REGEXP with the result of TO-EXPR. + +Interactive use of this function is deprecated in favor of the +`\\,' feature of `query-replace-regexp'. For non-interactive use, a loop +using `search-forward-regexp' and `replace-match' is preferred. + As each match is found, the user must type a character saying what to do with it. For directions, type \\[help-command] at that time. @@ -354,6 +359,11 @@ Fourth and fifth arg START and END specify the region to operate on." (perform-replace regexp (cons 'replace-eval-replacement to-expr) t 'literal delimited nil nil start end)) +(make-obsolete 'query-replace-regexp-eval + "for interactive use, use the special `\\,' feature of +`query-replace-regexp' instead. Non-interactively, a loop +using `search-forward-regexp' and `replace-match' is preferred." "22.1") + (defun map-query-replace-regexp (regexp to-strings &optional n start end) "Replace some matches for REGEXP with various strings, in rotation. The second argument TO-STRINGS contains the replacement strings, diff --git a/lisp/simple.el b/lisp/simple.el index 382a121b222..d3ceb3d994f 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3179,6 +3179,8 @@ Start discarding off end if gets this big." (interactive) (if (null (mark t)) (error "No mark set in this buffer") + (if (= (point) (mark t)) + (message "Mark popped")) (goto-char (mark t)) (pop-mark))) @@ -3196,24 +3198,31 @@ Display `Mark set' unless the optional second arg NOMSG is non-nil." (message "Mark activated"))))) (defcustom set-mark-command-repeat-pop nil - "*Non-nil means that repeating \\[set-mark-command] after popping will pop. -This means that if you type C-u \\[set-mark-command] \\[set-mark-command] -will pop twice." + "*Non-nil means repeating \\[set-mark-command] after popping mark pops it again. +That means that C-u \\[set-mark-command] \\[set-mark-command] +will pop the mark twice, and +C-u \\[set-mark-command] \\[set-mark-command] \\[set-mark-command] +will pop the mark three times. + +nil means \\[set-mark-command]'s behavior does not change +after C-u \\[set-mark-command]." :type 'boolean - :group 'editing) + :group 'editing-basics) (defun set-mark-command (arg) - "Set mark where point is, or jump to mark. -Setting the mark also sets the \"region\", which is the closest -equivalent in Emacs to what some editors call the \"selection\". + "Set the mark where point is, or jump to the mark. +Setting the mark also alters the region, which is the text +between point and mark; this is the closest equivalent in +Emacs to what some editors call the \"selection\". + +With no prefix argument, set the mark at point, and push the +old mark position on local mark ring. Also push the old mark on +global mark ring, if the previous mark was set in another buffer. -With no prefix argument, set mark and push old mark position on local -mark ring. Also, push mark on global mark ring, if last mark was set in -another buffer. Immediately repeating the command activates -`transient-mark-mode' temporarily. +Immediately repeating this command activates `transient-mark-mode' temporarily. With prefix argument \(e.g., \\[universal-argument] \\[set-mark-command]\), \ -jump to mark, and set mark from +jump to the mark, and set the mark from position popped off the local mark ring \(this does not affect the global mark ring\). Use \\[pop-global-mark] to jump to a mark popped off the global mark ring \(see `pop-global-mark'\). @@ -3222,9 +3231,9 @@ If `set-mark-command-repeat-pop' is non-nil, repeating the \\[set-mark-command] command with no prefix argument pops the next position off the local (or global) mark ring and jumps there. -With a double \\[universal-argument] prefix argument \(e.g., \\[universal-argument] \ -\\[universal-argument] \\[set-mark-command]\), unconditionally -set mark where point is, even if `set-mark-command-repeat-pop' is non-nil. +With \\[universal-argument] \\[universal-argument] as prefix +argument, unconditionally set mark where point is, even if +`set-mark-command-repeat-pop' is non-nil. Novice Emacs Lisp programmers often try to use the mark for the wrong purposes. See the documentation of `set-mark' for more information." diff --git a/lisp/subr.el b/lisp/subr.el index 31604d3ecda..d42c096a414 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1719,6 +1719,9 @@ by doing (clear-string STRING)." ;; This should be used by `call-interactively' for `n' specs. (defun read-number (prompt &optional default) + "Read a numeric value in the minibuffer, prompting with PROMPT. +DEFAULT specifies a default value to return if the user just types RET. +The value of DEFAULT is inserted into PROMPT." (let ((n nil)) (when default (setq prompt @@ -1732,9 +1735,11 @@ by doing (clear-string STRING)." (let ((str (read-from-minibuffer prompt nil nil nil nil (and default (number-to-string default))))) - (setq n (cond - ((zerop (length str)) default) - ((stringp str) (read str))))) + (condition-case nil + (setq n (cond + ((zerop (length str)) default) + ((stringp str) (read str)))) + (error nil))) (unless (numberp n) (message "Please enter a number.") (sit-for 1) diff --git a/lisp/t-mouse.el b/lisp/t-mouse.el index eca2ce2b9fe..15521decd90 100644 --- a/lisp/t-mouse.el +++ b/lisp/t-mouse.el @@ -166,6 +166,8 @@ Also trim the accumulator by all the data used to build the event." (if (or (eq (car ob-pos) 'STILL) (eq (car ob-pos) '***) (not ob-pos)) nil (setq ob (car ob-pos)) + (if (string-match "mev:$" (prin1-to-string ob)) + (error "Can't open mouse connection")) (setq t-mouse-filter-accumulator (substring t-mouse-filter-accumulator (cdr ob-pos))) diff --git a/lisp/term.el b/lisp/term.el index 7bbef6e526e..e8848d64efb 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -627,7 +627,7 @@ executed once when the buffer is created." "Keyboard map for sending characters directly to the inferior process.") (defvar term-escape-char nil "Escape character for char sub-mode of term mode. -Do not change it directly; use `term-set-escape-char' instead.") +Do not change it directly; use `term-set-escape-char' instead.") (defvar term-raw-escape-map nil) (defvar term-pager-break-map nil) @@ -714,7 +714,7 @@ Buffer local variable.") (defvar term-buffer-maximum-size 2048 "*The maximum size in lines for term buffers. Term buffers are truncated from the top to be no greater than this number. -Notice that a setting of 0 means 'don't truncate anything'. This variable +Notice that a setting of 0 means \"don't truncate anything\". This variable is buffer-local.") ;;; @@ -856,7 +856,7 @@ is buffer-local.") ;; Set up term-raw-map, etc. (defun term-set-escape-char (c) - "Change term-escape-char and keymaps that depend on it." + "Change `term-escape-char' and keymaps that depend on it." (when term-escape-char (define-key term-raw-map term-escape-char 'term-send-raw)) (setq c (make-string 1 c)) @@ -1098,7 +1098,7 @@ Entry to this mode runs the hooks on `term-mode-hook'." (make-local-variable 'term-current-face) (make-local-variable 'term-pending-frame) (setq term-pending-frame nil) - ;; Cua-mode's keybindings interfere with the term keybindings, disable it. + ;; Cua-mode's keybindings interfere with the term keybindings, disable it. (set (make-local-variable 'cua-mode) nil) (run-mode-hooks 'term-mode-hook) (when (featurep 'xemacs) @@ -1194,7 +1194,7 @@ without any interpretation." "Insert the last stretch of killed text at the position clicked on." (interactive "e\nP") (if (featurep 'xemacs) - (term-send-raw-string + (term-send-raw-string (or (condition-case () (x-get-selection) (error ())) (x-get-cutbuffer) (error "No selection or cut buffer available"))) @@ -1312,7 +1312,7 @@ commands to use in that buffer. "Start up a process in buffer for term modes. Blasts any old process running in the buffer. Doesn't set the buffer mode. You can use this to cheaply run a series of processes in the same term -buffer. The hook term-exec-hook is run after each exec." +buffer. The hook `term-exec-hook' is run after each exec." (save-excursion (set-buffer buffer) (let ((proc (get-buffer-process buffer))) ; Blast any old process. @@ -1342,7 +1342,7 @@ buffer. The hook term-exec-hook is run after each exec." (run-hooks 'term-exec-hook) buffer))) -(defun term-sentinel (proc msg) +(defun term-sentinel (proc msg) "Sentinel for term buffers. The main purpose is to get rid of the local keymap." (let ((buffer (process-buffer proc))) @@ -1402,7 +1402,7 @@ The main purpose is to get rid of the local keymap." :kb=^?:kD=^[[3~:sc=\\E7:rc=\\E8:r1=\\Ec:" ;;; : -undefine ic ;;; don't define :te=\\E[2J\\E[?47l\\E8:ti=\\E7\\E[?47h\ - "termcap capabilities supported") + "Termcap capabilities supported.") ;;; This auxiliary function cranks up the process for term-exec in ;;; the appropriate environment. @@ -2044,9 +2044,9 @@ Similarly for Soar, Scheme, etc." (funcall term-input-sender proc input))))) (defun term-get-old-input-default () - "Default for term-get-old-input. + "Default for `term-get-old-input'. Take the current line, and discard any initial text matching -term-prompt-regexp." +`term-prompt-regexp'." (save-excursion (beginning-of-line) (term-skip-prompt) @@ -2066,7 +2066,7 @@ Calls `term-get-old-input' to get old input." (insert input)))) (defun term-skip-prompt () - "Skip past the text matching regexp term-prompt-regexp. + "Skip past the text matching regexp `term-prompt-regexp'. If this takes us past the end of the current line, don't skip at all." (let ((eol (save-excursion (end-of-line) (point)))) (when (and (looking-at term-prompt-regexp) @@ -2097,7 +2097,7 @@ If a prefix argument is given (\\[universal-argument]), then no prompt skip -- go straight to column 0. The prompt skip is done by skipping text matching the regular expression -term-prompt-regexp, a buffer local variable." +`term-prompt-regexp', a buffer local variable." (interactive "P") (beginning-of-line) (when (null arg) (term-skip-prompt))) @@ -2180,8 +2180,8 @@ If your process is choking on big inputs, try lowering the value.") (defun term-send-string (proc str) "Send to PROC the contents of STR as input. -This is equivalent to process-send-string, except that long input strings -are broken up into chunks of size term-input-chunk-size. Processes +This is equivalent to `process-send-string', except that long input strings +are broken up into chunks of size `term-input-chunk-size'. Processes are given a chance to output between chunks. This can help prevent processes from hanging when you send them long inputs on some OS's." (let* ((len (length str)) @@ -2195,7 +2195,7 @@ from hanging when you send them long inputs on some OS's." (defun term-send-region (proc start end) "Send to PROC the region delimited by START and END. -This is a replacement for process-send-region that tries to keep +This is a replacement for `process-send-region' that tries to keep your process from hanging on long inputs. See `term-send-string'." (term-send-string proc (buffer-substring start end))) @@ -2874,7 +2874,7 @@ See `term-prompt-regexp'." ;; (setq term-terminal-state 0)) ((eq char ?M) ;; scroll reversed (terminfo: ri) (if (or (< (term-current-row) term-scroll-start) - (>= (1- (term-current-row)) + (>= (1- (term-current-row)) term-scroll-start)) ;; Scrolling up will not move outside ;; the scroll region. @@ -2900,7 +2900,7 @@ See `term-prompt-regexp'." (when term-saved-cursor (term-goto (nth 0 term-saved-cursor) (nth 1 term-saved-cursor)) - (setq term-ansi-current-bg-color + (setq term-ansi-current-bg-color (nth 2 term-saved-cursor) term-ansi-current-bold (nth 3 term-saved-cursor) @@ -3188,7 +3188,7 @@ See `term-prompt-regexp'." (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 nil)) @@ -3217,7 +3217,7 @@ See `term-prompt-regexp'." ((eq char ?A) (term-handle-deferred-scroll) (let ((tcr (term-current-row))) - (term-down + (term-down (if (< (- tcr term-terminal-parameter) term-scroll-start) ;; If the amount to move is before scroll start, move ;; to scroll start. @@ -3229,7 +3229,7 @@ See `term-prompt-regexp'." ((eq char ?B) (let ((tcr (term-current-row))) (unless (= tcr (1- term-scroll-end)) - (term-down + (term-down (if (> (+ tcr term-terminal-parameter) term-scroll-end) (- term-scroll-end 1 tcr) (max 1 term-terminal-parameter)) t)))) @@ -3493,7 +3493,7 @@ The top-most line is line 0." ((term-pager-continue deficit))))) (defun term-pager-page (arg) - "Proceed past the **MORE** break, allowing the next page of output to appear" + "Proceed past the **MORE** break, allowing the next page of output to appear." (interactive "p") (term-pager-line (* arg term-height))) @@ -3562,7 +3562,7 @@ The top-most line is line 0." (put 'term-fake-pager-disable 'menu-enable 'term-pager-count)) (defun term-pager-help () - "Provide help on commands available in a terminal-emulator **MORE** break" + "Provide help on commands available in a terminal-emulator **MORE** break." (interactive) (message "Terminal-emulator pager break help...") (sit-for 0) @@ -3604,9 +3604,9 @@ all pending output has been dealt with.")) (defun term-handle-scroll (down) (let ((scroll-needed - (- (+ (term-current-row) down) + (- (+ (term-current-row) down) (if (< down 0) term-scroll-start term-scroll-end)))) - (when (or (and (< down 0) (< scroll-needed 0)) + (when (or (and (< down 0) (< scroll-needed 0)) (and (> down 0) (> scroll-needed 0))) (let ((save-point (copy-marker (point))) (save-top)) (goto-char term-home-marker) @@ -3704,7 +3704,7 @@ all pending output has been dealt with.")) ;; contain a space, to force the previous line to continue to wrap. ;; We could do this always, but it seems preferable to not add the ;; extra space when wrapped is false. - (when wrapped + (when wrapped (insert ? )) (insert ?\n) (put-text-property saved-point (point) 'face 'default) @@ -3795,8 +3795,8 @@ Should only be called when point is at the start of a screen line." ;; we need to go one line past it in order to ensure correct ;; scrolling. (if (< save-current-row term-scroll-start) - ;; If point is before scroll start, - (progn + ;; If point is before scroll start, + (progn (setq lines (- lines (- term-scroll-start save-current-row))) (term-down (- term-scroll-start save-current-row)) (setq start (point))) diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 06fa3a01186..0b413e3b7ab 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -86,7 +86,7 @@ If this is a function, call it to generate the initial field text." :group 'bibtex :type '(choice (const :tag "None" nil) (string :tag "Initial text") - (function :tag "Initialize Function" :value fun) + (function :tag "Initialize Function") (const :tag "Default" t))) (put 'bibtex-include-OPTkey 'risky-local-variable t) @@ -98,11 +98,8 @@ CROSSREF-OPTIONAL lists in `bibtex-entry-field-alist' (which see)." :group 'bibtex :type '(repeat (group (string :tag "Field") (string :tag "Comment") - (option (group :inline t - :extra-offset -4 - (choice :tag "Init" :value "" - string - function)))))) + (option (choice :tag "Init" + (const nil) string function))))) (put 'bibtex-user-optional-fields 'risky-local-variable t) (defcustom bibtex-entry-format @@ -224,7 +221,7 @@ If parsing fails, try to set this variable to nil." :group 'bibtex :type 'boolean) -(defvar bibtex-entry-field-alist +(defcustom bibtex-entry-field-alist '(("Article" ((("author" "Author1 [and Author2 ...] [and others]") ("title" "Title of the article (BibTeX converts it to lowercase)") @@ -452,7 +449,36 @@ appears in the echo area, INIT is either the initial content of the field or a function, which is called to determine the initial content of the field, and ALTERNATIVE-FLAG (either nil or t) marks if the field is an alternative. ALTERNATIVE-FLAG may be t only in the -REQUIRED or CROSSREF-REQUIRED lists.") +REQUIRED or CROSSREF-REQUIRED lists." + :group 'bibtex + :type '(repeat (group (string :tag "Entry name") + (group (repeat :tag "Required fields" + (group (string :tag "Field") + (string :tag "Comment") + (option (choice :tag "Init" :value nil + (const nil) string function)) + (option (choice :tag "Alternative" + (const :tag "No" nil) + (const :tag "Yes" t))))) + (repeat :tag "Optional fields" + (group (string :tag "Field") + (string :tag "Comment") + (option (choice :tag "Init" :value nil + (const nil) string function))))) + (option :extra-offset -4 + (group (repeat :tag "Crossref: required fields" + (group (string :tag "Field") + (string :tag "Comment") + (option (choice :tag "Init" :value nil + (const nil) string function)) + (option (choice :tag "Alternative" + (const :tag "No" nil) + (const :tag "Yes" t))))) + (repeat :tag "Crossref: optional fields" + (group (string :tag "Field") + (string :tag "Comment") + (option (choice :tag "Init" :value nil + (const nil) string function))))))))) (put 'bibtex-entry-field-alist 'risky-local-variable t) (defcustom bibtex-comment-start "@Comment" @@ -1785,7 +1811,7 @@ Optional arg COMMA is as in `bibtex-enclosing-field'." (set-mark (point)) (message "Mark set") (bibtex-make-field (funcall fun 'bibtex-field-kill-ring-yank-pointer - bibtex-field-kill-ring) t)) + bibtex-field-kill-ring) t nil t)) ;; insert past the current entry (bibtex-skip-to-valid-entry) (set-mark (point)) @@ -2831,7 +2857,7 @@ and `bibtex-user-optional-fields'." (push (list "key" "Used for reference key creation if author and editor fields are missing" (if (or (stringp bibtex-include-OPTkey) - (fboundp bibtex-include-OPTkey)) + (functionp bibtex-include-OPTkey)) bibtex-include-OPTkey)) optional)) (if (member-ignore-case entry-type bibtex-include-OPTcrossref) @@ -3020,7 +3046,7 @@ interactive calls." (if comment (message "%s" (nth 1 comment)) (message "No comment available"))))) -(defun bibtex-make-field (field &optional move interactive) +(defun bibtex-make-field (field &optional move interactive nodelim) "Make a field named FIELD in current BibTeX entry. FIELD is either a string or a list of the form \(FIELD-NAME COMMENT-STRING INIT ALTERNATIVE-FLAG) as in @@ -3028,7 +3054,8 @@ FIELD is either a string or a list of the form If MOVE is non-nil, move point past the present field before making the new field. If INTERACTIVE is non-nil, move point to the end of the new field. Otherwise move point past the new field. -MOVE and INTERACTIVE are t when called interactively." +MOVE and INTERACTIVE are t when called interactively. +INIT is surrounded by field delimiters, unless NODELIM is non-nil." (interactive (list (let ((completion-ignore-case t) (field-list (bibtex-field-list @@ -3058,10 +3085,13 @@ MOVE and INTERACTIVE are t when called interactively." (indent-to-column (+ bibtex-entry-offset bibtex-text-indentation))) (let ((init (nth 2 field))) - (insert (cond ((stringp init) init) - ((fboundp init) (funcall init)) - (t (concat (bibtex-field-left-delimiter) - (bibtex-field-right-delimiter)))))) + (if (not init) (setq init "") + (if (functionp init) (setq init (funcall init))) + (unless (stringp init) (error "`%s' is not a string" init))) + ;; NODELIM is required by `bibtex-insert-kill' + (if nodelim (insert init) + (insert (bibtex-field-left-delimiter) init + (bibtex-field-right-delimiter)))) (when interactive ;; (bibtex-find-text nil nil bibtex-help-message) (if (memq (preceding-char) '(?} ?\")) (forward-char -1)) diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 0f7767697fe..9da8519d12d 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -526,7 +526,6 @@ The break position will be always after LINEBEG and generally before point." ;; Ok, skip at least one word or one \c| character. ;; Meanwhile, don't stop at a period followed by one space. (let ((to (line-end-position)) - (fill-nobreak-predicate nil) ;to break sooner. (first t)) (goto-char linebeg) (while (and (< (point) to) (or first (fill-nobreak-p))) diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 339160db9bd..185f2e8dea3 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -1827,7 +1827,7 @@ misspelled words backwards." (defun flyspell-define-abbrev (name expansion) (let ((table (flyspell-abbrev-table))) (when table - (define-abbrev table name expansion)))) + (define-abbrev table (downcase name) expansion)))) ;;*---------------------------------------------------------------------*/ ;;* flyspell-auto-correct-word ... */ diff --git a/lisp/thumbs.el b/lisp/thumbs.el index af17d925d35..7df2d295c9e 100644 --- a/lisp/thumbs.el +++ b/lisp/thumbs.el @@ -29,7 +29,7 @@ ;; It is used for basic browsing and viewing of images from within Emacs. ;; Minimal image manipulation functions are also available via external ;; programs. If you want to do more complex tasks like categorise and tag -;; your images, use tumme.el +;; your images, use image-dired.el ;; ;; The 'convert' program from 'ImageMagick' ;; [URL:http://www.imagemagick.org/] is required. diff --git a/lisp/tmm.el b/lisp/tmm.el index d441db76235..f70a8cd2ea2 100644 --- a/lisp/tmm.el +++ b/lisp/tmm.el @@ -541,15 +541,15 @@ of `menu-bar-final-items'." ;; Make a list of all the bindings in all the keymaps. (setq minorbind (mapcar 'cdr (minor-mode-key-binding keyseq))) (setq localbind (local-key-binding keyseq)) - (setq globalbind (cdr (global-key-binding keyseq))) + (setq globalbind (copy-sequence (cdr (global-key-binding keyseq)))) ;; If items have been redefined/undefined locally, remove them from ;; the global list. (dolist (minor minorbind) (dolist (item (cdr minor)) - (setq globalbind (assq-delete-all (car item) globalbind)))) + (setq globalbind (assq-delete-all (car-safe item) globalbind)))) (dolist (item (cdr localbind)) - (setq globalbind (assq-delete-all (car item) globalbind))) + (setq globalbind (assq-delete-all (car-safe item) globalbind))) (setq globalbind (cons 'keymap globalbind)) (setq allbind (cons globalbind (cons localbind minorbind))) diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 01c2d70870a..8c53d49fdd1 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,4 +1,15 @@ -2007-04-01 Diane Murray <disumu@x3y2z1.net> +2007-04-15 Chong Yidong <cyd@stupidchicken.com> + + * url-parse.el (url-generic-parse-url): Revert 2006-10-09 changes. + +2007-04-13 Chong Yidong <cyd@stupidchicken.com> + + * url-http.el (url-http-parse-headers): Stop after a set number of + redirections. Suggested by Diane Murray. + + * url-vars.el (url-max-redirections): New var. + +2007-04-01 Diane Murray <disumu@x3y2z1.net> (tiny change) * url-http.el (url-http-handle-cookies): Reverse list returned by `mail-fetch-field', so that cookies are set in the correct order. @@ -65,7 +76,7 @@ (url-http-parse-response): Set it. (url-http-parse-headers): Use it to determine keep-alive behavior. -2006-11-23 Diane Murray <disumu@x3y2z1.net> +2006-11-23 Diane Murray <disumu@x3y2z1.net> (tiny change) * url-http.el (url-http-content-length-after-change-function): Use `url-lazy-message'. @@ -174,7 +185,7 @@ getenv returns an empty string for http_proxy. This prevents an error when calling `format' later on. -2006-08-31 Diane Murray <disumu@x3y2z1.net> +2006-08-31 Diane Murray <disumu@x3y2z1.net> (tiny change) * url-parse.el (url-recreate-url-attributes): New function, code simply moved from `url-recreate-url'. @@ -184,7 +195,7 @@ * url-http.el (url-http-create-request): Use `url-recreate-url-attributes' when setting real-fname. -2006-08-29 Diane Murray <disumu@x3y2z1.net> +2006-08-29 Diane Murray <disumu@x3y2z1.net> (tiny change) * url-cookie.el (url-cookie-write-file): Really don't use versioned backups. diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 10a6f2e7278..d9ac81838d4 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -556,21 +556,43 @@ should be shown to the user." (let ((url-request-method url-http-method) (url-request-data url-http-data) (url-request-extra-headers url-http-extra-headers)) - ;; Remember that the request was redirected. - (setf (car url-callback-arguments) - (nconc (list :redirect redirect-uri) - (car url-callback-arguments))) - ;; Put in the current buffer a forwarding pointer to the new - ;; destination buffer. - ;; FIXME: This is a hack to fix url-retrieve-synchronously - ;; without changing the API. Instead url-retrieve should - ;; either simply not return the "destination" buffer, or it - ;; should take an optional `dest-buf' argument. - (set (make-local-variable 'url-redirect-buffer) - (url-retrieve-internal - redirect-uri url-callback-function - url-callback-arguments)) - (url-mark-buffer-as-dead (current-buffer)))))) + ;; Check existing number of redirects + (if (or (< url-max-redirections 0) + (and (> url-max-redirections 0) + (let ((events (car url-callback-arguments)) + (old-redirects 0)) + (while events + (if (eq (car events) :redirect) + (setq old-redirects (1+ old-redirects))) + (and (setq events (cdr events)) + (setq events (cdr events)))) + (< old-redirects url-max-redirections)))) + ;; url-max-redirections hasn't been reached, so go + ;; ahead and redirect. + (progn + ;; Remember that the request was redirected. + (setf (car url-callback-arguments) + (nconc (list :redirect redirect-uri) + (car url-callback-arguments))) + ;; Put in the current buffer a forwarding pointer to the new + ;; destination buffer. + ;; FIXME: This is a hack to fix url-retrieve-synchronously + ;; without changing the API. Instead url-retrieve should + ;; either simply not return the "destination" buffer, or it + ;; should take an optional `dest-buf' argument. + (set (make-local-variable 'url-redirect-buffer) + (url-retrieve-internal + redirect-uri url-callback-function + url-callback-arguments)) + (url-mark-buffer-as-dead (current-buffer))) + ;; We hit url-max-redirections, so issue an error and + ;; stop redirecting. + (url-http-debug "Maximum redirections reached") + (setf (car url-callback-arguments) + (nconc (list :error (list 'error 'http-redirect-limit + redirect-uri)) + (car url-callback-arguments))) + (setq success t)))))) (4 ; Client error ;; 400 Bad Request ;; 401 Unauthorized diff --git a/lisp/url/url-parse.el b/lisp/url/url-parse.el index 2b69c54133f..a9a0fb151e9 100644 --- a/lisp/url/url-parse.el +++ b/lisp/url/url-parse.el @@ -108,7 +108,7 @@ (defun url-recreate-url-attributes (urlobj) "Recreate the attributes of an URL string from the parsed URLOBJ." (when (url-attributes urlobj) - (concat "?" + (concat ";" (mapconcat (lambda (x) (if (cdr x) (concat (car x) "=" (cdr x)) @@ -168,7 +168,7 @@ Format is: (setq full t) (forward-char 2) (setq save-pos (point)) - (skip-chars-forward "^/\\?#") + (skip-chars-forward "^/") (setq host (buffer-substring save-pos (point))) (if (string-match "^\\([^@]+\\)@" host) (setq user (match-string 1 host) @@ -189,25 +189,29 @@ Format is: (setq port (url-scheme-get-property prot 'default-port))) ;; 3.3. Path + ;; Gross hack to preserve ';' in data URLs (setq save-pos (point)) - (skip-chars-forward "^#?") - (setq file (buffer-substring save-pos (point))) ;; 3.4. Query - (when (looking-at "\\?") - (forward-char 1) - (setq save-pos (point)) + (if (string= "data" prot) + (goto-char (point-max)) + ;; Now check for references (skip-chars-forward "^#") - ;; RFC 3986 specifies no general way of parsing the query - ;; string, but `url-parse-args' seems universal enough. - (setq attr (url-parse-args (buffer-substring save-pos (point)) t) - attr (nreverse attr))) - - ;; 3.5. Fragment - (when (looking-at "#") - (forward-char 1) - (setq refs (buffer-substring (point) (point-max)))) + (if (eobp) + nil + (delete-region + (point) + (progn + (skip-chars-forward "#") + (setq refs (buffer-substring (point) (point-max))) + (point-max)))) + (goto-char save-pos) + (skip-chars-forward "^;") + (if (not (eobp)) + (setq attr (url-parse-args (buffer-substring (point) (point-max)) t) + attr (nreverse attr)))) + (setq file (buffer-substring save-pos (point))) (if (and host (string-match "%[0-9][0-9]" host)) (setq host (url-unhex-string host))) (vector prot user pass host port file refs attr full)))))) diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el index 705eb947001..d0bd9a84c05 100644 --- a/lisp/url/url-vars.el +++ b/lisp/url/url-vars.el @@ -320,6 +320,12 @@ undefined." "\\`\\([-a-zA-Z0-9+.]+:\\)" "A regular expression that will match an absolute URL.") +(defcustom url-max-redirections 30 + "*The maximum number of redirection requests to honor in a HTTP connection. +A negative number means to honor an unlimited number of redirection requests." + :type 'integer + :group 'url) + (defcustom url-confirmation-func 'y-or-n-p "*What function to use for asking yes or no functions. Possible values are `yes-or-no-p' or `y-or-n-p', or any function that diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index c7981180c10..9c791631e33 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -84,7 +84,7 @@ :group 'hypermedia) (defgroup widget-documentation nil - "Options controling the display of documentation strings." + "Options controlling the display of documentation strings." :group 'widgets) (defgroup widget-faces nil |