diff options
| author | Miles Bader | 2007-04-24 21:56:25 +0000 |
|---|---|---|
| committer | Miles Bader | 2007-04-24 21:56:25 +0000 |
| commit | 991a760232de757d71d8dbbed47ee12d81e29d53 (patch) | |
| tree | 2440730c37ae3f167a50f5c3ac5eaeab9b72b7b0 /lisp | |
| parent | 0bb328f8f6fce06a7fc65670c7d5c011b613e1c5 (diff) | |
| parent | 3851329262d6558d5e1a93157d44777d0a39e38e (diff) | |
| download | emacs-991a760232de757d71d8dbbed47ee12d81e29d53.tar.gz emacs-991a760232de757d71d8dbbed47ee12d81e29d53.zip | |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 698-710)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 216)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-196
Diffstat (limited to 'lisp')
117 files changed, 2232 insertions, 1584 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c1f5b3b6888..6dd2bc9863c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,6 +1,367 @@ | |||
| 1 | 2007-04-24 J.D. Smith <jdsmith@as.arizona.edu> | ||
| 2 | |||
| 3 | * progmodes/idlw-shell.el (idlwave-shell-clear-all-bp): Don't | ||
| 4 | re-query for each cleared BP. | ||
| 5 | (idlwave-shell-clear-bp): Optionally skip BP query. | ||
| 6 | (idlwave-shell-update-bp-overlays): Use set-window-margins | ||
| 7 | instead of set-window-buffer, which incorrectly moves displayed | ||
| 8 | region. | ||
| 9 | |||
| 10 | 2007-04-23 Jay Belanger <jay.p.belanger@gmail.com> | ||
| 11 | |||
| 12 | * calc/calc.el (calc-bug-address): Update maintainer's address. | ||
| 13 | * calc/*: Update maintainer's address. | ||
| 14 | |||
| 15 | 2007-04-23 Richard Stallman <rms@gnu.org> | ||
| 16 | |||
| 17 | * simple.el (set-mark-command-repeat-pop): Doc fix. | ||
| 18 | Put in `editing-basics' group. | ||
| 19 | |||
| 20 | 2007-04-23 Chong Yidong <cyd@stupidchicken.com> | ||
| 21 | |||
| 22 | * info.el (Info-mouse-scroll-up, Info-mouse-scroll-down): New | ||
| 23 | functions. | ||
| 24 | (Info-mode-line-node-keymap): Bind mouse commands to | ||
| 25 | Info-mouse-scroll-up/down instead of Info-scroll-up/down. | ||
| 26 | |||
| 27 | 2007-04-23 Luc Teirlinck <teirllm@auburn.edu> | ||
| 28 | |||
| 29 | * locate.el (locate-local-prompt): New var. | ||
| 30 | (locate-prompt-for-command): Doc fix. | ||
| 31 | (locate-prompt-for-search-string): New function. | ||
| 32 | (locate): New optional arg. Make locate-local-prompt | ||
| 33 | buffer-local. Use locate-prompt-for-search-string. | ||
| 34 | (locate-with-filter): New optional arg. Use | ||
| 35 | locate-prompt-for-search-string. | ||
| 36 | (locate-update): Bind locate-prompt-for-command. | ||
| 37 | |||
| 38 | 2007-04-23 Glenn Morris <rgm@gnu.org> | ||
| 39 | |||
| 40 | * files.el (magic-mode-alist): `<!DOCTYPE HTML' in html-mode. | ||
| 41 | |||
| 42 | 2007-04-23 Nick Roberts <nickrob@snap.net.nz> | ||
| 43 | |||
| 44 | * button.el (button): Inherit from link face on a tty. | ||
| 45 | |||
| 46 | 2007-04-23 Glenn Morris <rgm@gnu.org> | ||
| 47 | |||
| 48 | * button.el (button): Use color for this face on a tty. | ||
| 49 | |||
| 50 | * files.el (magic-mode-alist): Allow for carriage-returns in | ||
| 51 | html-mode and sgml-mode entries. | ||
| 52 | |||
| 53 | 2007-04-22 Richard Stallman <rms@gnu.org> | ||
| 54 | |||
| 55 | * emacs-lisp/easy-mmode.el (define-globalized-minor-mode): | ||
| 56 | Improve doc string of generated command. | ||
| 57 | |||
| 58 | * subr.el (read-number): Catch errors. | ||
| 59 | |||
| 60 | * hi-lock.el (hi-lock-file-patterns-policy): Doc fix. | ||
| 61 | |||
| 62 | 2007-04-22 Chong Yidong <cyd@stupidchicken.com> | ||
| 63 | |||
| 64 | * image-dired.el: Rename from thumbnails.el. All instances of | ||
| 65 | "thumbnails" replaced with "image-dired". | ||
| 66 | |||
| 67 | * dired.el (dired-mode-map): Rename "thumbnails" again, to | ||
| 68 | "image-dired". | ||
| 69 | |||
| 70 | 2007-04-22 Kim F. Storm <storm@cua.dk> | ||
| 71 | |||
| 72 | * ido.el (ido-kill-buffer-at-head, ido-delete-file-at-head): | ||
| 73 | Don't use kill-line. | ||
| 74 | |||
| 75 | 2007-04-22 Nick Roberts <nickrob@snap.net.nz> | ||
| 76 | |||
| 77 | * t-mouse.el (t-mouse-make-event): Pass on mev's more informative | ||
| 78 | error message. | ||
| 79 | |||
| 80 | 2007-04-22 Chong Yidong <cyd@stupidchicken.com> | ||
| 81 | |||
| 82 | * dired.el: Rename "tumme" to "thumbnails". | ||
| 83 | |||
| 84 | * thumbnails.el: Rename from tumme.el. All instances of "tumme" | ||
| 85 | replaced with "thumbnails". | ||
| 86 | |||
| 87 | 2007-04-22 Glenn Morris <rgm@gnu.org> | ||
| 88 | |||
| 89 | * hi-lock.el (hi-lock-file-patterns-policy): Make it a defcustom, | ||
| 90 | and give it the risky-local-variable property. | ||
| 91 | |||
| 92 | * textmodes/flyspell.el (flyspell-define-abbrev): Downcase abbrev | ||
| 93 | before defining it. | ||
| 94 | |||
| 95 | 2007-04-21 Martin Rudalics <rudalics@gmx.at> | ||
| 96 | |||
| 97 | * progmodes/cc-mode.el (c-remove-any-local-eval-or-mode-variables): | ||
| 98 | Use delete-region instead of kill-line. | ||
| 99 | |||
| 100 | 2007-04-21 Alan Mackenzie <acm@muc.de> | ||
| 101 | |||
| 102 | * progmodes/cc-cmds.el (c-electric-slash): Replace wrong use of | ||
| 103 | `kill-region' by `delete-region'. | ||
| 104 | |||
| 105 | 2007-04-21 Chong Yidong <cyd@stupidchicken.com> | ||
| 106 | |||
| 107 | * progmodes/perl-mode.el (perl-indent-command): Use delete-region | ||
| 108 | instead of kill-region. | ||
| 109 | |||
| 110 | * progmodes/mantemp.el (mantemp-make-mantemps-region) | ||
| 111 | (mantemp-insert-cxx-syntax, mantemp-sort-and-unique-lines) | ||
| 112 | (mantemp-remove-memfuncs): Use delete-region instead of kill-word | ||
| 113 | and kill-line. | ||
| 114 | |||
| 115 | * progmodes/vhdl-mode.el (vhdl-template-type) | ||
| 116 | (vhdl-template-record, vhdl-template-nature) | ||
| 117 | (vhdl-template-configuration-spec, vhdl-template-component-inst) | ||
| 118 | (vhdl-template-break, vhdl-regress-line, vhdl-electric-tab): Use | ||
| 119 | delete-region instead of kill-word and kill-line. | ||
| 120 | |||
| 121 | 2007-04-21 Johan Bockg,Ae(Brd <bojohan@dd.chalmers.se> | ||
| 122 | |||
| 123 | * dired-x.el (dired-virtual-mode): Doc fix. | ||
| 124 | |||
| 125 | 2007-04-21 Richard Stallman <rms@gnu.org> | ||
| 126 | |||
| 127 | * font-lock.el (font-lock-keywords-alist): Mark as risky. | ||
| 128 | |||
| 129 | * subr.el (read-number): Doc fix. | ||
| 130 | |||
| 131 | * simple.el (pop-to-mark-command): Display message "mark popped" | ||
| 132 | if point does not move. | ||
| 133 | (set-mark-command): Doc fix. | ||
| 134 | |||
| 135 | 2007-04-21 Luc Teirlinck <teirllm@auburn.edu> | ||
| 136 | |||
| 137 | * locate.el: Revert 2006-09-09 and 2007-04-20 changes. | ||
| 138 | (locate-local-filter, locate-local-search): New vars. | ||
| 139 | (locate): Make variables local. | ||
| 140 | (locate-update): Bind locate-buffer-name. Call locate using | ||
| 141 | locate-local-filter and locate-local-search. | ||
| 142 | |||
| 143 | 2007-04-20 David Koppelman <koppel@ece.lsu.edu> | ||
| 144 | |||
| 145 | * hi-lock.el (hi-lock-file-patterns-policy): New var. | ||
| 146 | (hi-lock-find-patterns): Use hi-lock-file-patterns-policy. | ||
| 147 | (hi-lock-mode): Update docstring. | ||
| 148 | |||
| 149 | 2007-04-20 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 150 | |||
| 151 | * textmodes/fill.el (fill-move-to-break-point): Don't inhibit | ||
| 152 | fill-nobreak-predicate when the break is past fill-column. | ||
| 153 | |||
| 154 | 2007-04-20 Francesco Potort,Al(B <pot@gnu.org> | ||
| 155 | |||
| 156 | * locate.el (locate): Output from shell-command should go in the | ||
| 157 | current buffer rather than *Shell Command Output*. | ||
| 158 | |||
| 159 | 2007-04-20 Chong Yidong <cyd@stupidchicken.com> | ||
| 160 | |||
| 161 | * paren.el (show-paren-function): Fix last fix. | ||
| 162 | |||
| 163 | 2007-04-19 Kevin Ryde <user42@zip.com.au> | ||
| 164 | |||
| 165 | * arc-mode.el (archive-find-type): lzh-exe for lzh self-extracting exe. | ||
| 166 | (archive-lzh-summarize): Add optional start arg for where to start | ||
| 167 | looking at the archive. | ||
| 168 | (archive-lzh-exe-summarize, archive-lzh-exe-extract): New functions. | ||
| 169 | |||
| 170 | * international/mule.el (auto-coding-alist): no-conversion for .exe | ||
| 171 | and .EXE. | ||
| 172 | |||
| 173 | 2007-04-19 Alan Mackenzie <acm@muc.de> | ||
| 174 | |||
| 175 | * progmodes/cc-cmds.el (c-in-function-trailer-p): Fix this: when a | ||
| 176 | function return type contains "struct", "union", etc. | ||
| 177 | c-end-of-defun goes too far forward. | ||
| 178 | |||
| 179 | 2007-04-19 Chong Yidong <cyd@stupidchicken.com> | ||
| 180 | |||
| 181 | * paren.el (show-paren-function): Reset window-start to avoid | ||
| 182 | recentering. | ||
| 183 | |||
| 184 | 2007-04-19 Glenn Morris <rgm@gnu.org> | ||
| 185 | |||
| 186 | * calendar/todo-mode.el: Fix typo: "threshhold" -> "threshold". | ||
| 187 | |||
| 188 | 2007-04-18 Glenn Morris <rgm@gnu.org> | ||
| 189 | |||
| 190 | * calendar/diary-lib.el (diary-header-line-format): Add a custom | ||
| 191 | :set function. | ||
| 192 | (diary-list-entries): Only switch to diary-mode from | ||
| 193 | default-major-mode (reverts 2007-03-21 change). Otherwise, if in | ||
| 194 | diary-mode set header-line-format, in case of any customization. | ||
| 195 | |||
| 196 | 2007-04-18 Levin Du <zslevin@gmail.com> (tiny change) | ||
| 197 | |||
| 198 | * calendar/parse-time.el (parse-time-string-chars): Check if CHAR | ||
| 199 | is less than the length of parse-time-syntax. | ||
| 200 | |||
| 201 | 2007-04-17 David Kastrup <dak@gnu.org> | ||
| 202 | |||
| 203 | * replace.el (query-replace-regexp-eval): Deprecate. | ||
| 204 | |||
| 205 | 2007-04-17 Alan Mackenzie <acm@muc.de> | ||
| 206 | |||
| 207 | * progmodes/cc-cmds.el (c-beginning-of-defun): With -ve arg and | ||
| 208 | point too close to EOB, leave point at EOB rather than last `}'. | ||
| 209 | |||
| 210 | 2007-04-17 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> | ||
| 211 | |||
| 212 | * textmodes/bibtex.el (bibtex-include-OPTkey) | ||
| 213 | (bibtex-user-optional-fields, bibtex-entry-field-alist): | ||
| 214 | Fix defcustom. | ||
| 215 | |||
| 216 | 2007-04-17 Glenn Morris <rgm@gnu.org> | ||
| 217 | |||
| 218 | * calendar/cal-dst.el (calendar-dst-find-startend): If YEAR cannot | ||
| 219 | be encoded, fall back to current year. | ||
| 220 | |||
| 221 | 2007-04-14 Kevin Ryde <user42@zip.com.au> | ||
| 222 | |||
| 223 | * arc-mode.el (archive-lzh-summarize): Only apply the "downcase if | ||
| 224 | all upcase" rule to OS-ID 0 "generic". Always downcase for OS-ID | ||
| 225 | M "MSDOS". | ||
| 226 | |||
| 227 | 2007-04-16 Chong Yidong <cyd@stupidchicken.com> | ||
| 228 | |||
| 229 | * progmodes/python.el (python-end-of-block): Avoid looping forever | ||
| 230 | if python-next-statement fails. | ||
| 231 | |||
| 232 | 2007-04-16 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> | ||
| 233 | |||
| 234 | * textmodes/bibtex.el (bibtex-entry-field-alist): Use defcustom. | ||
| 235 | |||
| 236 | 2007-04-16 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 237 | |||
| 238 | * progmodes/perl-mode.el (perl-indent-level): Mark as safe local var. | ||
| 239 | * progmodes/cperl-mode.el (cperl-indent-level): Likewise. | ||
| 240 | |||
| 241 | 2007-04-15 Jay Belanger <belanger@truman.edu> | ||
| 242 | |||
| 243 | * calc/calc.el (calc-version): New function. | ||
| 244 | (calc-trail-mode): Shorten the title. | ||
| 245 | |||
| 246 | 2007-04-15 Chong Yidong <cyd@stupidchicken.com> | ||
| 247 | |||
| 248 | * mail/footnote.el (footnote-style): Clarify docstring to state | ||
| 249 | that customizing this only applies to future footnotes. | ||
| 250 | |||
| 251 | 2007-04-15 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> | ||
| 252 | |||
| 253 | * textmodes/bibtex.el (bibtex-field-list): Use functionp. | ||
| 254 | (bibtex-make-field): Check that INIT is a string. Use functionp. | ||
| 255 | |||
| 256 | 2007-04-14 Glenn Morris <rgm@gnu.org> | ||
| 257 | |||
| 258 | * complete.el (PC-goto-end): New buffer-local variable. | ||
| 259 | (PC-do-completion-end): Make buffer-local. | ||
| 260 | (partial-completion-mode) <choose-completion-string-functions>: | ||
| 261 | Do not go to the end of the minibuffer if PC-goto-end is non-nil. | ||
| 262 | (PC-do-completion): New optional fourth argument GOTO-END. Add a | ||
| 263 | doc string. Set PC-goto-end for choose-completion. | ||
| 264 | (PC-lisp-complete-symbol): Pass non-nil GOTO-END arg to | ||
| 265 | PC-do-completion. | ||
| 266 | |||
| 267 | * textmodes/bibtex.el (bibtex-insert-kill): Pass non-nil NODELIM | ||
| 268 | arg to bibtex-make-field. | ||
| 269 | (bibtex-make-field): Add optional fourth arg NODELIM. | ||
| 270 | Insert delimiters around INIT unless this arg is non-nil. | ||
| 271 | |||
| 272 | 2007-04-14 Nick Roberts <nickrob@snap.net.nz> | ||
| 273 | |||
| 274 | * tmm.el (tmm-get-keybind): Use copy-sequence to ensure that the | ||
| 275 | global map isn't modified | ||
| 276 | |||
| 277 | 2007-04-14 Glenn Morris <rgm@gnu.org> | ||
| 278 | |||
| 279 | * calendar/appt.el (appt-disp-window): Do not split small windows. | ||
| 280 | Suggested by Jeff Miller <jmiller@cablespeed.com>. | ||
| 281 | |||
| 282 | 2007-04-13 Chong Yidong <cyd@stupidchicken.com> | ||
| 283 | |||
| 284 | * progmodes/compile.el (compilation-start): Revert 2007-03-25 change. | ||
| 285 | |||
| 286 | * files.el: Ditto. | ||
| 287 | |||
| 288 | 2007-04-13 Juanma Barranquero <lekktu@gmail.com> | ||
| 289 | |||
| 290 | * cus-edit.el (minibuffer, auto-save): Fix typos in docstrings. | ||
| 291 | |||
| 292 | * term.el (term-buffer-maximum-size, term-exec, term-escape-char) | ||
| 293 | (term-set-escape-char, term-termcap-format, term-get-old-input-default) | ||
| 294 | (term-skip-prompt, term-send-string, term-send-region, term-pager-page) | ||
| 295 | (term-pager-help): Fix typos in docstrings. | ||
| 296 | |||
| 297 | * wid-edit.el (widget-documentation): Fix typo in docstring. | ||
| 298 | |||
| 299 | * progmodes/ebnf2ps.el (ebnf-insert-style, ebnf-merge-style): | ||
| 300 | Fix typos in error messages. | ||
| 301 | |||
| 302 | 2007-04-13 Martin Rudalics <rudalics@gmx.at> | ||
| 303 | |||
| 304 | * emacs-lisp/edebug.el (edebug-pop-to-buffer): Don't select | ||
| 305 | window marked as dedicated. | ||
| 306 | |||
| 307 | * mail/footnote.el (footnote-latin-string): New variable. | ||
| 308 | (footnote-latin-regexp): Redefine as regexp alternative. | ||
| 309 | (Footnote-latin): Use footnote-latin-string instead of | ||
| 310 | footnote-latin-regexp. | ||
| 311 | |||
| 312 | 2007-04-13 Glenn Morris <rgm@gnu.org> | ||
| 313 | |||
| 314 | * tmm.el (tmm-get-keybind): Use car-safe to avoid errors with | ||
| 315 | inherited keymaps. | ||
| 316 | |||
| 317 | 2007-04-12 Chong Yidong <cyd@stupidchicken.com> | ||
| 318 | |||
| 319 | * outline.el (outline-get-next-sibling): Clarify docstring. | ||
| 320 | (outline-get-last-sibling): Handle case where we are at the first | ||
| 321 | heading. Clarify docstring. | ||
| 322 | |||
| 323 | 2007-04-12 Nick Roberts <nickrob@snap.net.nz> | ||
| 324 | |||
| 325 | * progmodes/gud.el (gud-minor-mode-map): Make go button same | ||
| 326 | length as stop button to lessen flicker. | ||
| 327 | (jdb): Add gud-print. | ||
| 328 | (gud-find-expr): Jdb prints the expression with the value, so | ||
| 329 | don't insert it in the output. | ||
| 330 | |||
| 331 | 2007-04-11 Jason Rumney <jasonr@gnu.org> | ||
| 332 | |||
| 333 | * dnd.el (dnd-get-local-file-name): Decode both upper and lower | ||
| 334 | case hex. Do not try to decode non-hex letters. | ||
| 335 | |||
| 336 | 2007-04-11 Markus Triska <markus.triska@gmx.at> | ||
| 337 | |||
| 338 | * emacs-lisp/byte-opt.el (byte-optimize-backward-char) | ||
| 339 | (byte-optimize-backward-word): Remove (move to bytecomp.el). | ||
| 340 | (byte-optimize-form-code-walker): Evaluate pure function calls if | ||
| 341 | possible. | ||
| 342 | (byte-optimize-all-constp): New function. | ||
| 343 | |||
| 344 | * emacs-lisp/bytecomp.el (byte-compile-char-before): | ||
| 345 | Improve numeric argument case. | ||
| 346 | (byte-compile-backward-char, byte-compile-backward-word): | ||
| 347 | New functions, performing rewriting previously done in byte-opt.el. | ||
| 348 | Fix their "Fixme" item (restriction to numeric arguments). | ||
| 349 | |||
| 350 | 2007-04-11 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 351 | |||
| 352 | * desktop.el (desktop-save, desktop-create-buffer): Replace mapcar | ||
| 353 | with dolist. | ||
| 354 | (after-init-hook): Don't quote lambda. | ||
| 355 | (desktop-first-buffer): Don't wrap it in eval-when-compile. | ||
| 356 | (desktop-internal-v2s): Remove unused var `el'. | ||
| 357 | (desktop-buffer-major-mode, desktop-buffer-locals): Move out of | ||
| 358 | desktop-restore-file-buffer. | ||
| 359 | (desktop-buffer-ok-count, desktop-buffer-fail-count): Move out of | ||
| 360 | desktop-create-buffer. | ||
| 361 | |||
| 1 | 2007-04-10 Chong Yidong <cyd@stupidchicken.com> | 362 | 2007-04-10 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 363 | ||
| 3 | * woman.el (woman-decode-buffer): Postphone macro-set check... | 364 | * woman.el (woman-decode-buffer): Postpone macro-set check... |
| 4 | (woman-decode-region): ...to here. | 365 | (woman-decode-region): ...to here. |
| 5 | 366 | ||
| 6 | 2007-04-10 Thien-Thi Nguyen <ttn@gnu.org> | 367 | 2007-04-10 Thien-Thi Nguyen <ttn@gnu.org> |
| @@ -25,8 +386,8 @@ | |||
| 25 | 386 | ||
| 26 | * emacs-lisp/byte-opt.el (byte-optimize-char-before): Remove (move | 387 | * emacs-lisp/byte-opt.el (byte-optimize-char-before): Remove (move |
| 27 | to bytecomp.el as byte-compile-char-before). | 388 | to bytecomp.el as byte-compile-char-before). |
| 28 | * emacs-lisp/bytecomp.el (byte-compile-char-before): New | 389 | * emacs-lisp/bytecomp.el (byte-compile-char-before): |
| 29 | function (modified replacement for byte-optimize-char-before in | 390 | New function (modified replacement for byte-optimize-char-before in |
| 30 | byte-opt.el). | 391 | byte-opt.el). |
| 31 | 392 | ||
| 32 | 2007-04-09 Alan Mackenzie <acm@muc.de> | 393 | 2007-04-09 Alan Mackenzie <acm@muc.de> |
| @@ -74,10 +435,10 @@ | |||
| 74 | 435 | ||
| 75 | * cus-start.el <scroll-preserve-screen-position>: Add choices. | 436 | * cus-start.el <scroll-preserve-screen-position>: Add choices. |
| 76 | 437 | ||
| 77 | 2007-04-08 Johan Bockg,Ae(Brd <bojohan+news@dd.chalmers.se> | 438 | 2007-04-08 Johan Bockg,Ae(Brd <bojohan@dd.chalmers.se> |
| 78 | 439 | ||
| 79 | * term/xterm.el (terminal-init-xterm): Fix key definitions. Add | 440 | * term/xterm.el (terminal-init-xterm): Fix key definitions. |
| 80 | binding for C-M-SPC. | 441 | Add binding for C-M-SPC. |
| 81 | 442 | ||
| 82 | 2007-04-08 Richard Stallman <rms@gnu.org> | 443 | 2007-04-08 Richard Stallman <rms@gnu.org> |
| 83 | 444 | ||
| @@ -142,8 +503,8 @@ | |||
| 142 | 503 | ||
| 143 | * menu-bar.el (menu-bar-tools-menu): Revert 2003-07-25 change. | 504 | * menu-bar.el (menu-bar-tools-menu): Revert 2003-07-25 change. |
| 144 | 505 | ||
| 145 | * desktop.el (desktop-create-buffer, desktop-save): Revert | 506 | * desktop.el (desktop-create-buffer, desktop-save): |
| 146 | 2004-11-12 change. | 507 | Revert 2004-11-12 change for lack of copyright papers. |
| 147 | 508 | ||
| 148 | * dired-x.el (dired-guess-shell-case-fold-search): Delete var. | 509 | * dired-x.el (dired-guess-shell-case-fold-search): Delete var. |
| 149 | (dired-guess-default): Respect case. | 510 | (dired-guess-default): Respect case. |
| @@ -432,7 +793,7 @@ | |||
| 432 | * textmodes/flyspell.el (flyspell-large-region): | 793 | * textmodes/flyspell.el (flyspell-large-region): |
| 433 | Use ispell-call-process-region. | 794 | Use ispell-call-process-region. |
| 434 | 795 | ||
| 435 | 2007-03-26 Johan Bockg,Ae(Brd <bojohan+sf@dd.chalmers.se> | 796 | 2007-03-26 Johan Bockg,Ae(Brd <bojohan@dd.chalmers.se> |
| 436 | 797 | ||
| 437 | * emacs-lisp/bytecomp.el (byte-compile-file-form-defmumble): | 798 | * emacs-lisp/bytecomp.el (byte-compile-file-form-defmumble): |
| 438 | Use prin1 instead of princ. | 799 | Use prin1 instead of princ. |
| @@ -568,6 +929,13 @@ | |||
| 568 | (number-of-diary-entries): Change :set to use diary-set-maybe-redraw. | 929 | (number-of-diary-entries): Change :set to use diary-set-maybe-redraw. |
| 569 | (diary-list-entries): Always run diary-mode. | 930 | (diary-list-entries): Always run diary-mode. |
| 570 | 931 | ||
| 932 | 2007-03-20 Kenichi Handa <handa@m17n.org> | ||
| 933 | |||
| 934 | * international/quail.el (quail-setup-completion-buf): Make the | ||
| 935 | completion buffer read-only. | ||
| 936 | (quail-completion): Adjusted for the above change. Leave the | ||
| 937 | modified flag nil. | ||
| 938 | |||
| 571 | 2007-03-20 David Kastrup <dak@gnu.org> | 939 | 2007-03-20 David Kastrup <dak@gnu.org> |
| 572 | 940 | ||
| 573 | * files.el (magic-mode-alist): Require literal "%!PS" string for | 941 | * files.el (magic-mode-alist): Require literal "%!PS" string for |
| @@ -5385,7 +5753,7 @@ | |||
| 5385 | 5753 | ||
| 5386 | * dired.el (dired-build-subdir-alist): Fix previous change. | 5754 | * dired.el (dired-build-subdir-alist): Fix previous change. |
| 5387 | 5755 | ||
| 5388 | 2006-10-01 Johan Bockg,Ae(Brd <bojohan+mail@dd.chalmers.se> | 5756 | 2006-10-01 Johan Bockg,Ae(Brd <bojohan@dd.chalmers.se> |
| 5389 | 5757 | ||
| 5390 | * simple.el (undo-elt-crosses-region): Fix the inequalities. | 5758 | * simple.el (undo-elt-crosses-region): Fix the inequalities. |
| 5391 | 5759 | ||
| @@ -21085,7 +21453,7 @@ | |||
| 21085 | 21453 | ||
| 21086 | * net/newsticker.el: Get rid of CVS keyword. | 21454 | * net/newsticker.el: Get rid of CVS keyword. |
| 21087 | 21455 | ||
| 21088 | 2005-09-19 Johan Bockg,Ae(Brd <bojohan+sf@dd.chalmers.se> | 21456 | 2005-09-19 Johan Bockg,Ae(Brd <bojohan@dd.chalmers.se> |
| 21089 | 21457 | ||
| 21090 | * dired-aux.el (dired-handle-overwrite): Don't use `format' here. | 21458 | * dired-aux.el (dired-handle-overwrite): Don't use `format' here. |
| 21091 | The prompt is formatted later. | 21459 | The prompt is formatted later. |
| @@ -30153,7 +30521,7 @@ | |||
| 30153 | (mail-directory-process defvar): Doc fix. | 30521 | (mail-directory-process defvar): Doc fix. |
| 30154 | (mail-names): Doc fix. | 30522 | (mail-names): Doc fix. |
| 30155 | 30523 | ||
| 30156 | 2005-03-25 Johan Bockg,Ae(Brd <bojohan+mail@dd.chalmers.se> (tiny change) | 30524 | 2005-03-25 Johan Bockg,Ae(Brd <bojohan@dd.chalmers.se> (tiny change) |
| 30157 | 30525 | ||
| 30158 | * textmodes/flyspell.el (mail-mode-flyspell-verify): Fix regexp syntax. | 30526 | * textmodes/flyspell.el (mail-mode-flyspell-verify): Fix regexp syntax. |
| 30159 | 30527 | ||
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index 07a48c761aa..657e2ed87d6 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el | |||
| @@ -723,6 +723,10 @@ archive. | |||
| 723 | (string-match "\\.[aA][rR][cC]$" | 723 | (string-match "\\.[aA][rR][cC]$" |
| 724 | (or buffer-file-name (buffer-name)))) | 724 | (or buffer-file-name (buffer-name)))) |
| 725 | 'arc) | 725 | 'arc) |
| 726 | ;; This pattern modelled on the BSD/GNU+Linux `file' command. | ||
| 727 | ;; Have seen capital "LHA's", and file has lower case "LHa's" too. | ||
| 728 | ;; Note this regexp is also in archive-exe-p. | ||
| 729 | ((looking-at "MZ\\(.\\|\n\\)\\{34\\}LH[aA]'s SFX ") 'lzh-exe) | ||
| 726 | (t (error "Buffer format not recognized"))))) | 730 | (t (error "Buffer format not recognized"))))) |
| 727 | ;; ------------------------------------------------------------------------- | 731 | ;; ------------------------------------------------------------------------- |
| 728 | (defun archive-summarize (&optional shut-up) | 732 | (defun archive-summarize (&optional shut-up) |
| @@ -1421,8 +1425,8 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1421 | ;; ------------------------------------------------------------------------- | 1425 | ;; ------------------------------------------------------------------------- |
| 1422 | ;; Section: Lzh Archives | 1426 | ;; Section: Lzh Archives |
| 1423 | 1427 | ||
| 1424 | (defun archive-lzh-summarize () | 1428 | (defun archive-lzh-summarize (&optional start) |
| 1425 | (let ((p 1) | 1429 | (let ((p (or start 1)) ;; 1 for .lzh, something further on for .exe |
| 1426 | (totalsize 0) | 1430 | (totalsize 0) |
| 1427 | (maxlen 8) | 1431 | (maxlen 8) |
| 1428 | files | 1432 | files |
| @@ -1438,7 +1442,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1438 | (time2 (archive-l-e (+ p 17) 2)) ;and UNIX format in level 2 header.) | 1442 | (time2 (archive-l-e (+ p 17) 2)) ;and UNIX format in level 2 header.) |
| 1439 | (hdrlvl (byte-after (+ p 20))) ;header level | 1443 | (hdrlvl (byte-after (+ p 20))) ;header level |
| 1440 | thsize ;total header size (base + extensions) | 1444 | thsize ;total header size (base + extensions) |
| 1441 | fnlen efnname fiddle ifnname width p2 | 1445 | fnlen efnname osid fiddle ifnname width p2 |
| 1442 | neh ;beginning of next extension header (level 1 and 2) | 1446 | neh ;beginning of next extension header (level 1 and 2) |
| 1443 | mode modestr uid gid text dir prname | 1447 | mode modestr uid gid text dir prname |
| 1444 | gname uname modtime moddate) | 1448 | gname uname modtime moddate) |
| @@ -1496,7 +1500,22 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1496 | (setq thsize (- neh p)))) | 1500 | (setq thsize (- neh p)))) |
| 1497 | (if (= hdrlvl 0) ;total header size | 1501 | (if (= hdrlvl 0) ;total header size |
| 1498 | (setq thsize hsize)) | 1502 | (setq thsize hsize)) |
| 1499 | (setq fiddle (if efnname (string= efnname (upcase efnname)))) | 1503 | ;; OS ID field not present in level 0 header, use code 0 "generic" |
| 1504 | ;; in that case as per lha program header.c get_header() | ||
| 1505 | (setq osid (cond ((= hdrlvl 0) 0) | ||
| 1506 | ((= hdrlvl 1) (char-after (+ p 22 fnlen 2))) | ||
| 1507 | ((= hdrlvl 2) (char-after (+ p 23))))) | ||
| 1508 | ;; Filename fiddling must follow the lha program, otherwise the name | ||
| 1509 | ;; passed to "lha pq" etc won't match (which for an extract silently | ||
| 1510 | ;; results in no output). As of version 1.14i it goes from the OS ID, | ||
| 1511 | ;; - For 'M' MSDOS: msdos_to_unix_filename() downcases always, and | ||
| 1512 | ;; converts "\" to "/". | ||
| 1513 | ;; - For 0 generic: generic_to_unix_filename() downcases if there's | ||
| 1514 | ;; no lower case already present, and converts "\" to "/". | ||
| 1515 | ;; - For 'm' MacOS: macos_to_unix_filename() changes "/" to ":" and | ||
| 1516 | ;; ":" to "/" | ||
| 1517 | (setq fiddle (cond ((= ?M osid) t) | ||
| 1518 | ((= 0 osid) (string= efnname (upcase efnname))))) | ||
| 1500 | (setq ifnname (if fiddle (downcase efnname) efnname)) | 1519 | (setq ifnname (if fiddle (downcase efnname) efnname)) |
| 1501 | (setq prname (if dir (concat dir ifnname) ifnname)) | 1520 | (setq prname (if dir (concat dir ifnname) ifnname)) |
| 1502 | (setq width (if prname (string-width prname) 0)) | 1521 | (setq width (if prname (string-width prname) 0)) |
| @@ -1625,6 +1644,34 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1625 | ;; This should work even though newmode will be dynamically accessed. | 1644 | ;; This should work even though newmode will be dynamically accessed. |
| 1626 | (lambda (old) (archive-calc-mode old newmode t)) | 1645 | (lambda (old) (archive-calc-mode old newmode t)) |
| 1627 | files "a unix-style mode" 8)) | 1646 | files "a unix-style mode" 8)) |
| 1647 | |||
| 1648 | ;; ------------------------------------------------------------------------- | ||
| 1649 | ;; Section: Lzh Self-Extracting .exe Archives | ||
| 1650 | ;; | ||
| 1651 | ;; No support for modifying these files. It looks like the lha for unix | ||
| 1652 | ;; program (as of version 1.14i) can't create or retain the DOS exe part. | ||
| 1653 | ;; If you do an "lha a" on a .exe for instance it renames and writes to a | ||
| 1654 | ;; plain .lzh. | ||
| 1655 | |||
| 1656 | (defun archive-lzh-exe-summarize () | ||
| 1657 | "Summarize the contents of an LZH self-extracting exe, for `archive-mode'." | ||
| 1658 | |||
| 1659 | ;; Skip the initial executable code part and apply archive-lzh-summarize | ||
| 1660 | ;; to the archive part proper. The "-lh5-" etc regexp here for the start | ||
| 1661 | ;; is the same as in archive-find-type. | ||
| 1662 | ;; | ||
| 1663 | ;; The lha program (version 1.14i) does this in skip_msdos_sfx1_code() by | ||
| 1664 | ;; a similar scan. It looks for "..-l..-" plus for level 0 or 1 a test of | ||
| 1665 | ;; the header checksum, or level 2 a test of the "attribute" and size. | ||
| 1666 | ;; | ||
| 1667 | (re-search-forward "..-l[hz][0-9ds]-" nil) | ||
| 1668 | (archive-lzh-summarize (match-beginning 0))) | ||
| 1669 | |||
| 1670 | ;; `archive-lzh-extract' runs "lha pq", and that works for .exe as well as | ||
| 1671 | ;; .lzh files | ||
| 1672 | (defalias 'archive-lzh-exe-extract 'archive-lzh-extract | ||
| 1673 | "Extract a member from an LZH self-extracting exe, for `archive-mode'.") | ||
| 1674 | |||
| 1628 | ;; ------------------------------------------------------------------------- | 1675 | ;; ------------------------------------------------------------------------- |
| 1629 | ;; Section: Zip Archives | 1676 | ;; Section: Zip Archives |
| 1630 | 1677 | ||
diff --git a/lisp/button.el b/lisp/button.el index 423aef5f78f..8c3681854e7 100644 --- a/lisp/button.el +++ b/lisp/button.el | |||
| @@ -52,8 +52,10 @@ | |||
| 52 | ;; Globals | 52 | ;; Globals |
| 53 | 53 | ||
| 54 | ;; Use color for the MS-DOS port because it doesn't support underline. | 54 | ;; Use color for the MS-DOS port because it doesn't support underline. |
| 55 | ;; Also for the linux console. | ||
| 55 | (defface button '((((type pc) (class color)) | 56 | (defface button '((((type pc) (class color)) |
| 56 | (:foreground "lightblue")) | 57 | (:foreground "lightblue")) |
| 58 | (((type tty)) (:inherit link)) | ||
| 57 | (t :underline t)) | 59 | (t :underline t)) |
| 58 | "Default face used for buttons." | 60 | "Default face used for buttons." |
| 59 | :group 'basic-faces) | 61 | :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: | |||
| 17 | daveg@synaptics.com, uunet!synaptx!daveg | 17 | daveg@synaptics.com, uunet!synaptx!daveg |
| 18 | 18 | ||
| 19 | Currently maintained by: | 19 | Currently maintained by: |
| 20 | Jay Belanger <belanger@truman.edu> | 20 | Jay Belanger <jay.p.belanger@gmail.com> |
| 21 | 21 | ||
| 22 | From the introduction to the manual: | 22 | From the introduction to the manual: |
| 23 | 23 | ||
| @@ -59,7 +59,7 @@ From the introduction to the manual: | |||
| 59 | Calc is written entirely in Emacs Lisp, for maximum portability. | 59 | Calc is written entirely in Emacs Lisp, for maximum portability. |
| 60 | 60 | ||
| 61 | I am anxious to hear about your experiences using Calc. Send mail to | 61 | I am anxious to hear about your experiences using Calc. Send mail to |
| 62 | "belanger@truman.edu". A bug report is most useful if you include the | 62 | "jay.p.belanger@gmail.com". A bug report is most useful if you include the |
| 63 | exact input and output that occurred, any modes in effect (such as the | 63 | exact input and output that occurred, any modes in effect (such as the |
| 64 | current precision), and so on. If you find Calc is difficult to operate | 64 | current precision), and so on. If you find Calc is difficult to operate |
| 65 | in any way, or if you have other suggestions, don't hesitate to let me | 65 | 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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Dave Gillespie <daveg@synaptics.com> | 6 | ;; Author: Dave Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 75e1c83df03..4ca5662afdc 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | ;; Keywords: convenience, extensions | 8 | ;; Keywords: convenience, extensions |
| 9 | ;; Version: 2.1 | 9 | ;; Version: 2.1 |
| 10 | 10 | ||
| @@ -401,7 +401,7 @@ This is not required to be present for user-written mode annotations." | |||
| 401 | :group 'calc | 401 | :group 'calc |
| 402 | :type '(choice (string) (sexp))) | 402 | :type '(choice (string) (sexp))) |
| 403 | 403 | ||
| 404 | (defvar calc-bug-address "belanger@truman.edu" | 404 | (defvar calc-bug-address "jay.p.belanger@gmail.com" |
| 405 | "Address of the maintainer of Calc, for use by `report-calc-bug'.") | 405 | "Address of the maintainer of Calc, for use by `report-calc-bug'.") |
| 406 | 406 | ||
| 407 | (defvar calc-scan-for-dels t | 407 | (defvar calc-scan-for-dels t |
| @@ -1148,6 +1148,11 @@ If nil, selections displayed but ignored.") | |||
| 1148 | 1148 | ||
| 1149 | (defvar calc-alg-map) ; Defined in calc-ext.el | 1149 | (defvar calc-alg-map) ; Defined in calc-ext.el |
| 1150 | 1150 | ||
| 1151 | (defun calc-version () | ||
| 1152 | "Return version of this version of Calc." | ||
| 1153 | (interactive) | ||
| 1154 | (message (concat "Calc version " calc-version))) | ||
| 1155 | |||
| 1151 | (defun calc-mode () | 1156 | (defun calc-mode () |
| 1152 | "Calculator major mode. | 1157 | "Calculator major mode. |
| 1153 | 1158 | ||
| @@ -1258,8 +1263,7 @@ commands given here will actually operate on the *Calculator* stack." | |||
| 1258 | (set (make-local-variable 'calc-main-buffer) buf)) | 1263 | (set (make-local-variable 'calc-main-buffer) buf)) |
| 1259 | (when (= (buffer-size) 0) | 1264 | (when (= (buffer-size) 0) |
| 1260 | (let ((buffer-read-only nil)) | 1265 | (let ((buffer-read-only nil)) |
| 1261 | (insert (propertize (concat "Emacs Calculator v" calc-version | 1266 | (insert (propertize (concat "Emacs Calculator Trail\n") |
| 1262 | " by Dave Gillespie\n") | ||
| 1263 | 'font-lock-face 'italic)))) | 1267 | 'font-lock-face 'italic)))) |
| 1264 | (run-mode-hooks 'calc-trail-mode-hook)) | 1268 | (run-mode-hooks 'calc-trail-mode-hook)) |
| 1265 | 1269 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
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 @@ | |||
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David Gillespie <daveg@synaptics.com> | 6 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 7 | ;; Maintainer: Jay Belanger <belanger@truman.edu> | 7 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el index 82fa0e66dbf..02865c994e3 100644 --- a/lisp/calendar/appt.el +++ b/lisp/calendar/appt.el | |||
| @@ -233,8 +233,8 @@ The variable `appt-audible' controls the audible reminder." | |||
| 233 | ;; vars appt-msg-window and appt-visible are dropped. | 233 | ;; vars appt-msg-window and appt-visible are dropped. |
| 234 | (let ((appt-display-format | 234 | (let ((appt-display-format |
| 235 | (if (eq appt-display-format 'ignore) | 235 | (if (eq appt-display-format 'ignore) |
| 236 | (cond (appt-msg-window 'window) | 236 | (cond (appt-msg-window 'window) |
| 237 | (appt-visible 'echo)) | 237 | (appt-visible 'echo)) |
| 238 | appt-display-format))) | 238 | appt-display-format))) |
| 239 | (cond ((eq appt-display-format 'window) | 239 | (cond ((eq appt-display-format 'window) |
| 240 | (funcall appt-disp-window-function | 240 | (funcall appt-disp-window-function |
| @@ -457,7 +457,9 @@ NEW-TIME is a string giving the date." | |||
| 457 | (same-window-p (buffer-name appt-disp-buf))) | 457 | (same-window-p (buffer-name appt-disp-buf))) |
| 458 | ;; By default, split the bottom window and use the lower part. | 458 | ;; By default, split the bottom window and use the lower part. |
| 459 | (appt-select-lowest-window) | 459 | (appt-select-lowest-window) |
| 460 | (select-window (split-window))) | 460 | ;; Split the window, unless it's too small to do so. |
| 461 | (when (>= (window-height) (* 2 window-min-height)) | ||
| 462 | (select-window (split-window)))) | ||
| 461 | (switch-to-buffer appt-disp-buf)) | 463 | (switch-to-buffer appt-disp-buf)) |
| 462 | (calendar-set-mode-line | 464 | (calendar-set-mode-line |
| 463 | (format " Appointment in %s minutes. %s " min-to-app new-time)) | 465 | (format " Appointment in %s minutes. %s " min-to-app new-time)) |
diff --git a/lisp/calendar/cal-china.el b/lisp/calendar/cal-china.el index a838141db1c..7f6646dda64 100644 --- a/lisp/calendar/cal-china.el +++ b/lisp/calendar/cal-china.el | |||
| @@ -43,12 +43,6 @@ | |||
| 43 | ;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold | 43 | ;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold |
| 44 | ;; and Nachum Dershowitz, Cambridge University Press (2001). | 44 | ;; and Nachum Dershowitz, Cambridge University Press (2001). |
| 45 | 45 | ||
| 46 | ;; Comments, corrections, and improvements should be sent to | ||
| 47 | ;; Edward M. Reingold Department of Computer Science | ||
| 48 | ;; (217) 333-6733 University of Illinois at Urbana-Champaign | ||
| 49 | ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue | ||
| 50 | ;; Urbana, Illinois 61801 | ||
| 51 | |||
| 52 | ;;; Code: | 46 | ;;; Code: |
| 53 | 47 | ||
| 54 | (defvar date) | 48 | (defvar date) |
diff --git a/lisp/calendar/cal-coptic.el b/lisp/calendar/cal-coptic.el index 23de17a16a8..b5cf96949c6 100644 --- a/lisp/calendar/cal-coptic.el +++ b/lisp/calendar/cal-coptic.el | |||
| @@ -34,12 +34,6 @@ | |||
| 34 | ;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold | 34 | ;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold |
| 35 | ;; and Nachum Dershowitz, Cambridge University Press (2001). | 35 | ;; and Nachum Dershowitz, Cambridge University Press (2001). |
| 36 | 36 | ||
| 37 | ;; Comments, corrections, and improvements should be sent to | ||
| 38 | ;; Edward M. Reingold Department of Computer Science | ||
| 39 | ;; (217) 333-6733 University of Illinois at Urbana-Champaign | ||
| 40 | ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue | ||
| 41 | ;; Urbana, Illinois 61801 | ||
| 42 | |||
| 43 | ;;; Code: | 37 | ;;; Code: |
| 44 | 38 | ||
| 45 | (defvar date) | 39 | (defvar date) |
diff --git a/lisp/calendar/cal-dst.el b/lisp/calendar/cal-dst.el index 3aea69b8ccf..6159d7e9dc1 100644 --- a/lisp/calendar/cal-dst.el +++ b/lisp/calendar/cal-dst.el | |||
| @@ -31,12 +31,6 @@ | |||
| 31 | ;; This collection of functions implements the features of calendar.el and | 31 | ;; This collection of functions implements the features of calendar.el and |
| 32 | ;; holiday.el that deal with daylight saving time. | 32 | ;; holiday.el that deal with daylight saving time. |
| 33 | 33 | ||
| 34 | ;; Comments, corrections, and improvements should be sent to | ||
| 35 | ;; Edward M. Reingold Department of Computer Science | ||
| 36 | ;; (217) 333-6733 University of Illinois at Urbana-Champaign | ||
| 37 | ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue | ||
| 38 | ;; Urbana, Illinois 61801 | ||
| 39 | |||
| 40 | ;;; Code: | 34 | ;;; Code: |
| 41 | 35 | ||
| 42 | (require 'calendar) | 36 | (require 'calendar) |
| @@ -266,12 +260,20 @@ Returns a list (YEAR START END), where START and END are | |||
| 266 | expressions that when evaluated return the start and end dates, | 260 | expressions that when evaluated return the start and end dates, |
| 267 | respectively. This function first attempts to use pre-calculated | 261 | respectively. This function first attempts to use pre-calculated |
| 268 | data from `calendar-dst-transition-cache', otherwise it calls | 262 | data from `calendar-dst-transition-cache', otherwise it calls |
| 269 | `calendar-dst-find-data' (and adds the results to the cache)." | 263 | `calendar-dst-find-data' (and adds the results to the cache). |
| 264 | If dates in YEAR cannot be handled by `encode-time' (e.g. if they | ||
| 265 | are too large to be represented as a lisp integer), then rather | ||
| 266 | than an error this function returns the result appropriate for | ||
| 267 | the current year." | ||
| 270 | (let ((e (assoc year calendar-dst-transition-cache)) | 268 | (let ((e (assoc year calendar-dst-transition-cache)) |
| 271 | f) | 269 | f) |
| 272 | (or e | 270 | (or e |
| 273 | (progn | 271 | (progn |
| 274 | (setq e (calendar-dst-find-data (encode-time 1 0 0 1 1 year)) | 272 | (setq e (calendar-dst-find-data |
| 273 | (condition-case nil | ||
| 274 | (encode-time 1 0 0 1 1 year) | ||
| 275 | (error | ||
| 276 | (encode-time 1 0 0 1 1 (nth 5 (decode-time)))))) | ||
| 275 | f (nth 4 e) | 277 | f (nth 4 e) |
| 276 | e (list year f (nth 5 e)) | 278 | e (list year f (nth 5 e)) |
| 277 | calendar-dst-transition-cache | 279 | calendar-dst-transition-cache |
diff --git a/lisp/calendar/cal-french.el b/lisp/calendar/cal-french.el index 99af7042472..439dbd34632 100644 --- a/lisp/calendar/cal-french.el +++ b/lisp/calendar/cal-french.el | |||
| @@ -37,12 +37,6 @@ | |||
| 37 | ;; E. M. Reingold, N. Dershowitz, and S. M. Clamen, Software--Practice and | 37 | ;; E. M. Reingold, N. Dershowitz, and S. M. Clamen, Software--Practice and |
| 38 | ;; Experience, Volume 23, Number 4 (April, 1993), pages 383-404. | 38 | ;; Experience, Volume 23, Number 4 (April, 1993), pages 383-404. |
| 39 | 39 | ||
| 40 | ;; Comments, corrections, and improvements should be sent to | ||
| 41 | ;; Edward M. Reingold Department of Computer Science | ||
| 42 | ;; (217) 333-6733 University of Illinois at Urbana-Champaign | ||
| 43 | ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue | ||
| 44 | ;; Urbana, Illinois 61801 | ||
| 45 | |||
| 46 | ;;; Code: | 40 | ;;; Code: |
| 47 | 41 | ||
| 48 | (defvar date) | 42 | (defvar date) |
diff --git a/lisp/calendar/cal-hebrew.el b/lisp/calendar/cal-hebrew.el index a61bea8eacf..9f32d9df471 100644 --- a/lisp/calendar/cal-hebrew.el +++ b/lisp/calendar/cal-hebrew.el | |||
| @@ -35,12 +35,6 @@ | |||
| 35 | ;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold | 35 | ;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold |
| 36 | ;; and Nachum Dershowitz, Cambridge University Press (2001). | 36 | ;; and Nachum Dershowitz, Cambridge University Press (2001). |
| 37 | 37 | ||
| 38 | ;; Comments, corrections, and improvements should be sent to | ||
| 39 | ;; Edward M. Reingold Department of Computer Science | ||
| 40 | ;; (217) 333-6733 University of Illinois at Urbana-Champaign | ||
| 41 | ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue | ||
| 42 | ;; Urbana, Illinois 61801 | ||
| 43 | |||
| 44 | ;;; Code: | 38 | ;;; Code: |
| 45 | 39 | ||
| 46 | (defvar date) | 40 | (defvar date) |
diff --git a/lisp/calendar/cal-islam.el b/lisp/calendar/cal-islam.el index 28faed4d397..57c0f9de65e 100644 --- a/lisp/calendar/cal-islam.el +++ b/lisp/calendar/cal-islam.el | |||
| @@ -34,12 +34,6 @@ | |||
| 34 | ;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold | 34 | ;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold |
| 35 | ;; and Nachum Dershowitz, Cambridge University Press (2001). | 35 | ;; and Nachum Dershowitz, Cambridge University Press (2001). |
| 36 | 36 | ||
| 37 | ;; Comments, corrections, and improvements should be sent to | ||
| 38 | ;; Edward M. Reingold Department of Computer Science | ||
| 39 | ;; (217) 333-6733 University of Illinois at Urbana-Champaign | ||
| 40 | ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue | ||
| 41 | ;; Urbana, Illinois 61801 | ||
| 42 | |||
| 43 | ;;; Code: | 37 | ;;; Code: |
| 44 | 38 | ||
| 45 | (defvar date) | 39 | (defvar date) |
diff --git a/lisp/calendar/cal-iso.el b/lisp/calendar/cal-iso.el index 93b39cd4d15..052087e2558 100644 --- a/lisp/calendar/cal-iso.el +++ b/lisp/calendar/cal-iso.el | |||
| @@ -34,12 +34,6 @@ | |||
| 34 | ;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold | 34 | ;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold |
| 35 | ;; and Nachum Dershowitz, Cambridge University Press (2001). | 35 | ;; and Nachum Dershowitz, Cambridge University Press (2001). |
| 36 | 36 | ||
| 37 | ;; Comments, corrections, and improvements should be sent to | ||
| 38 | ;; Edward M. Reingold Department of Computer Science | ||
| 39 | ;; (217) 333-6733 University of Illinois at Urbana-Champaign | ||
| 40 | ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue | ||
| 41 | ;; Urbana, Illinois 61801 | ||
| 42 | |||
| 43 | ;;; Code: | 37 | ;;; Code: |
| 44 | 38 | ||
| 45 | (defvar date) | 39 | (defvar date) |
diff --git a/lisp/calendar/cal-julian.el b/lisp/calendar/cal-julian.el index 768e57bbab5..ff6a3f72e1b 100644 --- a/lisp/calendar/cal-julian.el +++ b/lisp/calendar/cal-julian.el | |||
| @@ -34,12 +34,6 @@ | |||
| 34 | ;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold | 34 | ;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold |
| 35 | ;; and Nachum Dershowitz, Cambridge University Press (2001). | 35 | ;; and Nachum Dershowitz, Cambridge University Press (2001). |
| 36 | 36 | ||
| 37 | ;; Comments, corrections, and improvements should be sent to | ||
| 38 | ;; Edward M. Reingold Department of Computer Science | ||
| 39 | ;; (217) 333-6733 University of Illinois at Urbana-Champaign | ||
| 40 | ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue | ||
| 41 | ;; Urbana, Illinois 61801 | ||
| 42 | |||
| 43 | ;;; Code: | 37 | ;;; Code: |
| 44 | 38 | ||
| 45 | (defvar date) | 39 | (defvar date) |
diff --git a/lisp/calendar/cal-mayan.el b/lisp/calendar/cal-mayan.el index 20703cb85b6..2cb6d31022e 100644 --- a/lisp/calendar/cal-mayan.el +++ b/lisp/calendar/cal-mayan.el | |||
| @@ -43,8 +43,6 @@ | |||
| 43 | ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue | 43 | ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue |
| 44 | ;; Urbana, Illinois 61801 | 44 | ;; Urbana, Illinois 61801 |
| 45 | 45 | ||
| 46 | ;; Comments, improvements, and bug reports should be sent to Reingold. | ||
| 47 | |||
| 48 | ;; Technical details of the Mayan calendrical calculations can be found in | 46 | ;; Technical details of the Mayan calendrical calculations can be found in |
| 49 | ;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold | 47 | ;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold |
| 50 | ;; and Nachum Dershowitz, Cambridge University Press (2001), and in | 48 | ;; and Nachum Dershowitz, Cambridge University Press (2001), and in |
diff --git a/lisp/calendar/cal-menu.el b/lisp/calendar/cal-menu.el index 1320f778cc6..25929976dbd 100644 --- a/lisp/calendar/cal-menu.el +++ b/lisp/calendar/cal-menu.el | |||
| @@ -31,12 +31,6 @@ | |||
| 31 | ;; This collection of functions implements menu bar and popup menu support for | 31 | ;; This collection of functions implements menu bar and popup menu support for |
| 32 | ;; calendar.el. | 32 | ;; calendar.el. |
| 33 | 33 | ||
| 34 | ;; Comments, corrections, and improvements should be sent to | ||
| 35 | ;; Edward M. Reingold Department of Computer Science | ||
| 36 | ;; (217) 333-6733 University of Illinois at Urbana-Champaign | ||
| 37 | ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue | ||
| 38 | ;; Urbana, Illinois 61801 | ||
| 39 | |||
| 40 | ;;; Code: | 34 | ;;; Code: |
| 41 | 35 | ||
| 42 | (defvar displayed-month) | 36 | (defvar displayed-month) |
diff --git a/lisp/calendar/cal-move.el b/lisp/calendar/cal-move.el index b12289c7456..3a08b98bf00 100644 --- a/lisp/calendar/cal-move.el +++ b/lisp/calendar/cal-move.el | |||
| @@ -30,12 +30,6 @@ | |||
| 30 | ;; This collection of functions implements movement in the calendar for | 30 | ;; This collection of functions implements movement in the calendar for |
| 31 | ;; calendar.el. | 31 | ;; calendar.el. |
| 32 | 32 | ||
| 33 | ;; Comments, corrections, and improvements should be sent to | ||
| 34 | ;; Edward M. Reingold Department of Computer Science | ||
| 35 | ;; (217) 333-6733 University of Illinois at Urbana-Champaign | ||
| 36 | ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue | ||
| 37 | ;; Urbana, Illinois 61801 | ||
| 38 | |||
| 39 | ;;; Code: | 33 | ;;; Code: |
| 40 | 34 | ||
| 41 | (defvar displayed-month) | 35 | (defvar displayed-month) |
diff --git a/lisp/calendar/cal-persia.el b/lisp/calendar/cal-persia.el index 6055de121af..a37f9c1f27e 100644 --- a/lisp/calendar/cal-persia.el +++ b/lisp/calendar/cal-persia.el | |||
| @@ -30,16 +30,6 @@ | |||
| 30 | ;; This collection of functions implements the features of calendar.el and | 30 | ;; This collection of functions implements the features of calendar.el and |
| 31 | ;; diary.el that deal with the Persian calendar. | 31 | ;; diary.el that deal with the Persian calendar. |
| 32 | 32 | ||
| 33 | ;; Technical details of all the calendrical calculations can be found in | ||
| 34 | ;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold | ||
| 35 | ;; and Nachum Dershowitz, Cambridge University Press (2001). | ||
| 36 | |||
| 37 | ;; Comments, corrections, and improvements should be sent to | ||
| 38 | ;; Edward M. Reingold Department of Computer Science | ||
| 39 | ;; (217) 333-6733 University of Illinois at Urbana-Champaign | ||
| 40 | ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue | ||
| 41 | ;; Urbana, Illinois 61801 | ||
| 42 | |||
| 43 | ;;; Code: | 33 | ;;; Code: |
| 44 | 34 | ||
| 45 | (defvar date) | 35 | (defvar date) |
diff --git a/lisp/calendar/cal-x.el b/lisp/calendar/cal-x.el index b7f1748ff34..5f2c89e82c5 100644 --- a/lisp/calendar/cal-x.el +++ b/lisp/calendar/cal-x.el | |||
| @@ -31,12 +31,6 @@ | |||
| 31 | ;; This collection of functions implements dedicated frames in X for | 31 | ;; This collection of functions implements dedicated frames in X for |
| 32 | ;; calendar.el. | 32 | ;; calendar.el. |
| 33 | 33 | ||
| 34 | ;; Comments, corrections, and improvements should be sent to | ||
| 35 | ;; Edward M. Reingold Department of Computer Science | ||
| 36 | ;; (217) 333-6733 University of Illinois at Urbana-Champaign | ||
| 37 | ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue | ||
| 38 | ;; Urbana, Illinois 61801 | ||
| 39 | |||
| 40 | ;;; Code: | 34 | ;;; Code: |
| 41 | 35 | ||
| 42 | (require 'calendar) | 36 | (require 'calendar) |
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 78f0ad115ec..03f9a95fe37 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el | |||
| @@ -90,12 +90,6 @@ | |||
| 90 | ;; reingold@cs.uiuc.edu with the SUBJECT "send-paper-cal" (no quotes) and | 90 | ;; reingold@cs.uiuc.edu with the SUBJECT "send-paper-cal" (no quotes) and |
| 91 | ;; the message BODY containing your mailing address (snail). | 91 | ;; the message BODY containing your mailing address (snail). |
| 92 | 92 | ||
| 93 | ;; Comments, corrections, and improvements should be sent to | ||
| 94 | ;; Edward M. Reingold Department of Computer Science | ||
| 95 | ;; (217) 333-6733 University of Illinois at Urbana-Champaign | ||
| 96 | ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue | ||
| 97 | ;; Urbana, Illinois 61801 | ||
| 98 | |||
| 99 | ;;; Code: | 93 | ;;; Code: |
| 100 | 94 | ||
| 101 | (defvar displayed-month) | 95 | (defvar displayed-month) |
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 2adec8750c3..ee93b60eb98 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el | |||
| @@ -29,12 +29,6 @@ | |||
| 29 | ;; This collection of functions implements the diary features as described | 29 | ;; This collection of functions implements the diary features as described |
| 30 | ;; in calendar.el. | 30 | ;; in calendar.el. |
| 31 | 31 | ||
| 32 | ;; Comments, corrections, and improvements should be sent to | ||
| 33 | ;; Edward M. Reingold Department of Computer Science | ||
| 34 | ;; (217) 333-6733 University of Illinois at Urbana-Champaign | ||
| 35 | ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue | ||
| 36 | ;; Urbana, Illinois 61801 | ||
| 37 | |||
| 38 | ;;; Code: | 32 | ;;; Code: |
| 39 | 33 | ||
| 40 | (require 'calendar) | 34 | (require 'calendar) |
| @@ -282,6 +276,7 @@ The format of the header is specified by `diary-header-line-format'." | |||
| 282 | :group 'diary | 276 | :group 'diary |
| 283 | :type 'boolean | 277 | :type 'boolean |
| 284 | :initialize 'custom-initialize-default | 278 | :initialize 'custom-initialize-default |
| 279 | ;; FIXME overkill. | ||
| 285 | :set 'diary-set-maybe-redraw | 280 | :set 'diary-set-maybe-redraw |
| 286 | :version "22.1") | 281 | :version "22.1") |
| 287 | 282 | ||
| @@ -298,6 +293,9 @@ before edit/copy" | |||
| 298 | Only used if `diary-header-line-flag' is non-nil." | 293 | Only used if `diary-header-line-flag' is non-nil." |
| 299 | :group 'diary | 294 | :group 'diary |
| 300 | :type 'sexp | 295 | :type 'sexp |
| 296 | :initialize 'custom-initialize-default | ||
| 297 | ;; FIXME overkill. | ||
| 298 | :set 'diary-set-maybe-redraw | ||
| 301 | :version "22.1") | 299 | :version "22.1") |
| 302 | 300 | ||
| 303 | (defvar diary-saved-point) ; internal | 301 | (defvar diary-saved-point) ; internal |
| @@ -440,10 +438,17 @@ If LIST-ONLY is non-nil don't modify or display the buffer, only return a list." | |||
| 440 | (or (verify-visited-file-modtime diary-buffer) | 438 | (or (verify-visited-file-modtime diary-buffer) |
| 441 | (revert-buffer t t)))) | 439 | (revert-buffer t t)))) |
| 442 | ;; Setup things like the header-line-format and invisibility-spec. | 440 | ;; Setup things like the header-line-format and invisibility-spec. |
| 443 | ;; This used to only run if the major-mode was default-major-mode, | 441 | (if (eq major-mode default-major-mode) |
| 444 | ;; but that meant eg changes to header-line-format did not | 442 | (diary-mode) |
| 445 | ;; take effect from one diary invocation to the next. | 443 | ;; This kludge is to make customizations to |
| 446 | (diary-mode) | 444 | ;; diary-header-line-flag after diary has been displayed |
| 445 | ;; take effect. Unconditionally calling (diary-mode) | ||
| 446 | ;; clobbers file local variables. | ||
| 447 | ;; http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-03/msg00363.html | ||
| 448 | ;; http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-04/msg00404.html | ||
| 449 | (if (eq major-mode 'diary-mode) | ||
| 450 | (setq header-line-format (and diary-header-line-flag | ||
| 451 | diary-header-line-format)))) | ||
| 447 | ;; d-s-p is passed to the diary display function. | 452 | ;; d-s-p is passed to the diary display function. |
| 448 | (let ((diary-saved-point (point))) | 453 | (let ((diary-saved-point (point))) |
| 449 | (save-excursion | 454 | (save-excursion |
diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el index 6f53a47221a..fc6e6315916 100644 --- a/lisp/calendar/holidays.el +++ b/lisp/calendar/holidays.el | |||
| @@ -45,12 +45,6 @@ | |||
| 45 | ;; reingold@cs.uiuc.edu with the SUBJECT "send-paper-cal" (no quotes) and | 45 | ;; reingold@cs.uiuc.edu with the SUBJECT "send-paper-cal" (no quotes) and |
| 46 | ;; the message BODY containing your mailing address (snail). | 46 | ;; the message BODY containing your mailing address (snail). |
| 47 | 47 | ||
| 48 | ;; Comments, corrections, and improvements should be sent to | ||
| 49 | ;; Edward M. Reingold Department of Computer Science | ||
| 50 | ;; (217) 333-6733 University of Illinois at Urbana-Champaign | ||
| 51 | ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue | ||
| 52 | ;; Urbana, Illinois 61801 | ||
| 53 | |||
| 54 | ;;; Code: | 48 | ;;; Code: |
| 55 | 49 | ||
| 56 | (defvar displayed-month) | 50 | (defvar displayed-month) |
diff --git a/lisp/calendar/lunar.el b/lisp/calendar/lunar.el index 33da7cef8e0..8aa062d69c3 100644 --- a/lisp/calendar/lunar.el +++ b/lisp/calendar/lunar.el | |||
| @@ -43,12 +43,6 @@ | |||
| 43 | ;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold | 43 | ;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold |
| 44 | ;; and Nachum Dershowitz, Cambridge University Press (2001). | 44 | ;; and Nachum Dershowitz, Cambridge University Press (2001). |
| 45 | 45 | ||
| 46 | ;; Comments, corrections, and improvements should be sent to | ||
| 47 | ;; Edward M. Reingold Department of Computer Science | ||
| 48 | ;; (217) 333-6733 University of Illinois at Urbana-Champaign | ||
| 49 | ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue | ||
| 50 | ;; Urbana, Illinois 61801 | ||
| 51 | |||
| 52 | ;;; Code: | 46 | ;;; Code: |
| 53 | 47 | ||
| 54 | (defvar date) | 48 | (defvar date) |
diff --git a/lisp/calendar/parse-time.el b/lisp/calendar/parse-time.el index 4a786da7726..0913bc92160 100644 --- a/lisp/calendar/parse-time.el +++ b/lisp/calendar/parse-time.el | |||
| @@ -66,7 +66,8 @@ | |||
| 66 | (aref parse-time-digits char)) | 66 | (aref parse-time-digits char)) |
| 67 | 67 | ||
| 68 | (defsubst parse-time-string-chars (char) | 68 | (defsubst parse-time-string-chars (char) |
| 69 | (aref parse-time-syntax char)) | 69 | (and (< char (length parse-time-syntax)) |
| 70 | (aref parse-time-syntax char))) | ||
| 70 | 71 | ||
| 71 | (put 'parse-error 'error-conditions '(parse-error error)) | 72 | (put 'parse-error 'error-conditions '(parse-error error)) |
| 72 | (put 'parse-error 'error-message "Parsing error") | 73 | (put 'parse-error 'error-message "Parsing error") |
diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el index c4a8352a8d8..4281c0e1307 100644 --- a/lisp/calendar/solar.el +++ b/lisp/calendar/solar.el | |||
| @@ -53,12 +53,6 @@ | |||
| 53 | ;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold | 53 | ;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold |
| 54 | ;; and Nachum Dershowitz, Cambridge University Press (2001). | 54 | ;; and Nachum Dershowitz, Cambridge University Press (2001). |
| 55 | 55 | ||
| 56 | ;; Comments, corrections, and improvements should be sent to | ||
| 57 | ;; Edward M. Reingold Department of Computer Science | ||
| 58 | ;; (217) 333-6733 University of Illinois at Urbana-Champaign | ||
| 59 | ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue | ||
| 60 | ;; Urbana, Illinois 61801 | ||
| 61 | |||
| 62 | ;;; Code: | 56 | ;;; Code: |
| 63 | 57 | ||
| 64 | (defvar date) | 58 | (defvar date) |
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index 9449c84cb2a..fc222c2d839 100644 --- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el | |||
| @@ -205,11 +205,11 @@ | |||
| 205 | ;; by the binary insertion algorithm. However, you may not | 205 | ;; by the binary insertion algorithm. However, you may not |
| 206 | ;; really have a need for such accurate priorities amongst your | 206 | ;; really have a need for such accurate priorities amongst your |
| 207 | ;; TODO items. If you now think about the binary insertion | 207 | ;; TODO items. If you now think about the binary insertion |
| 208 | ;; halfing the size of the window each time, then the threshhold | 208 | ;; halving the size of the window each time, then the threshold |
| 209 | ;; is the window size at which it will stop. If you set the | 209 | ;; is the window size at which it will stop. If you set the |
| 210 | ;; threshhold to zero, the upper and lower bound will coincide at | 210 | ;; threshold to zero, the upper and lower bound will coincide at |
| 211 | ;; the end of the loop and you will insert your item just before | 211 | ;; the end of the loop and you will insert your item just before |
| 212 | ;; that point. If you set the threshhold to, e.g. 8, it will stop | 212 | ;; that point. If you set the threshold to, e.g. 8, it will stop |
| 213 | ;; as soon as the window size drops below that amount and will | 213 | ;; as soon as the window size drops below that amount and will |
| 214 | ;; insert the item in the approximate centre of that window. I | 214 | ;; insert the item in the approximate centre of that window. I |
| 215 | ;; got the idea for this feature after reading a very helpful | 215 | ;; got the idea for this feature after reading a very helpful |
| @@ -231,7 +231,7 @@ | |||
| 231 | ;; an event (unless marked by &) | 231 | ;; an event (unless marked by &) |
| 232 | ;; o The optional COUNT variable of todo-forward-item should be | 232 | ;; o The optional COUNT variable of todo-forward-item should be |
| 233 | ;; applied to the other functions performing similar tasks | 233 | ;; applied to the other functions performing similar tasks |
| 234 | ;; o Modularization could be done for repeaded elements of | 234 | ;; o Modularization could be done for repeated elements of |
| 235 | ;; the code, like the completing-read lines of code. | 235 | ;; the code, like the completing-read lines of code. |
| 236 | ;; o license / version function | 236 | ;; o license / version function |
| 237 | ;; o export to diary file | 237 | ;; o export to diary file |
| @@ -241,7 +241,7 @@ | |||
| 241 | ;; outline mode) | 241 | ;; outline mode) |
| 242 | ;; o rewrite complete package to store data as lisp objects | 242 | ;; o rewrite complete package to store data as lisp objects |
| 243 | ;; and have display modes for display, for diary export, | 243 | ;; and have display modes for display, for diary export, |
| 244 | ;; etc. (Richard Stallman pointed out this is a bad idea) | 244 | ;; etc. (Richard Stallman pointed out this is a bad idea) |
| 245 | ;; o so base todo-mode.el on generic-mode.el instead | 245 | ;; o so base todo-mode.el on generic-mode.el instead |
| 246 | ;; | 246 | ;; |
| 247 | ;; History and Gossip | 247 | ;; History and Gossip |
| @@ -254,7 +254,7 @@ | |||
| 254 | ;; things to my parents' address! | 254 | ;; things to my parents' address! |
| 255 | ;; | 255 | ;; |
| 256 | ;; Oliver Seidel | 256 | ;; Oliver Seidel |
| 257 | ;; (Lessingstr. 8, 65760 Eschborn, Federal Republic of Germany) | 257 | ;; (Lessingstr. 8, 65760 Eschborn, Federal Republic of Germany) |
| 258 | 258 | ||
| 259 | ;;; Code: | 259 | ;;; Code: |
| 260 | 260 | ||
| @@ -280,7 +280,7 @@ in your diary file to include your todo list file as part of your | |||
| 280 | diary. With the default value \"*/*\" the diary displays each entry | 280 | diary. With the default value \"*/*\" the diary displays each entry |
| 281 | every day and it may also be marked on every day of the calendar. | 281 | every day and it may also be marked on every day of the calendar. |
| 282 | Using \"&%%(equal (calendar-current-date) date)\" instead will only | 282 | Using \"&%%(equal (calendar-current-date) date)\" instead will only |
| 283 | show and mark todo entreis for today, but may slow down processing of | 283 | show and mark todo entries for today, but may slow down processing of |
| 284 | the diary file somewhat." | 284 | the diary file somewhat." |
| 285 | :type 'string | 285 | :type 'string |
| 286 | :group 'todo) | 286 | :group 'todo) |
| @@ -306,11 +306,11 @@ the diary file somewhat." | |||
| 306 | If you have 8 items in your TODO list, then you may get asked 4 | 306 | If you have 8 items in your TODO list, then you may get asked 4 |
| 307 | questions by the binary insertion algorithm. However, you may not | 307 | questions by the binary insertion algorithm. However, you may not |
| 308 | really have a need for such accurate priorities amongst your TODO | 308 | really have a need for such accurate priorities amongst your TODO |
| 309 | items. If you now think about the binary insertion halfing the size | 309 | items. If you now think about the binary insertion halving the size |
| 310 | of the window each time, then the threshhold is the window size at | 310 | of the window each time, then the threshold is the window size at |
| 311 | which it will stop. If you set the threshhold to zero, the upper and | 311 | which it will stop. If you set the threshold to zero, the upper and |
| 312 | lower bound will coincide at the end of the loop and you will insert | 312 | lower bound will coincide at the end of the loop and you will insert |
| 313 | your item just before that point. If you set the threshhold to, | 313 | your item just before that point. If you set the threshold to, |
| 314 | e.g. 8, it will stop as soon as the window size drops below that | 314 | e.g. 8, it will stop as soon as the window size drops below that |
| 315 | amount and will insert the item in the approximate center of that | 315 | amount and will insert the item in the approximate center of that |
| 316 | window." | 316 | window." |
diff --git a/lisp/complete.el b/lisp/complete.el index 1cdff0d9acd..b1bb36f9dfa 100644 --- a/lisp/complete.el +++ b/lisp/complete.el | |||
| @@ -190,6 +190,14 @@ If nil, means use the colon-separated path in the variable $INCPATH instead." | |||
| 190 | (defvar PC-do-completion-end nil | 190 | (defvar PC-do-completion-end nil |
| 191 | "Internal variable used by `PC-do-completion'.") | 191 | "Internal variable used by `PC-do-completion'.") |
| 192 | 192 | ||
| 193 | (make-variable-buffer-local 'PC-do-completion-end) | ||
| 194 | |||
| 195 | (defvar PC-goto-end nil | ||
| 196 | "Internal variable set in `PC-do-completion', used in | ||
| 197 | `choose-completion-string-functions'.") | ||
| 198 | |||
| 199 | (make-variable-buffer-local 'PC-goto-end) | ||
| 200 | |||
| 193 | ;;;###autoload | 201 | ;;;###autoload |
| 194 | (define-minor-mode partial-completion-mode | 202 | (define-minor-mode partial-completion-mode |
| 195 | "Toggle Partial Completion mode. | 203 | "Toggle Partial Completion mode. |
| @@ -242,11 +250,16 @@ second TAB brings up the `*Completions*' buffer." | |||
| 242 | (if partial-completion-mode 'add-hook 'remove-hook) | 250 | (if partial-completion-mode 'add-hook 'remove-hook) |
| 243 | 'choose-completion-string-functions | 251 | 'choose-completion-string-functions |
| 244 | (lambda (choice buffer mini-p base-size) | 252 | (lambda (choice buffer mini-p base-size) |
| 245 | (if mini-p (goto-char (point-max)) | 253 | ;; When completing M-: (lisp- ) with point before the ), it is |
| 254 | ;; not appropriate to go to point-max (unlike the filename case). | ||
| 255 | (if (and (not PC-goto-end) | ||
| 256 | mini-p) | ||
| 257 | (goto-char (point-max)) | ||
| 246 | ;; Need a similar hack for the non-minibuffer-case -- gm. | 258 | ;; Need a similar hack for the non-minibuffer-case -- gm. |
| 247 | (when PC-do-completion-end | 259 | (when PC-do-completion-end |
| 248 | (goto-char PC-do-completion-end) | 260 | (goto-char PC-do-completion-end) |
| 249 | (setq PC-do-completion-end nil))) | 261 | (setq PC-do-completion-end nil))) |
| 262 | (setq PC-goto-end nil) | ||
| 250 | nil)) | 263 | nil)) |
| 251 | ;; Build the env-completion and mapping table. | 264 | ;; Build the env-completion and mapping table. |
| 252 | (when (and partial-completion-mode (null PC-env-vars-alist)) | 265 | (when (and partial-completion-mode (null PC-env-vars-alist)) |
| @@ -417,7 +430,13 @@ of `minibuffer-completion-table' and the minibuffer contents.") | |||
| 417 | (let ((result (try-completion string alist predicate))) | 430 | (let ((result (try-completion string alist predicate))) |
| 418 | (if (eq result t) string result))) | 431 | (if (eq result t) string result))) |
| 419 | 432 | ||
| 420 | (defun PC-do-completion (&optional mode beg end) | 433 | ;; TODO document MODE magic... |
| 434 | (defun PC-do-completion (&optional mode beg end goto-end) | ||
| 435 | "Internal function to do the work of partial completion. | ||
| 436 | Text to be completed lies between BEG and END. Normally when | ||
| 437 | replacing text in the minibuffer, this function replaces up to | ||
| 438 | point-max (as is appropriate for completing a file name). If | ||
| 439 | GOTO-END is non-nil, however, it instead replaces up to END." | ||
| 421 | (or beg (setq beg (minibuffer-prompt-end))) | 440 | (or beg (setq beg (minibuffer-prompt-end))) |
| 422 | (or end (setq end (point-max))) | 441 | (or end (setq end (point-max))) |
| 423 | (let* ((table minibuffer-completion-table) | 442 | (let* ((table minibuffer-completion-table) |
| @@ -753,6 +772,8 @@ of `minibuffer-completion-table' and the minibuffer contents.") | |||
| 753 | (let ((prompt-end (minibuffer-prompt-end))) | 772 | (let ((prompt-end (minibuffer-prompt-end))) |
| 754 | (with-output-to-temp-buffer "*Completions*" | 773 | (with-output-to-temp-buffer "*Completions*" |
| 755 | (display-completion-list (sort helpposs 'string-lessp)) | 774 | (display-completion-list (sort helpposs 'string-lessp)) |
| 775 | (setq PC-do-completion-end end | ||
| 776 | PC-goto-end goto-end) | ||
| 756 | (with-current-buffer standard-output | 777 | (with-current-buffer standard-output |
| 757 | ;; Record which part of the buffer we are completing | 778 | ;; Record which part of the buffer we are completing |
| 758 | ;; so that choosing a completion from the list | 779 | ;; so that choosing a completion from the list |
| @@ -771,8 +792,7 @@ of `minibuffer-completion-table' and the minibuffer contents.") | |||
| 771 | ;; plays around with point. | 792 | ;; plays around with point. |
| 772 | (setq completion-base-size (if dirname | 793 | (setq completion-base-size (if dirname |
| 773 | dirlength | 794 | dirlength |
| 774 | (- beg prompt-end)) | 795 | (- beg prompt-end)))))) |
| 775 | PC-do-completion-end end)))) | ||
| 776 | (PC-temp-minibuffer-message " [Next char not unique]")) | 796 | (PC-temp-minibuffer-message " [Next char not unique]")) |
| 777 | nil))))) | 797 | nil))))) |
| 778 | 798 | ||
| @@ -886,11 +906,11 @@ or properties are considered." | |||
| 886 | ;; Alternatively alternatively, maybe end should be computed in | 906 | ;; Alternatively alternatively, maybe end should be computed in |
| 887 | ;; the same way as beg. That would change the behaviour though. | 907 | ;; the same way as beg. That would change the behaviour though. |
| 888 | (if (equal last-command 'PC-lisp-complete-symbol) | 908 | (if (equal last-command 'PC-lisp-complete-symbol) |
| 889 | (PC-do-completion nil beg PC-lisp-complete-end) | 909 | (PC-do-completion nil beg PC-lisp-complete-end t) |
| 890 | (if PC-lisp-complete-end | 910 | (if PC-lisp-complete-end |
| 891 | (move-marker PC-lisp-complete-end end) | 911 | (move-marker PC-lisp-complete-end end) |
| 892 | (setq PC-lisp-complete-end (copy-marker end t))) | 912 | (setq PC-lisp-complete-end (copy-marker end t))) |
| 893 | (PC-do-completion nil beg end)))) | 913 | (PC-do-completion nil beg end t)))) |
| 894 | 914 | ||
| 895 | (defun PC-complete-as-file-name () | 915 | (defun PC-complete-as-file-name () |
| 896 | "Perform completion on file names preceding point. | 916 | "Perform completion on file names preceding point. |
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index d8fdf966374..4dae3bab018 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -422,7 +422,7 @@ | |||
| 422 | :group 'development) | 422 | :group 'development) |
| 423 | 423 | ||
| 424 | (defgroup minibuffer nil | 424 | (defgroup minibuffer nil |
| 425 | "Controling the behavior of the minibuffer." | 425 | "Controlling the behavior of the minibuffer." |
| 426 | :link '(custom-manual "(emacs)Minibuffer") | 426 | :link '(custom-manual "(emacs)Minibuffer") |
| 427 | :group 'environment) | 427 | :group 'environment) |
| 428 | 428 | ||
| @@ -443,7 +443,7 @@ | |||
| 443 | :group 'environment) | 443 | :group 'environment) |
| 444 | 444 | ||
| 445 | (defgroup auto-save nil | 445 | (defgroup auto-save nil |
| 446 | "Preventing accidential loss of data." | 446 | "Preventing accidental loss of data." |
| 447 | :group 'files) | 447 | :group 'files) |
| 448 | 448 | ||
| 449 | (defgroup processes-basics nil | 449 | (defgroup processes-basics nil |
diff --git a/lisp/desktop.el b/lisp/desktop.el index 8d7776be36c..31de08bdc26 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el | |||
| @@ -45,9 +45,9 @@ | |||
| 45 | ;; "Saving Emacs Sessions" in the GNU Emacs Manual. | 45 | ;; "Saving Emacs Sessions" in the GNU Emacs Manual. |
| 46 | 46 | ||
| 47 | ;; When the desktop module is loaded, the function `desktop-kill' is | 47 | ;; When the desktop module is loaded, the function `desktop-kill' is |
| 48 | ;; added to the `kill-emacs-hook'. This function is responsible for | 48 | ;; added to the `kill-emacs-hook'. This function is responsible for |
| 49 | ;; saving the desktop when Emacs is killed. Furthermore an anonymous | 49 | ;; saving the desktop when Emacs is killed. Furthermore an anonymous |
| 50 | ;; function is added to the `after-init-hook'. This function is | 50 | ;; function is added to the `after-init-hook'. This function is |
| 51 | ;; responsible for loading the desktop when Emacs is started. | 51 | ;; responsible for loading the desktop when Emacs is started. |
| 52 | 52 | ||
| 53 | ;; Special handling. | 53 | ;; Special handling. |
| @@ -55,12 +55,12 @@ | |||
| 55 | ;; Variables `desktop-buffer-mode-handlers' and `desktop-minor-mode-handlers' | 55 | ;; Variables `desktop-buffer-mode-handlers' and `desktop-minor-mode-handlers' |
| 56 | ;; are supplied to handle special major and minor modes respectively. | 56 | ;; are supplied to handle special major and minor modes respectively. |
| 57 | ;; `desktop-buffer-mode-handlers' is an alist of major mode specific functions | 57 | ;; `desktop-buffer-mode-handlers' is an alist of major mode specific functions |
| 58 | ;; to restore a desktop buffer. Elements must have the form | 58 | ;; to restore a desktop buffer. Elements must have the form |
| 59 | ;; | 59 | ;; |
| 60 | ;; (MAJOR-MODE . RESTORE-BUFFER-FUNCTION). | 60 | ;; (MAJOR-MODE . RESTORE-BUFFER-FUNCTION). |
| 61 | ;; | 61 | ;; |
| 62 | ;; Functions listed are called by `desktop-create-buffer' when `desktop-read' | 62 | ;; Functions listed are called by `desktop-create-buffer' when `desktop-read' |
| 63 | ;; evaluates the desktop file. Buffers with a major mode not specified here, | 63 | ;; evaluates the desktop file. Buffers with a major mode not specified here, |
| 64 | ;; are restored by the default handler `desktop-restore-file-buffer'. | 64 | ;; are restored by the default handler `desktop-restore-file-buffer'. |
| 65 | ;; `desktop-minor-mode-handlers' is an alist of functions to restore | 65 | ;; `desktop-minor-mode-handlers' is an alist of functions to restore |
| 66 | ;; non-standard minor modes. Elements must have the form | 66 | ;; non-standard minor modes. Elements must have the form |
| @@ -85,7 +85,7 @@ | |||
| 85 | ;; '(bar-mode . bar-desktop-restore)) | 85 | ;; '(bar-mode . bar-desktop-restore)) |
| 86 | 86 | ||
| 87 | ;; in the module itself, and make shure that the mode function is | 87 | ;; in the module itself, and make shure that the mode function is |
| 88 | ;; autoloaded. See the docstrings of `desktop-buffer-mode-handlers' and | 88 | ;; autoloaded. See the docstrings of `desktop-buffer-mode-handlers' and |
| 89 | ;; `desktop-minor-mode-handlers' for more info. | 89 | ;; `desktop-minor-mode-handlers' for more info. |
| 90 | 90 | ||
| 91 | ;; Minor modes. | 91 | ;; Minor modes. |
| @@ -100,7 +100,7 @@ | |||
| 100 | ;; The variables `desktop-minor-mode-table' and `desktop-minor-mode-handlers' | 100 | ;; The variables `desktop-minor-mode-table' and `desktop-minor-mode-handlers' |
| 101 | ;; are used to handle non-conventional minor modes. `desktop-save' uses | 101 | ;; are used to handle non-conventional minor modes. `desktop-save' uses |
| 102 | ;; `desktop-minor-mode-table' to map minor mode variables to minor mode | 102 | ;; `desktop-minor-mode-table' to map minor mode variables to minor mode |
| 103 | ;; functions before writing `desktop-minor-modes'. If a minor mode has a | 103 | ;; functions before writing `desktop-minor-modes'. If a minor mode has a |
| 104 | ;; variable name that is different form its function name, an entry | 104 | ;; variable name that is different form its function name, an entry |
| 105 | 105 | ||
| 106 | ;; (NAME RESTORE-FUNCTION) | 106 | ;; (NAME RESTORE-FUNCTION) |
| @@ -619,8 +619,7 @@ QUOTE may be `may' (value may be quoted), | |||
| 619 | (setq newlist (cons q.txt newlist))) | 619 | (setq newlist (cons q.txt newlist))) |
| 620 | (setq p (cdr p))) | 620 | (setq p (cdr p))) |
| 621 | (if p | 621 | (if p |
| 622 | (let ((last (desktop-internal-v2s p)) | 622 | (let ((last (desktop-internal-v2s p))) |
| 623 | (el (car newlist))) | ||
| 624 | (or anynil (setq anynil (null (car last)))) | 623 | (or anynil (setq anynil (null (car last)))) |
| 625 | (or anynil | 624 | (or anynil |
| 626 | (setq newlist (cons '(must . ".") newlist))) | 625 | (setq newlist (cons '(must . ".") newlist))) |
| @@ -782,7 +781,8 @@ See also `desktop-base-file-name'." | |||
| 782 | ";; Desktop file format version " desktop-file-version "\n" | 781 | ";; Desktop file format version " desktop-file-version "\n" |
| 783 | ";; Emacs version " emacs-version "\n\n" | 782 | ";; Emacs version " emacs-version "\n\n" |
| 784 | ";; Global section:\n") | 783 | ";; Global section:\n") |
| 785 | (mapcar (function desktop-outvar) desktop-globals-to-save) | 784 | (dolist (varspec desktop-globals-to-save) |
| 785 | (desktop-outvar varspec)) | ||
| 786 | (if (memq 'kill-ring desktop-globals-to-save) | 786 | (if (memq 'kill-ring desktop-globals-to-save) |
| 787 | (insert | 787 | (insert |
| 788 | "(setq kill-ring-yank-pointer (nthcdr " | 788 | "(setq kill-ring-yank-pointer (nthcdr " |
| @@ -790,22 +790,20 @@ See also `desktop-base-file-name'." | |||
| 790 | " kill-ring))\n")) | 790 | " kill-ring))\n")) |
| 791 | 791 | ||
| 792 | (insert "\n;; Buffer section -- buffers listed in same order as in buffer list:\n") | 792 | (insert "\n;; Buffer section -- buffers listed in same order as in buffer list:\n") |
| 793 | (mapcar #'(lambda (l) | 793 | (dolist (l info) |
| 794 | (when (apply 'desktop-save-buffer-p l) | 794 | (when (apply 'desktop-save-buffer-p l) |
| 795 | (insert "(" | 795 | (insert "(" |
| 796 | (if (or (not (integerp eager)) | 796 | (if (or (not (integerp eager)) |
| 797 | (unless (zerop eager) | 797 | (unless (zerop eager) |
| 798 | (setq eager (1- eager)) | 798 | (setq eager (1- eager)) |
| 799 | t)) | 799 | t)) |
| 800 | "desktop-create-buffer" | 800 | "desktop-create-buffer" |
| 801 | "desktop-append-buffer-args") | 801 | "desktop-append-buffer-args") |
| 802 | " " | 802 | " " |
| 803 | desktop-file-version) | 803 | desktop-file-version) |
| 804 | (mapcar #'(lambda (e) | 804 | (dolist (e l) |
| 805 | (insert "\n " (desktop-value-to-string e))) | 805 | (insert "\n " (desktop-value-to-string e))) |
| 806 | l) | 806 | (insert ")\n\n"))) |
| 807 | (insert ")\n\n"))) | ||
| 808 | info) | ||
| 809 | (setq default-directory dirname) | 807 | (setq default-directory dirname) |
| 810 | (let ((coding-system-for-write 'utf-8-emacs)) | 808 | (let ((coding-system-for-write 'utf-8-emacs)) |
| 811 | (write-region (point-min) (point-max) filename nil 'nomessage))))) | 809 | (write-region (point-min) (point-max) filename nil 'nomessage))))) |
| @@ -941,14 +939,13 @@ directory DIRNAME." | |||
| 941 | (desktop-clear) | 939 | (desktop-clear) |
| 942 | (desktop-read desktop-dirname)) | 940 | (desktop-read desktop-dirname)) |
| 943 | 941 | ||
| 942 | (defvar desktop-buffer-major-mode) | ||
| 943 | (defvar desktop-buffer-locals) | ||
| 944 | ;; ---------------------------------------------------------------------------- | 944 | ;; ---------------------------------------------------------------------------- |
| 945 | (defun desktop-restore-file-buffer (desktop-buffer-file-name | 945 | (defun desktop-restore-file-buffer (desktop-buffer-file-name |
| 946 | desktop-buffer-name | 946 | desktop-buffer-name |
| 947 | desktop-buffer-misc) | 947 | desktop-buffer-misc) |
| 948 | "Restore a file buffer." | 948 | "Restore a file buffer." |
| 949 | (eval-when-compile ; Just to silence the byte compiler | ||
| 950 | (defvar desktop-buffer-major-mode) | ||
| 951 | (defvar desktop-buffer-locals)) | ||
| 952 | (if desktop-buffer-file-name | 949 | (if desktop-buffer-file-name |
| 953 | (if (or (file-exists-p desktop-buffer-file-name) | 950 | (if (or (file-exists-p desktop-buffer-file-name) |
| 954 | (let ((msg (format "Desktop: File \"%s\" no longer exists." | 951 | (let ((msg (format "Desktop: File \"%s\" no longer exists." |
| @@ -985,8 +982,12 @@ directory DIRNAME." | |||
| 985 | ;; called from Desktop file only. | 982 | ;; called from Desktop file only. |
| 986 | 983 | ||
| 987 | ;; Just to silence the byte compiler. | 984 | ;; Just to silence the byte compiler. |
| 988 | (eval-when-compile | 985 | |
| 989 | (defvar desktop-first-buffer)) ; Dynamically bound in `desktop-read' | 986 | (defvar desktop-first-buffer) ; Dynamically bound in `desktop-read' |
| 987 | |||
| 988 | ;; Bound locally in `desktop-read'. | ||
| 989 | (defvar desktop-buffer-ok-count) | ||
| 990 | (defvar desktop-buffer-fail-count) | ||
| 990 | 991 | ||
| 991 | (defun desktop-create-buffer | 992 | (defun desktop-create-buffer |
| 992 | (desktop-file-version | 993 | (desktop-file-version |
| @@ -1000,10 +1001,6 @@ directory DIRNAME." | |||
| 1000 | desktop-buffer-misc | 1001 | desktop-buffer-misc |
| 1001 | &optional | 1002 | &optional |
| 1002 | desktop-buffer-locals) | 1003 | desktop-buffer-locals) |
| 1003 | ;; Just to silence the byte compiler. Bound locally in `desktop-read'. | ||
| 1004 | (eval-when-compile | ||
| 1005 | (defvar desktop-buffer-ok-count) | ||
| 1006 | (defvar desktop-buffer-fail-count)) | ||
| 1007 | ;; To make desktop files with relative file names possible, we cannot | 1004 | ;; To make desktop files with relative file names possible, we cannot |
| 1008 | ;; allow `default-directory' to change. Therefore we save current buffer. | 1005 | ;; allow `default-directory' to change. Therefore we save current buffer. |
| 1009 | (save-current-buffer | 1006 | (save-current-buffer |
| @@ -1045,21 +1042,22 @@ directory DIRNAME." | |||
| 1045 | ((equal '(nil) desktop-buffer-minor-modes) ; backwards compatible | 1042 | ((equal '(nil) desktop-buffer-minor-modes) ; backwards compatible |
| 1046 | (auto-fill-mode 0)) | 1043 | (auto-fill-mode 0)) |
| 1047 | (t | 1044 | (t |
| 1048 | (mapcar #'(lambda (minor-mode) | 1045 | (dolist (minor-mode desktop-buffer-minor-modes) |
| 1049 | ;; Give minor mode module a chance to add a handler. | 1046 | ;; Give minor mode module a chance to add a handler. |
| 1050 | (desktop-load-file minor-mode) | 1047 | (desktop-load-file minor-mode) |
| 1051 | (let ((handler (cdr (assq minor-mode desktop-minor-mode-handlers)))) | 1048 | (let ((handler (cdr (assq minor-mode desktop-minor-mode-handlers)))) |
| 1052 | (if handler | 1049 | (if handler |
| 1053 | (funcall handler desktop-buffer-locals) | 1050 | (funcall handler desktop-buffer-locals) |
| 1054 | (when (functionp minor-mode) | 1051 | (when (functionp minor-mode) |
| 1055 | (funcall minor-mode 1))))) | 1052 | (funcall minor-mode 1))))))) |
| 1056 | desktop-buffer-minor-modes))) | 1053 | ;; Even though point and mark are non-nil when written by |
| 1057 | ;; Even though point and mark are non-nil when written by `desktop-save', | 1054 | ;; `desktop-save', they may be modified by handlers wanting to set |
| 1058 | ;; they may be modified by handlers wanting to set point or mark themselves. | 1055 | ;; point or mark themselves. |
| 1059 | (when desktop-buffer-point | 1056 | (when desktop-buffer-point |
| 1060 | (goto-char | 1057 | (goto-char |
| 1061 | (condition-case err | 1058 | (condition-case err |
| 1062 | ;; Evaluate point. Thus point can be something like '(search-forward ... | 1059 | ;; Evaluate point. Thus point can be something like |
| 1060 | ;; '(search-forward ... | ||
| 1063 | (eval desktop-buffer-point) | 1061 | (eval desktop-buffer-point) |
| 1064 | (error (message "%s" (error-message-string err)) 1)))) | 1062 | (error (message "%s" (error-message-string err)) 1)))) |
| 1065 | (when desktop-buffer-mark | 1063 | (when desktop-buffer-mark |
| @@ -1167,7 +1165,7 @@ If there are no buffers left to create, kill the timer." | |||
| 1167 | ;; functions are processed after `after-init-hook'. | 1165 | ;; functions are processed after `after-init-hook'. |
| 1168 | (add-hook | 1166 | (add-hook |
| 1169 | 'after-init-hook | 1167 | 'after-init-hook |
| 1170 | '(lambda () | 1168 | (lambda () |
| 1171 | (let ((key "--no-desktop")) | 1169 | (let ((key "--no-desktop")) |
| 1172 | (when (member key command-line-args) | 1170 | (when (member key command-line-args) |
| 1173 | (setq command-line-args (delete key command-line-args)) | 1171 | (setq command-line-args (delete key command-line-args)) |
| @@ -1176,5 +1174,5 @@ If there are no buffers left to create, kill the timer." | |||
| 1176 | 1174 | ||
| 1177 | (provide 'desktop) | 1175 | (provide 'desktop) |
| 1178 | 1176 | ||
| 1179 | ;;; arch-tag: 221907c3-1771-4fd3-9c2e-c6f700c6ede9 | 1177 | ;; arch-tag: 221907c3-1771-4fd3-9c2e-c6f700c6ede9 |
| 1180 | ;;; desktop.el ends here | 1178 | ;;; desktop.el ends here |
diff --git a/lisp/dired-x.el b/lisp/dired-x.el index f5e6250b475..eecb1dbb709 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el | |||
| @@ -790,21 +790,18 @@ nil." | |||
| 790 | (revert-buffer))) | 790 | (revert-buffer))) |
| 791 | 791 | ||
| 792 | ;; A zero-arg version of dired-virtual. | 792 | ;; A zero-arg version of dired-virtual. |
| 793 | ;; You need my modified version of set-auto-mode for the | ||
| 794 | ;; `buffer-contents-mode-alist'. | ||
| 795 | ;; Or you use infer-mode.el and infer-mode-alist, same syntax. | ||
| 796 | (defun dired-virtual-mode () | 793 | (defun dired-virtual-mode () |
| 797 | "Put current buffer into Virtual Dired mode (see `dired-virtual'). | 794 | "Put current buffer into Virtual Dired mode (see `dired-virtual'). |
| 798 | Useful on `buffer-contents-mode-alist' (which see) with the regexp | 795 | Useful on `magic-mode-alist' with the regexp |
| 799 | 796 | ||
| 800 | \"^ \\(/[^ /]+\\)/?+:$\" | 797 | \"^ \\\\(/[^ /]+\\\\)+/?:$\" |
| 801 | 798 | ||
| 802 | to put saved dired buffers automatically into Virtual Dired mode. | 799 | to put saved dired buffers automatically into Virtual Dired mode. |
| 803 | 800 | ||
| 804 | Also useful for `auto-mode-alist' (which see) like this: | 801 | Also useful for `auto-mode-alist' like this: |
| 805 | 802 | ||
| 806 | \(setq auto-mode-alist (cons '(\"[^/]\\.dired\\'\" . dired-virtual-mode) | 803 | (add-to-list 'auto-mode-alist |
| 807 | auto-mode-alist)\)" | 804 | '(\"[^/]\\\\.dired\\\\'\" . dired-virtual-mode))" |
| 808 | (interactive) | 805 | (interactive) |
| 809 | (dired-virtual (dired-virtual-guess-dir))) | 806 | (dired-virtual (dired-virtual-guess-dir))) |
| 810 | 807 | ||
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." | |||
| 1251 | (define-key map "\177" 'dired-unmark-backward) | 1251 | (define-key map "\177" 'dired-unmark-backward) |
| 1252 | (define-key map [remap undo] 'dired-undo) | 1252 | (define-key map [remap undo] 'dired-undo) |
| 1253 | (define-key map [remap advertised-undo] 'dired-undo) | 1253 | (define-key map [remap advertised-undo] 'dired-undo) |
| 1254 | ;; thumbnail manipulation (tumme) | 1254 | ;; thumbnail manipulation (image-dired) |
| 1255 | (define-key map "\C-td" 'tumme-display-thumbs) | 1255 | (define-key map "\C-td" 'image-dired-display-thumbs) |
| 1256 | (define-key map "\C-tt" 'tumme-tag-files) | 1256 | (define-key map "\C-tt" 'image-dired-tag-files) |
| 1257 | (define-key map "\C-tr" 'tumme-delete-tag) | 1257 | (define-key map "\C-tr" 'image-dired-delete-tag) |
| 1258 | (define-key map "\C-tj" 'tumme-jump-thumbnail-buffer) | 1258 | (define-key map "\C-tj" 'image-dired-jump-thumbnail-buffer) |
| 1259 | (define-key map "\C-ti" 'tumme-dired-display-image) | 1259 | (define-key map "\C-ti" 'image-dired-dired-display-image) |
| 1260 | (define-key map "\C-tx" 'tumme-dired-display-external) | 1260 | (define-key map "\C-tx" 'image-dired-dired-display-external) |
| 1261 | (define-key map "\C-ta" 'tumme-display-thumbs-append) | 1261 | (define-key map "\C-ta" 'image-dired-display-thumbs-append) |
| 1262 | (define-key map "\C-t." 'tumme-display-thumb) | 1262 | (define-key map "\C-t." 'image-dired-display-thumb) |
| 1263 | (define-key map "\C-tc" 'tumme-dired-comment-files) | 1263 | (define-key map "\C-tc" 'image-dired-dired-comment-files) |
| 1264 | (define-key map "\C-tf" 'tumme-mark-tagged-files) | 1264 | (define-key map "\C-tf" 'image-dired-mark-tagged-files) |
| 1265 | (define-key map "\C-t\C-t" 'tumme-dired-insert-marked-thumbs) | 1265 | (define-key map "\C-t\C-t" 'image-dired-dired-insert-marked-thumbs) |
| 1266 | (define-key map "\C-te" 'tumme-dired-edit-comment-and-tags) | 1266 | (define-key map "\C-te" 'image-dired-dired-edit-comment-and-tags) |
| 1267 | 1267 | ||
| 1268 | ;; Make menu bar items. | 1268 | ;; Make menu bar items. |
| 1269 | 1269 | ||
| @@ -1310,12 +1310,12 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." | |||
| 1310 | (cons "Immediate" (make-sparse-keymap "Immediate"))) | 1310 | (cons "Immediate" (make-sparse-keymap "Immediate"))) |
| 1311 | 1311 | ||
| 1312 | (define-key map | 1312 | (define-key map |
| 1313 | [menu-bar immediate tumme-dired-display-external] | 1313 | [menu-bar immediate image-dired-dired-display-external] |
| 1314 | '(menu-item "Display Image Externally" tumme-dired-display-external | 1314 | '(menu-item "Display Image Externally" image-dired-dired-display-external |
| 1315 | :help "Display image in external viewer")) | 1315 | :help "Display image in external viewer")) |
| 1316 | (define-key map | 1316 | (define-key map |
| 1317 | [menu-bar immediate tumme-dired-display-image] | 1317 | [menu-bar immediate image-dired-dired-display-image] |
| 1318 | '(menu-item "Display Image" tumme-dired-display-image | 1318 | '(menu-item "Display Image" image-dired-dired-display-image |
| 1319 | :help "Display sized image in a separate window")) | 1319 | :help "Display sized image in a separate window")) |
| 1320 | 1320 | ||
| 1321 | (define-key map [menu-bar immediate dashes-4] | 1321 | (define-key map [menu-bar immediate dashes-4] |
| @@ -1358,8 +1358,8 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." | |||
| 1358 | (cons "Regexp" (make-sparse-keymap "Regexp"))) | 1358 | (cons "Regexp" (make-sparse-keymap "Regexp"))) |
| 1359 | 1359 | ||
| 1360 | (define-key map | 1360 | (define-key map |
| 1361 | [menu-bar regexp tumme-mark-tagged-files] | 1361 | [menu-bar regexp image-dired-mark-tagged-files] |
| 1362 | '(menu-item "Mark From Image Tag..." tumme-mark-tagged-files | 1362 | '(menu-item "Mark From Image Tag..." image-dired-mark-tagged-files |
| 1363 | :help "Mark files whose image tags matches regexp")) | 1363 | :help "Mark files whose image tags matches regexp")) |
| 1364 | 1364 | ||
| 1365 | (define-key map [menu-bar regexp dashes-1] | 1365 | (define-key map [menu-bar regexp dashes-1] |
| @@ -1456,21 +1456,21 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." | |||
| 1456 | '("--")) | 1456 | '("--")) |
| 1457 | 1457 | ||
| 1458 | (define-key map | 1458 | (define-key map |
| 1459 | [menu-bar operate tumme-delete-tag] | 1459 | [menu-bar operate image-dired-delete-tag] |
| 1460 | '(menu-item "Delete Image Tag..." tumme-delete-tag | 1460 | '(menu-item "Delete Image Tag..." image-dired-delete-tag |
| 1461 | :help "Delete image tag from current or marked files")) | 1461 | :help "Delete image tag from current or marked files")) |
| 1462 | (define-key map | 1462 | (define-key map |
| 1463 | [menu-bar operate tumme-tag-files] | 1463 | [menu-bar operate image-dired-tag-files] |
| 1464 | '(menu-item "Add Image Tags..." tumme-tag-files | 1464 | '(menu-item "Add Image Tags..." image-dired-tag-files |
| 1465 | :help "Add image tags to current or marked files")) | 1465 | :help "Add image tags to current or marked files")) |
| 1466 | (define-key map | 1466 | (define-key map |
| 1467 | [menu-bar operate tumme-dired-comment-files] | 1467 | [menu-bar operate image-dired-dired-comment-files] |
| 1468 | '(menu-item "Add Image Comment..." tumme-dired-comment-files | 1468 | '(menu-item "Add Image Comment..." image-dired-dired-comment-files |
| 1469 | :help "Add image comment to current or marked files")) | 1469 | :help "Add image comment to current or marked files")) |
| 1470 | (define-key map | 1470 | (define-key map |
| 1471 | [menu-bar operate tumme-display-thumbs] | 1471 | [menu-bar operate image-dired-display-thumbs] |
| 1472 | '(menu-item "Display Thumbnails" tumme-display-thumbs | 1472 | '(menu-item "Display Image-Dired" image-dired-display-thumbs |
| 1473 | :help "Display thumbnails for current or marked image files")) | 1473 | :help "Display image-dired for current or marked image files")) |
| 1474 | 1474 | ||
| 1475 | (define-key map [menu-bar operate dashes-3] | 1475 | (define-key map [menu-bar operate dashes-3] |
| 1476 | '("--")) | 1476 | '("--")) |
diff --git a/lisp/dnd.el b/lisp/dnd.el index 972354f3908..56a619490aa 100644 --- a/lisp/dnd.el +++ b/lisp/dnd.el | |||
| @@ -146,7 +146,7 @@ Return nil if URI is not a local file." | |||
| 146 | (substring uri (match-end 0)))))) | 146 | (substring uri (match-end 0)))))) |
| 147 | (when (and f must-exist) | 147 | (when (and f must-exist) |
| 148 | (setq f (replace-regexp-in-string | 148 | (setq f (replace-regexp-in-string |
| 149 | "%[A-Z0-9][A-Z0-9]" | 149 | "%[A-Fa-f0-9][A-Fa-f0-9]" |
| 150 | (lambda (arg) | 150 | (lambda (arg) |
| 151 | (let ((str (make-string 1 0))) | 151 | (let ((str (make-string 1 0))) |
| 152 | (aset str 0 (string-to-number (substring arg 1) 16)) | 152 | (aset str 0 (string-to-number (substring arg 1) 16)) |
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index d0589b3eb00..be135850d56 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el | |||
| @@ -557,8 +557,20 @@ | |||
| 557 | ;; Otherwise, no args can be considered to be for-effect, | 557 | ;; Otherwise, no args can be considered to be for-effect, |
| 558 | ;; even if the called function is for-effect, because we | 558 | ;; even if the called function is for-effect, because we |
| 559 | ;; don't know anything about that function. | 559 | ;; don't know anything about that function. |
| 560 | (cons fn (mapcar 'byte-optimize-form (cdr form))))))) | 560 | (let ((args (mapcar #'byte-optimize-form (cdr form)))) |
| 561 | 561 | (if (and (get fn 'pure) | |
| 562 | (byte-optimize-all-constp args)) | ||
| 563 | (list 'quote (apply fn (mapcar #'eval args))) | ||
| 564 | (cons fn args))))))) | ||
| 565 | |||
| 566 | (defun byte-optimize-all-constp (list) | ||
| 567 | "Non-nil iff all elements of LIST satisfy `byte-compile-constp'." | ||
| 568 | (let ((constant t)) | ||
| 569 | (while (and list constant) | ||
| 570 | (unless (byte-compile-constp (car list)) | ||
| 571 | (setq constant nil)) | ||
| 572 | (setq list (cdr list))) | ||
| 573 | constant)) | ||
| 562 | 574 | ||
| 563 | (defun byte-optimize-form (form &optional for-effect) | 575 | (defun byte-optimize-form (form &optional for-effect) |
| 564 | "The source-level pass of the optimizer." | 576 | "The source-level pass of the optimizer." |
| @@ -1117,26 +1129,6 @@ | |||
| 1117 | (byte-optimize-predicate form)) | 1129 | (byte-optimize-predicate form)) |
| 1118 | form)) | 1130 | form)) |
| 1119 | 1131 | ||
| 1120 | ;; Avoid having to write forward-... with a negative arg for speed. | ||
| 1121 | ;; Fixme: don't be limited to constant args. | ||
| 1122 | (put 'backward-char 'byte-optimizer 'byte-optimize-backward-char) | ||
| 1123 | (defun byte-optimize-backward-char (form) | ||
| 1124 | (cond ((and (= 2 (safe-length form)) | ||
| 1125 | (numberp (nth 1 form))) | ||
| 1126 | (list 'forward-char (eval (- (nth 1 form))))) | ||
| 1127 | ((= 1 (safe-length form)) | ||
| 1128 | '(forward-char -1)) | ||
| 1129 | (t form))) | ||
| 1130 | |||
| 1131 | (put 'backward-word 'byte-optimizer 'byte-optimize-backward-word) | ||
| 1132 | (defun byte-optimize-backward-word (form) | ||
| 1133 | (cond ((and (= 2 (safe-length form)) | ||
| 1134 | (numberp (nth 1 form))) | ||
| 1135 | (list 'forward-word (eval (- (nth 1 form))))) | ||
| 1136 | ((= 1 (safe-length form)) | ||
| 1137 | '(forward-word -1)) | ||
| 1138 | (t form))) | ||
| 1139 | |||
| 1140 | ;; Fixme: delete-char -> delete-region (byte-coded) | 1132 | ;; Fixme: delete-char -> delete-region (byte-coded) |
| 1141 | ;; optimize string-as-unibyte, string-as-multibyte, string-make-unibyte, | 1133 | ;; optimize string-as-unibyte, string-as-multibyte, string-make-unibyte, |
| 1142 | ;; string-make-multibyte for constant args. | 1134 | ;; string-make-multibyte for constant args. |
| @@ -1266,6 +1258,18 @@ | |||
| 1266 | (setq side-effect-and-error-free-fns (cdr side-effect-and-error-free-fns))) | 1258 | (setq side-effect-and-error-free-fns (cdr side-effect-and-error-free-fns))) |
| 1267 | nil) | 1259 | nil) |
| 1268 | 1260 | ||
| 1261 | |||
| 1262 | ;; pure functions are side-effect free functions whose values depend | ||
| 1263 | ;; only on their arguments. For these functions, calls with constant | ||
| 1264 | ;; arguments can be evaluated at compile time. This may shift run time | ||
| 1265 | ;; errors to compile time. | ||
| 1266 | |||
| 1267 | (let ((pure-fns | ||
| 1268 | '(concat symbol-name regexp-opt regexp-quote string-to-syntax))) | ||
| 1269 | (while pure-fns | ||
| 1270 | (put (car pure-fns) 'pure t) | ||
| 1271 | (setq pure-fns (cdr pure-fns))) | ||
| 1272 | nil) | ||
| 1269 | 1273 | ||
| 1270 | (defun byte-compile-splice-in-already-compiled-code (form) | 1274 | (defun byte-compile-splice-in-already-compiled-code (form) |
| 1271 | ;; form is (byte-code "..." [...] n) | 1275 | ;; form is (byte-code "..." [...] n) |
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 2a32ff9a016..8606f1ae2b8 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -3149,6 +3149,8 @@ That command is designed for interactive use only" fn)) | |||
| 3149 | ;; more complicated compiler macros | 3149 | ;; more complicated compiler macros |
| 3150 | 3150 | ||
| 3151 | (byte-defop-compiler char-before) | 3151 | (byte-defop-compiler char-before) |
| 3152 | (byte-defop-compiler backward-char) | ||
| 3153 | (byte-defop-compiler backward-word) | ||
| 3152 | (byte-defop-compiler list) | 3154 | (byte-defop-compiler list) |
| 3153 | (byte-defop-compiler concat) | 3155 | (byte-defop-compiler concat) |
| 3154 | (byte-defop-compiler fset) | 3156 | (byte-defop-compiler fset) |
| @@ -3162,10 +3164,31 @@ That command is designed for interactive use only" fn)) | |||
| 3162 | 3164 | ||
| 3163 | (defun byte-compile-char-before (form) | 3165 | (defun byte-compile-char-before (form) |
| 3164 | (cond ((= 2 (length form)) | 3166 | (cond ((= 2 (length form)) |
| 3165 | (byte-compile-form `(char-after (1- ,(nth 1 form))))) | 3167 | (byte-compile-form (list 'char-after (if (numberp (nth 1 form)) |
| 3166 | ((= 1 (length form)) | 3168 | (1- (nth 1 form)) |
| 3167 | (byte-compile-form '(char-after (1- (point))))) | 3169 | `(1- ,(nth 1 form)))))) |
| 3168 | (t (byte-compile-subr-wrong-args form "0-1")))) | 3170 | ((= 1 (length form)) |
| 3171 | (byte-compile-form '(char-after (1- (point))))) | ||
| 3172 | (t (byte-compile-subr-wrong-args form "0-1")))) | ||
| 3173 | |||
| 3174 | ;; backward-... ==> forward-... with negated argument. | ||
| 3175 | (defun byte-compile-backward-char (form) | ||
| 3176 | (cond ((= 2 (length form)) | ||
| 3177 | (byte-compile-form (list 'forward-char (if (numberp (nth 1 form)) | ||
| 3178 | (- (nth 1 form)) | ||
| 3179 | `(- ,(nth 1 form)))))) | ||
| 3180 | ((= 1 (length form)) | ||
| 3181 | (byte-compile-form '(forward-char -1))) | ||
| 3182 | (t (byte-compile-subr-wrong-args form "0-1")))) | ||
| 3183 | |||
| 3184 | (defun byte-compile-backward-word (form) | ||
| 3185 | (cond ((= 2 (length form)) | ||
| 3186 | (byte-compile-form (list 'forward-word (if (numberp (nth 1 form)) | ||
| 3187 | (- (nth 1 form)) | ||
| 3188 | `(- ,(nth 1 form)))))) | ||
| 3189 | ((= 1 (length form)) | ||
| 3190 | (byte-compile-form '(forward-word -1))) | ||
| 3191 | (t (byte-compile-subr-wrong-args form "0-1")))) | ||
| 3169 | 3192 | ||
| 3170 | (defun byte-compile-list (form) | 3193 | (defun byte-compile-list (form) |
| 3171 | (let ((count (length (cdr form)))) | 3194 | (let ((count (length (cdr form)))) |
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 8b8dc6ba09d..2ce4ca8cf38 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el | |||
| @@ -327,11 +327,12 @@ call another major mode in their body." | |||
| 327 | (make-variable-buffer-local ',MODE-major-mode) | 327 | (make-variable-buffer-local ',MODE-major-mode) |
| 328 | ;; The actual global minor-mode | 328 | ;; The actual global minor-mode |
| 329 | (define-minor-mode ,global-mode | 329 | (define-minor-mode ,global-mode |
| 330 | ,(format "Toggle %s in every buffer. | 330 | ,(format "Toggle %s in every possible buffer. |
| 331 | With prefix ARG, turn %s on if and only if ARG is positive. | 331 | With prefix ARG, turn %s on if and only if ARG is positive. |
| 332 | %s is actually not turned on in every buffer but only in those | 332 | %s is enabled in all buffers where `%s' would do it. |
| 333 | in which `%s' turns it on." | 333 | See `%s' for more information on %s." |
| 334 | pretty-name pretty-global-name pretty-name turn-on) | 334 | pretty-name pretty-global-name pretty-name turn-on |
| 335 | mode pretty-name) | ||
| 335 | :global t ,@group ,@(nreverse extra-keywords) | 336 | :global t ,@group ,@(nreverse extra-keywords) |
| 336 | 337 | ||
| 337 | ;; Setup hook to handle future mode changes and new buffers. | 338 | ;; Setup hook to handle future mode changes and new buffers. |
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 151bbd2bd9e..9ae33599f09 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el | |||
| @@ -364,31 +364,39 @@ Return the result of the last expression in BODY." | |||
| 364 | 364 | ||
| 365 | (defun edebug-pop-to-buffer (buffer &optional window) | 365 | (defun edebug-pop-to-buffer (buffer &optional window) |
| 366 | ;; Like pop-to-buffer, but select window where BUFFER was last shown. | 366 | ;; Like pop-to-buffer, but select window where BUFFER was last shown. |
| 367 | ;; Select WINDOW if it provided and it still exists. Otherwise, | 367 | ;; Select WINDOW if it is provided and still exists. Otherwise, |
| 368 | ;; if buffer is currently shown in several windows, choose one. | 368 | ;; if buffer is currently shown in several windows, choose one. |
| 369 | ;; Otherwise, find a new window, possibly splitting one. | 369 | ;; Otherwise, find a new window, possibly splitting one. |
| 370 | (setq window (if (and (windowp window) (edebug-window-live-p window) | 370 | (setq window |
| 371 | (eq (window-buffer window) buffer)) | 371 | (cond |
| 372 | window | 372 | ((and (windowp window) (edebug-window-live-p window) |
| 373 | (if (eq (window-buffer (selected-window)) buffer) | 373 | (eq (window-buffer window) buffer)) |
| 374 | (selected-window) | 374 | window) |
| 375 | (edebug-get-buffer-window buffer)))) | 375 | ((eq (window-buffer (selected-window)) buffer) |
| 376 | (if window | 376 | ;; Selected window already displays BUFFER. |
| 377 | (select-window window) | 377 | (selected-window)) |
| 378 | (if (one-window-p) | 378 | ((edebug-get-buffer-window buffer)) |
| 379 | (split-window)) | 379 | ((one-window-p 'nomini) |
| 380 | ;; (message "next window: %s" (next-window)) (sit-for 1) | 380 | ;; When there's one window only, split it. |
| 381 | (if (eq (get-buffer-window edebug-trace-buffer) (next-window)) | 381 | (split-window)) |
| 382 | ;; Don't select trace window | 382 | ((let ((trace-window (get-buffer-window edebug-trace-buffer))) |
| 383 | nil | 383 | (catch 'found |
| 384 | (select-window (next-window)))) | 384 | (dolist (elt (window-list nil 'nomini)) |
| 385 | (set-window-buffer (selected-window) buffer) | 385 | (unless (or (eq elt (selected-window)) (eq elt trace-window) |
| 386 | (set-window-hscroll (selected-window) 0);; should this be?? | 386 | (window-dedicated-p elt)) |
| 387 | ;; Found a non-dedicated window not showing | ||
| 388 | ;; `edebug-trace-buffer', use it. | ||
| 389 | (throw 'found elt)))))) | ||
| 390 | ;; All windows are dedicated or show `edebug-trace-buffer', split | ||
| 391 | ;; selected one. | ||
| 392 | (t (split-window)))) | ||
| 393 | (select-window window) | ||
| 394 | (set-window-buffer window buffer) | ||
| 395 | (set-window-hscroll window 0);; should this be?? | ||
| 387 | ;; Selecting the window does not set the buffer until command loop. | 396 | ;; Selecting the window does not set the buffer until command loop. |
| 388 | ;;(set-buffer buffer) | 397 | ;;(set-buffer buffer) |
| 389 | ) | 398 | ) |
| 390 | 399 | ||
| 391 | |||
| 392 | (defun edebug-get-displayed-buffer-points () | 400 | (defun edebug-get-displayed-buffer-points () |
| 393 | ;; Return a list of buffer point pairs, for all displayed buffers. | 401 | ;; Return a list of buffer point pairs, for all displayed buffers. |
| 394 | (let (list) | 402 | (let (list) |
diff --git a/lisp/files.el b/lisp/files.el index b96ab2e96fb..1b6a94766d3 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -2123,19 +2123,20 @@ associated with that interpreter in `interpreter-mode-alist'.") | |||
| 2123 | `((image-type-auto-detected-p . image-mode) | 2123 | `((image-type-auto-detected-p . image-mode) |
| 2124 | ;; The < comes before the groups (but the first) to reduce backtracking. | 2124 | ;; The < comes before the groups (but the first) to reduce backtracking. |
| 2125 | ;; TODO: UTF-16 <?xml may be preceded by a BOM 0xff 0xfe or 0xfe 0xff. | 2125 | ;; TODO: UTF-16 <?xml may be preceded by a BOM 0xff 0xfe or 0xfe 0xff. |
| 2126 | ;; We use [ \t\n] instead of `\\s ' to make regex overflow less likely. | 2126 | ;; We use [ \t\r\n] instead of `\\s ' to make regex overflow less likely. |
| 2127 | (,(let* ((incomment-re "\\(?:[^-]\\|-[^-]\\)") | 2127 | (,(let* ((incomment-re "\\(?:[^-]\\|-[^-]\\)") |
| 2128 | (comment-re (concat "\\(?:!--" incomment-re "*-->[ \t\n]*<\\)"))) | 2128 | (comment-re (concat "\\(?:!--" incomment-re "*-->[ \t\r\n]*<\\)"))) |
| 2129 | (concat "\\(?:<\\?xml[ \t\n]+[^>]*>\\)?[ \t\n]*<" | 2129 | (concat "\\(?:<\\?xml[ \t\r\n]+[^>]*>\\)?[ \t\r\n]*<" |
| 2130 | comment-re "*" | 2130 | comment-re "*" |
| 2131 | "\\(?:!DOCTYPE[ \t\n]+[^>]*>[ \t\n]*<[ \t\n]*" comment-re "*\\)?" | 2131 | "\\(?:!DOCTYPE[ \t\r\n]+[^>]*>[ \t\r\n]*<[ \t\r\n]*" comment-re "*\\)?" |
| 2132 | "[Hh][Tt][Mm][Ll]")) | 2132 | "[Hh][Tt][Mm][Ll]")) |
| 2133 | . html-mode) | 2133 | . html-mode) |
| 2134 | ("<!DOCTYPE[ \t\r\n]+[Hh][Tt][Mm][Ll]" . html-mode) | ||
| 2134 | ;; These two must come after html, because they are more general: | 2135 | ;; These two must come after html, because they are more general: |
| 2135 | ("<\\?xml " . xml-mode) | 2136 | ("<\\?xml " . xml-mode) |
| 2136 | (,(let* ((incomment-re "\\(?:[^-]\\|-[^-]\\)") | 2137 | (,(let* ((incomment-re "\\(?:[^-]\\|-[^-]\\)") |
| 2137 | (comment-re (concat "\\(?:!--" incomment-re "*-->[ \t\n]*<\\)"))) | 2138 | (comment-re (concat "\\(?:!--" incomment-re "*-->[ \t\r\n]*<\\)"))) |
| 2138 | (concat "[ \t\n]*<" comment-re "*!DOCTYPE ")) | 2139 | (concat "[ \t\r\n]*<" comment-re "*!DOCTYPE ")) |
| 2139 | . sgml-mode) | 2140 | . sgml-mode) |
| 2140 | ("%!PS" . ps-mode) | 2141 | ("%!PS" . ps-mode) |
| 2141 | ("# xmcd " . conf-unix-mode)) | 2142 | ("# xmcd " . conf-unix-mode)) |
| @@ -2434,13 +2435,14 @@ asking you for confirmation." | |||
| 2434 | 2435 | ||
| 2435 | (mapc (lambda (pair) | 2436 | (mapc (lambda (pair) |
| 2436 | (put (car pair) 'safe-local-variable (cdr pair))) | 2437 | (put (car pair) 'safe-local-variable (cdr pair))) |
| 2437 | '((buffer-read-only . booleanp) ;; C source code | 2438 | '((buffer-read-only . booleanp) ;; C source code |
| 2438 | (fill-column . integerp) ;; C source code | 2439 | (default-directory . stringp) ;; C source code |
| 2439 | (indent-tabs-mode . booleanp) ;; C source code | 2440 | (fill-column . integerp) ;; C source code |
| 2440 | (left-margin . integerp) ;; C source code | 2441 | (indent-tabs-mode . booleanp) ;; C source code |
| 2441 | (no-update-autoloads . booleanp) | 2442 | (left-margin . integerp) ;; C source code |
| 2442 | (tab-width . integerp) ;; C source code | 2443 | (no-update-autoloads . booleanp) |
| 2443 | (truncate-lines . booleanp))) ;; C source code | 2444 | (tab-width . integerp) ;; C source code |
| 2445 | (truncate-lines . booleanp))) ;; C source code | ||
| 2444 | 2446 | ||
| 2445 | (put 'c-set-style 'safe-local-eval-function t) | 2447 | (put 'c-set-style 'safe-local-eval-function t) |
| 2446 | 2448 | ||
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 4bc79fc6ee5..306cf5fd399 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -468,6 +468,7 @@ they are added at the end. | |||
| 468 | 468 | ||
| 469 | This is normally set via `font-lock-add-keywords' and | 469 | This is normally set via `font-lock-add-keywords' and |
| 470 | `font-lock-remove-keywords'.") | 470 | `font-lock-remove-keywords'.") |
| 471 | (put 'font-lock-keywords-alist 'risky-local-variable t) | ||
| 471 | 472 | ||
| 472 | (defvar font-lock-removed-keywords-alist nil | 473 | (defvar font-lock-removed-keywords-alist nil |
| 473 | "Alist of `font-lock-keywords' elements to be removed for major modes. | 474 | "Alist of `font-lock-keywords' elements to be removed for major modes. |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 8f094dd6537..b02dc6c2f8e 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2007-04-19 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * gnus-art.el (gnus-mime-strip-charset-parameters): New function. | ||
| 4 | (gnus-mime-view-part-as-charset): Use it; redisplay subpart currently | ||
| 5 | displayed of multipart/alternative part if it is invoked from summary | ||
| 6 | buffer. | ||
| 7 | (gnus-article-part-wrapper): Select article window. | ||
| 8 | |||
| 9 | * mm-view.el (mm-inline-text-html-render-with-w3m) | ||
| 10 | (mm-inline-text-html-render-with-w3m-standalone) | ||
| 11 | (mm-inline-render-with-function): Use mail-parse-charset by default. | ||
| 12 | |||
| 1 | 2007-04-10 Katsumi Yamaoka <yamaoka@jpl.org> | 13 | 2007-04-10 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 14 | ||
| 3 | * gnus-msg.el (gnus-inews-yank-articles): Use | 15 | * gnus-msg.el (gnus-inews-yank-articles): Use |
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 552f3a68f49..6ae52b5eedd 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -4606,6 +4606,21 @@ are decompressed." | |||
| 4606 | (mm-string-to-multibyte contents))) | 4606 | (mm-string-to-multibyte contents))) |
| 4607 | (goto-char b))))) | 4607 | (goto-char b))))) |
| 4608 | 4608 | ||
| 4609 | (defun gnus-mime-strip-charset-parameters (handle) | ||
| 4610 | "Strip charset parameters from HANDLE." | ||
| 4611 | (if (stringp (car handle)) | ||
| 4612 | (mapc #'gnus-mime-strip-charset-parameters (cdr handle)) | ||
| 4613 | (let* ((type (mm-handle-type (if (equal (mm-handle-media-type handle) | ||
| 4614 | "message/external-body") | ||
| 4615 | (progn | ||
| 4616 | (unless (mm-handle-cache handle) | ||
| 4617 | (mm-extern-cache-contents handle)) | ||
| 4618 | (mm-handle-cache handle)) | ||
| 4619 | handle))) | ||
| 4620 | (charset (assq 'charset (cdr type)))) | ||
| 4621 | (when charset | ||
| 4622 | (delq charset type))))) | ||
| 4623 | |||
| 4609 | (defun gnus-mime-view-part-as-charset (&optional handle arg) | 4624 | (defun gnus-mime-view-part-as-charset (&optional handle arg) |
| 4610 | "Insert the MIME part under point into the current buffer using the | 4625 | "Insert the MIME part under point into the current buffer using the |
| 4611 | specified charset." | 4626 | specified charset." |
| @@ -4614,7 +4629,7 @@ specified charset." | |||
| 4614 | (let ((handle (or handle (get-text-property (point) 'gnus-data))) | 4629 | (let ((handle (or handle (get-text-property (point) 'gnus-data))) |
| 4615 | (fun (get-text-property (point) 'gnus-callback)) | 4630 | (fun (get-text-property (point) 'gnus-callback)) |
| 4616 | (gnus-newsgroup-ignored-charsets 'gnus-all) | 4631 | (gnus-newsgroup-ignored-charsets 'gnus-all) |
| 4617 | gnus-newsgroup-charset type charset) | 4632 | gnus-newsgroup-charset form preferred parts) |
| 4618 | (when handle | 4633 | (when handle |
| 4619 | (if (mm-handle-undisplayer handle) | 4634 | (if (mm-handle-undisplayer handle) |
| 4620 | (mm-remove-part handle)) | 4635 | (mm-remove-part handle)) |
| @@ -4622,17 +4637,24 @@ specified charset." | |||
| 4622 | (setq gnus-newsgroup-charset | 4637 | (setq gnus-newsgroup-charset |
| 4623 | (or (cdr (assq arg gnus-summary-show-article-charset-alist)) | 4638 | (or (cdr (assq arg gnus-summary-show-article-charset-alist)) |
| 4624 | (mm-read-coding-system "Charset: "))) | 4639 | (mm-read-coding-system "Charset: "))) |
| 4625 | ;; Strip the charset parameter from `handle'. | 4640 | (gnus-mime-strip-charset-parameters handle) |
| 4626 | (setq type (mm-handle-type | 4641 | (when (and (consp (setq form (cdr-safe fun))) |
| 4627 | (if (equal (mm-handle-media-type handle) | 4642 | (setq form (ignore-errors |
| 4628 | "message/external-body") | 4643 | (assq 'gnus-mime-display-alternative form))) |
| 4629 | (progn | 4644 | (setq preferred (caddr form)) |
| 4630 | (unless (mm-handle-cache handle) | 4645 | (progn |
| 4631 | (mm-extern-cache-contents handle)) | 4646 | (when (eq (car preferred) 'quote) |
| 4632 | (mm-handle-cache handle)) | 4647 | (setq preferred (cadr preferred))) |
| 4633 | handle)) | 4648 | (not (equal preferred |
| 4634 | charset (assq 'charset (cdr type))) | 4649 | (get-text-property (point) 'gnus-data)))) |
| 4635 | (delq charset type) | 4650 | (setq parts (get-text-property (point) 'gnus-part)) |
| 4651 | (setq parts (cdr (assq parts | ||
| 4652 | gnus-article-mime-handle-alist))) | ||
| 4653 | (equal (mm-handle-media-type parts) "multipart/alternative") | ||
| 4654 | (setq parts (reverse (cdr parts)))) | ||
| 4655 | (setcar (cddr form) | ||
| 4656 | (list 'quote (or (cadr (member preferred parts)) | ||
| 4657 | (car parts))))) | ||
| 4636 | (funcall fun handle))))) | 4658 | (funcall fun handle))))) |
| 4637 | 4659 | ||
| 4638 | (defun gnus-mime-view-part-externally (&optional handle) | 4660 | (defun gnus-mime-view-part-externally (&optional handle) |
| @@ -4688,13 +4710,22 @@ If no internal viewer is available, use an external viewer." | |||
| 4688 | (funcall (cdr action-pair))))) | 4710 | (funcall (cdr action-pair))))) |
| 4689 | 4711 | ||
| 4690 | (defun gnus-article-part-wrapper (n function) | 4712 | (defun gnus-article-part-wrapper (n function) |
| 4691 | (save-current-buffer | 4713 | (let ((window (get-buffer-window gnus-article-buffer 'visible)) |
| 4692 | (set-buffer gnus-article-buffer) | 4714 | frame) |
| 4693 | (when (> n (length gnus-article-mime-handle-alist)) | 4715 | (when window |
| 4694 | (error "No such part")) | 4716 | ;; It is necessary to select the article window so that |
| 4695 | (gnus-article-goto-part n) | 4717 | ;; `gnus-article-goto-part' may really move the point. |
| 4696 | (let ((handle (cdr (assq n gnus-article-mime-handle-alist)))) | 4718 | (setq frame (selected-frame)) |
| 4697 | (funcall function handle)))) | 4719 | (gnus-select-frame-set-input-focus (window-frame window)) |
| 4720 | (unwind-protect | ||
| 4721 | (save-window-excursion | ||
| 4722 | (select-window window) | ||
| 4723 | (when (> n (length gnus-article-mime-handle-alist)) | ||
| 4724 | (error "No such part")) | ||
| 4725 | (gnus-article-goto-part n) | ||
| 4726 | (let ((handle (cdr (assq n gnus-article-mime-handle-alist)))) | ||
| 4727 | (funcall function handle))) | ||
| 4728 | (gnus-select-frame-set-input-focus frame))))) | ||
| 4698 | 4729 | ||
| 4699 | (defun gnus-article-pipe-part (n) | 4730 | (defun gnus-article-pipe-part (n) |
| 4700 | "Pipe MIME part N, which is the numerical prefix." | 4731 | "Pipe MIME part N, which is the numerical prefix." |
diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el index 14d480fe7df..888c814bf24 100644 --- a/lisp/gnus/mm-view.el +++ b/lisp/gnus/mm-view.el | |||
| @@ -238,7 +238,8 @@ | |||
| 238 | (mm-setup-w3m) | 238 | (mm-setup-w3m) |
| 239 | (let ((text (mm-get-part handle)) | 239 | (let ((text (mm-get-part handle)) |
| 240 | (b (point)) | 240 | (b (point)) |
| 241 | (charset (mail-content-type-get (mm-handle-type handle) 'charset))) | 241 | (charset (or (mail-content-type-get (mm-handle-type handle) 'charset) |
| 242 | mail-parse-charset))) | ||
| 242 | (save-excursion | 243 | (save-excursion |
| 243 | (insert (if charset (mm-decode-string text charset) text)) | 244 | (insert (if charset (mm-decode-string text charset) text)) |
| 244 | (save-restriction | 245 | (save-restriction |
| @@ -302,7 +303,9 @@ | |||
| 302 | "Render a text/html part using w3m." | 303 | "Render a text/html part using w3m." |
| 303 | (if (mm-w3m-standalone-supports-m17n-p) | 304 | (if (mm-w3m-standalone-supports-m17n-p) |
| 304 | (let ((source (mm-get-part handle)) | 305 | (let ((source (mm-get-part handle)) |
| 305 | (charset (mail-content-type-get (mm-handle-type handle) 'charset)) | 306 | (charset (or (mail-content-type-get (mm-handle-type handle) |
| 307 | 'charset) | ||
| 308 | (symbol-name mail-parse-charset))) | ||
| 306 | cs) | 309 | cs) |
| 307 | (unless (and charset | 310 | (unless (and charset |
| 308 | (setq cs (mm-charset-to-coding-system charset)) | 311 | (setq cs (mm-charset-to-coding-system charset)) |
| @@ -368,7 +371,8 @@ | |||
| 368 | 371 | ||
| 369 | (defun mm-inline-render-with-function (handle func &rest args) | 372 | (defun mm-inline-render-with-function (handle func &rest args) |
| 370 | (let ((source (mm-get-part handle)) | 373 | (let ((source (mm-get-part handle)) |
| 371 | (charset (mail-content-type-get (mm-handle-type handle) 'charset))) | 374 | (charset (or (mail-content-type-get (mm-handle-type handle) 'charset) |
| 375 | mail-parse-charset))) | ||
| 372 | (mm-insert-inline | 376 | (mm-insert-inline |
| 373 | handle | 377 | handle |
| 374 | (mm-with-multibyte-buffer | 378 | (mm-with-multibyte-buffer |
diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index 889b13cfa59..d97d0407ab8 100644 --- a/lisp/hi-lock.el +++ b/lisp/hi-lock.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; Copyright (C) 2000, 2001, 2002, 2003, 2004, | 3 | ;; Copyright (C) 2000, 2001, 2002, 2003, 2004, |
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: David M. Koppelman, koppel@ee.lsu.edu | 6 | ;; Author: David M. Koppelman, koppel@ece.lsu.edu |
| 7 | ;; Keywords: faces, minor-mode, matching, display | 7 | ;; Keywords: faces, minor-mode, matching, display |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| @@ -33,7 +33,8 @@ | |||
| 33 | ;; will remove the highlighting. Any existing face can be used for | 33 | ;; will remove the highlighting. Any existing face can be used for |
| 34 | ;; highlighting and a set of appropriate faces is provided. The | 34 | ;; highlighting and a set of appropriate faces is provided. The |
| 35 | ;; regexps can be written into the current buffer in a form that will | 35 | ;; regexps can be written into the current buffer in a form that will |
| 36 | ;; be recognized the next time the corresponding file is read. | 36 | ;; be recognized the next time the corresponding file is read (when |
| 37 | ;; file patterns is turned on). | ||
| 37 | ;; | 38 | ;; |
| 38 | ;; Applications: | 39 | ;; Applications: |
| 39 | ;; | 40 | ;; |
| @@ -60,6 +61,14 @@ | |||
| 60 | ;; | 61 | ;; |
| 61 | ;; (global-hi-lock-mode 1) | 62 | ;; (global-hi-lock-mode 1) |
| 62 | ;; | 63 | ;; |
| 64 | ;; To enable the use of patterns found in files (presumably placed | ||
| 65 | ;; there by hi-lock) include the following in your .emacs file: | ||
| 66 | ;; | ||
| 67 | ;; (setq hi-lock-file-patterns-policy 'ask) | ||
| 68 | ;; | ||
| 69 | ;; If you get tired of being asked each time a file is loaded replace | ||
| 70 | ;; `ask' with a function that returns t if patterns should be read. | ||
| 71 | ;; | ||
| 63 | ;; You might also want to bind the hi-lock commands to more | 72 | ;; You might also want to bind the hi-lock commands to more |
| 64 | ;; finger-friendly sequences: | 73 | ;; finger-friendly sequences: |
| 65 | 74 | ||
| @@ -115,6 +124,20 @@ calls." | |||
| 115 | :type '(repeat symbol) | 124 | :type '(repeat symbol) |
| 116 | :group 'hi-lock) | 125 | :group 'hi-lock) |
| 117 | 126 | ||
| 127 | (defcustom hi-lock-file-patterns-policy 'never | ||
| 128 | "Specify when hi-lock should use patterns found in file. | ||
| 129 | If `ask', prompt when patterns found in buffer; if bound to a function, | ||
| 130 | use patterns when function returns t (function is called with patterns | ||
| 131 | as first argument); if nil or `never' or anything else, don't use file | ||
| 132 | patterns." | ||
| 133 | :type '(choice (const :tag "Do not use file patterns" never) | ||
| 134 | (const :tag "Ask about file patterns" ask) | ||
| 135 | (function :tag "Function to check file patterns")) | ||
| 136 | :group 'hi-lock | ||
| 137 | :version "22.1") | ||
| 138 | |||
| 139 | ;; It can have a function value. | ||
| 140 | (put 'hi-lock-file-patterns-policy 'risky-local-variable t) | ||
| 118 | 141 | ||
| 119 | (defgroup hi-lock-faces nil | 142 | (defgroup hi-lock-faces nil |
| 120 | "Faces for hi-lock." | 143 | "Faces for hi-lock." |
| @@ -196,7 +219,7 @@ calls." | |||
| 196 | "History of regexps used for interactive fontification.") | 219 | "History of regexps used for interactive fontification.") |
| 197 | 220 | ||
| 198 | (defvar hi-lock-file-patterns-prefix "Hi-lock" | 221 | (defvar hi-lock-file-patterns-prefix "Hi-lock" |
| 199 | "Regexp for finding hi-lock patterns at top of file.") | 222 | "Search target for finding hi-lock patterns at top of file.") |
| 200 | 223 | ||
| 201 | (defvar hi-lock-archaic-interface-message-used nil | 224 | (defvar hi-lock-archaic-interface-message-used nil |
| 202 | "True if user alerted that `global-hi-lock-mode' is now the global switch. | 225 | "True if user alerted that `global-hi-lock-mode' is now the global switch. |
| @@ -283,17 +306,22 @@ called interactively, are: | |||
| 283 | Remove highlighting on matches of REGEXP in current buffer. | 306 | Remove highlighting on matches of REGEXP in current buffer. |
| 284 | 307 | ||
| 285 | \\[hi-lock-write-interactive-patterns] | 308 | \\[hi-lock-write-interactive-patterns] |
| 286 | Write active REGEXPs into buffer as comments (if possible). They will | 309 | Write active REGEXPs into buffer as comments (if possible). They may |
| 287 | be read the next time file is loaded or when the \\[hi-lock-find-patterns] command | 310 | be read the next time file is loaded or when the \\[hi-lock-find-patterns] command |
| 288 | is issued. The inserted regexps are in the form of font lock keywords. | 311 | is issued. The inserted regexps are in the form of font lock keywords. |
| 289 | (See `font-lock-keywords'.) They may be edited and re-loaded with \\[hi-lock-find-patterns], | 312 | (See `font-lock-keywords'.) They may be edited and re-loaded with \\[hi-lock-find-patterns], |
| 290 | any valid `font-lock-keywords' form is acceptable. | 313 | any valid `font-lock-keywords' form is acceptable. When a file is |
| 314 | loaded the patterns are read if `hi-lock-file-patterns-policy is | ||
| 315 | 'ask and the user responds y to the prompt, or if | ||
| 316 | `hi-lock-file-patterns-policy' is bound to a function and that | ||
| 317 | function returns t. | ||
| 291 | 318 | ||
| 292 | \\[hi-lock-find-patterns] | 319 | \\[hi-lock-find-patterns] |
| 293 | Re-read patterns stored in buffer (in the format produced by \\[hi-lock-write-interactive-patterns]). | 320 | Re-read patterns stored in buffer (in the format produced by \\[hi-lock-write-interactive-patterns]). |
| 294 | 321 | ||
| 295 | When hi-lock is started and if the mode is not excluded, the | 322 | When hi-lock is started and if the mode is not excluded or patterns |
| 296 | beginning of the buffer is searched for lines of the form: | 323 | rejected, the beginning of the buffer is searched for lines of the |
| 324 | form: | ||
| 297 | Hi-lock: FOO | 325 | Hi-lock: FOO |
| 298 | where FOO is a list of patterns. These are added to the font lock | 326 | where FOO is a list of patterns. These are added to the font lock |
| 299 | keywords already present. The patterns must start before position | 327 | keywords already present. The patterns must start before position |
| @@ -590,9 +618,18 @@ not suitable." | |||
| 590 | (setq all-patterns (append (read (current-buffer)) all-patterns)) | 618 | (setq all-patterns (append (read (current-buffer)) all-patterns)) |
| 591 | (error (message "Invalid pattern list expression at %d" | 619 | (error (message "Invalid pattern list expression at %d" |
| 592 | (line-number-at-pos))))))) | 620 | (line-number-at-pos))))))) |
| 593 | (when hi-lock-mode (hi-lock-set-file-patterns all-patterns)) | 621 | (when (and all-patterns |
| 594 | (if (interactive-p) | 622 | hi-lock-mode |
| 595 | (message "Hi-lock added %d patterns." (length all-patterns)))))) | 623 | (cond |
| 624 | ((eq this-command 'hi-lock-find-patterns) t) | ||
| 625 | ((functionp hi-lock-file-patterns-policy) | ||
| 626 | (funcall hi-lock-file-patterns-policy all-patterns)) | ||
| 627 | ((eq hi-lock-file-patterns-policy 'ask) | ||
| 628 | (y-or-n-p "Add patterns from this buffer to hi-lock? ")) | ||
| 629 | (t nil))) | ||
| 630 | (hi-lock-set-file-patterns all-patterns) | ||
| 631 | (if (interactive-p) | ||
| 632 | (message "Hi-lock added %d patterns." (length all-patterns))))))) | ||
| 596 | 633 | ||
| 597 | (defun hi-lock-font-lock-hook () | 634 | (defun hi-lock-font-lock-hook () |
| 598 | "Add hi-lock patterns to font-lock's." | 635 | "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." | |||
| 3817 | If cursor is not at the end of the user input, delete to end of input." | 3817 | If cursor is not at the end of the user input, delete to end of input." |
| 3818 | (interactive) | 3818 | (interactive) |
| 3819 | (if (not (eobp)) | 3819 | (if (not (eobp)) |
| 3820 | (kill-line) | 3820 | (delete-region (point) (line-end-position)) |
| 3821 | (let ((enable-recursive-minibuffers t) | 3821 | (let ((enable-recursive-minibuffers t) |
| 3822 | (buf (ido-name (car ido-matches)))) | 3822 | (buf (ido-name (car ido-matches)))) |
| 3823 | (when buf | 3823 | (when buf |
| @@ -3835,7 +3835,7 @@ If cursor is not at the end of the user input, delete to end of input." | |||
| 3835 | If cursor is not at the end of the user input, delete to end of input." | 3835 | If cursor is not at the end of the user input, delete to end of input." |
| 3836 | (interactive) | 3836 | (interactive) |
| 3837 | (if (not (eobp)) | 3837 | (if (not (eobp)) |
| 3838 | (kill-line) | 3838 | (delete-region (point) (line-end-position)) |
| 3839 | (let ((enable-recursive-minibuffers t) | 3839 | (let ((enable-recursive-minibuffers t) |
| 3840 | (file (ido-name (car ido-matches)))) | 3840 | (file (ido-name (car ido-matches)))) |
| 3841 | (if file | 3841 | (if file |
diff --git a/lisp/tumme.el b/lisp/image-dired.el index 8d4527d8ff4..ed330410d88 100644 --- a/lisp/tumme.el +++ b/lisp/image-dired.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; tumme.el --- use dired to browse and manipulate your images | 1 | ;;; image-dired.el --- use dired to browse and manipulate your images |
| 2 | ;; | 2 | ;; |
| 3 | ;; Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. |
| 4 | ;; | 4 | ;; |
| @@ -45,20 +45,15 @@ | |||
| 45 | ;; powerful than this package, it did not work the way I wanted to. It | 45 | ;; powerful than this package, it did not work the way I wanted to. It |
| 46 | ;; was too slow to created thumbnails of all files in a directory (I | 46 | ;; was too slow to created thumbnails of all files in a directory (I |
| 47 | ;; currently keep all my 2000+ images in the same directory) and | 47 | ;; currently keep all my 2000+ images in the same directory) and |
| 48 | ;; browsing the thumbnail buffer was slow too. tumme.el will not | 48 | ;; browsing the thumbnail buffer was slow too. image-dired.el will not |
| 49 | ;; create thumbnails until they are needed and the browsing is done | 49 | ;; create thumbnails until they are needed and the browsing is done |
| 50 | ;; quickly and easily in dired. I copied a great deal of ideas and | 50 | ;; quickly and easily in dired. I copied a great deal of ideas and |
| 51 | ;; code from there though... :) | 51 | ;; code from there though... :) |
| 52 | ;; | 52 | ;; |
| 53 | ;; About the name: tumme means thumb in Swedish and it is used for | 53 | ;; `image-dired' stores the thumbnail files in `image-dired-dir' |
| 54 | ;; working with thumbnails, so... :) If you want to know how to | 54 | ;; using the file name format ORIGNAME.thumb.ORIGEXT. For example |
| 55 | ;; pronounce it, go to the page on EmacsWiki and download the .ogg | 55 | ;; ~/.emacs.d/image-dired/myimage01.thumb.jpg. The "database" is for |
| 56 | ;; file from there. | 56 | ;; now just a plain text file with the following format: |
| 57 | ;; | ||
| 58 | ;; `tumme' stores the thumbnail files in `tumme-dir' using the file | ||
| 59 | ;; name format ORIGNAME.thumb.ORIGEXT. For example | ||
| 60 | ;; ~/.emacs.d/tumme/myimage01.thumb.jpg. The "database" is for now | ||
| 61 | ;; just a plain text file with the following format: | ||
| 62 | ;; | 57 | ;; |
| 63 | ;; file-name-non-directory;comment:comment-text;tag1;tag2;tag3;...;tagN | 58 | ;; file-name-non-directory;comment:comment-text;tag1;tag2;tag3;...;tagN |
| 64 | ;; | 59 | ;; |
| @@ -72,13 +67,13 @@ | |||
| 72 | ;; * For non-lossy rotation of JPEG images, the JpegTRAN program is | 67 | ;; * For non-lossy rotation of JPEG images, the JpegTRAN program is |
| 73 | ;; needed. | 68 | ;; needed. |
| 74 | ;; | 69 | ;; |
| 75 | ;; * For `tumme-get-exif-data' and `tumme-write-exif-data' to work, | 70 | ;; * For `image-dired-get-exif-data' and `image-dired-write-exif-data' to work, |
| 76 | ;; the command line tool `exiftool' is needed. It can be found here: | 71 | ;; the command line tool `exiftool' is needed. It can be found here: |
| 77 | ;; http://www.sno.phy.queensu.ca/~phil/exiftool/. These two functions | 72 | ;; http://www.sno.phy.queensu.ca/~phil/exiftool/. These two functions |
| 78 | ;; are, among other things, used for writing comments to image files | 73 | ;; are, among other things, used for writing comments to image files |
| 79 | ;; using `tumme-thumbnail-set-image-description' and to create | 74 | ;; using `image-dired-thumbnail-set-image-description' and to create |
| 80 | ;; "unique" file names using `tumme-get-exif-file-name' (used by | 75 | ;; "unique" file names using `image-dired-get-exif-file-name' (used by |
| 81 | ;; `tumme-copy-with-exif-file-name'). | 76 | ;; `image-dired-copy-with-exif-file-name'). |
| 82 | ;; | 77 | ;; |
| 83 | ;; | 78 | ;; |
| 84 | ;; USAGE | 79 | ;; USAGE |
| @@ -88,7 +83,7 @@ | |||
| 88 | ;; the Emacs manual and go to the node Thumbnails by typing `g | 83 | ;; the Emacs manual and go to the node Thumbnails by typing `g |
| 89 | ;; Thumbnails RET'. | 84 | ;; Thumbnails RET'. |
| 90 | ;; | 85 | ;; |
| 91 | ;; Quickstart: M-x tumme RET DIRNAME RET | 86 | ;; Quickstart: M-x image-dired RET DIRNAME RET |
| 92 | ;; | 87 | ;; |
| 93 | ;; where DIRNAME is a directory containing image files. | 88 | ;; where DIRNAME is a directory containing image files. |
| 94 | ;; | 89 | ;; |
| @@ -99,7 +94,7 @@ | |||
| 99 | ;; the thumbnails are hard-coded to JPEG format. | 94 | ;; the thumbnails are hard-coded to JPEG format. |
| 100 | ;; | 95 | ;; |
| 101 | ;; * WARNING: The "database" format used might be changed so keep a | 96 | ;; * WARNING: The "database" format used might be changed so keep a |
| 102 | ;; backup of `tumme-db-file' when testing new versions. | 97 | ;; backup of `image-dired-db-file' when testing new versions. |
| 103 | ;; | 98 | ;; |
| 104 | ;; | 99 | ;; |
| 105 | ;; TODO | 100 | ;; TODO |
| @@ -122,7 +117,7 @@ | |||
| 122 | ;; | 117 | ;; |
| 123 | ;; * From thumbs.el: Add setroot function. | 118 | ;; * From thumbs.el: Add setroot function. |
| 124 | ;; | 119 | ;; |
| 125 | ;; * From thumbs.el: Add image resizing, if useful (tumme's automatic | 120 | ;; * From thumbs.el: Add image resizing, if useful (image-dired's automatic |
| 126 | ;; "image fit" might be enough) | 121 | ;; "image fit" might be enough) |
| 127 | ;; | 122 | ;; |
| 128 | ;; * From thumbs.el: Add the "modify" commands (emboss, negate, | 123 | ;; * From thumbs.el: Add the "modify" commands (emboss, negate, |
| @@ -130,26 +125,26 @@ | |||
| 130 | ;; | 125 | ;; |
| 131 | ;; * Asynchronous creation of thumbnails. | 126 | ;; * Asynchronous creation of thumbnails. |
| 132 | ;; | 127 | ;; |
| 133 | ;; * Add `tumme-display-thumbs-ring' and functions to cycle that. Find | 128 | ;; * Add `image-dired-display-thumbs-ring' and functions to cycle that. Find |
| 134 | ;; out which is best, saving old batch just before inserting new, or | 129 | ;; out which is best, saving old batch just before inserting new, or |
| 135 | ;; saving the current batch in the ring when inserting it. Adding it | 130 | ;; saving the current batch in the ring when inserting it. Adding it |
| 136 | ;; probably needs rewriting `tumme-display-thumbs' to be more general. | 131 | ;; probably needs rewriting `image-dired-display-thumbs' to be more general. |
| 137 | ;; | 132 | ;; |
| 138 | ;; * Find some way of toggling on and off really nice keybindings in | 133 | ;; * Find some way of toggling on and off really nice keybindings in |
| 139 | ;; dired (for example, using C-n or <down> instead of C-S-n). Richard | 134 | ;; dired (for example, using C-n or <down> instead of C-S-n). Richard |
| 140 | ;; suggested that we could keep C-t as prefix for tumme commands as it | 135 | ;; suggested that we could keep C-t as prefix for image-dired commands |
| 141 | ;; is currently not used in dired. He also suggested that | 136 | ;; as it is currently not used in dired. He also suggested that |
| 142 | ;; `dired-next-line' and `dired-previous-line' figure out if tumme is | 137 | ;; `dired-next-line' and `dired-previous-line' figure out if |
| 143 | ;; enabled in the current buffer and, if it is, call | 138 | ;; image-dired is enabled in the current buffer and, if it is, call |
| 144 | ;; `tumme-dired-next-line' and `tumme-dired-previous-line', | 139 | ;; `image-dired-dired-next-line' and |
| 145 | ;; respectively. Update: This is partly done; some bindings have now | 140 | ;; `image-dired-dired-previous-line', respectively. Update: This is |
| 146 | ;; been added to dired. | 141 | ;; partly done; some bindings have now been added to dired. |
| 147 | ;; | 142 | ;; |
| 148 | ;; * Enhanced gallery creation with basic CSS-support and pagination | 143 | ;; * Enhanced gallery creation with basic CSS-support and pagination |
| 149 | ;; of tag pages with many pictures. | 144 | ;; of tag pages with many pictures. |
| 150 | ;; | 145 | ;; |
| 151 | ;; * Rewrite `tumme-modify-mark-on-thumb-original-file' to be less | 146 | ;; * Rewrite `image-dired-modify-mark-on-thumb-original-file' to be |
| 152 | ;; ugly. | 147 | ;; less ugly. |
| 153 | ;; | 148 | ;; |
| 154 | ;; * In some way keep track of buffers and windows and stuff so that | 149 | ;; * In some way keep track of buffers and windows and stuff so that |
| 155 | ;; it works as the user expects. | 150 | ;; it works as the user expects. |
| @@ -166,135 +161,135 @@ | |||
| 166 | (eval-when-compile | 161 | (eval-when-compile |
| 167 | (require 'wid-edit)) | 162 | (require 'wid-edit)) |
| 168 | 163 | ||
| 169 | (defgroup tumme nil | 164 | (defgroup image-dired nil |
| 170 | "Use dired to browse your images as thumbnails, and more." | 165 | "Use dired to browse your images as thumbnails, and more." |
| 171 | :prefix "tumme-" | 166 | :prefix "image-dired-" |
| 172 | :group 'multimedia) | 167 | :group 'multimedia) |
| 173 | 168 | ||
| 174 | (defcustom tumme-dir "~/.emacs.d/tumme/" | 169 | (defcustom image-dired-dir "~/.emacs.d/image-dired/" |
| 175 | "Directory where thumbnail images are stored." | 170 | "Directory where thumbnail images are stored." |
| 176 | :type 'string | 171 | :type 'string |
| 177 | :group 'tumme) | 172 | :group 'image-dired) |
| 178 | 173 | ||
| 179 | (defcustom tumme-thumbnail-storage 'use-tumme-dir | 174 | (defcustom image-dired-thumbnail-storage 'use-image-dired-dir |
| 180 | "How to store tumme's thumbnail files. | 175 | "How to store image-dired's thumbnail files. |
| 181 | Tumme can store thumbnail files in one of two ways and this is | 176 | Image-Dired can store thumbnail files in one of two ways and this is |
| 182 | controlled by this variable. \"Use tumme dir\" means that the | 177 | controlled by this variable. \"Use image-dired dir\" means that the |
| 183 | thumbnails are stored in a central directory. \"Per directory\" | 178 | thumbnails are stored in a central directory. \"Per directory\" |
| 184 | means that each thumbnail is stored in a subdirectory called | 179 | means that each thumbnail is stored in a subdirectory called |
| 185 | \".tumme\" in the same directory where the image file is. | 180 | \".image-dired\" in the same directory where the image file is. |
| 186 | \"Thumbnail Managing Standard\" means that the thumbnails are | 181 | \"Thumbnail Managing Standard\" means that the thumbnails are |
| 187 | stored and generated according to the Thumbnail Managing Standard | 182 | stored and generated according to the Thumbnail Managing Standard |
| 188 | that allows sharing of thumbnails across different programs." | 183 | that allows sharing of thumbnails across different programs." |
| 189 | :type '(choice :tag "How to store thumbnail files" | 184 | :type '(choice :tag "How to store thumbnail files" |
| 190 | (const :tag "Thumbnail Managing Standard" standard) | 185 | (const :tag "Thumbnail Managing Standard" standard) |
| 191 | (const :tag "Use tumme-dir" use-tumme-dir) | 186 | (const :tag "Use image-dired-dir" use-image-dired-dir) |
| 192 | (const :tag "Per-directory" per-directory)) | 187 | (const :tag "Per-directory" per-directory)) |
| 193 | :group 'tumme) | 188 | :group 'image-dired) |
| 194 | 189 | ||
| 195 | (defcustom tumme-db-file "~/.emacs.d/tumme/.tumme_db" | 190 | (defcustom image-dired-db-file "~/.emacs.d/image-dired/.image-dired_db" |
| 196 | "Database file where file names and their associated tags are stored." | 191 | "Database file where file names and their associated tags are stored." |
| 197 | :type 'string | 192 | :type 'string |
| 198 | :group 'tumme) | 193 | :group 'image-dired) |
| 199 | 194 | ||
| 200 | (defcustom tumme-temp-image-file "~/.emacs.d/tumme/.tumme_temp" | 195 | (defcustom image-dired-temp-image-file "~/.emacs.d/image-dired/.image-dired_temp" |
| 201 | "Name of temporary image file used by various commands." | 196 | "Name of temporary image file used by various commands." |
| 202 | :type 'string | 197 | :type 'string |
| 203 | :group 'tumme) | 198 | :group 'image-dired) |
| 204 | 199 | ||
| 205 | (defcustom tumme-gallery-dir "~/.emacs.d/tumme/.tumme_gallery" | 200 | (defcustom image-dired-gallery-dir "~/.emacs.d/image-dired/.image-dired_gallery" |
| 206 | "Directory to store generated gallery html pages. | 201 | "Directory to store generated gallery html pages. |
| 207 | This path needs to be \"shared\" to the public so that it can access | 202 | This path needs to be \"shared\" to the public so that it can access |
| 208 | the index.html page that tumme creates." | 203 | the index.html page that image-dired creates." |
| 209 | :type 'string | 204 | :type 'string |
| 210 | :group 'tumme) | 205 | :group 'image-dired) |
| 211 | 206 | ||
| 212 | (defcustom tumme-gallery-image-root-url | 207 | (defcustom image-dired-gallery-image-root-url |
| 213 | "http://your.own.server/tummepics" | 208 | "http://your.own.server/image-diredpics" |
| 214 | "URL where the full size images are to be found. | 209 | "URL where the full size images are to be found. |
| 215 | Note that this path has to be configured in your web server. Tumme | 210 | Note that this path has to be configured in your web server. Image-Dired |
| 216 | expects to find pictures in this directory." | 211 | expects to find pictures in this directory." |
| 217 | :type 'string | 212 | :type 'string |
| 218 | :group 'tumme) | 213 | :group 'image-dired) |
| 219 | 214 | ||
| 220 | (defcustom tumme-gallery-thumb-image-root-url | 215 | (defcustom image-dired-gallery-thumb-image-root-url |
| 221 | "http://your.own.server/tummethumbs" | 216 | "http://your.own.server/image-diredthumbs" |
| 222 | "URL where the thumbnail images are to be found. | 217 | "URL where the thumbnail images are to be found. |
| 223 | Note that this path has to be configured in your web server. Tumme | 218 | Note that this path has to be configured in your web server. Image-Dired |
| 224 | expects to find pictures in this directory." | 219 | expects to find pictures in this directory." |
| 225 | :type 'string | 220 | :type 'string |
| 226 | :group 'tumme) | 221 | :group 'image-dired) |
| 227 | 222 | ||
| 228 | (defcustom tumme-cmd-create-thumbnail-program | 223 | (defcustom image-dired-cmd-create-thumbnail-program |
| 229 | "convert" | 224 | "convert" |
| 230 | "Executable used to create thumbnail. | 225 | "Executable used to create thumbnail. |
| 231 | Used together with `tumme-cmd-create-thumbnail-options'." | 226 | Used together with `image-dired-cmd-create-thumbnail-options'." |
| 232 | :type 'string | 227 | :type 'string |
| 233 | :group 'tumme) | 228 | :group 'image-dired) |
| 234 | 229 | ||
| 235 | (defcustom tumme-cmd-create-thumbnail-options | 230 | (defcustom image-dired-cmd-create-thumbnail-options |
| 236 | "%p -size %wx%h \"%f\" -resize %wx%h +profile \"*\" jpeg:\"%t\"" | 231 | "%p -size %wx%h \"%f\" -resize %wx%h +profile \"*\" jpeg:\"%t\"" |
| 237 | "Format of command used to create thumbnail image. | 232 | "Format of command used to create thumbnail image. |
| 238 | Available options are %p which is replaced by | 233 | Available options are %p which is replaced by |
| 239 | `tumme-cmd-create-thumbnail-program', %w which is replaced by | 234 | `image-dired-cmd-create-thumbnail-program', %w which is replaced by |
| 240 | `tumme-thumb-width', %h which is replaced by `tumme-thumb-height', | 235 | `image-dired-thumb-width', %h which is replaced by `image-dired-thumb-height', |
| 241 | %f which is replaced by the file name of the original image and %t | 236 | %f which is replaced by the file name of the original image and %t |
| 242 | which is replaced by the file name of the thumbnail file." | 237 | which is replaced by the file name of the thumbnail file." |
| 243 | :type 'string | 238 | :type 'string |
| 244 | :group 'tumme) | 239 | :group 'image-dired) |
| 245 | 240 | ||
| 246 | (defcustom tumme-cmd-create-temp-image-program | 241 | (defcustom image-dired-cmd-create-temp-image-program |
| 247 | "convert" | 242 | "convert" |
| 248 | "Executable used to create temporary image. | 243 | "Executable used to create temporary image. |
| 249 | Used together with `tumme-cmd-create-temp-image-options'." | 244 | Used together with `image-dired-cmd-create-temp-image-options'." |
| 250 | :type 'string | 245 | :type 'string |
| 251 | :group 'tumme) | 246 | :group 'image-dired) |
| 252 | 247 | ||
| 253 | (defcustom tumme-cmd-create-temp-image-options | 248 | (defcustom image-dired-cmd-create-temp-image-options |
| 254 | "%p -size %wx%h \"%f\" -resize %wx%h +profile \"*\" jpeg:\"%t\"" | 249 | "%p -size %wx%h \"%f\" -resize %wx%h +profile \"*\" jpeg:\"%t\"" |
| 255 | "Format of command used to create temporary image for display window. | 250 | "Format of command used to create temporary image for display window. |
| 256 | Available options are %p which is replaced by | 251 | Available options are %p which is replaced by |
| 257 | `tumme-cmd-create-temp-image-program', %w and %h which is replaced by | 252 | `image-dired-cmd-create-temp-image-program', %w and %h which is replaced by |
| 258 | the calculated max size for width and height in the image display window, | 253 | the calculated max size for width and height in the image display window, |
| 259 | %f which is replaced by the file name of the original image and %t which | 254 | %f which is replaced by the file name of the original image and %t which |
| 260 | is replaced by the file name of the temporary file." | 255 | is replaced by the file name of the temporary file." |
| 261 | :type 'string | 256 | :type 'string |
| 262 | :group 'tumme) | 257 | :group 'image-dired) |
| 263 | 258 | ||
| 264 | (defcustom tumme-cmd-pngnq-program (executable-find "pngnq") | 259 | (defcustom image-dired-cmd-pngnq-program (executable-find "pngnq") |
| 265 | "The file name of the `pngnq' program. | 260 | "The file name of the `pngnq' program. |
| 266 | It quantizes colors of PNG images down to 256 colors." | 261 | It quantizes colors of PNG images down to 256 colors." |
| 267 | :type '(choice (const :tag "Not Set" nil) string) | 262 | :type '(choice (const :tag "Not Set" nil) string) |
| 268 | :group 'tumme) | 263 | :group 'image-dired) |
| 269 | 264 | ||
| 270 | (defcustom tumme-cmd-pngcrush-program (executable-find "pngcrush") | 265 | (defcustom image-dired-cmd-pngcrush-program (executable-find "pngcrush") |
| 271 | "The file name of the `pngcrush' program. | 266 | "The file name of the `pngcrush' program. |
| 272 | It optimizes the compression of PNG images. Also it adds PNG textual chunks | 267 | It optimizes the compression of PNG images. Also it adds PNG textual chunks |
| 273 | with the information required by the Thumbnail Managing Standard." | 268 | with the information required by the Thumbnail Managing Standard." |
| 274 | :type '(choice (const :tag "Not Set" nil) string) | 269 | :type '(choice (const :tag "Not Set" nil) string) |
| 275 | :group 'tumme) | 270 | :group 'image-dired) |
| 276 | 271 | ||
| 277 | (defcustom tumme-cmd-create-standard-thumbnail-command | 272 | (defcustom image-dired-cmd-create-standard-thumbnail-command |
| 278 | (concat | 273 | (concat |
| 279 | tumme-cmd-create-thumbnail-program " " | 274 | image-dired-cmd-create-thumbnail-program " " |
| 280 | "-size %wx%h \"%f\" " | 275 | "-size %wx%h \"%f\" " |
| 281 | (unless (or tumme-cmd-pngcrush-program tumme-cmd-pngnq-program) | 276 | (unless (or image-dired-cmd-pngcrush-program image-dired-cmd-pngnq-program) |
| 282 | (concat | 277 | (concat |
| 283 | "-set \"Thumb::MTime\" \"%m\" " | 278 | "-set \"Thumb::MTime\" \"%m\" " |
| 284 | "-set \"Thumb::URI\" \"file://%f\" " | 279 | "-set \"Thumb::URI\" \"file://%f\" " |
| 285 | "-set \"Description\" \"Thumbnail of file://%f\" " | 280 | "-set \"Description\" \"Thumbnail of file://%f\" " |
| 286 | "-set \"Software\" \"" (emacs-version) "\" ")) | 281 | "-set \"Software\" \"" (emacs-version) "\" ")) |
| 287 | "-thumbnail %wx%h png:\"%t\"" | 282 | "-thumbnail %wx%h png:\"%t\"" |
| 288 | (if tumme-cmd-pngnq-program | 283 | (if image-dired-cmd-pngnq-program |
| 289 | (concat | 284 | (concat |
| 290 | " ; " tumme-cmd-pngnq-program " -f \"%t\"" | 285 | " ; " image-dired-cmd-pngnq-program " -f \"%t\"" |
| 291 | (unless tumme-cmd-pngcrush-program | 286 | (unless image-dired-cmd-pngcrush-program |
| 292 | " ; mv %q %t"))) | 287 | " ; mv %q %t"))) |
| 293 | (if tumme-cmd-pngcrush-program | 288 | (if image-dired-cmd-pngcrush-program |
| 294 | (concat | 289 | (concat |
| 295 | (unless tumme-cmd-pngcrush-program | 290 | (unless image-dired-cmd-pngcrush-program |
| 296 | " ; cp %t %q") | 291 | " ; cp %t %q") |
| 297 | " ; " tumme-cmd-pngcrush-program " -q " | 292 | " ; " image-dired-cmd-pngcrush-program " -q " |
| 298 | "-text b \"Description\" \"Thumbnail of file://%f\" " | 293 | "-text b \"Description\" \"Thumbnail of file://%f\" " |
| 299 | "-text b \"Software\" \"" (emacs-version) "\" " | 294 | "-text b \"Software\" \"" (emacs-version) "\" " |
| 300 | ;; "-text b \"Thumb::Image::Height\" \"%oh\" " | 295 | ;; "-text b \"Thumb::Image::Height\" \"%oh\" " |
| @@ -307,194 +302,194 @@ with the information required by the Thumbnail Managing Standard." | |||
| 307 | " ; rm %q"))) | 302 | " ; rm %q"))) |
| 308 | "Command to create thumbnails according to the Thumbnail Managing Standard." | 303 | "Command to create thumbnails according to the Thumbnail Managing Standard." |
| 309 | :type 'string | 304 | :type 'string |
| 310 | :group 'tumme) | 305 | :group 'image-dired) |
| 311 | 306 | ||
| 312 | (defcustom tumme-cmd-rotate-thumbnail-program | 307 | (defcustom image-dired-cmd-rotate-thumbnail-program |
| 313 | "mogrify" | 308 | "mogrify" |
| 314 | "Executable used to rotate thumbnail. | 309 | "Executable used to rotate thumbnail. |
| 315 | Used together with `tumme-cmd-rotate-thumbnail-options'." | 310 | Used together with `image-dired-cmd-rotate-thumbnail-options'." |
| 316 | :type 'string | 311 | :type 'string |
| 317 | :group 'tumme) | 312 | :group 'image-dired) |
| 318 | 313 | ||
| 319 | (defcustom tumme-cmd-rotate-thumbnail-options | 314 | (defcustom image-dired-cmd-rotate-thumbnail-options |
| 320 | "%p -rotate %d \"%t\"" | 315 | "%p -rotate %d \"%t\"" |
| 321 | "Format of command used to rotate thumbnail image. | 316 | "Format of command used to rotate thumbnail image. |
| 322 | Available options are %p which is replaced by | 317 | Available options are %p which is replaced by |
| 323 | `tumme-cmd-rotate-thumbnail-program', %d which is replaced by the | 318 | `image-dired-cmd-rotate-thumbnail-program', %d which is replaced by the |
| 324 | number of (positive) degrees to rotate the image, normally 90 or 270 | 319 | number of (positive) degrees to rotate the image, normally 90 or 270 |
| 325 | \(for 90 degrees right and left), %t which is replaced by the file name | 320 | \(for 90 degrees right and left), %t which is replaced by the file name |
| 326 | of the thumbnail file." | 321 | of the thumbnail file." |
| 327 | :type 'string | 322 | :type 'string |
| 328 | :group 'tumme) | 323 | :group 'image-dired) |
| 329 | 324 | ||
| 330 | (defcustom tumme-cmd-rotate-original-program | 325 | (defcustom image-dired-cmd-rotate-original-program |
| 331 | "jpegtran" | 326 | "jpegtran" |
| 332 | "Executable used to rotate original image. | 327 | "Executable used to rotate original image. |
| 333 | Used together with `tumme-cmd-rotate-original-options'." | 328 | Used together with `image-dired-cmd-rotate-original-options'." |
| 334 | :type 'string | 329 | :type 'string |
| 335 | :group 'tumme) | 330 | :group 'image-dired) |
| 336 | 331 | ||
| 337 | (defcustom tumme-cmd-rotate-original-options | 332 | (defcustom image-dired-cmd-rotate-original-options |
| 338 | "%p -rotate %d -copy all -outfile %t \"%o\"" | 333 | "%p -rotate %d -copy all -outfile %t \"%o\"" |
| 339 | "Format of command used to rotate original image. | 334 | "Format of command used to rotate original image. |
| 340 | Available options are %p which is replaced by | 335 | Available options are %p which is replaced by |
| 341 | `tumme-cmd-rotate-original-program', %d which is replaced by the | 336 | `image-dired-cmd-rotate-original-program', %d which is replaced by the |
| 342 | number of (positive) degrees to rotate the image, normally 90 or | 337 | number of (positive) degrees to rotate the image, normally 90 or |
| 343 | 270 \(for 90 degrees right and left), %o which is replaced by the | 338 | 270 \(for 90 degrees right and left), %o which is replaced by the |
| 344 | original image file name and %t which is replaced by | 339 | original image file name and %t which is replaced by |
| 345 | `tumme-temp-image-file'." | 340 | `image-dired-temp-image-file'." |
| 346 | :type 'string | 341 | :type 'string |
| 347 | :group 'tumme) | 342 | :group 'image-dired) |
| 348 | 343 | ||
| 349 | (defcustom tumme-temp-rotate-image-file | 344 | (defcustom image-dired-temp-rotate-image-file |
| 350 | "~/.emacs.d/tumme/.tumme_rotate_temp" | 345 | "~/.emacs.d/image-dired/.image-dired_rotate_temp" |
| 351 | "Temporary file for rotate operations." | 346 | "Temporary file for rotate operations." |
| 352 | :type 'string | 347 | :type 'string |
| 353 | :group 'tumme) | 348 | :group 'image-dired) |
| 354 | 349 | ||
| 355 | (defcustom tumme-rotate-original-ask-before-overwrite t | 350 | (defcustom image-dired-rotate-original-ask-before-overwrite t |
| 356 | "Confirm overwrite of original file after rotate operation. | 351 | "Confirm overwrite of original file after rotate operation. |
| 357 | If non-nil, ask user for confirmation before overwriting the | 352 | If non-nil, ask user for confirmation before overwriting the |
| 358 | original file with `tumme-temp-rotate-image-file'." | 353 | original file with `image-dired-temp-rotate-image-file'." |
| 359 | :type 'boolean | 354 | :type 'boolean |
| 360 | :group 'tumme) | 355 | :group 'image-dired) |
| 361 | 356 | ||
| 362 | (defcustom tumme-cmd-write-exif-data-program | 357 | (defcustom image-dired-cmd-write-exif-data-program |
| 363 | "exiftool" | 358 | "exiftool" |
| 364 | "Program used to write EXIF data to image. | 359 | "Program used to write EXIF data to image. |
| 365 | Used together with `tumme-cmd-write-exif-data-options'." | 360 | Used together with `image-dired-cmd-write-exif-data-options'." |
| 366 | :type 'string | 361 | :type 'string |
| 367 | :group 'tumme) | 362 | :group 'image-dired) |
| 368 | 363 | ||
| 369 | (defcustom tumme-cmd-write-exif-data-options | 364 | (defcustom image-dired-cmd-write-exif-data-options |
| 370 | "%p -%t=\"%v\" \"%f\"" | 365 | "%p -%t=\"%v\" \"%f\"" |
| 371 | "Format of command used to write EXIF data. | 366 | "Format of command used to write EXIF data. |
| 372 | Available options are %p which is replaced by | 367 | Available options are %p which is replaced by |
| 373 | `tumme-cmd-write-exif-data-program', %f which is replaced by the | 368 | `image-dired-cmd-write-exif-data-program', %f which is replaced by the |
| 374 | image file name, %t which is replaced by the tag name and %v | 369 | image file name, %t which is replaced by the tag name and %v |
| 375 | which is replaced by the tag value." | 370 | which is replaced by the tag value." |
| 376 | :type 'string | 371 | :type 'string |
| 377 | :group 'tumme) | 372 | :group 'image-dired) |
| 378 | 373 | ||
| 379 | (defcustom tumme-cmd-read-exif-data-program | 374 | (defcustom image-dired-cmd-read-exif-data-program |
| 380 | "exiftool" | 375 | "exiftool" |
| 381 | "Program used to read EXIF data to image. | 376 | "Program used to read EXIF data to image. |
| 382 | Used together with `tumme-cmd-read-exif-data-program-options'." | 377 | Used together with `image-dired-cmd-read-exif-data-program-options'." |
| 383 | :type 'string | 378 | :type 'string |
| 384 | :group 'tumme) | 379 | :group 'image-dired) |
| 385 | 380 | ||
| 386 | (defcustom tumme-cmd-read-exif-data-options | 381 | (defcustom image-dired-cmd-read-exif-data-options |
| 387 | "%p -s -s -s -%t \"%f\"" | 382 | "%p -s -s -s -%t \"%f\"" |
| 388 | "Format of command used to read EXIF data. | 383 | "Format of command used to read EXIF data. |
| 389 | Available options are %p which is replaced by | 384 | Available options are %p which is replaced by |
| 390 | `tumme-cmd-write-exif-data-options', %f which is replaced | 385 | `image-dired-cmd-write-exif-data-options', %f which is replaced |
| 391 | by the image file name and %t which is replaced by the tag name." | 386 | by the image file name and %t which is replaced by the tag name." |
| 392 | :type 'string | 387 | :type 'string |
| 393 | :group 'tumme) | 388 | :group 'image-dired) |
| 394 | 389 | ||
| 395 | (defcustom tumme-gallery-hidden-tags | 390 | (defcustom image-dired-gallery-hidden-tags |
| 396 | (list "private" "hidden" "pending") | 391 | (list "private" "hidden" "pending") |
| 397 | "List of \"hidden\" tags. | 392 | "List of \"hidden\" tags. |
| 398 | Used by `tumme-gallery-generate' to leave out \"hidden\" images." | 393 | Used by `image-dired-gallery-generate' to leave out \"hidden\" images." |
| 399 | :type '(repeat string) | 394 | :type '(repeat string) |
| 400 | :group 'tumme) | 395 | :group 'image-dired) |
| 401 | 396 | ||
| 402 | (defcustom tumme-thumb-size (if (eq 'standard tumme-thumbnail-storage) 128 100) | 397 | (defcustom image-dired-thumb-size (if (eq 'standard image-dired-thumbnail-storage) 128 100) |
| 403 | "Size of thumbnails, in pixels. | 398 | "Size of thumbnails, in pixels. |
| 404 | This is the default size for both `tumme-thumb-width' and `tumme-thumb-height'." | 399 | This is the default size for both `image-dired-thumb-width' and `image-dired-thumb-height'." |
| 405 | :type 'integer | 400 | :type 'integer |
| 406 | :group 'tumme) | 401 | :group 'image-dired) |
| 407 | 402 | ||
| 408 | (defcustom tumme-thumb-width tumme-thumb-size | 403 | (defcustom image-dired-thumb-width image-dired-thumb-size |
| 409 | "Width of thumbnails, in pixels." | 404 | "Width of thumbnails, in pixels." |
| 410 | :type 'integer | 405 | :type 'integer |
| 411 | :group 'tumme) | 406 | :group 'image-dired) |
| 412 | 407 | ||
| 413 | (defcustom tumme-thumb-height tumme-thumb-size | 408 | (defcustom image-dired-thumb-height image-dired-thumb-size |
| 414 | "Height of thumbnails, in pixels." | 409 | "Height of thumbnails, in pixels." |
| 415 | :type 'integer | 410 | :type 'integer |
| 416 | :group 'tumme) | 411 | :group 'image-dired) |
| 417 | 412 | ||
| 418 | (defcustom tumme-thumb-relief 2 | 413 | (defcustom image-dired-thumb-relief 2 |
| 419 | "Size of button-like border around thumbnails." | 414 | "Size of button-like border around thumbnails." |
| 420 | :type 'integer | 415 | :type 'integer |
| 421 | :group 'tumme) | 416 | :group 'image-dired) |
| 422 | 417 | ||
| 423 | (defcustom tumme-thumb-margin 2 | 418 | (defcustom image-dired-thumb-margin 2 |
| 424 | "Size of the margin around thumbnails. | 419 | "Size of the margin around thumbnails. |
| 425 | This is where you see the cursor." | 420 | This is where you see the cursor." |
| 426 | :type 'integer | 421 | :type 'integer |
| 427 | :group 'tumme) | 422 | :group 'image-dired) |
| 428 | 423 | ||
| 429 | (defcustom tumme-line-up-method 'dynamic | 424 | (defcustom image-dired-line-up-method 'dynamic |
| 430 | "Default method for line-up of thumbnails in thumbnail buffer. | 425 | "Default method for line-up of thumbnails in thumbnail buffer. |
| 431 | Used by `tumme-display-thumbs' and other functions that needs to | 426 | Used by `image-dired-display-thumbs' and other functions that needs to |
| 432 | line-up thumbnails. Dynamic means to use the available width of the | 427 | line-up thumbnails. Dynamic means to use the available width of the |
| 433 | window containing the thumbnail buffer, Fixed means to use | 428 | window containing the thumbnail buffer, Fixed means to use |
| 434 | `tumme-thumbs-per-row', Interactive is for asking the user, and No | 429 | `image-dired-thumbs-per-row', Interactive is for asking the user, and No |
| 435 | line-up means that no automatic line-up will be done." | 430 | line-up means that no automatic line-up will be done." |
| 436 | :type '(choice :tag "Default line-up method" | 431 | :type '(choice :tag "Default line-up method" |
| 437 | (const :tag "Dynamic" dynamic) | 432 | (const :tag "Dynamic" dynamic) |
| 438 | (const :tag "Fixed" fixed) | 433 | (const :tag "Fixed" fixed) |
| 439 | (const :tag "Interactive" interactive) | 434 | (const :tag "Interactive" interactive) |
| 440 | (const :tag "No line-up" none)) | 435 | (const :tag "No line-up" none)) |
| 441 | :group 'tumme) | 436 | :group 'image-dired) |
| 442 | 437 | ||
| 443 | (defcustom tumme-thumbs-per-row 3 | 438 | (defcustom image-dired-thumbs-per-row 3 |
| 444 | "Number of thumbnails to display per row in thumb buffer." | 439 | "Number of thumbnails to display per row in thumb buffer." |
| 445 | :type 'integer | 440 | :type 'integer |
| 446 | :group 'tumme) | 441 | :group 'image-dired) |
| 447 | 442 | ||
| 448 | (defcustom tumme-display-window-width-correction 1 | 443 | (defcustom image-dired-display-window-width-correction 1 |
| 449 | "Number to be used to correct image display window width. | 444 | "Number to be used to correct image display window width. |
| 450 | Change if the default (1) does not work (i.e. if the image does not | 445 | Change if the default (1) does not work (i.e. if the image does not |
| 451 | completely fit)." | 446 | completely fit)." |
| 452 | :type 'integer | 447 | :type 'integer |
| 453 | :group 'tumme) | 448 | :group 'image-dired) |
| 454 | 449 | ||
| 455 | (defcustom tumme-display-window-height-correction 0 | 450 | (defcustom image-dired-display-window-height-correction 0 |
| 456 | "Number to be used to correct image display window height. | 451 | "Number to be used to correct image display window height. |
| 457 | Change if the default (0) does not work (i.e. if the image does not | 452 | Change if the default (0) does not work (i.e. if the image does not |
| 458 | completely fit)." | 453 | completely fit)." |
| 459 | :type 'integer | 454 | :type 'integer |
| 460 | :group 'tumme) | 455 | :group 'image-dired) |
| 461 | 456 | ||
| 462 | (defcustom tumme-track-movement t | 457 | (defcustom image-dired-track-movement t |
| 463 | "The current state of the tracking and mirroring. | 458 | "The current state of the tracking and mirroring. |
| 464 | For more information, see the documentation for | 459 | For more information, see the documentation for |
| 465 | `tumme-toggle-movement-tracking'." | 460 | `image-dired-toggle-movement-tracking'." |
| 466 | :type 'boolean | 461 | :type 'boolean |
| 467 | :group 'tumme) | 462 | :group 'image-dired) |
| 468 | 463 | ||
| 469 | (defcustom tumme-append-when-browsing nil | 464 | (defcustom image-dired-append-when-browsing nil |
| 470 | "Append thumbnails in thumbnail buffer when browsing. | 465 | "Append thumbnails in thumbnail buffer when browsing. |
| 471 | If non-nil, using `tumme-next-line-and-display' and | 466 | If non-nil, using `image-dired-next-line-and-display' and |
| 472 | `tumme-previous-line-and-display' will leave a trail of thumbnail | 467 | `image-dired-previous-line-and-display' will leave a trail of thumbnail |
| 473 | images in the thumbnail buffer. If you enable this and want to clean | 468 | images in the thumbnail buffer. If you enable this and want to clean |
| 474 | the thumbnail buffer because it is filled with too many thumbmnails, | 469 | the thumbnail buffer because it is filled with too many thumbmnails, |
| 475 | just call `tumme-display-thumb' to display only the image at point. | 470 | just call `image-dired-display-thumb' to display only the image at point. |
| 476 | This value can be toggled using `tumme-toggle-append-browsing'." | 471 | This value can be toggled using `image-dired-toggle-append-browsing'." |
| 477 | :type 'boolean | 472 | :type 'boolean |
| 478 | :group 'tumme) | 473 | :group 'image-dired) |
| 479 | 474 | ||
| 480 | (defcustom tumme-dired-disp-props t | 475 | (defcustom image-dired-dired-disp-props t |
| 481 | "If non-nil, display properties for dired file when browsing. | 476 | "If non-nil, display properties for dired file when browsing. |
| 482 | Used by `tumme-next-line-and-display', | 477 | Used by `image-dired-next-line-and-display', |
| 483 | `tumme-previous-line-and-display' and `tumme-mark-and-display-next'. | 478 | `image-dired-previous-line-and-display' and `image-dired-mark-and-display-next'. |
| 484 | If the database file is large, this can slow down image browsing in | 479 | If the database file is large, this can slow down image browsing in |
| 485 | dired and you might want to turn it off." | 480 | dired and you might want to turn it off." |
| 486 | :type 'boolean | 481 | :type 'boolean |
| 487 | :group 'tumme) | 482 | :group 'image-dired) |
| 488 | 483 | ||
| 489 | (defcustom tumme-display-properties-format "%b: %f (%t): %c" | 484 | (defcustom image-dired-display-properties-format "%b: %f (%t): %c" |
| 490 | "Display format for thumbnail properties. | 485 | "Display format for thumbnail properties. |
| 491 | %b is replaced with associated dired buffer name, %f with file name | 486 | %b is replaced with associated dired buffer name, %f with file name |
| 492 | \(without path) of original image file, %t with the list of tags and %c | 487 | \(without path) of original image file, %t with the list of tags and %c |
| 493 | with the comment." | 488 | with the comment." |
| 494 | :type 'string | 489 | :type 'string |
| 495 | :group 'tumme) | 490 | :group 'image-dired) |
| 496 | 491 | ||
| 497 | (defcustom tumme-external-viewer | 492 | (defcustom image-dired-external-viewer |
| 498 | ;; TODO: Use mailcap, dired-guess-shell-alist-default, | 493 | ;; TODO: Use mailcap, dired-guess-shell-alist-default, |
| 499 | ;; dired-view-command-alist. | 494 | ;; dired-view-command-alist. |
| 500 | (cond ((executable-find "display")) | 495 | (cond ((executable-find "display")) |
| @@ -502,33 +497,33 @@ with the comment." | |||
| 502 | ((executable-find "qiv") "qiv -t")) | 497 | ((executable-find "qiv") "qiv -t")) |
| 503 | "Name of external viewer. | 498 | "Name of external viewer. |
| 504 | Including parameters. Used when displaying original image from | 499 | Including parameters. Used when displaying original image from |
| 505 | `tumme-thumbnail-mode'." | 500 | `image-dired-thumbnail-mode'." |
| 506 | :type 'string | 501 | :type 'string |
| 507 | :group 'tumme) | 502 | :group 'image-dired) |
| 508 | 503 | ||
| 509 | (defcustom tumme-main-image-directory "~/pics/" | 504 | (defcustom image-dired-main-image-directory "~/pics/" |
| 510 | "Name of main image directory, if any. | 505 | "Name of main image directory, if any. |
| 511 | Used by `tumme-copy-with-exif-file-name'." | 506 | Used by `image-dired-copy-with-exif-file-name'." |
| 512 | :type 'string | 507 | :type 'string |
| 513 | :group 'tumme) | 508 | :group 'image-dired) |
| 514 | 509 | ||
| 515 | (defcustom tumme-show-all-from-dir-max-files 50 | 510 | (defcustom image-dired-show-all-from-dir-max-files 50 |
| 516 | "Maximum number of files to show using `tumme-show-all-from-dir'. | 511 | "Maximum number of files to show using `image-dired-show-all-from-dir'. |
| 517 | before warning the user." | 512 | before warning the user." |
| 518 | :type 'integer | 513 | :type 'integer |
| 519 | :group 'tumme) | 514 | :group 'image-dired) |
| 520 | 515 | ||
| 521 | (defun tumme-dir () | 516 | (defun image-dired-dir () |
| 522 | "Return the current thumbnails directory (from variable `tumme-dir'). | 517 | "Return the current thumbnails directory (from variable `image-dired-dir'). |
| 523 | Create the thumbnails directory if it does not exist." | 518 | Create the thumbnails directory if it does not exist." |
| 524 | (let ((tumme-dir (file-name-as-directory | 519 | (let ((image-dired-dir (file-name-as-directory |
| 525 | (expand-file-name tumme-dir)))) | 520 | (expand-file-name image-dired-dir)))) |
| 526 | (unless (file-directory-p tumme-dir) | 521 | (unless (file-directory-p image-dired-dir) |
| 527 | (make-directory tumme-dir t) | 522 | (make-directory image-dired-dir t) |
| 528 | (message "Creating thumbnails directory")) | 523 | (message "Creating thumbnails directory")) |
| 529 | tumme-dir)) | 524 | image-dired-dir)) |
| 530 | 525 | ||
| 531 | (defun tumme-insert-image (file type relief margin) | 526 | (defun image-dired-insert-image (file type relief margin) |
| 532 | "Insert image FILE of image TYPE, using RELIEF and MARGIN, at point." | 527 | "Insert image FILE of image TYPE, using RELIEF and MARGIN, at point." |
| 533 | 528 | ||
| 534 | (let ((i `(image :type ,type | 529 | (let ((i `(image :type ,type |
| @@ -537,56 +532,56 @@ Create the thumbnails directory if it does not exist." | |||
| 537 | :margin ,margin))) | 532 | :margin ,margin))) |
| 538 | (insert-image i))) | 533 | (insert-image i))) |
| 539 | 534 | ||
| 540 | (defun tumme-get-thumbnail-image (file) | 535 | (defun image-dired-get-thumbnail-image (file) |
| 541 | "Return the image descriptor for a thumbnail of image file FILE." | 536 | "Return the image descriptor for a thumbnail of image file FILE." |
| 542 | (unless (string-match (image-file-name-regexp) file) | 537 | (unless (string-match (image-file-name-regexp) file) |
| 543 | (error "%s is not a valid image file" file)) | 538 | (error "%s is not a valid image file" file)) |
| 544 | (let ((thumb-file (tumme-thumb-name file))) | 539 | (let ((thumb-file (image-dired-thumb-name file))) |
| 545 | (unless (and (file-exists-p thumb-file) | 540 | (unless (and (file-exists-p thumb-file) |
| 546 | (<= (float-time (nth 5 (file-attributes file))) | 541 | (<= (float-time (nth 5 (file-attributes file))) |
| 547 | (float-time (nth 5 (file-attributes thumb-file))))) | 542 | (float-time (nth 5 (file-attributes thumb-file))))) |
| 548 | (tumme-create-thumb file thumb-file)) | 543 | (image-dired-create-thumb file thumb-file)) |
| 549 | (create-image thumb-file) | 544 | (create-image thumb-file) |
| 550 | ;; (list 'image :type 'jpeg | 545 | ;; (list 'image :type 'jpeg |
| 551 | ;; :file thumb-file | 546 | ;; :file thumb-file |
| 552 | ;; :relief tumme-thumb-relief :margin tumme-thumb-margin) | 547 | ;; :relief image-dired-thumb-relief :margin image-dired-thumb-margin) |
| 553 | )) | 548 | )) |
| 554 | 549 | ||
| 555 | (defun tumme-insert-thumbnail (file original-file-name | 550 | (defun image-dired-insert-thumbnail (file original-file-name |
| 556 | associated-dired-buffer) | 551 | associated-dired-buffer) |
| 557 | "Insert thumbnail image FILE. | 552 | "Insert thumbnail image FILE. |
| 558 | Add text properties ORIGINAL-FILE-NAME and ASSOCIATED-DIRED-BUFFER." | 553 | Add text properties ORIGINAL-FILE-NAME and ASSOCIATED-DIRED-BUFFER." |
| 559 | (let (beg end) | 554 | (let (beg end) |
| 560 | (setq beg (point)) | 555 | (setq beg (point)) |
| 561 | (tumme-insert-image file | 556 | (image-dired-insert-image file |
| 562 | ;; TODO: this should depend on the real file type | 557 | ;; TODO: this should depend on the real file type |
| 563 | (if (eq 'standard tumme-thumbnail-storage) | 558 | (if (eq 'standard image-dired-thumbnail-storage) |
| 564 | 'png 'jpeg) | 559 | 'png 'jpeg) |
| 565 | tumme-thumb-relief | 560 | image-dired-thumb-relief |
| 566 | tumme-thumb-margin) | 561 | image-dired-thumb-margin) |
| 567 | (setq end (point)) | 562 | (setq end (point)) |
| 568 | (add-text-properties | 563 | (add-text-properties |
| 569 | beg end | 564 | beg end |
| 570 | (list 'tumme-thumbnail t | 565 | (list 'image-dired-thumbnail t |
| 571 | 'original-file-name original-file-name | 566 | 'original-file-name original-file-name |
| 572 | 'associated-dired-buffer associated-dired-buffer | 567 | 'associated-dired-buffer associated-dired-buffer |
| 573 | 'tags (tumme-list-tags original-file-name) | 568 | 'tags (image-dired-list-tags original-file-name) |
| 574 | 'mouse-face 'highlight | 569 | 'mouse-face 'highlight |
| 575 | 'comment (tumme-get-comment original-file-name))))) | 570 | 'comment (image-dired-get-comment original-file-name))))) |
| 576 | 571 | ||
| 577 | (defun tumme-thumb-name (file) | 572 | (defun image-dired-thumb-name (file) |
| 578 | "Return thumbnail file name for FILE. | 573 | "Return thumbnail file name for FILE. |
| 579 | Depending on the value of `tumme-thumbnail-storage', the file | 574 | Depending on the value of `image-dired-thumbnail-storage', the file |
| 580 | name will vary. For central thumbnail file storage, make a | 575 | name will vary. For central thumbnail file storage, make a |
| 581 | MD5-hash of the image file's directory name and add that to make | 576 | MD5-hash of the image file's directory name and add that to make |
| 582 | the thumbnail file name unique. For per-directory storage, just | 577 | the thumbnail file name unique. For per-directory storage, just |
| 583 | add a subdirectory. For standard storage, produce the file name | 578 | add a subdirectory. For standard storage, produce the file name |
| 584 | according to the Thumbnail Managing Standard." | 579 | according to the Thumbnail Managing Standard." |
| 585 | (cond ((eq 'standard tumme-thumbnail-storage) | 580 | (cond ((eq 'standard image-dired-thumbnail-storage) |
| 586 | (expand-file-name | 581 | (expand-file-name |
| 587 | (concat "~/.thumbnails/normal/" | 582 | (concat "~/.thumbnails/normal/" |
| 588 | (md5 (concat "file://" (expand-file-name file))) ".png"))) | 583 | (md5 (concat "file://" (expand-file-name file))) ".png"))) |
| 589 | ((eq 'use-tumme-dir tumme-thumbnail-storage) | 584 | ((eq 'use-image-dired-dir image-dired-thumbnail-storage) |
| 590 | (let* ((f (expand-file-name file)) | 585 | (let* ((f (expand-file-name file)) |
| 591 | (md5-hash | 586 | (md5-hash |
| 592 | ;; Is MD5 hashes fast enough? The checksum of a | 587 | ;; Is MD5 hashes fast enough? The checksum of a |
| @@ -595,32 +590,32 @@ according to the Thumbnail Managing Standard." | |||
| 595 | ;; be used here. | 590 | ;; be used here. |
| 596 | (md5 (file-name-as-directory (file-name-directory f))))) | 591 | (md5 (file-name-as-directory (file-name-directory f))))) |
| 597 | (format "%s%s%s.thumb.%s" | 592 | (format "%s%s%s.thumb.%s" |
| 598 | (file-name-as-directory (expand-file-name (tumme-dir))) | 593 | (file-name-as-directory (expand-file-name (image-dired-dir))) |
| 599 | (file-name-sans-extension (file-name-nondirectory f)) | 594 | (file-name-sans-extension (file-name-nondirectory f)) |
| 600 | (if md5-hash (concat "_" md5-hash) "") | 595 | (if md5-hash (concat "_" md5-hash) "") |
| 601 | (file-name-extension f)))) | 596 | (file-name-extension f)))) |
| 602 | ((eq 'per-directory tumme-thumbnail-storage) | 597 | ((eq 'per-directory image-dired-thumbnail-storage) |
| 603 | (let ((f (expand-file-name file))) | 598 | (let ((f (expand-file-name file))) |
| 604 | (format "%s.tumme/%s.thumb.%s" | 599 | (format "%s.image-dired/%s.thumb.%s" |
| 605 | (file-name-directory f) | 600 | (file-name-directory f) |
| 606 | (file-name-sans-extension (file-name-nondirectory f)) | 601 | (file-name-sans-extension (file-name-nondirectory f)) |
| 607 | (file-name-extension f)))))) | 602 | (file-name-extension f)))))) |
| 608 | 603 | ||
| 609 | (defun tumme-create-thumb (original-file thumbnail-file) | 604 | (defun image-dired-create-thumb (original-file thumbnail-file) |
| 610 | "For ORIGINAL-FILE, create thumbnail image named THUMBNAIL-FILE." | 605 | "For ORIGINAL-FILE, create thumbnail image named THUMBNAIL-FILE." |
| 611 | (let* ((width (int-to-string tumme-thumb-width)) | 606 | (let* ((width (int-to-string image-dired-thumb-width)) |
| 612 | (height (int-to-string tumme-thumb-height)) | 607 | (height (int-to-string image-dired-thumb-height)) |
| 613 | (modif-time (format "%.0f" (float-time (nth 5 (file-attributes | 608 | (modif-time (format "%.0f" (float-time (nth 5 (file-attributes |
| 614 | original-file))))) | 609 | original-file))))) |
| 615 | (thumbnail-nq8-file (replace-regexp-in-string ".png\\'" "-nq8.png" | 610 | (thumbnail-nq8-file (replace-regexp-in-string ".png\\'" "-nq8.png" |
| 616 | thumbnail-file)) | 611 | thumbnail-file)) |
| 617 | (command | 612 | (command |
| 618 | (format-spec | 613 | (format-spec |
| 619 | (if (eq 'standard tumme-thumbnail-storage) | 614 | (if (eq 'standard image-dired-thumbnail-storage) |
| 620 | tumme-cmd-create-standard-thumbnail-command | 615 | image-dired-cmd-create-standard-thumbnail-command |
| 621 | tumme-cmd-create-thumbnail-options) | 616 | image-dired-cmd-create-thumbnail-options) |
| 622 | (list | 617 | (list |
| 623 | (cons ?p tumme-cmd-create-thumbnail-program) | 618 | (cons ?p image-dired-cmd-create-thumbnail-program) |
| 624 | (cons ?w width) | 619 | (cons ?w width) |
| 625 | (cons ?h height) | 620 | (cons ?h height) |
| 626 | (cons ?m modif-time) | 621 | (cons ?m modif-time) |
| @@ -635,13 +630,13 @@ according to the Thumbnail Managing Standard." | |||
| 635 | (call-process shell-file-name nil nil nil shell-command-switch command))) | 630 | (call-process shell-file-name nil nil nil shell-command-switch command))) |
| 636 | 631 | ||
| 637 | ;;;###autoload | 632 | ;;;###autoload |
| 638 | (defun tumme-dired-insert-marked-thumbs () | 633 | (defun image-dired-dired-insert-marked-thumbs () |
| 639 | "Insert thumbnails before file names of marked files in the dired buffer." | 634 | "Insert thumbnails before file names of marked files in the dired buffer." |
| 640 | (interactive) | 635 | (interactive) |
| 641 | (dired-map-over-marks | 636 | (dired-map-over-marks |
| 642 | (let* ((image-pos (dired-move-to-filename)) | 637 | (let* ((image-pos (dired-move-to-filename)) |
| 643 | (image-file (dired-get-filename)) | 638 | (image-file (dired-get-filename)) |
| 644 | (thumb-file (tumme-get-thumbnail-image image-file)) | 639 | (thumb-file (image-dired-get-thumbnail-image image-file)) |
| 645 | overlay) | 640 | overlay) |
| 646 | ;; If image is not already added, then add it. | 641 | ;; If image is not already added, then add it. |
| 647 | (unless (delq nil (mapcar (lambda (o) (overlay-get o 'put-image)) | 642 | (unless (delq nil (mapcar (lambda (o) (overlay-get o 'put-image)) |
| @@ -655,9 +650,9 @@ according to the Thumbnail Managing Standard." | |||
| 655 | (overlay-put overlay 'image-file image-file) | 650 | (overlay-put overlay 'image-file image-file) |
| 656 | (overlay-put overlay 'thumb-file thumb-file))) | 651 | (overlay-put overlay 'thumb-file thumb-file))) |
| 657 | nil) | 652 | nil) |
| 658 | (add-hook 'dired-after-readin-hook 'tumme-dired-after-readin-hook nil t)) | 653 | (add-hook 'dired-after-readin-hook 'image-dired-dired-after-readin-hook nil t)) |
| 659 | 654 | ||
| 660 | (defun tumme-dired-after-readin-hook () | 655 | (defun image-dired-dired-after-readin-hook () |
| 661 | "Relocate existing thumbnail overlays in dired buffer after reverting. | 656 | "Relocate existing thumbnail overlays in dired buffer after reverting. |
| 662 | Move them to their corresponding files if they are still exist. | 657 | Move them to their corresponding files if they are still exist. |
| 663 | Otherwise, delete overlays." | 658 | Otherwise, delete overlays." |
| @@ -670,82 +665,82 @@ Otherwise, delete overlays." | |||
| 670 | (delete-overlay overlay))))) | 665 | (delete-overlay overlay))))) |
| 671 | (overlays-in (point-min) (point-max)))) | 666 | (overlays-in (point-min) (point-max)))) |
| 672 | 667 | ||
| 673 | (defun tumme-next-line-and-display () | 668 | (defun image-dired-next-line-and-display () |
| 674 | "Move to next dired line and display thumbnail image." | 669 | "Move to next dired line and display thumbnail image." |
| 675 | (interactive) | 670 | (interactive) |
| 676 | (dired-next-line 1) | 671 | (dired-next-line 1) |
| 677 | (tumme-display-thumbs | 672 | (image-dired-display-thumbs |
| 678 | t (or tumme-append-when-browsing nil) t) | 673 | t (or image-dired-append-when-browsing nil) t) |
| 679 | (if tumme-dired-disp-props | 674 | (if image-dired-dired-disp-props |
| 680 | (tumme-dired-display-properties))) | 675 | (image-dired-dired-display-properties))) |
| 681 | 676 | ||
| 682 | (defun tumme-previous-line-and-display () | 677 | (defun image-dired-previous-line-and-display () |
| 683 | "Move to previous dired line and display thumbnail image." | 678 | "Move to previous dired line and display thumbnail image." |
| 684 | (interactive) | 679 | (interactive) |
| 685 | (dired-previous-line 1) | 680 | (dired-previous-line 1) |
| 686 | (tumme-display-thumbs | 681 | (image-dired-display-thumbs |
| 687 | t (or tumme-append-when-browsing nil) t) | 682 | t (or image-dired-append-when-browsing nil) t) |
| 688 | (if tumme-dired-disp-props | 683 | (if image-dired-dired-disp-props |
| 689 | (tumme-dired-display-properties))) | 684 | (image-dired-dired-display-properties))) |
| 690 | 685 | ||
| 691 | (defun tumme-toggle-append-browsing () | 686 | (defun image-dired-toggle-append-browsing () |
| 692 | "Toggle `tumme-append-when-browsing'." | 687 | "Toggle `image-dired-append-when-browsing'." |
| 693 | (interactive) | 688 | (interactive) |
| 694 | (setq tumme-append-when-browsing | 689 | (setq image-dired-append-when-browsing |
| 695 | (not tumme-append-when-browsing)) | 690 | (not image-dired-append-when-browsing)) |
| 696 | (message "Append browsing %s." | 691 | (message "Append browsing %s." |
| 697 | (if tumme-append-when-browsing | 692 | (if image-dired-append-when-browsing |
| 698 | "on" | 693 | "on" |
| 699 | "off"))) | 694 | "off"))) |
| 700 | 695 | ||
| 701 | (defun tumme-mark-and-display-next () | 696 | (defun image-dired-mark-and-display-next () |
| 702 | "Mark current file in dired and display next thumbnail image." | 697 | "Mark current file in dired and display next thumbnail image." |
| 703 | (interactive) | 698 | (interactive) |
| 704 | (dired-mark 1) | 699 | (dired-mark 1) |
| 705 | (tumme-display-thumbs | 700 | (image-dired-display-thumbs |
| 706 | t (or tumme-append-when-browsing nil) t) | 701 | t (or image-dired-append-when-browsing nil) t) |
| 707 | (if tumme-dired-disp-props | 702 | (if image-dired-dired-disp-props |
| 708 | (tumme-dired-display-properties))) | 703 | (image-dired-dired-display-properties))) |
| 709 | 704 | ||
| 710 | (defun tumme-toggle-dired-display-properties () | 705 | (defun image-dired-toggle-dired-display-properties () |
| 711 | "Toggle `tumme-dired-disp-props'." | 706 | "Toggle `image-dired-dired-disp-props'." |
| 712 | (interactive) | 707 | (interactive) |
| 713 | (setq tumme-dired-disp-props | 708 | (setq image-dired-dired-disp-props |
| 714 | (not tumme-dired-disp-props)) | 709 | (not image-dired-dired-disp-props)) |
| 715 | (message "Dired display properties %s." | 710 | (message "Dired display properties %s." |
| 716 | (if tumme-dired-disp-props | 711 | (if image-dired-dired-disp-props |
| 717 | "on" | 712 | "on" |
| 718 | "off"))) | 713 | "off"))) |
| 719 | 714 | ||
| 720 | (defvar tumme-thumbnail-buffer "*tumme*" | 715 | (defvar image-dired-thumbnail-buffer "*image-dired*" |
| 721 | "Tumme's thumbnail buffer.") | 716 | "Image-Dired's thumbnail buffer.") |
| 722 | 717 | ||
| 723 | (defun tumme-create-thumbnail-buffer () | 718 | (defun image-dired-create-thumbnail-buffer () |
| 724 | "Create thumb buffer and set `tumme-thumbnail-mode'." | 719 | "Create thumb buffer and set `image-dired-thumbnail-mode'." |
| 725 | (let ((buf (get-buffer-create tumme-thumbnail-buffer))) | 720 | (let ((buf (get-buffer-create image-dired-thumbnail-buffer))) |
| 726 | (with-current-buffer buf | 721 | (with-current-buffer buf |
| 727 | (setq buffer-read-only t) | 722 | (setq buffer-read-only t) |
| 728 | (if (not (eq major-mode 'tumme-thumbnail-mode)) | 723 | (if (not (eq major-mode 'image-dired-thumbnail-mode)) |
| 729 | (tumme-thumbnail-mode))) | 724 | (image-dired-thumbnail-mode))) |
| 730 | buf)) | 725 | buf)) |
| 731 | 726 | ||
| 732 | (defvar tumme-display-image-buffer "*tumme-display-image*" | 727 | (defvar image-dired-display-image-buffer "*image-dired-display-image*" |
| 733 | "Where larger versions of the images are display.") | 728 | "Where larger versions of the images are display.") |
| 734 | 729 | ||
| 735 | (defun tumme-create-display-image-buffer () | 730 | (defun image-dired-create-display-image-buffer () |
| 736 | "Create image display buffer and set `tumme-display-image-mode'." | 731 | "Create image display buffer and set `image-dired-display-image-mode'." |
| 737 | (let ((buf (get-buffer-create tumme-display-image-buffer))) | 732 | (let ((buf (get-buffer-create image-dired-display-image-buffer))) |
| 738 | (with-current-buffer buf | 733 | (with-current-buffer buf |
| 739 | (setq buffer-read-only t) | 734 | (setq buffer-read-only t) |
| 740 | (if (not (eq major-mode 'tumme-display-image-mode)) | 735 | (if (not (eq major-mode 'image-dired-display-image-mode)) |
| 741 | (tumme-display-image-mode))) | 736 | (image-dired-display-image-mode))) |
| 742 | buf)) | 737 | buf)) |
| 743 | 738 | ||
| 744 | (defvar tumme-saved-window-configuration nil | 739 | (defvar image-dired-saved-window-configuration nil |
| 745 | "Saved window configuration.") | 740 | "Saved window configuration.") |
| 746 | 741 | ||
| 747 | ;;;###autoload | 742 | ;;;###autoload |
| 748 | (defun tumme-dired-with-window-configuration (dir &optional arg) | 743 | (defun image-dired-dired-with-window-configuration (dir &optional arg) |
| 749 | "Open directory DIR and create a default window configuration. | 744 | "Open directory DIR and create a default window configuration. |
| 750 | 745 | ||
| 751 | Convenience command that: | 746 | Convenience command that: |
| @@ -756,16 +751,16 @@ Convenience command that: | |||
| 756 | 751 | ||
| 757 | After the command has finished, you would typically mark some | 752 | After the command has finished, you would typically mark some |
| 758 | image files in dired and type | 753 | image files in dired and type |
| 759 | \\[tumme-display-thumbs] (`tumme-display-thumbs'). | 754 | \\[image-dired-display-thumbs] (`image-dired-display-thumbs'). |
| 760 | 755 | ||
| 761 | If called with prefix argument ARG, skip splitting of windows. | 756 | If called with prefix argument ARG, skip splitting of windows. |
| 762 | 757 | ||
| 763 | The current window configuration is saved and can be restored by | 758 | The current window configuration is saved and can be restored by |
| 764 | calling `tumme-restore-window-configuration'." | 759 | calling `image-dired-restore-window-configuration'." |
| 765 | (interactive "DDirectory: \nP") | 760 | (interactive "DDirectory: \nP") |
| 766 | (let ((buf (tumme-create-thumbnail-buffer)) | 761 | (let ((buf (image-dired-create-thumbnail-buffer)) |
| 767 | (buf2 (tumme-create-display-image-buffer))) | 762 | (buf2 (image-dired-create-display-image-buffer))) |
| 768 | (setq tumme-saved-window-configuration | 763 | (setq image-dired-saved-window-configuration |
| 769 | (current-window-configuration)) | 764 | (current-window-configuration)) |
| 770 | (dired dir) | 765 | (dired dir) |
| 771 | (delete-other-windows) | 766 | (delete-other-windows) |
| @@ -780,18 +775,18 @@ calling `tumme-restore-window-configuration'." | |||
| 780 | (switch-to-buffer buf2) | 775 | (switch-to-buffer buf2) |
| 781 | (other-window -2))))) | 776 | (other-window -2))))) |
| 782 | 777 | ||
| 783 | (defun tumme-restore-window-configuration () | 778 | (defun image-dired-restore-window-configuration () |
| 784 | "Restore window configuration. | 779 | "Restore window configuration. |
| 785 | Restore any changes to the window configuration made by calling | 780 | Restore any changes to the window configuration made by calling |
| 786 | `tumme-dired-with-window-configuration'." | 781 | `image-dired-dired-with-window-configuration'." |
| 787 | (interactive) | 782 | (interactive) |
| 788 | (if tumme-saved-window-configuration | 783 | (if image-dired-saved-window-configuration |
| 789 | (set-window-configuration tumme-saved-window-configuration) | 784 | (set-window-configuration image-dired-saved-window-configuration) |
| 790 | (message "No saved window configuration"))) | 785 | (message "No saved window configuration"))) |
| 791 | 786 | ||
| 792 | ;;;###autoload | 787 | ;;;###autoload |
| 793 | (defun tumme-display-thumbs (&optional arg append do-not-pop) | 788 | (defun image-dired-display-thumbs (&optional arg append do-not-pop) |
| 794 | "Display thumbnails of all marked files, in `tumme-thumbnail-buffer'. | 789 | "Display thumbnails of all marked files, in `image-dired-thumbnail-buffer'. |
| 795 | If a thumbnail image does not exist for a file, it is created on the | 790 | If a thumbnail image does not exist for a file, it is created on the |
| 796 | fly. With prefix argument ARG, display only thumbnail for file at | 791 | fly. With prefix argument ARG, display only thumbnail for file at |
| 797 | point (this is useful if you have marked some files but want to show | 792 | point (this is useful if you have marked some files but want to show |
| @@ -799,7 +794,7 @@ another one). | |||
| 799 | 794 | ||
| 800 | Recommended usage is to split the current frame horizontally so that | 795 | Recommended usage is to split the current frame horizontally so that |
| 801 | you have the dired buffer in the left window and the | 796 | you have the dired buffer in the left window and the |
| 802 | `tumme-thumbnail-buffer' buffer in the right window. | 797 | `image-dired-thumbnail-buffer' buffer in the right window. |
| 803 | 798 | ||
| 804 | With optional argument APPEND, append thumbnail to thumbnail buffer | 799 | With optional argument APPEND, append thumbnail to thumbnail buffer |
| 805 | instead of erasing it first. | 800 | instead of erasing it first. |
| @@ -807,11 +802,11 @@ instead of erasing it first. | |||
| 807 | Option argument DO-NOT-POP controls if `pop-to-buffer' should be | 802 | Option argument DO-NOT-POP controls if `pop-to-buffer' should be |
| 808 | used or not. If non-nil, use `display-buffer' instead of | 803 | used or not. If non-nil, use `display-buffer' instead of |
| 809 | `pop-to-buffer'. This is used from functions like | 804 | `pop-to-buffer'. This is used from functions like |
| 810 | `tumme-next-line-and-display' and | 805 | `image-dired-next-line-and-display' and |
| 811 | `tumme-previous-line-and-display' where we do not want the | 806 | `image-dired-previous-line-and-display' where we do not want the |
| 812 | thumbnail buffer to be selected." | 807 | thumbnail buffer to be selected." |
| 813 | (interactive "P") | 808 | (interactive "P") |
| 814 | (let ((buf (tumme-create-thumbnail-buffer)) | 809 | (let ((buf (image-dired-create-thumbnail-buffer)) |
| 815 | curr-file thumb-name files count dired-buf beg) | 810 | curr-file thumb-name files count dired-buf beg) |
| 816 | (if arg | 811 | (if arg |
| 817 | (setq files (list (dired-get-filename))) | 812 | (setq files (list (dired-get-filename))) |
| @@ -824,58 +819,61 @@ thumbnail buffer to be selected." | |||
| 824 | (goto-char (point-max))) | 819 | (goto-char (point-max))) |
| 825 | (mapcar | 820 | (mapcar |
| 826 | (lambda (curr-file) | 821 | (lambda (curr-file) |
| 827 | (setq thumb-name (tumme-thumb-name curr-file)) | 822 | (setq thumb-name (image-dired-thumb-name curr-file)) |
| 828 | (if (and (not (file-exists-p thumb-name)) | 823 | (if (and (not (file-exists-p thumb-name)) |
| 829 | (not (= 0 (tumme-create-thumb curr-file thumb-name)))) | 824 | (not (= 0 (image-dired-create-thumb curr-file thumb-name)))) |
| 830 | (message "Thumb could not be created for file %s" curr-file) | 825 | (message "Thumb could not be created for file %s" curr-file) |
| 831 | (tumme-insert-thumbnail thumb-name curr-file dired-buf))) | 826 | (image-dired-insert-thumbnail thumb-name curr-file dired-buf))) |
| 832 | files)) | 827 | files)) |
| 833 | (cond ((eq 'dynamic tumme-line-up-method) | 828 | (cond ((eq 'dynamic image-dired-line-up-method) |
| 834 | (tumme-line-up-dynamic)) | 829 | (image-dired-line-up-dynamic)) |
| 835 | ((eq 'fixed tumme-line-up-method) | 830 | ((eq 'fixed image-dired-line-up-method) |
| 836 | (tumme-line-up)) | 831 | (image-dired-line-up)) |
| 837 | ((eq 'interactive tumme-line-up-method) | 832 | ((eq 'interactive image-dired-line-up-method) |
| 838 | (tumme-line-up-interactive)) | 833 | (image-dired-line-up-interactive)) |
| 839 | ((eq 'none tumme-line-up-method) | 834 | ((eq 'none image-dired-line-up-method) |
| 840 | nil) | 835 | nil) |
| 841 | (t | 836 | (t |
| 842 | (tumme-line-up-dynamic)))) | 837 | (image-dired-line-up-dynamic)))) |
| 843 | (if do-not-pop | 838 | (if do-not-pop |
| 844 | (display-buffer tumme-thumbnail-buffer) | 839 | (display-buffer image-dired-thumbnail-buffer) |
| 845 | (pop-to-buffer tumme-thumbnail-buffer)))) | 840 | (pop-to-buffer image-dired-thumbnail-buffer)))) |
| 846 | 841 | ||
| 847 | ;;;###autoload | 842 | ;;;###autoload |
| 848 | (defun tumme-show-all-from-dir (dir) | 843 | (defun image-dired-show-all-from-dir (dir) |
| 849 | "Make a preview buffer for all images in DIR and display it. | 844 | "Make a preview buffer for all images in DIR and display it. |
| 850 | If the number of files in DIR matching `image-file-name-regexp' | 845 | If the number of files in DIR matching `image-file-name-regexp' |
| 851 | exceeds `tumme-show-all-from-dir-max-files', a warning will be | 846 | exceeds `image-dired-show-all-from-dir-max-files', a warning will be |
| 852 | displayed." | 847 | displayed." |
| 853 | (interactive "DDir: ") | 848 | (interactive "DDir: ") |
| 854 | (dired dir) | 849 | (dired dir) |
| 855 | (dired-mark-files-regexp (image-file-name-regexp)) | 850 | (dired-mark-files-regexp (image-file-name-regexp)) |
| 856 | (let ((files (dired-get-marked-files))) | 851 | (let ((files (dired-get-marked-files))) |
| 857 | (if (or (<= (length files) tumme-show-all-from-dir-max-files) | 852 | (if (or (<= (length files) image-dired-show-all-from-dir-max-files) |
| 858 | (and (> (length files) tumme-show-all-from-dir-max-files) | 853 | (and (> (length files) image-dired-show-all-from-dir-max-files) |
| 859 | (y-or-n-p | 854 | (y-or-n-p |
| 860 | (format | 855 | (format |
| 861 | "Directory contains more than %d image files. Proceed? " | 856 | "Directory contains more than %d image files. Proceed? " |
| 862 | tumme-show-all-from-dir-max-files)))) | 857 | image-dired-show-all-from-dir-max-files)))) |
| 863 | (progn | 858 | (progn |
| 864 | (tumme-display-thumbs) | 859 | (image-dired-display-thumbs) |
| 865 | (pop-to-buffer tumme-thumbnail-buffer)) | 860 | (pop-to-buffer image-dired-thumbnail-buffer)) |
| 866 | (message "Cancelled.")))) | 861 | (message "Cancelled.")))) |
| 867 | 862 | ||
| 868 | ;;;###autoload | 863 | ;;;###autoload |
| 869 | (defalias 'tumme 'tumme-show-all-from-dir) | 864 | (defalias 'image-dired 'image-dired-show-all-from-dir) |
| 865 | |||
| 866 | ;;;###autoload | ||
| 867 | (defalias 'tumme 'image-dired-show-all-from-dir) | ||
| 870 | 868 | ||
| 871 | (defun tumme-write-tags (file-tags) | 869 | (defun image-dired-write-tags (file-tags) |
| 872 | "Write file tags to database. | 870 | "Write file tags to database. |
| 873 | Write each file and tag in FILE-TAGS to the database. FILE-TAGS | 871 | Write each file and tag in FILE-TAGS to the database. FILE-TAGS |
| 874 | is an alist in the following form: | 872 | is an alist in the following form: |
| 875 | ((FILE . TAG) ... )" | 873 | ((FILE . TAG) ... )" |
| 876 | (let (end file tag) | 874 | (let (end file tag) |
| 877 | (with-temp-file tumme-db-file | 875 | (with-temp-file image-dired-db-file |
| 878 | (insert-file-contents tumme-db-file) | 876 | (insert-file-contents image-dired-db-file) |
| 879 | (dolist (elt file-tags) | 877 | (dolist (elt file-tags) |
| 880 | (setq file (car elt) | 878 | (setq file (car elt) |
| 881 | tag (cdr elt)) | 879 | tag (cdr elt)) |
| @@ -890,11 +888,11 @@ is an alist in the following form: | |||
| 890 | (goto-char (point-max)) | 888 | (goto-char (point-max)) |
| 891 | (insert (format "\n%s;%s" file tag))))))) | 889 | (insert (format "\n%s;%s" file tag))))))) |
| 892 | 890 | ||
| 893 | (defun tumme-remove-tag (files tag) | 891 | (defun image-dired-remove-tag (files tag) |
| 894 | "For all FILES, remove TAG from the image database." | 892 | "For all FILES, remove TAG from the image database." |
| 895 | (save-excursion | 893 | (save-excursion |
| 896 | (let (end buf start) | 894 | (let (end buf start) |
| 897 | (setq buf (find-file tumme-db-file)) | 895 | (setq buf (find-file image-dired-db-file)) |
| 898 | (if (not (listp files)) | 896 | (if (not (listp files)) |
| 899 | (if (stringp files) | 897 | (if (stringp files) |
| 900 | (setq files (list files)) | 898 | (setq files (list files)) |
| @@ -924,11 +922,11 @@ is an alist in the following form: | |||
| 924 | (save-buffer) | 922 | (save-buffer) |
| 925 | (kill-buffer buf)))) | 923 | (kill-buffer buf)))) |
| 926 | 924 | ||
| 927 | (defun tumme-list-tags (file) | 925 | (defun image-dired-list-tags (file) |
| 928 | "Read all tags for image FILE from the image database." | 926 | "Read all tags for image FILE from the image database." |
| 929 | (save-excursion | 927 | (save-excursion |
| 930 | (let (end buf (tags "")) | 928 | (let (end buf (tags "")) |
| 931 | (setq buf (find-file tumme-db-file)) | 929 | (setq buf (find-file image-dired-db-file)) |
| 932 | (goto-char (point-min)) | 930 | (goto-char (point-min)) |
| 933 | (when (search-forward-regexp | 931 | (when (search-forward-regexp |
| 934 | (format "^%s" file) nil t) | 932 | (format "^%s" file) nil t) |
| @@ -944,7 +942,7 @@ is an alist in the following form: | |||
| 944 | (split-string tags ";")))) | 942 | (split-string tags ";")))) |
| 945 | 943 | ||
| 946 | ;;;###autoload | 944 | ;;;###autoload |
| 947 | (defun tumme-tag-files (arg) | 945 | (defun image-dired-tag-files (arg) |
| 948 | "Tag marked file(s) in dired. With prefix ARG, tag file at point." | 946 | "Tag marked file(s) in dired. With prefix ARG, tag file at point." |
| 949 | (interactive "P") | 947 | (interactive "P") |
| 950 | (let ((tag (read-string "Tags to add (separate tags with a semicolon): ")) | 948 | (let ((tag (read-string "Tags to add (separate tags with a semicolon): ")) |
| @@ -952,22 +950,22 @@ is an alist in the following form: | |||
| 952 | (if arg | 950 | (if arg |
| 953 | (setq files (list (dired-get-filename))) | 951 | (setq files (list (dired-get-filename))) |
| 954 | (setq files (dired-get-marked-files))) | 952 | (setq files (dired-get-marked-files))) |
| 955 | (tumme-write-tags | 953 | (image-dired-write-tags |
| 956 | (mapcar | 954 | (mapcar |
| 957 | (lambda (x) | 955 | (lambda (x) |
| 958 | (cons x tag)) | 956 | (cons x tag)) |
| 959 | files)))) | 957 | files)))) |
| 960 | 958 | ||
| 961 | (defun tumme-tag-thumbnail () | 959 | (defun image-dired-tag-thumbnail () |
| 962 | "Tag current thumbnail." | 960 | "Tag current thumbnail." |
| 963 | (interactive) | 961 | (interactive) |
| 964 | (let ((tag (read-string "Tags to add (separate tags with a semicolon): "))) | 962 | (let ((tag (read-string "Tags to add (separate tags with a semicolon): "))) |
| 965 | (tumme-write-tags (list (cons (tumme-original-file-name) tag)))) | 963 | (image-dired-write-tags (list (cons (image-dired-original-file-name) tag)))) |
| 966 | (tumme-update-property | 964 | (image-dired-update-property |
| 967 | 'tags (tumme-list-tags (tumme-original-file-name)))) | 965 | 'tags (image-dired-list-tags (image-dired-original-file-name)))) |
| 968 | 966 | ||
| 969 | ;;;###autoload | 967 | ;;;###autoload |
| 970 | (defun tumme-delete-tag (arg) | 968 | (defun image-dired-delete-tag (arg) |
| 971 | "Remove tag for selected file(s). | 969 | "Remove tag for selected file(s). |
| 972 | With prefix argument ARG, remove tag from file at point." | 970 | With prefix argument ARG, remove tag from file at point." |
| 973 | (interactive "P") | 971 | (interactive "P") |
| @@ -976,39 +974,39 @@ With prefix argument ARG, remove tag from file at point." | |||
| 976 | (if arg | 974 | (if arg |
| 977 | (setq files (list (dired-get-filename))) | 975 | (setq files (list (dired-get-filename))) |
| 978 | (setq files (dired-get-marked-files))) | 976 | (setq files (dired-get-marked-files))) |
| 979 | (tumme-remove-tag files tag))) | 977 | (image-dired-remove-tag files tag))) |
| 980 | 978 | ||
| 981 | (defun tumme-tag-thumbnail-remove () | 979 | (defun image-dired-tag-thumbnail-remove () |
| 982 | "Remove tag from thumbnail." | 980 | "Remove tag from thumbnail." |
| 983 | (interactive) | 981 | (interactive) |
| 984 | (let ((tag (read-string "Tag to remove: "))) | 982 | (let ((tag (read-string "Tag to remove: "))) |
| 985 | (tumme-remove-tag (tumme-original-file-name) tag)) | 983 | (image-dired-remove-tag (image-dired-original-file-name) tag)) |
| 986 | (tumme-update-property | 984 | (image-dired-update-property |
| 987 | 'tags (tumme-list-tags (tumme-original-file-name)))) | 985 | 'tags (image-dired-list-tags (image-dired-original-file-name)))) |
| 988 | 986 | ||
| 989 | (defun tumme-original-file-name () | 987 | (defun image-dired-original-file-name () |
| 990 | "Get original file name for thumbnail or display image at point." | 988 | "Get original file name for thumbnail or display image at point." |
| 991 | (get-text-property (point) 'original-file-name)) | 989 | (get-text-property (point) 'original-file-name)) |
| 992 | 990 | ||
| 993 | (defun tumme-associated-dired-buffer () | 991 | (defun image-dired-associated-dired-buffer () |
| 994 | "Get associated dired buffer at point." | 992 | "Get associated dired buffer at point." |
| 995 | (get-text-property (point) 'associated-dired-buffer)) | 993 | (get-text-property (point) 'associated-dired-buffer)) |
| 996 | 994 | ||
| 997 | (defun tumme-get-buffer-window (buf) | 995 | (defun image-dired-get-buffer-window (buf) |
| 998 | "Return window where buffer BUF is." | 996 | "Return window where buffer BUF is." |
| 999 | (get-window-with-predicate | 997 | (get-window-with-predicate |
| 1000 | (lambda (window) | 998 | (lambda (window) |
| 1001 | (equal (window-buffer window) buf)) | 999 | (equal (window-buffer window) buf)) |
| 1002 | nil t)) | 1000 | nil t)) |
| 1003 | 1001 | ||
| 1004 | (defun tumme-track-original-file () | 1002 | (defun image-dired-track-original-file () |
| 1005 | "Track the original file in the associated dired buffer. | 1003 | "Track the original file in the associated dired buffer. |
| 1006 | See documentation for `tumme-toggle-movement-tracking'. Interactive | 1004 | See documentation for `image-dired-toggle-movement-tracking'. Interactive |
| 1007 | use only useful if `tumme-track-movement' is nil." | 1005 | use only useful if `image-dired-track-movement' is nil." |
| 1008 | (interactive) | 1006 | (interactive) |
| 1009 | (let ((old-buf (current-buffer)) | 1007 | (let ((old-buf (current-buffer)) |
| 1010 | (dired-buf (tumme-associated-dired-buffer)) | 1008 | (dired-buf (image-dired-associated-dired-buffer)) |
| 1011 | (file-name (tumme-original-file-name))) | 1009 | (file-name (image-dired-original-file-name))) |
| 1012 | (when (and (buffer-live-p dired-buf) file-name) | 1010 | (when (and (buffer-live-p dired-buf) file-name) |
| 1013 | (setq file-name (file-name-nondirectory file-name)) | 1011 | (setq file-name (file-name-nondirectory file-name)) |
| 1014 | (set-buffer dired-buf) | 1012 | (set-buffer dired-buf) |
| @@ -1017,28 +1015,28 @@ use only useful if `tumme-track-movement' is nil." | |||
| 1017 | (message "Could not track file") | 1015 | (message "Could not track file") |
| 1018 | (dired-move-to-filename) | 1016 | (dired-move-to-filename) |
| 1019 | (set-window-point | 1017 | (set-window-point |
| 1020 | (tumme-get-buffer-window dired-buf) (point))) | 1018 | (image-dired-get-buffer-window dired-buf) (point))) |
| 1021 | (set-buffer old-buf)))) | 1019 | (set-buffer old-buf)))) |
| 1022 | 1020 | ||
| 1023 | (defun tumme-toggle-movement-tracking () | 1021 | (defun image-dired-toggle-movement-tracking () |
| 1024 | "Turn on and off `tumme-track-movement'. | 1022 | "Turn on and off `image-dired-track-movement'. |
| 1025 | Tracking of the movements between thumbnail and dired buffer so that | 1023 | Tracking of the movements between thumbnail and dired buffer so that |
| 1026 | they are \"mirrored\" in the dired buffer. When this is on, moving | 1024 | they are \"mirrored\" in the dired buffer. When this is on, moving |
| 1027 | around in the thumbnail or dired buffer will find the matching | 1025 | around in the thumbnail or dired buffer will find the matching |
| 1028 | position in the other buffer." | 1026 | position in the other buffer." |
| 1029 | (interactive) | 1027 | (interactive) |
| 1030 | (setq tumme-track-movement (not tumme-track-movement)) | 1028 | (setq image-dired-track-movement (not image-dired-track-movement)) |
| 1031 | (message "Tracking %s" (if tumme-track-movement "on" "off"))) | 1029 | (message "Tracking %s" (if image-dired-track-movement "on" "off"))) |
| 1032 | 1030 | ||
| 1033 | (defun tumme-track-thumbnail () | 1031 | (defun image-dired-track-thumbnail () |
| 1034 | "Track current dired file's thumb in `tumme-thumbnail-buffer'. | 1032 | "Track current dired file's thumb in `image-dired-thumbnail-buffer'. |
| 1035 | This is almost the same as what `tumme-track-original-file' does, but | 1033 | This is almost the same as what `image-dired-track-original-file' does, but |
| 1036 | the other way around." | 1034 | the other way around." |
| 1037 | (let ((file (dired-get-filename)) | 1035 | (let ((file (dired-get-filename)) |
| 1038 | (old-buf (current-buffer)) | 1036 | (old-buf (current-buffer)) |
| 1039 | prop-val found) | 1037 | prop-val found) |
| 1040 | (when (get-buffer tumme-thumbnail-buffer) | 1038 | (when (get-buffer image-dired-thumbnail-buffer) |
| 1041 | (set-buffer tumme-thumbnail-buffer) | 1039 | (set-buffer image-dired-thumbnail-buffer) |
| 1042 | (goto-char (point-min)) | 1040 | (goto-char (point-min)) |
| 1043 | (while (and (not (eobp)) | 1041 | (while (and (not (eobp)) |
| 1044 | (not found)) | 1042 | (not found)) |
| @@ -1050,29 +1048,29 @@ the other way around." | |||
| 1050 | (forward-char 1))) | 1048 | (forward-char 1))) |
| 1051 | (when found | 1049 | (when found |
| 1052 | (set-window-point | 1050 | (set-window-point |
| 1053 | (tumme-thumbnail-window) (point)) | 1051 | (image-dired-thumbnail-window) (point)) |
| 1054 | (tumme-display-thumb-properties)) | 1052 | (image-dired-display-thumb-properties)) |
| 1055 | (set-buffer old-buf)))) | 1053 | (set-buffer old-buf)))) |
| 1056 | 1054 | ||
| 1057 | (defun tumme-dired-next-line (&optional arg) | 1055 | (defun image-dired-dired-next-line (&optional arg) |
| 1058 | "Call `dired-next-line', then track thumbnail. | 1056 | "Call `dired-next-line', then track thumbnail. |
| 1059 | This can safely replace `dired-next-line'. With prefix argument, move | 1057 | This can safely replace `dired-next-line'. With prefix argument, move |
| 1060 | ARG lines." | 1058 | ARG lines." |
| 1061 | (interactive "P") | 1059 | (interactive "P") |
| 1062 | (dired-next-line (or arg 1)) | 1060 | (dired-next-line (or arg 1)) |
| 1063 | (if tumme-track-movement | 1061 | (if image-dired-track-movement |
| 1064 | (tumme-track-thumbnail))) | 1062 | (image-dired-track-thumbnail))) |
| 1065 | 1063 | ||
| 1066 | (defun tumme-dired-previous-line (&optional arg) | 1064 | (defun image-dired-dired-previous-line (&optional arg) |
| 1067 | "Call `dired-previous-line', then track thumbnail. | 1065 | "Call `dired-previous-line', then track thumbnail. |
| 1068 | This can safely replace `dired-previous-line'. With prefix argument, | 1066 | This can safely replace `dired-previous-line'. With prefix argument, |
| 1069 | move ARG lines." | 1067 | move ARG lines." |
| 1070 | (interactive "P") | 1068 | (interactive "P") |
| 1071 | (dired-previous-line (or arg 1)) | 1069 | (dired-previous-line (or arg 1)) |
| 1072 | (if tumme-track-movement | 1070 | (if image-dired-track-movement |
| 1073 | (tumme-track-thumbnail))) | 1071 | (image-dired-track-thumbnail))) |
| 1074 | 1072 | ||
| 1075 | (defun tumme-forward-image (&optional arg) | 1073 | (defun image-dired-forward-image (&optional arg) |
| 1076 | "Move to next image and display properties. | 1074 | "Move to next image and display properties. |
| 1077 | Optional prefix ARG says how many images to move; default is one | 1075 | Optional prefix ARG says how many images to move; default is one |
| 1078 | image." | 1076 | image." |
| @@ -1083,17 +1081,17 @@ image." | |||
| 1083 | (save-excursion | 1081 | (save-excursion |
| 1084 | (forward-char) | 1082 | (forward-char) |
| 1085 | (while (and (not (eobp)) | 1083 | (while (and (not (eobp)) |
| 1086 | (not (tumme-image-at-point-p))) | 1084 | (not (image-dired-image-at-point-p))) |
| 1087 | (forward-char)) | 1085 | (forward-char)) |
| 1088 | (setq pos (point)) | 1086 | (setq pos (point)) |
| 1089 | (tumme-image-at-point-p))) | 1087 | (image-dired-image-at-point-p))) |
| 1090 | (goto-char pos) | 1088 | (goto-char pos) |
| 1091 | (error "At last image")))) | 1089 | (error "At last image")))) |
| 1092 | (when tumme-track-movement | 1090 | (when image-dired-track-movement |
| 1093 | (tumme-track-original-file)) | 1091 | (image-dired-track-original-file)) |
| 1094 | (tumme-display-thumb-properties)) | 1092 | (image-dired-display-thumb-properties)) |
| 1095 | 1093 | ||
| 1096 | (defun tumme-backward-image (&optional arg) | 1094 | (defun image-dired-backward-image (&optional arg) |
| 1097 | "Move to previous image and display properties. | 1095 | "Move to previous image and display properties. |
| 1098 | Optional prefix ARG says how many images to move; default is one | 1096 | Optional prefix ARG says how many images to move; default is one |
| 1099 | image." | 1097 | image." |
| @@ -1104,29 +1102,29 @@ image." | |||
| 1104 | (save-excursion | 1102 | (save-excursion |
| 1105 | (backward-char) | 1103 | (backward-char) |
| 1106 | (while (and (not (bobp)) | 1104 | (while (and (not (bobp)) |
| 1107 | (not (tumme-image-at-point-p))) | 1105 | (not (image-dired-image-at-point-p))) |
| 1108 | (backward-char)) | 1106 | (backward-char)) |
| 1109 | (setq pos (point)) | 1107 | (setq pos (point)) |
| 1110 | (tumme-image-at-point-p))) | 1108 | (image-dired-image-at-point-p))) |
| 1111 | (goto-char pos) | 1109 | (goto-char pos) |
| 1112 | (error "At first image")))) | 1110 | (error "At first image")))) |
| 1113 | (when tumme-track-movement | 1111 | (when image-dired-track-movement |
| 1114 | (tumme-track-original-file)) | 1112 | (image-dired-track-original-file)) |
| 1115 | (tumme-display-thumb-properties)) | 1113 | (image-dired-display-thumb-properties)) |
| 1116 | 1114 | ||
| 1117 | (defun tumme-next-line () | 1115 | (defun image-dired-next-line () |
| 1118 | "Move to next line and display properties." | 1116 | "Move to next line and display properties." |
| 1119 | (interactive) | 1117 | (interactive) |
| 1120 | (next-line 1) | 1118 | (next-line 1) |
| 1121 | ;; If we end up in an empty spot, back up to the next thumbnail. | 1119 | ;; If we end up in an empty spot, back up to the next thumbnail. |
| 1122 | (if (not (tumme-image-at-point-p)) | 1120 | (if (not (image-dired-image-at-point-p)) |
| 1123 | (tumme-backward-image)) | 1121 | (image-dired-backward-image)) |
| 1124 | (if tumme-track-movement | 1122 | (if image-dired-track-movement |
| 1125 | (tumme-track-original-file)) | 1123 | (image-dired-track-original-file)) |
| 1126 | (tumme-display-thumb-properties)) | 1124 | (image-dired-display-thumb-properties)) |
| 1127 | 1125 | ||
| 1128 | 1126 | ||
| 1129 | (defun tumme-previous-line () | 1127 | (defun image-dired-previous-line () |
| 1130 | "Move to previous line and display properties." | 1128 | "Move to previous line and display properties." |
| 1131 | (interactive) | 1129 | (interactive) |
| 1132 | (previous-line 1) | 1130 | (previous-line 1) |
| @@ -1134,30 +1132,30 @@ image." | |||
| 1134 | ;; thumbnail. This should only happen if the user deleted a | 1132 | ;; thumbnail. This should only happen if the user deleted a |
| 1135 | ;; thumbnail and did not refresh, so it is not very common. But we | 1133 | ;; thumbnail and did not refresh, so it is not very common. But we |
| 1136 | ;; can handle it in a good manner, so why not? | 1134 | ;; can handle it in a good manner, so why not? |
| 1137 | (if (not (tumme-image-at-point-p)) | 1135 | (if (not (image-dired-image-at-point-p)) |
| 1138 | (tumme-backward-image)) | 1136 | (image-dired-backward-image)) |
| 1139 | (if tumme-track-movement | 1137 | (if image-dired-track-movement |
| 1140 | (tumme-track-original-file)) | 1138 | (image-dired-track-original-file)) |
| 1141 | (tumme-display-thumb-properties)) | 1139 | (image-dired-display-thumb-properties)) |
| 1142 | 1140 | ||
| 1143 | (defun tumme-format-properties-string (buf file props comment) | 1141 | (defun image-dired-format-properties-string (buf file props comment) |
| 1144 | "Format display properties. | 1142 | "Format display properties. |
| 1145 | BUF is the associated dired buffer, FILE is the original image file | 1143 | BUF is the associated dired buffer, FILE is the original image file |
| 1146 | name, PROPS is a list of tags and COMMENT is the image files's | 1144 | name, PROPS is a list of tags and COMMENT is the image files's |
| 1147 | comment." | 1145 | comment." |
| 1148 | (format-spec | 1146 | (format-spec |
| 1149 | tumme-display-properties-format | 1147 | image-dired-display-properties-format |
| 1150 | (list | 1148 | (list |
| 1151 | (cons ?b (or buf "")) | 1149 | (cons ?b (or buf "")) |
| 1152 | (cons ?f file) | 1150 | (cons ?f file) |
| 1153 | (cons ?t (or (princ props) "")) | 1151 | (cons ?t (or (princ props) "")) |
| 1154 | (cons ?c (or comment ""))))) | 1152 | (cons ?c (or comment ""))))) |
| 1155 | 1153 | ||
| 1156 | (defun tumme-display-thumb-properties () | 1154 | (defun image-dired-display-thumb-properties () |
| 1157 | "Display thumbnail properties in the echo area." | 1155 | "Display thumbnail properties in the echo area." |
| 1158 | (if (not (eobp)) | 1156 | (if (not (eobp)) |
| 1159 | (let ((file-name (file-name-nondirectory (tumme-original-file-name))) | 1157 | (let ((file-name (file-name-nondirectory (image-dired-original-file-name))) |
| 1160 | (dired-buf (buffer-name (tumme-associated-dired-buffer))) | 1158 | (dired-buf (buffer-name (image-dired-associated-dired-buffer))) |
| 1161 | (props (mapconcat | 1159 | (props (mapconcat |
| 1162 | 'princ | 1160 | 'princ |
| 1163 | (get-text-property (point) 'tags) | 1161 | (get-text-property (point) 'tags) |
| @@ -1165,26 +1163,26 @@ comment." | |||
| 1165 | (comment (get-text-property (point) 'comment))) | 1163 | (comment (get-text-property (point) 'comment))) |
| 1166 | (if file-name | 1164 | (if file-name |
| 1167 | (message | 1165 | (message |
| 1168 | (tumme-format-properties-string | 1166 | (image-dired-format-properties-string |
| 1169 | dired-buf | 1167 | dired-buf |
| 1170 | file-name | 1168 | file-name |
| 1171 | props | 1169 | props |
| 1172 | comment)))))) | 1170 | comment)))))) |
| 1173 | 1171 | ||
| 1174 | (defun tumme-dired-file-marked-p () | 1172 | (defun image-dired-dired-file-marked-p () |
| 1175 | "Check whether file on current line is marked or not." | 1173 | "Check whether file on current line is marked or not." |
| 1176 | (save-excursion | 1174 | (save-excursion |
| 1177 | (beginning-of-line) | 1175 | (beginning-of-line) |
| 1178 | (not (looking-at "^ .*$")))) | 1176 | (not (looking-at "^ .*$")))) |
| 1179 | 1177 | ||
| 1180 | (defun tumme-modify-mark-on-thumb-original-file (command) | 1178 | (defun image-dired-modify-mark-on-thumb-original-file (command) |
| 1181 | "Modify mark in dired buffer. | 1179 | "Modify mark in dired buffer. |
| 1182 | This is quite ugly but I don't know how to implemented in a better | 1180 | This is quite ugly but I don't know how to implemented in a better |
| 1183 | way. COMMAND is one of 'mark for marking file in dired, 'unmark for | 1181 | way. COMMAND is one of 'mark for marking file in dired, 'unmark for |
| 1184 | unmarking file in dired or 'flag for flagging file for delete in | 1182 | unmarking file in dired or 'flag for flagging file for delete in |
| 1185 | dired." | 1183 | dired." |
| 1186 | (let ((file-name (tumme-original-file-name)) | 1184 | (let ((file-name (image-dired-original-file-name)) |
| 1187 | (dired-buf (tumme-associated-dired-buffer))) | 1185 | (dired-buf (image-dired-associated-dired-buffer))) |
| 1188 | (if (not (and dired-buf file-name)) | 1186 | (if (not (and dired-buf file-name)) |
| 1189 | (message "No image, or image with correct properties, at point.") | 1187 | (message "No image, or image with correct properties, at point.") |
| 1190 | (with-current-buffer dired-buf | 1188 | (with-current-buffer dired-buf |
| @@ -1195,42 +1193,42 @@ dired." | |||
| 1195 | (cond ((eq command 'mark) (dired-mark 1)) | 1193 | (cond ((eq command 'mark) (dired-mark 1)) |
| 1196 | ((eq command 'unmark) (dired-unmark 1)) | 1194 | ((eq command 'unmark) (dired-unmark 1)) |
| 1197 | ((eq command 'toggle) | 1195 | ((eq command 'toggle) |
| 1198 | (if (tumme-dired-file-marked-p) | 1196 | (if (image-dired-dired-file-marked-p) |
| 1199 | (dired-unmark 1) | 1197 | (dired-unmark 1) |
| 1200 | (dired-mark 1))) | 1198 | (dired-mark 1))) |
| 1201 | ((eq command 'flag) (dired-flag-file-deletion 1)))))))) | 1199 | ((eq command 'flag) (dired-flag-file-deletion 1)))))))) |
| 1202 | 1200 | ||
| 1203 | (defun tumme-mark-thumb-original-file () | 1201 | (defun image-dired-mark-thumb-original-file () |
| 1204 | "Mark original image file in associated dired buffer." | 1202 | "Mark original image file in associated dired buffer." |
| 1205 | (interactive) | 1203 | (interactive) |
| 1206 | (tumme-modify-mark-on-thumb-original-file 'mark) | 1204 | (image-dired-modify-mark-on-thumb-original-file 'mark) |
| 1207 | (tumme-forward-image)) | 1205 | (image-dired-forward-image)) |
| 1208 | 1206 | ||
| 1209 | (defun tumme-unmark-thumb-original-file () | 1207 | (defun image-dired-unmark-thumb-original-file () |
| 1210 | "Unmark original image file in associated dired buffer." | 1208 | "Unmark original image file in associated dired buffer." |
| 1211 | (interactive) | 1209 | (interactive) |
| 1212 | (tumme-modify-mark-on-thumb-original-file 'unmark) | 1210 | (image-dired-modify-mark-on-thumb-original-file 'unmark) |
| 1213 | (tumme-forward-image)) | 1211 | (image-dired-forward-image)) |
| 1214 | 1212 | ||
| 1215 | (defun tumme-flag-thumb-original-file () | 1213 | (defun image-dired-flag-thumb-original-file () |
| 1216 | "Flag original image file for deletion in associated dired buffer." | 1214 | "Flag original image file for deletion in associated dired buffer." |
| 1217 | (interactive) | 1215 | (interactive) |
| 1218 | (tumme-modify-mark-on-thumb-original-file 'flag) | 1216 | (image-dired-modify-mark-on-thumb-original-file 'flag) |
| 1219 | (tumme-forward-image)) | 1217 | (image-dired-forward-image)) |
| 1220 | 1218 | ||
| 1221 | (defun tumme-toggle-mark-thumb-original-file () | 1219 | (defun image-dired-toggle-mark-thumb-original-file () |
| 1222 | "Toggle mark on original image file in associated dired buffer." | 1220 | "Toggle mark on original image file in associated dired buffer." |
| 1223 | (interactive) | 1221 | (interactive) |
| 1224 | (tumme-modify-mark-on-thumb-original-file 'toggle)) | 1222 | (image-dired-modify-mark-on-thumb-original-file 'toggle)) |
| 1225 | 1223 | ||
| 1226 | (defun tumme-jump-original-dired-buffer () | 1224 | (defun image-dired-jump-original-dired-buffer () |
| 1227 | "Jump to the dired buffer associated with the current image file. | 1225 | "Jump to the dired buffer associated with the current image file. |
| 1228 | You probably want to use this together with | 1226 | You probably want to use this together with |
| 1229 | `tumme-track-original-file'." | 1227 | `image-dired-track-original-file'." |
| 1230 | (interactive) | 1228 | (interactive) |
| 1231 | (let ((buf (tumme-associated-dired-buffer)) | 1229 | (let ((buf (image-dired-associated-dired-buffer)) |
| 1232 | window frame) | 1230 | window frame) |
| 1233 | (setq window (tumme-get-buffer-window buf)) | 1231 | (setq window (image-dired-get-buffer-window buf)) |
| 1234 | (if window | 1232 | (if window |
| 1235 | (progn | 1233 | (progn |
| 1236 | (if (not (equal (selected-frame) (setq frame (window-frame window)))) | 1234 | (if (not (equal (selected-frame) (setq frame (window-frame window)))) |
| @@ -1239,10 +1237,10 @@ You probably want to use this together with | |||
| 1239 | (message "Associated dired buffer not visible")))) | 1237 | (message "Associated dired buffer not visible")))) |
| 1240 | 1238 | ||
| 1241 | ;;;###autoload | 1239 | ;;;###autoload |
| 1242 | (defun tumme-jump-thumbnail-buffer () | 1240 | (defun image-dired-jump-thumbnail-buffer () |
| 1243 | "Jump to thumbnail buffer." | 1241 | "Jump to thumbnail buffer." |
| 1244 | (interactive) | 1242 | (interactive) |
| 1245 | (let ((window (tumme-thumbnail-window)) | 1243 | (let ((window (image-dired-thumbnail-window)) |
| 1246 | frame) | 1244 | frame) |
| 1247 | (if window | 1245 | (if window |
| 1248 | (progn | 1246 | (progn |
| @@ -1251,327 +1249,327 @@ You probably want to use this together with | |||
| 1251 | (select-window window)) | 1249 | (select-window window)) |
| 1252 | (message "Thumbnail buffer not visible")))) | 1250 | (message "Thumbnail buffer not visible")))) |
| 1253 | 1251 | ||
| 1254 | (defvar tumme-thumbnail-mode-map (make-sparse-keymap) | 1252 | (defvar image-dired-thumbnail-mode-map (make-sparse-keymap) |
| 1255 | "Keymap for `tumme-thumbnail-mode'.") | 1253 | "Keymap for `image-dired-thumbnail-mode'.") |
| 1256 | 1254 | ||
| 1257 | (defvar tumme-thumbnail-mode-line-up-map (make-sparse-keymap) | 1255 | (defvar image-dired-thumbnail-mode-line-up-map (make-sparse-keymap) |
| 1258 | "Keymap for line-up commands in `tumme-thumbnail-mode'.") | 1256 | "Keymap for line-up commands in `image-dired-thumbnail-mode'.") |
| 1259 | 1257 | ||
| 1260 | (defvar tumme-thumbnail-mode-tag-map (make-sparse-keymap) | 1258 | (defvar image-dired-thumbnail-mode-tag-map (make-sparse-keymap) |
| 1261 | "Keymap for tag commands in `tumme-thumbnail-mode'.") | 1259 | "Keymap for tag commands in `image-dired-thumbnail-mode'.") |
| 1262 | 1260 | ||
| 1263 | (defun tumme-define-thumbnail-mode-keymap () | 1261 | (defun image-dired-define-thumbnail-mode-keymap () |
| 1264 | "Define keymap for `tumme-thumbnail-mode'." | 1262 | "Define keymap for `image-dired-thumbnail-mode'." |
| 1265 | 1263 | ||
| 1266 | ;; Keys | 1264 | ;; Keys |
| 1267 | (define-key tumme-thumbnail-mode-map [right] 'tumme-forward-image) | 1265 | (define-key image-dired-thumbnail-mode-map [right] 'image-dired-forward-image) |
| 1268 | (define-key tumme-thumbnail-mode-map [left] 'tumme-backward-image) | 1266 | (define-key image-dired-thumbnail-mode-map [left] 'image-dired-backward-image) |
| 1269 | (define-key tumme-thumbnail-mode-map [up] 'tumme-previous-line) | 1267 | (define-key image-dired-thumbnail-mode-map [up] 'image-dired-previous-line) |
| 1270 | (define-key tumme-thumbnail-mode-map [down] 'tumme-next-line) | 1268 | (define-key image-dired-thumbnail-mode-map [down] 'image-dired-next-line) |
| 1271 | (define-key tumme-thumbnail-mode-map "\C-f" 'tumme-forward-image) | 1269 | (define-key image-dired-thumbnail-mode-map "\C-f" 'image-dired-forward-image) |
| 1272 | (define-key tumme-thumbnail-mode-map "\C-b" 'tumme-backward-image) | 1270 | (define-key image-dired-thumbnail-mode-map "\C-b" 'image-dired-backward-image) |
| 1273 | (define-key tumme-thumbnail-mode-map "\C-p" 'tumme-previous-line) | 1271 | (define-key image-dired-thumbnail-mode-map "\C-p" 'image-dired-previous-line) |
| 1274 | (define-key tumme-thumbnail-mode-map "\C-n" 'tumme-next-line) | 1272 | (define-key image-dired-thumbnail-mode-map "\C-n" 'image-dired-next-line) |
| 1275 | 1273 | ||
| 1276 | (define-key tumme-thumbnail-mode-map "d" 'tumme-flag-thumb-original-file) | 1274 | (define-key image-dired-thumbnail-mode-map "d" 'image-dired-flag-thumb-original-file) |
| 1277 | (define-key tumme-thumbnail-mode-map [delete] | 1275 | (define-key image-dired-thumbnail-mode-map [delete] |
| 1278 | 'tumme-flag-thumb-original-file) | 1276 | 'image-dired-flag-thumb-original-file) |
| 1279 | (define-key tumme-thumbnail-mode-map "m" 'tumme-mark-thumb-original-file) | 1277 | (define-key image-dired-thumbnail-mode-map "m" 'image-dired-mark-thumb-original-file) |
| 1280 | (define-key tumme-thumbnail-mode-map "u" 'tumme-unmark-thumb-original-file) | 1278 | (define-key image-dired-thumbnail-mode-map "u" 'image-dired-unmark-thumb-original-file) |
| 1281 | (define-key tumme-thumbnail-mode-map "." 'tumme-track-original-file) | 1279 | (define-key image-dired-thumbnail-mode-map "." 'image-dired-track-original-file) |
| 1282 | (define-key tumme-thumbnail-mode-map [tab] 'tumme-jump-original-dired-buffer) | 1280 | (define-key image-dired-thumbnail-mode-map [tab] 'image-dired-jump-original-dired-buffer) |
| 1283 | 1281 | ||
| 1284 | ;; add line-up map | 1282 | ;; add line-up map |
| 1285 | (define-key tumme-thumbnail-mode-map "g" tumme-thumbnail-mode-line-up-map) | 1283 | (define-key image-dired-thumbnail-mode-map "g" image-dired-thumbnail-mode-line-up-map) |
| 1286 | 1284 | ||
| 1287 | ;; map it to "g" so that the user can press it more quickly | 1285 | ;; map it to "g" so that the user can press it more quickly |
| 1288 | (define-key tumme-thumbnail-mode-line-up-map "g" 'tumme-line-up-dynamic) | 1286 | (define-key image-dired-thumbnail-mode-line-up-map "g" 'image-dired-line-up-dynamic) |
| 1289 | ;; "f" for "fixed" number of thumbs per row | 1287 | ;; "f" for "fixed" number of thumbs per row |
| 1290 | (define-key tumme-thumbnail-mode-line-up-map "f" 'tumme-line-up) | 1288 | (define-key image-dired-thumbnail-mode-line-up-map "f" 'image-dired-line-up) |
| 1291 | ;; "i" for "interactive" | 1289 | ;; "i" for "interactive" |
| 1292 | (define-key tumme-thumbnail-mode-line-up-map "i" 'tumme-line-up-interactive) | 1290 | (define-key image-dired-thumbnail-mode-line-up-map "i" 'image-dired-line-up-interactive) |
| 1293 | 1291 | ||
| 1294 | ;; add tag map | 1292 | ;; add tag map |
| 1295 | (define-key tumme-thumbnail-mode-map "t" tumme-thumbnail-mode-tag-map) | 1293 | (define-key image-dired-thumbnail-mode-map "t" image-dired-thumbnail-mode-tag-map) |
| 1296 | 1294 | ||
| 1297 | ;; map it to "t" so that the user can press it more quickly | 1295 | ;; map it to "t" so that the user can press it more quickly |
| 1298 | (define-key tumme-thumbnail-mode-tag-map "t" 'tumme-tag-thumbnail) | 1296 | (define-key image-dired-thumbnail-mode-tag-map "t" 'image-dired-tag-thumbnail) |
| 1299 | ;; "r" for "remove" | 1297 | ;; "r" for "remove" |
| 1300 | (define-key tumme-thumbnail-mode-tag-map "r" 'tumme-tag-thumbnail-remove) | 1298 | (define-key image-dired-thumbnail-mode-tag-map "r" 'image-dired-tag-thumbnail-remove) |
| 1301 | 1299 | ||
| 1302 | (define-key tumme-thumbnail-mode-map "\C-m" | 1300 | (define-key image-dired-thumbnail-mode-map "\C-m" |
| 1303 | 'tumme-display-thumbnail-original-image) | 1301 | 'image-dired-display-thumbnail-original-image) |
| 1304 | (define-key tumme-thumbnail-mode-map [C-return] | 1302 | (define-key image-dired-thumbnail-mode-map [C-return] |
| 1305 | 'tumme-thumbnail-display-external) | 1303 | 'image-dired-thumbnail-display-external) |
| 1306 | 1304 | ||
| 1307 | (define-key tumme-thumbnail-mode-map "l" 'tumme-rotate-thumbnail-left) | 1305 | (define-key image-dired-thumbnail-mode-map "l" 'image-dired-rotate-thumbnail-left) |
| 1308 | (define-key tumme-thumbnail-mode-map "r" 'tumme-rotate-thumbnail-right) | 1306 | (define-key image-dired-thumbnail-mode-map "r" 'image-dired-rotate-thumbnail-right) |
| 1309 | 1307 | ||
| 1310 | (define-key tumme-thumbnail-mode-map "L" 'tumme-rotate-original-left) | 1308 | (define-key image-dired-thumbnail-mode-map "L" 'image-dired-rotate-original-left) |
| 1311 | (define-key tumme-thumbnail-mode-map "R" 'tumme-rotate-original-right) | 1309 | (define-key image-dired-thumbnail-mode-map "R" 'image-dired-rotate-original-right) |
| 1312 | 1310 | ||
| 1313 | (define-key tumme-thumbnail-mode-map "D" | 1311 | (define-key image-dired-thumbnail-mode-map "D" |
| 1314 | 'tumme-thumbnail-set-image-description) | 1312 | 'image-dired-thumbnail-set-image-description) |
| 1315 | 1313 | ||
| 1316 | (define-key tumme-thumbnail-mode-map "\C-d" 'tumme-delete-char) | 1314 | (define-key image-dired-thumbnail-mode-map "\C-d" 'image-dired-delete-char) |
| 1317 | (define-key tumme-thumbnail-mode-map " " | 1315 | (define-key image-dired-thumbnail-mode-map " " |
| 1318 | 'tumme-display-next-thumbnail-original) | 1316 | 'image-dired-display-next-thumbnail-original) |
| 1319 | (define-key tumme-thumbnail-mode-map | 1317 | (define-key image-dired-thumbnail-mode-map |
| 1320 | (kbd "DEL") 'tumme-display-previous-thumbnail-original) | 1318 | (kbd "DEL") 'image-dired-display-previous-thumbnail-original) |
| 1321 | (define-key tumme-thumbnail-mode-map "c" 'tumme-comment-thumbnail) | 1319 | (define-key image-dired-thumbnail-mode-map "c" 'image-dired-comment-thumbnail) |
| 1322 | (define-key tumme-thumbnail-mode-map "q" 'tumme-kill-buffer-and-window) | 1320 | (define-key image-dired-thumbnail-mode-map "q" 'image-dired-kill-buffer-and-window) |
| 1323 | 1321 | ||
| 1324 | ;; Mouse | 1322 | ;; Mouse |
| 1325 | (define-key tumme-thumbnail-mode-map [mouse-2] 'tumme-mouse-display-image) | 1323 | (define-key image-dired-thumbnail-mode-map [mouse-2] 'image-dired-mouse-display-image) |
| 1326 | (define-key tumme-thumbnail-mode-map [mouse-1] 'tumme-mouse-select-thumbnail) | 1324 | (define-key image-dired-thumbnail-mode-map [mouse-1] 'image-dired-mouse-select-thumbnail) |
| 1327 | 1325 | ||
| 1328 | ;; Seems I must first set C-down-mouse-1 to undefined, or else it | 1326 | ;; Seems I must first set C-down-mouse-1 to undefined, or else it |
| 1329 | ;; will trigger the buffer menu. If I try to instead bind | 1327 | ;; will trigger the buffer menu. If I try to instead bind |
| 1330 | ;; C-down-mouse-1 to `tumme-mouse-toggle-mark', I get a message | 1328 | ;; C-down-mouse-1 to `image-dired-mouse-toggle-mark', I get a message |
| 1331 | ;; about C-mouse-1 not being defined afterwards. Annoying, but I | 1329 | ;; about C-mouse-1 not being defined afterwards. Annoying, but I |
| 1332 | ;; probably do not completely understand mouse events. | 1330 | ;; probably do not completely understand mouse events. |
| 1333 | 1331 | ||
| 1334 | (define-key tumme-thumbnail-mode-map [C-down-mouse-1] 'undefined) | 1332 | (define-key image-dired-thumbnail-mode-map [C-down-mouse-1] 'undefined) |
| 1335 | (define-key tumme-thumbnail-mode-map [C-mouse-1] 'tumme-mouse-toggle-mark) | 1333 | (define-key image-dired-thumbnail-mode-map [C-mouse-1] 'image-dired-mouse-toggle-mark) |
| 1336 | 1334 | ||
| 1337 | ;; Menu | 1335 | ;; Menu |
| 1338 | (define-key tumme-thumbnail-mode-map [menu-bar tumme] | 1336 | (define-key image-dired-thumbnail-mode-map [menu-bar image-dired] |
| 1339 | (cons "Tumme" (make-sparse-keymap "Tumme"))) | 1337 | (cons "Image-Dired" (make-sparse-keymap "Image-Dired"))) |
| 1340 | 1338 | ||
| 1341 | (define-key tumme-thumbnail-mode-map | 1339 | (define-key image-dired-thumbnail-mode-map |
| 1342 | [menu-bar tumme tumme-kill-buffer-and-window] | 1340 | [menu-bar image-dired image-dired-kill-buffer-and-window] |
| 1343 | '("Quit" . tumme-kill-buffer-and-window)) | 1341 | '("Quit" . image-dired-kill-buffer-and-window)) |
| 1344 | 1342 | ||
| 1345 | (define-key tumme-thumbnail-mode-map | 1343 | (define-key image-dired-thumbnail-mode-map |
| 1346 | [menu-bar tumme tumme-delete-char] | 1344 | [menu-bar image-dired image-dired-delete-char] |
| 1347 | '("Delete thumbnail from buffer" . tumme-delete-char)) | 1345 | '("Delete thumbnail from buffer" . image-dired-delete-char)) |
| 1348 | 1346 | ||
| 1349 | (define-key tumme-thumbnail-mode-map | 1347 | (define-key image-dired-thumbnail-mode-map |
| 1350 | [menu-bar tumme tumme-tag-thumbnail-remove] | 1348 | [menu-bar image-dired image-dired-tag-thumbnail-remove] |
| 1351 | '("Remove tag from thumbnail" . tumme-tag-thumbnail-remove)) | 1349 | '("Remove tag from thumbnail" . image-dired-tag-thumbnail-remove)) |
| 1352 | 1350 | ||
| 1353 | (define-key tumme-thumbnail-mode-map | 1351 | (define-key image-dired-thumbnail-mode-map |
| 1354 | [menu-bar tumme tumme-tag-thumbnail] | 1352 | [menu-bar image-dired image-dired-tag-thumbnail] |
| 1355 | '("Tag thumbnail" . tumme-tag-thumbnail)) | 1353 | '("Tag thumbnail" . image-dired-tag-thumbnail)) |
| 1356 | 1354 | ||
| 1357 | (define-key tumme-thumbnail-mode-map | 1355 | (define-key image-dired-thumbnail-mode-map |
| 1358 | [menu-bar tumme tumme-comment-thumbnail] | 1356 | [menu-bar image-dired image-dired-comment-thumbnail] |
| 1359 | '("Comment thumbnail" . tumme-comment-thumbnail)) | 1357 | '("Comment thumbnail" . image-dired-comment-thumbnail)) |
| 1360 | 1358 | ||
| 1361 | (define-key tumme-thumbnail-mode-map | 1359 | (define-key image-dired-thumbnail-mode-map |
| 1362 | [menu-bar tumme tumme-refresh-thumb] | 1360 | [menu-bar image-dired image-dired-refresh-thumb] |
| 1363 | '("Refresh thumb" . tumme-refresh-thumb)) | 1361 | '("Refresh thumb" . image-dired-refresh-thumb)) |
| 1364 | (define-key tumme-thumbnail-mode-map | 1362 | (define-key image-dired-thumbnail-mode-map |
| 1365 | [menu-bar tumme tumme-line-up-dynamic] | 1363 | [menu-bar image-dired image-dired-line-up-dynamic] |
| 1366 | '("Dynamic line up" . tumme-line-up-dynamic)) | 1364 | '("Dynamic line up" . image-dired-line-up-dynamic)) |
| 1367 | (define-key tumme-thumbnail-mode-map | 1365 | (define-key image-dired-thumbnail-mode-map |
| 1368 | [menu-bar tumme tumme-line-up] | 1366 | [menu-bar image-dired image-dired-line-up] |
| 1369 | '("Line up thumbnails" . tumme-line-up)) | 1367 | '("Line up thumbnails" . image-dired-line-up)) |
| 1370 | 1368 | ||
| 1371 | (define-key tumme-thumbnail-mode-map | 1369 | (define-key image-dired-thumbnail-mode-map |
| 1372 | [menu-bar tumme tumme-rotate-thumbnail-left] | 1370 | [menu-bar image-dired image-dired-rotate-thumbnail-left] |
| 1373 | '("Rotate thumbnail left" . tumme-rotate-thumbnail-left)) | 1371 | '("Rotate thumbnail left" . image-dired-rotate-thumbnail-left)) |
| 1374 | (define-key tumme-thumbnail-mode-map | 1372 | (define-key image-dired-thumbnail-mode-map |
| 1375 | [menu-bar tumme tumme-rotate-thumbnail-right] | 1373 | [menu-bar image-dired image-dired-rotate-thumbnail-right] |
| 1376 | '("Rotate thumbnail right" . tumme-rotate-thumbnail-right)) | 1374 | '("Rotate thumbnail right" . image-dired-rotate-thumbnail-right)) |
| 1377 | 1375 | ||
| 1378 | (define-key tumme-thumbnail-mode-map | 1376 | (define-key image-dired-thumbnail-mode-map |
| 1379 | [menu-bar tumme tumme-rotate-original-left] | 1377 | [menu-bar image-dired image-dired-rotate-original-left] |
| 1380 | '("Rotate original left" . tumme-rotate-original-left)) | 1378 | '("Rotate original left" . image-dired-rotate-original-left)) |
| 1381 | (define-key tumme-thumbnail-mode-map | 1379 | (define-key image-dired-thumbnail-mode-map |
| 1382 | [menu-bar tumme tumme-rotate-original-right] | 1380 | [menu-bar image-dired image-dired-rotate-original-right] |
| 1383 | '("Rotate original right" . tumme-rotate-original-right)) | 1381 | '("Rotate original right" . image-dired-rotate-original-right)) |
| 1384 | 1382 | ||
| 1385 | (define-key tumme-thumbnail-mode-map | 1383 | (define-key image-dired-thumbnail-mode-map |
| 1386 | [menu-bar tumme tumme-toggle-movement-tracking] | 1384 | [menu-bar image-dired image-dired-toggle-movement-tracking] |
| 1387 | '("Toggle movement tracking on/off" . tumme-toggle-movement-tracking)) | 1385 | '("Toggle movement tracking on/off" . image-dired-toggle-movement-tracking)) |
| 1388 | 1386 | ||
| 1389 | (define-key tumme-thumbnail-mode-map | 1387 | (define-key image-dired-thumbnail-mode-map |
| 1390 | [menu-bar tumme tumme-jump-original-dired-buffer] | 1388 | [menu-bar image-dired image-dired-jump-original-dired-buffer] |
| 1391 | '("Jump to dired buffer" . tumme-jump-original-dired-buffer)) | 1389 | '("Jump to dired buffer" . image-dired-jump-original-dired-buffer)) |
| 1392 | (define-key tumme-thumbnail-mode-map | 1390 | (define-key image-dired-thumbnail-mode-map |
| 1393 | [menu-bar tumme tumme-track-original-file] | 1391 | [menu-bar image-dired image-dired-track-original-file] |
| 1394 | '("Track original" . tumme-track-original-file)) | 1392 | '("Track original" . image-dired-track-original-file)) |
| 1395 | 1393 | ||
| 1396 | (define-key tumme-thumbnail-mode-map | 1394 | (define-key image-dired-thumbnail-mode-map |
| 1397 | [menu-bar tumme tumme-flag-thumb-original-file] | 1395 | [menu-bar image-dired image-dired-flag-thumb-original-file] |
| 1398 | '("Flag original for deletion" . tumme-flag-thumb-original-file)) | 1396 | '("Flag original for deletion" . image-dired-flag-thumb-original-file)) |
| 1399 | (define-key tumme-thumbnail-mode-map | 1397 | (define-key image-dired-thumbnail-mode-map |
| 1400 | [menu-bar tumme tumme-unmark-thumb-original-file] | 1398 | [menu-bar image-dired image-dired-unmark-thumb-original-file] |
| 1401 | '("Unmark original" . tumme-unmark-thumb-original-file)) | 1399 | '("Unmark original" . image-dired-unmark-thumb-original-file)) |
| 1402 | (define-key tumme-thumbnail-mode-map | 1400 | (define-key image-dired-thumbnail-mode-map |
| 1403 | [menu-bar tumme tumme-mark-thumb-original-file] | 1401 | [menu-bar image-dired image-dired-mark-thumb-original-file] |
| 1404 | '("Mark original" . tumme-mark-thumb-original-file)) | 1402 | '("Mark original" . image-dired-mark-thumb-original-file)) |
| 1405 | 1403 | ||
| 1406 | (define-key tumme-thumbnail-mode-map | 1404 | (define-key image-dired-thumbnail-mode-map |
| 1407 | [menu-bar tumme tumme-thumbnail-display-external] | 1405 | [menu-bar image-dired image-dired-thumbnail-display-external] |
| 1408 | '("Display in external viewer" . tumme-thumbnail-display-external)) | 1406 | '("Display in external viewer" . image-dired-thumbnail-display-external)) |
| 1409 | (define-key tumme-thumbnail-mode-map | 1407 | (define-key image-dired-thumbnail-mode-map |
| 1410 | [menu-bar tumme tumme-display-thumbnail-original-image] | 1408 | [menu-bar image-dired image-dired-display-thumbnail-original-image] |
| 1411 | '("Display image" . tumme-display-thumbnail-original-image))) | 1409 | '("Display image" . image-dired-display-thumbnail-original-image))) |
| 1412 | 1410 | ||
| 1413 | (defvar tumme-display-image-mode-map (make-sparse-keymap) | 1411 | (defvar image-dired-display-image-mode-map (make-sparse-keymap) |
| 1414 | "Keymap for `tumme-display-image-mode'.") | 1412 | "Keymap for `image-dired-display-image-mode'.") |
| 1415 | 1413 | ||
| 1416 | (defun tumme-define-display-image-mode-keymap () | 1414 | (defun image-dired-define-display-image-mode-keymap () |
| 1417 | "Define keymap for `tumme-display-image-mode'." | 1415 | "Define keymap for `image-dired-display-image-mode'." |
| 1418 | 1416 | ||
| 1419 | ;; Keys | 1417 | ;; Keys |
| 1420 | (define-key tumme-display-image-mode-map "q" 'tumme-kill-buffer-and-window) | 1418 | (define-key image-dired-display-image-mode-map "q" 'image-dired-kill-buffer-and-window) |
| 1421 | 1419 | ||
| 1422 | (define-key tumme-display-image-mode-map "f" | 1420 | (define-key image-dired-display-image-mode-map "f" |
| 1423 | 'tumme-display-current-image-full) | 1421 | 'image-dired-display-current-image-full) |
| 1424 | 1422 | ||
| 1425 | (define-key tumme-display-image-mode-map "s" | 1423 | (define-key image-dired-display-image-mode-map "s" |
| 1426 | 'tumme-display-current-image-sized) | 1424 | 'image-dired-display-current-image-sized) |
| 1427 | 1425 | ||
| 1428 | ;; Menu | 1426 | ;; Menu |
| 1429 | (define-key tumme-display-image-mode-map [menu-bar tumme] | 1427 | (define-key image-dired-display-image-mode-map [menu-bar image-dired] |
| 1430 | (cons "Tumme" (make-sparse-keymap "Tumme"))) | 1428 | (cons "Image-Dired" (make-sparse-keymap "Image-Dired"))) |
| 1431 | 1429 | ||
| 1432 | (define-key tumme-display-image-mode-map | 1430 | (define-key image-dired-display-image-mode-map |
| 1433 | [menu-bar tumme tumme-kill-buffer-and-window] | 1431 | [menu-bar image-dired image-dired-kill-buffer-and-window] |
| 1434 | '("Quit" . tumme-kill-buffer-and-window)) | 1432 | '("Quit" . image-dired-kill-buffer-and-window)) |
| 1435 | 1433 | ||
| 1436 | (define-key tumme-display-image-mode-map | 1434 | (define-key image-dired-display-image-mode-map |
| 1437 | [menu-bar tumme tumme-display-current-image-sized] | 1435 | [menu-bar image-dired image-dired-display-current-image-sized] |
| 1438 | '("Display original, sized to fit" . tumme-display-current-image-sized)) | 1436 | '("Display original, sized to fit" . image-dired-display-current-image-sized)) |
| 1439 | 1437 | ||
| 1440 | (define-key tumme-display-image-mode-map | 1438 | (define-key image-dired-display-image-mode-map |
| 1441 | [menu-bar tumme tumme-display-current-image-full] | 1439 | [menu-bar image-dired image-dired-display-current-image-full] |
| 1442 | '("Display original, full size" . tumme-display-current-image-full)) | 1440 | '("Display original, full size" . image-dired-display-current-image-full)) |
| 1443 | 1441 | ||
| 1444 | ) | 1442 | ) |
| 1445 | 1443 | ||
| 1446 | (defun tumme-display-current-image-full () | 1444 | (defun image-dired-display-current-image-full () |
| 1447 | "Display current image in full size." | 1445 | "Display current image in full size." |
| 1448 | (interactive) | 1446 | (interactive) |
| 1449 | (let ((file (tumme-original-file-name))) | 1447 | (let ((file (image-dired-original-file-name))) |
| 1450 | (if file | 1448 | (if file |
| 1451 | (progn | 1449 | (progn |
| 1452 | (tumme-display-image file t) | 1450 | (image-dired-display-image file t) |
| 1453 | (message "Full size image displayed")) | 1451 | (message "Full size image displayed")) |
| 1454 | (error "No original file name at point")))) | 1452 | (error "No original file name at point")))) |
| 1455 | 1453 | ||
| 1456 | (defun tumme-display-current-image-sized () | 1454 | (defun image-dired-display-current-image-sized () |
| 1457 | "Display current image in sized to fit window dimensions." | 1455 | "Display current image in sized to fit window dimensions." |
| 1458 | (interactive) | 1456 | (interactive) |
| 1459 | (let ((file (tumme-original-file-name))) | 1457 | (let ((file (image-dired-original-file-name))) |
| 1460 | (if file | 1458 | (if file |
| 1461 | (progn | 1459 | (progn |
| 1462 | (tumme-display-image file) | 1460 | (image-dired-display-image file) |
| 1463 | (message "Full size image displayed")) | 1461 | (message "Full size image displayed")) |
| 1464 | (error "No original file name at point")))) | 1462 | (error "No original file name at point")))) |
| 1465 | 1463 | ||
| 1466 | (define-derived-mode tumme-thumbnail-mode | 1464 | (define-derived-mode image-dired-thumbnail-mode |
| 1467 | fundamental-mode "tumme-thumbnail" | 1465 | fundamental-mode "image-dired-thumbnail" |
| 1468 | "Browse and manipulate thumbnail images using dired. | 1466 | "Browse and manipulate thumbnail images using dired. |
| 1469 | Use `tumme-dired' and `tumme-setup-dired-keybindings' to get a | 1467 | Use `image-dired-dired' and `image-dired-setup-dired-keybindings' to get a |
| 1470 | nice setup to start with." | 1468 | nice setup to start with." |
| 1471 | (tumme-define-thumbnail-mode-keymap) | 1469 | (image-dired-define-thumbnail-mode-keymap) |
| 1472 | (message "tumme-thumbnail-mode enabled")) | 1470 | (message "image-dired-thumbnail-mode enabled")) |
| 1473 | 1471 | ||
| 1474 | (define-derived-mode tumme-display-image-mode | 1472 | (define-derived-mode image-dired-display-image-mode |
| 1475 | fundamental-mode "tumme-image-display" | 1473 | fundamental-mode "image-dired-image-display" |
| 1476 | "Mode for displaying and manipulating original image. | 1474 | "Mode for displaying and manipulating original image. |
| 1477 | Resized or in full-size." | 1475 | Resized or in full-size." |
| 1478 | (tumme-define-display-image-mode-keymap) | 1476 | (image-dired-define-display-image-mode-keymap) |
| 1479 | (message "tumme-display-image-mode enabled")) | 1477 | (message "image-dired-display-image-mode enabled")) |
| 1480 | 1478 | ||
| 1481 | ;;;###autoload | 1479 | ;;;###autoload |
| 1482 | (defun tumme-setup-dired-keybindings () | 1480 | (defun image-dired-setup-dired-keybindings () |
| 1483 | "Setup easy-to-use keybindings for the commands to be used in dired mode. | 1481 | "Setup easy-to-use keybindings for the commands to be used in dired mode. |
| 1484 | Note that n, p and <down> and <up> will be hijacked and bound to | 1482 | Note that n, p and <down> and <up> will be hijacked and bound to |
| 1485 | `tumme-dired-x-line'." | 1483 | `image-dired-dired-x-line'." |
| 1486 | (interactive) | 1484 | (interactive) |
| 1487 | 1485 | ||
| 1488 | ;; Hijack previous and next line movement. Let C-p and C-b be | 1486 | ;; Hijack previous and next line movement. Let C-p and C-b be |
| 1489 | ;; though... | 1487 | ;; though... |
| 1490 | 1488 | ||
| 1491 | (define-key dired-mode-map "p" 'tumme-dired-previous-line) | 1489 | (define-key dired-mode-map "p" 'image-dired-dired-previous-line) |
| 1492 | (define-key dired-mode-map "n" 'tumme-dired-next-line) | 1490 | (define-key dired-mode-map "n" 'image-dired-dired-next-line) |
| 1493 | (define-key dired-mode-map [up] 'tumme-dired-previous-line) | 1491 | (define-key dired-mode-map [up] 'image-dired-dired-previous-line) |
| 1494 | (define-key dired-mode-map [down] 'tumme-dired-next-line) | 1492 | (define-key dired-mode-map [down] 'image-dired-dired-next-line) |
| 1495 | 1493 | ||
| 1496 | (define-key dired-mode-map (kbd "C-S-n") 'tumme-next-line-and-display) | 1494 | (define-key dired-mode-map (kbd "C-S-n") 'image-dired-next-line-and-display) |
| 1497 | (define-key dired-mode-map (kbd "C-S-p") 'tumme-previous-line-and-display) | 1495 | (define-key dired-mode-map (kbd "C-S-p") 'image-dired-previous-line-and-display) |
| 1498 | (define-key dired-mode-map (kbd "C-S-m") 'tumme-mark-and-display-next) | 1496 | (define-key dired-mode-map (kbd "C-S-m") 'image-dired-mark-and-display-next) |
| 1499 | 1497 | ||
| 1500 | (define-key dired-mode-map "\C-td" 'tumme-display-thumbs) | 1498 | (define-key dired-mode-map "\C-td" 'image-dired-display-thumbs) |
| 1501 | (define-key dired-mode-map "\C-tt" 'tumme-tag-files) | 1499 | (define-key dired-mode-map "\C-tt" 'image-dired-tag-files) |
| 1502 | (define-key dired-mode-map "\C-tr" 'tumme-delete-tag) | 1500 | (define-key dired-mode-map "\C-tr" 'image-dired-delete-tag) |
| 1503 | (define-key dired-mode-map [tab] 'tumme-jump-thumbnail-buffer) | 1501 | (define-key dired-mode-map [tab] 'image-dired-jump-thumbnail-buffer) |
| 1504 | (define-key dired-mode-map "\C-ti" 'tumme-dired-display-image) | 1502 | (define-key dired-mode-map "\C-ti" 'image-dired-dired-display-image) |
| 1505 | (define-key dired-mode-map "\C-tx" 'tumme-dired-display-external) | 1503 | (define-key dired-mode-map "\C-tx" 'image-dired-dired-display-external) |
| 1506 | (define-key dired-mode-map "\C-ta" 'tumme-display-thumbs-append) | 1504 | (define-key dired-mode-map "\C-ta" 'image-dired-display-thumbs-append) |
| 1507 | (define-key dired-mode-map "\C-t." 'tumme-display-thumb) | 1505 | (define-key dired-mode-map "\C-t." 'image-dired-display-thumb) |
| 1508 | (define-key dired-mode-map "\C-tc" 'tumme-dired-comment-files) | 1506 | (define-key dired-mode-map "\C-tc" 'image-dired-dired-comment-files) |
| 1509 | (define-key dired-mode-map "\C-tf" 'tumme-mark-tagged-files) | 1507 | (define-key dired-mode-map "\C-tf" 'image-dired-mark-tagged-files) |
| 1510 | 1508 | ||
| 1511 | ;; Menu for dired | 1509 | ;; Menu for dired |
| 1512 | (define-key dired-mode-map [menu-bar tumme] | 1510 | (define-key dired-mode-map [menu-bar image-dired] |
| 1513 | (cons "Tumme" (make-sparse-keymap "Tumme"))) | 1511 | (cons "Image-Dired" (make-sparse-keymap "Image-Dired"))) |
| 1514 | 1512 | ||
| 1515 | (define-key dired-mode-map [menu-bar tumme tumme-copy-with-exif-file-name] | 1513 | (define-key dired-mode-map [menu-bar image-dired image-dired-copy-with-exif-file-name] |
| 1516 | '("Copy with EXIF file name" . tumme-copy-with-exif-file-name)) | 1514 | '("Copy with EXIF file name" . image-dired-copy-with-exif-file-name)) |
| 1517 | 1515 | ||
| 1518 | (define-key dired-mode-map [menu-bar tumme tumme-dired-comment-files] | 1516 | (define-key dired-mode-map [menu-bar image-dired image-dired-dired-comment-files] |
| 1519 | '("Comment files" . tumme-dired-comment-files)) | 1517 | '("Comment files" . image-dired-dired-comment-files)) |
| 1520 | 1518 | ||
| 1521 | (define-key dired-mode-map [menu-bar tumme tumme-mark-tagged-files] | 1519 | (define-key dired-mode-map [menu-bar image-dired image-dired-mark-tagged-files] |
| 1522 | '("Mark tagged files" . tumme-mark-tagged-files)) | 1520 | '("Mark tagged files" . image-dired-mark-tagged-files)) |
| 1523 | 1521 | ||
| 1524 | (define-key dired-mode-map [menu-bar tumme tumme-delete-tag] | 1522 | (define-key dired-mode-map [menu-bar image-dired image-dired-delete-tag] |
| 1525 | '("Remove tag from files" . tumme-delete-tag)) | 1523 | '("Remove tag from files" . image-dired-delete-tag)) |
| 1526 | 1524 | ||
| 1527 | (define-key dired-mode-map [menu-bar tumme tumme-tag-files] | 1525 | (define-key dired-mode-map [menu-bar image-dired image-dired-tag-files] |
| 1528 | '("Tag files" . tumme-tag-files)) | 1526 | '("Tag files" . image-dired-tag-files)) |
| 1529 | 1527 | ||
| 1530 | (define-key dired-mode-map [menu-bar tumme tumme-jump-thumbnail-buffer] | 1528 | (define-key dired-mode-map [menu-bar image-dired image-dired-jump-thumbnail-buffer] |
| 1531 | '("Jump to thumbnail buffer" . tumme-jump-thumbnail-buffer)) | 1529 | '("Jump to thumbnail buffer" . image-dired-jump-thumbnail-buffer)) |
| 1532 | 1530 | ||
| 1533 | (define-key dired-mode-map [menu-bar tumme tumme-toggle-movement-tracking] | 1531 | (define-key dired-mode-map [menu-bar image-dired image-dired-toggle-movement-tracking] |
| 1534 | '("Toggle movement tracking" . tumme-toggle-movement-tracking)) | 1532 | '("Toggle movement tracking" . image-dired-toggle-movement-tracking)) |
| 1535 | 1533 | ||
| 1536 | (define-key dired-mode-map | 1534 | (define-key dired-mode-map |
| 1537 | [menu-bar tumme tumme-toggle-append-browsing] | 1535 | [menu-bar image-dired image-dired-toggle-append-browsing] |
| 1538 | '("Toggle append browsing" . tumme-toggle-append-browsing)) | 1536 | '("Toggle append browsing" . image-dired-toggle-append-browsing)) |
| 1539 | 1537 | ||
| 1540 | (define-key dired-mode-map | 1538 | (define-key dired-mode-map |
| 1541 | [menu-bar tumme tumme-toggle-disp-props] | 1539 | [menu-bar image-dired image-dired-toggle-disp-props] |
| 1542 | '("Toggle display properties" . tumme-toggle-dired-display-properties)) | 1540 | '("Toggle display properties" . image-dired-toggle-dired-display-properties)) |
| 1543 | 1541 | ||
| 1544 | (define-key dired-mode-map | 1542 | (define-key dired-mode-map |
| 1545 | [menu-bar tumme tumme-dired-display-external] | 1543 | [menu-bar image-dired image-dired-dired-display-external] |
| 1546 | '("Display in external viewer" . tumme-dired-display-external)) | 1544 | '("Display in external viewer" . image-dired-dired-display-external)) |
| 1547 | (define-key dired-mode-map | 1545 | (define-key dired-mode-map |
| 1548 | [menu-bar tumme tumme-dired-display-image] | 1546 | [menu-bar image-dired image-dired-dired-display-image] |
| 1549 | '("Display image" . tumme-dired-display-image)) | 1547 | '("Display image" . image-dired-dired-display-image)) |
| 1550 | (define-key dired-mode-map | 1548 | (define-key dired-mode-map |
| 1551 | [menu-bar tumme tumme-display-thumb] | 1549 | [menu-bar image-dired image-dired-display-thumb] |
| 1552 | '("Display this thumbnail" . tumme-display-thumb)) | 1550 | '("Display this thumbnail" . image-dired-display-thumb)) |
| 1553 | (define-key dired-mode-map | 1551 | (define-key dired-mode-map |
| 1554 | [menu-bar tumme tumme-display-thumbs-append] | 1552 | [menu-bar image-dired image-dired-display-thumbs-append] |
| 1555 | '("Display thumbnails append" . tumme-display-thumbs-append)) | 1553 | '("Display thumbnails append" . image-dired-display-thumbs-append)) |
| 1556 | (define-key dired-mode-map | 1554 | (define-key dired-mode-map |
| 1557 | [menu-bar tumme tumme-display-thumbs] | 1555 | [menu-bar image-dired image-dired-display-thumbs] |
| 1558 | '("Display thumbnails" . tumme-display-thumbs)) | 1556 | '("Display thumbnails" . image-dired-display-thumbs)) |
| 1559 | 1557 | ||
| 1560 | (define-key dired-mode-map | 1558 | (define-key dired-mode-map |
| 1561 | [menu-bar tumme tumme-create-thumbs] | 1559 | [menu-bar image-dired image-dired-create-thumbs] |
| 1562 | '("Create thumbnails for marked files" . tumme-create-thumbs)) | 1560 | '("Create thumbnails for marked files" . image-dired-create-thumbs)) |
| 1563 | 1561 | ||
| 1564 | (define-key dired-mode-map | 1562 | (define-key dired-mode-map |
| 1565 | [menu-bar tumme tumme-mark-and-display-next] | 1563 | [menu-bar image-dired image-dired-mark-and-display-next] |
| 1566 | '("Mark and display next" . tumme-mark-and-display-next)) | 1564 | '("Mark and display next" . image-dired-mark-and-display-next)) |
| 1567 | (define-key dired-mode-map | 1565 | (define-key dired-mode-map |
| 1568 | [menu-bar tumme tumme-previous-line-and-display] | 1566 | [menu-bar image-dired image-dired-previous-line-and-display] |
| 1569 | '("Display thumb for previous file" . tumme-previous-line-and-display)) | 1567 | '("Display thumb for previous file" . image-dired-previous-line-and-display)) |
| 1570 | (define-key dired-mode-map | 1568 | (define-key dired-mode-map |
| 1571 | [menu-bar tumme tumme-next-line-and-display] | 1569 | [menu-bar image-dired image-dired-next-line-and-display] |
| 1572 | '("Display thumb for next file" . tumme-next-line-and-display))) | 1570 | '("Display thumb for next file" . image-dired-next-line-and-display))) |
| 1573 | 1571 | ||
| 1574 | (defun tumme-create-thumbs (&optional arg) | 1572 | (defun image-dired-create-thumbs (&optional arg) |
| 1575 | "Create thumbnail images for all marked files in dired. | 1573 | "Create thumbnail images for all marked files in dired. |
| 1576 | With prefix argument ARG, create thumbnails even if they already exist | 1574 | With prefix argument ARG, create thumbnails even if they already exist |
| 1577 | \(i.e. use this to refresh your thumbnails)." | 1575 | \(i.e. use this to refresh your thumbnails)." |
| @@ -1580,7 +1578,7 @@ With prefix argument ARG, create thumbnails even if they already exist | |||
| 1580 | (setq files (dired-get-marked-files)) | 1578 | (setq files (dired-get-marked-files)) |
| 1581 | (mapcar | 1579 | (mapcar |
| 1582 | (lambda (curr-file) | 1580 | (lambda (curr-file) |
| 1583 | (setq thumb-name (tumme-thumb-name curr-file)) | 1581 | (setq thumb-name (image-dired-thumb-name curr-file)) |
| 1584 | ;; If the user overrides the exist check, we must clear the | 1582 | ;; If the user overrides the exist check, we must clear the |
| 1585 | ;; image cache so that if the user wants to display the | 1583 | ;; image cache so that if the user wants to display the |
| 1586 | ;; thumnail, it is not fetched from cache. | 1584 | ;; thumnail, it is not fetched from cache. |
| @@ -1588,49 +1586,49 @@ With prefix argument ARG, create thumbnails even if they already exist | |||
| 1588 | (clear-image-cache)) | 1586 | (clear-image-cache)) |
| 1589 | (if (or (not (file-exists-p thumb-name)) | 1587 | (if (or (not (file-exists-p thumb-name)) |
| 1590 | arg) | 1588 | arg) |
| 1591 | (if (not (= 0 (tumme-create-thumb curr-file | 1589 | (if (not (= 0 (image-dired-create-thumb curr-file |
| 1592 | (tumme-thumb-name curr-file)))) | 1590 | (image-dired-thumb-name curr-file)))) |
| 1593 | (error "Thumb could not be created")))) | 1591 | (error "Thumb could not be created")))) |
| 1594 | files))) | 1592 | files))) |
| 1595 | 1593 | ||
| 1596 | (defvar tumme-slideshow-timer nil | 1594 | (defvar image-dired-slideshow-timer nil |
| 1597 | "Slideshow timer.") | 1595 | "Slideshow timer.") |
| 1598 | 1596 | ||
| 1599 | (defvar tumme-slideshow-count 0 | 1597 | (defvar image-dired-slideshow-count 0 |
| 1600 | "Keeping track on number of images in slideshow.") | 1598 | "Keeping track on number of images in slideshow.") |
| 1601 | 1599 | ||
| 1602 | (defvar tumme-slideshow-times 0 | 1600 | (defvar image-dired-slideshow-times 0 |
| 1603 | "Number of pictures to display in slideshow.") | 1601 | "Number of pictures to display in slideshow.") |
| 1604 | 1602 | ||
| 1605 | (defun tumme-slideshow-step () | 1603 | (defun image-dired-slideshow-step () |
| 1606 | "Step to next file, if `tumme-slideshow-times' has not been reached." | 1604 | "Step to next file, if `image-dired-slideshow-times' has not been reached." |
| 1607 | (if (< tumme-slideshow-count tumme-slideshow-times) | 1605 | (if (< image-dired-slideshow-count image-dired-slideshow-times) |
| 1608 | (progn | 1606 | (progn |
| 1609 | (message "%s" (1+ tumme-slideshow-count)) | 1607 | (message "%s" (1+ image-dired-slideshow-count)) |
| 1610 | (setq tumme-slideshow-count (1+ tumme-slideshow-count)) | 1608 | (setq image-dired-slideshow-count (1+ image-dired-slideshow-count)) |
| 1611 | (tumme-next-line-and-display)) | 1609 | (image-dired-next-line-and-display)) |
| 1612 | (tumme-slideshow-stop))) | 1610 | (image-dired-slideshow-stop))) |
| 1613 | 1611 | ||
| 1614 | (defun tumme-slideshow-start () | 1612 | (defun image-dired-slideshow-start () |
| 1615 | "Start slideshow. | 1613 | "Start slideshow. |
| 1616 | Ask user for number of images to show and the delay in between." | 1614 | Ask user for number of images to show and the delay in between." |
| 1617 | (interactive) | 1615 | (interactive) |
| 1618 | (setq tumme-slideshow-count 0) | 1616 | (setq image-dired-slideshow-count 0) |
| 1619 | (setq tumme-slideshow-times (string-to-number (read-string "How many: "))) | 1617 | (setq image-dired-slideshow-times (string-to-number (read-string "How many: "))) |
| 1620 | (let ((repeat (string-to-number | 1618 | (let ((repeat (string-to-number |
| 1621 | (read-string | 1619 | (read-string |
| 1622 | "Delay, in seconds. Decimals are accepted : " "1")))) | 1620 | "Delay, in seconds. Decimals are accepted : " "1")))) |
| 1623 | (setq tumme-slideshow-timer | 1621 | (setq image-dired-slideshow-timer |
| 1624 | (run-with-timer | 1622 | (run-with-timer |
| 1625 | 0 repeat | 1623 | 0 repeat |
| 1626 | 'tumme-slideshow-step)))) | 1624 | 'image-dired-slideshow-step)))) |
| 1627 | 1625 | ||
| 1628 | (defun tumme-slideshow-stop () | 1626 | (defun image-dired-slideshow-stop () |
| 1629 | "Cancel slideshow." | 1627 | "Cancel slideshow." |
| 1630 | (interactive) | 1628 | (interactive) |
| 1631 | (cancel-timer tumme-slideshow-timer)) | 1629 | (cancel-timer image-dired-slideshow-timer)) |
| 1632 | 1630 | ||
| 1633 | (defun tumme-delete-char () | 1631 | (defun image-dired-delete-char () |
| 1634 | "Remove current thumbnail from thumbnail buffer and line up." | 1632 | "Remove current thumbnail from thumbnail buffer and line up." |
| 1635 | (interactive) | 1633 | (interactive) |
| 1636 | (let ((inhibit-read-only t)) | 1634 | (let ((inhibit-read-only t)) |
| @@ -1639,133 +1637,133 @@ Ask user for number of images to show and the delay in between." | |||
| 1639 | (delete-char 1)))) | 1637 | (delete-char 1)))) |
| 1640 | 1638 | ||
| 1641 | ;;;###autoload | 1639 | ;;;###autoload |
| 1642 | (defun tumme-display-thumbs-append () | 1640 | (defun image-dired-display-thumbs-append () |
| 1643 | "Append thumbnails to `tumme-thumbnail-buffer'." | 1641 | "Append thumbnails to `image-dired-thumbnail-buffer'." |
| 1644 | (interactive) | 1642 | (interactive) |
| 1645 | (tumme-display-thumbs nil t t)) | 1643 | (image-dired-display-thumbs nil t t)) |
| 1646 | 1644 | ||
| 1647 | ;;;###autoload | 1645 | ;;;###autoload |
| 1648 | (defun tumme-display-thumb () | 1646 | (defun image-dired-display-thumb () |
| 1649 | "Shorthand for `tumme-display-thumbs' with prefix argument." | 1647 | "Shorthand for `image-dired-display-thumbs' with prefix argument." |
| 1650 | (interactive) | 1648 | (interactive) |
| 1651 | (tumme-display-thumbs t nil t)) | 1649 | (image-dired-display-thumbs t nil t)) |
| 1652 | 1650 | ||
| 1653 | (defun tumme-line-up () | 1651 | (defun image-dired-line-up () |
| 1654 | "Line up thumbnails according to `tumme-thumbs-per-row'. | 1652 | "Line up thumbnails according to `image-dired-thumbs-per-row'. |
| 1655 | See also `tumme-line-up-dynamic'." | 1653 | See also `image-dired-line-up-dynamic'." |
| 1656 | (interactive) | 1654 | (interactive) |
| 1657 | (let ((inhibit-read-only t)) | 1655 | (let ((inhibit-read-only t)) |
| 1658 | (goto-char (point-min)) | 1656 | (goto-char (point-min)) |
| 1659 | (while (and (not (tumme-image-at-point-p)) | 1657 | (while (and (not (image-dired-image-at-point-p)) |
| 1660 | (not (eobp))) | 1658 | (not (eobp))) |
| 1661 | (delete-char 1)) | 1659 | (delete-char 1)) |
| 1662 | (while (not (eobp)) | 1660 | (while (not (eobp)) |
| 1663 | (forward-char) | 1661 | (forward-char) |
| 1664 | (while (and (not (tumme-image-at-point-p)) | 1662 | (while (and (not (image-dired-image-at-point-p)) |
| 1665 | (not (eobp))) | 1663 | (not (eobp))) |
| 1666 | (delete-char 1))) | 1664 | (delete-char 1))) |
| 1667 | (goto-char (point-min)) | 1665 | (goto-char (point-min)) |
| 1668 | (let ((count 0)) | 1666 | (let ((count 0)) |
| 1669 | (while (not (eobp)) | 1667 | (while (not (eobp)) |
| 1670 | (forward-char) | 1668 | (forward-char) |
| 1671 | (if (= tumme-thumbs-per-row 1) | 1669 | (if (= image-dired-thumbs-per-row 1) |
| 1672 | (insert "\n") | 1670 | (insert "\n") |
| 1673 | (insert " ") | 1671 | (insert " ") |
| 1674 | (setq count (1+ count)) | 1672 | (setq count (1+ count)) |
| 1675 | (when (and (= count (- tumme-thumbs-per-row 1)) | 1673 | (when (and (= count (- image-dired-thumbs-per-row 1)) |
| 1676 | (not (eobp))) | 1674 | (not (eobp))) |
| 1677 | (forward-char) | 1675 | (forward-char) |
| 1678 | (insert "\n") | 1676 | (insert "\n") |
| 1679 | (setq count 0))))) | 1677 | (setq count 0))))) |
| 1680 | (goto-char (point-min)))) | 1678 | (goto-char (point-min)))) |
| 1681 | 1679 | ||
| 1682 | (defun tumme-line-up-dynamic () | 1680 | (defun image-dired-line-up-dynamic () |
| 1683 | "Line up thumbnails images dynamically. | 1681 | "Line up thumbnails images dynamically. |
| 1684 | Calculate how many thumbnails fit." | 1682 | Calculate how many thumbnails fit." |
| 1685 | (interactive) | 1683 | (interactive) |
| 1686 | (let* ((char-width (frame-char-width)) | 1684 | (let* ((char-width (frame-char-width)) |
| 1687 | (width (tumme-window-width-pixels (tumme-thumbnail-window))) | 1685 | (width (image-dired-window-width-pixels (image-dired-thumbnail-window))) |
| 1688 | (tumme-thumbs-per-row | 1686 | (image-dired-thumbs-per-row |
| 1689 | (/ width | 1687 | (/ width |
| 1690 | (+ (* 2 tumme-thumb-relief) | 1688 | (+ (* 2 image-dired-thumb-relief) |
| 1691 | (* 2 tumme-thumb-margin) | 1689 | (* 2 image-dired-thumb-margin) |
| 1692 | tumme-thumb-width char-width)))) | 1690 | image-dired-thumb-width char-width)))) |
| 1693 | (tumme-line-up))) | 1691 | (image-dired-line-up))) |
| 1694 | 1692 | ||
| 1695 | (defun tumme-line-up-interactive () | 1693 | (defun image-dired-line-up-interactive () |
| 1696 | "Line up thumbnails interactively. | 1694 | "Line up thumbnails interactively. |
| 1697 | Ask user how many thumbnails should be displayed per row." | 1695 | Ask user how many thumbnails should be displayed per row." |
| 1698 | (interactive) | 1696 | (interactive) |
| 1699 | (let ((tumme-thumbs-per-row | 1697 | (let ((image-dired-thumbs-per-row |
| 1700 | (string-to-number (read-string "How many thumbs per row: ")))) | 1698 | (string-to-number (read-string "How many thumbs per row: ")))) |
| 1701 | (if (not (> tumme-thumbs-per-row 0)) | 1699 | (if (not (> image-dired-thumbs-per-row 0)) |
| 1702 | (message "Number must be greater than 0") | 1700 | (message "Number must be greater than 0") |
| 1703 | (tumme-line-up)))) | 1701 | (image-dired-line-up)))) |
| 1704 | 1702 | ||
| 1705 | (defun tumme-thumbnail-display-external () | 1703 | (defun image-dired-thumbnail-display-external () |
| 1706 | "Display original image for thumbnail at point using external viewer." | 1704 | "Display original image for thumbnail at point using external viewer." |
| 1707 | (interactive) | 1705 | (interactive) |
| 1708 | (let ((file (tumme-original-file-name))) | 1706 | (let ((file (image-dired-original-file-name))) |
| 1709 | (if (not (tumme-image-at-point-p)) | 1707 | (if (not (image-dired-image-at-point-p)) |
| 1710 | (message "No thumbnail at point") | 1708 | (message "No thumbnail at point") |
| 1711 | (if (not file) | 1709 | (if (not file) |
| 1712 | (message "No original file name found") | 1710 | (message "No original file name found") |
| 1713 | (call-process shell-file-name nil nil nil shell-command-switch | 1711 | (call-process shell-file-name nil nil nil shell-command-switch |
| 1714 | (format "%s \"%s\"" tumme-external-viewer file)))))) | 1712 | (format "%s \"%s\"" image-dired-external-viewer file)))))) |
| 1715 | 1713 | ||
| 1716 | ;;;###autoload | 1714 | ;;;###autoload |
| 1717 | (defun tumme-dired-display-external () | 1715 | (defun image-dired-dired-display-external () |
| 1718 | "Display file at point using an external viewer." | 1716 | "Display file at point using an external viewer." |
| 1719 | (interactive) | 1717 | (interactive) |
| 1720 | (let ((file (dired-get-filename))) | 1718 | (let ((file (dired-get-filename))) |
| 1721 | (call-process shell-file-name nil nil nil shell-command-switch | 1719 | (call-process shell-file-name nil nil nil shell-command-switch |
| 1722 | (format "%s \"%s\"" tumme-external-viewer file)))) | 1720 | (format "%s \"%s\"" image-dired-external-viewer file)))) |
| 1723 | 1721 | ||
| 1724 | (defun tumme-window-width-pixels (window) | 1722 | (defun image-dired-window-width-pixels (window) |
| 1725 | "Calculate WINDOW width in pixels." | 1723 | "Calculate WINDOW width in pixels." |
| 1726 | (* (window-width window) (frame-char-width))) | 1724 | (* (window-width window) (frame-char-width))) |
| 1727 | 1725 | ||
| 1728 | (defun tumme-window-height-pixels (window) | 1726 | (defun image-dired-window-height-pixels (window) |
| 1729 | "Calculate WINDOW height in pixels." | 1727 | "Calculate WINDOW height in pixels." |
| 1730 | ;; Note: The mode-line consumes one line | 1728 | ;; Note: The mode-line consumes one line |
| 1731 | (* (- (window-height window) 1) (frame-char-height))) | 1729 | (* (- (window-height window) 1) (frame-char-height))) |
| 1732 | 1730 | ||
| 1733 | (defun tumme-display-window () | 1731 | (defun image-dired-display-window () |
| 1734 | "Return window where `tumme-display-image-buffer' is visible." | 1732 | "Return window where `image-dired-display-image-buffer' is visible." |
| 1735 | (get-window-with-predicate | 1733 | (get-window-with-predicate |
| 1736 | (lambda (window) | 1734 | (lambda (window) |
| 1737 | (equal (buffer-name (window-buffer window)) tumme-display-image-buffer)) | 1735 | (equal (buffer-name (window-buffer window)) image-dired-display-image-buffer)) |
| 1738 | nil t)) | 1736 | nil t)) |
| 1739 | 1737 | ||
| 1740 | (defun tumme-thumbnail-window () | 1738 | (defun image-dired-thumbnail-window () |
| 1741 | "Return window where `tumme-thumbnail-buffer' is visible." | 1739 | "Return window where `image-dired-thumbnail-buffer' is visible." |
| 1742 | (get-window-with-predicate | 1740 | (get-window-with-predicate |
| 1743 | (lambda (window) | 1741 | (lambda (window) |
| 1744 | (equal (buffer-name (window-buffer window)) tumme-thumbnail-buffer)) | 1742 | (equal (buffer-name (window-buffer window)) image-dired-thumbnail-buffer)) |
| 1745 | nil t)) | 1743 | nil t)) |
| 1746 | 1744 | ||
| 1747 | (defun tumme-associated-dired-buffer-window () | 1745 | (defun image-dired-associated-dired-buffer-window () |
| 1748 | "Return window where associated dired buffer is visible." | 1746 | "Return window where associated dired buffer is visible." |
| 1749 | (let (buf) | 1747 | (let (buf) |
| 1750 | (if (tumme-image-at-point-p) | 1748 | (if (image-dired-image-at-point-p) |
| 1751 | (progn | 1749 | (progn |
| 1752 | (setq buf (tumme-associated-dired-buffer)) | 1750 | (setq buf (image-dired-associated-dired-buffer)) |
| 1753 | (get-window-with-predicate | 1751 | (get-window-with-predicate |
| 1754 | (lambda (window) | 1752 | (lambda (window) |
| 1755 | (equal (window-buffer window) buf)))) | 1753 | (equal (window-buffer window) buf)))) |
| 1756 | (error "No thumbnail image at point")))) | 1754 | (error "No thumbnail image at point")))) |
| 1757 | 1755 | ||
| 1758 | (defun tumme-display-window-width () | 1756 | (defun image-dired-display-window-width () |
| 1759 | "Return width, in pixels, of tumme's image display window." | 1757 | "Return width, in pixels, of image-dired's image display window." |
| 1760 | (- (tumme-window-width-pixels (tumme-display-window)) | 1758 | (- (image-dired-window-width-pixels (image-dired-display-window)) |
| 1761 | tumme-display-window-width-correction)) | 1759 | image-dired-display-window-width-correction)) |
| 1762 | 1760 | ||
| 1763 | (defun tumme-display-window-height () | 1761 | (defun image-dired-display-window-height () |
| 1764 | "Return height, in pixels, of tumme's image display window." | 1762 | "Return height, in pixels, of image-dired's image display window." |
| 1765 | (- (tumme-window-height-pixels (tumme-display-window)) | 1763 | (- (image-dired-window-height-pixels (image-dired-display-window)) |
| 1766 | tumme-display-window-height-correction)) | 1764 | image-dired-display-window-height-correction)) |
| 1767 | 1765 | ||
| 1768 | (defun tumme-display-image (file &optional original-size) | 1766 | (defun image-dired-display-image (file &optional original-size) |
| 1769 | "Display image FILE in image buffer. | 1767 | "Display image FILE in image buffer. |
| 1770 | Use this when you want to display the image, semi sized, in a new | 1768 | Use this when you want to display the image, semi sized, in a new |
| 1771 | window. The image is sized to fit the display window (using a | 1769 | window. The image is sized to fit the display window (using a |
| @@ -1775,18 +1773,18 @@ should feel snappy enough. | |||
| 1775 | 1773 | ||
| 1776 | If optional argument ORIGINAL-SIZE is non-nil, display image in its | 1774 | If optional argument ORIGINAL-SIZE is non-nil, display image in its |
| 1777 | original size." | 1775 | original size." |
| 1778 | (let ((new-file (expand-file-name tumme-temp-image-file)) | 1776 | (let ((new-file (expand-file-name image-dired-temp-image-file)) |
| 1779 | width height command ret) | 1777 | width height command ret) |
| 1780 | (setq file (expand-file-name file)) | 1778 | (setq file (expand-file-name file)) |
| 1781 | (if (not original-size) | 1779 | (if (not original-size) |
| 1782 | (progn | 1780 | (progn |
| 1783 | (setq width (tumme-display-window-width)) | 1781 | (setq width (image-dired-display-window-width)) |
| 1784 | (setq height (tumme-display-window-height)) | 1782 | (setq height (image-dired-display-window-height)) |
| 1785 | (setq command | 1783 | (setq command |
| 1786 | (format-spec | 1784 | (format-spec |
| 1787 | tumme-cmd-create-temp-image-options | 1785 | image-dired-cmd-create-temp-image-options |
| 1788 | (list | 1786 | (list |
| 1789 | (cons ?p tumme-cmd-create-temp-image-program) | 1787 | (cons ?p image-dired-cmd-create-temp-image-program) |
| 1790 | (cons ?w width) | 1788 | (cons ?w width) |
| 1791 | (cons ?h height) | 1789 | (cons ?h height) |
| 1792 | (cons ?f file) | 1790 | (cons ?f file) |
| @@ -1796,55 +1794,55 @@ original size." | |||
| 1796 | (if (not (= 0 ret)) | 1794 | (if (not (= 0 ret)) |
| 1797 | (error "Could not resize image"))) | 1795 | (error "Could not resize image"))) |
| 1798 | (copy-file file new-file t)) | 1796 | (copy-file file new-file t)) |
| 1799 | (with-current-buffer (tumme-create-display-image-buffer) | 1797 | (with-current-buffer (image-dired-create-display-image-buffer) |
| 1800 | (let ((inhibit-read-only t)) | 1798 | (let ((inhibit-read-only t)) |
| 1801 | (erase-buffer) | 1799 | (erase-buffer) |
| 1802 | (clear-image-cache) | 1800 | (clear-image-cache) |
| 1803 | (tumme-insert-image tumme-temp-image-file 'jpeg 0 0) | 1801 | (image-dired-insert-image image-dired-temp-image-file 'jpeg 0 0) |
| 1804 | (goto-char (point-min)) | 1802 | (goto-char (point-min)) |
| 1805 | (tumme-update-property 'original-file-name file))))) | 1803 | (image-dired-update-property 'original-file-name file))))) |
| 1806 | 1804 | ||
| 1807 | (defun tumme-display-thumbnail-original-image (&optional arg) | 1805 | (defun image-dired-display-thumbnail-original-image (&optional arg) |
| 1808 | "Display current thumbnail's original image in display buffer. | 1806 | "Display current thumbnail's original image in display buffer. |
| 1809 | See documentation for `tumme-display-image' for more information. | 1807 | See documentation for `image-dired-display-image' for more information. |
| 1810 | With prefix argument ARG, display image in its original size." | 1808 | With prefix argument ARG, display image in its original size." |
| 1811 | (interactive "P") | 1809 | (interactive "P") |
| 1812 | (let ((file (tumme-original-file-name))) | 1810 | (let ((file (image-dired-original-file-name))) |
| 1813 | (if (not (string-equal major-mode "tumme-thumbnail-mode")) | 1811 | (if (not (string-equal major-mode "image-dired-thumbnail-mode")) |
| 1814 | (message "Not in tumme-thumbnail-mode") | 1812 | (message "Not in image-dired-thumbnail-mode") |
| 1815 | (if (not (tumme-image-at-point-p)) | 1813 | (if (not (image-dired-image-at-point-p)) |
| 1816 | (message "No thumbnail at point") | 1814 | (message "No thumbnail at point") |
| 1817 | (if (not file) | 1815 | (if (not file) |
| 1818 | (message "No original file name found") | 1816 | (message "No original file name found") |
| 1819 | (tumme-create-display-image-buffer) | 1817 | (image-dired-create-display-image-buffer) |
| 1820 | (display-buffer tumme-display-image-buffer) | 1818 | (display-buffer image-dired-display-image-buffer) |
| 1821 | (tumme-display-image file arg)))))) | 1819 | (image-dired-display-image file arg)))))) |
| 1822 | 1820 | ||
| 1823 | 1821 | ||
| 1824 | ;;;###autoload | 1822 | ;;;###autoload |
| 1825 | (defun tumme-dired-display-image (&optional arg) | 1823 | (defun image-dired-dired-display-image (&optional arg) |
| 1826 | "Display current image file. | 1824 | "Display current image file. |
| 1827 | See documentation for `tumme-display-image' for more information. | 1825 | See documentation for `image-dired-display-image' for more information. |
| 1828 | With prefix argument ARG, display image in its original size." | 1826 | With prefix argument ARG, display image in its original size." |
| 1829 | (interactive "P") | 1827 | (interactive "P") |
| 1830 | (tumme-create-display-image-buffer) | 1828 | (image-dired-create-display-image-buffer) |
| 1831 | (display-buffer tumme-display-image-buffer) | 1829 | (display-buffer image-dired-display-image-buffer) |
| 1832 | (tumme-display-image (dired-get-filename) arg)) | 1830 | (image-dired-display-image (dired-get-filename) arg)) |
| 1833 | 1831 | ||
| 1834 | (defun tumme-image-at-point-p () | 1832 | (defun image-dired-image-at-point-p () |
| 1835 | "Return true if there is a tumme thumbnail at point." | 1833 | "Return true if there is a image-dired thumbnail at point." |
| 1836 | (get-text-property (point) 'tumme-thumbnail)) | 1834 | (get-text-property (point) 'image-dired-thumbnail)) |
| 1837 | 1835 | ||
| 1838 | (defun tumme-rotate-thumbnail (degrees) | 1836 | (defun image-dired-rotate-thumbnail (degrees) |
| 1839 | "Rotate thumbnail DEGREES degrees." | 1837 | "Rotate thumbnail DEGREES degrees." |
| 1840 | (if (not (tumme-image-at-point-p)) | 1838 | (if (not (image-dired-image-at-point-p)) |
| 1841 | (message "No thumbnail at point") | 1839 | (message "No thumbnail at point") |
| 1842 | (let ((file (tumme-thumb-name (tumme-original-file-name))) | 1840 | (let ((file (image-dired-thumb-name (image-dired-original-file-name))) |
| 1843 | command) | 1841 | command) |
| 1844 | (setq command (format-spec | 1842 | (setq command (format-spec |
| 1845 | tumme-cmd-rotate-thumbnail-options | 1843 | image-dired-cmd-rotate-thumbnail-options |
| 1846 | (list | 1844 | (list |
| 1847 | (cons ?p tumme-cmd-rotate-thumbnail-program) | 1845 | (cons ?p image-dired-cmd-rotate-thumbnail-program) |
| 1848 | (cons ?d degrees) | 1846 | (cons ?d degrees) |
| 1849 | (cons ?t (expand-file-name file))))) | 1847 | (cons ?t (expand-file-name file))))) |
| 1850 | (call-process shell-file-name nil nil nil shell-command-switch command) | 1848 | (call-process shell-file-name nil nil nil shell-command-switch command) |
| @@ -1852,76 +1850,76 @@ With prefix argument ARG, display image in its original size." | |||
| 1852 | ;; the current file but I do not know how to do that. Yet... | 1850 | ;; the current file but I do not know how to do that. Yet... |
| 1853 | (clear-image-cache)))) | 1851 | (clear-image-cache)))) |
| 1854 | 1852 | ||
| 1855 | (defun tumme-rotate-thumbnail-left () | 1853 | (defun image-dired-rotate-thumbnail-left () |
| 1856 | "Rotate thumbnail left (counter clockwise) 90 degrees. | 1854 | "Rotate thumbnail left (counter clockwise) 90 degrees. |
| 1857 | The result of the rotation is displayed in the image display area | 1855 | The result of the rotation is displayed in the image display area |
| 1858 | and a confirmation is needed before the original image files is | 1856 | and a confirmation is needed before the original image files is |
| 1859 | overwritten. This confirmation can be turned off using | 1857 | overwritten. This confirmation can be turned off using |
| 1860 | `tumme-rotate-original-ask-before-overwrite'." | 1858 | `image-dired-rotate-original-ask-before-overwrite'." |
| 1861 | (interactive) | 1859 | (interactive) |
| 1862 | (tumme-rotate-thumbnail "270")) | 1860 | (image-dired-rotate-thumbnail "270")) |
| 1863 | 1861 | ||
| 1864 | (defun tumme-rotate-thumbnail-right () | 1862 | (defun image-dired-rotate-thumbnail-right () |
| 1865 | "Rotate thumbnail counter right (clockwise) 90 degrees. | 1863 | "Rotate thumbnail counter right (clockwise) 90 degrees. |
| 1866 | The result of the rotation is displayed in the image display area | 1864 | The result of the rotation is displayed in the image display area |
| 1867 | and a confirmation is needed before the original image files is | 1865 | and a confirmation is needed before the original image files is |
| 1868 | overwritten. This confirmation can be turned off using | 1866 | overwritten. This confirmation can be turned off using |
| 1869 | `tumme-rotate-original-ask-before-overwrite'." | 1867 | `image-dired-rotate-original-ask-before-overwrite'." |
| 1870 | (interactive) | 1868 | (interactive) |
| 1871 | (tumme-rotate-thumbnail "90")) | 1869 | (image-dired-rotate-thumbnail "90")) |
| 1872 | 1870 | ||
| 1873 | (defun tumme-refresh-thumb () | 1871 | (defun image-dired-refresh-thumb () |
| 1874 | "Force creation of new image for current thumbnail." | 1872 | "Force creation of new image for current thumbnail." |
| 1875 | (interactive) | 1873 | (interactive) |
| 1876 | (let ((file (tumme-original-file-name))) | 1874 | (let ((file (image-dired-original-file-name))) |
| 1877 | (clear-image-cache) | 1875 | (clear-image-cache) |
| 1878 | (tumme-create-thumb file (tumme-thumb-name file)))) | 1876 | (image-dired-create-thumb file (image-dired-thumb-name file)))) |
| 1879 | 1877 | ||
| 1880 | (defun tumme-rotate-original (degrees) | 1878 | (defun image-dired-rotate-original (degrees) |
| 1881 | "Rotate original image DEGREES degrees." | 1879 | "Rotate original image DEGREES degrees." |
| 1882 | (if (not (tumme-image-at-point-p)) | 1880 | (if (not (image-dired-image-at-point-p)) |
| 1883 | (message "No image at point") | 1881 | (message "No image at point") |
| 1884 | (let ((file (tumme-original-file-name)) | 1882 | (let ((file (image-dired-original-file-name)) |
| 1885 | command temp-file) | 1883 | command temp-file) |
| 1886 | (if (not (string-match "\.[jJ][pP[eE]?[gG]$" file)) | 1884 | (if (not (string-match "\.[jJ][pP[eE]?[gG]$" file)) |
| 1887 | (error "Only JPEG images can be rotated!")) | 1885 | (error "Only JPEG images can be rotated!")) |
| 1888 | (setq command (format-spec | 1886 | (setq command (format-spec |
| 1889 | tumme-cmd-rotate-original-options | 1887 | image-dired-cmd-rotate-original-options |
| 1890 | (list | 1888 | (list |
| 1891 | (cons ?p tumme-cmd-rotate-original-program) | 1889 | (cons ?p image-dired-cmd-rotate-original-program) |
| 1892 | (cons ?d degrees) | 1890 | (cons ?d degrees) |
| 1893 | (cons ?o (expand-file-name file)) | 1891 | (cons ?o (expand-file-name file)) |
| 1894 | (cons ?t tumme-temp-rotate-image-file)))) | 1892 | (cons ?t image-dired-temp-rotate-image-file)))) |
| 1895 | (if (not (= 0 (call-process shell-file-name nil nil nil | 1893 | (if (not (= 0 (call-process shell-file-name nil nil nil |
| 1896 | shell-command-switch command))) | 1894 | shell-command-switch command))) |
| 1897 | (error "Could not rotate image") | 1895 | (error "Could not rotate image") |
| 1898 | (tumme-display-image tumme-temp-rotate-image-file) | 1896 | (image-dired-display-image image-dired-temp-rotate-image-file) |
| 1899 | (if (or (and tumme-rotate-original-ask-before-overwrite | 1897 | (if (or (and image-dired-rotate-original-ask-before-overwrite |
| 1900 | (y-or-n-p | 1898 | (y-or-n-p |
| 1901 | "Rotate to temp file OK. Overwrite original image? ")) | 1899 | "Rotate to temp file OK. Overwrite original image? ")) |
| 1902 | (not tumme-rotate-original-ask-before-overwrite)) | 1900 | (not image-dired-rotate-original-ask-before-overwrite)) |
| 1903 | (progn | 1901 | (progn |
| 1904 | (copy-file tumme-temp-rotate-image-file file t) | 1902 | (copy-file image-dired-temp-rotate-image-file file t) |
| 1905 | (tumme-refresh-thumb)) | 1903 | (image-dired-refresh-thumb)) |
| 1906 | (tumme-display-image file)))))) | 1904 | (image-dired-display-image file)))))) |
| 1907 | 1905 | ||
| 1908 | (defun tumme-rotate-original-left () | 1906 | (defun image-dired-rotate-original-left () |
| 1909 | "Rotate original image left (counter clockwise) 90 degrees." | 1907 | "Rotate original image left (counter clockwise) 90 degrees." |
| 1910 | (interactive) | 1908 | (interactive) |
| 1911 | (tumme-rotate-original "270")) | 1909 | (image-dired-rotate-original "270")) |
| 1912 | 1910 | ||
| 1913 | (defun tumme-rotate-original-right () | 1911 | (defun image-dired-rotate-original-right () |
| 1914 | "Rotate original image right (clockwise) 90 degrees." | 1912 | "Rotate original image right (clockwise) 90 degrees." |
| 1915 | (interactive) | 1913 | (interactive) |
| 1916 | (tumme-rotate-original "90")) | 1914 | (image-dired-rotate-original "90")) |
| 1917 | 1915 | ||
| 1918 | (defun tumme-get-exif-file-name (file) | 1916 | (defun image-dired-get-exif-file-name (file) |
| 1919 | "Use the image's EXIF information to return a unique file name. | 1917 | "Use the image's EXIF information to return a unique file name. |
| 1920 | The file name should be unique as long as you do not take more than | 1918 | The file name should be unique as long as you do not take more than |
| 1921 | one picture per second. The original file name is suffixed at the end | 1919 | one picture per second. The original file name is suffixed at the end |
| 1922 | for traceability. The format of the returned file name is | 1920 | for traceability. The format of the returned file name is |
| 1923 | YYYY_MM_DD_HH_MM_DD_ORIG_FILE_NAME.jpg. Used from | 1921 | YYYY_MM_DD_HH_MM_DD_ORIG_FILE_NAME.jpg. Used from |
| 1924 | `tumme-copy-with-exif-file-name'." | 1922 | `image-dired-copy-with-exif-file-name'." |
| 1925 | (let (data no-exif-data-found) | 1923 | (let (data no-exif-data-found) |
| 1926 | (if (not (string-match "\.[Jj][Pp][Ee]?[Gg]$" (expand-file-name file))) | 1924 | (if (not (string-match "\.[Jj][Pp][Ee]?[Gg]$" (expand-file-name file))) |
| 1927 | (progn | 1925 | (progn |
| @@ -1930,7 +1928,7 @@ YYYY_MM_DD_HH_MM_DD_ORIG_FILE_NAME.jpg. Used from | |||
| 1930 | (format-time-string | 1928 | (format-time-string |
| 1931 | "%Y:%m:%d %H:%M:%S" | 1929 | "%Y:%m:%d %H:%M:%S" |
| 1932 | (nth 5 (file-attributes (expand-file-name file)))))) | 1930 | (nth 5 (file-attributes (expand-file-name file)))))) |
| 1933 | (setq data (tumme-get-exif-data (expand-file-name file) | 1931 | (setq data (image-dired-get-exif-data (expand-file-name file) |
| 1934 | "DateTimeOriginal"))) | 1932 | "DateTimeOriginal"))) |
| 1935 | (while (string-match "[ :]" data) | 1933 | (while (string-match "[ :]" data) |
| 1936 | (setq data (replace-match "_" nil nil data))) | 1934 | (setq data (replace-match "_" nil nil data))) |
| @@ -1940,42 +1938,42 @@ YYYY_MM_DD_HH_MM_DD_ORIG_FILE_NAME.jpg. Used from | |||
| 1940 | "_") | 1938 | "_") |
| 1941 | (file-name-nondirectory file)))) | 1939 | (file-name-nondirectory file)))) |
| 1942 | 1940 | ||
| 1943 | (defun tumme-thumbnail-set-image-description () | 1941 | (defun image-dired-thumbnail-set-image-description () |
| 1944 | "Set the ImageDescription EXIF tag for the original image. | 1942 | "Set the ImageDescription EXIF tag for the original image. |
| 1945 | If the image already has a value for this tag, it is used as the | 1943 | If the image already has a value for this tag, it is used as the |
| 1946 | default value at the prompt." | 1944 | default value at the prompt." |
| 1947 | (interactive) | 1945 | (interactive) |
| 1948 | (if (not (tumme-image-at-point-p)) | 1946 | (if (not (image-dired-image-at-point-p)) |
| 1949 | (message "No thumbnail at point") | 1947 | (message "No thumbnail at point") |
| 1950 | (let* ((file (tumme-original-file-name)) | 1948 | (let* ((file (image-dired-original-file-name)) |
| 1951 | (old-value (tumme-get-exif-data file "ImageDescription"))) | 1949 | (old-value (image-dired-get-exif-data file "ImageDescription"))) |
| 1952 | (if (eq 0 | 1950 | (if (eq 0 |
| 1953 | (tumme-set-exif-data file "ImageDescription" | 1951 | (image-dired-set-exif-data file "ImageDescription" |
| 1954 | (read-string "Value of ImageDescription: " | 1952 | (read-string "Value of ImageDescription: " |
| 1955 | old-value))) | 1953 | old-value))) |
| 1956 | (message "Successfully wrote ImageDescription tag.") | 1954 | (message "Successfully wrote ImageDescription tag.") |
| 1957 | (error "Could not write ImageDescription tag"))))) | 1955 | (error "Could not write ImageDescription tag"))))) |
| 1958 | 1956 | ||
| 1959 | (defun tumme-set-exif-data (file tag-name tag-value) | 1957 | (defun image-dired-set-exif-data (file tag-name tag-value) |
| 1960 | "In FILE, set EXIF tag TAG-NAME to value TAG-VALUE." | 1958 | "In FILE, set EXIF tag TAG-NAME to value TAG-VALUE." |
| 1961 | (let (command) | 1959 | (let (command) |
| 1962 | (setq command (format-spec | 1960 | (setq command (format-spec |
| 1963 | tumme-cmd-write-exif-data-options | 1961 | image-dired-cmd-write-exif-data-options |
| 1964 | (list | 1962 | (list |
| 1965 | (cons ?p tumme-cmd-write-exif-data-program) | 1963 | (cons ?p image-dired-cmd-write-exif-data-program) |
| 1966 | (cons ?f (expand-file-name file)) | 1964 | (cons ?f (expand-file-name file)) |
| 1967 | (cons ?t tag-name) | 1965 | (cons ?t tag-name) |
| 1968 | (cons ?v tag-value)))) | 1966 | (cons ?v tag-value)))) |
| 1969 | (call-process shell-file-name nil nil nil shell-command-switch command))) | 1967 | (call-process shell-file-name nil nil nil shell-command-switch command))) |
| 1970 | 1968 | ||
| 1971 | (defun tumme-get-exif-data (file tag-name) | 1969 | (defun image-dired-get-exif-data (file tag-name) |
| 1972 | "From FILE, return EXIF tag TAG-NAME." | 1970 | "From FILE, return EXIF tag TAG-NAME." |
| 1973 | (let ((buf (get-buffer-create "*tumme-get-exif-data*")) | 1971 | (let ((buf (get-buffer-create "*image-dired-get-exif-data*")) |
| 1974 | command tag-value) | 1972 | command tag-value) |
| 1975 | (setq command (format-spec | 1973 | (setq command (format-spec |
| 1976 | tumme-cmd-read-exif-data-options | 1974 | image-dired-cmd-read-exif-data-options |
| 1977 | (list | 1975 | (list |
| 1978 | (cons ?p tumme-cmd-read-exif-data-program) | 1976 | (cons ?p image-dired-cmd-read-exif-data-program) |
| 1979 | (cons ?f file) | 1977 | (cons ?f file) |
| 1980 | (cons ?t tag-name)))) | 1978 | (cons ?t tag-name)))) |
| 1981 | (with-current-buffer buf | 1979 | (with-current-buffer buf |
| @@ -1991,17 +1989,17 @@ default value at the prompt." | |||
| 1991 | (setq tag-value (buffer-substring (point-min) (point-max))))) | 1989 | (setq tag-value (buffer-substring (point-min) (point-max))))) |
| 1992 | tag-value)) | 1990 | tag-value)) |
| 1993 | 1991 | ||
| 1994 | (defun tumme-copy-with-exif-file-name () | 1992 | (defun image-dired-copy-with-exif-file-name () |
| 1995 | "Copy file with unique name to main image directory. | 1993 | "Copy file with unique name to main image directory. |
| 1996 | Copy current or all marked files in dired to a new file in your | 1994 | Copy current or all marked files in dired to a new file in your |
| 1997 | main image directory, using a file name generated by | 1995 | main image directory, using a file name generated by |
| 1998 | `tumme-get-exif-file-name'. A typical usage for this if when | 1996 | `image-dired-get-exif-file-name'. A typical usage for this if when |
| 1999 | copying images from a digital camera into the image directory. | 1997 | copying images from a digital camera into the image directory. |
| 2000 | 1998 | ||
| 2001 | Typically, you would open up the folder with the incoming | 1999 | Typically, you would open up the folder with the incoming |
| 2002 | digital images, mark the files to be copied, and execute this | 2000 | digital images, mark the files to be copied, and execute this |
| 2003 | function. The result is a couple of new files in | 2001 | function. The result is a couple of new files in |
| 2004 | `tumme-main-image-directory' called | 2002 | `image-dired-main-image-directory' called |
| 2005 | 2005_05_08_12_52_00_dscn0319.jpg, | 2003 | 2005_05_08_12_52_00_dscn0319.jpg, |
| 2006 | 2005_05_08_14_27_45_dscn0320.jpg etc." | 2004 | 2005_05_08_14_27_45_dscn0320.jpg etc." |
| 2007 | (interactive) | 2005 | (interactive) |
| @@ -2012,32 +2010,32 @@ function. The result is a couple of new files in | |||
| 2012 | (setq new-name | 2010 | (setq new-name |
| 2013 | (format "%s/%s" | 2011 | (format "%s/%s" |
| 2014 | (file-name-as-directory | 2012 | (file-name-as-directory |
| 2015 | (expand-file-name tumme-main-image-directory)) | 2013 | (expand-file-name image-dired-main-image-directory)) |
| 2016 | (tumme-get-exif-file-name curr-file))) | 2014 | (image-dired-get-exif-file-name curr-file))) |
| 2017 | (message "Copying %s to %s" curr-file new-name) | 2015 | (message "Copying %s to %s" curr-file new-name) |
| 2018 | (copy-file curr-file new-name)) | 2016 | (copy-file curr-file new-name)) |
| 2019 | files))) | 2017 | files))) |
| 2020 | 2018 | ||
| 2021 | (defun tumme-display-next-thumbnail-original () | 2019 | (defun image-dired-display-next-thumbnail-original () |
| 2022 | "In thubnail buffer, move to next thumbnail and display the image." | 2020 | "In thubnail buffer, move to next thumbnail and display the image." |
| 2023 | (interactive) | 2021 | (interactive) |
| 2024 | (tumme-forward-image) | 2022 | (image-dired-forward-image) |
| 2025 | (tumme-display-thumbnail-original-image)) | 2023 | (image-dired-display-thumbnail-original-image)) |
| 2026 | 2024 | ||
| 2027 | (defun tumme-display-previous-thumbnail-original () | 2025 | (defun image-dired-display-previous-thumbnail-original () |
| 2028 | "Move to previous thumbnail and display image." | 2026 | "Move to previous thumbnail and display image." |
| 2029 | (interactive) | 2027 | (interactive) |
| 2030 | (tumme-backward-image) | 2028 | (image-dired-backward-image) |
| 2031 | (tumme-display-thumbnail-original-image)) | 2029 | (image-dired-display-thumbnail-original-image)) |
| 2032 | 2030 | ||
| 2033 | (defun tumme-write-comments (file-comments) | 2031 | (defun image-dired-write-comments (file-comments) |
| 2034 | "Write file comments to database. | 2032 | "Write file comments to database. |
| 2035 | Write file comments to one or more files. FILE-COMMENTS is an alist on | 2033 | Write file comments to one or more files. FILE-COMMENTS is an alist on |
| 2036 | the following form: | 2034 | the following form: |
| 2037 | ((FILE . COMMENT) ... )" | 2035 | ((FILE . COMMENT) ... )" |
| 2038 | (let (end comment-beg-pos comment-end-pos file comment) | 2036 | (let (end comment-beg-pos comment-end-pos file comment) |
| 2039 | (with-temp-file tumme-db-file | 2037 | (with-temp-file image-dired-db-file |
| 2040 | (insert-file-contents tumme-db-file) | 2038 | (insert-file-contents image-dired-db-file) |
| 2041 | (dolist (elt file-comments) | 2039 | (dolist (elt file-comments) |
| 2042 | (setq file (car elt) | 2040 | (setq file (car elt) |
| 2043 | comment (cdr elt)) | 2041 | comment (cdr elt)) |
| @@ -2065,7 +2063,7 @@ the following form: | |||
| 2065 | (goto-char (point-max)) | 2063 | (goto-char (point-max)) |
| 2066 | (insert (format "\n%s;comment:%s" file comment))))))) | 2064 | (insert (format "\n%s;comment:%s" file comment))))))) |
| 2067 | 2065 | ||
| 2068 | (defun tumme-update-property (prop value) | 2066 | (defun image-dired-update-property (prop value) |
| 2069 | "Update text property PROP with value VALUE at point." | 2067 | "Update text property PROP with value VALUE at point." |
| 2070 | (let ((inhibit-read-only t)) | 2068 | (let ((inhibit-read-only t)) |
| 2071 | (put-text-property | 2069 | (put-text-property |
| @@ -2074,40 +2072,40 @@ the following form: | |||
| 2074 | value))) | 2072 | value))) |
| 2075 | 2073 | ||
| 2076 | ;;;###autoload | 2074 | ;;;###autoload |
| 2077 | (defun tumme-dired-comment-files () | 2075 | (defun image-dired-dired-comment-files () |
| 2078 | "Add comment to current or marked files in dired." | 2076 | "Add comment to current or marked files in dired." |
| 2079 | (interactive) | 2077 | (interactive) |
| 2080 | (let ((comment (tumme-read-comment))) | 2078 | (let ((comment (image-dired-read-comment))) |
| 2081 | (tumme-write-comments | 2079 | (image-dired-write-comments |
| 2082 | (mapcar | 2080 | (mapcar |
| 2083 | (lambda (curr-file) | 2081 | (lambda (curr-file) |
| 2084 | (cons curr-file comment)) | 2082 | (cons curr-file comment)) |
| 2085 | (dired-get-marked-files))))) | 2083 | (dired-get-marked-files))))) |
| 2086 | 2084 | ||
| 2087 | (defun tumme-comment-thumbnail () | 2085 | (defun image-dired-comment-thumbnail () |
| 2088 | "Add comment to current thumbnail in thumbnail buffer." | 2086 | "Add comment to current thumbnail in thumbnail buffer." |
| 2089 | (interactive) | 2087 | (interactive) |
| 2090 | (let* ((file (tumme-original-file-name)) | 2088 | (let* ((file (image-dired-original-file-name)) |
| 2091 | (comment (tumme-read-comment file))) | 2089 | (comment (image-dired-read-comment file))) |
| 2092 | (tumme-write-comments (list (cons file comment))) | 2090 | (image-dired-write-comments (list (cons file comment))) |
| 2093 | (tumme-update-property 'comment comment)) | 2091 | (image-dired-update-property 'comment comment)) |
| 2094 | (tumme-display-thumb-properties)) | 2092 | (image-dired-display-thumb-properties)) |
| 2095 | 2093 | ||
| 2096 | (defun tumme-read-comment (&optional file) | 2094 | (defun image-dired-read-comment (&optional file) |
| 2097 | "Read comment for an image. | 2095 | "Read comment for an image. |
| 2098 | Read comment for an image, optionally using old comment from FILE | 2096 | Read comment for an image, optionally using old comment from FILE |
| 2099 | as initial value." | 2097 | as initial value." |
| 2100 | (let ((comment | 2098 | (let ((comment |
| 2101 | (read-string | 2099 | (read-string |
| 2102 | "Comment: " | 2100 | "Comment: " |
| 2103 | (if file (tumme-get-comment file))))) | 2101 | (if file (image-dired-get-comment file))))) |
| 2104 | comment)) | 2102 | comment)) |
| 2105 | 2103 | ||
| 2106 | (defun tumme-get-comment (file) | 2104 | (defun image-dired-get-comment (file) |
| 2107 | "Get comment for file FILE." | 2105 | "Get comment for file FILE." |
| 2108 | (save-excursion | 2106 | (save-excursion |
| 2109 | (let (end buf comment-beg-pos comment-end-pos comment) | 2107 | (let (end buf comment-beg-pos comment-end-pos comment) |
| 2110 | (setq buf (find-file tumme-db-file)) | 2108 | (setq buf (find-file image-dired-db-file)) |
| 2111 | (goto-char (point-min)) | 2109 | (goto-char (point-min)) |
| 2112 | (when (search-forward-regexp | 2110 | (when (search-forward-regexp |
| 2113 | (format "^%s" file) nil t) | 2111 | (format "^%s" file) nil t) |
| @@ -2125,10 +2123,10 @@ as initial value." | |||
| 2125 | comment))) | 2123 | comment))) |
| 2126 | 2124 | ||
| 2127 | ;;;###autoload | 2125 | ;;;###autoload |
| 2128 | (defun tumme-mark-tagged-files () | 2126 | (defun image-dired-mark-tagged-files () |
| 2129 | "Use regexp to mark files with matching tag. | 2127 | "Use regexp to mark files with matching tag. |
| 2130 | A `tag' is a keyword, a piece of meta data, associated with an | 2128 | A `tag' is a keyword, a piece of meta data, associated with an |
| 2131 | image file and stored in tumme's database file. This command | 2129 | image file and stored in image-dired's database file. This command |
| 2132 | lets you input a regexp and this will be matched against all tags | 2130 | lets you input a regexp and this will be matched against all tags |
| 2133 | on all image files in the database file. The files that have a | 2131 | on all image files in the database file. The files that have a |
| 2134 | matching tags will be marked in the dired buffer." | 2132 | matching tags will be marked in the dired buffer." |
| @@ -2137,7 +2135,7 @@ matching tags will be marked in the dired buffer." | |||
| 2137 | (hits 0) | 2135 | (hits 0) |
| 2138 | files buf) | 2136 | files buf) |
| 2139 | (save-excursion | 2137 | (save-excursion |
| 2140 | (setq buf (find-file tumme-db-file)) | 2138 | (setq buf (find-file image-dired-db-file)) |
| 2141 | (goto-char (point-min)) | 2139 | (goto-char (point-min)) |
| 2142 | ;; Collect matches | 2140 | ;; Collect matches |
| 2143 | (while (search-forward-regexp | 2141 | (while (search-forward-regexp |
| @@ -2163,46 +2161,46 @@ matching tags will be marked in the dired buffer." | |||
| 2163 | files)) | 2161 | files)) |
| 2164 | (message "%d files with matching tag marked." hits))) | 2162 | (message "%d files with matching tag marked." hits))) |
| 2165 | 2163 | ||
| 2166 | (defun tumme-mouse-display-image (event) | 2164 | (defun image-dired-mouse-display-image (event) |
| 2167 | "Use mouse EVENT, call `tumme-display-image' to display image. | 2165 | "Use mouse EVENT, call `image-dired-display-image' to display image. |
| 2168 | Track this in associated dired buffer if `tumme-track-movement' is | 2166 | Track this in associated dired buffer if `image-dired-track-movement' is |
| 2169 | non-nil." | 2167 | non-nil." |
| 2170 | (interactive "e") | 2168 | (interactive "e") |
| 2171 | (let (file) | 2169 | (let (file) |
| 2172 | (mouse-set-point event) | 2170 | (mouse-set-point event) |
| 2173 | (goto-char (posn-point (event-end event))) | 2171 | (goto-char (posn-point (event-end event))) |
| 2174 | (setq file (tumme-original-file-name)) | 2172 | (setq file (image-dired-original-file-name)) |
| 2175 | (if tumme-track-movement | 2173 | (if image-dired-track-movement |
| 2176 | (tumme-track-original-file)) | 2174 | (image-dired-track-original-file)) |
| 2177 | (tumme-create-display-image-buffer) | 2175 | (image-dired-create-display-image-buffer) |
| 2178 | (display-buffer tumme-display-image-buffer) | 2176 | (display-buffer image-dired-display-image-buffer) |
| 2179 | (tumme-display-image file))) | 2177 | (image-dired-display-image file))) |
| 2180 | 2178 | ||
| 2181 | (defun tumme-mouse-select-thumbnail (event) | 2179 | (defun image-dired-mouse-select-thumbnail (event) |
| 2182 | "Use mouse EVENT to select thumbnail image. | 2180 | "Use mouse EVENT to select thumbnail image. |
| 2183 | Track this in associated dired buffer if `tumme-track-movement' is | 2181 | Track this in associated dired buffer if `image-dired-track-movement' is |
| 2184 | non-nil." | 2182 | non-nil." |
| 2185 | (interactive "e") | 2183 | (interactive "e") |
| 2186 | (let (file) | 2184 | (let (file) |
| 2187 | (mouse-set-point event) | 2185 | (mouse-set-point event) |
| 2188 | (goto-char (posn-point (event-end event))) | 2186 | (goto-char (posn-point (event-end event))) |
| 2189 | (if tumme-track-movement | 2187 | (if image-dired-track-movement |
| 2190 | (tumme-track-original-file))) | 2188 | (image-dired-track-original-file))) |
| 2191 | (tumme-display-thumb-properties)) | 2189 | (image-dired-display-thumb-properties)) |
| 2192 | 2190 | ||
| 2193 | (defun tumme-mouse-toggle-mark (event) | 2191 | (defun image-dired-mouse-toggle-mark (event) |
| 2194 | "Use mouse EVENT to toggle dired mark for thumbnail. | 2192 | "Use mouse EVENT to toggle dired mark for thumbnail. |
| 2195 | Track this in associated dired buffer if `tumme-track-movement' is | 2193 | Track this in associated dired buffer if `image-dired-track-movement' is |
| 2196 | non-nil." | 2194 | non-nil." |
| 2197 | (interactive "e") | 2195 | (interactive "e") |
| 2198 | (let (file) | 2196 | (let (file) |
| 2199 | (mouse-set-point event) | 2197 | (mouse-set-point event) |
| 2200 | (goto-char (posn-point (event-end event))) | 2198 | (goto-char (posn-point (event-end event))) |
| 2201 | (if tumme-track-movement | 2199 | (if image-dired-track-movement |
| 2202 | (tumme-track-original-file))) | 2200 | (image-dired-track-original-file))) |
| 2203 | (tumme-toggle-mark-thumb-original-file)) | 2201 | (image-dired-toggle-mark-thumb-original-file)) |
| 2204 | 2202 | ||
| 2205 | (defun tumme-dired-display-properties () | 2203 | (defun image-dired-dired-display-properties () |
| 2206 | "Display properties for dired file in the echo area." | 2204 | "Display properties for dired file in the echo area." |
| 2207 | (interactive) | 2205 | (interactive) |
| 2208 | (let* ((file (dired-get-filename)) | 2206 | (let* ((file (dired-get-filename)) |
| @@ -2210,98 +2208,98 @@ non-nil." | |||
| 2210 | (dired-buf (buffer-name (current-buffer))) | 2208 | (dired-buf (buffer-name (current-buffer))) |
| 2211 | (props (mapconcat | 2209 | (props (mapconcat |
| 2212 | 'princ | 2210 | 'princ |
| 2213 | (tumme-list-tags file) | 2211 | (image-dired-list-tags file) |
| 2214 | ", ")) | 2212 | ", ")) |
| 2215 | (comment (tumme-get-comment file))) | 2213 | (comment (image-dired-get-comment file))) |
| 2216 | (if file-name | 2214 | (if file-name |
| 2217 | (message | 2215 | (message |
| 2218 | (tumme-format-properties-string | 2216 | (image-dired-format-properties-string |
| 2219 | dired-buf | 2217 | dired-buf |
| 2220 | file-name | 2218 | file-name |
| 2221 | props | 2219 | props |
| 2222 | comment))))) | 2220 | comment))))) |
| 2223 | 2221 | ||
| 2224 | (defvar tumme-tag-file-list nil | 2222 | (defvar image-dired-tag-file-list nil |
| 2225 | "List to store tag-file structure.") | 2223 | "List to store tag-file structure.") |
| 2226 | 2224 | ||
| 2227 | (defvar tumme-file-tag-list nil | 2225 | (defvar image-dired-file-tag-list nil |
| 2228 | "List to store file-tag structure.") | 2226 | "List to store file-tag structure.") |
| 2229 | 2227 | ||
| 2230 | (defvar tumme-file-comment-list nil | 2228 | (defvar image-dired-file-comment-list nil |
| 2231 | "List to store file comments.") | 2229 | "List to store file comments.") |
| 2232 | 2230 | ||
| 2233 | (defun tumme-add-to-tag-file-list (tag file) | 2231 | (defun image-dired-add-to-tag-file-list (tag file) |
| 2234 | "Add relation between TAG and FILE." | 2232 | "Add relation between TAG and FILE." |
| 2235 | (let (curr) | 2233 | (let (curr) |
| 2236 | (if tumme-tag-file-list | 2234 | (if image-dired-tag-file-list |
| 2237 | (if (setq curr (assoc tag tumme-tag-file-list)) | 2235 | (if (setq curr (assoc tag image-dired-tag-file-list)) |
| 2238 | (if (not (member file curr)) | 2236 | (if (not (member file curr)) |
| 2239 | (setcdr curr (cons file (cdr curr)))) | 2237 | (setcdr curr (cons file (cdr curr)))) |
| 2240 | (setcdr tumme-tag-file-list | 2238 | (setcdr image-dired-tag-file-list |
| 2241 | (cons (list tag file) (cdr tumme-tag-file-list)))) | 2239 | (cons (list tag file) (cdr image-dired-tag-file-list)))) |
| 2242 | (setq tumme-tag-file-list (list (list tag file)))))) | 2240 | (setq image-dired-tag-file-list (list (list tag file)))))) |
| 2243 | 2241 | ||
| 2244 | (defun tumme-add-to-tag-file-lists (tag file) | 2242 | (defun image-dired-add-to-tag-file-lists (tag file) |
| 2245 | "Helper function used from `tumme-create-gallery-lists'. | 2243 | "Helper function used from `image-dired-create-gallery-lists'. |
| 2246 | 2244 | ||
| 2247 | Add TAG to FILE in one list and FILE to TAG in the other. | 2245 | Add TAG to FILE in one list and FILE to TAG in the other. |
| 2248 | 2246 | ||
| 2249 | Lisp structures look like the following: | 2247 | Lisp structures look like the following: |
| 2250 | 2248 | ||
| 2251 | tumme-file-tag-list: | 2249 | image-dired-file-tag-list: |
| 2252 | 2250 | ||
| 2253 | ((\"filename1\" \"tag1\" \"tag2\" \"tag3\" ...) | 2251 | ((\"filename1\" \"tag1\" \"tag2\" \"tag3\" ...) |
| 2254 | (\"filename2\" \"tag1\" \"tag2\" \"tag3\" ...) | 2252 | (\"filename2\" \"tag1\" \"tag2\" \"tag3\" ...) |
| 2255 | ...) | 2253 | ...) |
| 2256 | 2254 | ||
| 2257 | tumme-tag-file-list: | 2255 | image-dired-tag-file-list: |
| 2258 | 2256 | ||
| 2259 | ((\"tag1\" \"filename1\" \"filename2\" \"filename3\" ...) | 2257 | ((\"tag1\" \"filename1\" \"filename2\" \"filename3\" ...) |
| 2260 | (\"tag2\" \"filename1\" \"filename2\" \"filename3\" ...) | 2258 | (\"tag2\" \"filename1\" \"filename2\" \"filename3\" ...) |
| 2261 | ...)" | 2259 | ...)" |
| 2262 | ;; Add tag to file list | 2260 | ;; Add tag to file list |
| 2263 | (let (curr) | 2261 | (let (curr) |
| 2264 | (if tumme-file-tag-list | 2262 | (if image-dired-file-tag-list |
| 2265 | (if (setq curr (assoc file tumme-file-tag-list)) | 2263 | (if (setq curr (assoc file image-dired-file-tag-list)) |
| 2266 | (setcdr curr (cons tag (cdr curr))) | 2264 | (setcdr curr (cons tag (cdr curr))) |
| 2267 | (setcdr tumme-file-tag-list | 2265 | (setcdr image-dired-file-tag-list |
| 2268 | (cons (list file tag) (cdr tumme-file-tag-list)))) | 2266 | (cons (list file tag) (cdr image-dired-file-tag-list)))) |
| 2269 | (setq tumme-file-tag-list (list (list file tag)))) | 2267 | (setq image-dired-file-tag-list (list (list file tag)))) |
| 2270 | ;; Add file to tag list | 2268 | ;; Add file to tag list |
| 2271 | (if tumme-tag-file-list | 2269 | (if image-dired-tag-file-list |
| 2272 | (if (setq curr (assoc tag tumme-tag-file-list)) | 2270 | (if (setq curr (assoc tag image-dired-tag-file-list)) |
| 2273 | (if (not (member file curr)) | 2271 | (if (not (member file curr)) |
| 2274 | (setcdr curr (cons file (cdr curr)))) | 2272 | (setcdr curr (cons file (cdr curr)))) |
| 2275 | (setcdr tumme-tag-file-list | 2273 | (setcdr image-dired-tag-file-list |
| 2276 | (cons (list tag file) (cdr tumme-tag-file-list)))) | 2274 | (cons (list tag file) (cdr image-dired-tag-file-list)))) |
| 2277 | (setq tumme-tag-file-list (list (list tag file)))))) | 2275 | (setq image-dired-tag-file-list (list (list tag file)))))) |
| 2278 | 2276 | ||
| 2279 | (defun tumme-add-to-file-comment-list (file comment) | 2277 | (defun image-dired-add-to-file-comment-list (file comment) |
| 2280 | "Helper function used from `tumme-create-gallery-lists'. | 2278 | "Helper function used from `image-dired-create-gallery-lists'. |
| 2281 | 2279 | ||
| 2282 | For FILE, add COMMENT to list. | 2280 | For FILE, add COMMENT to list. |
| 2283 | 2281 | ||
| 2284 | Lisp structure looks like the following: | 2282 | Lisp structure looks like the following: |
| 2285 | 2283 | ||
| 2286 | tumme-file-comment-list: | 2284 | image-dired-file-comment-list: |
| 2287 | 2285 | ||
| 2288 | ((\"filename1\" . \"comment1\") | 2286 | ((\"filename1\" . \"comment1\") |
| 2289 | (\"filename2\" . \"comment2\") | 2287 | (\"filename2\" . \"comment2\") |
| 2290 | ...)" | 2288 | ...)" |
| 2291 | (if tumme-file-comment-list | 2289 | (if image-dired-file-comment-list |
| 2292 | (if (not (assoc file tumme-file-comment-list)) | 2290 | (if (not (assoc file image-dired-file-comment-list)) |
| 2293 | (setcdr tumme-file-comment-list | 2291 | (setcdr image-dired-file-comment-list |
| 2294 | (cons (cons file comment) | 2292 | (cons (cons file comment) |
| 2295 | (cdr tumme-file-comment-list)))) | 2293 | (cdr image-dired-file-comment-list)))) |
| 2296 | (setq tumme-file-comment-list (list (cons file comment))))) | 2294 | (setq image-dired-file-comment-list (list (cons file comment))))) |
| 2297 | 2295 | ||
| 2298 | (defun tumme-create-gallery-lists () | 2296 | (defun image-dired-create-gallery-lists () |
| 2299 | "Create temporary lists used by `tumme-gallery-generate'." | 2297 | "Create temporary lists used by `image-dired-gallery-generate'." |
| 2300 | (let ((buf (find-file tumme-db-file)) | 2298 | (let ((buf (find-file image-dired-db-file)) |
| 2301 | end beg file row-tags) | 2299 | end beg file row-tags) |
| 2302 | (setq tumme-tag-file-list nil) | 2300 | (setq image-dired-tag-file-list nil) |
| 2303 | (setq tumme-file-tag-list nil) | 2301 | (setq image-dired-file-tag-list nil) |
| 2304 | (setq tumme-file-comment-list nil) | 2302 | (setq image-dired-file-comment-list nil) |
| 2305 | (goto-char (point-min)) | 2303 | (goto-char (point-min)) |
| 2306 | (while (search-forward-regexp "^." nil t) | 2304 | (while (search-forward-regexp "^." nil t) |
| 2307 | (end-of-line) | 2305 | (end-of-line) |
| @@ -2316,51 +2314,51 @@ tumme-file-comment-list: | |||
| 2316 | (mapc | 2314 | (mapc |
| 2317 | (lambda (x) | 2315 | (lambda (x) |
| 2318 | (if (not (string-match "^comment:\\(.*\\)" x)) | 2316 | (if (not (string-match "^comment:\\(.*\\)" x)) |
| 2319 | (tumme-add-to-tag-file-lists x file) | 2317 | (image-dired-add-to-tag-file-lists x file) |
| 2320 | (tumme-add-to-file-comment-list file (match-string 1 x)))) | 2318 | (image-dired-add-to-file-comment-list file (match-string 1 x)))) |
| 2321 | (cdr row-tags))) | 2319 | (cdr row-tags))) |
| 2322 | (kill-buffer buf)) | 2320 | (kill-buffer buf)) |
| 2323 | ;; Sort tag-file list | 2321 | ;; Sort tag-file list |
| 2324 | (setq tumme-tag-file-list | 2322 | (setq image-dired-tag-file-list |
| 2325 | (sort tumme-tag-file-list | 2323 | (sort image-dired-tag-file-list |
| 2326 | (lambda (x y) | 2324 | (lambda (x y) |
| 2327 | (string< (car x) (car y)))))) | 2325 | (string< (car x) (car y)))))) |
| 2328 | 2326 | ||
| 2329 | (defun tumme-hidden-p (file) | 2327 | (defun image-dired-hidden-p (file) |
| 2330 | "Return t if image FILE has a \"hidden\" tag." | 2328 | "Return t if image FILE has a \"hidden\" tag." |
| 2331 | (let (hidden) | 2329 | (let (hidden) |
| 2332 | (mapc | 2330 | (mapc |
| 2333 | (lambda (tag) | 2331 | (lambda (tag) |
| 2334 | (if (member tag tumme-gallery-hidden-tags) | 2332 | (if (member tag image-dired-gallery-hidden-tags) |
| 2335 | (setq hidden t))) | 2333 | (setq hidden t))) |
| 2336 | (cdr (assoc file tumme-file-tag-list))) | 2334 | (cdr (assoc file image-dired-file-tag-list))) |
| 2337 | hidden)) | 2335 | hidden)) |
| 2338 | 2336 | ||
| 2339 | (defun tumme-gallery-generate () | 2337 | (defun image-dired-gallery-generate () |
| 2340 | "Generate gallery pages. | 2338 | "Generate gallery pages. |
| 2341 | First we create a couple of Lisp structures from the database to make | 2339 | First we create a couple of Lisp structures from the database to make |
| 2342 | it easier to generate, then HTML-files are created in | 2340 | it easier to generate, then HTML-files are created in |
| 2343 | `tumme-gallery-dir'" | 2341 | `image-dired-gallery-dir'" |
| 2344 | (interactive) | 2342 | (interactive) |
| 2345 | (if (eq 'per-directory tumme-thumbnail-storage) | 2343 | (if (eq 'per-directory image-dired-thumbnail-storage) |
| 2346 | (error "Currently, gallery generation is not supported \ | 2344 | (error "Currently, gallery generation is not supported \ |
| 2347 | when using per-directory thumbnail file storage")) | 2345 | when using per-directory thumbnail file storage")) |
| 2348 | (tumme-create-gallery-lists) | 2346 | (image-dired-create-gallery-lists) |
| 2349 | (let ((tags tumme-tag-file-list) | 2347 | (let ((tags image-dired-tag-file-list) |
| 2350 | count curr tag index-buf tag-buf | 2348 | count curr tag index-buf tag-buf |
| 2351 | comment file-tags tag-link tag-link-list) | 2349 | comment file-tags tag-link tag-link-list) |
| 2352 | ;; Make sure gallery root exist | 2350 | ;; Make sure gallery root exist |
| 2353 | (if (file-exists-p tumme-gallery-dir) | 2351 | (if (file-exists-p image-dired-gallery-dir) |
| 2354 | (if (not (file-directory-p tumme-gallery-dir)) | 2352 | (if (not (file-directory-p image-dired-gallery-dir)) |
| 2355 | (error "Variable tumme-gallery-dir is not a directory")) | 2353 | (error "Variable image-dired-gallery-dir is not a directory")) |
| 2356 | (make-directory tumme-gallery-dir)) | 2354 | (make-directory image-dired-gallery-dir)) |
| 2357 | ;; Open index file | 2355 | ;; Open index file |
| 2358 | (setq index-buf (find-file | 2356 | (setq index-buf (find-file |
| 2359 | (format "%s/index.html" tumme-gallery-dir))) | 2357 | (format "%s/index.html" image-dired-gallery-dir))) |
| 2360 | (erase-buffer) | 2358 | (erase-buffer) |
| 2361 | (insert "<html>\n") | 2359 | (insert "<html>\n") |
| 2362 | (insert " <body>\n") | 2360 | (insert " <body>\n") |
| 2363 | (insert " <h2>Tumme Gallery</h2>\n") | 2361 | (insert " <h2>Image-Dired Gallery</h2>\n") |
| 2364 | (insert (format "<p>\n Gallery generated %s\n <p>\n" | 2362 | (insert (format "<p>\n Gallery generated %s\n <p>\n" |
| 2365 | (current-time-string))) | 2363 | (current-time-string))) |
| 2366 | (insert " <h3>Tag index</h3>\n") | 2364 | (insert " <h3>Tag index</h3>\n") |
| @@ -2369,7 +2367,7 @@ when using per-directory thumbnail file storage")) | |||
| 2369 | (mapc | 2367 | (mapc |
| 2370 | (lambda (curr) | 2368 | (lambda (curr) |
| 2371 | (setq tag (car curr)) | 2369 | (setq tag (car curr)) |
| 2372 | (when (not (member tag tumme-gallery-hidden-tags)) | 2370 | (when (not (member tag image-dired-gallery-hidden-tags)) |
| 2373 | (setq tag-link (format "<a href=\"%d.html\">%s</a>" count tag)) | 2371 | (setq tag-link (format "<a href=\"%d.html\">%s</a>" count tag)) |
| 2374 | (if tag-link-list | 2372 | (if tag-link-list |
| 2375 | (setq tag-link-list | 2373 | (setq tag-link-list |
| @@ -2383,12 +2381,12 @@ when using per-directory thumbnail file storage")) | |||
| 2383 | (lambda (curr) | 2381 | (lambda (curr) |
| 2384 | (setq tag (car curr)) | 2382 | (setq tag (car curr)) |
| 2385 | ;; Don't display hidden tags | 2383 | ;; Don't display hidden tags |
| 2386 | (when (not (member tag tumme-gallery-hidden-tags)) | 2384 | (when (not (member tag image-dired-gallery-hidden-tags)) |
| 2387 | ;; Insert link to tag page in index | 2385 | ;; Insert link to tag page in index |
| 2388 | (insert (format " %s<br>\n" (cdr (assoc tag tag-link-list)))) | 2386 | (insert (format " %s<br>\n" (cdr (assoc tag tag-link-list)))) |
| 2389 | ;; Open per-tag file | 2387 | ;; Open per-tag file |
| 2390 | (setq tag-buf (find-file | 2388 | (setq tag-buf (find-file |
| 2391 | (format "%s/%s.html" tumme-gallery-dir count))) | 2389 | (format "%s/%s.html" image-dired-gallery-dir count))) |
| 2392 | (erase-buffer) | 2390 | (erase-buffer) |
| 2393 | (insert "<html>\n") | 2391 | (insert "<html>\n") |
| 2394 | (insert " <body>\n") | 2392 | (insert " <body>\n") |
| @@ -2397,21 +2395,21 @@ when using per-directory thumbnail file storage")) | |||
| 2397 | ;; Main loop for files per tag page | 2395 | ;; Main loop for files per tag page |
| 2398 | (mapc | 2396 | (mapc |
| 2399 | (lambda (file) | 2397 | (lambda (file) |
| 2400 | (when (not (tumme-hidden-p file)) | 2398 | (when (not (image-dired-hidden-p file)) |
| 2401 | ;; Insert thumbnail with link to full image | 2399 | ;; Insert thumbnail with link to full image |
| 2402 | (insert | 2400 | (insert |
| 2403 | (format "<a href=\"%s/%s\"><img src=\"%s/%s\"%s></a>\n" | 2401 | (format "<a href=\"%s/%s\"><img src=\"%s/%s\"%s></a>\n" |
| 2404 | tumme-gallery-image-root-url | 2402 | image-dired-gallery-image-root-url |
| 2405 | (file-name-nondirectory file) | 2403 | (file-name-nondirectory file) |
| 2406 | tumme-gallery-thumb-image-root-url | 2404 | image-dired-gallery-thumb-image-root-url |
| 2407 | (file-name-nondirectory (tumme-thumb-name file)) file)) | 2405 | (file-name-nondirectory (image-dired-thumb-name file)) file)) |
| 2408 | ;; Insert comment, if any | 2406 | ;; Insert comment, if any |
| 2409 | (if (setq comment (cdr (assoc file tumme-file-comment-list))) | 2407 | (if (setq comment (cdr (assoc file image-dired-file-comment-list))) |
| 2410 | (insert (format "<br>\n%s<br>\n" comment)) | 2408 | (insert (format "<br>\n%s<br>\n" comment)) |
| 2411 | (insert "<br>\n")) | 2409 | (insert "<br>\n")) |
| 2412 | ;; Insert links to other tags, if any | 2410 | ;; Insert links to other tags, if any |
| 2413 | (when (> (length | 2411 | (when (> (length |
| 2414 | (setq file-tags (assoc file tumme-file-tag-list))) 2) | 2412 | (setq file-tags (assoc file image-dired-file-tag-list))) 2) |
| 2415 | (insert "[ ") | 2413 | (insert "[ ") |
| 2416 | (mapc | 2414 | (mapc |
| 2417 | (lambda (extra-tag) | 2415 | (lambda (extra-tag) |
| @@ -2435,7 +2433,7 @@ when using per-directory thumbnail file storage")) | |||
| 2435 | (save-buffer) | 2433 | (save-buffer) |
| 2436 | (kill-buffer index-buf))) | 2434 | (kill-buffer index-buf))) |
| 2437 | 2435 | ||
| 2438 | (defun tumme-kill-buffer-and-window () | 2436 | (defun image-dired-kill-buffer-and-window () |
| 2439 | "Kill the current buffer and, if possible, also the window." | 2437 | "Kill the current buffer and, if possible, also the window." |
| 2440 | (interactive) | 2438 | (interactive) |
| 2441 | (let ((buffer (current-buffer))) | 2439 | (let ((buffer (current-buffer))) |
| @@ -2444,19 +2442,19 @@ when using per-directory thumbnail file storage")) | |||
| 2444 | (error nil)) | 2442 | (error nil)) |
| 2445 | (kill-buffer buffer))) | 2443 | (kill-buffer buffer))) |
| 2446 | 2444 | ||
| 2447 | (defvar tumme-widget-list nil | 2445 | (defvar image-dired-widget-list nil |
| 2448 | "List to keep track of meta data in edit buffer.") | 2446 | "List to keep track of meta data in edit buffer.") |
| 2449 | 2447 | ||
| 2450 | ;;;###autoload | 2448 | ;;;###autoload |
| 2451 | (defun tumme-dired-edit-comment-and-tags () | 2449 | (defun image-dired-dired-edit-comment-and-tags () |
| 2452 | "Edit comment and tags of current or marked image files. | 2450 | "Edit comment and tags of current or marked image files. |
| 2453 | Edit comment and tags for all marked image files in an | 2451 | Edit comment and tags for all marked image files in an |
| 2454 | easy-to-use form." | 2452 | easy-to-use form." |
| 2455 | (interactive) | 2453 | (interactive) |
| 2456 | (setq tumme-widget-list nil) | 2454 | (setq image-dired-widget-list nil) |
| 2457 | ;; Setup buffer. | 2455 | ;; Setup buffer. |
| 2458 | (let ((files (dired-get-marked-files))) | 2456 | (let ((files (dired-get-marked-files))) |
| 2459 | (switch-to-buffer "*Tumme Edit Meta Data*") | 2457 | (switch-to-buffer "*Image-Dired Edit Meta Data*") |
| 2460 | (kill-all-local-variables) | 2458 | (kill-all-local-variables) |
| 2461 | (make-local-variable 'widget-example-repeat) | 2459 | (make-local-variable 'widget-example-repeat) |
| 2462 | (let ((inhibit-read-only t)) | 2460 | (let ((inhibit-read-only t)) |
| @@ -2475,7 +2473,7 @@ the operation by activating the Cancel button.\n\n") | |||
| 2475 | 2473 | ||
| 2476 | (dolist (file files) | 2474 | (dolist (file files) |
| 2477 | 2475 | ||
| 2478 | (setq thumb-file (tumme-thumb-name file) | 2476 | (setq thumb-file (image-dired-thumb-name file) |
| 2479 | img (create-image thumb-file)) | 2477 | img (create-image thumb-file)) |
| 2480 | 2478 | ||
| 2481 | (insert-image img) | 2479 | (insert-image img) |
| @@ -2484,7 +2482,7 @@ the operation by activating the Cancel button.\n\n") | |||
| 2484 | (widget-create 'editable-field | 2482 | (widget-create 'editable-field |
| 2485 | :size 60 | 2483 | :size 60 |
| 2486 | :format "%v " | 2484 | :format "%v " |
| 2487 | :value (or (tumme-get-comment file) ""))) | 2485 | :value (or (image-dired-get-comment file) ""))) |
| 2488 | (widget-insert "\nTags: ") | 2486 | (widget-insert "\nTags: ") |
| 2489 | (setq tag-widget | 2487 | (setq tag-widget |
| 2490 | (widget-create 'editable-field | 2488 | (widget-create 'editable-field |
| @@ -2493,12 +2491,12 @@ the operation by activating the Cancel button.\n\n") | |||
| 2493 | :value (or (mapconcat | 2491 | :value (or (mapconcat |
| 2494 | (lambda (tag) | 2492 | (lambda (tag) |
| 2495 | tag) | 2493 | tag) |
| 2496 | (tumme-list-tags file) | 2494 | (image-dired-list-tags file) |
| 2497 | ",") ""))) | 2495 | ",") ""))) |
| 2498 | ;; Save information in all widgets so that we can use it when | 2496 | ;; Save information in all widgets so that we can use it when |
| 2499 | ;; the user saves the form. | 2497 | ;; the user saves the form. |
| 2500 | (setq tumme-widget-list | 2498 | (setq image-dired-widget-list |
| 2501 | (append tumme-widget-list | 2499 | (append image-dired-widget-list |
| 2502 | (list (list file comment-widget tag-widget)))) | 2500 | (list (list file comment-widget tag-widget)))) |
| 2503 | (widget-insert "\n\n"))) | 2501 | (widget-insert "\n\n"))) |
| 2504 | 2502 | ||
| @@ -2507,7 +2505,7 @@ the operation by activating the Cancel button.\n\n") | |||
| 2507 | (widget-create 'push-button | 2505 | (widget-create 'push-button |
| 2508 | :notify | 2506 | :notify |
| 2509 | (lambda (&rest ignore) | 2507 | (lambda (&rest ignore) |
| 2510 | (tumme-save-information-from-widgets) | 2508 | (image-dired-save-information-from-widgets) |
| 2511 | (bury-buffer) | 2509 | (bury-buffer) |
| 2512 | (message "Done.")) | 2510 | (message "Done.")) |
| 2513 | "Save") | 2511 | "Save") |
| @@ -2524,21 +2522,21 @@ the operation by activating the Cancel button.\n\n") | |||
| 2524 | ;; Jump to the first widget. | 2522 | ;; Jump to the first widget. |
| 2525 | (widget-forward 1))) | 2523 | (widget-forward 1))) |
| 2526 | 2524 | ||
| 2527 | (defun tumme-save-information-from-widgets () | 2525 | (defun image-dired-save-information-from-widgets () |
| 2528 | "Save information found in `tumme-widget-list'. | 2526 | "Save information found in `image-dired-widget-list'. |
| 2529 | Use the information in `tumme-widget-list' to save comments and | 2527 | Use the information in `image-dired-widget-list' to save comments and |
| 2530 | tags to their respective image file. Internal function used by | 2528 | tags to their respective image file. Internal function used by |
| 2531 | `tumme-dired-edit-comment-and-tags'." | 2529 | `image-dired-dired-edit-comment-and-tags'." |
| 2532 | (let (file comment tag-string tag-list lst) | 2530 | (let (file comment tag-string tag-list lst) |
| 2533 | (tumme-write-comments | 2531 | (image-dired-write-comments |
| 2534 | (mapcar | 2532 | (mapcar |
| 2535 | (lambda (widget) | 2533 | (lambda (widget) |
| 2536 | (setq file (car widget) | 2534 | (setq file (car widget) |
| 2537 | comment (widget-value (cadr widget))) | 2535 | comment (widget-value (cadr widget))) |
| 2538 | (cons file comment)) | 2536 | (cons file comment)) |
| 2539 | tumme-widget-list)) | 2537 | image-dired-widget-list)) |
| 2540 | (tumme-write-tags | 2538 | (image-dired-write-tags |
| 2541 | (dolist (widget tumme-widget-list lst) | 2539 | (dolist (widget image-dired-widget-list lst) |
| 2542 | (setq file (car widget) | 2540 | (setq file (car widget) |
| 2543 | tag-string (widget-value (car (cddr widget))) | 2541 | tag-string (widget-value (car (cddr widget))) |
| 2544 | tag-list (split-string tag-string ",")) | 2542 | tag-list (split-string tag-string ",")) |
| @@ -2549,12 +2547,12 @@ tags to their respective image file. Internal function used by | |||
| 2549 | ;;;;;;;;; TEST-SECTION ;;;;;;;;;;; | 2547 | ;;;;;;;;; TEST-SECTION ;;;;;;;;;;; |
| 2550 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 2548 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 2551 | 2549 | ||
| 2552 | ;; (defvar tumme-dir-max-size 12300000) | 2550 | ;; (defvar image-dired-dir-max-size 12300000) |
| 2553 | 2551 | ||
| 2554 | ;; (defun tumme-test-clean-old-files () | 2552 | ;; (defun image-dired-test-clean-old-files () |
| 2555 | ;; "Clean `tumme-dir' from old thumbnail files. | 2553 | ;; "Clean `image-dired-dir' from old thumbnail files. |
| 2556 | ;; \"Oldness\" measured using last access time. If the total size of all | 2554 | ;; \"Oldness\" measured using last access time. If the total size of all |
| 2557 | ;; thumbnail files in `tumme-dir' is larger than 'tumme-dir-max-size', | 2555 | ;; thumbnail files in `image-dired-dir' is larger than 'image-dired-dir-max-size', |
| 2558 | ;; old files are deleted until the max size is reached." | 2556 | ;; old files are deleted until the max size is reached." |
| 2559 | ;; (let* ((files | 2557 | ;; (let* ((files |
| 2560 | ;; (sort | 2558 | ;; (sort |
| @@ -2563,12 +2561,12 @@ tags to their respective image file. Internal function used by | |||
| 2563 | ;; (let ((fattribs (file-attributes f))) | 2561 | ;; (let ((fattribs (file-attributes f))) |
| 2564 | ;; ;; Get last access time and file size | 2562 | ;; ;; Get last access time and file size |
| 2565 | ;; `(,(nth 4 fattribs) ,(nth 7 fattribs) ,f))) | 2563 | ;; `(,(nth 4 fattribs) ,(nth 7 fattribs) ,f))) |
| 2566 | ;; (directory-files (tumme-dir) t ".+\.thumb\..+$")) | 2564 | ;; (directory-files (image-dired-dir) t ".+\.thumb\..+$")) |
| 2567 | ;; ;; Sort function. Compare time between two files. | 2565 | ;; ;; Sort function. Compare time between two files. |
| 2568 | ;; '(lambda (l1 l2) | 2566 | ;; '(lambda (l1 l2) |
| 2569 | ;; (time-less-p (car l1) (car l2))))) | 2567 | ;; (time-less-p (car l1) (car l2))))) |
| 2570 | ;; (dirsize (apply '+ (mapcar (lambda (x) (cadr x)) files)))) | 2568 | ;; (dirsize (apply '+ (mapcar (lambda (x) (cadr x)) files)))) |
| 2571 | ;; (while (> dirsize tumme-dir-max-size) | 2569 | ;; (while (> dirsize image-dired-dir-max-size) |
| 2572 | ;; (y-or-n-p | 2570 | ;; (y-or-n-p |
| 2573 | ;; (format "Size of thumbnail directory: %d, delete old file %s? " | 2571 | ;; (format "Size of thumbnail directory: %d, delete old file %s? " |
| 2574 | ;; dirsize (cadr (cdar files)))) | 2572 | ;; dirsize (cadr (cdar files)))) |
| @@ -2579,8 +2577,8 @@ tags to their respective image file. Internal function used by | |||
| 2579 | ;;;;;;;;;;;;;;;;;;;;;;, | 2577 | ;;;;;;;;;;;;;;;;;;;;;;, |
| 2580 | 2578 | ||
| 2581 | ;; (defun dired-speedbar-buttons (dired-buffer) | 2579 | ;; (defun dired-speedbar-buttons (dired-buffer) |
| 2582 | ;; (when (and (boundp 'tumme-use-speedbar) | 2580 | ;; (when (and (boundp 'image-dired-use-speedbar) |
| 2583 | ;; tumme-use-speedbar) | 2581 | ;; image-dired-use-speedbar) |
| 2584 | ;; (let ((filename (with-current-buffer dired-buffer | 2582 | ;; (let ((filename (with-current-buffer dired-buffer |
| 2585 | ;; (dired-get-filename)))) | 2583 | ;; (dired-get-filename)))) |
| 2586 | ;; (when (and (not (string-equal filename (buffer-string))) | 2584 | ;; (when (and (not (string-equal filename (buffer-string))) |
| @@ -2589,11 +2587,11 @@ tags to their respective image file. Internal function used by | |||
| 2589 | ;; (insert (propertize | 2587 | ;; (insert (propertize |
| 2590 | ;; filename | 2588 | ;; filename |
| 2591 | ;; 'display | 2589 | ;; 'display |
| 2592 | ;; (tumme-get-thumbnail-image filename))))))) | 2590 | ;; (image-dired-get-thumbnail-image filename))))))) |
| 2593 | 2591 | ||
| 2594 | ;; (setq tumme-use-speedbar t) | 2592 | ;; (setq image-dired-use-speedbar t) |
| 2595 | 2593 | ||
| 2596 | (provide 'tumme) | 2594 | (provide 'image-dired) |
| 2597 | 2595 | ||
| 2598 | ;; arch-tag: 9d11411d-331f-4380-8b44-8adfe3a0343e | 2596 | ;; arch-tag: 9d11411d-331f-4380-8b44-8adfe3a0343e |
| 2599 | ;;; tumme.el ends here | 2597 | ;;; image-dired.el ends here |
diff --git a/lisp/info.el b/lisp/info.el index 6757929424b..4d1e1d8e3e9 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -1400,8 +1400,8 @@ any double quotes or backslashes must be escaped (\\\",\\\\)." | |||
| 1400 | 1400 | ||
| 1401 | (defvar Info-mode-line-node-keymap | 1401 | (defvar Info-mode-line-node-keymap |
| 1402 | (let ((map (make-sparse-keymap))) | 1402 | (let ((map (make-sparse-keymap))) |
| 1403 | (define-key map [mode-line mouse-1] 'Info-scroll-up) | 1403 | (define-key map [mode-line mouse-1] 'Info-mouse-scroll-up) |
| 1404 | (define-key map [mode-line mouse-3] 'Info-scroll-down) | 1404 | (define-key map [mode-line mouse-3] 'Info-mouse-scroll-down) |
| 1405 | map) | 1405 | map) |
| 1406 | "Keymap to put on the Info node name in the mode line.") | 1406 | "Keymap to put on the Info node name in the mode line.") |
| 1407 | 1407 | ||
| @@ -2620,6 +2620,15 @@ in other ways.)" | |||
| 2620 | (t (Info-next-preorder))) | 2620 | (t (Info-next-preorder))) |
| 2621 | (scroll-up)))) | 2621 | (scroll-up)))) |
| 2622 | 2622 | ||
| 2623 | (defun Info-mouse-scroll-up (e) | ||
| 2624 | "Scroll one screenful forward in Info, using the mouse. | ||
| 2625 | See `Info-scroll-up'." | ||
| 2626 | (interactive "e") | ||
| 2627 | (save-selected-window | ||
| 2628 | (if (eventp e) | ||
| 2629 | (select-window (posn-window (event-start e)))) | ||
| 2630 | (Info-scroll-up))) | ||
| 2631 | |||
| 2623 | (defun Info-scroll-down () | 2632 | (defun Info-scroll-down () |
| 2624 | "Scroll one screenful back in Info, considering all nodes as one sequence. | 2633 | "Scroll one screenful back in Info, considering all nodes as one sequence. |
| 2625 | If point is within the menu of a node, and `Info-scroll-prefer-subnodes' | 2634 | If point is within the menu of a node, and `Info-scroll-prefer-subnodes' |
| @@ -2646,6 +2655,15 @@ parent node." | |||
| 2646 | (Info-last-preorder) | 2655 | (Info-last-preorder) |
| 2647 | (scroll-down)))) | 2656 | (scroll-down)))) |
| 2648 | 2657 | ||
| 2658 | (defun Info-mouse-scroll-down (e) | ||
| 2659 | "Scroll one screenful backward in Info, using the mouse. | ||
| 2660 | See `Info-scroll-down'." | ||
| 2661 | (interactive "e") | ||
| 2662 | (save-selected-window | ||
| 2663 | (if (eventp e) | ||
| 2664 | (select-window (posn-window (event-start e)))) | ||
| 2665 | (Info-scroll-down))) | ||
| 2666 | |||
| 2649 | (defun Info-next-reference (&optional recur) | 2667 | (defun Info-next-reference (&optional recur) |
| 2650 | "Move cursor to the next cross-reference or menu item in the node." | 2668 | "Move cursor to the next cross-reference or menu item in the node." |
| 2651 | (interactive) | 2669 | (interactive) |
diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 92573c0d417..e94a2fb81f5 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el | |||
| @@ -1567,8 +1567,10 @@ text, and convert it in the temporary buffer. Otherwise, convert in-place." | |||
| 1567 | ;;; FILE I/O | 1567 | ;;; FILE I/O |
| 1568 | 1568 | ||
| 1569 | (defcustom auto-coding-alist | 1569 | (defcustom auto-coding-alist |
| 1570 | '(("\\.\\(arc\\|zip\\|lzh\\|lha\\|zoo\\|[jew]ar\\|xpi\\)\\'" . no-conversion) | 1570 | ;; .exe and .EXE are added to support archive-mode looking at DOS |
| 1571 | ("\\.\\(ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\)\\'" . no-conversion) | 1571 | ;; self-extracting exe archives. |
| 1572 | '(("\\.\\(arc\\|zip\\|lzh\\|lha\\|zoo\\|[jew]ar\\|xpi\\|exe\\)\\'" . no-conversion) | ||
| 1573 | ("\\.\\(ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|EXE\\)\\'" . no-conversion) | ||
| 1572 | ("\\.\\(sx[dmicw]\\|odt\\|tar\\|tgz\\)\\'" . no-conversion) | 1574 | ("\\.\\(sx[dmicw]\\|odt\\|tar\\|tgz\\)\\'" . no-conversion) |
| 1573 | ("\\.\\(gz\\|Z\\|bz\\|bz2\\|gpg\\)\\'" . no-conversion) | 1575 | ("\\.\\(gz\\|Z\\|bz\\|bz2\\|gpg\\)\\'" . no-conversion) |
| 1574 | ("\\.\\(jpe?g\\|png\\|gif\\|tiff?\\|p[bpgn]m\\)\\'" . no-conversion) | 1576 | ("\\.\\(jpe?g\\|png\\|gif\\|tiff?\\|p[bpgn]m\\)\\'" . no-conversion) |
diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 342dd04b936..12391dd774d 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | ;;;### (autoloads (5x5-crack 5x5-crack-xor-mutate 5x5-crack-mutating-best | 5 | ;;;### (autoloads (5x5-crack 5x5-crack-xor-mutate 5x5-crack-mutating-best |
| 6 | ;;;;;; 5x5-crack-mutating-current 5x5-crack-randomly 5x5) "5x5" | 6 | ;;;;;; 5x5-crack-mutating-current 5x5-crack-randomly 5x5) "5x5" |
| 7 | ;;;;;; "play/5x5.el" (17876 15555)) | 7 | ;;;;;; "play/5x5.el" (17941 38806)) |
| 8 | ;;; Generated autoloads from play/5x5.el | 8 | ;;; Generated autoloads from play/5x5.el |
| 9 | 9 | ||
| 10 | (autoload (quote 5x5) "5x5" "\ | 10 | (autoload (quote 5x5) "5x5" "\ |
| @@ -852,7 +852,7 @@ Not documented | |||
| 852 | ;;;*** | 852 | ;;;*** |
| 853 | 853 | ||
| 854 | ;;;### (autoloads (animate-birthday-present animate-sequence animate-string) | 854 | ;;;### (autoloads (animate-birthday-present animate-sequence animate-string) |
| 855 | ;;;;;; "animate" "play/animate.el" (17842 55395)) | 855 | ;;;;;; "animate" "play/animate.el" (17941 38806)) |
| 856 | ;;; Generated autoloads from play/animate.el | 856 | ;;; Generated autoloads from play/animate.el |
| 857 | 857 | ||
| 858 | (autoload (quote animate-string) "animate" "\ | 858 | (autoload (quote animate-string) "animate" "\ |
| @@ -945,7 +945,7 @@ Used in `antlr-mode'. Also a useful function in `java-mode-hook'. | |||
| 945 | ;;;### (autoloads (appt-activate appt-make-list appt-delete appt-add | 945 | ;;;### (autoloads (appt-activate appt-make-list appt-delete appt-add |
| 946 | ;;;;;; appt-display-diary appt-display-duration appt-display-mode-line | 946 | ;;;;;; appt-display-diary appt-display-duration appt-display-mode-line |
| 947 | ;;;;;; appt-msg-window appt-visible appt-audible appt-message-warning-time | 947 | ;;;;;; appt-msg-window appt-visible appt-audible appt-message-warning-time |
| 948 | ;;;;;; appt-issue-message) "appt" "calendar/appt.el" (17842 53792)) | 948 | ;;;;;; appt-issue-message) "appt" "calendar/appt.el" (17952 17513)) |
| 949 | ;;; Generated autoloads from calendar/appt.el | 949 | ;;; Generated autoloads from calendar/appt.el |
| 950 | 950 | ||
| 951 | (defvar appt-issue-message t "\ | 951 | (defvar appt-issue-message t "\ |
| @@ -1129,8 +1129,8 @@ Returns list of symbols and documentation found. | |||
| 1129 | 1129 | ||
| 1130 | ;;;*** | 1130 | ;;;*** |
| 1131 | 1131 | ||
| 1132 | ;;;### (autoloads (archive-mode) "arc-mode" "arc-mode.el" (17842 | 1132 | ;;;### (autoloads (archive-mode) "arc-mode" "arc-mode.el" (17956 |
| 1133 | ;;;;;; 58280)) | 1133 | ;;;;;; 9517)) |
| 1134 | ;;; Generated autoloads from arc-mode.el | 1134 | ;;; Generated autoloads from arc-mode.el |
| 1135 | 1135 | ||
| 1136 | (autoload (quote archive-mode) "arc-mode" "\ | 1136 | (autoload (quote archive-mode) "arc-mode" "\ |
| @@ -1794,8 +1794,8 @@ non-interactive use see also `benchmark-run' and | |||
| 1794 | 1794 | ||
| 1795 | ;;;*** | 1795 | ;;;*** |
| 1796 | 1796 | ||
| 1797 | ;;;### (autoloads (bibtex-mode) "bibtex" "textmodes/bibtex.el" (17843 | 1797 | ;;;### (autoloads (bibtex-mode) "bibtex" "textmodes/bibtex.el" (17956 |
| 1798 | ;;;;;; 28300)) | 1798 | ;;;;;; 9518)) |
| 1799 | ;;; Generated autoloads from textmodes/bibtex.el | 1799 | ;;; Generated autoloads from textmodes/bibtex.el |
| 1800 | 1800 | ||
| 1801 | (autoload (quote bibtex-mode) "bibtex" "\ | 1801 | (autoload (quote bibtex-mode) "bibtex" "\ |
| @@ -2671,7 +2671,7 @@ Also see `make-text-button'. | |||
| 2671 | ;;;;;; batch-byte-compile-if-not-done display-call-tree byte-compile | 2671 | ;;;;;; batch-byte-compile-if-not-done display-call-tree byte-compile |
| 2672 | ;;;;;; compile-defun byte-compile-file byte-recompile-directory | 2672 | ;;;;;; compile-defun byte-compile-file byte-recompile-directory |
| 2673 | ;;;;;; byte-force-recompile byte-compile-warnings-safe-p) "bytecomp" | 2673 | ;;;;;; byte-force-recompile byte-compile-warnings-safe-p) "bytecomp" |
| 2674 | ;;;;;; "emacs-lisp/bytecomp.el" (17927 20254)) | 2674 | ;;;;;; "emacs-lisp/bytecomp.el" (17949 41467)) |
| 2675 | ;;; Generated autoloads from emacs-lisp/bytecomp.el | 2675 | ;;; Generated autoloads from emacs-lisp/bytecomp.el |
| 2676 | (put 'byte-compile-dynamic 'safe-local-variable 'booleanp) | 2676 | (put 'byte-compile-dynamic 'safe-local-variable 'booleanp) |
| 2677 | (put 'byte-compile-disable-print-circle 'safe-local-variable 'booleanp) | 2677 | (put 'byte-compile-disable-print-circle 'safe-local-variable 'booleanp) |
| @@ -2802,7 +2802,7 @@ from the cursor position. | |||
| 2802 | ;;;### (autoloads (defmath calc-embedded-activate calc-embedded calc-grab-rectangle | 2802 | ;;;### (autoloads (defmath calc-embedded-activate calc-embedded calc-grab-rectangle |
| 2803 | ;;;;;; calc-grab-region full-calc-keypad calc-keypad calc-eval quick-calc | 2803 | ;;;;;; calc-grab-region full-calc-keypad calc-keypad calc-eval quick-calc |
| 2804 | ;;;;;; full-calc calc calc-dispatch calc-settings-file) "calc" "calc/calc.el" | 2804 | ;;;;;; full-calc calc calc-dispatch calc-settings-file) "calc" "calc/calc.el" |
| 2805 | ;;;;;; (17919 4936)) | 2805 | ;;;;;; (17955 4296)) |
| 2806 | ;;; Generated autoloads from calc/calc.el | 2806 | ;;; Generated autoloads from calc/calc.el |
| 2807 | 2807 | ||
| 2808 | (defvar calc-settings-file (convert-standard-filename "~/.calc.el") "\ | 2808 | (defvar calc-settings-file (convert-standard-filename "~/.calc.el") "\ |
| @@ -2909,7 +2909,7 @@ See the documentation for `calculator-mode' for more information. | |||
| 2909 | ;;;;;; mark-holidays-in-calendar view-calendar-holidays-initially | 2909 | ;;;;;; mark-holidays-in-calendar view-calendar-holidays-initially |
| 2910 | ;;;;;; calendar-remove-frame-by-deleting mark-diary-entries-in-calendar | 2910 | ;;;;;; calendar-remove-frame-by-deleting mark-diary-entries-in-calendar |
| 2911 | ;;;;;; view-diary-entries-initially calendar-offset) "calendar" | 2911 | ;;;;;; view-diary-entries-initially calendar-offset) "calendar" |
| 2912 | ;;;;;; "calendar/calendar.el" (17929 8808)) | 2912 | ;;;;;; "calendar/calendar.el" (17944 20140)) |
| 2913 | ;;; Generated autoloads from calendar/calendar.el | 2913 | ;;; Generated autoloads from calendar/calendar.el |
| 2914 | 2914 | ||
| 2915 | (defvar calendar-offset 0 "\ | 2915 | (defvar calendar-offset 0 "\ |
| @@ -3507,7 +3507,7 @@ it fails. | |||
| 3507 | ;;;*** | 3507 | ;;;*** |
| 3508 | 3508 | ||
| 3509 | ;;;### (autoloads (c-guess-basic-syntax) "cc-engine" "progmodes/cc-engine.el" | 3509 | ;;;### (autoloads (c-guess-basic-syntax) "cc-engine" "progmodes/cc-engine.el" |
| 3510 | ;;;;;; (17926 45410)) | 3510 | ;;;;;; (17942 63381)) |
| 3511 | ;;; Generated autoloads from progmodes/cc-engine.el | 3511 | ;;; Generated autoloads from progmodes/cc-engine.el |
| 3512 | 3512 | ||
| 3513 | (autoload (quote c-guess-basic-syntax) "cc-engine" "\ | 3513 | (autoload (quote c-guess-basic-syntax) "cc-engine" "\ |
| @@ -3728,14 +3728,14 @@ and exists only for compatibility reasons. | |||
| 3728 | 3728 | ||
| 3729 | ;;;*** | 3729 | ;;;*** |
| 3730 | 3730 | ||
| 3731 | ;;;### (autoloads nil "cc-subword" "progmodes/cc-subword.el" (17842 | 3731 | ;;;### (autoloads nil "cc-subword" "progmodes/cc-subword.el" (17949 |
| 3732 | ;;;;;; 56333)) | 3732 | ;;;;;; 41467)) |
| 3733 | ;;; Generated autoloads from progmodes/cc-subword.el | 3733 | ;;; Generated autoloads from progmodes/cc-subword.el |
| 3734 | (autoload 'c-subword-mode "cc-subword" "Mode enabling subword movement and editing keys." t) | 3734 | (autoload 'c-subword-mode "cc-subword" "Mode enabling subword movement and editing keys." t) |
| 3735 | 3735 | ||
| 3736 | ;;;*** | 3736 | ;;;*** |
| 3737 | 3737 | ||
| 3738 | ;;;### (autoloads nil "cc-vars" "progmodes/cc-vars.el" (17854 7681)) | 3738 | ;;;### (autoloads nil "cc-vars" "progmodes/cc-vars.el" (17941 38806)) |
| 3739 | ;;; Generated autoloads from progmodes/cc-vars.el | 3739 | ;;; Generated autoloads from progmodes/cc-vars.el |
| 3740 | (put 'c-basic-offset 'safe-local-variable 'integerp) | 3740 | (put 'c-basic-offset 'safe-local-variable 'integerp) |
| 3741 | (put 'c-backslash-column 'safe-local-variable 'integerp) | 3741 | (put 'c-backslash-column 'safe-local-variable 'integerp) |
| @@ -4535,7 +4535,7 @@ on third call it again advances points to the next difference and so on. | |||
| 4535 | ;;;;;; compilation-shell-minor-mode compilation-mode compilation-start | 4535 | ;;;;;; compilation-shell-minor-mode compilation-mode compilation-start |
| 4536 | ;;;;;; compile compilation-disable-input compile-command compilation-search-path | 4536 | ;;;;;; compile compilation-disable-input compile-command compilation-search-path |
| 4537 | ;;;;;; compilation-ask-about-save compilation-window-height compilation-mode-hook) | 4537 | ;;;;;; compilation-ask-about-save compilation-window-height compilation-mode-hook) |
| 4538 | ;;;;;; "compile" "progmodes/compile.el" (17928 33291)) | 4538 | ;;;;;; "compile" "progmodes/compile.el" (17952 11093)) |
| 4539 | ;;; Generated autoloads from progmodes/compile.el | 4539 | ;;; Generated autoloads from progmodes/compile.el |
| 4540 | 4540 | ||
| 4541 | (defvar compilation-mode-hook nil "\ | 4541 | (defvar compilation-mode-hook nil "\ |
| @@ -4698,7 +4698,7 @@ This is the value of `next-error-function' in Compilation buffers. | |||
| 4698 | ;;;*** | 4698 | ;;;*** |
| 4699 | 4699 | ||
| 4700 | ;;;### (autoloads (partial-completion-mode) "complete" "complete.el" | 4700 | ;;;### (autoloads (partial-completion-mode) "complete" "complete.el" |
| 4701 | ;;;;;; (17931 55720)) | 4701 | ;;;;;; (17954 15344)) |
| 4702 | ;;; Generated autoloads from complete.el | 4702 | ;;; Generated autoloads from complete.el |
| 4703 | 4703 | ||
| 4704 | (defvar partial-completion-mode nil "\ | 4704 | (defvar partial-completion-mode nil "\ |
| @@ -5200,7 +5200,7 @@ Insert a copyright by $ORGANIZATION notice at cursor. | |||
| 5200 | ;;;*** | 5200 | ;;;*** |
| 5201 | 5201 | ||
| 5202 | ;;;### (autoloads (cperl-perldoc-at-point cperl-perldoc cperl-mode) | 5202 | ;;;### (autoloads (cperl-perldoc-at-point cperl-perldoc cperl-mode) |
| 5203 | ;;;;;; "cperl-mode" "progmodes/cperl-mode.el" (17899 1957)) | 5203 | ;;;;;; "cperl-mode" "progmodes/cperl-mode.el" (17955 36604)) |
| 5204 | ;;; Generated autoloads from progmodes/cperl-mode.el | 5204 | ;;; Generated autoloads from progmodes/cperl-mode.el |
| 5205 | 5205 | ||
| 5206 | (autoload (quote cperl-mode) "cperl-mode" "\ | 5206 | (autoload (quote cperl-mode) "cperl-mode" "\ |
| @@ -5538,7 +5538,7 @@ Enable CUA selection mode without the C-z/C-x/C-c/C-v bindings. | |||
| 5538 | ;;;;;; customize-mode customize customize-save-variable customize-set-variable | 5538 | ;;;;;; customize-mode customize customize-save-variable customize-set-variable |
| 5539 | ;;;;;; customize-set-value custom-menu-sort-alphabetically custom-buffer-sort-alphabetically | 5539 | ;;;;;; customize-set-value custom-menu-sort-alphabetically custom-buffer-sort-alphabetically |
| 5540 | ;;;;;; custom-browse-sort-alphabetically) "cus-edit" "cus-edit.el" | 5540 | ;;;;;; custom-browse-sort-alphabetically) "cus-edit" "cus-edit.el" |
| 5541 | ;;;;;; (17900 13368)) | 5541 | ;;;;;; (17952 11093)) |
| 5542 | ;;; Generated autoloads from cus-edit.el | 5542 | ;;; Generated autoloads from cus-edit.el |
| 5543 | 5543 | ||
| 5544 | (defvar custom-browse-sort-alphabetically nil "\ | 5544 | (defvar custom-browse-sort-alphabetically nil "\ |
| @@ -6044,8 +6044,8 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]. | |||
| 6044 | 6044 | ||
| 6045 | ;;;*** | 6045 | ;;;*** |
| 6046 | 6046 | ||
| 6047 | ;;;### (autoloads (dcl-mode) "dcl-mode" "progmodes/dcl-mode.el" (17842 | 6047 | ;;;### (autoloads (dcl-mode) "dcl-mode" "progmodes/dcl-mode.el" (17949 |
| 6048 | ;;;;;; 56333)) | 6048 | ;;;;;; 41468)) |
| 6049 | ;;; Generated autoloads from progmodes/dcl-mode.el | 6049 | ;;; Generated autoloads from progmodes/dcl-mode.el |
| 6050 | 6050 | ||
| 6051 | (autoload (quote dcl-mode) "dcl-mode" "\ | 6051 | (autoload (quote dcl-mode) "dcl-mode" "\ |
| @@ -6442,7 +6442,7 @@ as well as widgets, buttons, overlays, and text properties. | |||
| 6442 | ;;;### (autoloads (desktop-revert desktop-save-in-desktop-dir desktop-change-dir | 6442 | ;;;### (autoloads (desktop-revert desktop-save-in-desktop-dir desktop-change-dir |
| 6443 | ;;;;;; desktop-load-default desktop-read desktop-remove desktop-save | 6443 | ;;;;;; desktop-load-default desktop-read desktop-remove desktop-save |
| 6444 | ;;;;;; desktop-clear desktop-locals-to-save desktop-save-mode) "desktop" | 6444 | ;;;;;; desktop-clear desktop-locals-to-save desktop-save-mode) "desktop" |
| 6445 | ;;;;;; "desktop.el" (17893 17506)) | 6445 | ;;;;;; "desktop.el" (17949 41467)) |
| 6446 | ;;; Generated autoloads from desktop.el | 6446 | ;;; Generated autoloads from desktop.el |
| 6447 | 6447 | ||
| 6448 | (defvar desktop-save-mode nil "\ | 6448 | (defvar desktop-save-mode nil "\ |
| @@ -6676,7 +6676,7 @@ Not documented | |||
| 6676 | ;;;*** | 6676 | ;;;*** |
| 6677 | 6677 | ||
| 6678 | ;;;### (autoloads (diary-mode diary-mail-entries diary) "diary-lib" | 6678 | ;;;### (autoloads (diary-mode diary-mail-entries diary) "diary-lib" |
| 6679 | ;;;;;; "calendar/diary-lib.el" (17929 8808)) | 6679 | ;;;;;; "calendar/diary-lib.el" (17944 20140)) |
| 6680 | ;;; Generated autoloads from calendar/diary-lib.el | 6680 | ;;; Generated autoloads from calendar/diary-lib.el |
| 6681 | 6681 | ||
| 6682 | (autoload (quote diary) "diary-lib" "\ | 6682 | (autoload (quote diary) "diary-lib" "\ |
| @@ -6756,14 +6756,13 @@ With prefix arg, prompt for diff switches. | |||
| 6756 | ;;;*** | 6756 | ;;;*** |
| 6757 | 6757 | ||
| 6758 | ;;;### (autoloads (diff-minor-mode diff-mode) "diff-mode" "diff-mode.el" | 6758 | ;;;### (autoloads (diff-minor-mode diff-mode) "diff-mode" "diff-mode.el" |
| 6759 | ;;;;;; (17907 56729)) | 6759 | ;;;;;; (17942 63381)) |
| 6760 | ;;; Generated autoloads from diff-mode.el | 6760 | ;;; Generated autoloads from diff-mode.el |
| 6761 | 6761 | ||
| 6762 | (autoload (quote diff-mode) "diff-mode" "\ | 6762 | (autoload (quote diff-mode) "diff-mode" "\ |
| 6763 | Major mode for viewing/editing context diffs. | 6763 | Major mode for viewing/editing context diffs. |
| 6764 | Supports unified and context diffs as well as (to a lesser extent) | 6764 | Supports unified and context diffs as well as (to a lesser extent) |
| 6765 | normal diffs. If you edit the buffer manually, diff-mode will try | 6765 | normal diffs. |
| 6766 | to update the hunk headers for you on-the-fly. | ||
| 6767 | 6766 | ||
| 6768 | When the buffer is read-only, the ESC prefix is not necessary. | 6767 | When the buffer is read-only, the ESC prefix is not necessary. |
| 6769 | If you edit the buffer manually, diff-mode will try to update the hunk | 6768 | If you edit the buffer manually, diff-mode will try to update the hunk |
| @@ -6773,9 +6772,6 @@ You can also switch between context diff and unified diff with \\[diff-context-> | |||
| 6773 | or vice versa with \\[diff-unified->context] and you can also reverse the direction of | 6772 | or vice versa with \\[diff-unified->context] and you can also reverse the direction of |
| 6774 | a diff with \\[diff-reverse-direction]. | 6773 | a diff with \\[diff-reverse-direction]. |
| 6775 | 6774 | ||
| 6776 | When the buffer is read-only, the Meta- modifier is not necessary | ||
| 6777 | to run the Diff mode commands: | ||
| 6778 | |||
| 6779 | \\{diff-mode-map} | 6775 | \\{diff-mode-map} |
| 6780 | 6776 | ||
| 6781 | \(fn)" t nil) | 6777 | \(fn)" t nil) |
| @@ -7412,7 +7408,7 @@ true then the type of the file linked to by FILE is printed instead. | |||
| 7412 | ;;;*** | 7408 | ;;;*** |
| 7413 | 7409 | ||
| 7414 | ;;;### (autoloads (dired-do-relsymlink dired-jump) "dired-x" "dired-x.el" | 7410 | ;;;### (autoloads (dired-do-relsymlink dired-jump) "dired-x" "dired-x.el" |
| 7415 | ;;;;;; (17859 33405)) | 7411 | ;;;;;; (17942 63381)) |
| 7416 | ;;; Generated autoloads from dired-x.el | 7412 | ;;; Generated autoloads from dired-x.el |
| 7417 | 7413 | ||
| 7418 | (autoload (quote dired-jump) "dired-x" "\ | 7414 | (autoload (quote dired-jump) "dired-x" "\ |
| @@ -7596,7 +7592,7 @@ for users who call this function in `.emacs'. | |||
| 7596 | ;;;*** | 7592 | ;;;*** |
| 7597 | 7593 | ||
| 7598 | ;;;### (autoloads (dissociated-press) "dissociate" "play/dissociate.el" | 7594 | ;;;### (autoloads (dissociated-press) "dissociate" "play/dissociate.el" |
| 7599 | ;;;;;; (17842 55395)) | 7595 | ;;;;;; (17941 38806)) |
| 7600 | ;;; Generated autoloads from play/dissociate.el | 7596 | ;;; Generated autoloads from play/dissociate.el |
| 7601 | 7597 | ||
| 7602 | (autoload (quote dissociated-press) "dissociate" "\ | 7598 | (autoload (quote dissociated-press) "dissociate" "\ |
| @@ -7612,7 +7608,7 @@ Default is 2. | |||
| 7612 | 7608 | ||
| 7613 | ;;;*** | 7609 | ;;;*** |
| 7614 | 7610 | ||
| 7615 | ;;;### (autoloads (dnd-protocol-alist) "dnd" "dnd.el" (17842 58280)) | 7611 | ;;;### (autoloads (dnd-protocol-alist) "dnd" "dnd.el" (17949 41467)) |
| 7616 | ;;; Generated autoloads from dnd.el | 7612 | ;;; Generated autoloads from dnd.el |
| 7617 | 7613 | ||
| 7618 | (defvar dnd-protocol-alist (quote (("^file:///" . dnd-open-local-file) ("^file://" . dnd-open-file) ("^file:" . dnd-open-local-file) ("^\\(https?\\|ftp\\|file\\|nfs\\)://" . dnd-open-file))) "\ | 7614 | (defvar dnd-protocol-alist (quote (("^file:///" . dnd-open-local-file) ("^file://" . dnd-open-file) ("^file:" . dnd-open-local-file) ("^\\(https?\\|ftp\\|file\\|nfs\\)://" . dnd-open-file))) "\ |
| @@ -7657,7 +7653,7 @@ Locate SOA record and increment the serial field. | |||
| 7657 | 7653 | ||
| 7658 | ;;;*** | 7654 | ;;;*** |
| 7659 | 7655 | ||
| 7660 | ;;;### (autoloads (doctor) "doctor" "play/doctor.el" (17842 55395)) | 7656 | ;;;### (autoloads (doctor) "doctor" "play/doctor.el" (17941 38806)) |
| 7661 | ;;; Generated autoloads from play/doctor.el | 7657 | ;;; Generated autoloads from play/doctor.el |
| 7662 | 7658 | ||
| 7663 | (autoload (quote doctor) "doctor" "\ | 7659 | (autoload (quote doctor) "doctor" "\ |
| @@ -7956,7 +7952,7 @@ To implement dynamic menus, either call this from | |||
| 7956 | ;;;;;; ebnf-eps-directory ebnf-spool-region ebnf-spool-buffer ebnf-spool-file | 7952 | ;;;;;; ebnf-eps-directory ebnf-spool-region ebnf-spool-buffer ebnf-spool-file |
| 7957 | ;;;;;; ebnf-spool-directory ebnf-print-region ebnf-print-buffer | 7953 | ;;;;;; ebnf-spool-directory ebnf-print-region ebnf-print-buffer |
| 7958 | ;;;;;; ebnf-print-file ebnf-print-directory ebnf-customize) "ebnf2ps" | 7954 | ;;;;;; ebnf-print-file ebnf-print-directory ebnf-customize) "ebnf2ps" |
| 7959 | ;;;;;; "progmodes/ebnf2ps.el" (17859 54480)) | 7955 | ;;;;;; "progmodes/ebnf2ps.el" (17952 11093)) |
| 7960 | ;;; Generated autoloads from progmodes/ebnf2ps.el | 7956 | ;;; Generated autoloads from progmodes/ebnf2ps.el |
| 7961 | 7957 | ||
| 7962 | (autoload (quote ebnf-customize) "ebnf2ps" "\ | 7958 | (autoload (quote ebnf-customize) "ebnf2ps" "\ |
| @@ -8413,7 +8409,7 @@ With prefix arg NOCONFIRM, execute current line as-is without editing. | |||
| 8413 | 8409 | ||
| 8414 | ;;;### (autoloads (edebug-all-forms edebug-all-defs edebug-eval-top-level-form | 8410 | ;;;### (autoloads (edebug-all-forms edebug-all-defs edebug-eval-top-level-form |
| 8415 | ;;;;;; edebug-basic-spec edebug-all-forms edebug-all-defs) "edebug" | 8411 | ;;;;;; edebug-basic-spec edebug-all-forms edebug-all-defs) "edebug" |
| 8416 | ;;;;;; "emacs-lisp/edebug.el" (17930 34071)) | 8412 | ;;;;;; "emacs-lisp/edebug.el" (17952 11093)) |
| 8417 | ;;; Generated autoloads from emacs-lisp/edebug.el | 8413 | ;;; Generated autoloads from emacs-lisp/edebug.el |
| 8418 | 8414 | ||
| 8419 | (defvar edebug-all-defs nil "\ | 8415 | (defvar edebug-all-defs nil "\ |
| @@ -10719,7 +10715,7 @@ you can set `feedmail-queue-reminder-alist' to nil. | |||
| 10719 | ;;;*** | 10715 | ;;;*** |
| 10720 | 10716 | ||
| 10721 | ;;;### (autoloads (ffap-bindings dired-at-point ffap-at-mouse ffap-menu | 10717 | ;;;### (autoloads (ffap-bindings dired-at-point ffap-at-mouse ffap-menu |
| 10722 | ;;;;;; find-file-at-point ffap-next) "ffap" "ffap.el" (17829 31540)) | 10718 | ;;;;;; find-file-at-point ffap-next) "ffap" "ffap.el" (17943 4602)) |
| 10723 | ;;; Generated autoloads from ffap.el | 10719 | ;;; Generated autoloads from ffap.el |
| 10724 | 10720 | ||
| 10725 | (autoload (quote ffap-next) "ffap" "\ | 10721 | (autoload (quote ffap-next) "ffap" "\ |
| @@ -11271,7 +11267,7 @@ Turn flymake mode off. | |||
| 11271 | 11267 | ||
| 11272 | ;;;### (autoloads (flyspell-buffer flyspell-region flyspell-mode-off | 11268 | ;;;### (autoloads (flyspell-buffer flyspell-region flyspell-mode-off |
| 11273 | ;;;;;; turn-off-flyspell turn-on-flyspell flyspell-mode flyspell-prog-mode) | 11269 | ;;;;;; turn-off-flyspell turn-on-flyspell flyspell-mode flyspell-prog-mode) |
| 11274 | ;;;;;; "flyspell" "textmodes/flyspell.el" (17927 20254)) | 11270 | ;;;;;; "flyspell" "textmodes/flyspell.el" (17942 63381)) |
| 11275 | ;;; Generated autoloads from textmodes/flyspell.el | 11271 | ;;; Generated autoloads from textmodes/flyspell.el |
| 11276 | 11272 | ||
| 11277 | (autoload (quote flyspell-prog-mode) "flyspell" "\ | 11273 | (autoload (quote flyspell-prog-mode) "flyspell" "\ |
| @@ -11414,8 +11410,8 @@ in your `~/.emacs' file, replacing [f7] by your favourite key: | |||
| 11414 | 11410 | ||
| 11415 | ;;;*** | 11411 | ;;;*** |
| 11416 | 11412 | ||
| 11417 | ;;;### (autoloads (footnote-mode) "footnote" "mail/footnote.el" (17842 | 11413 | ;;;### (autoloads (footnote-mode) "footnote" "mail/footnote.el" (17954 |
| 11418 | ;;;;;; 55035)) | 11414 | ;;;;;; 24686)) |
| 11419 | ;;; Generated autoloads from mail/footnote.el | 11415 | ;;; Generated autoloads from mail/footnote.el |
| 11420 | 11416 | ||
| 11421 | (autoload (quote footnote-mode) "footnote" "\ | 11417 | (autoload (quote footnote-mode) "footnote" "\ |
| @@ -11609,7 +11605,7 @@ and choose the directory as the fortune-file. | |||
| 11609 | ;;;*** | 11605 | ;;;*** |
| 11610 | 11606 | ||
| 11611 | ;;;### (autoloads (gdb-enable-debug gdba) "gdb-ui" "progmodes/gdb-ui.el" | 11607 | ;;;### (autoloads (gdb-enable-debug gdba) "gdb-ui" "progmodes/gdb-ui.el" |
| 11612 | ;;;;;; (17893 61665)) | 11608 | ;;;;;; (17941 38806)) |
| 11613 | ;;; Generated autoloads from progmodes/gdb-ui.el | 11609 | ;;; Generated autoloads from progmodes/gdb-ui.el |
| 11614 | 11610 | ||
| 11615 | (autoload (quote gdba) "gdb-ui" "\ | 11611 | (autoload (quote gdba) "gdb-ui" "\ |
| @@ -12303,7 +12299,7 @@ Update the .newsrc.eld file to reflect the change of nntp server. | |||
| 12303 | ;;;*** | 12299 | ;;;*** |
| 12304 | 12300 | ||
| 12305 | ;;;### (autoloads (gnus-button-reply gnus-button-mailto gnus-msg-mail) | 12301 | ;;;### (autoloads (gnus-button-reply gnus-button-mailto gnus-msg-mail) |
| 12306 | ;;;;;; "gnus-msg" "gnus/gnus-msg.el" (17938 61442)) | 12302 | ;;;;;; "gnus-msg" "gnus/gnus-msg.el" (17949 41467)) |
| 12307 | ;;; Generated autoloads from gnus/gnus-msg.el | 12303 | ;;; Generated autoloads from gnus/gnus-msg.el |
| 12308 | 12304 | ||
| 12309 | (autoload (quote gnus-msg-mail) "gnus-msg" "\ | 12305 | (autoload (quote gnus-msg-mail) "gnus-msg" "\ |
| @@ -12543,7 +12539,7 @@ Add the window configuration CONF to `gnus-buffer-configuration'. | |||
| 12543 | 12539 | ||
| 12544 | ;;;*** | 12540 | ;;;*** |
| 12545 | 12541 | ||
| 12546 | ;;;### (autoloads (gomoku) "gomoku" "play/gomoku.el" (17842 55395)) | 12542 | ;;;### (autoloads (gomoku) "gomoku" "play/gomoku.el" (17941 38806)) |
| 12547 | ;;; Generated autoloads from play/gomoku.el | 12543 | ;;; Generated autoloads from play/gomoku.el |
| 12548 | 12544 | ||
| 12549 | (autoload (quote gomoku) "gomoku" "\ | 12545 | (autoload (quote gomoku) "gomoku" "\ |
| @@ -12600,7 +12596,7 @@ Also fontifies the buffer appropriately (see `goto-address-fontify-p' and | |||
| 12600 | 12596 | ||
| 12601 | ;;;### (autoloads (rgrep lgrep grep-find grep grep-mode grep-compute-defaults | 12597 | ;;;### (autoloads (rgrep lgrep grep-find grep grep-mode grep-compute-defaults |
| 12602 | ;;;;;; grep-process-setup grep-setup-hook grep-find-command grep-command | 12598 | ;;;;;; grep-process-setup grep-setup-hook grep-find-command grep-command |
| 12603 | ;;;;;; grep-window-height) "grep" "progmodes/grep.el" (17908 16392)) | 12599 | ;;;;;; grep-window-height) "grep" "progmodes/grep.el" (17944 20144)) |
| 12604 | ;;; Generated autoloads from progmodes/grep.el | 12600 | ;;; Generated autoloads from progmodes/grep.el |
| 12605 | 12601 | ||
| 12606 | (defvar grep-window-height nil "\ | 12602 | (defvar grep-window-height nil "\ |
| @@ -12643,10 +12639,10 @@ The default find program for `grep-find-command'. | |||
| 12643 | This variable's value takes effect when `grep-compute-defaults' is called.") | 12639 | This variable's value takes effect when `grep-compute-defaults' is called.") |
| 12644 | 12640 | ||
| 12645 | (defvar grep-find-use-xargs nil "\ | 12641 | (defvar grep-find-use-xargs nil "\ |
| 12646 | Whether \\[grep-find] uses the `xargs' utility by default. | 12642 | Non-nil means that `grep-find' uses the `xargs' utility by default. |
| 12647 | 12643 | If `exec', use `find -exec'. | |
| 12648 | If `exec', it uses `find -exec'; if `gnu', it uses `find -print0' and `xargs -0'; | 12644 | If `gnu', use `find -print0' and `xargs -0'. |
| 12649 | if not nil and not `gnu', it uses `find -print' and `xargs'. | 12645 | Any other non-nil value means to use `find -print' and `xargs'. |
| 12650 | 12646 | ||
| 12651 | This variable's value takes effect when `grep-compute-defaults' is called.") | 12647 | This variable's value takes effect when `grep-compute-defaults' is called.") |
| 12652 | 12648 | ||
| @@ -12754,7 +12750,7 @@ the form \"WINDOW-ID PIXMAP-ID\". Value is non-nil if successful. | |||
| 12754 | ;;;*** | 12750 | ;;;*** |
| 12755 | 12751 | ||
| 12756 | ;;;### (autoloads (gdb-script-mode jdb pdb perldb xdb dbx sdb gdb) | 12752 | ;;;### (autoloads (gdb-script-mode jdb pdb perldb xdb dbx sdb gdb) |
| 12757 | ;;;;;; "gud" "progmodes/gud.el" (17938 61442)) | 12753 | ;;;;;; "gud" "progmodes/gud.el" (17950 21759)) |
| 12758 | ;;; Generated autoloads from progmodes/gud.el | 12754 | ;;; Generated autoloads from progmodes/gud.el |
| 12759 | 12755 | ||
| 12760 | (autoload (quote gdb) "gud" "\ | 12756 | (autoload (quote gdb) "gud" "\ |
| @@ -16488,7 +16484,7 @@ Not documented | |||
| 16488 | ;;;*** | 16484 | ;;;*** |
| 16489 | 16485 | ||
| 16490 | ;;;### (autoloads (lm lm-test-run) "landmark" "play/landmark.el" | 16486 | ;;;### (autoloads (lm lm-test-run) "landmark" "play/landmark.el" |
| 16491 | ;;;;;; (17842 55395)) | 16487 | ;;;;;; (17941 38806)) |
| 16492 | ;;; Generated autoloads from play/landmark.el | 16488 | ;;; Generated autoloads from play/landmark.el |
| 16493 | 16489 | ||
| 16494 | (defalias (quote landmark-repeat) (quote lm-test-run)) | 16490 | (defalias (quote landmark-repeat) (quote lm-test-run)) |
| @@ -16711,8 +16707,8 @@ generations (this defaults to 1). | |||
| 16711 | 16707 | ||
| 16712 | ;;;*** | 16708 | ;;;*** |
| 16713 | 16709 | ||
| 16714 | ;;;### (autoloads (unload-feature) "loadhist" "loadhist.el" (17870 | 16710 | ;;;### (autoloads (unload-feature) "loadhist" "loadhist.el" (17942 |
| 16715 | ;;;;;; 63949)) | 16711 | ;;;;;; 63381)) |
| 16716 | ;;; Generated autoloads from loadhist.el | 16712 | ;;; Generated autoloads from loadhist.el |
| 16717 | 16713 | ||
| 16718 | (autoload (quote unload-feature) "loadhist" "\ | 16714 | (autoload (quote unload-feature) "loadhist" "\ |
| @@ -17450,8 +17446,8 @@ yourself the value of `master-of' by calling `master-show-slave'. | |||
| 17450 | 17446 | ||
| 17451 | ;;;*** | 17447 | ;;;*** |
| 17452 | 17448 | ||
| 17453 | ;;;### (autoloads (menu-bar-mode) "menu-bar" "menu-bar.el" (17842 | 17449 | ;;;### (autoloads (menu-bar-mode) "menu-bar" "menu-bar.el" (17942 |
| 17454 | ;;;;;; 58279)) | 17450 | ;;;;;; 63381)) |
| 17455 | ;;; Generated autoloads from menu-bar.el | 17451 | ;;; Generated autoloads from menu-bar.el |
| 17456 | 17452 | ||
| 17457 | (put (quote menu-bar-mode) (quote standard-value) (quote (t))) | 17453 | (put (quote menu-bar-mode) (quote standard-value) (quote (t))) |
| @@ -17486,7 +17482,7 @@ turn on menu bars; otherwise, turn off menu bars. | |||
| 17486 | ;;;;;; message-cite-function message-yank-prefix message-citation-line-function | 17482 | ;;;;;; message-cite-function message-yank-prefix message-citation-line-function |
| 17487 | ;;;;;; message-send-mail-function message-user-organization-file | 17483 | ;;;;;; message-send-mail-function message-user-organization-file |
| 17488 | ;;;;;; message-signature-separator message-from-style) "message" | 17484 | ;;;;;; message-signature-separator message-from-style) "message" |
| 17489 | ;;;;;; "gnus/message.el" (17929 33467)) | 17485 | ;;;;;; "gnus/message.el" (17949 41467)) |
| 17490 | ;;; Generated autoloads from gnus/message.el | 17486 | ;;; Generated autoloads from gnus/message.el |
| 17491 | 17487 | ||
| 17492 | (defvar message-from-style (quote default) "\ | 17488 | (defvar message-from-style (quote default) "\ |
| @@ -19570,7 +19566,7 @@ The file is stored under the name `org-combined-agenda-icalendar-file'. | |||
| 19570 | ;;;*** | 19566 | ;;;*** |
| 19571 | 19567 | ||
| 19572 | ;;;### (autoloads (outline-minor-mode outline-mode) "outline" "outline.el" | 19568 | ;;;### (autoloads (outline-minor-mode outline-mode) "outline" "outline.el" |
| 19573 | ;;;;;; (17881 61722)) | 19569 | ;;;;;; (17952 11093)) |
| 19574 | ;;; Generated autoloads from outline.el | 19570 | ;;; Generated autoloads from outline.el |
| 19575 | (put 'outline-regexp 'safe-local-variable 'string-or-null-p) | 19571 | (put 'outline-regexp 'safe-local-variable 'string-or-null-p) |
| 19576 | 19572 | ||
| @@ -19949,8 +19945,8 @@ Completion for the `chgrp' command. | |||
| 19949 | 19945 | ||
| 19950 | ;;;### (autoloads (pcomplete-shell-setup pcomplete-comint-setup pcomplete-list | 19946 | ;;;### (autoloads (pcomplete-shell-setup pcomplete-comint-setup pcomplete-list |
| 19951 | ;;;;;; pcomplete-help pcomplete-expand pcomplete-continue pcomplete-expand-and-complete | 19947 | ;;;;;; pcomplete-help pcomplete-expand pcomplete-continue pcomplete-expand-and-complete |
| 19952 | ;;;;;; pcomplete-reverse pcomplete) "pcomplete" "pcomplete.el" (17900 | 19948 | ;;;;;; pcomplete-reverse pcomplete) "pcomplete" "pcomplete.el" (17944 |
| 19953 | ;;;;;; 30230)) | 19949 | ;;;;;; 62194)) |
| 19954 | ;;; Generated autoloads from pcomplete.el | 19950 | ;;; Generated autoloads from pcomplete.el |
| 19955 | 19951 | ||
| 19956 | (autoload (quote pcomplete) "pcomplete" "\ | 19952 | (autoload (quote pcomplete) "pcomplete" "\ |
| @@ -20094,7 +20090,7 @@ The exact behavior is determined also by `cvs-dired-use-hook'." (when (stringp d | |||
| 20094 | ;;;*** | 20090 | ;;;*** |
| 20095 | 20091 | ||
| 20096 | ;;;### (autoloads (perl-mode) "perl-mode" "progmodes/perl-mode.el" | 20092 | ;;;### (autoloads (perl-mode) "perl-mode" "progmodes/perl-mode.el" |
| 20097 | ;;;;;; (17842 56332)) | 20093 | ;;;;;; (17955 36604)) |
| 20098 | ;;; Generated autoloads from progmodes/perl-mode.el | 20094 | ;;; Generated autoloads from progmodes/perl-mode.el |
| 20099 | 20095 | ||
| 20100 | (autoload (quote perl-mode) "perl-mode" "\ | 20096 | (autoload (quote perl-mode) "perl-mode" "\ |
| @@ -21451,7 +21447,7 @@ If EXTENSION is any other symbol, it is ignored. | |||
| 21451 | ;;;*** | 21447 | ;;;*** |
| 21452 | 21448 | ||
| 21453 | ;;;### (autoloads (jython-mode python-mode run-python) "python" "progmodes/python.el" | 21449 | ;;;### (autoloads (jython-mode python-mode run-python) "python" "progmodes/python.el" |
| 21454 | ;;;;;; (17930 34071)) | 21450 | ;;;;;; (17956 9518)) |
| 21455 | ;;; Generated autoloads from progmodes/python.el | 21451 | ;;; Generated autoloads from progmodes/python.el |
| 21456 | 21452 | ||
| 21457 | (add-to-list (quote interpreter-mode-alist) (quote ("jython" . jython-mode))) | 21453 | (add-to-list (quote interpreter-mode-alist) (quote ("jython" . jython-mode))) |
| @@ -23470,7 +23466,7 @@ during scrolling. | |||
| 23470 | ;;;;;; mail-alias-file mail-default-reply-to mail-archive-file-name | 23466 | ;;;;;; mail-alias-file mail-default-reply-to mail-archive-file-name |
| 23471 | ;;;;;; mail-header-separator send-mail-function mail-interactive | 23467 | ;;;;;; mail-header-separator send-mail-function mail-interactive |
| 23472 | ;;;;;; mail-self-blind mail-specify-envelope-from mail-from-style) | 23468 | ;;;;;; mail-self-blind mail-specify-envelope-from mail-from-style) |
| 23473 | ;;;;;; "sendmail" "mail/sendmail.el" (17842 55035)) | 23469 | ;;;;;; "sendmail" "mail/sendmail.el" (17942 63381)) |
| 23474 | ;;; Generated autoloads from mail/sendmail.el | 23470 | ;;; Generated autoloads from mail/sendmail.el |
| 23475 | 23471 | ||
| 23476 | (defvar mail-from-style (quote angles) "\ | 23472 | (defvar mail-from-style (quote angles) "\ |
| @@ -23667,16 +23663,16 @@ Like Text Mode but with these additional commands: | |||
| 23667 | \\[mail-send-and-exit] mail-send-and-exit (send the message and exit) | 23663 | \\[mail-send-and-exit] mail-send-and-exit (send the message and exit) |
| 23668 | 23664 | ||
| 23669 | Here are commands that move to a header field (and create it if there isn't): | 23665 | Here are commands that move to a header field (and create it if there isn't): |
| 23670 | \\[mail-to] move to To: \\[mail-subject] move to Subject: | 23666 | \\[mail-to] move to To: \\[mail-subject] move to Subj: |
| 23671 | \\[mail-cc] move to CC: \\[mail-bcc] move to BCC: | 23667 | \\[mail-bcc] move to BCC: \\[mail-cc] move to CC: |
| 23672 | \\[mail-fcc] move to FCC: \\[mail-reply-to] move to Reply-To: | 23668 | \\[mail-fcc] move to FCC: \\[mail-reply-to] move to Reply-To: |
| 23673 | \\[mail-mail-reply-to] move to Mail-Reply-To: | 23669 | \\[mail-mail-reply-to] move to Mail-Reply-To: |
| 23674 | \\[mail-mail-followup-to] move to Mail-Followup-To: | 23670 | \\[mail-mail-followup-to] move to Mail-Followup-To: |
| 23675 | \\[mail-text] mail-text (move to beginning of message text). | 23671 | \\[mail-text] move to message text. |
| 23676 | \\[mail-signature] mail-signature (insert `mail-signature-file' file). | 23672 | \\[mail-signature] mail-signature (insert `mail-signature-file' file). |
| 23677 | \\[mail-yank-original] mail-yank-original (insert current message, in Rmail). | 23673 | \\[mail-yank-original] mail-yank-original (insert current message, in Rmail). |
| 23678 | \\[mail-fill-yanked-message] mail-fill-yanked-message (fill what was yanked). | 23674 | \\[mail-fill-yanked-message] mail-fill-yanked-message (fill what was yanked). |
| 23679 | \\[mail-sent-via] mail-sent-via (add a Sent-via field for each To or CC). | 23675 | \\[mail-sent-via] mail-sent-via (add a sent-via field for each To or CC). |
| 23680 | Turning on Mail mode runs the normal hooks `text-mode-hook' and | 23676 | Turning on Mail mode runs the normal hooks `text-mode-hook' and |
| 23681 | `mail-mode-hook' (in that order). | 23677 | `mail-mode-hook' (in that order). |
| 23682 | 23678 | ||
| @@ -24141,7 +24137,7 @@ Turning on Sieve mode runs `sieve-mode-hook'. | |||
| 24141 | 24137 | ||
| 24142 | ;;;*** | 24138 | ;;;*** |
| 24143 | 24139 | ||
| 24144 | ;;;### (autoloads nil "simple" "simple.el" (17938 22875)) | 24140 | ;;;### (autoloads nil "simple" "simple.el" (17949 41467)) |
| 24145 | ;;; Generated autoloads from simple.el | 24141 | ;;; Generated autoloads from simple.el |
| 24146 | (put 'fill-prefix 'safe-local-variable 'string-or-null-p) | 24142 | (put 'fill-prefix 'safe-local-variable 'string-or-null-p) |
| 24147 | 24143 | ||
| @@ -24344,7 +24340,7 @@ interactively. If there's no argument, do it at the current buffer | |||
| 24344 | ;;;*** | 24340 | ;;;*** |
| 24345 | 24341 | ||
| 24346 | ;;;### (autoloads (smtpmail-send-queued-mail smtpmail-send-it) "smtpmail" | 24342 | ;;;### (autoloads (smtpmail-send-queued-mail smtpmail-send-it) "smtpmail" |
| 24347 | ;;;;;; "mail/smtpmail.el" (17938 24686)) | 24343 | ;;;;;; "mail/smtpmail.el" (17939 50716)) |
| 24348 | ;;; Generated autoloads from mail/smtpmail.el | 24344 | ;;; Generated autoloads from mail/smtpmail.el |
| 24349 | 24345 | ||
| 24350 | (autoload (quote smtpmail-send-it) "smtpmail" "\ | 24346 | (autoload (quote smtpmail-send-it) "smtpmail" "\ |
| @@ -25404,7 +25400,7 @@ Studlify-case the current buffer. | |||
| 25404 | 25400 | ||
| 25405 | ;;;*** | 25401 | ;;;*** |
| 25406 | 25402 | ||
| 25407 | ;;;### (autoloads (locate-library) "subr" "subr.el" (17938 61442)) | 25403 | ;;;### (autoloads (locate-library) "subr" "subr.el" (17949 41467)) |
| 25408 | ;;; Generated autoloads from subr.el | 25404 | ;;; Generated autoloads from subr.el |
| 25409 | 25405 | ||
| 25410 | (autoload (quote locate-library) "subr" "\ | 25406 | (autoload (quote locate-library) "subr" "\ |
| @@ -26215,8 +26211,8 @@ Normally input is edited in Emacs and sent a line at a time. | |||
| 26215 | 26211 | ||
| 26216 | ;;;*** | 26212 | ;;;*** |
| 26217 | 26213 | ||
| 26218 | ;;;### (autoloads (ansi-term term make-term) "term" "term.el" (17922 | 26214 | ;;;### (autoloads (ansi-term term make-term) "term" "term.el" (17952 |
| 26219 | ;;;;;; 37595)) | 26215 | ;;;;;; 11093)) |
| 26220 | ;;; Generated autoloads from term.el | 26216 | ;;; Generated autoloads from term.el |
| 26221 | 26217 | ||
| 26222 | (autoload (quote make-term) "term" "\ | 26218 | (autoload (quote make-term) "term" "\ |
| @@ -26292,7 +26288,7 @@ Start coverage on function under point. | |||
| 26292 | 26288 | ||
| 26293 | ;;;*** | 26289 | ;;;*** |
| 26294 | 26290 | ||
| 26295 | ;;;### (autoloads (tetris) "tetris" "play/tetris.el" (17897 26294)) | 26291 | ;;;### (autoloads (tetris) "tetris" "play/tetris.el" (17941 38806)) |
| 26296 | ;;; Generated autoloads from play/tetris.el | 26292 | ;;; Generated autoloads from play/tetris.el |
| 26297 | 26293 | ||
| 26298 | (autoload (quote tetris) "tetris" "\ | 26294 | (autoload (quote tetris) "tetris" "\ |
| @@ -27396,7 +27392,7 @@ PATTERN regexp. | |||
| 27396 | ;;;*** | 27392 | ;;;*** |
| 27397 | 27393 | ||
| 27398 | ;;;### (autoloads (tmm-prompt tmm-menubar-mouse tmm-menubar) "tmm" | 27394 | ;;;### (autoloads (tmm-prompt tmm-menubar-mouse tmm-menubar) "tmm" |
| 27399 | ;;;;;; "tmm.el" (17938 22875)) | 27395 | ;;;;;; "tmm.el" (17952 58711)) |
| 27400 | ;;; Generated autoloads from tmm.el | 27396 | ;;; Generated autoloads from tmm.el |
| 27401 | (define-key global-map "\M-`" 'tmm-menubar) | 27397 | (define-key global-map "\M-`" 'tmm-menubar) |
| 27402 | (define-key global-map [f10] 'tmm-menubar) | 27398 | (define-key global-map [f10] 'tmm-menubar) |
| @@ -28469,7 +28465,7 @@ Not documented | |||
| 28469 | ;;;*** | 28465 | ;;;*** |
| 28470 | 28466 | ||
| 28471 | ;;;### (autoloads (url-http-options url-http-file-attributes url-http-file-exists-p | 28467 | ;;;### (autoloads (url-http-options url-http-file-attributes url-http-file-exists-p |
| 28472 | ;;;;;; url-http) "url-http" "url/url-http.el" (17935 53395)) | 28468 | ;;;;;; url-http) "url-http" "url/url-http.el" (17952 11683)) |
| 28473 | ;;; Generated autoloads from url/url-http.el | 28469 | ;;; Generated autoloads from url/url-http.el |
| 28474 | 28470 | ||
| 28475 | (autoload (quote url-http) "url-http" "\ | 28471 | (autoload (quote url-http) "url-http" "\ |
| @@ -28665,7 +28661,7 @@ Not documented | |||
| 28665 | ;;;*** | 28661 | ;;;*** |
| 28666 | 28662 | ||
| 28667 | ;;;### (autoloads (url-generic-parse-url url-recreate-url) "url-parse" | 28663 | ;;;### (autoloads (url-generic-parse-url url-recreate-url) "url-parse" |
| 28668 | ;;;;;; "url/url-parse.el" (17842 56569)) | 28664 | ;;;;;; "url/url-parse.el" (17954 22157)) |
| 28669 | ;;; Generated autoloads from url/url-parse.el | 28665 | ;;; Generated autoloads from url/url-parse.el |
| 28670 | 28666 | ||
| 28671 | (autoload (quote url-recreate-url) "url-parse" "\ | 28667 | (autoload (quote url-recreate-url) "url-parse" "\ |
| @@ -30415,8 +30411,8 @@ With arg, turn widget mode on if and only if arg is positive. | |||
| 30415 | ;;;*** | 30411 | ;;;*** |
| 30416 | 30412 | ||
| 30417 | ;;;### (autoloads (widget-setup widget-insert widget-delete widget-create | 30413 | ;;;### (autoloads (widget-setup widget-insert widget-delete widget-create |
| 30418 | ;;;;;; widget-prompt-value widgetp) "wid-edit" "wid-edit.el" (17884 | 30414 | ;;;;;; widget-prompt-value widgetp) "wid-edit" "wid-edit.el" (17952 |
| 30419 | ;;;;;; 58614)) | 30415 | ;;;;;; 11093)) |
| 30420 | ;;; Generated autoloads from wid-edit.el | 30416 | ;;; Generated autoloads from wid-edit.el |
| 30421 | 30417 | ||
| 30422 | (autoload (quote widgetp) "wid-edit" "\ | 30418 | (autoload (quote widgetp) "wid-edit" "\ |
| @@ -30533,7 +30529,7 @@ With arg, turn Winner mode on if and only if arg is positive. | |||
| 30533 | ;;;*** | 30529 | ;;;*** |
| 30534 | 30530 | ||
| 30535 | ;;;### (autoloads (woman-find-file woman-dired-find-file woman) "woman" | 30531 | ;;;### (autoloads (woman-find-file woman-dired-find-file woman) "woman" |
| 30536 | ;;;;;; "woman.el" (17934 34122)) | 30532 | ;;;;;; "woman.el" (17949 41467)) |
| 30537 | ;;; Generated autoloads from woman.el | 30533 | ;;; Generated autoloads from woman.el |
| 30538 | 30534 | ||
| 30539 | (autoload (quote woman) "woman" "\ | 30535 | (autoload (quote woman) "woman" "\ |
| @@ -30778,7 +30774,7 @@ Zippy goes to the analyst. | |||
| 30778 | 30774 | ||
| 30779 | ;;;*** | 30775 | ;;;*** |
| 30780 | 30776 | ||
| 30781 | ;;;### (autoloads (zone) "zone" "play/zone.el" (17842 55395)) | 30777 | ;;;### (autoloads (zone) "zone" "play/zone.el" (17941 38806)) |
| 30782 | ;;; Generated autoloads from play/zone.el | 30778 | ;;; Generated autoloads from play/zone.el |
| 30783 | 30779 | ||
| 30784 | (autoload (quote zone) "zone" "\ | 30780 | (autoload (quote zone) "zone" "\ |
| @@ -30918,7 +30914,7 @@ Zone out, completely. | |||
| 30918 | ;;;;;; "url/url-vars.el" "url/vc-dav.el" "vc-hooks.el" "vcursor.el" | 30914 | ;;;;;; "url/url-vars.el" "url/vc-dav.el" "vc-hooks.el" "vcursor.el" |
| 30919 | ;;;;;; "version.el" "vms-patch.el" "vmsproc.el" "vt-control.el" | 30915 | ;;;;;; "version.el" "vms-patch.el" "vmsproc.el" "vt-control.el" |
| 30920 | ;;;;;; "vt100-led.el" "w32-fns.el" "w32-vars.el" "widget.el" "window.el" | 30916 | ;;;;;; "vt100-led.el" "w32-fns.el" "w32-vars.el" "widget.el" "window.el" |
| 30921 | ;;;;;; "x-dnd.el") (17938 62045 277063)) | 30917 | ;;;;;; "x-dnd.el") (17956 9728 35408)) |
| 30922 | 30918 | ||
| 30923 | ;;;*** | 30919 | ;;;*** |
| 30924 | 30920 | ||
diff --git a/lisp/locate.el b/lisp/locate.el index e8dafa79048..74a76fa4889 100644 --- a/lisp/locate.el +++ b/lisp/locate.el | |||
| @@ -114,8 +114,10 @@ | |||
| 114 | 114 | ||
| 115 | ;; Variables | 115 | ;; Variables |
| 116 | 116 | ||
| 117 | (defvar locate-current-search nil) | ||
| 118 | (defvar locate-current-filter nil) | 117 | (defvar locate-current-filter nil) |
| 118 | (defvar locate-local-filter nil) | ||
| 119 | (defvar locate-local-search nil) | ||
| 120 | (defvar locate-local-prompt nil) | ||
| 119 | 121 | ||
| 120 | (defgroup locate nil | 122 | (defgroup locate nil |
| 121 | "Interface to the locate command." | 123 | "Interface to the locate command." |
| @@ -220,7 +222,10 @@ option to \"/\"." | |||
| 220 | 222 | ||
| 221 | (defcustom locate-prompt-for-command nil | 223 | (defcustom locate-prompt-for-command nil |
| 222 | "If non-nil, the `locate' command prompts for a command to run. | 224 | "If non-nil, the `locate' command prompts for a command to run. |
| 223 | Otherwise, that behavior is invoked via a prefix argument." | 225 | Otherwise, that behavior is invoked via a prefix argument. |
| 226 | |||
| 227 | Setting this option non-nil actually inverts the meaning of a prefix arg; | ||
| 228 | that is, with a prefix arg, you get the default behavior." | ||
| 224 | :group 'locate | 229 | :group 'locate |
| 225 | :type 'boolean) | 230 | :type 'boolean) |
| 226 | 231 | ||
| @@ -240,8 +245,32 @@ Otherwise, that behavior is invoked via a prefix argument." | |||
| 240 | (skip-chars-backward "." pt) | 245 | (skip-chars-backward "." pt) |
| 241 | (point))))) | 246 | (point))))) |
| 242 | 247 | ||
| 248 | ;; Function for use in interactive declarations. | ||
| 249 | (defun locate-prompt-for-search-string () | ||
| 250 | (if (or (and current-prefix-arg | ||
| 251 | (not locate-prompt-for-command)) | ||
| 252 | (and (not current-prefix-arg) locate-prompt-for-command)) | ||
| 253 | (let ((locate-cmd (funcall locate-make-command-line ""))) | ||
| 254 | (read-from-minibuffer | ||
| 255 | "Run locate (like this): " | ||
| 256 | (cons | ||
| 257 | (concat (car locate-cmd) " " | ||
| 258 | (mapconcat 'identity (cdr locate-cmd) " ")) | ||
| 259 | (+ 2 (length (car locate-cmd)))) | ||
| 260 | nil nil 'locate-history-list)) | ||
| 261 | (let* ((default (locate-word-at-point)) | ||
| 262 | (input | ||
| 263 | (read-from-minibuffer | ||
| 264 | (if (> (length default) 0) | ||
| 265 | (format "Locate (default %s): " default) | ||
| 266 | (format "Locate: ")) | ||
| 267 | nil nil nil 'locate-history-list default t))) | ||
| 268 | (and (equal input "") default | ||
| 269 | (setq input default)) | ||
| 270 | input))) | ||
| 271 | |||
| 243 | ;;;###autoload | 272 | ;;;###autoload |
| 244 | (defun locate (search-string &optional filter) | 273 | (defun locate (search-string &optional filter arg) |
| 245 | "Run the program `locate', putting results in `*Locate*' buffer. | 274 | "Run the program `locate', putting results in `*Locate*' buffer. |
| 246 | Pass it SEARCH-STRING as argument. Interactively, prompt for SEARCH-STRING. | 275 | Pass it SEARCH-STRING as argument. Interactively, prompt for SEARCH-STRING. |
| 247 | With prefix arg, prompt for the exact shell command to run instead. | 276 | 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 | |||
| 258 | the variables `locate-command' or `locate-make-command-line'. | 287 | the variables `locate-command' or `locate-make-command-line'. |
| 259 | 288 | ||
| 260 | The main use of FILTER is to implement `locate-with-filter'. See | 289 | The main use of FILTER is to implement `locate-with-filter'. See |
| 261 | the docstring of that function for its meaning." | 290 | the docstring of that function for its meaning. |
| 291 | |||
| 292 | ARG is the interactive prefix arg." | ||
| 262 | (interactive | 293 | (interactive |
| 263 | (list | 294 | (list |
| 264 | (if (or (and current-prefix-arg | 295 | (locate-prompt-for-search-string) |
| 265 | (not locate-prompt-for-command)) | 296 | nil |
| 266 | (and (not current-prefix-arg) locate-prompt-for-command)) | 297 | current-prefix-arg)) |
| 267 | (let ((locate-cmd (funcall locate-make-command-line ""))) | 298 | |
| 268 | (read-from-minibuffer | ||
| 269 | "Run locate (like this): " | ||
| 270 | (cons | ||
| 271 | (concat (car locate-cmd) " " | ||
| 272 | (mapconcat 'identity (cdr locate-cmd) " ")) | ||
| 273 | (+ 2 (length (car locate-cmd)))) | ||
| 274 | nil nil 'locate-history-list)) | ||
| 275 | (let* ((default (locate-word-at-point)) | ||
| 276 | (input | ||
| 277 | (read-from-minibuffer | ||
| 278 | (if (> (length default) 0) | ||
| 279 | (format "Locate (default %s): " default) | ||
| 280 | (format "Locate: ")) | ||
| 281 | nil nil nil 'locate-history-list default t))) | ||
| 282 | (and (equal input "") default | ||
| 283 | (setq input default)) | ||
| 284 | input)))) | ||
| 285 | (if (equal search-string "") | 299 | (if (equal search-string "") |
| 286 | (error "Please specify a filename to search for")) | 300 | (error "Please specify a filename to search for")) |
| 287 | (let* ((locate-cmd-list (funcall locate-make-command-line search-string)) | 301 | (let* ((locate-cmd-list (funcall locate-make-command-line search-string)) |
| 288 | (locate-cmd (car locate-cmd-list)) | 302 | (locate-cmd (car locate-cmd-list)) |
| 289 | (locate-cmd-args (cdr locate-cmd-list)) | 303 | (locate-cmd-args (cdr locate-cmd-list)) |
| 290 | (run-locate-command | 304 | (run-locate-command |
| 291 | (or (and current-prefix-arg (not locate-prompt-for-command)) | 305 | (or (and arg (not locate-prompt-for-command)) |
| 292 | (and (not current-prefix-arg) locate-prompt-for-command))) | 306 | (and (not arg) locate-prompt-for-command))) |
| 293 | locate-buffer | ||
| 294 | ) | 307 | ) |
| 295 | 308 | ||
| 296 | ;; Find the Locate buffer | 309 | ;; Find the Locate buffer |
| 297 | (setq locate-buffer (if (eq major-mode 'locate-mode) | 310 | (save-window-excursion |
| 298 | (current-buffer) | 311 | (set-buffer (get-buffer-create locate-buffer-name)) |
| 299 | (get-buffer-create locate-buffer-name))) | ||
| 300 | |||
| 301 | (save-excursion | ||
| 302 | (set-buffer locate-buffer) | ||
| 303 | (locate-mode) | 312 | (locate-mode) |
| 304 | |||
| 305 | (let ((inhibit-read-only t) | 313 | (let ((inhibit-read-only t) |
| 306 | (buffer-undo-list t)) | 314 | (buffer-undo-list t)) |
| 307 | (erase-buffer) | 315 | (erase-buffer) |
| 308 | 316 | ||
| 309 | (set (make-local-variable 'locate-current-search) search-string) | 317 | (setq locate-current-filter filter) |
| 310 | (set (make-local-variable 'locate-current-filter) filter) | 318 | (set (make-local-variable 'locate-local-search) search-string) |
| 319 | (set (make-local-variable 'locate-local-filter) filter) | ||
| 320 | (set (make-local-variable 'locate-local-prompt) run-locate-command) | ||
| 311 | 321 | ||
| 312 | (if run-locate-command | 322 | (if run-locate-command |
| 313 | (shell-command search-string) | 323 | (shell-command search-string locate-buffer-name) |
| 314 | (apply 'call-process locate-cmd nil t nil locate-cmd-args)) | 324 | (apply 'call-process locate-cmd nil t nil locate-cmd-args)) |
| 315 | 325 | ||
| 316 | (and filter | 326 | (and filter |
| 317 | (locate-filter-output filter)) | 327 | (locate-filter-output filter)) |
| 318 | 328 | ||
| 319 | (locate-do-setup search-string))) | 329 | (locate-do-setup search-string) |
| 320 | 330 | )) | |
| 321 | (unless (eq (current-buffer) locate-buffer) | 331 | (and (not (string-equal (buffer-name) locate-buffer-name)) |
| 322 | (switch-to-buffer-other-window locate-buffer)) | 332 | (switch-to-buffer-other-window locate-buffer-name)) |
| 323 | 333 | ||
| 324 | (run-hooks 'dired-mode-hook) | 334 | (run-hooks 'dired-mode-hook) |
| 325 | (dired-next-line 3) ;move to first matching file. | 335 | (dired-next-line 3) ;move to first matching file. |
| @@ -328,7 +338,7 @@ the docstring of that function for its meaning." | |||
| 328 | ) | 338 | ) |
| 329 | 339 | ||
| 330 | ;;;###autoload | 340 | ;;;###autoload |
| 331 | (defun locate-with-filter (search-string filter) | 341 | (defun locate-with-filter (search-string filter &optional arg) |
| 332 | "Run the executable program `locate' with a filter. | 342 | "Run the executable program `locate' with a filter. |
| 333 | This function is similar to the function `locate', which see. | 343 | This function is similar to the function `locate', which see. |
| 334 | The difference is that, when invoked interactively, the present function | 344 | 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 | |||
| 338 | contain a match for the regular expression FILTER; this is often useful | 348 | contain a match for the regular expression FILTER; this is often useful |
| 339 | to constrain a big search. | 349 | to constrain a big search. |
| 340 | 350 | ||
| 351 | ARG is the interactive prefix arg, which has the same effect as in `locate'. | ||
| 352 | |||
| 341 | When called from Lisp, this function is identical with `locate', | 353 | When called from Lisp, this function is identical with `locate', |
| 342 | except that FILTER is not optional." | 354 | except that FILTER is not optional." |
| 343 | (interactive | 355 | (interactive |
| 344 | (list (read-from-minibuffer "Locate: " nil nil | 356 | (list |
| 345 | nil 'locate-history-list) | 357 | (locate-prompt-for-search-string) |
| 346 | (read-from-minibuffer "Filter: " nil nil | 358 | (read-from-minibuffer "Filter: " nil nil |
| 347 | nil 'locate-grep-history-list))) | 359 | nil 'locate-grep-history-list) |
| 348 | (locate search-string filter)) | 360 | current-prefix-arg)) |
| 361 | (locate search-string filter arg)) | ||
| 349 | 362 | ||
| 350 | (defun locate-filter-output (filter) | 363 | (defun locate-filter-output (filter) |
| 351 | "Filter output from the locate command." | 364 | "Filter output from the locate command." |
| @@ -469,7 +482,6 @@ do not work in subdirectories. | |||
| 469 | default-directory "/" | 482 | default-directory "/" |
| 470 | buffer-read-only t | 483 | buffer-read-only t |
| 471 | selective-display t) | 484 | selective-display t) |
| 472 | (buffer-disable-undo) | ||
| 473 | (dired-alist-add-1 default-directory (point-min-marker)) | 485 | (dired-alist-add-1 default-directory (point-min-marker)) |
| 474 | (set (make-local-variable 'dired-directory) "/") | 486 | (set (make-local-variable 'dired-directory) "/") |
| 475 | (set (make-local-variable 'dired-subdir-switches) locate-ls-subdir-switches) | 487 | (set (make-local-variable 'dired-subdir-switches) locate-ls-subdir-switches) |
| @@ -501,12 +513,11 @@ do not work in subdirectories. | |||
| 501 | ;; Nothing returned from locate command? | 513 | ;; Nothing returned from locate command? |
| 502 | (and (eobp) | 514 | (and (eobp) |
| 503 | (progn | 515 | (progn |
| 504 | (let ((filter locate-current-filter)) ; local | 516 | (kill-buffer locate-buffer-name) |
| 505 | (kill-buffer (current-buffer)) | 517 | (if locate-current-filter |
| 506 | (if filter | 518 | (error "Locate: no match for %s in database using filter %s" |
| 507 | (error "Locate: no match for %s in database using filter %s" | 519 | search-string locate-current-filter) |
| 508 | search-string filter) | 520 | (error "Locate: no match for %s in database" search-string)))) |
| 509 | (error "Locate: no match for %s in database" search-string))))) | ||
| 510 | 521 | ||
| 511 | (locate-insert-header search-string) | 522 | (locate-insert-header search-string) |
| 512 | 523 | ||
| @@ -590,14 +601,16 @@ do not work in subdirectories. | |||
| 590 | "Revert the *Locate* buffer. | 601 | "Revert the *Locate* buffer. |
| 591 | If `locate-update-when-revert' is non-nil, offer to update the | 602 | If `locate-update-when-revert' is non-nil, offer to update the |
| 592 | locate database using the shell command in `locate-update-command'." | 603 | locate database using the shell command in `locate-update-command'." |
| 593 | (and locate-update-when-revert | 604 | (let ((locate-buffer-name (buffer-name)) |
| 594 | (yes-or-no-p "Update locate database (may take a few seconds)? ") | 605 | (locate-prompt-for-command locate-local-prompt)) |
| 595 | ;; `expand-file-name' is used in order to autoload Tramp if | 606 | (and locate-update-when-revert |
| 596 | ;; necessary. It cannot be loaded when `default-directory' | 607 | (yes-or-no-p "Update locate database (may take a few seconds)? ") |
| 597 | ;; is remote. | 608 | ;; `expand-file-name' is used in order to autoload Tramp if |
| 598 | (let ((default-directory (expand-file-name locate-update-path))) | 609 | ;; necessary. It cannot be loaded when `default-directory' |
| 599 | (shell-command locate-update-command))) | 610 | ;; is remote. |
| 600 | (locate locate-current-search locate-current-filter)) | 611 | (let ((default-directory (expand-file-name locate-update-path))) |
| 612 | (shell-command locate-update-command))) | ||
| 613 | (locate locate-local-search locate-local-filter))) | ||
| 601 | 614 | ||
| 602 | ;;; Modified three functions from `dired.el': | 615 | ;;; Modified three functions from `dired.el': |
| 603 | ;;; dired-find-directory, | 616 | ;;; dired-find-directory, |
diff --git a/lisp/mail/footnote.el b/lisp/mail/footnote.el index 2dd2e7af175..7992438df25 100644 --- a/lisp/mail/footnote.el +++ b/lisp/mail/footnote.el | |||
| @@ -267,14 +267,17 @@ Wrapping around the alphabet implies successive repetitions of letters." | |||
| 267 | 267 | ||
| 268 | ;; Latin-1 | 268 | ;; Latin-1 |
| 269 | 269 | ||
| 270 | (defconst footnote-latin-regexp "¹²³ºª§¶" | 270 | (defconst footnote-latin-string "¹²³ºª§¶" |
| 271 | "String of Latin-1 footnoting characters.") | ||
| 272 | |||
| 273 | (defconst footnote-latin-regexp (concat "[" footnote-latin-string "]") | ||
| 271 | "Regexp for Latin-1 footnoting characters.") | 274 | "Regexp for Latin-1 footnoting characters.") |
| 272 | 275 | ||
| 273 | (defun Footnote-latin (n) | 276 | (defun Footnote-latin (n) |
| 274 | "Latin-1 footnote style. | 277 | "Latin-1 footnote style. |
| 275 | Use a range of Latin-1 non-ASCII characters for footnoting." | 278 | Use a range of Latin-1 non-ASCII characters for footnoting." |
| 276 | (string (aref footnote-latin-regexp | 279 | (string (aref footnote-latin-string |
| 277 | (mod (1- n) (length footnote-latin-regexp))))) | 280 | (mod (1- n) (length footnote-latin-string))))) |
| 278 | 281 | ||
| 279 | ;;; list of all footnote styles | 282 | ;;; list of all footnote styles |
| 280 | (defvar footnote-style-alist | 283 | (defvar footnote-style-alist |
| @@ -291,14 +294,18 @@ See footnote-han.el, footnote-greek.el and footnote-hebrew.el for more | |||
| 291 | exciting styles.") | 294 | exciting styles.") |
| 292 | 295 | ||
| 293 | (defcustom footnote-style 'numeric | 296 | (defcustom footnote-style 'numeric |
| 294 | "*Style used for footnoting. | 297 | "*Default style used for footnoting. |
| 295 | numeric == 1, 2, 3, ... | 298 | numeric == 1, 2, 3, ... |
| 296 | english-lower == a, b, c, ... | 299 | english-lower == a, b, c, ... |
| 297 | english-upper == A, B, C, ... | 300 | english-upper == A, B, C, ... |
| 298 | roman-lower == i, ii, iii, iv, v, ... | 301 | roman-lower == i, ii, iii, iv, v, ... |
| 299 | roman-upper == I, II, III, IV, V, ... | 302 | roman-upper == I, II, III, IV, V, ... |
| 300 | latin == ¹ ² ³ º ª § ¶ | 303 | latin == ¹ ² ³ º ª § ¶ |
| 301 | See also variables `footnote-start-tag' and `footnote-end-tag'." | 304 | See also variables `footnote-start-tag' and `footnote-end-tag'. |
| 305 | |||
| 306 | Customizing this variable has no effect on buffers already | ||
| 307 | displaying footnotes. You can change the style of existing | ||
| 308 | buffers using the command `Footnote-set-style'." | ||
| 302 | :type (cons 'choice (mapcar (lambda (x) (list 'const (car x))) | 309 | :type (cons 'choice (mapcar (lambda (x) (list 'const (car x))) |
| 303 | footnote-style-alist)) | 310 | footnote-style-alist)) |
| 304 | :group 'footnote) | 311 | :group 'footnote) |
| @@ -654,7 +661,7 @@ delete the footnote with that number." | |||
| 654 | (while (< i notes) | 661 | (while (< i notes) |
| 655 | (setq alist-ptr (nth i footnote-pointer-marker-alist)) | 662 | (setq alist-ptr (nth i footnote-pointer-marker-alist)) |
| 656 | (setq alist-txt (nth i footnote-text-marker-alist)) | 663 | (setq alist-txt (nth i footnote-text-marker-alist)) |
| 657 | (unless (eq (1+ i) (car alist-ptr)) | 664 | (unless (= (1+ i) (car alist-ptr)) |
| 658 | (Footnote-renumber (car alist-ptr) (1+ i) alist-ptr alist-txt)) | 665 | (Footnote-renumber (car alist-ptr) (1+ i) alist-ptr alist-txt)) |
| 659 | (setq i (1+ i)))))) | 666 | (setq i (1+ i)))))) |
| 660 | 667 | ||
diff --git a/lisp/outline.el b/lisp/outline.el index 579997754f2..d0c121a12c4 100644 --- a/lisp/outline.el +++ b/lisp/outline.el | |||
| @@ -1000,7 +1000,8 @@ Stop at the first and last subheadings of a superior heading." | |||
| 1000 | (error "No following same-level heading")))))) | 1000 | (error "No following same-level heading")))))) |
| 1001 | 1001 | ||
| 1002 | (defun outline-get-next-sibling () | 1002 | (defun outline-get-next-sibling () |
| 1003 | "Move to next heading of the same level, and return point or nil if none." | 1003 | "Move to next heading of the same level, and return point. |
| 1004 | If there is no such heading, return nil." | ||
| 1004 | (let ((level (funcall outline-level))) | 1005 | (let ((level (funcall outline-level))) |
| 1005 | (outline-next-visible-heading 1) | 1006 | (outline-next-visible-heading 1) |
| 1006 | (while (and (not (eobp)) (> (funcall outline-level) level)) | 1007 | (while (and (not (eobp)) (> (funcall outline-level) level)) |
| @@ -1026,15 +1027,18 @@ Stop at the first and last subheadings of a superior heading." | |||
| 1026 | (error "No previous same-level heading")))))) | 1027 | (error "No previous same-level heading")))))) |
| 1027 | 1028 | ||
| 1028 | (defun outline-get-last-sibling () | 1029 | (defun outline-get-last-sibling () |
| 1029 | "Move to previous heading of the same level, and return point or nil if none." | 1030 | "Move to previous heading of the same level, and return point. |
| 1030 | (let ((level (funcall outline-level))) | 1031 | If there is no such heading, return nil." |
| 1032 | (let ((opoint (point)) | ||
| 1033 | (level (funcall outline-level))) | ||
| 1031 | (outline-previous-visible-heading 1) | 1034 | (outline-previous-visible-heading 1) |
| 1032 | (while (and (> (funcall outline-level) level) | 1035 | (when (and (/= (point) opoint) (outline-on-heading-p)) |
| 1033 | (not (bobp))) | 1036 | (while (and (> (funcall outline-level) level) |
| 1034 | (outline-previous-visible-heading 1)) | 1037 | (not (bobp))) |
| 1035 | (if (< (funcall outline-level) level) | 1038 | (outline-previous-visible-heading 1)) |
| 1036 | nil | 1039 | (if (< (funcall outline-level) level) |
| 1037 | (point)))) | 1040 | nil |
| 1041 | (point))))) | ||
| 1038 | 1042 | ||
| 1039 | (defun outline-headers-as-kill (beg end) | 1043 | (defun outline-headers-as-kill (beg end) |
| 1040 | "Save the visible outline headers in region at the start of the kill ring. | 1044 | "Save the visible outline headers in region at the start of the kill ring. |
diff --git a/lisp/paren.el b/lisp/paren.el index 95f718d5683..38ac150b402 100644 --- a/lisp/paren.el +++ b/lisp/paren.el | |||
| @@ -143,6 +143,7 @@ in `show-paren-style' after `show-paren-delay' seconds of Emacs idle time." | |||
| 143 | (let ((oldpos (point)) | 143 | (let ((oldpos (point)) |
| 144 | (dir (cond ((eq (syntax-class (syntax-after (1- (point)))) 5) -1) | 144 | (dir (cond ((eq (syntax-class (syntax-after (1- (point)))) 5) -1) |
| 145 | ((eq (syntax-class (syntax-after (point))) 4) 1))) | 145 | ((eq (syntax-class (syntax-after (point))) 4) 1))) |
| 146 | (window-start (window-start)) | ||
| 146 | pos mismatch face) | 147 | pos mismatch face) |
| 147 | ;; | 148 | ;; |
| 148 | ;; Find the other end of the sexp. | 149 | ;; Find the other end of the sexp. |
| @@ -247,7 +248,13 @@ in `show-paren-style' after `show-paren-delay' seconds of Emacs idle time." | |||
| 247 | ;; | 248 | ;; |
| 248 | ;; Always set the overlay face, since it varies. | 249 | ;; Always set the overlay face, since it varies. |
| 249 | (overlay-put show-paren-overlay 'priority show-paren-priority) | 250 | (overlay-put show-paren-overlay 'priority show-paren-priority) |
| 250 | (overlay-put show-paren-overlay 'face face))) | 251 | (overlay-put show-paren-overlay 'face face)) |
| 252 | ;; If there are continued lines, the above operations can | ||
| 253 | ;; force redisplay to recenter the window (since there is no | ||
| 254 | ;; way for it to know that the overlay changes to the buffer | ||
| 255 | ;; are harmless). So reset the window-start. | ||
| 256 | (unless (window-minibuffer-p) | ||
| 257 | (set-window-start (selected-window) window-start))) | ||
| 251 | ;; show-paren-mode is nil in this buffer. | 258 | ;; show-paren-mode is nil in this buffer. |
| 252 | (and show-paren-overlay | 259 | (and show-paren-overlay |
| 253 | (delete-overlay show-paren-overlay)) | 260 | (delete-overlay show-paren-overlay)) |
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 79043c87b63..079ebb02622 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el | |||
| @@ -856,8 +856,8 @@ is inhibited." | |||
| 856 | (narrow-to-region (point-min) (point)) | 856 | (narrow-to-region (point-min) (point)) |
| 857 | (back-to-indentation) | 857 | (back-to-indentation) |
| 858 | (looking-at (concat c-current-comment-prefix "[ \t]*$"))))) | 858 | (looking-at (concat c-current-comment-prefix "[ \t]*$"))))) |
| 859 | (kill-region (progn (forward-line 0) (point)) | 859 | (delete-region (progn (forward-line 0) (point)) |
| 860 | (progn (end-of-line) (point))) | 860 | (progn (end-of-line) (point))) |
| 861 | (insert-char ?* 1)) ; the / comes later. ; Do I need a t (retain sticky properties) here? | 861 | (insert-char ?* 1)) ; the / comes later. ; Do I need a t (retain sticky properties) here? |
| 862 | 862 | ||
| 863 | (setq indentp (and (not arg) | 863 | (setq indentp (and (not arg) |
| @@ -1360,10 +1360,24 @@ No indentation or other \"electric\" behavior is performed." | |||
| 1360 | (and c-opt-block-decls-with-vars-key | 1360 | (and c-opt-block-decls-with-vars-key |
| 1361 | (save-excursion | 1361 | (save-excursion |
| 1362 | (c-syntactic-skip-backward "^;}" lim) | 1362 | (c-syntactic-skip-backward "^;}" lim) |
| 1363 | (and (eq (char-before) ?\}) | 1363 | (let ((eo-block (point)) |
| 1364 | (eq (car (c-beginning-of-decl-1 lim)) 'previous) | 1364 | bod) |
| 1365 | (looking-at c-opt-block-decls-with-vars-key) | 1365 | (and (eq (char-before) ?\}) |
| 1366 | (point))))) | 1366 | (eq (car (c-beginning-of-decl-1 lim)) 'previous) |
| 1367 | (setq bod (point)) | ||
| 1368 | ;; Look for struct or union or ... If we find one, it might | ||
| 1369 | ;; be the return type of a function, or the like. Exclude | ||
| 1370 | ;; this case. | ||
| 1371 | (c-syntactic-re-search-forward | ||
| 1372 | (concat "[;=\(\[{]\\|\\(" | ||
| 1373 | c-opt-block-decls-with-vars-key | ||
| 1374 | "\\)") | ||
| 1375 | eo-block t t t) | ||
| 1376 | (match-beginning 1) ; Is there a "struct" etc., somewhere? | ||
| 1377 | (not (eq (char-before) ?_)) | ||
| 1378 | (c-syntactic-re-search-forward "[;=\(\[{]" eo-block t t t) | ||
| 1379 | (eq (char-before) ?\{) | ||
| 1380 | bod))))) | ||
| 1367 | 1381 | ||
| 1368 | (defun c-where-wrt-brace-construct () | 1382 | (defun c-where-wrt-brace-construct () |
| 1369 | ;; Determine where we are with respect to functions (or other brace | 1383 | ;; Determine where we are with respect to functions (or other brace |
| @@ -1531,7 +1545,7 @@ defun." | |||
| 1531 | (setq arg (c-forward-to-nth-EOF-} (- arg) where))) | 1545 | (setq arg (c-forward-to-nth-EOF-} (- arg) where))) |
| 1532 | ;; Move forward to the next opening brace.... | 1546 | ;; Move forward to the next opening brace.... |
| 1533 | (when (and (= arg 0) | 1547 | (when (and (= arg 0) |
| 1534 | (c-syntactic-re-search-forward "{" nil t)) | 1548 | (c-syntactic-re-search-forward "{" nil 'eob)) |
| 1535 | (backward-char) | 1549 | (backward-char) |
| 1536 | ;; ... and backward to the function header. | 1550 | ;; ... and backward to the function header. |
| 1537 | (c-beginning-of-decl-1) | 1551 | (c-beginning-of-decl-1) |
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index f5da0eecc2e..c3c17a6f3c5 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el | |||
| @@ -820,7 +820,7 @@ compatible with old code; callers should always specify it." | |||
| 820 | "$") | 820 | "$") |
| 821 | nil t) | 821 | nil t) |
| 822 | (beginning-of-line) | 822 | (beginning-of-line) |
| 823 | (kill-line 1))) | 823 | (delete-region (point) (progn (end-of-line) (point))))) |
| 824 | 824 | ||
| 825 | ;; Delete the first line, if we've got one, in case it contains a mode spec. | 825 | ;; Delete the first line, if we've got one, in case it contains a mode spec. |
| 826 | (unless (and lv-point | 826 | (unless (and lv-point |
| @@ -828,8 +828,7 @@ compatible with old code; callers should always specify it." | |||
| 828 | (forward-line 0) | 828 | (forward-line 0) |
| 829 | (bobp))) | 829 | (bobp))) |
| 830 | (goto-char (point-min)) | 830 | (goto-char (point-min)) |
| 831 | (unless (eobp) | 831 | (delete-region (point) (progn (end-of-line) (point)))))) |
| 832 | (kill-line 1))))) | ||
| 833 | 832 | ||
| 834 | (defun c-postprocess-file-styles () | 833 | (defun c-postprocess-file-styles () |
| 835 | "Function that post processes relevant file local variables in CC Mode. | 834 | "Function that post processes relevant file local variables in CC Mode. |
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 7fd5f83ea78..ce933cb13d5 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -1042,7 +1042,7 @@ Returns the compilation buffer created." | |||
| 1042 | highlight-regexp)) | 1042 | highlight-regexp)) |
| 1043 | ;; Output a mode setter, for saving and later reloading this buffer. | 1043 | ;; Output a mode setter, for saving and later reloading this buffer. |
| 1044 | (insert "-*- mode: " name-of-mode | 1044 | (insert "-*- mode: " name-of-mode |
| 1045 | "; compilation-directory: " (prin1-to-string compilation-directory) | 1045 | "; default-directory: " (prin1-to-string default-directory) |
| 1046 | " -*-\n" | 1046 | " -*-\n" |
| 1047 | (format "%s started at %s\n\n" | 1047 | (format "%s started at %s\n\n" |
| 1048 | mode-name | 1048 | mode-name |
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 96c94591531..a07fb5ee44f 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el | |||
| @@ -233,6 +233,7 @@ for constructs with multiline if/unless/while/until/for/foreach condition." | |||
| 233 | "*Indentation of CPerl statements with respect to containing block." | 233 | "*Indentation of CPerl statements with respect to containing block." |
| 234 | :type 'integer | 234 | :type 'integer |
| 235 | :group 'cperl-indentation-details) | 235 | :group 'cperl-indentation-details) |
| 236 | (put 'cperl-indent-level 'safe-local-variable 'integerp) | ||
| 236 | 237 | ||
| 237 | (defcustom cperl-lineup-step nil | 238 | (defcustom cperl-lineup-step nil |
| 238 | "*`cperl-lineup' will always lineup at multiple of this number. | 239 | "*`cperl-lineup' will always lineup at multiple of this number. |
diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el index 77d20792442..7ba4ffdc749 100644 --- a/lisp/progmodes/ebnf2ps.el +++ b/lisp/progmodes/ebnf2ps.el | |||
| @@ -2830,7 +2830,7 @@ See `ebnf-style-database' documentation." | |||
| 2830 | (and (assoc name ebnf-style-database) | 2830 | (and (assoc name ebnf-style-database) |
| 2831 | (error "Style name already exists: %s" name)) | 2831 | (error "Style name already exists: %s" name)) |
| 2832 | (or (assoc inherits ebnf-style-database) | 2832 | (or (assoc inherits ebnf-style-database) |
| 2833 | (error "Style inheritance name does'nt exist: %s" inherits)) | 2833 | (error "Style inheritance name doesn't exist: %s" inherits)) |
| 2834 | (setq ebnf-style-database | 2834 | (setq ebnf-style-database |
| 2835 | (cons (cons name (cons inherits (ebnf-check-style-values values))) | 2835 | (cons (cons name (cons inherits (ebnf-check-style-values values))) |
| 2836 | ebnf-style-database))) | 2836 | ebnf-style-database))) |
| @@ -2860,7 +2860,7 @@ See `ebnf-style-database' documentation." | |||
| 2860 | See `ebnf-style-database' documentation." | 2860 | See `ebnf-style-database' documentation." |
| 2861 | (interactive "SStyle name: \nXStyle values: ") | 2861 | (interactive "SStyle name: \nXStyle values: ") |
| 2862 | (let ((style (or (assoc name ebnf-style-database) | 2862 | (let ((style (or (assoc name ebnf-style-database) |
| 2863 | (error "Style name does'nt exist: %s" name))) | 2863 | (error "Style name doesn't exist: %s" name))) |
| 2864 | (merge (ebnf-check-style-values values)) | 2864 | (merge (ebnf-check-style-values values)) |
| 2865 | val elt new check) | 2865 | val elt new check) |
| 2866 | ;; modify value of existing variables | 2866 | ;; modify value of existing variables |
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 1ec9e978229..3d252190eff 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -238,7 +238,7 @@ Used to grey out relevant toolbar icons.") | |||
| 238 | ,(propertize "run" 'face 'font-lock-doc-face) gud-run | 238 | ,(propertize "run" 'face 'font-lock-doc-face) gud-run |
| 239 | :visible (memq gud-minor-mode '(gdbmi gdb dbx jdb))) | 239 | :visible (memq gud-minor-mode '(gdbmi gdb dbx jdb))) |
| 240 | ([menu-bar go] menu-item | 240 | ([menu-bar go] menu-item |
| 241 | ,(propertize "go" 'face 'font-lock-doc-face) gud-go | 241 | ,(propertize " go " 'face 'font-lock-doc-face) gud-go |
| 242 | :visible (and (not gud-running) | 242 | :visible (and (not gud-running) |
| 243 | (eq gud-minor-mode 'gdba))) | 243 | (eq gud-minor-mode 'gdba))) |
| 244 | ([menu-bar stop] menu-item | 244 | ([menu-bar stop] menu-item |
| @@ -2304,6 +2304,8 @@ gud, see `gud-mode'." | |||
| 2304 | (gud-def gud-up "up\C-Mwhere" "<" "Up one stack frame.") | 2304 | (gud-def gud-up "up\C-Mwhere" "<" "Up one stack frame.") |
| 2305 | (gud-def gud-down "down\C-Mwhere" ">" "Up one stack frame.") | 2305 | (gud-def gud-down "down\C-Mwhere" ">" "Up one stack frame.") |
| 2306 | (gud-def gud-run "run" nil "Run the program.") ;if VM start using jdb | 2306 | (gud-def gud-run "run" nil "Run the program.") ;if VM start using jdb |
| 2307 | (gud-def gud-print "print %e" "\C-p" "Evaluate Java expression at point.") | ||
| 2308 | |||
| 2307 | 2309 | ||
| 2308 | (setq comint-prompt-regexp "^> \\|^[^ ]+\\[[0-9]+\\] ") | 2310 | (setq comint-prompt-regexp "^> \\|^[^ ]+\\[[0-9]+\\] ") |
| 2309 | (setq paragraph-start comint-prompt-regexp) | 2311 | (setq paragraph-start comint-prompt-regexp) |
| @@ -2853,7 +2855,9 @@ Obeying it means displaying in another window the specified file and line." | |||
| 2853 | (when (looking-at comint-prompt-regexp) | 2855 | (when (looking-at comint-prompt-regexp) |
| 2854 | (set-marker gud-delete-prompt-marker (point)) | 2856 | (set-marker gud-delete-prompt-marker (point)) |
| 2855 | (set-marker-insertion-type gud-delete-prompt-marker t)) | 2857 | (set-marker-insertion-type gud-delete-prompt-marker t)) |
| 2856 | (insert (concat expr " = "))))) | 2858 | (unless (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) |
| 2859 | 'jdb) | ||
| 2860 | (insert (concat expr " = ")))))) | ||
| 2857 | expr)) | 2861 | expr)) |
| 2858 | 2862 | ||
| 2859 | ;; The next eight functions are hacked from gdbsrc.el by | 2863 | ;; The next eight functions are hacked from gdbsrc.el by |
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index bcecdeafa0f..3b9fb5a896a 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el | |||
| @@ -2586,7 +2586,7 @@ breakpoint can not be set." | |||
| 2586 | (if (idlwave-shell-hide-p 'debug) 'mostly) | 2586 | (if (idlwave-shell-hide-p 'debug) 'mostly) |
| 2587 | nil t)) | 2587 | nil t)) |
| 2588 | 2588 | ||
| 2589 | (defun idlwave-shell-clear-bp (bp) | 2589 | (defun idlwave-shell-clear-bp (bp &optional no-query) |
| 2590 | "Clear breakpoint BP. | 2590 | "Clear breakpoint BP. |
| 2591 | Clears in IDL and in `idlwave-shell-bp-alist'." | 2591 | Clears in IDL and in `idlwave-shell-bp-alist'." |
| 2592 | (let ((index (idlwave-shell-bp-get bp))) | 2592 | (let ((index (idlwave-shell-bp-get bp))) |
| @@ -2595,7 +2595,7 @@ Clears in IDL and in `idlwave-shell-bp-alist'." | |||
| 2595 | (idlwave-shell-send-command | 2595 | (idlwave-shell-send-command |
| 2596 | (concat "breakpoint,/clear," (int-to-string index)) | 2596 | (concat "breakpoint,/clear," (int-to-string index)) |
| 2597 | nil (idlwave-shell-hide-p 'breakpoint) nil t) | 2597 | nil (idlwave-shell-hide-p 'breakpoint) nil t) |
| 2598 | (idlwave-shell-bp-query))))) | 2598 | (unless no-query (idlwave-shell-bp-query)))))) |
| 2599 | 2599 | ||
| 2600 | (defun idlwave-shell-current-frame () | 2600 | (defun idlwave-shell-current-frame () |
| 2601 | "Return a list containing the current file name and line point is in. | 2601 | "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." | |||
| 3722 | (setq old-buffers (delq (current-buffer) old-buffers))) | 3722 | (setq old-buffers (delq (current-buffer) old-buffers))) |
| 3723 | (if (fboundp 'set-specifier) ;; XEmacs | 3723 | (if (fboundp 'set-specifier) ;; XEmacs |
| 3724 | (set-specifier left-margin-width (cons (current-buffer) 2)) | 3724 | (set-specifier left-margin-width (cons (current-buffer) 2)) |
| 3725 | (setq left-margin-width 2)) | 3725 | (if (< left-margin-width 2) |
| 3726 | (if (setq win (get-buffer-window (current-buffer) t)) | 3726 | (setq left-margin-width 2))) |
| 3727 | (set-window-buffer win (current-buffer)))))) | 3727 | (let ((window (get-buffer-window (current-buffer) 0))) |
| 3728 | (if window | ||
| 3729 | (set-window-margins | ||
| 3730 | window left-margin-width right-margin-width)))))) | ||
| 3728 | (if use-glyph | 3731 | (if use-glyph |
| 3729 | (while (setq buf (pop old-buffers)) | 3732 | (while (setq buf (pop old-buffers)) |
| 3730 | (with-current-buffer buf | 3733 | (with-current-buffer buf |
| 3731 | (if (fboundp 'set-specifier) ;; XEmacs | 3734 | (if (fboundp 'set-specifier) ;; XEmacs |
| 3732 | (set-specifier left-margin-width (cons (current-buffer) 0)) | 3735 | (set-specifier left-margin-width (cons (current-buffer) 0)) |
| 3733 | (setq left-margin-width 0)) | 3736 | (setq left-margin-width 0)) |
| 3734 | (if (setq win (get-buffer-window buf t)) | 3737 | (let ((window (get-buffer-window buf 0))) |
| 3735 | (set-window-buffer win buf)))))))) | 3738 | (if window |
| 3739 | (set-window-margins | ||
| 3740 | window left-margin-width right-margin-width))))))))) | ||
| 3736 | 3741 | ||
| 3737 | (defun idlwave-shell-make-new-bp-overlay (&optional type disabled) | 3742 | (defun idlwave-shell-make-new-bp-overlay (&optional type disabled) |
| 3738 | "Make a new overlay for highlighting breakpoints. | 3743 | "Make a new overlay for highlighting breakpoints. |
| @@ -4055,7 +4060,9 @@ list elements of the form: | |||
| 4055 | idlwave-shell-bp-query | 4060 | idlwave-shell-bp-query |
| 4056 | '(progn | 4061 | '(progn |
| 4057 | (idlwave-shell-filter-bp) | 4062 | (idlwave-shell-filter-bp) |
| 4058 | (mapcar 'idlwave-shell-clear-bp idlwave-shell-bp-alist)) | 4063 | (mapcar (lambda (x) (idlwave-shell-clear-bp x 'no-query)) |
| 4064 | idlwave-shell-bp-alist) | ||
| 4065 | (idlwave-shell-bp-query)) | ||
| 4059 | 'hide)) | 4066 | 'hide)) |
| 4060 | 4067 | ||
| 4061 | (defun idlwave-shell-list-all-bp () | 4068 | (defun idlwave-shell-list-all-bp () |
diff --git a/lisp/progmodes/mantemp.el b/lisp/progmodes/mantemp.el index 61b8d3d4d3d..2084f364d55 100644 --- a/lisp/progmodes/mantemp.el +++ b/lisp/progmodes/mantemp.el | |||
| @@ -105,14 +105,14 @@ | |||
| 105 | "^[A-z :&*<>~=,0-9+]*>::operator " nil t nil) | 105 | "^[A-z :&*<>~=,0-9+]*>::operator " nil t nil) |
| 106 | (progn | 106 | (progn |
| 107 | (backward-char 11) | 107 | (backward-char 11) |
| 108 | (kill-line))) | 108 | (delete-region (point) (line-end-position)))) |
| 109 | ;; Remove other member function extensions. | 109 | ;; Remove other member function extensions. |
| 110 | (goto-char (point-min)) | 110 | (goto-char (point-min)) |
| 111 | (message "Removing member function extensions") | 111 | (message "Removing member function extensions") |
| 112 | (while (re-search-forward "^[A-z :&*<>~=,0-9+]*>::" nil t nil) | 112 | (while (re-search-forward "^[A-z :&*<>~=,0-9+]*>::" nil t nil) |
| 113 | (progn | 113 | (progn |
| 114 | (backward-char 2) | 114 | (backward-char 2) |
| 115 | (kill-line))))) | 115 | (delete-region (point) (line-end-position)))))) |
| 116 | 116 | ||
| 117 | (defun mantemp-sort-and-unique-lines () | 117 | (defun mantemp-sort-and-unique-lines () |
| 118 | "Eliminate all consecutive duplicate lines in the buffer." | 118 | "Eliminate all consecutive duplicate lines in the buffer." |
| @@ -127,7 +127,7 @@ | |||
| 127 | (progn | 127 | (progn |
| 128 | (forward-line -1) | 128 | (forward-line -1) |
| 129 | (beginning-of-line) | 129 | (beginning-of-line) |
| 130 | (kill-line 1))))) | 130 | (delete-region (point) (progn (forward-line 1) (point))))))) |
| 131 | 131 | ||
| 132 | (defun mantemp-insert-cxx-syntax () | 132 | (defun mantemp-insert-cxx-syntax () |
| 133 | "Insert C++ syntax around each template class and function. | 133 | "Insert C++ syntax around each template class and function. |
| @@ -161,7 +161,7 @@ the lines." | |||
| 161 | (progn | 161 | (progn |
| 162 | (beginning-of-line) | 162 | (beginning-of-line) |
| 163 | (forward-word 1) | 163 | (forward-word 1) |
| 164 | (kill-word 1))))) | 164 | (delete-region (point) (progn (forward-word 1) (point))))))) |
| 165 | 165 | ||
| 166 | (defun mantemp-make-mantemps () | 166 | (defun mantemp-make-mantemps () |
| 167 | "Gathering interface to the functions modifying the buffer." | 167 | "Gathering interface to the functions modifying the buffer." |
| @@ -189,16 +189,16 @@ This function does the same thing as `mantemp-make-mantemps-buffer', | |||
| 189 | but operates on the region." | 189 | but operates on the region." |
| 190 | (interactive) | 190 | (interactive) |
| 191 | (let ((cur-buf (current-buffer)) | 191 | (let ((cur-buf (current-buffer)) |
| 192 | (mantemp-buffer (generate-new-buffer "*mantemp*"))) | 192 | (mantemp-buffer (generate-new-buffer "*mantemp*")) |
| 193 | (str (buffer-substring (mark) (point)))) | ||
| 193 | ;; Copy the region to a temporary buffer, make the C++ code there | 194 | ;; Copy the region to a temporary buffer, make the C++ code there |
| 194 | ;; and copy the result back to the current buffer. | 195 | ;; and copy the result back to the current buffer. |
| 195 | (kill-region (mark) (point)) | ||
| 196 | (set-buffer mantemp-buffer) | 196 | (set-buffer mantemp-buffer) |
| 197 | (yank) | 197 | (insert str) |
| 198 | (mantemp-make-mantemps) | 198 | (mantemp-make-mantemps) |
| 199 | (kill-region (point-min) (point-max)) | 199 | (setq str (buffer-string)) |
| 200 | (set-buffer cur-buf) | 200 | (set-buffer cur-buf) |
| 201 | (yank) | 201 | (insert str) |
| 202 | (kill-buffer mantemp-buffer)) | 202 | (kill-buffer mantemp-buffer)) |
| 203 | (message "Done")) | 203 | (message "Done")) |
| 204 | 204 | ||
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index 8b6bc4462d6..35ae6b80901 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el | |||
| @@ -391,6 +391,7 @@ The expansion is entirely correct because it uses the C preprocessor." | |||
| 391 | "*Indentation of Perl statements with respect to containing block." | 391 | "*Indentation of Perl statements with respect to containing block." |
| 392 | :type 'integer | 392 | :type 'integer |
| 393 | :group 'perl) | 393 | :group 'perl) |
| 394 | (put 'perl-indent-level 'safe-local-variable 'integerp) | ||
| 394 | (defcustom perl-continued-statement-offset 4 | 395 | (defcustom perl-continued-statement-offset 4 |
| 395 | "*Extra indent for lines not starting new statements." | 396 | "*Extra indent for lines not starting new statements." |
| 396 | :type 'integer | 397 | :type 'integer |
| @@ -646,10 +647,10 @@ possible action from the following list: | |||
| 646 | (if (and comment-start-skip | 647 | (if (and comment-start-skip |
| 647 | (re-search-forward comment-start-skip eol 'move)) | 648 | (re-search-forward comment-start-skip eol 'move)) |
| 648 | (if (eolp) | 649 | (if (eolp) |
| 649 | (progn ; kill existing comment | 650 | (progn ; delete existing comment |
| 650 | (goto-char (match-beginning 0)) | 651 | (goto-char (match-beginning 0)) |
| 651 | (skip-chars-backward " \t") | 652 | (skip-chars-backward " \t") |
| 652 | (kill-region (point) eol)) | 653 | (delete-region (point) eol)) |
| 653 | (if (or (< oldpnt (point)) (= oldpnt eol)) | 654 | (if (or (< oldpnt (point)) (= oldpnt eol)) |
| 654 | (indent-for-comment) ; indent existing comment | 655 | (indent-for-comment) ; indent existing comment |
| 655 | (end-of-line))) | 656 | (end-of-line))) |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 1709428a611..e57c7e639c9 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -981,11 +981,15 @@ don't move and return nil. Otherwise return t." | |||
| 981 | (_ (if (python-comment-line-p) | 981 | (_ (if (python-comment-line-p) |
| 982 | (python-skip-comments/blanks t))) | 982 | (python-skip-comments/blanks t))) |
| 983 | (ci (current-indentation)) | 983 | (ci (current-indentation)) |
| 984 | (open (python-open-block-statement-p))) | 984 | (open (python-open-block-statement-p)) |
| 985 | opoint) | ||
| 985 | (if (and (zerop ci) (not open)) | 986 | (if (and (zerop ci) (not open)) |
| 986 | (not (goto-char point)) | 987 | (not (goto-char point)) |
| 987 | (catch 'done | 988 | (catch 'done |
| 988 | (while (zerop (python-next-statement)) | 989 | (setq opoint (point)) |
| 990 | (while (and (zerop (python-next-statement)) | ||
| 991 | (not (= opoint (point)))) | ||
| 992 | (setq opoint (point)) | ||
| 989 | (when (or (and open (<= (current-indentation) ci)) | 993 | (when (or (and open (<= (current-indentation) ci)) |
| 990 | (< (current-indentation) ci)) | 994 | (< (current-indentation) ci)) |
| 991 | (python-skip-comments/blanks t) | 995 | (python-skip-comments/blanks t) |
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index 2d7bbd79c6b..c549d066b64 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el | |||
| @@ -7028,7 +7028,7 @@ else indent `correctly'." | |||
| 7028 | (indent-to comment-column) | 7028 | (indent-to comment-column) |
| 7029 | (indent-according-to-mode)) | 7029 | (indent-according-to-mode)) |
| 7030 | (t ; inline comment indent | 7030 | (t ; inline comment indent |
| 7031 | (kill-line -0)))) | 7031 | (delete-region (line-beginning-position) (point))))) |
| 7032 | ;; dedent | 7032 | ;; dedent |
| 7033 | ((and (>= (current-indentation) vhdl-basic-offset) | 7033 | ((and (>= (current-indentation) vhdl-basic-offset) |
| 7034 | (or (eq last-command 'vhdl-electric-tab) | 7034 | (or (eq last-command 'vhdl-electric-tab) |
| @@ -7161,7 +7161,7 @@ ENDPOS is encountered." | |||
| 7161 | (when (not (looking-at "^\\s-*\\(--.*\\)?$")) | 7161 | (when (not (looking-at "^\\s-*\\(--.*\\)?$")) |
| 7162 | (end-of-line) | 7162 | (end-of-line) |
| 7163 | (if (search-backward " -- ((" (vhdl-point 'bol) t) | 7163 | (if (search-backward " -- ((" (vhdl-point 'bol) t) |
| 7164 | (kill-line)) | 7164 | (delete-region (point) (line-end-position))) |
| 7165 | (insert " -- ") | 7165 | (insert " -- ") |
| 7166 | (insert (format "%s" expurgated)))))) | 7166 | (insert (format "%s" expurgated)))))) |
| 7167 | (vhdl-keep-region-active)) | 7167 | (vhdl-keep-region-active)) |
| @@ -8346,7 +8346,9 @@ Turn on if ARG positive, turn off if ARG negative, toggle if ARG zero or nil." | |||
| 8346 | (progn (vhdl-insert-keyword "FOR ") | 8346 | (progn (vhdl-insert-keyword "FOR ") |
| 8347 | (if (vhdl-template-field "[quantity name]" " USE " t) | 8347 | (if (vhdl-template-field "[quantity name]" " USE " t) |
| 8348 | (progn (vhdl-template-field "quantity name" " => ") t) | 8348 | (progn (vhdl-template-field "quantity name" " => ") t) |
| 8349 | (kill-word -1) nil)) | 8349 | (delete-region (point) |
| 8350 | (progn (forward-word -1) (point))) | ||
| 8351 | nil)) | ||
| 8350 | (vhdl-template-field "[quantity name]" " => " t)) | 8352 | (vhdl-template-field "[quantity name]" " => " t)) |
| 8351 | (vhdl-template-field "expression") | 8353 | (vhdl-template-field "expression") |
| 8352 | (setq position (point)) | 8354 | (setq position (point)) |
| @@ -8482,7 +8484,7 @@ since these are almost equivalent)." | |||
| 8482 | (setq position (point)) | 8484 | (setq position (point)) |
| 8483 | (vhdl-insert-keyword "PORT ") | 8485 | (vhdl-insert-keyword "PORT ") |
| 8484 | (unless (vhdl-template-map position t t) | 8486 | (unless (vhdl-template-map position t t) |
| 8485 | (kill-line -0) | 8487 | (delete-region (line-beginning-position) (point)) |
| 8486 | (delete-char -1)) | 8488 | (delete-char -1)) |
| 8487 | (insert ";")))) | 8489 | (insert ";")))) |
| 8488 | 8490 | ||
| @@ -8573,7 +8575,7 @@ a configuration declaration if not within a design unit." | |||
| 8573 | (setq position (point)) | 8575 | (setq position (point)) |
| 8574 | (vhdl-insert-keyword "PORT ") | 8576 | (vhdl-insert-keyword "PORT ") |
| 8575 | (unless (vhdl-template-map position t t) | 8577 | (unless (vhdl-template-map position t t) |
| 8576 | (kill-line -0) | 8578 | (delete-region (line-beginning-position) (point)) |
| 8577 | (delete-char -1)) | 8579 | (delete-char -1)) |
| 8578 | (insert ";") | 8580 | (insert ";") |
| 8579 | t) | 8581 | t) |
| @@ -9116,11 +9118,11 @@ otherwise." | |||
| 9116 | (cond ((equal definition "") | 9118 | (cond ((equal definition "") |
| 9117 | (insert ";")) | 9119 | (insert ";")) |
| 9118 | ((equal definition "ARRAY") | 9120 | ((equal definition "ARRAY") |
| 9119 | (kill-word -1) | 9121 | (delete-region (point) (progn (forward-word -1) (point))) |
| 9120 | (vhdl-template-array 'nature t)) | 9122 | (vhdl-template-array 'nature t)) |
| 9121 | ((equal definition "RECORD") | 9123 | ((equal definition "RECORD") |
| 9122 | (setq mid-pos (point-marker)) | 9124 | (setq mid-pos (point-marker)) |
| 9123 | (kill-word -1) | 9125 | (delete-region (point) (progn (forward-word -1) (point))) |
| 9124 | (vhdl-template-record 'nature name t)) | 9126 | (vhdl-template-record 'nature name t)) |
| 9125 | (t | 9127 | (t |
| 9126 | (vhdl-insert-keyword " ACROSS ") | 9128 | (vhdl-insert-keyword " ACROSS ") |
| @@ -9435,7 +9437,7 @@ otherwise." | |||
| 9435 | (insert "\n") | 9437 | (insert "\n") |
| 9436 | (indent-to (+ margin vhdl-basic-offset)) | 9438 | (indent-to (+ margin vhdl-basic-offset)) |
| 9437 | (setq first nil)) | 9439 | (setq first nil)) |
| 9438 | (kill-line -0) | 9440 | (delete-region (line-beginning-position) (point)) |
| 9439 | (indent-to margin) | 9441 | (indent-to margin) |
| 9440 | (vhdl-insert-keyword "END RECORD") | 9442 | (vhdl-insert-keyword "END RECORD") |
| 9441 | (unless (vhdl-standard-p '87) (and name (insert " " name))) | 9443 | (unless (vhdl-standard-p '87) (and name (insert " " name))) |
| @@ -9600,11 +9602,11 @@ otherwise." | |||
| 9600 | (delete-backward-char 4) | 9602 | (delete-backward-char 4) |
| 9601 | (insert ";")) | 9603 | (insert ";")) |
| 9602 | ((equal definition "ARRAY") | 9604 | ((equal definition "ARRAY") |
| 9603 | (kill-word -1) | 9605 | (delete-region (point) (progn (forward-word -1) (point))) |
| 9604 | (vhdl-template-array 'type t)) | 9606 | (vhdl-template-array 'type t)) |
| 9605 | ((equal definition "RECORD") | 9607 | ((equal definition "RECORD") |
| 9606 | (setq mid-pos (point-marker)) | 9608 | (setq mid-pos (point-marker)) |
| 9607 | (kill-word -1) | 9609 | (delete-region (point) (progn (forward-word -1) (point))) |
| 9608 | (vhdl-template-record 'type name t)) | 9610 | (vhdl-template-record 'type name t)) |
| 9609 | ((equal definition "ACCESS") | 9611 | ((equal definition "ACCESS") |
| 9610 | (insert " ") | 9612 | (insert " ") |
diff --git a/lisp/replace.el b/lisp/replace.el index a8dfd043c72..ed1fa9a6b59 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -303,6 +303,11 @@ Use \\[repeat-complex-command] after this command for details." | |||
| 303 | 303 | ||
| 304 | (defun query-replace-regexp-eval (regexp to-expr &optional delimited start end) | 304 | (defun query-replace-regexp-eval (regexp to-expr &optional delimited start end) |
| 305 | "Replace some things after point matching REGEXP with the result of TO-EXPR. | 305 | "Replace some things after point matching REGEXP with the result of TO-EXPR. |
| 306 | |||
| 307 | Interactive use of this function is deprecated in favor of the | ||
| 308 | `\\,' feature of `query-replace-regexp'. For non-interactive use, a loop | ||
| 309 | using `search-forward-regexp' and `replace-match' is preferred. | ||
| 310 | |||
| 306 | As each match is found, the user must type a character saying | 311 | As each match is found, the user must type a character saying |
| 307 | what to do with it. For directions, type \\[help-command] at that time. | 312 | what to do with it. For directions, type \\[help-command] at that time. |
| 308 | 313 | ||
| @@ -354,6 +359,11 @@ Fourth and fifth arg START and END specify the region to operate on." | |||
| 354 | (perform-replace regexp (cons 'replace-eval-replacement to-expr) | 359 | (perform-replace regexp (cons 'replace-eval-replacement to-expr) |
| 355 | t 'literal delimited nil nil start end)) | 360 | t 'literal delimited nil nil start end)) |
| 356 | 361 | ||
| 362 | (make-obsolete 'query-replace-regexp-eval | ||
| 363 | "for interactive use, use the special `\\,' feature of | ||
| 364 | `query-replace-regexp' instead. Non-interactively, a loop | ||
| 365 | using `search-forward-regexp' and `replace-match' is preferred." "22.1") | ||
| 366 | |||
| 357 | (defun map-query-replace-regexp (regexp to-strings &optional n start end) | 367 | (defun map-query-replace-regexp (regexp to-strings &optional n start end) |
| 358 | "Replace some matches for REGEXP with various strings, in rotation. | 368 | "Replace some matches for REGEXP with various strings, in rotation. |
| 359 | The second argument TO-STRINGS contains the replacement strings, | 369 | The second argument TO-STRINGS contains the replacement strings, |
diff --git a/lisp/simple.el b/lisp/simple.el index 382a121b222..d3ceb3d994f 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -3179,6 +3179,8 @@ Start discarding off end if gets this big." | |||
| 3179 | (interactive) | 3179 | (interactive) |
| 3180 | (if (null (mark t)) | 3180 | (if (null (mark t)) |
| 3181 | (error "No mark set in this buffer") | 3181 | (error "No mark set in this buffer") |
| 3182 | (if (= (point) (mark t)) | ||
| 3183 | (message "Mark popped")) | ||
| 3182 | (goto-char (mark t)) | 3184 | (goto-char (mark t)) |
| 3183 | (pop-mark))) | 3185 | (pop-mark))) |
| 3184 | 3186 | ||
| @@ -3196,24 +3198,31 @@ Display `Mark set' unless the optional second arg NOMSG is non-nil." | |||
| 3196 | (message "Mark activated"))))) | 3198 | (message "Mark activated"))))) |
| 3197 | 3199 | ||
| 3198 | (defcustom set-mark-command-repeat-pop nil | 3200 | (defcustom set-mark-command-repeat-pop nil |
| 3199 | "*Non-nil means that repeating \\[set-mark-command] after popping will pop. | 3201 | "*Non-nil means repeating \\[set-mark-command] after popping mark pops it again. |
| 3200 | This means that if you type C-u \\[set-mark-command] \\[set-mark-command] | 3202 | That means that C-u \\[set-mark-command] \\[set-mark-command] |
| 3201 | will pop twice." | 3203 | will pop the mark twice, and |
| 3204 | C-u \\[set-mark-command] \\[set-mark-command] \\[set-mark-command] | ||
| 3205 | will pop the mark three times. | ||
| 3206 | |||
| 3207 | nil means \\[set-mark-command]'s behavior does not change | ||
| 3208 | after C-u \\[set-mark-command]." | ||
| 3202 | :type 'boolean | 3209 | :type 'boolean |
| 3203 | :group 'editing) | 3210 | :group 'editing-basics) |
| 3204 | 3211 | ||
| 3205 | (defun set-mark-command (arg) | 3212 | (defun set-mark-command (arg) |
| 3206 | "Set mark where point is, or jump to mark. | 3213 | "Set the mark where point is, or jump to the mark. |
| 3207 | Setting the mark also sets the \"region\", which is the closest | 3214 | Setting the mark also alters the region, which is the text |
| 3208 | equivalent in Emacs to what some editors call the \"selection\". | 3215 | between point and mark; this is the closest equivalent in |
| 3216 | Emacs to what some editors call the \"selection\". | ||
| 3217 | |||
| 3218 | With no prefix argument, set the mark at point, and push the | ||
| 3219 | old mark position on local mark ring. Also push the old mark on | ||
| 3220 | global mark ring, if the previous mark was set in another buffer. | ||
| 3209 | 3221 | ||
| 3210 | With no prefix argument, set mark and push old mark position on local | 3222 | Immediately repeating this command activates `transient-mark-mode' temporarily. |
| 3211 | mark ring. Also, push mark on global mark ring, if last mark was set in | ||
| 3212 | another buffer. Immediately repeating the command activates | ||
| 3213 | `transient-mark-mode' temporarily. | ||
| 3214 | 3223 | ||
| 3215 | With prefix argument \(e.g., \\[universal-argument] \\[set-mark-command]\), \ | 3224 | With prefix argument \(e.g., \\[universal-argument] \\[set-mark-command]\), \ |
| 3216 | jump to mark, and set mark from | 3225 | jump to the mark, and set the mark from |
| 3217 | position popped off the local mark ring \(this does not affect the global | 3226 | position popped off the local mark ring \(this does not affect the global |
| 3218 | mark ring\). Use \\[pop-global-mark] to jump to a mark popped off the global | 3227 | mark ring\). Use \\[pop-global-mark] to jump to a mark popped off the global |
| 3219 | mark ring \(see `pop-global-mark'\). | 3228 | mark ring \(see `pop-global-mark'\). |
| @@ -3222,9 +3231,9 @@ If `set-mark-command-repeat-pop' is non-nil, repeating | |||
| 3222 | the \\[set-mark-command] command with no prefix argument pops the next position | 3231 | the \\[set-mark-command] command with no prefix argument pops the next position |
| 3223 | off the local (or global) mark ring and jumps there. | 3232 | off the local (or global) mark ring and jumps there. |
| 3224 | 3233 | ||
| 3225 | With a double \\[universal-argument] prefix argument \(e.g., \\[universal-argument] \ | 3234 | With \\[universal-argument] \\[universal-argument] as prefix |
| 3226 | \\[universal-argument] \\[set-mark-command]\), unconditionally | 3235 | argument, unconditionally set mark where point is, even if |
| 3227 | set mark where point is, even if `set-mark-command-repeat-pop' is non-nil. | 3236 | `set-mark-command-repeat-pop' is non-nil. |
| 3228 | 3237 | ||
| 3229 | Novice Emacs Lisp programmers often try to use the mark for the wrong | 3238 | Novice Emacs Lisp programmers often try to use the mark for the wrong |
| 3230 | purposes. See the documentation of `set-mark' for more information." | 3239 | purposes. See the documentation of `set-mark' for more information." |
diff --git a/lisp/subr.el b/lisp/subr.el index 31604d3ecda..d42c096a414 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -1719,6 +1719,9 @@ by doing (clear-string STRING)." | |||
| 1719 | 1719 | ||
| 1720 | ;; This should be used by `call-interactively' for `n' specs. | 1720 | ;; This should be used by `call-interactively' for `n' specs. |
| 1721 | (defun read-number (prompt &optional default) | 1721 | (defun read-number (prompt &optional default) |
| 1722 | "Read a numeric value in the minibuffer, prompting with PROMPT. | ||
| 1723 | DEFAULT specifies a default value to return if the user just types RET. | ||
| 1724 | The value of DEFAULT is inserted into PROMPT." | ||
| 1722 | (let ((n nil)) | 1725 | (let ((n nil)) |
| 1723 | (when default | 1726 | (when default |
| 1724 | (setq prompt | 1727 | (setq prompt |
| @@ -1732,9 +1735,11 @@ by doing (clear-string STRING)." | |||
| 1732 | (let ((str (read-from-minibuffer prompt nil nil nil nil | 1735 | (let ((str (read-from-minibuffer prompt nil nil nil nil |
| 1733 | (and default | 1736 | (and default |
| 1734 | (number-to-string default))))) | 1737 | (number-to-string default))))) |
| 1735 | (setq n (cond | 1738 | (condition-case nil |
| 1736 | ((zerop (length str)) default) | 1739 | (setq n (cond |
| 1737 | ((stringp str) (read str))))) | 1740 | ((zerop (length str)) default) |
| 1741 | ((stringp str) (read str)))) | ||
| 1742 | (error nil))) | ||
| 1738 | (unless (numberp n) | 1743 | (unless (numberp n) |
| 1739 | (message "Please enter a number.") | 1744 | (message "Please enter a number.") |
| 1740 | (sit-for 1) | 1745 | (sit-for 1) |
diff --git a/lisp/t-mouse.el b/lisp/t-mouse.el index eca2ce2b9fe..15521decd90 100644 --- a/lisp/t-mouse.el +++ b/lisp/t-mouse.el | |||
| @@ -166,6 +166,8 @@ Also trim the accumulator by all the data used to build the event." | |||
| 166 | (if (or (eq (car ob-pos) 'STILL) (eq (car ob-pos) '***) (not ob-pos)) | 166 | (if (or (eq (car ob-pos) 'STILL) (eq (car ob-pos) '***) (not ob-pos)) |
| 167 | nil | 167 | nil |
| 168 | (setq ob (car ob-pos)) | 168 | (setq ob (car ob-pos)) |
| 169 | (if (string-match "mev:$" (prin1-to-string ob)) | ||
| 170 | (error "Can't open mouse connection")) | ||
| 169 | (setq t-mouse-filter-accumulator | 171 | (setq t-mouse-filter-accumulator |
| 170 | (substring t-mouse-filter-accumulator (cdr ob-pos))) | 172 | (substring t-mouse-filter-accumulator (cdr ob-pos))) |
| 171 | 173 | ||
diff --git a/lisp/term.el b/lisp/term.el index 7bbef6e526e..e8848d64efb 100644 --- a/lisp/term.el +++ b/lisp/term.el | |||
| @@ -627,7 +627,7 @@ executed once when the buffer is created." | |||
| 627 | "Keyboard map for sending characters directly to the inferior process.") | 627 | "Keyboard map for sending characters directly to the inferior process.") |
| 628 | (defvar term-escape-char nil | 628 | (defvar term-escape-char nil |
| 629 | "Escape character for char sub-mode of term mode. | 629 | "Escape character for char sub-mode of term mode. |
| 630 | Do not change it directly; use `term-set-escape-char' instead.") | 630 | Do not change it directly; use `term-set-escape-char' instead.") |
| 631 | (defvar term-raw-escape-map nil) | 631 | (defvar term-raw-escape-map nil) |
| 632 | 632 | ||
| 633 | (defvar term-pager-break-map nil) | 633 | (defvar term-pager-break-map nil) |
| @@ -714,7 +714,7 @@ Buffer local variable.") | |||
| 714 | (defvar term-buffer-maximum-size 2048 | 714 | (defvar term-buffer-maximum-size 2048 |
| 715 | "*The maximum size in lines for term buffers. | 715 | "*The maximum size in lines for term buffers. |
| 716 | Term buffers are truncated from the top to be no greater than this number. | 716 | Term buffers are truncated from the top to be no greater than this number. |
| 717 | Notice that a setting of 0 means 'don't truncate anything'. This variable | 717 | Notice that a setting of 0 means \"don't truncate anything\". This variable |
| 718 | is buffer-local.") | 718 | is buffer-local.") |
| 719 | ;;; | 719 | ;;; |
| 720 | 720 | ||
| @@ -856,7 +856,7 @@ is buffer-local.") | |||
| 856 | ;; Set up term-raw-map, etc. | 856 | ;; Set up term-raw-map, etc. |
| 857 | 857 | ||
| 858 | (defun term-set-escape-char (c) | 858 | (defun term-set-escape-char (c) |
| 859 | "Change term-escape-char and keymaps that depend on it." | 859 | "Change `term-escape-char' and keymaps that depend on it." |
| 860 | (when term-escape-char | 860 | (when term-escape-char |
| 861 | (define-key term-raw-map term-escape-char 'term-send-raw)) | 861 | (define-key term-raw-map term-escape-char 'term-send-raw)) |
| 862 | (setq c (make-string 1 c)) | 862 | (setq c (make-string 1 c)) |
| @@ -1098,7 +1098,7 @@ Entry to this mode runs the hooks on `term-mode-hook'." | |||
| 1098 | (make-local-variable 'term-current-face) | 1098 | (make-local-variable 'term-current-face) |
| 1099 | (make-local-variable 'term-pending-frame) | 1099 | (make-local-variable 'term-pending-frame) |
| 1100 | (setq term-pending-frame nil) | 1100 | (setq term-pending-frame nil) |
| 1101 | ;; Cua-mode's keybindings interfere with the term keybindings, disable it. | 1101 | ;; Cua-mode's keybindings interfere with the term keybindings, disable it. |
| 1102 | (set (make-local-variable 'cua-mode) nil) | 1102 | (set (make-local-variable 'cua-mode) nil) |
| 1103 | (run-mode-hooks 'term-mode-hook) | 1103 | (run-mode-hooks 'term-mode-hook) |
| 1104 | (when (featurep 'xemacs) | 1104 | (when (featurep 'xemacs) |
| @@ -1194,7 +1194,7 @@ without any interpretation." | |||
| 1194 | "Insert the last stretch of killed text at the position clicked on." | 1194 | "Insert the last stretch of killed text at the position clicked on." |
| 1195 | (interactive "e\nP") | 1195 | (interactive "e\nP") |
| 1196 | (if (featurep 'xemacs) | 1196 | (if (featurep 'xemacs) |
| 1197 | (term-send-raw-string | 1197 | (term-send-raw-string |
| 1198 | (or (condition-case () (x-get-selection) (error ())) | 1198 | (or (condition-case () (x-get-selection) (error ())) |
| 1199 | (x-get-cutbuffer) | 1199 | (x-get-cutbuffer) |
| 1200 | (error "No selection or cut buffer available"))) | 1200 | (error "No selection or cut buffer available"))) |
| @@ -1312,7 +1312,7 @@ commands to use in that buffer. | |||
| 1312 | "Start up a process in buffer for term modes. | 1312 | "Start up a process in buffer for term modes. |
| 1313 | Blasts any old process running in the buffer. Doesn't set the buffer mode. | 1313 | Blasts any old process running in the buffer. Doesn't set the buffer mode. |
| 1314 | You can use this to cheaply run a series of processes in the same term | 1314 | You can use this to cheaply run a series of processes in the same term |
| 1315 | buffer. The hook term-exec-hook is run after each exec." | 1315 | buffer. The hook `term-exec-hook' is run after each exec." |
| 1316 | (save-excursion | 1316 | (save-excursion |
| 1317 | (set-buffer buffer) | 1317 | (set-buffer buffer) |
| 1318 | (let ((proc (get-buffer-process buffer))) ; Blast any old process. | 1318 | (let ((proc (get-buffer-process buffer))) ; Blast any old process. |
| @@ -1342,7 +1342,7 @@ buffer. The hook term-exec-hook is run after each exec." | |||
| 1342 | (run-hooks 'term-exec-hook) | 1342 | (run-hooks 'term-exec-hook) |
| 1343 | buffer))) | 1343 | buffer))) |
| 1344 | 1344 | ||
| 1345 | (defun term-sentinel (proc msg) | 1345 | (defun term-sentinel (proc msg) |
| 1346 | "Sentinel for term buffers. | 1346 | "Sentinel for term buffers. |
| 1347 | The main purpose is to get rid of the local keymap." | 1347 | The main purpose is to get rid of the local keymap." |
| 1348 | (let ((buffer (process-buffer proc))) | 1348 | (let ((buffer (process-buffer proc))) |
| @@ -1402,7 +1402,7 @@ The main purpose is to get rid of the local keymap." | |||
| 1402 | :kb=^?:kD=^[[3~:sc=\\E7:rc=\\E8:r1=\\Ec:" | 1402 | :kb=^?:kD=^[[3~:sc=\\E7:rc=\\E8:r1=\\Ec:" |
| 1403 | ;;; : -undefine ic | 1403 | ;;; : -undefine ic |
| 1404 | ;;; don't define :te=\\E[2J\\E[?47l\\E8:ti=\\E7\\E[?47h\ | 1404 | ;;; don't define :te=\\E[2J\\E[?47l\\E8:ti=\\E7\\E[?47h\ |
| 1405 | "termcap capabilities supported") | 1405 | "Termcap capabilities supported.") |
| 1406 | 1406 | ||
| 1407 | ;;; This auxiliary function cranks up the process for term-exec in | 1407 | ;;; This auxiliary function cranks up the process for term-exec in |
| 1408 | ;;; the appropriate environment. | 1408 | ;;; the appropriate environment. |
| @@ -2044,9 +2044,9 @@ Similarly for Soar, Scheme, etc." | |||
| 2044 | (funcall term-input-sender proc input))))) | 2044 | (funcall term-input-sender proc input))))) |
| 2045 | 2045 | ||
| 2046 | (defun term-get-old-input-default () | 2046 | (defun term-get-old-input-default () |
| 2047 | "Default for term-get-old-input. | 2047 | "Default for `term-get-old-input'. |
| 2048 | Take the current line, and discard any initial text matching | 2048 | Take the current line, and discard any initial text matching |
| 2049 | term-prompt-regexp." | 2049 | `term-prompt-regexp'." |
| 2050 | (save-excursion | 2050 | (save-excursion |
| 2051 | (beginning-of-line) | 2051 | (beginning-of-line) |
| 2052 | (term-skip-prompt) | 2052 | (term-skip-prompt) |
| @@ -2066,7 +2066,7 @@ Calls `term-get-old-input' to get old input." | |||
| 2066 | (insert input)))) | 2066 | (insert input)))) |
| 2067 | 2067 | ||
| 2068 | (defun term-skip-prompt () | 2068 | (defun term-skip-prompt () |
| 2069 | "Skip past the text matching regexp term-prompt-regexp. | 2069 | "Skip past the text matching regexp `term-prompt-regexp'. |
| 2070 | If this takes us past the end of the current line, don't skip at all." | 2070 | If this takes us past the end of the current line, don't skip at all." |
| 2071 | (let ((eol (save-excursion (end-of-line) (point)))) | 2071 | (let ((eol (save-excursion (end-of-line) (point)))) |
| 2072 | (when (and (looking-at term-prompt-regexp) | 2072 | (when (and (looking-at term-prompt-regexp) |
| @@ -2097,7 +2097,7 @@ If a prefix argument is given (\\[universal-argument]), then no prompt skip | |||
| 2097 | -- go straight to column 0. | 2097 | -- go straight to column 0. |
| 2098 | 2098 | ||
| 2099 | The prompt skip is done by skipping text matching the regular expression | 2099 | The prompt skip is done by skipping text matching the regular expression |
| 2100 | term-prompt-regexp, a buffer local variable." | 2100 | `term-prompt-regexp', a buffer local variable." |
| 2101 | (interactive "P") | 2101 | (interactive "P") |
| 2102 | (beginning-of-line) | 2102 | (beginning-of-line) |
| 2103 | (when (null arg) (term-skip-prompt))) | 2103 | (when (null arg) (term-skip-prompt))) |
| @@ -2180,8 +2180,8 @@ If your process is choking on big inputs, try lowering the value.") | |||
| 2180 | 2180 | ||
| 2181 | (defun term-send-string (proc str) | 2181 | (defun term-send-string (proc str) |
| 2182 | "Send to PROC the contents of STR as input. | 2182 | "Send to PROC the contents of STR as input. |
| 2183 | This is equivalent to process-send-string, except that long input strings | 2183 | This is equivalent to `process-send-string', except that long input strings |
| 2184 | are broken up into chunks of size term-input-chunk-size. Processes | 2184 | are broken up into chunks of size `term-input-chunk-size'. Processes |
| 2185 | are given a chance to output between chunks. This can help prevent processes | 2185 | are given a chance to output between chunks. This can help prevent processes |
| 2186 | from hanging when you send them long inputs on some OS's." | 2186 | from hanging when you send them long inputs on some OS's." |
| 2187 | (let* ((len (length str)) | 2187 | (let* ((len (length str)) |
| @@ -2195,7 +2195,7 @@ from hanging when you send them long inputs on some OS's." | |||
| 2195 | 2195 | ||
| 2196 | (defun term-send-region (proc start end) | 2196 | (defun term-send-region (proc start end) |
| 2197 | "Send to PROC the region delimited by START and END. | 2197 | "Send to PROC the region delimited by START and END. |
| 2198 | This is a replacement for process-send-region that tries to keep | 2198 | This is a replacement for `process-send-region' that tries to keep |
| 2199 | your process from hanging on long inputs. See `term-send-string'." | 2199 | your process from hanging on long inputs. See `term-send-string'." |
| 2200 | (term-send-string proc (buffer-substring start end))) | 2200 | (term-send-string proc (buffer-substring start end))) |
| 2201 | 2201 | ||
| @@ -2874,7 +2874,7 @@ See `term-prompt-regexp'." | |||
| 2874 | ;; (setq term-terminal-state 0)) | 2874 | ;; (setq term-terminal-state 0)) |
| 2875 | ((eq char ?M) ;; scroll reversed (terminfo: ri) | 2875 | ((eq char ?M) ;; scroll reversed (terminfo: ri) |
| 2876 | (if (or (< (term-current-row) term-scroll-start) | 2876 | (if (or (< (term-current-row) term-scroll-start) |
| 2877 | (>= (1- (term-current-row)) | 2877 | (>= (1- (term-current-row)) |
| 2878 | term-scroll-start)) | 2878 | term-scroll-start)) |
| 2879 | ;; Scrolling up will not move outside | 2879 | ;; Scrolling up will not move outside |
| 2880 | ;; the scroll region. | 2880 | ;; the scroll region. |
| @@ -2900,7 +2900,7 @@ See `term-prompt-regexp'." | |||
| 2900 | (when term-saved-cursor | 2900 | (when term-saved-cursor |
| 2901 | (term-goto (nth 0 term-saved-cursor) | 2901 | (term-goto (nth 0 term-saved-cursor) |
| 2902 | (nth 1 term-saved-cursor)) | 2902 | (nth 1 term-saved-cursor)) |
| 2903 | (setq term-ansi-current-bg-color | 2903 | (setq term-ansi-current-bg-color |
| 2904 | (nth 2 term-saved-cursor) | 2904 | (nth 2 term-saved-cursor) |
| 2905 | term-ansi-current-bold | 2905 | term-ansi-current-bold |
| 2906 | (nth 3 term-saved-cursor) | 2906 | (nth 3 term-saved-cursor) |
| @@ -3188,7 +3188,7 @@ See `term-prompt-regexp'." | |||
| 3188 | (when term-ansi-current-underline | 3188 | (when term-ansi-current-underline |
| 3189 | (setq term-current-face | 3189 | (setq term-current-face |
| 3190 | (append '(:underline t) term-current-face)))))) | 3190 | (append '(:underline t) term-current-face)))))) |
| 3191 | 3191 | ||
| 3192 | ;;; (message "Debug %S" term-current-face) | 3192 | ;;; (message "Debug %S" term-current-face) |
| 3193 | (setq term-ansi-face-already-done nil)) | 3193 | (setq term-ansi-face-already-done nil)) |
| 3194 | 3194 | ||
| @@ -3217,7 +3217,7 @@ See `term-prompt-regexp'." | |||
| 3217 | ((eq char ?A) | 3217 | ((eq char ?A) |
| 3218 | (term-handle-deferred-scroll) | 3218 | (term-handle-deferred-scroll) |
| 3219 | (let ((tcr (term-current-row))) | 3219 | (let ((tcr (term-current-row))) |
| 3220 | (term-down | 3220 | (term-down |
| 3221 | (if (< (- tcr term-terminal-parameter) term-scroll-start) | 3221 | (if (< (- tcr term-terminal-parameter) term-scroll-start) |
| 3222 | ;; If the amount to move is before scroll start, move | 3222 | ;; If the amount to move is before scroll start, move |
| 3223 | ;; to scroll start. | 3223 | ;; to scroll start. |
| @@ -3229,7 +3229,7 @@ See `term-prompt-regexp'." | |||
| 3229 | ((eq char ?B) | 3229 | ((eq char ?B) |
| 3230 | (let ((tcr (term-current-row))) | 3230 | (let ((tcr (term-current-row))) |
| 3231 | (unless (= tcr (1- term-scroll-end)) | 3231 | (unless (= tcr (1- term-scroll-end)) |
| 3232 | (term-down | 3232 | (term-down |
| 3233 | (if (> (+ tcr term-terminal-parameter) term-scroll-end) | 3233 | (if (> (+ tcr term-terminal-parameter) term-scroll-end) |
| 3234 | (- term-scroll-end 1 tcr) | 3234 | (- term-scroll-end 1 tcr) |
| 3235 | (max 1 term-terminal-parameter)) t)))) | 3235 | (max 1 term-terminal-parameter)) t)))) |
| @@ -3493,7 +3493,7 @@ The top-most line is line 0." | |||
| 3493 | ((term-pager-continue deficit))))) | 3493 | ((term-pager-continue deficit))))) |
| 3494 | 3494 | ||
| 3495 | (defun term-pager-page (arg) | 3495 | (defun term-pager-page (arg) |
| 3496 | "Proceed past the **MORE** break, allowing the next page of output to appear" | 3496 | "Proceed past the **MORE** break, allowing the next page of output to appear." |
| 3497 | (interactive "p") | 3497 | (interactive "p") |
| 3498 | (term-pager-line (* arg term-height))) | 3498 | (term-pager-line (* arg term-height))) |
| 3499 | 3499 | ||
| @@ -3562,7 +3562,7 @@ The top-most line is line 0." | |||
| 3562 | (put 'term-fake-pager-disable 'menu-enable 'term-pager-count)) | 3562 | (put 'term-fake-pager-disable 'menu-enable 'term-pager-count)) |
| 3563 | 3563 | ||
| 3564 | (defun term-pager-help () | 3564 | (defun term-pager-help () |
| 3565 | "Provide help on commands available in a terminal-emulator **MORE** break" | 3565 | "Provide help on commands available in a terminal-emulator **MORE** break." |
| 3566 | (interactive) | 3566 | (interactive) |
| 3567 | (message "Terminal-emulator pager break help...") | 3567 | (message "Terminal-emulator pager break help...") |
| 3568 | (sit-for 0) | 3568 | (sit-for 0) |
| @@ -3604,9 +3604,9 @@ all pending output has been dealt with.")) | |||
| 3604 | 3604 | ||
| 3605 | (defun term-handle-scroll (down) | 3605 | (defun term-handle-scroll (down) |
| 3606 | (let ((scroll-needed | 3606 | (let ((scroll-needed |
| 3607 | (- (+ (term-current-row) down) | 3607 | (- (+ (term-current-row) down) |
| 3608 | (if (< down 0) term-scroll-start term-scroll-end)))) | 3608 | (if (< down 0) term-scroll-start term-scroll-end)))) |
| 3609 | (when (or (and (< down 0) (< scroll-needed 0)) | 3609 | (when (or (and (< down 0) (< scroll-needed 0)) |
| 3610 | (and (> down 0) (> scroll-needed 0))) | 3610 | (and (> down 0) (> scroll-needed 0))) |
| 3611 | (let ((save-point (copy-marker (point))) (save-top)) | 3611 | (let ((save-point (copy-marker (point))) (save-top)) |
| 3612 | (goto-char term-home-marker) | 3612 | (goto-char term-home-marker) |
| @@ -3704,7 +3704,7 @@ all pending output has been dealt with.")) | |||
| 3704 | ;; contain a space, to force the previous line to continue to wrap. | 3704 | ;; contain a space, to force the previous line to continue to wrap. |
| 3705 | ;; We could do this always, but it seems preferable to not add the | 3705 | ;; We could do this always, but it seems preferable to not add the |
| 3706 | ;; extra space when wrapped is false. | 3706 | ;; extra space when wrapped is false. |
| 3707 | (when wrapped | 3707 | (when wrapped |
| 3708 | (insert ? )) | 3708 | (insert ? )) |
| 3709 | (insert ?\n) | 3709 | (insert ?\n) |
| 3710 | (put-text-property saved-point (point) 'face 'default) | 3710 | (put-text-property saved-point (point) 'face 'default) |
| @@ -3795,8 +3795,8 @@ Should only be called when point is at the start of a screen line." | |||
| 3795 | ;; we need to go one line past it in order to ensure correct | 3795 | ;; we need to go one line past it in order to ensure correct |
| 3796 | ;; scrolling. | 3796 | ;; scrolling. |
| 3797 | (if (< save-current-row term-scroll-start) | 3797 | (if (< save-current-row term-scroll-start) |
| 3798 | ;; If point is before scroll start, | 3798 | ;; If point is before scroll start, |
| 3799 | (progn | 3799 | (progn |
| 3800 | (setq lines (- lines (- term-scroll-start save-current-row))) | 3800 | (setq lines (- lines (- term-scroll-start save-current-row))) |
| 3801 | (term-down (- term-scroll-start save-current-row)) | 3801 | (term-down (- term-scroll-start save-current-row)) |
| 3802 | (setq start (point))) | 3802 | (setq start (point))) |
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 06fa3a01186..0b413e3b7ab 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el | |||
| @@ -86,7 +86,7 @@ If this is a function, call it to generate the initial field text." | |||
| 86 | :group 'bibtex | 86 | :group 'bibtex |
| 87 | :type '(choice (const :tag "None" nil) | 87 | :type '(choice (const :tag "None" nil) |
| 88 | (string :tag "Initial text") | 88 | (string :tag "Initial text") |
| 89 | (function :tag "Initialize Function" :value fun) | 89 | (function :tag "Initialize Function") |
| 90 | (const :tag "Default" t))) | 90 | (const :tag "Default" t))) |
| 91 | (put 'bibtex-include-OPTkey 'risky-local-variable t) | 91 | (put 'bibtex-include-OPTkey 'risky-local-variable t) |
| 92 | 92 | ||
| @@ -98,11 +98,8 @@ CROSSREF-OPTIONAL lists in `bibtex-entry-field-alist' (which see)." | |||
| 98 | :group 'bibtex | 98 | :group 'bibtex |
| 99 | :type '(repeat (group (string :tag "Field") | 99 | :type '(repeat (group (string :tag "Field") |
| 100 | (string :tag "Comment") | 100 | (string :tag "Comment") |
| 101 | (option (group :inline t | 101 | (option (choice :tag "Init" |
| 102 | :extra-offset -4 | 102 | (const nil) string function))))) |
| 103 | (choice :tag "Init" :value "" | ||
| 104 | string | ||
| 105 | function)))))) | ||
| 106 | (put 'bibtex-user-optional-fields 'risky-local-variable t) | 103 | (put 'bibtex-user-optional-fields 'risky-local-variable t) |
| 107 | 104 | ||
| 108 | (defcustom bibtex-entry-format | 105 | (defcustom bibtex-entry-format |
| @@ -224,7 +221,7 @@ If parsing fails, try to set this variable to nil." | |||
| 224 | :group 'bibtex | 221 | :group 'bibtex |
| 225 | :type 'boolean) | 222 | :type 'boolean) |
| 226 | 223 | ||
| 227 | (defvar bibtex-entry-field-alist | 224 | (defcustom bibtex-entry-field-alist |
| 228 | '(("Article" | 225 | '(("Article" |
| 229 | ((("author" "Author1 [and Author2 ...] [and others]") | 226 | ((("author" "Author1 [and Author2 ...] [and others]") |
| 230 | ("title" "Title of the article (BibTeX converts it to lowercase)") | 227 | ("title" "Title of the article (BibTeX converts it to lowercase)") |
| @@ -452,7 +449,36 @@ appears in the echo area, INIT is either the initial content of the | |||
| 452 | field or a function, which is called to determine the initial content | 449 | field or a function, which is called to determine the initial content |
| 453 | of the field, and ALTERNATIVE-FLAG (either nil or t) marks if the | 450 | of the field, and ALTERNATIVE-FLAG (either nil or t) marks if the |
| 454 | field is an alternative. ALTERNATIVE-FLAG may be t only in the | 451 | field is an alternative. ALTERNATIVE-FLAG may be t only in the |
| 455 | REQUIRED or CROSSREF-REQUIRED lists.") | 452 | REQUIRED or CROSSREF-REQUIRED lists." |
| 453 | :group 'bibtex | ||
| 454 | :type '(repeat (group (string :tag "Entry name") | ||
| 455 | (group (repeat :tag "Required fields" | ||
| 456 | (group (string :tag "Field") | ||
| 457 | (string :tag "Comment") | ||
| 458 | (option (choice :tag "Init" :value nil | ||
| 459 | (const nil) string function)) | ||
| 460 | (option (choice :tag "Alternative" | ||
| 461 | (const :tag "No" nil) | ||
| 462 | (const :tag "Yes" t))))) | ||
| 463 | (repeat :tag "Optional fields" | ||
| 464 | (group (string :tag "Field") | ||
| 465 | (string :tag "Comment") | ||
| 466 | (option (choice :tag "Init" :value nil | ||
| 467 | (const nil) string function))))) | ||
| 468 | (option :extra-offset -4 | ||
| 469 | (group (repeat :tag "Crossref: required fields" | ||
| 470 | (group (string :tag "Field") | ||
| 471 | (string :tag "Comment") | ||
| 472 | (option (choice :tag "Init" :value nil | ||
| 473 | (const nil) string function)) | ||
| 474 | (option (choice :tag "Alternative" | ||
| 475 | (const :tag "No" nil) | ||
| 476 | (const :tag "Yes" t))))) | ||
| 477 | (repeat :tag "Crossref: optional fields" | ||
| 478 | (group (string :tag "Field") | ||
| 479 | (string :tag "Comment") | ||
| 480 | (option (choice :tag "Init" :value nil | ||
| 481 | (const nil) string function))))))))) | ||
| 456 | (put 'bibtex-entry-field-alist 'risky-local-variable t) | 482 | (put 'bibtex-entry-field-alist 'risky-local-variable t) |
| 457 | 483 | ||
| 458 | (defcustom bibtex-comment-start "@Comment" | 484 | (defcustom bibtex-comment-start "@Comment" |
| @@ -1785,7 +1811,7 @@ Optional arg COMMA is as in `bibtex-enclosing-field'." | |||
| 1785 | (set-mark (point)) | 1811 | (set-mark (point)) |
| 1786 | (message "Mark set") | 1812 | (message "Mark set") |
| 1787 | (bibtex-make-field (funcall fun 'bibtex-field-kill-ring-yank-pointer | 1813 | (bibtex-make-field (funcall fun 'bibtex-field-kill-ring-yank-pointer |
| 1788 | bibtex-field-kill-ring) t)) | 1814 | bibtex-field-kill-ring) t nil t)) |
| 1789 | ;; insert past the current entry | 1815 | ;; insert past the current entry |
| 1790 | (bibtex-skip-to-valid-entry) | 1816 | (bibtex-skip-to-valid-entry) |
| 1791 | (set-mark (point)) | 1817 | (set-mark (point)) |
| @@ -2831,7 +2857,7 @@ and `bibtex-user-optional-fields'." | |||
| 2831 | (push (list "key" | 2857 | (push (list "key" |
| 2832 | "Used for reference key creation if author and editor fields are missing" | 2858 | "Used for reference key creation if author and editor fields are missing" |
| 2833 | (if (or (stringp bibtex-include-OPTkey) | 2859 | (if (or (stringp bibtex-include-OPTkey) |
| 2834 | (fboundp bibtex-include-OPTkey)) | 2860 | (functionp bibtex-include-OPTkey)) |
| 2835 | bibtex-include-OPTkey)) | 2861 | bibtex-include-OPTkey)) |
| 2836 | optional)) | 2862 | optional)) |
| 2837 | (if (member-ignore-case entry-type bibtex-include-OPTcrossref) | 2863 | (if (member-ignore-case entry-type bibtex-include-OPTcrossref) |
| @@ -3020,7 +3046,7 @@ interactive calls." | |||
| 3020 | (if comment (message "%s" (nth 1 comment)) | 3046 | (if comment (message "%s" (nth 1 comment)) |
| 3021 | (message "No comment available"))))) | 3047 | (message "No comment available"))))) |
| 3022 | 3048 | ||
| 3023 | (defun bibtex-make-field (field &optional move interactive) | 3049 | (defun bibtex-make-field (field &optional move interactive nodelim) |
| 3024 | "Make a field named FIELD in current BibTeX entry. | 3050 | "Make a field named FIELD in current BibTeX entry. |
| 3025 | FIELD is either a string or a list of the form | 3051 | FIELD is either a string or a list of the form |
| 3026 | \(FIELD-NAME COMMENT-STRING INIT ALTERNATIVE-FLAG) as in | 3052 | \(FIELD-NAME COMMENT-STRING INIT ALTERNATIVE-FLAG) as in |
| @@ -3028,7 +3054,8 @@ FIELD is either a string or a list of the form | |||
| 3028 | If MOVE is non-nil, move point past the present field before making | 3054 | If MOVE is non-nil, move point past the present field before making |
| 3029 | the new field. If INTERACTIVE is non-nil, move point to the end of | 3055 | the new field. If INTERACTIVE is non-nil, move point to the end of |
| 3030 | the new field. Otherwise move point past the new field. | 3056 | the new field. Otherwise move point past the new field. |
| 3031 | MOVE and INTERACTIVE are t when called interactively." | 3057 | MOVE and INTERACTIVE are t when called interactively. |
| 3058 | INIT is surrounded by field delimiters, unless NODELIM is non-nil." | ||
| 3032 | (interactive | 3059 | (interactive |
| 3033 | (list (let ((completion-ignore-case t) | 3060 | (list (let ((completion-ignore-case t) |
| 3034 | (field-list (bibtex-field-list | 3061 | (field-list (bibtex-field-list |
| @@ -3058,10 +3085,13 @@ MOVE and INTERACTIVE are t when called interactively." | |||
| 3058 | (indent-to-column (+ bibtex-entry-offset | 3085 | (indent-to-column (+ bibtex-entry-offset |
| 3059 | bibtex-text-indentation))) | 3086 | bibtex-text-indentation))) |
| 3060 | (let ((init (nth 2 field))) | 3087 | (let ((init (nth 2 field))) |
| 3061 | (insert (cond ((stringp init) init) | 3088 | (if (not init) (setq init "") |
| 3062 | ((fboundp init) (funcall init)) | 3089 | (if (functionp init) (setq init (funcall init))) |
| 3063 | (t (concat (bibtex-field-left-delimiter) | 3090 | (unless (stringp init) (error "`%s' is not a string" init))) |
| 3064 | (bibtex-field-right-delimiter)))))) | 3091 | ;; NODELIM is required by `bibtex-insert-kill' |
| 3092 | (if nodelim (insert init) | ||
| 3093 | (insert (bibtex-field-left-delimiter) init | ||
| 3094 | (bibtex-field-right-delimiter)))) | ||
| 3065 | (when interactive | 3095 | (when interactive |
| 3066 | ;; (bibtex-find-text nil nil bibtex-help-message) | 3096 | ;; (bibtex-find-text nil nil bibtex-help-message) |
| 3067 | (if (memq (preceding-char) '(?} ?\")) (forward-char -1)) | 3097 | (if (memq (preceding-char) '(?} ?\")) (forward-char -1)) |
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 0f7767697fe..9da8519d12d 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el | |||
| @@ -526,7 +526,6 @@ The break position will be always after LINEBEG and generally before point." | |||
| 526 | ;; Ok, skip at least one word or one \c| character. | 526 | ;; Ok, skip at least one word or one \c| character. |
| 527 | ;; Meanwhile, don't stop at a period followed by one space. | 527 | ;; Meanwhile, don't stop at a period followed by one space. |
| 528 | (let ((to (line-end-position)) | 528 | (let ((to (line-end-position)) |
| 529 | (fill-nobreak-predicate nil) ;to break sooner. | ||
| 530 | (first t)) | 529 | (first t)) |
| 531 | (goto-char linebeg) | 530 | (goto-char linebeg) |
| 532 | (while (and (< (point) to) (or first (fill-nobreak-p))) | 531 | (while (and (< (point) to) (or first (fill-nobreak-p))) |
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 339160db9bd..185f2e8dea3 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el | |||
| @@ -1827,7 +1827,7 @@ misspelled words backwards." | |||
| 1827 | (defun flyspell-define-abbrev (name expansion) | 1827 | (defun flyspell-define-abbrev (name expansion) |
| 1828 | (let ((table (flyspell-abbrev-table))) | 1828 | (let ((table (flyspell-abbrev-table))) |
| 1829 | (when table | 1829 | (when table |
| 1830 | (define-abbrev table name expansion)))) | 1830 | (define-abbrev table (downcase name) expansion)))) |
| 1831 | 1831 | ||
| 1832 | ;;*---------------------------------------------------------------------*/ | 1832 | ;;*---------------------------------------------------------------------*/ |
| 1833 | ;;* flyspell-auto-correct-word ... */ | 1833 | ;;* flyspell-auto-correct-word ... */ |
diff --git a/lisp/thumbs.el b/lisp/thumbs.el index af17d925d35..7df2d295c9e 100644 --- a/lisp/thumbs.el +++ b/lisp/thumbs.el | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | ;; It is used for basic browsing and viewing of images from within Emacs. | 29 | ;; It is used for basic browsing and viewing of images from within Emacs. |
| 30 | ;; Minimal image manipulation functions are also available via external | 30 | ;; Minimal image manipulation functions are also available via external |
| 31 | ;; programs. If you want to do more complex tasks like categorise and tag | 31 | ;; programs. If you want to do more complex tasks like categorise and tag |
| 32 | ;; your images, use tumme.el | 32 | ;; your images, use image-dired.el |
| 33 | ;; | 33 | ;; |
| 34 | ;; The 'convert' program from 'ImageMagick' | 34 | ;; The 'convert' program from 'ImageMagick' |
| 35 | ;; [URL:http://www.imagemagick.org/] is required. | 35 | ;; [URL:http://www.imagemagick.org/] is required. |
diff --git a/lisp/tmm.el b/lisp/tmm.el index d441db76235..f70a8cd2ea2 100644 --- a/lisp/tmm.el +++ b/lisp/tmm.el | |||
| @@ -541,15 +541,15 @@ of `menu-bar-final-items'." | |||
| 541 | ;; Make a list of all the bindings in all the keymaps. | 541 | ;; Make a list of all the bindings in all the keymaps. |
| 542 | (setq minorbind (mapcar 'cdr (minor-mode-key-binding keyseq))) | 542 | (setq minorbind (mapcar 'cdr (minor-mode-key-binding keyseq))) |
| 543 | (setq localbind (local-key-binding keyseq)) | 543 | (setq localbind (local-key-binding keyseq)) |
| 544 | (setq globalbind (cdr (global-key-binding keyseq))) | 544 | (setq globalbind (copy-sequence (cdr (global-key-binding keyseq)))) |
| 545 | 545 | ||
| 546 | ;; If items have been redefined/undefined locally, remove them from | 546 | ;; If items have been redefined/undefined locally, remove them from |
| 547 | ;; the global list. | 547 | ;; the global list. |
| 548 | (dolist (minor minorbind) | 548 | (dolist (minor minorbind) |
| 549 | (dolist (item (cdr minor)) | 549 | (dolist (item (cdr minor)) |
| 550 | (setq globalbind (assq-delete-all (car item) globalbind)))) | 550 | (setq globalbind (assq-delete-all (car-safe item) globalbind)))) |
| 551 | (dolist (item (cdr localbind)) | 551 | (dolist (item (cdr localbind)) |
| 552 | (setq globalbind (assq-delete-all (car item) globalbind))) | 552 | (setq globalbind (assq-delete-all (car-safe item) globalbind))) |
| 553 | 553 | ||
| 554 | (setq globalbind (cons 'keymap globalbind)) | 554 | (setq globalbind (cons 'keymap globalbind)) |
| 555 | (setq allbind (cons globalbind (cons localbind minorbind))) | 555 | (setq allbind (cons globalbind (cons localbind minorbind))) |
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 01c2d70870a..8c53d49fdd1 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog | |||
| @@ -1,4 +1,15 @@ | |||
| 1 | 2007-04-01 Diane Murray <disumu@x3y2z1.net> | 1 | 2007-04-15 Chong Yidong <cyd@stupidchicken.com> |
| 2 | |||
| 3 | * url-parse.el (url-generic-parse-url): Revert 2006-10-09 changes. | ||
| 4 | |||
| 5 | 2007-04-13 Chong Yidong <cyd@stupidchicken.com> | ||
| 6 | |||
| 7 | * url-http.el (url-http-parse-headers): Stop after a set number of | ||
| 8 | redirections. Suggested by Diane Murray. | ||
| 9 | |||
| 10 | * url-vars.el (url-max-redirections): New var. | ||
| 11 | |||
| 12 | 2007-04-01 Diane Murray <disumu@x3y2z1.net> (tiny change) | ||
| 2 | 13 | ||
| 3 | * url-http.el (url-http-handle-cookies): Reverse list returned by | 14 | * url-http.el (url-http-handle-cookies): Reverse list returned by |
| 4 | `mail-fetch-field', so that cookies are set in the correct order. | 15 | `mail-fetch-field', so that cookies are set in the correct order. |
| @@ -65,7 +76,7 @@ | |||
| 65 | (url-http-parse-response): Set it. | 76 | (url-http-parse-response): Set it. |
| 66 | (url-http-parse-headers): Use it to determine keep-alive behavior. | 77 | (url-http-parse-headers): Use it to determine keep-alive behavior. |
| 67 | 78 | ||
| 68 | 2006-11-23 Diane Murray <disumu@x3y2z1.net> | 79 | 2006-11-23 Diane Murray <disumu@x3y2z1.net> (tiny change) |
| 69 | 80 | ||
| 70 | * url-http.el (url-http-content-length-after-change-function): Use | 81 | * url-http.el (url-http-content-length-after-change-function): Use |
| 71 | `url-lazy-message'. | 82 | `url-lazy-message'. |
| @@ -174,7 +185,7 @@ | |||
| 174 | getenv returns an empty string for http_proxy. This prevents an | 185 | getenv returns an empty string for http_proxy. This prevents an |
| 175 | error when calling `format' later on. | 186 | error when calling `format' later on. |
| 176 | 187 | ||
| 177 | 2006-08-31 Diane Murray <disumu@x3y2z1.net> | 188 | 2006-08-31 Diane Murray <disumu@x3y2z1.net> (tiny change) |
| 178 | 189 | ||
| 179 | * url-parse.el (url-recreate-url-attributes): New function, code | 190 | * url-parse.el (url-recreate-url-attributes): New function, code |
| 180 | simply moved from `url-recreate-url'. | 191 | simply moved from `url-recreate-url'. |
| @@ -184,7 +195,7 @@ | |||
| 184 | * url-http.el (url-http-create-request): | 195 | * url-http.el (url-http-create-request): |
| 185 | Use `url-recreate-url-attributes' when setting real-fname. | 196 | Use `url-recreate-url-attributes' when setting real-fname. |
| 186 | 197 | ||
| 187 | 2006-08-29 Diane Murray <disumu@x3y2z1.net> | 198 | 2006-08-29 Diane Murray <disumu@x3y2z1.net> (tiny change) |
| 188 | 199 | ||
| 189 | * url-cookie.el (url-cookie-write-file): Really don't use versioned | 200 | * url-cookie.el (url-cookie-write-file): Really don't use versioned |
| 190 | backups. | 201 | backups. |
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 10a6f2e7278..d9ac81838d4 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el | |||
| @@ -556,21 +556,43 @@ should be shown to the user." | |||
| 556 | (let ((url-request-method url-http-method) | 556 | (let ((url-request-method url-http-method) |
| 557 | (url-request-data url-http-data) | 557 | (url-request-data url-http-data) |
| 558 | (url-request-extra-headers url-http-extra-headers)) | 558 | (url-request-extra-headers url-http-extra-headers)) |
| 559 | ;; Remember that the request was redirected. | 559 | ;; Check existing number of redirects |
| 560 | (setf (car url-callback-arguments) | 560 | (if (or (< url-max-redirections 0) |
| 561 | (nconc (list :redirect redirect-uri) | 561 | (and (> url-max-redirections 0) |
| 562 | (car url-callback-arguments))) | 562 | (let ((events (car url-callback-arguments)) |
| 563 | ;; Put in the current buffer a forwarding pointer to the new | 563 | (old-redirects 0)) |
| 564 | ;; destination buffer. | 564 | (while events |
| 565 | ;; FIXME: This is a hack to fix url-retrieve-synchronously | 565 | (if (eq (car events) :redirect) |
| 566 | ;; without changing the API. Instead url-retrieve should | 566 | (setq old-redirects (1+ old-redirects))) |
| 567 | ;; either simply not return the "destination" buffer, or it | 567 | (and (setq events (cdr events)) |
| 568 | ;; should take an optional `dest-buf' argument. | 568 | (setq events (cdr events)))) |
| 569 | (set (make-local-variable 'url-redirect-buffer) | 569 | (< old-redirects url-max-redirections)))) |
| 570 | (url-retrieve-internal | 570 | ;; url-max-redirections hasn't been reached, so go |
| 571 | redirect-uri url-callback-function | 571 | ;; ahead and redirect. |
| 572 | url-callback-arguments)) | 572 | (progn |
| 573 | (url-mark-buffer-as-dead (current-buffer)))))) | 573 | ;; Remember that the request was redirected. |
| 574 | (setf (car url-callback-arguments) | ||
| 575 | (nconc (list :redirect redirect-uri) | ||
| 576 | (car url-callback-arguments))) | ||
| 577 | ;; Put in the current buffer a forwarding pointer to the new | ||
| 578 | ;; destination buffer. | ||
| 579 | ;; FIXME: This is a hack to fix url-retrieve-synchronously | ||
| 580 | ;; without changing the API. Instead url-retrieve should | ||
| 581 | ;; either simply not return the "destination" buffer, or it | ||
| 582 | ;; should take an optional `dest-buf' argument. | ||
| 583 | (set (make-local-variable 'url-redirect-buffer) | ||
| 584 | (url-retrieve-internal | ||
| 585 | redirect-uri url-callback-function | ||
| 586 | url-callback-arguments)) | ||
| 587 | (url-mark-buffer-as-dead (current-buffer))) | ||
| 588 | ;; We hit url-max-redirections, so issue an error and | ||
| 589 | ;; stop redirecting. | ||
| 590 | (url-http-debug "Maximum redirections reached") | ||
| 591 | (setf (car url-callback-arguments) | ||
| 592 | (nconc (list :error (list 'error 'http-redirect-limit | ||
| 593 | redirect-uri)) | ||
| 594 | (car url-callback-arguments))) | ||
| 595 | (setq success t)))))) | ||
| 574 | (4 ; Client error | 596 | (4 ; Client error |
| 575 | ;; 400 Bad Request | 597 | ;; 400 Bad Request |
| 576 | ;; 401 Unauthorized | 598 | ;; 401 Unauthorized |
diff --git a/lisp/url/url-parse.el b/lisp/url/url-parse.el index 2b69c54133f..a9a0fb151e9 100644 --- a/lisp/url/url-parse.el +++ b/lisp/url/url-parse.el | |||
| @@ -108,7 +108,7 @@ | |||
| 108 | (defun url-recreate-url-attributes (urlobj) | 108 | (defun url-recreate-url-attributes (urlobj) |
| 109 | "Recreate the attributes of an URL string from the parsed URLOBJ." | 109 | "Recreate the attributes of an URL string from the parsed URLOBJ." |
| 110 | (when (url-attributes urlobj) | 110 | (when (url-attributes urlobj) |
| 111 | (concat "?" | 111 | (concat ";" |
| 112 | (mapconcat (lambda (x) | 112 | (mapconcat (lambda (x) |
| 113 | (if (cdr x) | 113 | (if (cdr x) |
| 114 | (concat (car x) "=" (cdr x)) | 114 | (concat (car x) "=" (cdr x)) |
| @@ -168,7 +168,7 @@ Format is: | |||
| 168 | (setq full t) | 168 | (setq full t) |
| 169 | (forward-char 2) | 169 | (forward-char 2) |
| 170 | (setq save-pos (point)) | 170 | (setq save-pos (point)) |
| 171 | (skip-chars-forward "^/\\?#") | 171 | (skip-chars-forward "^/") |
| 172 | (setq host (buffer-substring save-pos (point))) | 172 | (setq host (buffer-substring save-pos (point))) |
| 173 | (if (string-match "^\\([^@]+\\)@" host) | 173 | (if (string-match "^\\([^@]+\\)@" host) |
| 174 | (setq user (match-string 1 host) | 174 | (setq user (match-string 1 host) |
| @@ -189,25 +189,29 @@ Format is: | |||
| 189 | (setq port (url-scheme-get-property prot 'default-port))) | 189 | (setq port (url-scheme-get-property prot 'default-port))) |
| 190 | 190 | ||
| 191 | ;; 3.3. Path | 191 | ;; 3.3. Path |
| 192 | ;; Gross hack to preserve ';' in data URLs | ||
| 192 | (setq save-pos (point)) | 193 | (setq save-pos (point)) |
| 193 | (skip-chars-forward "^#?") | ||
| 194 | (setq file (buffer-substring save-pos (point))) | ||
| 195 | 194 | ||
| 196 | ;; 3.4. Query | 195 | ;; 3.4. Query |
| 197 | (when (looking-at "\\?") | 196 | (if (string= "data" prot) |
| 198 | (forward-char 1) | 197 | (goto-char (point-max)) |
| 199 | (setq save-pos (point)) | 198 | ;; Now check for references |
| 200 | (skip-chars-forward "^#") | 199 | (skip-chars-forward "^#") |
| 201 | ;; RFC 3986 specifies no general way of parsing the query | 200 | (if (eobp) |
| 202 | ;; string, but `url-parse-args' seems universal enough. | 201 | nil |
| 203 | (setq attr (url-parse-args (buffer-substring save-pos (point)) t) | 202 | (delete-region |
| 204 | attr (nreverse attr))) | 203 | (point) |
| 205 | 204 | (progn | |
| 206 | ;; 3.5. Fragment | 205 | (skip-chars-forward "#") |
| 207 | (when (looking-at "#") | 206 | (setq refs (buffer-substring (point) (point-max))) |
| 208 | (forward-char 1) | 207 | (point-max)))) |
| 209 | (setq refs (buffer-substring (point) (point-max)))) | 208 | (goto-char save-pos) |
| 209 | (skip-chars-forward "^;") | ||
| 210 | (if (not (eobp)) | ||
| 211 | (setq attr (url-parse-args (buffer-substring (point) (point-max)) t) | ||
| 212 | attr (nreverse attr)))) | ||
| 210 | 213 | ||
| 214 | (setq file (buffer-substring save-pos (point))) | ||
| 211 | (if (and host (string-match "%[0-9][0-9]" host)) | 215 | (if (and host (string-match "%[0-9][0-9]" host)) |
| 212 | (setq host (url-unhex-string host))) | 216 | (setq host (url-unhex-string host))) |
| 213 | (vector prot user pass host port file refs attr full)))))) | 217 | (vector prot user pass host port file refs attr full)))))) |
diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el index 705eb947001..d0bd9a84c05 100644 --- a/lisp/url/url-vars.el +++ b/lisp/url/url-vars.el | |||
| @@ -320,6 +320,12 @@ undefined." | |||
| 320 | "\\`\\([-a-zA-Z0-9+.]+:\\)" | 320 | "\\`\\([-a-zA-Z0-9+.]+:\\)" |
| 321 | "A regular expression that will match an absolute URL.") | 321 | "A regular expression that will match an absolute URL.") |
| 322 | 322 | ||
| 323 | (defcustom url-max-redirections 30 | ||
| 324 | "*The maximum number of redirection requests to honor in a HTTP connection. | ||
| 325 | A negative number means to honor an unlimited number of redirection requests." | ||
| 326 | :type 'integer | ||
| 327 | :group 'url) | ||
| 328 | |||
| 323 | (defcustom url-confirmation-func 'y-or-n-p | 329 | (defcustom url-confirmation-func 'y-or-n-p |
| 324 | "*What function to use for asking yes or no functions. | 330 | "*What function to use for asking yes or no functions. |
| 325 | Possible values are `yes-or-no-p' or `y-or-n-p', or any function that | 331 | Possible values are `yes-or-no-p' or `y-or-n-p', or any function that |
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index c7981180c10..9c791631e33 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el | |||
| @@ -84,7 +84,7 @@ | |||
| 84 | :group 'hypermedia) | 84 | :group 'hypermedia) |
| 85 | 85 | ||
| 86 | (defgroup widget-documentation nil | 86 | (defgroup widget-documentation nil |
| 87 | "Options controling the display of documentation strings." | 87 | "Options controlling the display of documentation strings." |
| 88 | :group 'widgets) | 88 | :group 'widgets) |
| 89 | 89 | ||
| 90 | (defgroup widget-faces nil | 90 | (defgroup widget-faces nil |