summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog401
-rw-r--r--lisp/ChangeLog.84
-rw-r--r--lisp/button.el5
-rw-r--r--lisp/calc/README4
-rw-r--r--lisp/calc/calc-aent.el2
-rw-r--r--lisp/calc/calc-alg.el2
-rw-r--r--lisp/calc/calc-arith.el2
-rw-r--r--lisp/calc/calc-bin.el2
-rw-r--r--lisp/calc/calc-comb.el2
-rw-r--r--lisp/calc/calc-cplx.el2
-rw-r--r--lisp/calc/calc-embed.el2
-rw-r--r--lisp/calc/calc-ext.el2
-rw-r--r--lisp/calc/calc-fin.el2
-rw-r--r--lisp/calc/calc-forms.el2
-rw-r--r--lisp/calc/calc-frac.el2
-rw-r--r--lisp/calc/calc-funcs.el2
-rw-r--r--lisp/calc/calc-graph.el2
-rw-r--r--lisp/calc/calc-help.el2
-rw-r--r--lisp/calc/calc-incom.el2
-rw-r--r--lisp/calc/calc-keypd.el2
-rw-r--r--lisp/calc/calc-lang.el2
-rw-r--r--lisp/calc/calc-macs.el2
-rw-r--r--lisp/calc/calc-map.el2
-rw-r--r--lisp/calc/calc-math.el2
-rw-r--r--lisp/calc/calc-misc.el2
-rw-r--r--lisp/calc/calc-mode.el2
-rw-r--r--lisp/calc/calc-mtx.el2
-rw-r--r--lisp/calc/calc-poly.el2
-rw-r--r--lisp/calc/calc-prog.el2
-rw-r--r--lisp/calc/calc-rewr.el2
-rw-r--r--lisp/calc/calc-rules.el2
-rw-r--r--lisp/calc/calc-sel.el2
-rw-r--r--lisp/calc/calc-stat.el2
-rw-r--r--lisp/calc/calc-store.el2
-rw-r--r--lisp/calc/calc-stuff.el2
-rw-r--r--lisp/calc/calc-trail.el2
-rw-r--r--lisp/calc/calc-undo.el2
-rw-r--r--lisp/calc/calc-units.el2
-rw-r--r--lisp/calc/calc-vec.el2
-rw-r--r--lisp/calc/calc-yank.el2
-rw-r--r--lisp/calc/calc.el4
-rw-r--r--lisp/calc/calcalg2.el2
-rw-r--r--lisp/calc/calcalg3.el2
-rw-r--r--lisp/calc/calccomp.el2
-rw-r--r--lisp/calc/calcsel2.el2
-rw-r--r--lisp/calendar/timeclock.el114
-rw-r--r--lisp/calendar/todo-mode.el12
-rw-r--r--lisp/custom.el6
-rw-r--r--lisp/dabbrev.el12
-rw-r--r--lisp/diff-mode.el18
-rw-r--r--lisp/diff.el10
-rw-r--r--lisp/dired-x.el27
-rw-r--r--lisp/dired.el56
-rw-r--r--lisp/emacs-lisp/advice.el22
-rw-r--r--lisp/emacs-lisp/easy-mmode.el11
-rw-r--r--lisp/emacs-lisp/eldoc.el2
-rw-r--r--lisp/emacs-lisp/sregex.el4
-rw-r--r--lisp/files.el118
-rw-r--r--lisp/find-dired.el2
-rw-r--r--lisp/font-lock.el1
-rw-r--r--lisp/gnus/ChangeLog6
-rw-r--r--lisp/gnus/gnus-diary.el69
-rw-r--r--lisp/gnus/nndiary.el183
-rw-r--r--lisp/hi-lock.el59
-rw-r--r--lisp/ido.el4
-rw-r--r--lisp/image-dired.el (renamed from lisp/tumme.el)1780
-rw-r--r--lisp/info.el22
-rw-r--r--lisp/international/iso-cvt.el4
-rw-r--r--lisp/international/mule.el1
-rw-r--r--lisp/ldefs-boot.el416
-rw-r--r--lisp/locate.el160
-rw-r--r--lisp/mail/mailabbrev.el2
-rw-r--r--lisp/makefile.w32-in4
-rw-r--r--lisp/man.el4
-rw-r--r--lisp/net/rcirc.el2
-rw-r--r--lisp/newcomment.el115
-rw-r--r--lisp/paren.el3
-rw-r--r--lisp/progmodes/cc-cmds.el4
-rw-r--r--lisp/progmodes/cc-mode.el7
-rw-r--r--lisp/progmodes/compile.el24
-rw-r--r--lisp/progmodes/gud.el2
-rw-r--r--lisp/progmodes/idlw-shell.el23
-rw-r--r--lisp/progmodes/idlwave.el16
-rw-r--r--lisp/progmodes/mantemp.el18
-rw-r--r--lisp/progmodes/perl-mode.el4
-rw-r--r--lisp/progmodes/python.el27
-rw-r--r--lisp/progmodes/sh-script.el2
-rw-r--r--lisp/progmodes/vhdl-mode.el22
-rw-r--r--lisp/simple.el39
-rw-r--r--lisp/startup.el20
-rw-r--r--lisp/subr.el11
-rw-r--r--lisp/t-mouse.el50
-rw-r--r--lisp/term/mac-win.el3
-rw-r--r--lisp/textmodes/fill.el5
-rw-r--r--lisp/textmodes/flyspell.el10
-rw-r--r--lisp/textmodes/sgml-mode.el88
-rw-r--r--lisp/textmodes/tex-mode.el2
-rw-r--r--lisp/thumbs.el2
-rw-r--r--lisp/vc-hooks.el13
-rw-r--r--lisp/vc.el10
100 files changed, 2310 insertions, 1839 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b42647a61bf..5129fa474c6 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,370 @@
+2007-05-10 Richard Stallman <rms@gnu.org>
+
+ * international/iso-cvt.el (iso-cvt-read-only): Ignore arguments.
+ (iso-cvt-write-only): Likewise.
+
+ * emacs-lisp/easy-mmode.el (define-minor-mode):
+ Fix generated doc string.
+
+ * startup.el (fancy-splash-text): Add URL of guided tour.
+ Adjust horizontal and vertical whitespace.
+
+ * progmodes/compile.el (compilation-handle-exit):
+ Use run-hook-with-args to run compilation-finish-functions.
+
+ * files.el (file-start-mode-alist): New variable.
+ (magic-mode-regexp-match-limit): Doc fix.
+ (set-auto-mode): Handle file-start-mode-alist.
+ A little cleanup of structure.
+
+2007-05-10 Micha,Ak(Bl Cadilhac <michael@cadilhac.name>
+
+ * man.el (Man-next-section): Don't consider the last line of the page
+ as being part of any section.
+
+2007-05-10 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * textmodes/sgml-mode.el (sgml-value): Fix handling of attributes which
+ can take any number of values.
+
+2007-05-09 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * textmodes/tex-mode.el (tex-font-lock-keywords-2): Add citet and citep
+ to the list of citation commands.
+
+2007-05-09 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * vc-hooks.el (vc-find-root): Stop searching when the user changes.
+
+2007-05-09 Edward O'Connor <hober0@gmail.com> (tiny change)
+
+ * progmodes/python.el (python-font-lock-keywords)
+ (python-open-block-statement-p, python-mode): Add support for the new
+ "with" keyword.
+
+2007-05-08 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * diff-mode.el (diff-apply-hunk, diff-test-hunk): Don't do by default
+ the exact opposite of diff-goto-source.
+
+ * emacs-lisp/advice.el (ad-special-forms): Remove.
+ (ad-special-form-p): Use subr-arity.
+
+ * newcomment.el (comment-search-forward): Make sure we search forward.
+ (comment-enter-backward): Try and distinguish the non-matching case at
+ EOB from the non-matching case with a missing comment-end-skip for
+ a 2-char comment ender.
+ (comment-choose-indent): New function extracted from comment-indent.
+ Improve the alignment algorithm.
+ (comment-indent): Use it.
+
+ * textmodes/sgml-mode.el (sgml-lexical-context): Add handling of
+ XML style Processing Instructions.
+ (sgml-parse-tag-backward): Handle XML-style PIs. Also ensure progress.
+ (sgml-calculate-indent): Handle `pi' context.
+
+ * vc.el: Ensure that update-changelog issues an error when used with
+ a backend that does not implement it.
+ (vc-update-changelog-rcs2log): Rename from vc-default-update-changelog.
+ Remove `backend' argument. Use expand-file-name.
+ (vc-cvs-update-changelog, vc-rcs-update-changelog): New aliases.
+
+ * progmodes/python.el (python-end-of-block): Revert last change.
+ (python-end-of-statement): Make sure we move *forward*.
+
+2007-05-08 Richard Stallman <rms@gnu.org>
+
+ * mail/mailabbrev.el (sendmail-pre-abbrev-expand-hook):
+ Don't include non-self-insert commands in the exception for `-'.
+
+2007-05-08 David Reitter <david.reitter@gmail.com>
+
+ * progmodes/python.el (python-guess-indent): Check non-nullness
+ before comparing indent against the 2..8 interval.
+
+2007-05-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * term/mac-win.el (mac-ts-unicode-for-key-event): Check if text is
+ available.
+
+2007-05-06 Richard Stallman <rms@gnu.org>
+
+ * emacs-lisp/eldoc.el (turn-on-eldoc-mode): Doc fix.
+
+2007-05-05 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * diff.el (diff): Use buffer-local vars diff-old-file and diff-new-file
+ rather than storing their value in the revert-buffer function.
+
+2007-05-04 Nick Roberts <nickrob@snap.net.nz>
+
+ * t-mouse.el (t-mouse-mode): Do nothing on a graphical display
+ when disabling t-mouse-mode.
+
+2007-05-01 Davis Herring <herring@lanl.gov>
+
+ * calendar/timeclock.el: Update version number.
+ (timeclock-modeline-display): Mention timeclock-use-display-time
+ in explanatory message.
+ (timeclock-in): Fix non-interactive workday specifications.
+ (timeclock-log): Don't kill the log buffer if it already existed.
+ Suppress warnings when finding the log. Don't check for a nil
+ project twice. Run hooks after killing the buffer (if applicable).
+ (timeclock-geometric-mean): Rename to `timeclock-mean' (it never
+ was geometric). All uses changed.
+ (timeclock-generate-report): Support prefix argument.
+
+2007-05-03 Ryan Yeske <rcyeske@gmail.com>
+
+ * net/rcirc.el (rcirc-timeout-seconds): Increase to prevent unwanted
+ disconnections.
+
+2007-05-01 Romain Francoise <romain@orebokech.com>
+
+ * dired-x.el: Revert 2007-04-06 change.
+
+2007-04-29 Stephen Berman <Stephen.Berman@gmx.net>
+
+ * find-dired.el (find-dired-filter): Propertize all text down to eob.
+
+2007-04-29 Richard Stallman <rms@gnu.org>
+
+ * international/mule.el (auto-coding-alist): Add pdf => no-conversion.
+
+2007-04-28 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * progmodes/cc-mode.el (c-before-change): Use point-min rather
+ than 1.
+
+2007-04-28 Richard Stallman <rms@gnu.org>
+
+ * progmodes/sh-script.el (sh-mode): Recognize .profile as sh style.
+
+2007-04-28 Nick Roberts <nickrob@snap.net.nz>
+
+ * progmodes/gud.el (gud-menu-map): Pdb can't handle SIGINT so
+ don't put stop on toolbar.
+
+2007-04-28 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * vc-hooks.el (vc-ignore-dir-regexp): Add /.../ for the DFS filesystem.
+
+2007-04-28 Eli Zaretskii <eliz@gnu.org>
+
+ * makefile.w32-in ($(lisp)/mh-e/mh-loaddefs.el): Use ./mh-e
+ instead of $(lisp)/mh-e.
+
+2007-04-28 Glenn Morris <rgm@gnu.org>
+
+ * image-dired.el (image-dired-cmd-create-thumbnail-options)
+ (image-dired-cmd-create-temp-image-options): Replace option
+ +profile "*" with -strip.
+
+2007-04-27 Chong Yidong <cyd@stupidchicken.com>
+
+ * textmodes/flyspell.el (flyspell-auto-correct-previous-word):
+ Use window-start and window-end.
+
+2007-04-27 Andreas Schwab <schwab@suse.de>
+
+ * emacs-lisp/sregex.el (sregexq): Fix doc string quoting.
+
+2007-04-27 Eli Zaretskii <eliz@gnu.org>
+
+ * textmodes/fill.el (fill-paragraph): Doc fix.
+
+2007-04-26 Luc Teirlinck <teirllm@dms.auburn.edu>
+
+ * locate.el (locate-in-alternate-database): Doc fix.
+
+2007-04-26 Glenn Morris <rgm@gnu.org>
+
+ * button.el (button): Use underline if supported, else fall back
+ to color.
+
+ * version.el (emacs-version): Increase to 22.1.50.
+
+2007-04-25 Richard Stallman <rms@gnu.org>
+
+ * hi-lock.el (hi-lock-file-patterns-policy): Default to `ask'.
+
+2007-04-25 J.D. Smith <jdsmith@as.arizona.edu>
+
+ * progmodes/idlwave.el (idlwave-beginning-of-subprogram)
+ (idlwave-end-of-subprogram): Take optional NOMARK arg to prevent
+ pushing mark.
+ (idlwave-current-routine): Don't push mark.
+
+2007-04-25 Mathias Dahl <mathias.dahl@gmail.com>
+
+ * image-dired.el (image-dired-display-image): Derive image-type from
+ filename rather than assuming jpeg, in case no resizing was needed.
+
+2007-04-25 Johan Bockg,Ae(Brd <bojohan@dd.chalmers.se>
+
+ * custom.el (defface): Doc fix.
+
+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.
@@ -104,8 +471,8 @@
* 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.
+ (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>
@@ -143,7 +510,7 @@
window marked as dedicated.
* mail/footnote.el (footnote-latin-string): New variable.
- (footnote-latin-regexp): Redefined as regexp alternative.
+ (footnote-latin-regexp): Redefine as regexp alternative.
(Footnote-latin): Use footnote-latin-string instead of
footnote-latin-regexp.
@@ -173,17 +540,17 @@
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).
+ * 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).
+ * 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>
@@ -273,7 +640,7 @@
* 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.
@@ -631,7 +998,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.
@@ -5591,7 +5958,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.
@@ -13380,8 +13747,8 @@
2006-01-29 Edward O'Connor <ted@oconnor.cx>
- * emulation/viper.el (viper-major-mode-modifier-list): Add
- insert-state and vi-state entries for erc-mode.
+ * emulation/viper.el (viper-major-mode-modifier-list):
+ Add insert-state and vi-state entries for erc-mode.
(viper-go-away, viper-set-hooks): Add and remove
viper-comint-mode-hook from erc-mode-hook as appropriate.
@@ -21291,7 +21658,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.
@@ -30374,7 +30741,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/ChangeLog.8 b/lisp/ChangeLog.8
index 4dfb876c086..21ccff71d6f 100644
--- a/lisp/ChangeLog.8
+++ b/lisp/ChangeLog.8
@@ -5354,12 +5354,12 @@
* international/mule.el (auto-coding-alist): Add .tgz.
-1999-05-2 Eli Zaretskii <eliz@is.elta.co.il>
+1999-05-02 Eli Zaretskii <eliz@is.elta.co.il>
* international/codepage.el (cp-coding-system-for-codepage-1):
Make the magnification parameter for the -dos encoder be 2.
-1999-05-2 Andrew Innes <andrewi@gnu.org>
+1999-05-02 Andrew Innes <andrewi@gnu.org>
* term/w32-win.el (w32-drag-n-drop): Select file in window where
it is dropped, rather than current window.
diff --git a/lisp/button.el b/lisp/button.el
index 423aef5f78f..ebc078f8193 100644
--- a/lisp/button.el
+++ b/lisp/button.el
@@ -52,9 +52,12 @@
;; Globals
;; Use color for the MS-DOS port because it doesn't support underline.
+;; FIXME if MS-DOS correctly answers the (supports) question, it need
+;; no longer be a special case.
(defface button '((((type pc) (class color))
(:foreground "lightblue"))
- (t :underline t))
+ (((supports :underline t)) :underline t)
+ (t (:foreground "lightblue")))
"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 12b1dc6da02..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
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/timeclock.el b/lisp/calendar/timeclock.el
index 398b2dd1de5..edadd2ceaea 100644
--- a/lisp/calendar/timeclock.el
+++ b/lisp/calendar/timeclock.el
@@ -5,7 +5,7 @@
;; Author: John Wiegley <johnw@gnu.org>
;; Created: 25 Mar 1999
-;; Version: 2.6
+;; Version: 2.6.1
;; Keywords: calendar data
;; This file is part of GNU Emacs.
@@ -304,8 +304,8 @@ display (non-nil means on)."
;; Update immediately so there is a visible change
;; on calling this function.
(if display-time-mode (timeclock-update-modeline)
- (message "Activate `display-time-mode' to see \
-timeclock information"))
+ (message "Activate `display-time-mode' or turn off \
+`timeclock-use-display-time' to see timeclock information"))
(add-hook 'display-time-hook 'timeclock-update-modeline))
(setq timeclock-update-timer
(run-at-time nil 60 'timeclock-update-modeline))))
@@ -375,8 +375,9 @@ discover the name of the project."
(setq timeclock-discrepancy
(- (or timeclock-discrepancy 0) workday))
(if (not (= workday timeclock-workday))
- (timeclock-log "h" (and (numberp arg)
- (number-to-string arg))))))
+ (timeclock-log "h" (number-to-string
+ (/ workday (if (zerop (% workday (* 60 60)))
+ 60 60.0) 60))))))
(timeclock-log "i" (or project
(and timeclock-get-project-function
(or find-project (interactive-p))
@@ -588,6 +589,38 @@ relative only to the time worked today, and not to past time."
(message "%s" string)
string)))
+(defun timeclock-make-hours-explicit (old-default)
+ "Specify all workday lengths in `timeclock-file'.
+OLD-DEFAULT hours are set for every day that has no number indicated."
+ (interactive "P")
+ (if old-default (setq old-default (prefix-numeric-value old-default))
+ (error "timelog-make-hours-explicit requires an explicit argument"))
+ (let ((extant-timelog (find-buffer-visiting timeclock-file))
+ current-date)
+ (with-current-buffer (find-file-noselect timeclock-file t)
+ (unwind-protect
+ (save-excursion
+ (save-restriction
+ (widen)
+ (goto-char (point-min))
+ (while (progn (skip-chars-forward "\n") (not (eobp)))
+ ;; This is just a variant of `timeclock-moment-regexp'.
+ (unless (looking-at
+ (concat "^\\([bhioO]\\) \\([0-9]+/[0-9]+/[0-9]+\\) "
+ "\\([0-9]+:[0-9]+:[0-9]+\\)"))
+ (error "Can't parse `%s'" timeclock-file))
+ (let ((this-date (match-string 2)))
+ (unless (or (and current-date
+ (string= this-date current-date))
+ (string= (match-string 1) "h"))
+ (insert (format "h %s %s %s\n" (match-string 2)
+ (match-string 3) old-default)))
+ (if (string-match "^[ih]" (match-string 1)) ; ignore logouts
+ (setq current-date this-date)))
+ (forward-line))
+ (save-buffer)))
+ (unless extant-timelog (kill-buffer (current-buffer)))))))
+
;;; Internal Functions:
(defvar timeclock-project-list nil)
@@ -651,31 +684,34 @@ that variable's documentation."
"Log the event CODE to the timeclock log, at the time of call.
If PROJECT is a string, it represents the project which the event is
being logged for. Normally only \"in\" events specify a project."
- (with-current-buffer (find-file-noselect timeclock-file)
- (goto-char (point-max))
- (if (not (bolp))
- (insert "\n"))
- (let ((now (current-time)))
- (insert code " "
- (format-time-string "%Y/%m/%d %H:%M:%S" now)
- (or (and project
- (stringp project)
- (> (length project) 0)
- (concat " " project))
- "")
- "\n")
- (if (equal (downcase code) "o")
- (setq timeclock-last-period
- (- (timeclock-time-to-seconds now)
- (timeclock-time-to-seconds
- (cadr timeclock-last-event)))
- timeclock-discrepancy
- (+ timeclock-discrepancy
- timeclock-last-period)))
- (setq timeclock-last-event (list code now project)))
- (save-buffer)
- (run-hooks 'timeclock-event-hook)
- (kill-buffer (current-buffer))))
+ (let ((extant-timelog (find-buffer-visiting timeclock-file)))
+ (with-current-buffer (find-file-noselect timeclock-file t)
+ (save-excursion
+ (save-restriction
+ (widen)
+ (goto-char (point-max))
+ (if (not (bolp))
+ (insert "\n"))
+ (let ((now (current-time)))
+ (insert code " "
+ (format-time-string "%Y/%m/%d %H:%M:%S" now)
+ (or (and (stringp project)
+ (> (length project) 0)
+ (concat " " project))
+ "")
+ "\n")
+ (if (equal (downcase code) "o")
+ (setq timeclock-last-period
+ (- (timeclock-time-to-seconds now)
+ (timeclock-time-to-seconds
+ (cadr timeclock-last-event)))
+ timeclock-discrepancy
+ (+ timeclock-discrepancy
+ timeclock-last-period)))
+ (setq timeclock-last-event (list code now project)))))
+ (save-buffer)
+ (unless extant-timelog (kill-buffer (current-buffer)))))
+ (run-hooks 'timeclock-event-hook))
(defvar timeclock-moment-regexp
(concat "\\([bhioO]\\)\\s-+"
@@ -1147,8 +1183,8 @@ If optional argument TIME is non-nil, use that instead of the current time."
(setcar (nthcdr 2 decoded) 0)
(apply 'encode-time decoded)))
-(defun timeclock-geometric-mean (l)
- "Compute the geometric mean of the values in the list L."
+(defun timeclock-mean (l)
+ "Compute the arithmetic mean of the values in the list L."
(let ((total 0)
(count 0))
(while l
@@ -1163,7 +1199,7 @@ If optional argument TIME is non-nil, use that instead of the current time."
"Generate a summary report based on the current timelog file.
By default, the report is in plain text, but if the optional argument
HTML-P is non-nil, HTML markup is added."
- (interactive)
+ (interactive "P")
(let ((log (timeclock-log-data))
(today (timeclock-day-base)))
(if html-p (insert "<p>"))
@@ -1295,14 +1331,10 @@ HTML-P is non-nil, HTML markup is added."
;; average statistics
(let ((i 0) (l 5))
(while (< i l)
- (aset time-in i (timeclock-geometric-mean
- (cdr (aref time-in i))))
- (aset time-out i (timeclock-geometric-mean
- (cdr (aref time-out i))))
- (aset breaks i (timeclock-geometric-mean
- (cdr (aref breaks i))))
- (aset workday i (timeclock-geometric-mean
- (cdr (aref workday i))))
+ (aset time-in i (timeclock-mean (cdr (aref time-in i))))
+ (aset time-out i (timeclock-mean (cdr (aref time-out i))))
+ (aset breaks i (timeclock-mean (cdr (aref breaks i))))
+ (aset workday i (timeclock-mean (cdr (aref workday i))))
(setq i (1+ i))))
;; Output the HTML table
(insert "<tr>\n")
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el
index f70400ed27d..fc222c2d839 100644
--- a/lisp/calendar/todo-mode.el
+++ b/lisp/calendar/todo-mode.el
@@ -205,7 +205,7 @@
;; 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 threshold
+;; 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
@@ -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,7 +306,7 @@ 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
+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
diff --git a/lisp/custom.el b/lisp/custom.el
index d53951793d2..f5028ddc0d5 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -331,7 +331,7 @@ For a list of valid keywords, see the common keywords listed in
SPEC should be an alist of the form ((DISPLAY ATTS)...).
-In the first element, DISPLAY can be :default. The ATTS in that
+In the first element, DISPLAY can be `default'. The ATTS in that
element then act as defaults for all the following elements.
Aside from that, DISPLAY specifies conditions to match some or
@@ -341,7 +341,7 @@ frame. The ATTRs in this element take effect, and the following
elements are ignored, on that frame.
In the last element, DISPLAY can be t. That element applies to a
-frame if none of the previous elements (except the :default if
+frame if none of the previous elements (except the `default' if
any) did.
ATTS is a list of face attributes followed by their values:
@@ -351,7 +351,7 @@ The possible attributes are `:family', `:width', `:height', `:weight',
`:slant', `:underline', `:overline', `:strike-through', `:box',
`:foreground', `:background', `:stipple', `:inverse-video', and `:inherit'.
-DISPLAY can be `:default' (only in the first element), the symbol
+DISPLAY can be `default' (only in the first element), the symbol
t (only in the last element) to match all frames, or an alist of
conditions of the form \(REQ ITEM...). For such an alist to
match a frame, each of the conditions must be satisfied, meaning
diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el
index ae16b52ee7d..1cfad105a95 100644
--- a/lisp/dabbrev.el
+++ b/lisp/dabbrev.el
@@ -128,7 +128,7 @@ Set this to nil if no characters should be skipped."
(const :tag "off" nil))
:group 'dabbrev)
-(defcustom dabbrev--eliminate-newlines t
+(defcustom dabbrev-eliminate-newlines t
"*Non-nil means dabbrev should not insert newlines.
Instead it converts them to spaces."
:type 'boolean
@@ -913,10 +913,12 @@ to record whether we upcased the expansion, downcased it, or did neither."
((equal abbrev (downcase abbrev)) 'downcase)))))
;; Convert whitespace to single spaces.
- (if dabbrev--eliminate-newlines
- ;; Start searching at end of ABBREV so that any whitespace
- ;; carried over from the existing text is not changed.
- (let ((pos (length abbrev)))
+ (if dabbrev-eliminate-newlines
+ (let ((pos
+ (if (equal abbrev " ") 0 (length abbrev))))
+ ;; If ABBREV is real, search after the end of it.
+ ;; If ABBREV is space and we are copying successive words,
+ ;; search starting at the front.
(while (string-match "[\n \t]+" expansion pos)
(setq pos (1+ (match-beginning 0)))
(setq expansion (replace-match " " nil nil expansion)))))
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el
index 3cd2fb37dbb..87fade841ca 100644
--- a/lisp/diff-mode.el
+++ b/lisp/diff-mode.el
@@ -72,7 +72,7 @@
:group 'diff-mode)
(defcustom diff-jump-to-old-file nil
- "*Non-nil means `diff-goto-source' jumps to the old file.
+ "Non-nil means `diff-goto-source' jumps to the old file.
Else, it jumps to the new file."
:type 'boolean
:group 'diff-mode)
@@ -1276,7 +1276,7 @@ Whitespace differences are ignored."
(if (> (- (car forw) orig) (- orig (car back))) back forw)
(or back forw))))
-(defsubst diff-xor (a b) (if a (not b) b))
+(defsubst diff-xor (a b) (if a (if (not b) a) b))
(defun diff-find-source-location (&optional other-file reverse)
"Find out (BUF LINE-OFFSET POS SRC DST SWITCHED).
@@ -1358,8 +1358,15 @@ the value of this variable when given an appropriate prefix argument).
With a prefix argument, REVERSE the hunk."
(interactive "P")
(destructuring-bind (buf line-offset pos old new &optional switched)
- ;; If REVERSE go to the new file, otherwise go to the old.
- (diff-find-source-location (not reverse) reverse)
+ ;; Sometimes we'd like to have the following behavior: if REVERSE go
+ ;; to the new file, otherwise go to the old. But that means that by
+ ;; default we use the old file, which is the opposite of the default
+ ;; for diff-goto-source, and is thus confusing. Also when you don't
+ ;; know about it it's pretty surprising.
+ ;; TODO: make it possible to ask explicitly for this behavior.
+ ;;
+ ;; This is duplicated in diff-test-hunk.
+ (diff-find-source-location nil reverse)
(cond
((null line-offset)
(error "Can't find the text to patch"))
@@ -1403,8 +1410,7 @@ With a prefix argument, REVERSE the hunk."
With a prefix argument, try to REVERSE the hunk."
(interactive "P")
(destructuring-bind (buf line-offset pos src dst &optional switched)
- ;; If REVERSE go to the new file, otherwise go to the old.
- (diff-find-source-location (not reverse) reverse)
+ (diff-find-source-location nil reverse)
(set-window-point (display-buffer buf) (+ (car pos) (cdr src)))
(diff-hunk-status-msg line-offset (diff-xor reverse switched) t)))
diff --git a/lisp/diff.el b/lisp/diff.el
index 83de826bd03..7149ef0d150 100644
--- a/lisp/diff.el
+++ b/lisp/diff.el
@@ -124,9 +124,13 @@ With prefix arg, prompt for diff switches."
(erase-buffer))
(buffer-enable-undo (current-buffer))
(diff-mode)
+ ;; Use below 2 vars for backward-compatibility.
+ (set (make-local-variable 'diff-old-file) old)
+ (set (make-local-variable 'diff-new-file) new)
+ (set (make-local-variable 'diff-extra-args) (list switches no-async))
(set (make-local-variable 'revert-buffer-function)
- `(lambda (ignore-auto noconfirm)
- (diff ',old ',new ',switches ',no-async)))
+ (lambda (ignore-auto noconfirm)
+ (apply 'diff diff-old-file diff-new-file diff-extra-args)))
(set (make-local-variable 'diff-old-temp-file) old-alt)
(set (make-local-variable 'diff-new-temp-file) new-alt)
(setq default-directory thisdir)
@@ -186,5 +190,5 @@ With prefix arg, prompt for diff switches."
(provide 'diff)
-;;; arch-tag: 7de2c29b-7ea5-4b85-9b9d-72dd860de2bd
+;; arch-tag: 7de2c29b-7ea5-4b85-9b9d-72dd860de2bd
;;; diff.el ends here
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index f5e6250b475..75b6456a5cf 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -45,8 +45,12 @@
;; (add-hook 'dired-load-hook
;; (function (lambda ()
;; (load "dired-x")
-;; ;; Set variables here. For example:
+;; ;; Set global variables here. For example:
;; ;; (setq dired-guess-shell-gnutar "gtar")
+;; )))
+;; (add-hook 'dired-mode-hook
+;; (function (lambda ()
+;; ;; Set buffer-local variables here. For example:
;; ;; (dired-omit-mode 1)
;; )))
;;
@@ -790,21 +794,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)))
@@ -1126,11 +1127,17 @@ You can set this variable in your ~/.emacs. For example, to add rules for
:group 'dired-x
:type '(alist :key-type regexp :value-type (repeat sexp)))
+(defcustom dired-guess-shell-case-fold-search t
+ "If non-nil, `dired-guess-shell-alist-default' and
+`dired-guess-shell-alist-user' are matched case-insensitively."
+ :group 'dired-x
+ :type 'boolean)
+
(defun dired-guess-default (files)
"Guess a shell commands for FILES. Return command or list of commands.
See `dired-guess-shell-alist-user'."
- (let* ((case-fold-search t)
+ (let* ((case-fold-search dired-guess-shell-case-fold-search)
;; Prepend the user's alist to the default alist.
(alist (append dired-guess-shell-alist-user
dired-guess-shell-alist-default))
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/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el
index fe4639cf01a..8023bc58a53 100644
--- a/lisp/emacs-lisp/advice.el
+++ b/lisp/emacs-lisp/advice.el
@@ -2467,23 +2467,11 @@ will clear the cache."
"Take a macro function DEFINITION and make a lambda out of it."
`(cdr ,definition))
-;; There is no way to determine whether some subr is a special form or not,
-;; hence we need this list (which is probably out of date):
-(defvar ad-special-forms
- (let ((tem '(and catch cond condition-case defconst defmacro
- defun defvar function if interactive let let*
- or prog1 prog2 progn quote save-current-buffer
- save-excursion save-restriction save-window-excursion
- setq setq-default unwind-protect while
- with-output-to-temp-buffer)))
- ;; track-mouse could be void in some configurations.
- (if (fboundp 'track-mouse)
- (push 'track-mouse tem))
- (mapcar 'symbol-function tem)))
-
-(defmacro ad-special-form-p (definition)
- ;;"non-nil if DEFINITION is a special form."
- (list 'memq definition 'ad-special-forms))
+(defun ad-special-form-p (definition)
+ "Non-nil iff DEFINITION is a special form."
+ (if (and (symbolp definition) (fboundp definition))
+ (setq definition (indirect-function definition)))
+ (and (subrp definition) (eq (cdr (subr-arity definition)) 'unevalled)))
(defmacro ad-interactive-p (definition)
;;"non-nil if DEFINITION can be called interactively."
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index 8b8dc6ba09d..19ed39a2b42 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -197,7 +197,7 @@ Use the command `%s' to change this variable." pretty-name mode))
(let ((base-doc-string
(concat "Non-nil if %s is enabled.
-See the command `%s' for a description of this minor-mode."
+See the command `%s' for a description of this minor mode."
(if body "
Setting this variable directly does not take effect;
either customize it (see the info node `Easy Customization')
@@ -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/eldoc.el b/lisp/emacs-lisp/eldoc.el
index fd762e2968f..85b150b6ae5 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -157,7 +157,7 @@ With prefix ARG, turn ElDoc mode on if and only if ARG is positive."
;;;###autoload
(defun turn-on-eldoc-mode ()
- "Unequivocally turn on eldoc-mode (see variable documentation)."
+ "Unequivocally turn on ElDoc mode (see command `eldoc-mode')."
(interactive)
(eldoc-mode 1))
diff --git a/lisp/emacs-lisp/sregex.el b/lisp/emacs-lisp/sregex.el
index 8041aefc077..67824c40632 100644
--- a/lisp/emacs-lisp/sregex.el
+++ b/lisp/emacs-lisp/sregex.el
@@ -436,11 +436,11 @@ Here are the clauses allowed in an `sregex' or `sregexq' expression:
or end of a word.
- the symbol `bow'
- Stands for \"\\\\\\=<\", matching the empty string at the beginning of a
+ Stands for \"\\\\=\\<\", matching the empty string at the beginning of a
word.
- the symbol `eow'
- Stands for \"\\\\\\=>\", matching the empty string at the end of a word.
+ Stands for \"\\\\=\\>\", matching the empty string at the end of a word.
- the symbol `wordchar'
Stands for the regex \"\\\\w\", matching a word-constituent character
diff --git a/lisp/files.el b/lisp/files.el
index 39d9d6a78b2..e25b33a04b2 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))
@@ -2150,8 +2151,21 @@ If FUNCTION is nil, then it is not called. (That is a way of saying
\"allow `auto-mode-alist' to decide for these files.\")")
(put 'magic-mode-alist 'risky-local-variable t)
+(defvar file-start-mode-alist
+ nil
+ "Like `magic-mode-alist' but has lower priority than `auto-mode-alist'.
+Each element looks like (REGEXP . FUNCTION) or (MATCH-FUNCTION . FUNCTION).
+After visiting a file, if REGEXP matches the text at the beginning of the
+buffer, or calling MATCH-FUNCTION returns non-nil, `normal-mode' will
+call FUNCTION, provided that `magic-mode-alist' and `auto-mode-alist'
+have not specified a mode for this file.
+
+If FUNCTION is nil, then it is not called.")
+(put 'file-start-mode-alist 'risky-local-variable t)
+
(defvar magic-mode-regexp-match-limit 4000
- "Upper limit on `magic-mode-alist' regexp matches.")
+ "Upper limit on `magic-mode-alist' regexp matches.
+Also applies to `file-start-mode-alist'.")
(defun set-auto-mode (&optional keep-mode-if-same)
"Select major mode appropriate for current buffer.
@@ -2206,10 +2220,10 @@ only set the major mode, if that would change it."
(or (set-auto-mode-0 mode keep-mode-if-same)
;; continuing would call minor modes again, toggling them off
(throw 'nop nil))))))
+ ;; If we didn't, look for an interpreter specified in the first line.
+ ;; As a special case, allow for things like "#!/bin/env perl", which
+ ;; finds the interpreter anywhere in $PATH.
(unless done
- ;; If we didn't, look for an interpreter specified in the first line.
- ;; As a special case, allow for things like "#!/bin/env perl", which
- ;; finds the interpreter anywhere in $PATH.
(setq mode (save-excursion
(goto-char (point-min))
(if (looking-at auto-mode-interpreter-regexp)
@@ -2222,7 +2236,7 @@ only set the major mode, if that would change it."
;; If we found an interpreter mode to use, invoke it now.
(if done
(set-auto-mode-0 (cdr done) keep-mode-if-same)))
- ;; If we didn't, match the buffer beginning against magic-mode-alist.
+ ;; Next try matching the buffer beginning against magic-mode-alist.
(unless done
(if (setq done (save-excursion
(goto-char (point-min))
@@ -2235,39 +2249,55 @@ only set the major mode, if that would change it."
(if (functionp re)
(funcall re)
(looking-at re)))))))
- (set-auto-mode-0 done keep-mode-if-same)
- ;; Compare the filename against the entries in auto-mode-alist.
- (if buffer-file-name
- (let ((name buffer-file-name))
- ;; Remove backup-suffixes from file name.
- (setq name (file-name-sans-versions name))
- (while name
- ;; Find first matching alist entry.
- (setq mode
- (if (memq system-type '(vax-vms windows-nt cygwin))
- ;; System is case-insensitive.
- (let ((case-fold-search t))
- (assoc-default name auto-mode-alist
- 'string-match))
- ;; System is case-sensitive.
- (or
- ;; First match case-sensitively.
- (let ((case-fold-search nil))
- (assoc-default name auto-mode-alist
- 'string-match))
- ;; Fallback to case-insensitive match.
- (and auto-mode-case-fold
- (let ((case-fold-search t))
- (assoc-default name auto-mode-alist
- 'string-match))))))
- (if (and mode
- (consp mode)
- (cadr mode))
- (setq mode (car mode)
- name (substring name 0 (match-beginning 0)))
- (setq name))
- (when mode
- (set-auto-mode-0 mode keep-mode-if-same)))))))))
+ (set-auto-mode-0 done keep-mode-if-same)))
+ ;; Next compare the filename against the entries in auto-mode-alist.
+ (unless done
+ (if buffer-file-name
+ (let ((name buffer-file-name))
+ ;; Remove backup-suffixes from file name.
+ (setq name (file-name-sans-versions name))
+ (while name
+ ;; Find first matching alist entry.
+ (setq mode
+ (if (memq system-type '(vax-vms windows-nt cygwin))
+ ;; System is case-insensitive.
+ (let ((case-fold-search t))
+ (assoc-default name auto-mode-alist
+ 'string-match))
+ ;; System is case-sensitive.
+ (or
+ ;; First match case-sensitively.
+ (let ((case-fold-search nil))
+ (assoc-default name auto-mode-alist
+ 'string-match))
+ ;; Fallback to case-insensitive match.
+ (and auto-mode-case-fold
+ (let ((case-fold-search t))
+ (assoc-default name auto-mode-alist
+ 'string-match))))))
+ (if (and mode
+ (consp mode)
+ (cadr mode))
+ (setq mode (car mode)
+ name (substring name 0 (match-beginning 0)))
+ (setq name))
+ (when mode
+ (set-auto-mode-0 mode keep-mode-if-same)
+ (setq done t))))))
+ ;; Next try matching the buffer beginning against file-start-mode-alist.
+ (unless done
+ (if (setq done (save-excursion
+ (goto-char (point-min))
+ (save-restriction
+ (narrow-to-region (point-min)
+ (min (point-max)
+ (+ (point-min) magic-mode-regexp-match-limit)))
+ (assoc-default nil file-start-mode-alist
+ (lambda (re dummy)
+ (if (functionp re)
+ (funcall re)
+ (looking-at re)))))))
+ (set-auto-mode-0 done keep-mode-if-same)))))
;; When `keep-mode-if-same' is set, we are working on behalf of
;; set-visited-file-name. In that case, if the major mode specified is the
diff --git a/lisp/find-dired.el b/lisp/find-dired.el
index 4b70a71bdb8..47655129e29 100644
--- a/lisp/find-dired.el
+++ b/lisp/find-dired.el
@@ -257,7 +257,7 @@ Thus ARG can also contain additional grep options."
(delete-region (point) (- (point) 2)))
;; Find all the complete lines in the unprocessed
;; output and process it to add text properties.
- (goto-char end)
+ (goto-char (point-max))
(if (search-backward "\n" (process-mark proc) t)
(progn
(dired-insert-set-properties (process-mark proc)
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 162db36311f..dd384e20599 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 b02dc6c2f8e..89cfbc3cc7a 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,9 @@
+2007-05-09 Didier Verna <didier@xemacs.org>
+
+ * gnus-diary.el, nndiary.el: Remove the description comment (nndiary is
+ now properly documented in the Gnus manual). Fix the spelling of "Back
+ End".
+
2007-04-19 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-art.el (gnus-mime-strip-charset-parameters): New function.
diff --git a/lisp/gnus/gnus-diary.el b/lisp/gnus/gnus-diary.el
index be4c73a2b4f..a7f7ee65ec3 100644
--- a/lisp/gnus/gnus-diary.el
+++ b/lisp/gnus/gnus-diary.el
@@ -1,4 +1,4 @@
-;;; gnus-diary.el --- Wrapper around the NNDiary Gnus backend
+;;; gnus-diary.el --- Wrapper around the NNDiary Gnus back end
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005,
;; 2006, 2007 Free Software Foundation, Inc.
@@ -33,63 +33,8 @@
;; Description:
;; ===========
-;; Gnus-Diary is a wrapper around the NNDiary Gnus backend. It is here to
-;; make your nndiary-user life easier in different ways. So, you don't have
-;; to use it if you don't want to. But, really, you should.
-
-;; Gnus-Diary offers the following features on top of the NNDiary backend:
-
-;; - A nice summary line format:
-;; Displaying diary messages in standard summary line format (usually
-;; something like "<From Joe>: <Subject>") is pretty useless. Most of the
-;; time, you're the one who wrote the message, and you mostly want to see
-;; the event's date. Gnus-Diary offers you a nice summary line format
-;; which will do this. By default, a summary line will appear like this:
-;;
-;; <Event Date>: <Subject> <Remaining time>
-;;
-;; for example, here's how Joe's birthday is displayed in my
-;; "nndiary:birhdays" summary buffer (the message is expirable, but will
-;; never be deleted, as it specifies a regular event):
-;;
-;; E Sat, Sep 22 01, 12:00: Joe's birthday (in 6 months, 1 week)
-
-;; - More article sorting functions:
-;; Gnus-Diary adds a new sorting function called
-;; `gnus-summary-sort-by-schedule'. This function lets you organize your
-;; diary summary buffers from the closest event to the farthest one.
-
-;; - Automatic generation of diary group parameters:
-;; When you create a new diary group, or visit one, Gnus-Diary checks your
-;; group parameters, and if needed, sets the summary line format to the
-;; diary-specific value, adds the diary-specific sorting functions, and
-;; also adds the different `X-Diary-*' headers to the group's
-;; posting-style. It is then easier to send a diary message, because if
-;; you use `C-u a' or `C-u m' on a diary group to prepare a message, these
-;; headers will be inserted automatically (but not filled with proper
-;; values yet).
-
-;; - An interactive mail-to-diary convertion function:
-;; The function `gnus-diary-check-message' ensures that the current message
-;; contains all the required diary headers, and prompts you for values /
-;; correction if needed. This function is hooked in the nndiary backend so
-;; that moving an article to an nndiary group will trigger it
-;; automatically. It is also bound to `C-c D c' in message-mode and
-;; article-edit-mode in order to ease the process of converting a usual
-;; mail to a diary one. This function takes a prefix argument which will
-;; force prompting of all diary headers, regardless of their
-;; presence/validity. That way, you can very easily reschedule a diary
-;; message for instance.
-
-
-;; Usage:
-;; =====
-
-;; 0/ Don't use any `gnus-user-format-function-[d|D]'. Gnus-Diary provides
-;; both of these (sorry if you used them before).
-;; 1/ Add '(require 'gnus-diary) to your gnusrc file.
-;; 2/ Customize your gnus-diary options to suit your needs.
-
+;; gnus-diary is a utility toolkit used on top of the nndiary back end. It is
+;; now fully documented in the Gnus manual.
;; Bugs / Todo:
@@ -103,7 +48,7 @@
(require 'gnus-art)
(defgroup gnus-diary nil
- "Utilities on top of the nndiary backend for Gnus."
+ "Utilities on top of the nndiary back end for Gnus."
:version "22.1"
:group 'gnus)
@@ -136,7 +81,7 @@ There are currently two built-in format functions:
:group 'gnus-diary)
(defconst gnus-diary-version nndiary-version
- "Current Diary backend version.")
+ "Current Diary back end version.")
;; Compatibility functions ==================================================
@@ -334,7 +279,7 @@ Optional prefix (or REVERSE argument) means sort in reverse order."
))
;; Called when a group is subscribed. This is needed because groups created
-;; because of mail splitting are *not* created with the backend function.
+;; because of mail splitting are *not* created with the back end function.
;; Thus, `nndiary-request-create-group-hooks' is inoperative.
(defun gnus-diary-maybe-update-group-parameters (group)
(when (eq (car (gnus-find-method-for-group group)) 'nndiary)
@@ -452,7 +397,7 @@ If ARG (or prefix) is non-nil, force prompting for all fields."
;; The end ==================================================================
(defun gnus-diary-version ()
- "Current Diary backend version."
+ "Current Diary back end version."
(interactive)
(message "NNDiary version %s" nndiary-version))
diff --git a/lisp/gnus/nndiary.el b/lisp/gnus/nndiary.el
index 249a4fdb1ba..483c2ee1070 100644
--- a/lisp/gnus/nndiary.el
+++ b/lisp/gnus/nndiary.el
@@ -1,4 +1,4 @@
-;;; nndiary.el --- A diary backend for Gnus
+;;; nndiary.el --- A diary back end for Gnus
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007 Free Software Foundation, Inc.
@@ -33,127 +33,8 @@
;; Description:
;; ===========
-;; This package implements NNDiary, a diary backend for Gnus. NNDiary is a
-;; mail backend, pretty similar to nnml in its functionnning (it has all the
-;; features of nnml, actually), but in which messages are treated as event
-;; reminders.
-
-;; Here is a typical scenario:
-;; - You've got a date with Andy Mc Dowell or Bruce Willis (select according
-;; to your sexual preference) in one month. You don't want to forget it.
-;; - Send a (special) diary message to yourself (see below).
-;; - Forget all about it and keep on getting and reading new mail, as usual.
-;; - From time to time, as you type `g' in the group buffer and as the date
-;; is getting closer, the message will pop up again, just like if it were
-;; new and unread.
-;; - Read your "new" messages, this one included, and start dreaming of the
-;; night you're gonna have.
-;; - Once the date is over (you actually fell asleep just after dinner), the
-;; message will be automatically deleted if it is marked as expirable.
-
-;; Some more notes on the diary backend:
-;; - NNDiary is a *real* mail backend. You *really* send real diary
-;; messsages. This means for instance that you can give appointements to
-;; anybody (provided they use Gnus and NNDiary) by sending the diary message
-;; to them as well.
-;; - However, since NNDiary also has a 'request-post method, you can also
-;; `C-u a' instead of `C-u m' on a diary group and the message won't actually
-;; be sent; just stored in the group.
-;; - The events you want to remember need not be punctual. You can set up
-;; reminders for regular dates (like once each week, each monday at 13:30
-;; and so on). Diary messages of this kind will never be deleted (unless
-;; you do it explicitely). But that, you guessed.
-
-
-;; Usage:
-;; =====
-
-;; 1/ NNDiary has two modes of operation: traditional (the default) and
-;; autonomous.
-;; a/ In traditional mode, NNDiary does not get new mail by itself. You
-;; have to move mails from your primary mail backend to nndiary
-;; groups.
-;; b/ In autonomous mode, NNDiary retrieves its own mail and handles it
-;; independantly of your primary mail backend. To use NNDiary in
-;; autonomous mode, you have several things to do:
-;; i/ Put (setq nndiary-get-new-mail t) in your gnusrc file.
-;; ii/ Diary messages contain several `X-Diary-*' special headers.
-;; You *must* arrange that these messages be split in a private
-;; folder *before* Gnus treat them. You need this because Gnus
-;; is not able yet to manage multiple backends for mail
-;; retrieval. Getting them from a separate source will
-;; compensate this misfeature to some extent, as we will see.
-;; As an example, here's my procmailrc entry to store diary files
-;; in ~/.nndiary (the default nndiary mail source file):
-;;
-;; :0 HD :
-;; * ^X-Diary
-;; .nndiary
-;; iii/ Customize the variables `nndiary-mail-sources' and
-;; `nndiary-split-methods'. These are replacements for the usual
-;; mail sources and split methods which, and will be used in
-;; autonomous mode. `nndiary-mail-sources' defaults to
-;; '(file :path "~/.nndiary").
-;; 2/ Install nndiary somewhere Emacs / Gnus can find it. Normally, you
-;; *don't* have to '(require 'nndiary) anywhere. Gnus will do so when
-;; appropriate as long as nndiary is somewhere in the load path.
-;; 3/ Now, customize the rest of nndiary. In particular, you should
-;; customize `nndiary-reminders', the list of times when you want to be
-;; reminded of your appointements (e.g. 3 weeks before, then 2 days
-;; before, then 1 hour before and that's it).
-;; 4/ You *must* use the group timestamp feature of Gnus. This adds a
-;; timestamp to each groups' parameters (please refer to the Gnus
-;; documentation ("Group Timestamp" info node) to see how it's done.
-;; 5/ Once you have done this, you may add a permanent nndiary virtual server
-;; (something like '(nndiary "")) to your `gnus-secondary-select-methods'.
-;; Yes, this server will be able to retrieve mails and split them when you
-;; type `g' in the group buffer, just as if it were your only mail backend.
-;; This is the benefit of using a private folder.
-;; 6/ Hopefully, almost everything (see the TODO section below) will work as
-;; expected when you restart Gnus: in the group buffer, `g' and `M-g' will
-;; also get your new diary mails, `F' will find your new diary groups etc.
-
-
-;; How to send diary messages:
-;; ==========================
-
-;; There are 7 special headers in diary messages. These headers are of the
-;; form `X-Diary-<something>', the <something> being one of `Minute', `Hour',
-;; `Dom', `Month', `Year', `Time-Zone' and `Dow'. `Dom' means "Day of Month",
-;; and `dow' means "Day of Week". These headers actually behave like crontab
-;; specifications and define the event date(s).
-
-;; For all headers but the `Time-Zone' one, a header value is either a
-;; star (meaning all possible values), or a list of fields (separated by a
-;; comma). A field is either an integer, or a range. A range is two integers
-;; separated by a dash. Possible integer values are 0-59 for `Minute', 0-23
-;; for `Hour', 1-31 for `Dom', `1-12' for Month, above 1971 for `Year' and 0-6
-;; for `Dow' (0 = sunday). As a special case, a star in either `Dom' or `Dow'
-;; doesn't mean "all possible values", but "use only the other field". Note
-;; that if both are star'ed, the use of either one gives the same result :-),
-
-;; The `Time-Zone' header is special in that it can have only one value (you
-;; bet ;-).
-;; A star doesn't mean "all possible values" (because it has no sense), but
-;; "the current local time zone".
-
-;; As an example, here's how you would say "Each Monday and each 1st of month,
-;; at 12:00, 20:00, 21:00, 22:00, 23:00 and 24:00, from 1999 to 2010" (I let
-;; you find what to do then):
-;;
-;; X-Diary-Minute: 0
-;; X-Diary-Hour: 12, 20-24
-;; X-Diary-Dom: 1
-;; X-Diary-Month: *
-;; X-Diary-Year: 1999-2010
-;; X-Diary-Dow: 1
-;; X-Diary-Time-Zone: *
-;;
-;;
-;; Sending a diary message is not different from sending any other kind of
-;; mail, except that such messages are identified by the presence of these
-;; special headers.
-
+;; nndiary is a mail back end designed to handle mails as diary event
+;; reminders. It is now fully documented in the Gnus manual.
;; Bugs / Todo:
@@ -161,43 +42,43 @@
;; * Respooling doesn't work because contrary to the request-scan function,
;; Gnus won't allow me to override the split methods when calling the
-;; respooling backend functions.
+;; respooling back end functions.
;; * There's a bug in the time zone mechanism with variable TZ locations.
;; * We could allow a keyword like `ask' in X-Diary-* headers, that would mean
;; "ask for value upon reception of the message".
;; * We could add an optional header X-Diary-Reminders to specify a special
;; reminders value for this message. Suggested by Jody Klymak.
;; * We should check messages validity in other circumstances than just
-;; moving an article from sonwhere else (request-accept). For instance, when
-;; editing / saving and so on.
+;; moving an article from somewhere else (request-accept). For instance,
+;; when editing / saving and so on.
;; Remarks:
;; =======
-;; * nnoo.
-;; NNDiary is very similar to nnml. This makes the idea of using nnoo (to
-;; derive nndiary from nnml) natural. However, my experience with nnoo is
-;; that for reasonably complex backends like this one, noo is a burden
-;; rather than an help. It's tricky to use, not everything can be
-;; inherited, what can be inherited and when is not very clear, and you've
-;; got to be very careful because a little mistake can fuck up your your
-;; other backends, especially because their variables will be use instead of
-;; your real ones. Finally, I found it easier to just clone the needed
-;; parts of nnml, and tracking nnml updates is not a big deal.
+;; * nnoo. NNDiary is very similar to nnml. This makes the idea of using nnoo
+;; (to derive nndiary from nnml) natural. However, my experience with nnoo
+;; is that for reasonably complex back ends like this one, noo is a burden
+;; rather than an help. It's tricky to use, not everything can be inherited,
+;; what can be inherited and when is not very clear, and you've got to be
+;; very careful because a little mistake can fuck up your other back ends,
+;; especially because their variables will be use instead of your real ones.
+;; Finally, I found it easier to just clone the needed parts of nnml, and
+;; tracking nnml updates is not a big deal.
;; IMHO, nnoo is actually badly designed. A much simpler, and yet more
;; powerful one would be to make *real* functions and variables for a new
-;; backend based on another. Lisp is a reflexive language so that's a very
+;; back end based on another. Lisp is a reflexive language so that's a very
;; easy thing to do: inspect the function's form, replace occurences of
;; <nnfrom> (even in strings) with <nnto>, and you're done.
;; * nndiary-get-new-mail, nndiary-mail-source and nndiary-split-methods:
;; NNDiary has some experimental parts, in the sense Gnus normally uses only
-;; one mail backends for mail retreival and splitting. This backend is also
-;; an attempt to make it behave differently. For Gnus developpers: as you
-;; can see if you snarf into the code, that was not a very difficult thing
-;; to do. Something should be done about the respooling breakage though.
+;; one mail back ends for mail retreival and splitting. This back end is
+;; also an attempt to make it behave differently. For Gnus developpers: as
+;; you can see if you snarf into the code, that was not a very difficult
+;; thing to do. Something should be done about the respooling breakage
+;; though.
;;; Code:
@@ -220,10 +101,10 @@
(apply #'error args))))
-;; Backend behavior customization ===========================================
+;; Back End behavior customization ===========================================
(defgroup nndiary nil
- "The Gnus Diary backend."
+ "The Gnus Diary back end."
:version "22.1"
:group 'gnus-diary)
@@ -326,27 +207,27 @@ The hooks will be called with the article in the current buffer."
:type 'boolean)
-;; Backend declaration ======================================================
+;; Back End declaration ======================================================
;; Well, most of this is nnml clonage.
(nnoo-declare nndiary)
(defvoo nndiary-directory (nnheader-concat gnus-directory "diary/")
- "Spool directory for the nndiary backend.")
+ "Spool directory for the nndiary back end.")
(defvoo nndiary-active-file
(expand-file-name "active" nndiary-directory)
- "Active file for the nndiary backend.")
+ "Active file for the nndiary back end.")
(defvoo nndiary-newsgroups-file
(expand-file-name "newsgroups" nndiary-directory)
- "Newsgroups description file for the nndiary backend.")
+ "Newsgroups description file for the nndiary back end.")
(defvoo nndiary-get-new-mail nil
"Whether nndiary gets new mail and split it.
-Contrary to traditional mail backends, this variable can be set to t
-even if your primary mail backend also retreives mail. In such a case,
+Contrary to traditional mail back ends, this variable can be set to t
+even if your primary mail back end also retreives mail. In such a case,
NDiary uses its own mail-sources and split-methods.")
(defvoo nndiary-nov-is-evil nil
@@ -367,10 +248,10 @@ all. This may very well take some time.")
(defconst nndiary-version "0.2-b14"
- "Current Diary backend version.")
+ "Current Diary back end version.")
(defun nndiary-version ()
- "Current Diary backend version."
+ "Current Diary back end version."
(interactive)
(message "NNDiary version %s" nndiary-version))
@@ -631,7 +512,7 @@ all. This may very well take some time.")
(deffoo nndiary-request-scan (&optional group server)
;; Use our own mail sources and split methods while Gnus doesn't let us have
- ;; multiple backends for retrieving mail.
+ ;; multiple back ends for retrieving mail.
(let ((mail-sources nndiary-mail-sources)
(nnmail-split-methods nndiary-split-methods))
(setq nndiary-article-file-alist nil)
diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el
index 889b13cfa59..62f92409bde 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 'ask
+ "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..867c50df013 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
- "%p -size %wx%h \"%f\" -resize %wx%h +profile \"*\" jpeg:\"%t\""
+(defcustom image-dired-cmd-create-thumbnail-options
+ "%p -size %wx%h \"%f\" -resize %wx%h -strip 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
- "%p -size %wx%h \"%f\" -resize %wx%h +profile \"*\" jpeg:\"%t\""
+(defcustom image-dired-cmd-create-temp-image-options
+ "%p -size %wx%h \"%f\" -resize %wx%h -strip 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,19 @@ 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))
- width height command ret)
+ (let ((new-file (expand-file-name image-dired-temp-image-file))
+ width height command ret
+ (image-type 'jpeg))
(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)
@@ -1795,56 +1794,57 @@ original size."
shell-command-switch command))
(if (not (= 0 ret))
(error "Could not resize image")))
+ (setq image-type (image-type-from-file-name file))
(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 image-type 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 +1852,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 +1930,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 +1940,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 +1991,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 +2012,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 +2065,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 +2074,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 +2125,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 +2137,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 +2163,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 +2210,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 +2316,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 +2369,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 +2383,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 +2397,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 +2435,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 +2444,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 +2475,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 +2484,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 +2493,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 +2507,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 +2524,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 +2549,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 +2563,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 +2579,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 +2589,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 6f9b1863ee4..4bf83c265b0 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/iso-cvt.el b/lisp/international/iso-cvt.el
index eb94794145f..3448da812a2 100644
--- a/lisp/international/iso-cvt.el
+++ b/lisp/international/iso-cvt.el
@@ -823,13 +823,13 @@ Optional arg BUFFER is ignored (for use in `format-alist')."
(iso-translate-conventions from to iso-sgml2iso-trans-tab))
;;;###autoload
-(defun iso-cvt-read-only ()
+(defun iso-cvt-read-only (&rest ignore)
"Warn that format is read-only."
(interactive)
(error "This format is read-only; specify another format for writing"))
;;;###autoload
-(defun iso-cvt-write-only ()
+(defun iso-cvt-write-only (&rest ignore)
"Warn that format is write-only."
(interactive)
(error "This format is write-only"))
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index 7e137d987b3..1c0b44f01a5 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -1593,6 +1593,7 @@ text, and convert it in the temporary buffer. Otherwise, convert in-place."
("\\.\\(sx[dmicw]\\|odt\\|tar\\|tgz\\)\\'" . no-conversion)
("\\.\\(gz\\|Z\\|bz\\|bz2\\|gpg\\)\\'" . no-conversion)
("\\.\\(jpe?g\\|png\\|gif\\|tiff?\\|p[bpgn]m\\)\\'" . no-conversion)
+ ("\\.pdf\\'" . no-conversion)
("/#[^/]+#\\'" . emacs-mule))
"Alist of filename patterns vs corresponding coding systems.
Each element looks like (REGEXP . CODING-SYSTEM).
diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el
index df3274add9c..78fb95a12c5 100644
--- a/lisp/ldefs-boot.el
+++ b/lisp/ldefs-boot.el
@@ -306,7 +306,7 @@ Fix any old-style date entries in the current log file to default format.
;;;### (autoloads (defadvice ad-activate ad-add-advice ad-disable-advice
;;;;;; ad-enable-advice ad-default-compilation-action ad-redefinition-action)
-;;;;;; "advice" "emacs-lisp/advice.el" (17888 32279))
+;;;;;; "advice" "emacs-lisp/advice.el" (17988 45864))
;;; Generated autoloads from emacs-lisp/advice.el
(defvar ad-redefinition-action (quote warn) "\
@@ -2598,8 +2598,8 @@ name of buffer configuration.
;;;***
;;;### (autoloads (insert-text-button make-text-button insert-button
-;;;;;; make-button define-button-type) "button" "button.el" (17963
-;;;;;; 21008))
+;;;;;; make-button define-button-type) "button" "button.el" (17988
+;;;;;; 45683))
;;; Generated autoloads from button.el
(defvar button-map (let ((map (make-sparse-keymap))) (define-key map " " (quote push-button)) (define-key map [mouse-2] (quote push-button)) map) "\
@@ -2818,7 +2818,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"
-;;;;;; (17963 22155))
+;;;;;; (17988 45674))
;;; Generated autoloads from calc/calc.el
(defvar calc-settings-file (convert-standard-filename "~/.calc.el") "\
@@ -3535,7 +3535,7 @@ Return the syntactic context of the current line.
;;;### (autoloads (pike-mode idl-mode java-mode objc-mode c++-mode
;;;;;; c-mode c-initialize-cc-mode) "cc-mode" "progmodes/cc-mode.el"
-;;;;;; (17963 20867))
+;;;;;; (17988 45794))
;;; Generated autoloads from progmodes/cc-mode.el
(autoload (quote c-initialize-cc-mode) "cc-mode" "\
@@ -4611,7 +4611,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" (17963 22155))
+;;;;;; "compile" "progmodes/compile.el" (17988 45882))
;;; Generated autoloads from progmodes/compile.el
(defvar compilation-mode-hook nil "\
@@ -6076,7 +6076,7 @@ If the argument is nil, we return the display table to its standard state.
;;;***
;;;### (autoloads (dabbrev-expand dabbrev-completion) "dabbrev" "dabbrev.el"
-;;;;;; (17888 32279))
+;;;;;; (17988 45877))
;;; Generated autoloads from dabbrev.el
(define-key esc-map "/" 'dabbrev-expand)
(define-key esc-map [?\C-/] 'dabbrev-completion)
@@ -6798,7 +6798,7 @@ Major mode for editing the diary file.
;;;***
;;;### (autoloads (diff-backup diff diff-command diff-switches) "diff"
-;;;;;; "diff.el" (17888 32279))
+;;;;;; "diff.el" (17988 45843))
;;; Generated autoloads from diff.el
(defvar diff-switches "-c" "\
@@ -6832,7 +6832,7 @@ With prefix arg, prompt for diff switches.
;;;***
;;;### (autoloads (diff-minor-mode diff-mode) "diff-mode" "diff-mode.el"
-;;;;;; (17963 21318))
+;;;;;; (17988 45864))
;;; Generated autoloads from diff-mode.el
(autoload (quote diff-mode) "diff-mode" "\
@@ -6864,7 +6864,7 @@ Minor mode for viewing/editing context diffs.
;;;;;; dired dired-copy-preserve-time dired-dwim-target dired-keep-marker-symlink
;;;;;; dired-keep-marker-hardlink dired-keep-marker-copy dired-keep-marker-rename
;;;;;; dired-trivial-filenames dired-ls-F-marks-symlinks dired-listing-switches)
-;;;;;; "dired" "dired.el" (17888 32279))
+;;;;;; "dired" "dired.el" (17988 45668))
;;; Generated autoloads from dired.el
(defvar dired-listing-switches "-al" "\
@@ -7484,7 +7484,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"
-;;;;;; (17963 21318))
+;;;;;; (17988 45811))
;;; Generated autoloads from dired-x.el
(autoload (quote dired-jump) "dired-x" "\
@@ -7784,7 +7784,7 @@ Play sounds in message buffers.
;;;### (autoloads (easy-mmode-defsyntax easy-mmode-defmap easy-mmode-define-keymap
;;;;;; define-globalized-minor-mode define-minor-mode) "easy-mmode"
-;;;;;; "emacs-lisp/easy-mmode.el" (17888 36645))
+;;;;;; "emacs-lisp/easy-mmode.el" (17988 45882))
;;; Generated autoloads from emacs-lisp/easy-mmode.el
(defalias (quote easy-mmode-define-minor-mode) (quote define-minor-mode))
@@ -8955,7 +8955,7 @@ Not documented
;;;***
;;;### (autoloads (turn-on-eldoc-mode eldoc-mode eldoc-minor-mode-string)
-;;;;;; "eldoc" "emacs-lisp/eldoc.el" (17888 32279))
+;;;;;; "eldoc" "emacs-lisp/eldoc.el" (17988 45849))
;;; Generated autoloads from emacs-lisp/eldoc.el
(defvar eldoc-minor-mode-string " ElDoc" "\
@@ -8976,7 +8976,7 @@ With prefix ARG, turn ElDoc mode on if and only if ARG is positive.
\(fn &optional ARG)" t nil)
(autoload (quote turn-on-eldoc-mode) "eldoc" "\
-Unequivocally turn on eldoc-mode (see variable documentation).
+Unequivocally turn on ElDoc mode (see command `eldoc-mode').
\(fn)" t nil)
@@ -10945,7 +10945,7 @@ Set up hooks, load the cache file -- if existing -- and build the menu.
;;;***
-;;;### (autoloads nil "fill" "textmodes/fill.el" (17888 32281))
+;;;### (autoloads nil "fill" "textmodes/fill.el" (17988 45746))
;;; Generated autoloads from textmodes/fill.el
(put 'colon-double-space 'safe-local-variable 'booleanp)
@@ -10953,7 +10953,7 @@ Set up hooks, load the cache file -- if existing -- and build the menu.
;;;### (autoloads (find-grep-dired find-name-dired find-dired find-grep-options
;;;;;; find-ls-subdir-switches find-ls-option) "find-dired" "find-dired.el"
-;;;;;; (17888 32279))
+;;;;;; (17988 45804))
;;; Generated autoloads from find-dired.el
(defvar find-ls-option (if (eq system-type (quote berkeley-unix)) (quote ("-ls" . "-gilsb")) (quote ("-exec ls -ld {} \\;" . "-ld"))) "\
@@ -11367,7 +11367,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" (17963 21318))
+;;;;;; "flyspell" "textmodes/flyspell.el" (17988 45746))
;;; Generated autoloads from textmodes/flyspell.el
(autoload (quote flyspell-prog-mode) "flyspell" "\
@@ -12150,7 +12150,7 @@ Checking delayed messages is skipped if optional arg NO-CHECK is non-nil.
;;;***
;;;### (autoloads (gnus-user-format-function-D gnus-user-format-function-d)
-;;;;;; "gnus-diary" "gnus/gnus-diary.el" (17888 32279))
+;;;;;; "gnus-diary" "gnus/gnus-diary.el" (17988 45869))
;;; Generated autoloads from gnus/gnus-diary.el
(autoload (quote gnus-user-format-function-d) "gnus-diary" "\
@@ -12850,7 +12850,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" (17963 22153))
+;;;;;; "gud" "progmodes/gud.el" (17988 45791))
;;; Generated autoloads from progmodes/gud.el
(autoload (quote gdb) "gud" "\
@@ -13382,7 +13382,7 @@ This discards the buffer's undo information.
;;;### (autoloads (hi-lock-write-interactive-patterns hi-lock-unface-buffer
;;;;;; hi-lock-face-phrase-buffer hi-lock-face-buffer hi-lock-line-face-buffer
;;;;;; global-hi-lock-mode hi-lock-mode) "hi-lock" "hi-lock.el"
-;;;;;; (17888 36646))
+;;;;;; (17988 45749))
;;; Generated autoloads from hi-lock.el
(autoload (quote hi-lock-mode) "hi-lock" "\
@@ -13410,17 +13410,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
@@ -13433,7 +13438,7 @@ is found. A mode is excluded if it's in the list `hi-lock-exclude-modes'.
(defvar global-hi-lock-mode nil "\
Non-nil if Global-Hi-Lock mode is enabled.
-See the command `global-hi-lock-mode' for a description of this minor-mode.
+See the command `global-hi-lock-mode' for a description of this minor mode.
Setting this variable directly does not take effect;
either customize it (see the info node `Easy Customization')
or call the function `global-hi-lock-mode'.")
@@ -13441,10 +13446,10 @@ or call the function `global-hi-lock-mode'.")
(custom-autoload (quote global-hi-lock-mode) "hi-lock" nil)
(autoload (quote global-hi-lock-mode) "hi-lock" "\
-Toggle Hi-Lock mode in every buffer.
+Toggle Hi-Lock mode in every possible buffer.
With prefix ARG, turn Global-Hi-Lock mode on if and only if ARG is positive.
-Hi-Lock mode is actually not turned on in every buffer but only in those
-in which `turn-on-hi-lock-if-enabled' turns it on.
+Hi-Lock mode is enabled in all buffers where `turn-on-hi-lock-if-enabled' would do it.
+See `hi-lock-mode' for more information on Hi-Lock mode.
\(fn &optional ARG)" t nil)
@@ -14576,7 +14581,7 @@ with no args, if that value is non-nil.
;;;***
;;;### (autoloads (idlwave-shell) "idlw-shell" "progmodes/idlw-shell.el"
-;;;;;; (17963 21008))
+;;;;;; (17988 45674))
;;; Generated autoloads from progmodes/idlw-shell.el
(autoload (quote idlwave-shell) "idlw-shell" "\
@@ -14602,7 +14607,7 @@ See also the variable `idlwave-shell-prompt-pattern'.
;;;***
;;;### (autoloads (idlwave-mode) "idlwave" "progmodes/idlwave.el"
-;;;;;; (17963 21008))
+;;;;;; (17988 45680))
;;; Generated autoloads from progmodes/idlwave.el
(autoload (quote idlwave-mode) "idlwave" "\
@@ -14737,8 +14742,8 @@ The main features of this mode are
;;;;;; ido-find-alternate-file ido-find-file-other-window ido-find-file
;;;;;; ido-find-file-in-dir ido-switch-buffer-other-frame ido-insert-buffer
;;;;;; ido-kill-buffer ido-display-buffer ido-switch-buffer-other-window
-;;;;;; ido-switch-buffer ido-mode ido-mode) "ido" "ido.el" (17963
-;;;;;; 21001))
+;;;;;; ido-switch-buffer ido-mode ido-mode) "ido" "ido.el" (17988
+;;;;;; 45668))
;;; Generated autoloads from ido.el
(defvar ido-mode nil "\
@@ -15205,6 +15210,145 @@ Example:
;;;***
+;;;### (autoloads (image-dired-dired-edit-comment-and-tags image-dired-mark-tagged-files
+;;;;;; image-dired-dired-comment-files image-dired-dired-display-image
+;;;;;; image-dired-dired-display-external image-dired-display-thumb
+;;;;;; image-dired-display-thumbs-append image-dired-setup-dired-keybindings
+;;;;;; image-dired-jump-thumbnail-buffer image-dired-delete-tag
+;;;;;; image-dired-tag-files image-dired-show-all-from-dir image-dired-display-thumbs
+;;;;;; image-dired-dired-with-window-configuration image-dired-dired-insert-marked-thumbs)
+;;;;;; "image-dired" "image-dired.el" (17988 45791))
+;;; Generated autoloads from image-dired.el
+
+(autoload (quote image-dired-dired-insert-marked-thumbs) "image-dired" "\
+Insert thumbnails before file names of marked files in the dired buffer.
+
+\(fn)" t nil)
+
+(autoload (quote image-dired-dired-with-window-configuration) "image-dired" "\
+Open directory DIR and create a default window configuration.
+
+Convenience command that:
+
+ - Opens dired in folder DIR
+ - Splits windows in most useful (?) way
+ - Set `truncate-lines' to t
+
+After the command has finished, you would typically mark some
+image files in dired and type
+\\[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 `image-dired-restore-window-configuration'.
+
+\(fn DIR &optional ARG)" t nil)
+
+(autoload (quote image-dired-display-thumbs) "image-dired" "\
+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
+another one).
+
+Recommended usage is to split the current frame horizontally so that
+you have the dired buffer in the left window and the
+`image-dired-thumbnail-buffer' buffer in the right window.
+
+With optional argument APPEND, append thumbnail to thumbnail buffer
+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
+`image-dired-next-line-and-display' and
+`image-dired-previous-line-and-display' where we do not want the
+thumbnail buffer to be selected.
+
+\(fn &optional ARG APPEND DO-NOT-POP)" t nil)
+
+(autoload (quote image-dired-show-all-from-dir) "image-dired" "\
+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 `image-dired-show-all-from-dir-max-files', a warning will be
+displayed.
+
+\(fn DIR)" t nil)
+
+(defalias (quote image-dired) (quote image-dired-show-all-from-dir))
+
+(defalias (quote tumme) (quote image-dired-show-all-from-dir))
+
+(autoload (quote image-dired-tag-files) "image-dired" "\
+Tag marked file(s) in dired. With prefix ARG, tag file at point.
+
+\(fn ARG)" t nil)
+
+(autoload (quote image-dired-delete-tag) "image-dired" "\
+Remove tag for selected file(s).
+With prefix argument ARG, remove tag from file at point.
+
+\(fn ARG)" t nil)
+
+(autoload (quote image-dired-jump-thumbnail-buffer) "image-dired" "\
+Jump to thumbnail buffer.
+
+\(fn)" t nil)
+
+(autoload (quote image-dired-setup-dired-keybindings) "image-dired" "\
+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
+`image-dired-dired-x-line'.
+
+\(fn)" t nil)
+
+(autoload (quote image-dired-display-thumbs-append) "image-dired" "\
+Append thumbnails to `image-dired-thumbnail-buffer'.
+
+\(fn)" t nil)
+
+(autoload (quote image-dired-display-thumb) "image-dired" "\
+Shorthand for `image-dired-display-thumbs' with prefix argument.
+
+\(fn)" t nil)
+
+(autoload (quote image-dired-dired-display-external) "image-dired" "\
+Display file at point using an external viewer.
+
+\(fn)" t nil)
+
+(autoload (quote image-dired-dired-display-image) "image-dired" "\
+Display current image file.
+See documentation for `image-dired-display-image' for more information.
+With prefix argument ARG, display image in its original size.
+
+\(fn &optional ARG)" t nil)
+
+(autoload (quote image-dired-dired-comment-files) "image-dired" "\
+Add comment to current or marked files in dired.
+
+\(fn)" t nil)
+
+(autoload (quote image-dired-mark-tagged-files) "image-dired" "\
+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 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.
+
+\(fn)" t nil)
+
+(autoload (quote image-dired-dired-edit-comment-and-tags) "image-dired" "\
+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.
+
+\(fn)" t nil)
+
+;;;***
+
;;;### (autoloads (auto-image-file-mode insert-image-file image-file-name-regexp
;;;;;; image-file-name-regexps image-file-name-extensions) "image-file"
;;;;;; "image-file.el" (17888 32280))
@@ -15532,7 +15676,7 @@ of `inferior-lisp-program'). Runs the hooks from
;;;### (autoloads (Info-speedbar-browser Info-goto-emacs-key-command-node
;;;;;; Info-goto-emacs-command-node Info-mode info-apropos Info-index
;;;;;; Info-directory Info-on-current-buffer info-standalone info-emacs-manual
-;;;;;; info info-other-window) "info" "info.el" (17963 21008))
+;;;;;; info info-other-window) "info" "info.el" (17988 45674))
;;; Generated autoloads from info.el
(autoload (quote info-other-window) "info" "\
@@ -15882,7 +16026,7 @@ and a negative argument disables it.
;;;### (autoloads (iso-cvt-define-menu iso-cvt-write-only iso-cvt-read-only
;;;;;; iso-sgml2iso iso-iso2sgml iso-iso2duden iso-iso2gtex iso-gtex2iso
;;;;;; iso-tex2iso iso-iso2tex iso-german iso-spanish) "iso-cvt"
-;;;;;; "international/iso-cvt.el" (17888 32280))
+;;;;;; "international/iso-cvt.el" (17988 45882))
;;; Generated autoloads from international/iso-cvt.el
(autoload (quote iso-spanish) "iso-cvt" "\
@@ -15951,12 +16095,12 @@ Optional arg BUFFER is ignored (for use in `format-alist').
(autoload (quote iso-cvt-read-only) "iso-cvt" "\
Warn that format is read-only.
-\(fn)" t nil)
+\(fn &rest IGNORE)" t nil)
(autoload (quote iso-cvt-write-only) "iso-cvt" "\
Warn that format is write-only.
-\(fn)" t nil)
+\(fn &rest IGNORE)" t nil)
(autoload (quote iso-cvt-define-menu) "iso-cvt" "\
Add submenus to the File menu, to convert to and from various formats.
@@ -16958,7 +17102,7 @@ such as redefining an Emacs function.
;;;***
;;;### (autoloads (locate-with-filter locate locate-ls-subdir-switches)
-;;;;;; "locate" "locate.el" (17888 32280))
+;;;;;; "locate" "locate.el" (17988 45794))
;;; Generated autoloads from locate.el
(defvar locate-ls-subdir-switches "-al" "\
@@ -16986,7 +17130,9 @@ 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.
-\(fn SEARCH-STRING &optional FILTER)" t nil)
+ARG is the interactive prefix arg.
+
+\(fn SEARCH-STRING &optional FILTER ARG)" t nil)
(autoload (quote locate-with-filter) "locate" "\
Run the executable program `locate' with a filter.
@@ -16998,10 +17144,12 @@ 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.
-\(fn SEARCH-STRING FILTER)" t nil)
+\(fn SEARCH-STRING FILTER &optional ARG)" t nil)
;;;***
@@ -17411,7 +17559,7 @@ If 4th arg LIST is non-nil, return a list of all such fields.
;;;***
;;;### (autoloads (define-mail-abbrev build-mail-abbrevs mail-abbrevs-setup)
-;;;;;; "mailabbrev" "mail/mailabbrev.el" (17888 32280))
+;;;;;; "mailabbrev" "mail/mailabbrev.el" (17988 45866))
;;; Generated autoloads from mail/mailabbrev.el
(autoload (quote mail-abbrevs-setup) "mailabbrev" "\
@@ -17624,7 +17772,7 @@ Previous contents of that buffer are killed first.
;;;***
-;;;### (autoloads (man-follow man) "man" "man.el" (17963 20867))
+;;;### (autoloads (man-follow man) "man" "man.el" (17988 45877))
;;; Generated autoloads from man.el
(defalias (quote manual-entry) (quote man))
@@ -19009,7 +19157,7 @@ Open a network connection to HOST on PORT.
;;;;;; uncomment-region comment-kill comment-set-column comment-indent
;;;;;; comment-indent-default comment-normalize-vars comment-multi-line
;;;;;; comment-padding comment-style comment-column) "newcomment"
-;;;;;; "newcomment.el" (17963 21008))
+;;;;;; "newcomment.el" (17988 45864))
;;; Generated autoloads from newcomment.el
(defalias (quote indent-for-comment) (quote comment-indent))
@@ -19029,10 +19177,10 @@ Major modes should set this variable.")
(defvar comment-column 32 "\
Column to indent right-margin comments to.
-Each mode establishes a different default value for this variable; you
+Each mode may establish a different default value for this variable; you
can set the value for a particular mode using that mode's hook.
-Comments might be indented to a value smaller than this in order
-not to go beyond `comment-fill-column'.")
+Comments might be indented to a different value in order not to go beyond
+`comment-fill-column' or in order to align them with surrounding comments.")
(custom-autoload (quote comment-column) "newcomment" t)
(put 'comment-column 'safe-local-variable 'integerp)
@@ -19247,7 +19395,7 @@ Switch to newsticker buffer. You may want to bind this to a key.
;;;***
;;;### (autoloads (nndiary-generate-nov-databases) "nndiary" "gnus/nndiary.el"
-;;;;;; (17888 32280))
+;;;;;; (17988 45869))
;;; Generated autoloads from gnus/nndiary.el
(autoload (quote nndiary-generate-nov-databases) "nndiary" "\
@@ -19886,12 +20034,12 @@ See the command `outline-mode' for more information on this mode.
;;;***
-;;;### (autoloads (show-paren-mode) "paren" "paren.el" (17963 22704))
+;;;### (autoloads (show-paren-mode) "paren" "paren.el" (17988 45669))
;;; Generated autoloads from paren.el
(defvar show-paren-mode nil "\
Non-nil if Show-Paren mode is enabled.
-See the command `show-paren-mode' for a description of this minor-mode.
+See the command `show-paren-mode' for a description of this minor mode.
Setting this variable directly does not take effect;
either customize it (see the info node `Easy Customization')
or call the function `show-paren-mode'.")
@@ -20339,7 +20487,7 @@ The exact behavior is determined also by `cvs-dired-use-hook'." (when (stringp d
;;;***
;;;### (autoloads (perl-mode) "perl-mode" "progmodes/perl-mode.el"
-;;;;;; (17963 22157))
+;;;;;; (17988 45669))
;;; Generated autoloads from progmodes/perl-mode.el
(autoload (quote perl-mode) "perl-mode" "\
@@ -21696,7 +21844,7 @@ If EXTENSION is any other symbol, it is ignored.
;;;***
;;;### (autoloads (jython-mode python-mode run-python) "python" "progmodes/python.el"
-;;;;;; (17963 22158))
+;;;;;; (17988 45869))
;;; Generated autoloads from progmodes/python.el
(add-to-list (quote interpreter-mode-alist) (quote ("jython" . jython-mode)))
@@ -22098,7 +22246,7 @@ Display `quickurl-list' as a formatted list using `quickurl-list-mode'.
;;;***
;;;### (autoloads (rcirc-track-minor-mode rcirc-connect rcirc) "rcirc"
-;;;;;; "net/rcirc.el" (17963 19063))
+;;;;;; "net/rcirc.el" (17988 45849))
;;; Generated autoloads from net/rcirc.el
(autoload (quote rcirc) "rcirc" "\
@@ -22116,7 +22264,7 @@ Not documented
(defvar rcirc-track-minor-mode nil "\
Non-nil if Rcirc-Track minor mode is enabled.
-See the command `rcirc-track-minor-mode' for a description of this minor-mode.
+See the command `rcirc-track-minor-mode' for a description of this minor mode.
Setting this variable directly does not take effect;
either customize it (see the info node `Easy Customization')
or call the function `rcirc-track-minor-mode'.")
@@ -24161,7 +24309,7 @@ These are active only in the minibuffer, when entering or editing a formula:
;;;***
;;;### (autoloads (html-mode sgml-mode) "sgml-mode" "textmodes/sgml-mode.el"
-;;;;;; (17888 37037))
+;;;;;; (17988 45877))
;;; Generated autoloads from textmodes/sgml-mode.el
(autoload (quote sgml-mode) "sgml-mode" "\
@@ -24229,7 +24377,7 @@ To work around that, do:
;;;***
;;;### (autoloads (sh-mode) "sh-script" "progmodes/sh-script.el"
-;;;;;; (17888 32281))
+;;;;;; (17988 45794))
;;; Generated autoloads from progmodes/sh-script.el
(put 'sh-shell 'safe-local-variable 'symbolp)
@@ -24478,7 +24626,7 @@ Turning on Sieve mode runs `sieve-mode-hook'.
;;;***
-;;;### (autoloads nil "simple" "simple.el" (17963 22151))
+;;;### (autoloads nil "simple" "simple.el" (17988 45674))
;;; Generated autoloads from simple.el
(put 'fill-prefix 'safe-local-variable 'string-or-null-p)
@@ -25741,7 +25889,7 @@ Studlify-case the current buffer.
;;;***
-;;;### (autoloads (locate-library) "subr" "subr.el" (17963 22152))
+;;;### (autoloads (locate-library) "subr" "subr.el" (17988 45669))
;;; Generated autoloads from subr.el
(autoload (quote locate-library) "subr" "\
@@ -25795,12 +25943,12 @@ before, and `sc-post-hook' is run after the guts of this function.
;;;***
-;;;### (autoloads (t-mouse-mode) "t-mouse" "t-mouse.el" (17963 21011))
+;;;### (autoloads (t-mouse-mode) "t-mouse" "t-mouse.el" (17988 45828))
;;; Generated autoloads from t-mouse.el
(defvar t-mouse-mode nil "\
Non-nil if T-Mouse mode is enabled.
-See the command `t-mouse-mode' for a description of this minor-mode.
+See the command `t-mouse-mode' for a description of this minor mode.
Setting this variable directly does not take effect;
either customize it (see the info node `Easy Customization')
or call the function `t-mouse-mode'.")
@@ -26665,7 +26813,7 @@ tetris-mode keybindings:
;;;;;; tex-start-commands tex-start-options slitex-run-command latex-run-command
;;;;;; tex-run-command tex-offer-save tex-main-file tex-first-line-header-regexp
;;;;;; tex-directory tex-shell-file-name) "tex-mode" "textmodes/tex-mode.el"
-;;;;;; (17888 32281))
+;;;;;; (17988 45877))
;;; Generated autoloads from textmodes/tex-mode.el
(defvar tex-shell-file-name nil "\
@@ -27195,7 +27343,7 @@ Not documented
;;;### (autoloads (thumbs-dired-setroot thumbs-dired-show thumbs-dired-show-marked
;;;;;; thumbs-show-from-dir thumbs-find-thumb) "thumbs" "thumbs.el"
-;;;;;; (17888 32281))
+;;;;;; (17988 45669))
;;; Generated autoloads from thumbs.el
(autoload (quote thumbs-find-thumb) "thumbs" "\
@@ -27509,7 +27657,7 @@ With ARG, turn time stamping on if and only if arg is positive.
;;;;;; timeclock-workday-remaining-string timeclock-reread-log timeclock-query-out
;;;;;; timeclock-change timeclock-status-string timeclock-out timeclock-in
;;;;;; timeclock-modeline-display) "timeclock" "calendar/timeclock.el"
-;;;;;; (17888 32279))
+;;;;;; (17988 45815))
;;; Generated autoloads from calendar/timeclock.el
(autoload (quote timeclock-modeline-display) "timeclock" "\
@@ -27778,7 +27926,7 @@ Its value should be an event that has a binding in MENU.
;;;### (autoloads (todo-show todo-cp todo-mode todo-print todo-top-priorities
;;;;;; todo-insert-item todo-add-item-non-interactively todo-add-category)
-;;;;;; "todo-mode" "calendar/todo-mode.el" (17963 22703))
+;;;;;; "todo-mode" "calendar/todo-mode.el" (17988 45668))
;;; Generated autoloads from calendar/todo-mode.el
(autoload (quote todo-add-category) "todo-mode" "\
@@ -28137,142 +28285,6 @@ Not documented
;;;***
-;;;### (autoloads (tumme-dired-edit-comment-and-tags tumme-mark-tagged-files
-;;;;;; tumme-dired-comment-files tumme-dired-display-image tumme-dired-display-external
-;;;;;; tumme-display-thumb tumme-display-thumbs-append tumme-setup-dired-keybindings
-;;;;;; tumme-jump-thumbnail-buffer tumme-delete-tag tumme-tag-files
-;;;;;; tumme-show-all-from-dir tumme-display-thumbs tumme-dired-with-window-configuration
-;;;;;; tumme-dired-insert-marked-thumbs) "tumme" "tumme.el" (17888
-;;;;;; 32281))
-;;; Generated autoloads from tumme.el
-
-(autoload (quote tumme-dired-insert-marked-thumbs) "tumme" "\
-Insert thumbnails before file names of marked files in the dired buffer.
-
-\(fn)" t nil)
-
-(autoload (quote tumme-dired-with-window-configuration) "tumme" "\
-Open directory DIR and create a default window configuration.
-
-Convenience command that:
-
- - Opens dired in folder DIR
- - Splits windows in most useful (?) way
- - Set `truncate-lines' to t
-
-After the command has finished, you would typically mark some
-image files in dired and type
-\\[tumme-display-thumbs] (`tumme-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'.
-
-\(fn DIR &optional ARG)" t nil)
-
-(autoload (quote tumme-display-thumbs) "tumme" "\
-Display thumbnails of all marked files, in `tumme-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
-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.
-
-With optional argument APPEND, append thumbnail to thumbnail buffer
-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
-thumbnail buffer to be selected.
-
-\(fn &optional ARG APPEND DO-NOT-POP)" t nil)
-
-(autoload (quote tumme-show-all-from-dir) "tumme" "\
-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
-displayed.
-
-\(fn DIR)" t nil)
-
-(defalias (quote tumme) (quote tumme-show-all-from-dir))
-
-(autoload (quote tumme-tag-files) "tumme" "\
-Tag marked file(s) in dired. With prefix ARG, tag file at point.
-
-\(fn ARG)" t nil)
-
-(autoload (quote tumme-delete-tag) "tumme" "\
-Remove tag for selected file(s).
-With prefix argument ARG, remove tag from file at point.
-
-\(fn ARG)" t nil)
-
-(autoload (quote tumme-jump-thumbnail-buffer) "tumme" "\
-Jump to thumbnail buffer.
-
-\(fn)" t nil)
-
-(autoload (quote tumme-setup-dired-keybindings) "tumme" "\
-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'.
-
-\(fn)" t nil)
-
-(autoload (quote tumme-display-thumbs-append) "tumme" "\
-Append thumbnails to `tumme-thumbnail-buffer'.
-
-\(fn)" t nil)
-
-(autoload (quote tumme-display-thumb) "tumme" "\
-Shorthand for `tumme-display-thumbs' with prefix argument.
-
-\(fn)" t nil)
-
-(autoload (quote tumme-dired-display-external) "tumme" "\
-Display file at point using an external viewer.
-
-\(fn)" t nil)
-
-(autoload (quote tumme-dired-display-image) "tumme" "\
-Display current image file.
-See documentation for `tumme-display-image' for more information.
-With prefix argument ARG, display image in its original size.
-
-\(fn &optional ARG)" t nil)
-
-(autoload (quote tumme-dired-comment-files) "tumme" "\
-Add comment to current or marked files in dired.
-
-\(fn)" t nil)
-
-(autoload (quote tumme-mark-tagged-files) "tumme" "\
-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
-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.
-
-\(fn)" t nil)
-
-(autoload (quote tumme-dired-edit-comment-and-tags) "tumme" "\
-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.
-
-\(fn)" t nil)
-
-;;;***
-
;;;### (autoloads (help-with-tutorial) "tutorial" "tutorial.el" (17963
;;;;;; 18445))
;;; Generated autoloads from tutorial.el
@@ -29241,7 +29253,7 @@ If FILE-NAME is non-nil, save the result to FILE-NAME.
;;;;;; vc-directory vc-merge vc-insert-headers vc-version-other-window
;;;;;; vc-diff vc-register vc-next-action vc-do-command edit-vc-file
;;;;;; with-vc-file vc-branch-part vc-trunk-p vc-before-checkin-hook
-;;;;;; vc-checkin-hook vc-checkout-hook) "vc" "vc.el" (17888 32281))
+;;;;;; vc-checkin-hook vc-checkout-hook) "vc" "vc.el" (17988 45860))
;;; Generated autoloads from vc.el
(defvar vc-checkout-hook nil "\
@@ -29608,7 +29620,7 @@ find any project directory." (let ((project-dir (getenv "PROJECTDIR")) dirs dir)
;;;***
;;;### (autoloads (vhdl-mode) "vhdl-mode" "progmodes/vhdl-mode.el"
-;;;;;; (17888 36581))
+;;;;;; (17988 45669))
;;; Generated autoloads from progmodes/vhdl-mode.el
(autoload (quote vhdl-mode) "vhdl-mode" "\
@@ -31271,7 +31283,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") (17963 23051 399870))
+;;;;;; "x-dnd.el") (17988 46002 912169))
;;;***
diff --git a/lisp/locate.el b/lisp/locate.el
index e8dafa79048..58ec48c55c4 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,
@@ -656,7 +669,12 @@ locate database using the shell command in `locate-update-command'."
;; Only for GNU locate
(defun locate-in-alternate-database (search-string database)
- "Run the GNU locate command, using an alternate database."
+ "Run the GNU locate program, using an alternate database.
+
+This command only works if you use GNU locate. It does not work
+properly if `locate-prompt-for-command' is set to t. In that
+case, you can just run the regular `locate' command and specify
+the database on the command line."
(interactive
(list
(progn
diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el
index c62cba4822d..b83b3864cb4 100644
--- a/lisp/mail/mailabbrev.el
+++ b/lisp/mail/mailabbrev.el
@@ -494,6 +494,8 @@ of a mail alias. The value is set up, buffer-local, when first needed.")
;; the usual syntax table.
(or (and (integerp last-command-char)
+ ;; Some commands such as M-> may want to expand first.
+ (equal this-command 'self-insert)
(or (eq (char-syntax last-command-char) ?_)
;; Don't expand on @.
(memq last-command-char '(?@ ?. ?% ?! ?_ ?-))))
diff --git a/lisp/makefile.w32-in b/lisp/makefile.w32-in
index e3ea090d652..29b3a185fb5 100644
--- a/lisp/makefile.w32-in
+++ b/lisp/makefile.w32-in
@@ -308,6 +308,8 @@ MH_E_SRC = $(lisp)/mh-e/mh-acros.el $(lisp)/mh-e/mh-alias.el \
$(lisp)/mh-e/mh-tool-bar.el $(lisp)/mh-e/mh-utils.el \
$(lisp)/mh-e/mh-xface.el
+# See the commentary for autoloads above for why we use ./mh-e below
+# instead of $(lisp)/mh-e.
mh-autoloads: $(lisp)/mh-e/mh-loaddefs.el
$(lisp)/mh-e/mh-loaddefs.el: $(MH_E_SRC)
$(MAKE) $(MFLAGS) pre-mh-loaddefs.el-$(SHELLTYPE)
@@ -319,7 +321,7 @@ $(lisp)/mh-e/mh-loaddefs.el: $(MH_E_SRC)
--eval "(setq find-file-suppress-same-file-warnings t)" \
--eval "(setq make-backup-files nil)" \
-f w32-batch-update-autoloads \
- "$(lisp)/mh-e/mh-loaddefs.el" $(lisp)/mh-e
+ "$(lisp)/mh-e/mh-loaddefs.el" ./mh-e
pre-mh-loaddefs.el-SH:
echo ";;; mh-loaddefs.el --- automatically extracted autoloads" > $@
diff --git a/lisp/man.el b/lisp/man.el
index 0484c032e34..e74f9734e51 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -1296,7 +1296,9 @@ The following key bindings are currently in effect in the buffer:
(forward-line 1))
(if (re-search-forward Man-heading-regexp (point-max) t n)
(beginning-of-line)
- (goto-char (point-max)))))
+ (goto-char (point-max))
+ ;; The last line doesn't belong to any section.
+ (forward-line -1))))
(defun Man-previous-section (n)
"Move point to Nth previous section (default 1)."
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index dc346695ce2..311c052fa30 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -312,7 +312,7 @@ and the cdr part is used for encoding."
"List of urls seen in the current buffer.")
(put 'rcirc-urls 'permanent-local t)
-(defvar rcirc-timeout-seconds 60
+(defvar rcirc-timeout-seconds 600
"Kill connection after this many seconds if there is no activity.")
(defconst rcirc-id-string (concat "rcirc on GNU Emacs " emacs-version))
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index b0a166465fa..55f96d21464 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -97,10 +97,10 @@ Major modes should set this variable.")
;;;###autoload
(defcustom comment-column 32
"Column to indent right-margin comments to.
-Each mode establishes a different default value for this variable; you
+Each mode may establish a different default value for this variable; you
can set the value for a particular mode using that mode's hook.
-Comments might be indented to a value smaller than this in order
-not to go beyond `comment-fill-column'."
+Comments might be indented to a different value in order not to go beyond
+`comment-fill-column' or in order to align them with surrounding comments."
:type 'integer
:group 'comment)
(make-variable-buffer-local 'comment-column)
@@ -491,16 +491,24 @@ Point is assumed to be just at the end of a comment."
(goto-char (point-min))
(re-search-forward (concat comment-end-skip "\\'") nil t))
(goto-char (match-beginning 0)))
- ;; comment-end-skip not found. Maybe we're at EOB which implicitly
- ;; closes the comment.
- ((eobp) (skip-syntax-backward " "))
- (t
- ;; else comment-end-skip was not found probably because it was not
- ;; set right. Since \\s> should catch the single-char case, we'll
- ;; blindly assume we're at the end of a two-char comment-end.
+ ;; comment-end-skip not found probably because it was not set
+ ;; right. Since \\s> should catch the single-char case, let's
+ ;; check that we're looking at a two-char comment ender.
+ ((not (or (<= (- (point-max) (line-beginning-position)) 1)
+ (zerop (logand (car (syntax-after (- (point) 1)))
+ ;; Here we take advantage of the fact that
+ ;; the syntax class " " is encoded to 0,
+ ;; so " 4" gives us just the 4 bit.
+ (car (string-to-syntax " 4"))))
+ (zerop (logand (car (syntax-after (- (point) 2)))
+ (car (string-to-syntax " 3"))))))
(backward-char 2)
(skip-chars-backward (string (char-after)))
- (skip-syntax-backward " ")))))
+ (skip-syntax-backward " "))
+ ;; No clue what's going on: maybe we're really not right after the
+ ;; end of a comment. Maybe we're at the "end" because of EOB rather
+ ;; than because of a marker.
+ (t (skip-syntax-backward " ")))))
;;;;
;;;; Commands
@@ -516,6 +524,58 @@ Point is assumed to be just at the end of a comment."
(and (> comment-add 0) (looking-at "\\s<\\(\\S<\\|\\'\\)")))
comment-column)))
+(defun comment-choose-indent (&optional indent)
+ "Choose the indentation to use for a right-hand-side comment.
+The criteria are (in this order):
+- try to keep the comment's text within `comment-fill-column'.
+- try to align with surrounding comments.
+- prefer INDENT (or `comment-column' if nil).
+Point is expected to be at the start of the comment."
+ (unless indent (setq indent comment-column))
+ ;; Avoid moving comments past the fill-column.
+ (let ((max (+ (current-column)
+ (- (or comment-fill-column fill-column)
+ (save-excursion (end-of-line) (current-column)))))
+ (other nil)
+ (min (save-excursion (skip-chars-backward " \t")
+ (1+ (current-column)))))
+ ;; Fix up the range.
+ (if (< max min) (setq max min))
+ ;; Don't move past the fill column.
+ (if (<= max indent) (setq indent max))
+ ;; We can choose anywhere between min..max.
+ ;; Let's try to align to a comment on the previous line.
+ (save-excursion
+ (when (and (zerop (forward-line -1))
+ (setq other (comment-search-forward
+ (line-end-position) t)))
+ (goto-char other) (setq other (current-column))))
+ (if (and other (<= other max) (>= other min))
+ ;; There is a comment and it's in the range: bingo!
+ other
+ ;; Can't align to a previous comment: let's try to align to comments
+ ;; on the following lines, then. These have not been re-indented yet,
+ ;; so we can't directly align ourselves with them. All we do is to try
+ ;; and choose an indentation point with which they will be able to
+ ;; align themselves.
+ (save-excursion
+ (while (and (zerop (forward-line 1))
+ (setq other (comment-search-forward
+ (line-end-position) t)))
+ (goto-char other)
+ (let ((omax (+ (current-column)
+ (- (or comment-fill-column fill-column)
+ (save-excursion (end-of-line) (current-column)))))
+ (omin (save-excursion (skip-chars-backward " \t")
+ (1+ (current-column)))))
+ (if (and (>= omax min) (<= omin max))
+ (progn (setq min (max omin min))
+ (setq max (min omax max)))
+ ;; Can't align with this anyway, so exit the loop.
+ (goto-char (point-max))))))
+ ;; Return the closest point to indent within min..max.
+ (max min (min max indent)))))
+
;;;###autoload
(defun comment-indent (&optional continue)
"Indent this line's comment to `comment-column', or insert an empty comment.
@@ -569,38 +629,9 @@ If CONTINUE is non-nil, use the `comment-continue' markers if any."
(if (not indent)
;; comment-indent-function refuses: delegate to line-indent.
(indent-according-to-mode)
- ;; If the comment is at the left of code, adjust the indentation.
+ ;; If the comment is at the right of code, adjust the indentation.
(unless (save-excursion (skip-chars-backward " \t") (bolp))
- ;; Avoid moving comments past the fill-column.
- (let ((max (+ (current-column)
- (- (or comment-fill-column fill-column)
- (save-excursion (end-of-line) (current-column))))))
- (if (<= max indent)
- (setq indent max) ;Don't move past the fill column.
- ;; We can choose anywhere between indent..max.
- ;; Let's try to align to a comment on the previous line.
- (let ((other nil)
- (min (max indent
- (save-excursion (skip-chars-backward " \t")
- (1+ (current-column))))))
- (save-excursion
- (when (and (zerop (forward-line -1))
- (setq other (comment-search-forward
- (line-end-position) t)))
- (goto-char other) (setq other (current-column))))
- (if (and other (<= other max) (>= other min))
- ;; There is a comment and it's in the range: bingo.
- (setq indent other)
- ;; Let's try to align to a comment on the next line, then.
- (let ((other nil))
- (save-excursion
- (when (and (zerop (forward-line 1))
- (setq other (comment-search-forward
- (line-end-position) t)))
- (goto-char other) (setq other (current-column))))
- (if (and other (<= other max) (> other min))
- ;; There is a comment and it's in the range: bingo.
- (setq indent other))))))))
+ (setq indent (comment-choose-indent indent)))
;; Update INDENT to leave at least one space
;; after other nonwhite text on the line.
(save-excursion
diff --git a/lisp/paren.el b/lisp/paren.el
index 17f0c401901..38ac150b402 100644
--- a/lisp/paren.el
+++ b/lisp/paren.el
@@ -253,7 +253,8 @@ in `show-paren-style' after `show-paren-delay' seconds of Emacs idle time."
;; 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.
- (set-window-start (selected-window) 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 9ef4aaace72..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)
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index f5da0eecc2e..390d49eaea4 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -522,7 +522,7 @@ preferably use the `c-mode-menu' language constant directly."
(setq lim (max (point-min) (1- (point))))
;; Look for the latest `c-type' property before end1
- (when (and (> end1 1)
+ (when (and (> end1 (point-min))
(setq type-pos
(if (get-text-property (1- end1) 'c-type)
end1
@@ -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 ce933cb13d5..1613fd8f976 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1448,10 +1448,7 @@ Turning the mode on runs the normal hook `compilation-minor-mode-hook'."
(with-no-warnings
(if compilation-finish-function
(funcall compilation-finish-function (current-buffer) msg)))
- (let ((functions compilation-finish-functions))
- (while functions
- (funcall (car functions) (current-buffer) msg)
- (setq functions (cdr functions))))))
+ (run-hook-with-args compilation-finish-functions (current-buffer) msg)))
;; Called when compilation process changes state.
(defun compilation-sentinel (proc msg)
@@ -1863,7 +1860,24 @@ Pop up the buffer containing MARKER and scroll to MARKER if we ask the user."
(let* ((name (read-file-name
(format "Find this %s in (default %s): "
compilation-error filename)
- spec-dir filename t nil))
+ spec-dir filename t nil
+ ;; The predicate below is fine when called from
+ ;; minibuffer-complete-and-exit, but it's too
+ ;; restrictive otherwise, since it also prevents the
+ ;; user from completing "fo" to "foo/" when she
+ ;; wants to enter "foo/bar".
+ ;;
+ ;; Try to make sure the user can only select
+ ;; a valid answer. This predicate may be ignored,
+ ;; tho, so we still have to double-check afterwards.
+ ;; TODO: We should probably fix read-file-name so
+ ;; that it never ignores this predicate, even when
+ ;; using popup dialog boxes.
+ ;; (lambda (name)
+ ;; (if (file-directory-p name)
+ ;; (setq name (expand-file-name filename name)))
+ ;; (file-exists-p name))
+ ))
(origname name))
(cond
((not (file-exists-p name))
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 3d252190eff..e557fdef843 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -152,7 +152,7 @@ Used to grey out relevant toolbar icons.")
:visible (and (not gud-running)
(eq gud-minor-mode 'gdba)))
([stop] menu-item "Stop" gud-stop-subjob
- :visible (or (not (eq gud-minor-mode 'gdba))
+ :visible (or (not (memq gud-minor-mode '(gdba pdb)))
(and gud-running
(eq gud-minor-mode 'gdba))))
([until] menu-item "Continue to selection" gud-until
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/idlwave.el b/lisp/progmodes/idlwave.el
index d29e56ce75d..0556c87b43d 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -2411,16 +2411,18 @@ non-nil."
;; Reindent new line
(idlwave-indent-line)))
-(defun idlwave-beginning-of-subprogram ()
- "Moves point to the beginning of the current program unit."
+(defun idlwave-beginning-of-subprogram (&optional nomark)
+ "Moves point to the beginning of the current program unit.
+If NOMARK is non-nil, do not push mark."
(interactive)
- (idlwave-find-key idlwave-begin-unit-reg -1))
+ (idlwave-find-key idlwave-begin-unit-reg -1 nomark))
-(defun idlwave-end-of-subprogram ()
- "Moves point to the start of the next program unit."
+(defun idlwave-end-of-subprogram (&optional nomark)
+ "Moves point to the start of the next program unit.
+If NOMARK is non-nil, do not push mark."
(interactive)
(idlwave-end-of-statement)
- (idlwave-find-key idlwave-end-unit-reg 1))
+ (idlwave-find-key idlwave-end-unit-reg 1 nomark))
(defun idlwave-mark-statement ()
"Mark current IDL statement."
@@ -2535,7 +2537,7 @@ The marks are pushed."
"Return (NAME TYPE CLASS) of current routine."
(idlwave-routines)
(save-excursion
- (idlwave-beginning-of-subprogram)
+ (idlwave-beginning-of-subprogram 'nomark)
(if (looking-at "[ \t]*\\<\\(pro\\|function\\)\\>\\s-+\\(\\([a-zA-Z0-9$_]+\\)::\\)?\\([a-zA-Z0-9$_]+\\)")
(let* ((type (if (string= (downcase (match-string 1)) "pro")
'pro 'function))
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 255f63aed41..75920a43aa7 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -647,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 e57c7e639c9..d2e913f2315 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -96,7 +96,7 @@
"import" "in" "is" "lambda" "not" "or" "pass" "print"
"raise" "return" "try" "while" "yield"
;; Future keywords
- "as" "None"
+ "as" "None" "with"
;; Not real keywords, but close enough to be fontified as such
"self" "True" "False")
symbol-end)
@@ -374,7 +374,7 @@ BOS non-nil means point is known to be at beginning of statement."
(save-excursion
(unless bos (python-beginning-of-statement))
(looking-at (rx (and (or "if" "else" "elif" "while" "for" "def"
- "class" "try" "except" "finally")
+ "class" "try" "except" "finally" "with")
symbol-end)))))
(defun python-close-block-statement-p (&optional bos)
@@ -461,7 +461,7 @@ Set `python-indent' locally to the value guessed."
(let ((initial (current-indentation)))
(if (zerop (python-next-statement))
(setq indent (- (current-indentation) initial)))
- (if (and (>= indent 2) (<= indent 8)) ; sanity check
+ (if (and indent (>= indent 2) (<= indent 8)) ; sanity check
(setq done t))))))
(when done
(when (/= indent (default-value 'python-indent))
@@ -883,10 +883,13 @@ On a comment line, go to end of line."
nil)
((eq 'string (syntax-ppss-context s))
;; Go to start of string and skip it.
- (goto-char (nth 8 s))
- (condition-case () ; beware invalid syntax
- (progn (forward-sexp) t)
- (error (end-of-line))))
+ (let ((pos (point)))
+ (goto-char (nth 8 s))
+ (condition-case () ; beware invalid syntax
+ (progn (forward-sexp) t)
+ ;; If there's a mismatched string, make sure
+ ;; we still overall move *forward*.
+ (error (goto-char pos) (end-of-line)))))
((python-skip-out t s))))
(end-of-line))
(unless comment
@@ -981,15 +984,11 @@ 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))
- opoint)
+ (open (python-open-block-statement-p)))
(if (and (zerop ci) (not open))
(not (goto-char point))
(catch 'done
- (setq opoint (point))
- (while (and (zerop (python-next-statement))
- (not (= opoint (point))))
- (setq opoint (point))
+ (while (zerop (python-next-statement))
(when (or (and open (<= (current-indentation) ci))
(< (current-indentation) ci))
(python-skip-comments/blanks t)
@@ -2240,7 +2239,7 @@ with skeleton expansions for compound statement templates.
#'python-current-defun)
(set (make-local-variable 'outline-regexp)
(rx (* space) (or "class" "def" "elif" "else" "except" "finally"
- "for" "if" "try" "while")
+ "for" "if" "try" "while" "with")
symbol-end))
(set (make-local-variable 'outline-heading-end-regexp) ":\\s-*\n")
(set (make-local-variable 'outline-level) #'python-outline-level)
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 2db30ceb4b2..60fc4c43e7b 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -1530,6 +1530,8 @@ with your script for an edit-interpret-debug cycle."
"ksh")
((string-match "[.]csh\\>" buffer-file-name)
"csh")
+ ((equal (file-name-nondirectory buffer-file-name) ".profile")
+ "sh")
(t
sh-shell-file))
nil nil)
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/simple.el b/lisp/simple.el
index fc3a0b3d218..68242bf19cc 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3171,6 +3171,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)))
@@ -3188,24 +3190,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'\).
@@ -3214,9 +3223,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/startup.el b/lisp/startup.el
index 5b51a14c08f..b36c9f1cfc4 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1133,21 +1133,25 @@ regardless of the value of this variable."
"\n")))
:face variable-pitch "\
Emacs FAQ\t\tFrequently asked questions and answers
-View Emacs Manual\tView the Emacs manual using Info
+View Emacs Manual\t\tView the Emacs manual using Info
Absence of Warranty\tGNU Emacs comes with "
:face (variable-pitch :slant oblique)
"ABSOLUTELY NO WARRANTY\n"
:face variable-pitch
"\
-Copying Conditions\tConditions for redistributing and changing Emacs
+Copying Conditions\t\tConditions for redistributing and changing Emacs
Getting New Versions\tHow to obtain the latest version of Emacs
More Manuals / Ordering Manuals Buying printed manuals from the FSF\n")
(:face variable-pitch
- "To quit a partially entered command, type "
+ "\nTo quit a partially entered command, type "
:face default
"Control-g"
:face variable-pitch
- ".\n"
+ ".
+
+Emacs Guided Tour\t\tSee http://www.gnu.org/software/emacs/tour/
+
+"
:face (variable-pitch :weight bold)
"Useful File menu items:\n"
:face variable-pitch
@@ -1160,13 +1164,7 @@ More Manuals / Ordering Manuals Buying printed manuals from the FSF\n")
"Control-c"
:face variable-pitch
")
-Recover Crashed Session\tRecover files you were editing before a crash
-
-
-
-
-
-"
+Recover Crashed Session\tRecover files you were editing before a crash\n"
))
"A list of texts to show in the middle part of splash screens.
Each element in the list should be a list of strings or pairs
diff --git a/lisp/subr.el b/lisp/subr.el
index bdde66fc885..2215436fcec 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..ba774e68443 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)))
@@ -273,32 +275,32 @@ With prefix arg, turn t-mouse mode on iff arg is positive.
Turn it on to use Emacs mouse commands, and off to use t-mouse commands."
nil " Mouse" nil :global t
- (if t-mouse-mode
- ;; Turn it on
- (unless window-system
- ;; Starts getting a stream of mouse events from an asynchronous process.
- ;; Only works if Emacs is running on a virtual terminal without a window system.
+ (unless window-system
+ (if t-mouse-mode
+ ;; Turn it on. Starts getting a stream of mouse events from an
+ ;; asynchronous process. Only works if Emacs is running on a virtual
+ ;; terminal without a window system.
(progn
- (setq mouse-position-function #'t-mouse-mouse-position-function)
- (let ((tty (t-mouse-tty))
- (process-connection-type t))
- (if (not (stringp tty))
- (error "Cannot find a virtual terminal"))
- (setq t-mouse-process
- (start-process "t-mouse" nil
- "mev" "-i" "-E" "-C" tty
- (if t-mouse-swap-alt-keys
- "-M-leftAlt" "-M-rightAlt")
- "-e-move"
- "-dall" "-d-hard"
- "-f")))
- (setq t-mouse-filter-accumulator "")
- (set-process-filter t-mouse-process 't-mouse-process-filter)
- (set-process-query-on-exit-flag t-mouse-process nil)))
+ (setq mouse-position-function #'t-mouse-mouse-position-function)
+ (let ((tty (t-mouse-tty))
+ (process-connection-type t))
+ (if (not (stringp tty))
+ (error "Cannot find a virtual terminal"))
+ (setq t-mouse-process
+ (start-process "t-mouse" nil
+ "mev" "-i" "-E" "-C" tty
+ (if t-mouse-swap-alt-keys
+ "-M-leftAlt" "-M-rightAlt")
+ "-e-move"
+ "-dall" "-d-hard"
+ "-f")))
+ (setq t-mouse-filter-accumulator "")
+ (set-process-filter t-mouse-process 't-mouse-process-filter)
+ (set-process-query-on-exit-flag t-mouse-process nil))
;; Turn it off
- (setq mouse-position-function nil)
- (delete-process t-mouse-process)
- (setq t-mouse-process nil)))
+ (setq mouse-position-function nil)
+ (delete-process t-mouse-process)
+ (setq t-mouse-process nil))))
(provide 't-mouse)
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el
index 7e40c46fcf2..7be231f3a2a 100644
--- a/lisp/term/mac-win.el
+++ b/lisp/term/mac-win.el
@@ -2104,7 +2104,8 @@ either in the current buffer or in the echo area."
(coding (or (cdr (assq (car script-language)
mac-script-code-coding-systems))
'mac-roman)))
- (mac-unread-string (mac-utxt-to-string text coding))))
+ (if text
+ (mac-unread-string (mac-utxt-to-string text coding)))))
;; kEventClassTextInput/kEventTextInputUpdateActiveInputArea
(define-key mac-apple-event-map [text-input update-active-input-area]
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el
index 7318a52d8a9..85b16931ec8 100644
--- a/lisp/textmodes/fill.el
+++ b/lisp/textmodes/fill.el
@@ -521,7 +521,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)))
@@ -749,7 +748,9 @@ space does not end a sentence, so don't break a line there."
(fill-paragraph arg)))
(defun fill-paragraph (arg)
- "Fill paragraph at or after point. Prefix ARG means justify as well.
+ "Fill paragraph at or after point.
+
+If ARG is non-nil (interactively, with prefix argument), justify as well.
If `sentence-end-double-space' is non-nil, then period followed by one
space does not end a sentence, so don't break a line there.
the variable `fill-column' controls the width for filling.
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 339160db9bd..a509fdf7f6c 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 ... */
@@ -1961,12 +1961,8 @@ Sets `flyspell-auto-correct-previous-pos' to nil"
But don't look beyond what's visible on the screen."
(interactive "d")
- (let (top bot)
- (save-excursion
- (move-to-window-line 0)
- (setq top (point))
- (move-to-window-line -1)
- (setq bot (point)))
+ (let ((top (window-start))
+ (bot (window-end)))
(save-excursion
(save-restriction
(narrow-to-region top bot)
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index 5e599ea10e6..51ff5e48a34 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -45,12 +45,12 @@
:group 'languages)
(defcustom sgml-basic-offset 2
- "*Specifies the basic indentation level for `sgml-indent-line'."
+ "Specifies the basic indentation level for `sgml-indent-line'."
:type 'integer
:group 'sgml)
(defcustom sgml-transformation-function 'identity
- "*Default value for `skeleton-transformation-function' in SGML mode."
+ "Default value for `skeleton-transformation-function' in SGML mode."
:type 'function
:group 'sgml)
@@ -166,7 +166,7 @@ This takes effect when first loading the `sgml-mode' library.")
"Syntax table used to parse SGML tags.")
(defcustom sgml-name-8bit-mode nil
- "*When non-nil, insert non-ASCII characters as named entities."
+ "When non-nil, insert non-ASCII characters as named entities."
:type 'boolean
:group 'sgml)
@@ -225,7 +225,7 @@ Currently, only Latin-1 characters are supported.")
;; The -s option suppresses output.
(defcustom sgml-validate-command "nsgmls -s" ; replaced old `sgmls'
- "*The command to validate an SGML document.
+ "The command to validate an SGML document.
The file name of current buffer file name will be appended to this,
separated by a space."
:type 'string
@@ -238,7 +238,7 @@ separated by a space."
;; I doubt that null end tags are used much for large elements,
;; so use a small distance here.
(defcustom sgml-slash-distance 1000
- "*If non-nil, is the maximum distance to search for matching `/'."
+ "If non-nil, is the maximum distance to search for matching `/'."
:type '(choice (const nil) integer)
:group 'sgml)
@@ -318,7 +318,7 @@ When more these are fontified together with `sgml-font-lock-keywords'.")
("!doctype")
("!element")
("!entity"))
- "*Alist of tag names for completing read and insertion rules.
+ "Alist of tag names for completing read and insertion rules.
This alist is made up as
((\"tag\" . TAGRULE)
@@ -348,15 +348,14 @@ an optional alist of possible values."
("!doctype" . "Document type (DTD) declaration")
("!element" . "Tag declaration")
("!entity" . "Entity (macro) declaration"))
- "*Alist of tag name and short description."
+ "Alist of tag name and short description."
:type '(repeat (cons (string :tag "Tag Name")
(string :tag "Description")))
:group 'sgml)
(defcustom sgml-xml-mode nil
- "*When non-nil, tag insertion functions will be XML-compliant.
-If this variable is customized, the custom value is used always.
-Otherwise, it is set to be buffer-local when the file has
+ "When non-nil, tag insertion functions will be XML-compliant.
+It is set to be buffer-local when the file has
a DOCTYPE or an XML declaration."
:type 'boolean
:version "22.1"
@@ -937,7 +936,7 @@ and move to the line in the SGML document that caused it."
(defun sgml-lexical-context (&optional limit)
"Return the lexical context at point as (TYPE . START).
START is the location of the start of the lexical element.
-TYPE is one of `string', `comment', `tag', `cdata', or `text'.
+TYPE is one of `string', `comment', `tag', `cdata', `pi', or `text'.
Optional argument LIMIT is the position to start parsing from.
If nil, start from a preceding tag at indentation."
@@ -964,12 +963,19 @@ If nil, start from a preceding tag at indentation."
(let ((cdata-start (point)))
(unless (search-forward "]]>" pos 'move)
(list 0 nil nil 'cdata nil nil nil nil cdata-start))))
+ ((and sgml-xml-mode (looking-at "<\\?"))
+ ;; Processing Instructions.
+ ;; In SGML, it's basically a normal tag of the form
+ ;; <?NAME ...> but in XML, it takes the form <? ... ?>.
+ (let ((pi-start (point)))
+ (unless (search-forward "?>" pos 'move)
+ (list 0 nil nil 'pi nil nil nil nil pi-start))))
(t
;; We've reached a tag. Parse it.
;; FIXME: Handle net-enabling start-tags
(parse-partial-sexp (point) pos 0))))))
(cond
- ((eq (nth 3 state) 'cdata) (cons 'cdata (nth 8 state)))
+ ((memq (nth 3 state) '(cdata pi)) (cons (nth 3 state) (nth 8 state)))
((nth 3 state) (cons 'string (nth 8 state)))
((nth 4 state) (cons 'comment (nth 8 state)))
((and state (> (nth 0 state) 0)) (cons 'tag (nth 1 state)))
@@ -1003,8 +1009,10 @@ See `sgml-tag-alist' for info about attribute rules."
(insert alist ?\")
(delete-backward-char 2)))
(insert "=\"")
- (when alist
- (insert (skeleton-read '(completing-read "Value: " alist))))
+ (if (cdr alist)
+ (insert (skeleton-read '(completing-read "Value: " alist)))
+ (when (null alist)
+ (insert (skeleton-read '(read-string "Value: ")))))
(insert ?\"))))
(defun sgml-quote (start end &optional unquotep)
@@ -1093,9 +1101,15 @@ Leave point at the beginning of the tag."
(when (eq (char-after) ?<)
;; Oops!! Looks like we were not in a textual context after all!.
;; Let's try to recover.
+ ;; Remember the tag-start so we don't need to look for it later.
+ ;; This is not just an optimization but also makes sure we don't get
+ ;; stuck in infloops in cases where "looking back for <" would not go
+ ;; back far enough.
+ (setq tag-start (point))
(with-syntax-table sgml-tag-syntax-table
(let ((pos (point)))
(condition-case nil
+ ;; FIXME: This does not correctly skip over PI an CDATA tags.
(forward-sexp)
(scan-error
;; This < seems to be just a spurious one, let's ignore it.
@@ -1110,33 +1124,41 @@ Leave point at the beginning of the tag."
(cond
((sgml-looking-back-at "--") ; comment
(setq tag-type 'comment
- tag-start (search-backward "<!--" nil t)))
+ tag-start (or tag-start (search-backward "<!--" nil t))))
((sgml-looking-back-at "]]") ; cdata
(setq tag-type 'cdata
- tag-start (re-search-backward "<!\\[[A-Z]+\\[" nil t)))
+ tag-start (or tag-start
+ (re-search-backward "<!\\[[A-Z]+\\[" nil t))))
+ ((sgml-looking-back-at "?") ; XML processing-instruction
+ (setq tag-type 'pi
+ ;; IIUC: SGML processing instructions take the form <?foo ...>
+ ;; i.e. a "normal" tag, handled below. In XML this is changed
+ ;; to <?foo ... ?> where "..." can contain < and > and even <?
+ ;; but not ?>. This means that when parsing backward, there's
+ ;; no easy way to make sure that we find the real beginning of
+ ;; the PI.
+ tag-start (or tag-start (search-backward "<?" nil t))))
(t
- (setq tag-start
- (with-syntax-table sgml-tag-syntax-table
- (goto-char tag-end)
- (condition-case nil
- (backward-sexp)
- (scan-error
- ;; This > isn't really the end of a tag. Skip it.
- (goto-char (1- tag-end))
- (throw 'found (sgml-parse-tag-backward limit))))
- (point)))
+ (unless tag-start
+ (setq tag-start
+ (with-syntax-table sgml-tag-syntax-table
+ (goto-char tag-end)
+ (condition-case nil
+ (backward-sexp)
+ (scan-error
+ ;; This > isn't really the end of a tag. Skip it.
+ (goto-char (1- tag-end))
+ (throw 'found (sgml-parse-tag-backward limit))))
+ (point))))
(goto-char (1+ tag-start))
(case (char-after)
- (?! ; declaration
- (setq tag-type 'decl))
- (?? ; processing-instruction
- (setq tag-type 'pi))
+ (?! (setq tag-type 'decl)) ; declaration
+ (?? (setq tag-type 'pi)) ; processing-instruction
+ (?% (setq tag-type 'jsp)) ; JSP tags
(?/ ; close-tag
(forward-char 1)
(setq tag-type 'close
name (sgml-parse-tag-name)))
- (?% ; JSP tags
- (setq tag-type 'jsp))
(t ; open or empty tag
(setq tag-type 'open
name (sgml-parse-tag-name))
@@ -1331,6 +1353,8 @@ LCON is the lexical context, if any."
;; We don't know how to indent it. Let's be honest about it.
(cdata nil)
+ ;; We don't know how to indent it. Let's be honest about it.
+ (pi nil)
(tag
(goto-char (1+ (cdr lcon)))
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index b5ca77e5853..5757100468b 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -527,6 +527,8 @@ An alternative value is \" . \", if you use a font with a narrow period."
(citations (regexp-opt
'("label" "ref" "pageref" "vref" "eqref"
"cite" "nocite" "index" "glossary" "bibitem"
+ ;; natbib's two variants of \cite:
+ "citep" "citet"
;; These are text, rather than citations.
;; "caption" "footnote" "footnotemark" "footnotetext"
)
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/vc-hooks.el b/lisp/vc-hooks.el
index df66c817293..1bde704790b 100644
--- a/lisp/vc-hooks.el
+++ b/lisp/vc-hooks.el
@@ -52,7 +52,9 @@ BACKEND, use `vc-handled-backends'.")
(defvar vc-header-alist ())
(make-obsolete-variable 'vc-header-alist 'vc-BACKEND-header)
-(defcustom vc-ignore-dir-regexp "\\`\\([\\/][\\/]\\|/net/\\|/afs/\\)\\'"
+(defcustom vc-ignore-dir-regexp
+ ;; Stop SMB, automounter, AFS, and DFS host lookups.
+ "\\`\\(?:[\\/][\\/]\\|/\\(?:net\\|afs\\|\\.\\\.\\.\\)/\\)\\'"
"Regexp matching directory names that are not under VC's control.
The default regexp prevents fruitless and time-consuming attempts
to determine the VC status in directories in which filenames are
@@ -313,10 +315,17 @@ If WITNESS if not found, return nil, otherwise return the root."
;; Represent /home/luser/foo as ~/foo so that we don't try to look for
;; witnesses in /home or in /.
(setq file (abbreviate-file-name file))
- (let ((root nil))
+ (let ((root nil)
+ (user (nth 2 (file-attributes file))))
(while (not (or root
(equal file (setq file (file-name-directory file)))
(null file)
+ ;; As a heuristic, we stop looking up the hierarchy of
+ ;; directories as soon as we find a directory belonging
+ ;; to another user. This should save us from looking in
+ ;; things like /net and /afs. This assumes that all the
+ ;; files inside a project belong to the same user.
+ (not (equal user (file-attributes file)))
(string-match vc-ignore-dir-regexp file)))
(if (file-exists-p (expand-file-name witness file))
(setq root file)
diff --git a/lisp/vc.el b/lisp/vc.el
index 450bfb3c938..a65e698669e 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -2909,7 +2909,11 @@ log entries should be gathered."
(vc-call-backend (vc-responsible-backend default-directory)
'update-changelog args))
-(defun vc-default-update-changelog (backend files)
+(defalias 'vc-cvs-update-changelog 'vc-update-changelog-rcs2log)
+(defalias 'vc-rcs-update-changelog 'vc-update-changelog-rcs2log)
+;; FIXME: This should probably be moved to vc-rcs.el and replaced in
+;; vc-cvs.el by code using cvs2cl.
+(defun vc-update-changelog-rcs2log (files)
"Default implementation of update-changelog.
Uses `rcs2log' which only works for RCS and CVS."
;; FIXME: We (c|sh)ould add support for cvs2cl
@@ -2950,9 +2954,7 @@ Uses `rcs2log' which only works for RCS and CVS."
(mapcar
(lambda (f)
(file-relative-name
- (if (file-name-absolute-p f)
- f
- (concat odefault f))))
+ (expand-file-name f odefault)))
files)))
"done"
(pop-to-buffer (get-buffer-create "*vc*"))