diff options
| author | Karoly Lorentey | 2006-02-23 03:17:52 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2006-02-23 03:17:52 +0000 |
| commit | 5a5654159aeca7b60bfceb8d68f4add0570efc7a (patch) | |
| tree | eb9da5ea0ca4c025dc76a66eb1ede78a1cc88bc7 | |
| parent | 5f3c1a63f31f77f60b8a60518ce3eda6a51f72b9 (diff) | |
| parent | e75116edb6280346c671aa5a5c022776b0ca1c01 (diff) | |
| download | emacs-5a5654159aeca7b60bfceb8d68f4add0570efc7a.tar.gz emacs-5a5654159aeca7b60bfceb8d68f4add0570efc7a.zip | |
Merged from emacs@sv.gnu.org
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-111
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-112
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-113
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-114
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-115
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-518
37 files changed, 1096 insertions, 404 deletions
diff --git a/etc/ChangeLog b/etc/ChangeLog index 8c1e5782db5..61fec42dbe2 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2006-02-22 Carsten Dominik <dominik@science.uva.nl> | ||
| 2 | |||
| 3 | * orgcard.tex: (section{Links}): Rewritten to cover the modified | ||
| 4 | link system. | ||
| 5 | |||
| 1 | 2006-02-18 Bill Wohler <wohler@newt.com> | 6 | 2006-02-18 Bill Wohler <wohler@newt.com> |
| 2 | 7 | ||
| 3 | Release MH-E version 7.92. | 8 | Release MH-E version 7.92. |
diff --git a/etc/orgcard.tex b/etc/orgcard.tex index 064d9decc95..caccb7622eb 100644 --- a/etc/orgcard.tex +++ b/etc/orgcard.tex | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | % Reference Card for Org Mode 4.04 | 1 | % Reference Card for Org Mode 4.05 |
| 2 | % | 2 | % |
| 3 | %**start of header | 3 | %**start of header |
| 4 | \newcount\columnsperpage | 4 | \newcount\columnsperpage |
| 5 | 5 | ||
| 6 | % This file can be printed with 1, 2, or 3 columns per page (see below). | 6 | % This file can be printed with 1, 2, or 3 columns per page (see below). |
| 7 | % At the moment this card works quite nicely in 3 column format and | 7 | % At the moment this card works quite nicely in 3 column format and |
| 8 | % currently takes 2 full pages. It is thus suited to producing one | 8 | % currently takes 2 full pages. It is thus suited to producing one |
| 9 | % double-side page when printed. | 9 | % double-side page when printed. |
| 10 | 10 | ||
| 11 | % There are a couple of tweaks in the format of this card which make it work | 11 | % There are a couple of tweaks in the format of this card which make it work |
| @@ -18,8 +18,7 @@ | |||
| 18 | 18 | ||
| 19 | \columnsperpage=3 | 19 | \columnsperpage=3 |
| 20 | 20 | ||
| 21 | % Copyright (C) 2005, 2006 Free Software Foundation, Inc. | 21 | % Copyright (c) 2004 Philip Rooke, 2005, 2006 Free Software Foundation |
| 22 | % Copyright (c) 2004 Philip Rooke | ||
| 23 | 22 | ||
| 24 | % GNU Emacs is free software; you can redistribute it and/or modify | 23 | % GNU Emacs is free software; you can redistribute it and/or modify |
| 25 | % it under the terms of the GNU General Public License as published by | 24 | % it under the terms of the GNU General Public License as published by |
| @@ -59,7 +58,7 @@ | |||
| 59 | % Thanks to Paul Rubin, Bob Chassell, Len Tower, and Richard Mlynarik | 58 | % Thanks to Paul Rubin, Bob Chassell, Len Tower, and Richard Mlynarik |
| 60 | % for their many good ideas. | 59 | % for their many good ideas. |
| 61 | 60 | ||
| 62 | \def\orgversionnumber{4.04} | 61 | \def\orgversionnumber{4.05} |
| 63 | \def\year{2006} | 62 | \def\year{2006} |
| 64 | 63 | ||
| 65 | \def\shortcopyrightnotice{\vskip 1ex plus 2 fill | 64 | \def\shortcopyrightnotice{\vskip 1ex plus 2 fill |
| @@ -89,7 +88,7 @@ are preserved on all copies. | |||
| 89 | 88 | ||
| 90 | \def\ncolumns{\the\columnsperpage} | 89 | \def\ncolumns{\the\columnsperpage} |
| 91 | 90 | ||
| 92 | \message{[\ncolumns\space | 91 | \message{[\ncolumns\space |
| 93 | column\if 1\ncolumns\else s\fi\space per page]} | 92 | column\if 1\ncolumns\else s\fi\space per page]} |
| 94 | 93 | ||
| 95 | \def\scaledmag#1{ scaled \magstep #1} | 94 | \def\scaledmag#1{ scaled \magstep #1} |
| @@ -174,7 +173,7 @@ are preserved on all copies. | |||
| 174 | \def\bye{\par\vfill\supereject | 173 | \def\bye{\par\vfill\supereject |
| 175 | \if a\abc \else\null\vfill\eject\fi | 174 | \if a\abc \else\null\vfill\eject\fi |
| 176 | \if a\abc \else\null\vfill\eject\fi | 175 | \if a\abc \else\null\vfill\eject\fi |
| 177 | \end} | 176 | \end} |
| 178 | \fi | 177 | \fi |
| 179 | 178 | ||
| 180 | % we won't be using math mode much, so redefine some of the characters | 179 | % we won't be using math mode much, so redefine some of the characters |
| @@ -356,18 +355,8 @@ To set archive location for current file, add a line like$^3$: | |||
| 356 | \key{raise priority of current item}{S-UP$^4$} | 355 | \key{raise priority of current item}{S-UP$^4$} |
| 357 | \key{lower priority of current item}{S-DOWN$^4$} | 356 | \key{lower priority of current item}{S-DOWN$^4$} |
| 358 | 357 | ||
| 359 | \vskip 1mm | 358 | \key{\kbd{\#+SEQ_TODO: TODO TRY BLUFF DONE}}{\rm todo workflow} |
| 360 | per-file TODO workflow states: add line(s) like$^3$: | 359 | \key{\kbd{\#+TYP_TODO: Phil home work DONE}}{\rm todo types} |
| 361 | \vskip -1mm | ||
| 362 | \beginexample% | ||
| 363 | \#+SEQ_TODO: TODO PROCRASTINATE BLUFF DONE | ||
| 364 | \endexample | ||
| 365 | \vskip -1mm | ||
| 366 | per-file TODO keywords: add line(s) like$^3$: | ||
| 367 | \vskip -1mm | ||
| 368 | \beginexample% | ||
| 369 | \#+TYP_TODO: Phil home work DONE | ||
| 370 | \endexample | ||
| 371 | 360 | ||
| 372 | \section{Timestamps} | 361 | \section{Timestamps} |
| 373 | 362 | ||
| @@ -398,21 +387,26 @@ per-file TODO keywords: add line(s) like$^3$: | |||
| 398 | \key{insert a link (TAB completes stored links)}{C-c C-l} | 387 | \key{insert a link (TAB completes stored links)}{C-c C-l} |
| 399 | \key{insert file link with file name completion}{C-u C-c C-l} | 388 | \key{insert file link with file name completion}{C-u C-c C-l} |
| 400 | 389 | ||
| 401 | \key{open link at point}{C-c C-o} | 390 | \key{open file links in emacs (\kbd{C-u} : in emacs)}{C-c C-o} |
| 402 | \key{open file links in emacs}{C-u C-c C-o} | 391 | \key{open link at point (3: in emacs)}{mouse-2/3} |
| 403 | \key{open link at point}{mouse-2} | 392 | %\key{open file links in emacs}{mouse-3} |
| 404 | \key{open file links in emacs}{mouse-3} | 393 | \key{record a position in mark ring}{C-c \%} |
| 394 | \key{jump back to last followed link(s)}{C-c \&} | ||
| 395 | |||
| 396 | {\bf Internal Links} | ||
| 397 | |||
| 398 | \key{\kbd{<<My Target>>}}{\rm target} | ||
| 399 | \key{\kbd{<<<My Target>>>}}{\rm radio target$^3$} | ||
| 400 | \key{\kbd{[[*this text]]}}{\rm find headline} | ||
| 401 | \metax{\kbd{[[this text]]}}{\rm find target or text in buffer} | ||
| 405 | 402 | ||
| 406 | {\bf Link types} | 403 | {\bf External Links} |
| 407 | 404 | ||
| 408 | \key{\kbd{*CamelCaseWord}}{\rm search headline} | ||
| 409 | \key{\kbd{CamelCaseWord}}{\rm search in buffer} | ||
| 410 | \key{\kbd{<file:/home/dominik/img/mars.jpg>}}{\rm file, absolute} | 405 | \key{\kbd{<file:/home/dominik/img/mars.jpg>}}{\rm file, absolute} |
| 411 | \key{\kbd{<file:papers/last.pdf>}}{\rm file, relative} | 406 | \key{\kbd{<file:papers/last.pdf>}}{\rm file, relative} |
| 412 | \key{\kbd{<file:~/code/main.c:255>}}{\rm file with line nr.} | 407 | \key{\kbd{<file:projects.org::*that text>}}{\rm find headline} |
| 413 | \key{\kbd{<file:projects.org::*CamelCaseWord>}}{\rm search headline} | 408 | \key{\kbd{<file:projects.org::find me>}}{\rm find tgt/string} |
| 414 | \key{\kbd{<file:projects.org::find me>}}{\rm search string} | 409 | \key{\kbd{<file:projects.org::/regexp/>}}{\rm regexp search} |
| 415 | \key{\kbd{<file:projects.org::/regexp/>}}{\rm search regexp} | ||
| 416 | \key{\kbd{<http://www.astro.uva.nl/~dominik>}}{\rm on the web} | 410 | \key{\kbd{<http://www.astro.uva.nl/~dominik>}}{\rm on the web} |
| 417 | \key{\kbd{<mailto:adent@galaxy.net>}}{\rm EMail address} | 411 | \key{\kbd{<mailto:adent@galaxy.net>}}{\rm EMail address} |
| 418 | \key{\kbd{<news:comp.emacs>}}{\rm Usenet group} | 412 | \key{\kbd{<news:comp.emacs>}}{\rm Usenet group} |
| @@ -420,15 +414,9 @@ per-file TODO keywords: add line(s) like$^3$: | |||
| 420 | \key{\kbd{<shell:ls *.org>}}{\rm shell command} | 414 | \key{\kbd{<shell:ls *.org>}}{\rm shell command} |
| 421 | \key{\kbd{<gnus:group>}}{\rm GNUS group} | 415 | \key{\kbd{<gnus:group>}}{\rm GNUS group} |
| 422 | \key{\kbd{<gnus:group\#id>}}{\rm GNUS message} | 416 | \key{\kbd{<gnus:group\#id>}}{\rm GNUS message} |
| 423 | \key{\kbd{<vm:folder>}}{\rm VM folder} | 417 | \key{\kbd{<vm|wl|mhe|rmail:folder>}}{\rm Mail folder} |
| 424 | \key{\kbd{<vm:folder\#id>}}{\rm VM message} | 418 | \key{\kbd{<vm|wl|mhe|rmail:folder\#id>}}{\rm Mail message} |
| 425 | % FIXME: would like to get this back in. | ||
| 426 | %\key{\kbd{<vm://myself@some.where.org/folder\#id>}}{\rm VM remote} | 419 | %\key{\kbd{<vm://myself@some.where.org/folder\#id>}}{\rm VM remote} |
| 427 | Wanderlust \kbd{<wl:...>} and RMAIL \kbd{<rmail:...>} like VM | ||
| 428 | %\key{\kbd{<wl:folder>}}{\rm Wanderlust f.} | ||
| 429 | %\key{\kbd{<wl:folder\#id>}}{\rm Wanderlust m.} | ||
| 430 | %\key{\kbd{<rmail:folder>}}{\rm RMAIL folder} | ||
| 431 | %\key{\kbd{<rmail:folder\#id>}}{\rm RMAIL msg} | ||
| 432 | 420 | ||
| 433 | \section{Tables} | 421 | \section{Tables} |
| 434 | 422 | ||
| @@ -711,7 +699,7 @@ an org file. In the file, find a location with: | |||
| 711 | \key{next heading}{DOWN} | 699 | \key{next heading}{DOWN} |
| 712 | \key{previous heading}{UP} | 700 | \key{previous heading}{UP} |
| 713 | 701 | ||
| 714 | Insert the note with one of the following: | 702 | Insert the note with one of the following: |
| 715 | 703 | ||
| 716 | \key{as sublevel of heading at cursor}{RET} | 704 | \key{as sublevel of heading at cursor}{RET} |
| 717 | \key{right here (cursor not on heading)}{RET} | 705 | \key{right here (cursor not on heading)}{RET} |
| @@ -741,8 +729,8 @@ Emacs, or an XEmacs package. | |||
| 741 | $^2$ This is only a suggestion for a binding of this command. Choose | 729 | $^2$ This is only a suggestion for a binding of this command. Choose |
| 742 | you own key as shown under INSTALLATION. | 730 | you own key as shown under INSTALLATION. |
| 743 | 731 | ||
| 744 | $^3$ After changing a \kbd{\#+KEYWORD} line, press \kbd{C-c C-c} with | 732 | $^3$ After changing a \kbd{\#+KEYWORD} or \kbd{<<<target>>>} line, |
| 745 | the cursor still in a line to make Org-mode notice the change. | 733 | press \kbd{C-c C-c} with the cursor still in the line to update. |
| 746 | 734 | ||
| 747 | $^4$ Keybinding affected by {\tt org-CUA-compatibility}. | 735 | $^4$ Keybinding affected by {\tt org-CUA-compatibility}. |
| 748 | 736 | ||
| @@ -753,7 +741,7 @@ $^4$ Keybinding affected by {\tt org-CUA-compatibility}. | |||
| 753 | 741 | ||
| 754 | % arch-tag: 139f6750-5cfc-49ca-92b5-237fe5795290 | 742 | % arch-tag: 139f6750-5cfc-49ca-92b5-237fe5795290 |
| 755 | 743 | ||
| 756 | %%% Local Variables: | 744 | %%% Local Variables: |
| 757 | %%% mode: latex | 745 | %%% mode: latex |
| 758 | %%% TeX-master: t | 746 | %%% TeX-master: t |
| 759 | %%% End: | 747 | %%% End: |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 32f4d243fce..fd03764b8d0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,100 @@ | |||
| 1 | 2006-02-23 Nick Roberts <nickrob@snap.net.nz> | ||
| 2 | |||
| 3 | * progmodes/gdb-ui.el (gdb-signalled): New variable and function. | ||
| 4 | (gdb-debug-log-ring): Rename from gdb-debug-log and make a ring. | ||
| 5 | (gdb-send, gdb-send-item, gud-gdba-marker-filter): Use it. | ||
| 6 | (gdb-debug-log-length): Customize it's length. | ||
| 7 | (gud-watch, gdb-var-create-handler): Display function::var format | ||
| 8 | but don't use to create variable object. | ||
| 9 | (gdb-var-create-handler): Use message-box in place of message. | ||
| 10 | (gdb-stopped): Call gdb-exited if signalled. | ||
| 11 | |||
| 12 | 2006-02-22 Carsten Dominik <dominik@science.uva.nl> | ||
| 13 | |||
| 14 | * textmodes/reftex.el (reftex-locate-file): Removed duplicate | ||
| 15 | function. | ||
| 16 | |||
| 17 | * textmodes/reftex-vars.el: (reftex-try-all-extensions): New | ||
| 18 | option. | ||
| 19 | |||
| 20 | * textmodes/reftex.el: (reftex-locate-file): Search all extensions | ||
| 21 | if `reftex-try-all-extensions' is set. | ||
| 22 | |||
| 23 | * textmodes/org.el: (org-mark-ring-previous, org-mark-ring-set): | ||
| 24 | New commands. | ||
| 25 | (org-mark-ring): New variable. | ||
| 26 | (org-mark-ring-length): New option. | ||
| 27 | (org-open-at-point, org-goto, org-open-file): Push old position | ||
| 28 | onto the mark ring. | ||
| 29 | (org-add-hook): New function. | ||
| 30 | (org-export-table-remove-special-lines): New option. | ||
| 31 | (org-skip-comments, org-format-org-table-html): Respect new option | ||
| 32 | `org-export-table-remove-special-lines'. | ||
| 33 | (org-open-file): Allow special command configuration for directory | ||
| 34 | link. | ||
| 35 | (org-file-apps): Fixed bugs in customize type, added setting for | ||
| 36 | directories. | ||
| 37 | (org-activate-tags, org-format-agenda-item, org-complete) | ||
| 38 | (org-get-tags-at, org-scan-tags, org-make-tags-matcher) | ||
| 39 | (org-get-tags, org-get-buffer-tags, org-open-at-point) | ||
| 40 | (org-link-search, org-make-org-heading-search-string) | ||
| 41 | (org-make-org-heading-camel): Allow @ and 0-9 as tags characters. | ||
| 42 | (org-radio-targets, org-file-link-context-use-camel-case) | ||
| 43 | (org-activate-camels): New options. | ||
| 44 | (org-update-radio-target-regexp, org-all-targets) | ||
| 45 | (org-make-target-link-regexp, org-activate-target-links): New | ||
| 46 | functions. | ||
| 47 | (org-make-org-heading-search-string): New function. | ||
| 48 | (org-store-link, org-insert-link): Use new option | ||
| 49 | `org-file-link-context-use-camel-case'. | ||
| 50 | (org-activate-camels): Use new option `org-activate-camels'. | ||
| 51 | (org-link-regexp): Added mhe prefix. | ||
| 52 | (org-open-at-point,org-store-link): Support for mhe links. | ||
| 53 | (org-mhe-get-message-id, org-mhe-get-message-folder) | ||
| 54 | (org-mhe-get-header,org-follow-mhe-link): New functions. | ||
| 55 | (org-remove-angle-brackets, org-add-angle-brackets): New | ||
| 56 | functions. | ||
| 57 | (org-bracked-link-regexp): New constant. | ||
| 58 | (org-read-date): Fixed bug that was rejecting all typed dates. | ||
| 59 | (org-link-search): Make hierarchy above visible after a match. | ||
| 60 | (org-follow-bbdb-link): Inhibit electric mode for BBDB. | ||
| 61 | (org-store-link): Fixed bug with link creation when cursor is in | ||
| 62 | an empty line. | ||
| 63 | (org-open-at-point): Fixed bug with matching a link. Fixed buggy | ||
| 64 | argument sequence in call to `org-view-tags'. | ||
| 65 | (org-compile-prefix-format): Set `org-prefix-has-tag'. | ||
| 66 | (org-prefix-has-tag): New variable. | ||
| 67 | (org-format-agenda-item): Remove tags from headline if | ||
| 68 | appropriate. | ||
| 69 | (org-agenda-remove-tags-when-in-prefix): New option. | ||
| 70 | |||
| 71 | 2006-02-21 Michael Kifer <kifer@cs.stonybrook.edu> | ||
| 72 | |||
| 73 | * ediff-diff.el (ediff-setup-diff-regions, ediff-setup-diff-regions3): | ||
| 74 | fix the regular expressions. | ||
| 75 | |||
| 76 | 2006-02-21 Richard M. Stallman <rms@gnu.org> | ||
| 77 | |||
| 78 | * progmodes/sh-script.el (sh-mode): Set shell type based on file name | ||
| 79 | if there's no other specific basis. | ||
| 80 | |||
| 81 | * emacs-lisp/unsafep.el (unsafep): Don't treat &rest or &optional | ||
| 82 | as variables at all. | ||
| 83 | (unsafep-variable): Rename arg; doc fix. | ||
| 84 | |||
| 85 | * abbrevlist.el (list-one-abbrev-table): Add autoload. | ||
| 86 | |||
| 87 | * calendar/appt.el (diary-selective-display): Add defvar. | ||
| 88 | |||
| 89 | * sort.el (sort-columns): Use Posix arg syntax for `sort'. | ||
| 90 | |||
| 91 | * isearch.el (search-whitespace-regexp): Fix custom type. | ||
| 92 | |||
| 93 | * help.el (describe-key-briefly): Compute interactive args | ||
| 94 | in same was as before previous change. | ||
| 95 | |||
| 96 | * files.el (enable-local-variables): Doc fix. | ||
| 97 | |||
| 1 | 2006-02-21 Kim F. Storm <storm@cua.dk> | 98 | 2006-02-21 Kim F. Storm <storm@cua.dk> |
| 2 | 99 | ||
| 3 | * fringe.el: Cleanup as file is now pre-loaded. | 100 | * fringe.el: Cleanup as file is now pre-loaded. |
diff --git a/lisp/abbrevlist.el b/lisp/abbrevlist.el index bd3482f974b..d52ccffeb3c 100644 --- a/lisp/abbrevlist.el +++ b/lisp/abbrevlist.el | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | 28 | ||
| 29 | ;;; Code: | 29 | ;;; Code: |
| 30 | 30 | ||
| 31 | ;;;###autoload | ||
| 31 | (defun list-one-abbrev-table (abbrev-table output-buffer) | 32 | (defun list-one-abbrev-table (abbrev-table output-buffer) |
| 32 | "Display alphabetical listing of ABBREV-TABLE in buffer OUTPUT-BUFFER." | 33 | "Display alphabetical listing of ABBREV-TABLE in buffer OUTPUT-BUFFER." |
| 33 | (with-output-to-temp-buffer output-buffer | 34 | (with-output-to-temp-buffer output-buffer |
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el index 571b4ec132a..bce30a1de20 100644 --- a/lisp/calendar/appt.el +++ b/lisp/calendar/appt.el | |||
| @@ -78,6 +78,7 @@ | |||
| 78 | ;; Make sure calendar is loaded when we compile this. | 78 | ;; Make sure calendar is loaded when we compile this. |
| 79 | (require 'calendar) | 79 | (require 'calendar) |
| 80 | 80 | ||
| 81 | (defvar diary-selective-display) | ||
| 81 | 82 | ||
| 82 | ;;;###autoload | 83 | ;;;###autoload |
| 83 | (defcustom appt-issue-message t | 84 | (defcustom appt-issue-message t |
diff --git a/lisp/ediff-diff.el b/lisp/ediff-diff.el index 62a6386584e..013ed9073db 100644 --- a/lisp/ediff-diff.el +++ b/lisp/ediff-diff.el | |||
| @@ -251,7 +251,8 @@ one optional arguments, diff-number to refine.") | |||
| 251 | ;; ediff-setup-diff-regions3, which takes 4 arguments. | 251 | ;; ediff-setup-diff-regions3, which takes 4 arguments. |
| 252 | (defun ediff-setup-diff-regions (file-A file-B file-C) | 252 | (defun ediff-setup-diff-regions (file-A file-B file-C) |
| 253 | ;; looking for '-c', '-i', or a 'c', 'i' among clustered non-long options | 253 | ;; looking for '-c', '-i', or a 'c', 'i' among clustered non-long options |
| 254 | (if (string-match "^-[ci]\\| -[ci]\\|-[^- ]+[ci]" ediff-diff-options) | 254 | (if (string-match "^-[ci]\\| -[ci]\\|\\(^\\| \\)-[^- ]+[ci]" |
| 255 | ediff-diff-options) | ||
| 255 | (error "Options `-c' and `-i' are not allowed in `ediff-diff-options'")) | 256 | (error "Options `-c' and `-i' are not allowed in `ediff-diff-options'")) |
| 256 | 257 | ||
| 257 | ;; create, if it doesn't exist | 258 | ;; create, if it doesn't exist |
| @@ -1215,7 +1216,7 @@ delimiter regions")) | |||
| 1215 | ;; or it is the ancestor file. | 1216 | ;; or it is the ancestor file. |
| 1216 | (defun ediff-setup-diff-regions3 (file-A file-B file-C) | 1217 | (defun ediff-setup-diff-regions3 (file-A file-B file-C) |
| 1217 | ;; looking for '-i' or a 'i' among clustered non-long options | 1218 | ;; looking for '-i' or a 'i' among clustered non-long options |
| 1218 | (if (string-match "^-i\\| -i\\|-[^- ]+i" ediff-diff-options) | 1219 | (if (string-match "^-i\\| -i\\|\\(^\\| \\)-[^- ]+i" ediff-diff-options) |
| 1219 | (error "Option `-i' is not allowed in `ediff-diff3-options'")) | 1220 | (error "Option `-i' is not allowed in `ediff-diff3-options'")) |
| 1220 | 1221 | ||
| 1221 | (or (ediff-buffer-live-p ediff-diff-buffer) | 1222 | (or (ediff-buffer-live-p ediff-diff-buffer) |
diff --git a/lisp/emacs-lisp/unsafep.el b/lisp/emacs-lisp/unsafep.el index 41e98694c71..aeaf653aef6 100644 --- a/lisp/emacs-lisp/unsafep.el +++ b/lisp/emacs-lisp/unsafep.el | |||
| @@ -148,10 +148,10 @@ of symbols with local bindings." | |||
| 148 | ((eq fun 'lambda) | 148 | ((eq fun 'lambda) |
| 149 | ;;First arg is temporary bindings | 149 | ;;First arg is temporary bindings |
| 150 | (mapc #'(lambda (x) | 150 | (mapc #'(lambda (x) |
| 151 | (let ((y (unsafep-variable x t))) | ||
| 152 | (if y (throw 'unsafep y))) | ||
| 153 | (or (memq x '(&optional &rest)) | 151 | (or (memq x '(&optional &rest)) |
| 154 | (push x unsafep-vars))) | 152 | (let ((y (unsafep-variable x t))) |
| 153 | (if y (throw 'unsafep y)) | ||
| 154 | (push x unsafep-vars)))) | ||
| 155 | (cadr form)) | 155 | (cadr form)) |
| 156 | (unsafep-progn (cddr form))) | 156 | (unsafep-progn (cddr form))) |
| 157 | ((eq fun 'let) | 157 | ((eq fun 'let) |
| @@ -247,17 +247,16 @@ and throws a reason to `unsafep' if unsafe. Returns SYM." | |||
| 247 | (if reason (throw 'unsafep reason)) | 247 | (if reason (throw 'unsafep reason)) |
| 248 | sym)) | 248 | sym)) |
| 249 | 249 | ||
| 250 | (defun unsafep-variable (sym global-okay) | 250 | (defun unsafep-variable (sym to-bind) |
| 251 | "Return nil if SYM is safe as a let-binding sym | 251 | "Return nil if SYM is safe to set or bind, or a reason why not. |
| 252 | \(because it already has a temporary binding or is a non-risky buffer-local | 252 | If TO-BIND is nil, check whether SYM is safe to set. |
| 253 | variable), otherwise a reason why it is unsafe. Failing to be locally bound | 253 | If TO-BIND is t, check whether SYM is safe to bind." |
| 254 | is okay if GLOBAL-OKAY is non-nil." | ||
| 255 | (cond | 254 | (cond |
| 256 | ((not (symbolp sym)) | 255 | ((not (symbolp sym)) |
| 257 | `(variable ,sym)) | 256 | `(variable ,sym)) |
| 258 | ((risky-local-variable-p sym nil) | 257 | ((risky-local-variable-p sym nil) |
| 259 | `(risky-local-variable ,sym)) | 258 | `(risky-local-variable ,sym)) |
| 260 | ((not (or global-okay | 259 | ((not (or to-bind |
| 261 | (memq sym unsafep-vars) | 260 | (memq sym unsafep-vars) |
| 262 | (local-variable-p sym))) | 261 | (local-variable-p sym))) |
| 263 | `(global-variable ,sym)))) | 262 | `(global-variable ,sym)))) |
diff --git a/lisp/files.el b/lisp/files.el index 9cfaf557ec7..13cc7e7da10 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -447,10 +447,11 @@ use `before-save-hook'.") | |||
| 447 | The value can be t, nil or something else. | 447 | The value can be t, nil or something else. |
| 448 | 448 | ||
| 449 | A value of t means file local variables specifications are obeyed | 449 | A value of t means file local variables specifications are obeyed |
| 450 | if all the specified variables are safe. If any variables are | 450 | if all the specified variable values are safe; if any values are |
| 451 | not safe, you will be queries before setting them. | 451 | not safe, Emacs queries you, once, whether to set them all. |
| 452 | A value of nil means file local variables are ignored. | 452 | |
| 453 | Any other value means to always query. | 453 | A value of nil means always ignore the file local variables. |
| 454 | Any other value means always query you once whether to set them all. | ||
| 454 | 455 | ||
| 455 | This variable also controls use of major modes specified in | 456 | This variable also controls use of major modes specified in |
| 456 | a -*- line. | 457 | a -*- line. |
diff --git a/lisp/help.el b/lisp/help.el index 02045948ecb..f74293b8dd6 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -579,12 +579,8 @@ temporarily enables it to allow getting help on disabled items and buttons." | |||
| 579 | (setq key (read-key-sequence "Describe key (or click or menu item): ")) | 579 | (setq key (read-key-sequence "Describe key (or click or menu item): ")) |
| 580 | (list | 580 | (list |
| 581 | key | 581 | key |
| 582 | (prefix-numeric-value current-prefix-arg) | 582 | (if current-prefix-arg (prefix-numeric-value current-prefix-arg)) |
| 583 | ;; If KEY is a down-event, read the corresponding up-event | 583 | 1)) |
| 584 | ;; and use it as the third argument. | ||
| 585 | (if (and (consp key) (symbolp (car key)) | ||
| 586 | (memq 'down (cdr (get (car key) 'event-symbol-elements)))) | ||
| 587 | (read-event)))) | ||
| 588 | ;; Put yank-menu back as it was, if we changed it. | 584 | ;; Put yank-menu back as it was, if we changed it. |
| 589 | (when saved-yank-menu | 585 | (when saved-yank-menu |
| 590 | (setq yank-menu (copy-sequence saved-yank-menu)) | 586 | (setq yank-menu (copy-sequence saved-yank-menu)) |
diff --git a/lisp/isearch.el b/lisp/isearch.el index ace20881737..0a85f10cf40 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -116,8 +116,11 @@ When you put a space or spaces in the incremental regexp, it stands for | |||
| 116 | this, unless it is inside of a regexp construct such as [...] or *, + or ?. | 116 | this, unless it is inside of a regexp construct such as [...] or *, + or ?. |
| 117 | You might want to use something like \"[ \\t\\r\\n]+\" instead. | 117 | You might want to use something like \"[ \\t\\r\\n]+\" instead. |
| 118 | In the Customization buffer, that is `[' followed by a space, | 118 | In the Customization buffer, that is `[' followed by a space, |
| 119 | a tab, a carriage return (control-M), a newline, and `]+'." | 119 | a tab, a carriage return (control-M), a newline, and `]+'. |
| 120 | :type 'regexp | 120 | |
| 121 | When this is nil, each space you type matches literally, against one space." | ||
| 122 | :type '(choice (const :tag "Find Spaces Literally" nil) | ||
| 123 | regexp) | ||
| 121 | :group 'isearch) | 124 | :group 'isearch) |
| 122 | 125 | ||
| 123 | (defcustom search-invisible 'open | 126 | (defcustom search-invisible 'open |
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index accb359bc38..a1043c6c6ee 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2006-02-21 Eric Ding <ericding@alum.mit.edu> | ||
| 2 | |||
| 3 | * mh-e.el (mh-invisible-header-fields-internal): Added entry | ||
| 4 | "X-Sasl-enc:" | ||
| 5 | |||
| 1 | 2006-02-20 Eric Ding <ericding@alum.mit.edu> | 6 | 2006-02-20 Eric Ding <ericding@alum.mit.edu> |
| 2 | 7 | ||
| 3 | * mh-e.el (mh-invisible-header-fields-internal): Added entries | 8 | * mh-e.el (mh-invisible-header-fields-internal): Added entries |
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index 134c88bec25..5a07524aec4 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el | |||
| @@ -2395,7 +2395,8 @@ of citations entirely, choose \"None\"." | |||
| 2395 | "X-SBPass:" ; Spam | 2395 | "X-SBPass:" ; Spam |
| 2396 | "X-SBRule:" ; Spam | 2396 | "X-SBRule:" ; Spam |
| 2397 | "X-SMTP-" | 2397 | "X-SMTP-" |
| 2398 | "X-Scanned-By" | 2398 | "X-Sasl-enc:" ; Apple Mail |
| 2399 | "X-Scanned-By:" | ||
| 2399 | "X-Sender:" | 2400 | "X-Sender:" |
| 2400 | "X-Server-Date:" | 2401 | "X-Server-Date:" |
| 2401 | "X-Server-Uuid:" | 2402 | "X-Server-Uuid:" |
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index df603dc0d74..7e0cda786c7 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -123,6 +123,7 @@ and #define directives otherwise.") | |||
| 123 | (defvar gdb-macro-info nil | 123 | (defvar gdb-macro-info nil |
| 124 | "Non-nil if GDB knows that the inferior includes preprocessor macro info.") | 124 | "Non-nil if GDB knows that the inferior includes preprocessor macro info.") |
| 125 | (defvar gdb-buffer-fringe-width nil) | 125 | (defvar gdb-buffer-fringe-width nil) |
| 126 | (defvar gdb-signalled nil) | ||
| 126 | 127 | ||
| 127 | (defvar gdb-buffer-type nil | 128 | (defvar gdb-buffer-type nil |
| 128 | "One of the symbols bound in `gdb-buffer-rules'.") | 129 | "One of the symbols bound in `gdb-buffer-rules'.") |
| @@ -258,11 +259,20 @@ detailed description of this mode. | |||
| 258 | (gdb command-line) | 259 | (gdb command-line) |
| 259 | (gdb-init-1)) | 260 | (gdb-init-1)) |
| 260 | 261 | ||
| 261 | (defvar gdb-debug-log nil) | 262 | (defcustom gdb-debug-log-length 128 |
| 263 | "Length of `gdb-debug-log-ring'." | ||
| 264 | :group 'gud | ||
| 265 | :type 'integer | ||
| 266 | :version "22.1") | ||
| 267 | |||
| 268 | (defvar gdb-debug-log-ring (make-ring gdb-debug-log-length) | ||
| 269 | "Ring of commands sent to and replies received from GDB. | ||
| 270 | This variable is used to debug GDB-UI. Just need most recent | ||
| 271 | messages and a ring limits the size.") | ||
| 262 | 272 | ||
| 263 | ;;;###autoload | 273 | ;;;###autoload |
| 264 | (defcustom gdb-enable-debug-log nil | 274 | (defcustom gdb-enable-debug-log nil |
| 265 | "Non-nil means record the process input and output in `gdb-debug-log'." | 275 | "Non-nil means record the process input and output in `gdb-debug-log-ring'." |
| 266 | :type 'boolean | 276 | :type 'boolean |
| 267 | :group 'gud | 277 | :group 'gud |
| 268 | :version "22.1") | 278 | :version "22.1") |
| @@ -390,7 +400,6 @@ With arg, use separate IO iff arg is positive." | |||
| 390 | expr)) | 400 | expr)) |
| 391 | 401 | ||
| 392 | (defun gdb-init-1 () | 402 | (defun gdb-init-1 () |
| 393 | (setq gdb-debug-log nil) | ||
| 394 | (set (make-local-variable 'gud-minor-mode) 'gdba) | 403 | (set (make-local-variable 'gud-minor-mode) 'gdba) |
| 395 | (set (make-local-variable 'gud-marker-filter) 'gud-gdba-marker-filter) | 404 | (set (make-local-variable 'gud-marker-filter) 'gud-gdba-marker-filter) |
| 396 | ;; | 405 | ;; |
| @@ -469,14 +478,15 @@ With arg, use separate IO iff arg is positive." | |||
| 469 | gdb-source-file-list nil | 478 | gdb-source-file-list nil |
| 470 | gdb-error nil | 479 | gdb-error nil |
| 471 | gdb-macro-info nil | 480 | gdb-macro-info nil |
| 472 | gdb-buffer-fringe-width (car (window-fringes))) | 481 | gdb-buffer-fringe-width (car (window-fringes)) |
| 482 | gdb-debug-log-ring (make-ring gdb-debug-log-length) | ||
| 483 | gdb-signalled nil) | ||
| 473 | 484 | ||
| 474 | (setq gdb-buffer-type 'gdba) | 485 | (setq gdb-buffer-type 'gdba) |
| 475 | 486 | ||
| 476 | (if gdb-use-separate-io-buffer (gdb-clear-inferior-io)) | 487 | (if gdb-use-separate-io-buffer (gdb-clear-inferior-io)) |
| 477 | 488 | ||
| 478 | ;; Hack to see test for GDB 6.4+ (-stack-info-frame was implemented in 6.4) | 489 | ;; Hack to see test for GDB 6.4+ (-stack-info-frame was implemented in 6.4) |
| 479 | (setq gdb-version nil) | ||
| 480 | (gdb-enqueue-input (list "server interpreter mi -stack-info-frame\n" | 490 | (gdb-enqueue-input (list "server interpreter mi -stack-info-frame\n" |
| 481 | 'gdb-get-version))) | 491 | 'gdb-get-version))) |
| 482 | 492 | ||
| @@ -573,9 +583,6 @@ With arg, automatically raise speedbar iff arg is positive." | |||
| 573 | (require 'tooltip) | 583 | (require 'tooltip) |
| 574 | (save-selected-window | 584 | (save-selected-window |
| 575 | (let ((expr (tooltip-identifier-from-point (point)))) | 585 | (let ((expr (tooltip-identifier-from-point (point)))) |
| 576 | (if (and (string-equal gdb-current-language "c") | ||
| 577 | gdb-use-colon-colon-notation gdb-selected-frame) | ||
| 578 | (setq expr (concat gdb-selected-frame "::" expr))) | ||
| 579 | (catch 'already-watched | 586 | (catch 'already-watched |
| 580 | (dolist (var gdb-var-list) | 587 | (dolist (var gdb-var-list) |
| 581 | (if (string-equal expr (car var)) (throw 'already-watched nil))) | 588 | (if (string-equal expr (car var)) (throw 'already-watched nil))) |
| @@ -593,11 +600,15 @@ With arg, automatically raise speedbar iff arg is positive." | |||
| 593 | (defun gdb-var-create-handler (expr) | 600 | (defun gdb-var-create-handler (expr) |
| 594 | (goto-char (point-min)) | 601 | (goto-char (point-min)) |
| 595 | (if (re-search-forward gdb-var-create-regexp nil t) | 602 | (if (re-search-forward gdb-var-create-regexp nil t) |
| 596 | (let ((var (list expr | 603 | (let ((var (list |
| 597 | (match-string 1) | 604 | (if (and (string-equal gdb-current-language "c") |
| 598 | (match-string 2) | 605 | gdb-use-colon-colon-notation gdb-selected-frame) |
| 599 | (match-string 3) | 606 | (setq expr (concat gdb-selected-frame "::" expr)) |
| 600 | nil nil))) | 607 | expr) |
| 608 | (match-string 1) | ||
| 609 | (match-string 2) | ||
| 610 | (match-string 3) | ||
| 611 | nil nil))) | ||
| 601 | (push var gdb-var-list) | 612 | (push var gdb-var-list) |
| 602 | (speedbar 1) | 613 | (speedbar 1) |
| 603 | (unless (string-equal | 614 | (unless (string-equal |
| @@ -613,7 +624,7 @@ With arg, automatically raise speedbar iff arg is positive." | |||
| 613 | ,(nth 1 var) nil))))) | 624 | ,(nth 1 var) nil))))) |
| 614 | (if (search-forward "Undefined command" nil t) | 625 | (if (search-forward "Undefined command" nil t) |
| 615 | (message-box "Watching expressions requires gdb 6.0 onwards") | 626 | (message-box "Watching expressions requires gdb 6.0 onwards") |
| 616 | (message "No symbol \"%s\" in current context." expr)))) | 627 | (message-box "No symbol \"%s\" in current context." expr)))) |
| 617 | 628 | ||
| 618 | (defun gdb-var-evaluate-expression-handler (varnum changed) | 629 | (defun gdb-var-evaluate-expression-handler (varnum changed) |
| 619 | (goto-char (point-min)) | 630 | (goto-char (point-min)) |
| @@ -864,7 +875,7 @@ The key should be one of the cars in `gdb-buffer-rules-assoc'." | |||
| 864 | "*")) | 875 | "*")) |
| 865 | 876 | ||
| 866 | (defun gdb-display-separate-io-buffer () | 877 | (defun gdb-display-separate-io-buffer () |
| 867 | "Display IO of inferior in a separate window." | 878 | "Display IO of debugged program in a separate window." |
| 868 | (interactive) | 879 | (interactive) |
| 869 | (if gdb-use-separate-io-buffer | 880 | (if gdb-use-separate-io-buffer |
| 870 | (gdb-display-buffer | 881 | (gdb-display-buffer |
| @@ -963,7 +974,7 @@ This filter may simply queue input for a later time." | |||
| 963 | (let ((item (concat string "\n"))) | 974 | (let ((item (concat string "\n"))) |
| 964 | (if gud-running | 975 | (if gud-running |
| 965 | (progn | 976 | (progn |
| 966 | (if gdb-enable-debug-log (push (cons 'send item) gdb-debug-log)) | 977 | (if gdb-enable-debug-log (push (cons 'send item) gdb-debug-log-ring)) |
| 967 | (process-send-string proc item)) | 978 | (process-send-string proc item)) |
| 968 | (gdb-enqueue-input item)))) | 979 | (gdb-enqueue-input item)))) |
| 969 | 980 | ||
| @@ -986,7 +997,8 @@ This filter may simply queue input for a later time." | |||
| 986 | 997 | ||
| 987 | (defun gdb-send-item (item) | 998 | (defun gdb-send-item (item) |
| 988 | (setq gdb-flush-pending-output nil) | 999 | (setq gdb-flush-pending-output nil) |
| 989 | (if gdb-enable-debug-log (push (cons 'send-item item) gdb-debug-log)) | 1000 | (if gdb-enable-debug-log |
| 1001 | (ring-insert gdb-debug-log-ring (cons 'send-item item))) | ||
| 990 | (setq gdb-current-item item) | 1002 | (setq gdb-current-item item) |
| 991 | (let ((process (get-buffer-process gud-comint-buffer))) | 1003 | (let ((process (get-buffer-process gud-comint-buffer))) |
| 992 | (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba) | 1004 | (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba) |
| @@ -1039,7 +1051,7 @@ This filter may simply queue input for a later time." | |||
| 1039 | ("source" gdb-source) | 1051 | ("source" gdb-source) |
| 1040 | ("starting" gdb-starting) | 1052 | ("starting" gdb-starting) |
| 1041 | ("exited" gdb-exited) | 1053 | ("exited" gdb-exited) |
| 1042 | ("signalled" gdb-exited) | 1054 | ("signalled" gdb-signalled) |
| 1043 | ("signal" gdb-stopping) | 1055 | ("signal" gdb-stopping) |
| 1044 | ("breakpoint" gdb-stopping) | 1056 | ("breakpoint" gdb-stopping) |
| 1045 | ("watchpoint" gdb-stopping) | 1057 | ("watchpoint" gdb-stopping) |
| @@ -1156,6 +1168,9 @@ directives." | |||
| 1156 | (setq gdb-overlay-arrow-position nil) | 1168 | (setq gdb-overlay-arrow-position nil) |
| 1157 | (gdb-stopping ignored)) | 1169 | (gdb-stopping ignored)) |
| 1158 | 1170 | ||
| 1171 | (defun gdb-signalled (ignored) | ||
| 1172 | (setq gdb-signalled t)) | ||
| 1173 | |||
| 1159 | (defun gdb-frame-begin (ignored) | 1174 | (defun gdb-frame-begin (ignored) |
| 1160 | (let ((sink gdb-output-sink)) | 1175 | (let ((sink gdb-output-sink)) |
| 1161 | (cond | 1176 | (cond |
| @@ -1172,7 +1187,6 @@ directives." | |||
| 1172 | It is just like `gdb-stopping', except that if we already set the output | 1187 | It is just like `gdb-stopping', except that if we already set the output |
| 1173 | sink to `user' in `gdb-stopping', that is fine." | 1188 | sink to `user' in `gdb-stopping', that is fine." |
| 1174 | (setq gud-running nil) | 1189 | (setq gud-running nil) |
| 1175 | (setq gdb-active-process t) | ||
| 1176 | (let ((sink gdb-output-sink)) | 1190 | (let ((sink gdb-output-sink)) |
| 1177 | (cond | 1191 | (cond |
| 1178 | ((eq sink 'inferior) | 1192 | ((eq sink 'inferior) |
| @@ -1180,7 +1194,8 @@ sink to `user' in `gdb-stopping', that is fine." | |||
| 1180 | ((eq sink 'user) t) | 1194 | ((eq sink 'user) t) |
| 1181 | (t | 1195 | (t |
| 1182 | (gdb-resync) | 1196 | (gdb-resync) |
| 1183 | (error "Unexpected stopped annotation"))))) | 1197 | (error "Unexpected stopped annotation")))) |
| 1198 | (if gdb-signalled (gdb-exited ignored))) | ||
| 1184 | 1199 | ||
| 1185 | (defun gdb-error (ignored) | 1200 | (defun gdb-error (ignored) |
| 1186 | (setq gdb-error (not gdb-error))) | 1201 | (setq gdb-error (not gdb-error))) |
| @@ -1233,7 +1248,8 @@ happens to be appropriate." | |||
| 1233 | "A gud marker filter for gdb. Handle a burst of output from GDB." | 1248 | "A gud marker filter for gdb. Handle a burst of output from GDB." |
| 1234 | (if gdb-flush-pending-output | 1249 | (if gdb-flush-pending-output |
| 1235 | nil | 1250 | nil |
| 1236 | (if gdb-enable-debug-log (push (cons 'recv string) gdb-debug-log)) | 1251 | (if gdb-enable-debug-log |
| 1252 | (ring-insert gdb-debug-log-ring (cons 'recv string))) | ||
| 1237 | ;; Recall the left over gud-marker-acc from last time. | 1253 | ;; Recall the left over gud-marker-acc from last time. |
| 1238 | (setq gud-marker-acc (concat gud-marker-acc string)) | 1254 | (setq gud-marker-acc (concat gud-marker-acc string)) |
| 1239 | ;; Start accumulating output for the GUD buffer. | 1255 | ;; Start accumulating output for the GUD buffer. |
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index e331268391a..02ce4a21c97 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -1438,6 +1438,16 @@ with your script for an edit-interpret-debug cycle." | |||
| 1438 | ((and buffer-file-name | 1438 | ((and buffer-file-name |
| 1439 | (string-match "\\.m?spec\\'" buffer-file-name)) | 1439 | (string-match "\\.m?spec\\'" buffer-file-name)) |
| 1440 | "rpm"))))) | 1440 | "rpm"))))) |
| 1441 | (unless interpreter | ||
| 1442 | (setq interpreter | ||
| 1443 | (cond ((string-match "[.]sh\\>" buffer-file-name) | ||
| 1444 | "sh") | ||
| 1445 | ((string-match "[.]bash\\>" buffer-file-name) | ||
| 1446 | "bash") | ||
| 1447 | ((string-match "[.]ksh\\>" buffer-file-name) | ||
| 1448 | "ksh") | ||
| 1449 | ((string-match "[.]csh\\>" buffer-file-name) | ||
| 1450 | "csh")))) | ||
| 1441 | (sh-set-shell (or interpreter sh-shell-file) nil nil)) | 1451 | (sh-set-shell (or interpreter sh-shell-file) nil nil)) |
| 1442 | (run-mode-hooks 'sh-mode-hook)) | 1452 | (run-mode-hooks 'sh-mode-hook)) |
| 1443 | 1453 | ||
diff --git a/lisp/sort.el b/lisp/sort.el index 174a8531786..5183bf65afa 100644 --- a/lisp/sort.el +++ b/lisp/sort.el | |||
| @@ -499,8 +499,9 @@ Use \\[untabify] to convert tabs to spaces before sorting." | |||
| 499 | ;; in the region, since the sort utility would lose the | 499 | ;; in the region, since the sort utility would lose the |
| 500 | ;; properties. | 500 | ;; properties. |
| 501 | (let ((sort-args (list (if reverse "-rt\n" "-t\n") | 501 | (let ((sort-args (list (if reverse "-rt\n" "-t\n") |
| 502 | (concat "+0." (int-to-string col-start)) | 502 | (format "-k1.%d,1.%d" |
| 503 | (concat "-0." (int-to-string col-end))))) | 503 | (1+ col-start) |
| 504 | (1+ col-end))))) | ||
| 504 | (when sort-fold-case | 505 | (when sort-fold-case |
| 505 | (push "-f" sort-args)) | 506 | (push "-f" sort-args)) |
| 506 | (apply #'call-process-region beg1 end1 "sort" t t nil sort-args)) | 507 | (apply #'call-process-region beg1 end1 "sort" t t nil sort-args)) |
diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el index 3c70314703b..4b62eeb87a7 100644 --- a/lisp/textmodes/org.el +++ b/lisp/textmodes/org.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Carsten Dominik <dominik at science dot uva dot nl> | 5 | ;; Author: Carsten Dominik <dominik at science dot uva dot nl> |
| 6 | ;; Keywords: outlines, hypermedia, calendar, wp | 6 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 7 | ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ | 7 | ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ |
| 8 | ;; Version: 4.04 | 8 | ;; Version: 4.05 |
| 9 | ;; | 9 | ;; |
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | ;; | 11 | ;; |
| @@ -81,6 +81,17 @@ | |||
| 81 | ;; | 81 | ;; |
| 82 | ;; Changes since version 4.00: | 82 | ;; Changes since version 4.00: |
| 83 | ;; --------------------------- | 83 | ;; --------------------------- |
| 84 | ;; Version 4.05 | ||
| 85 | ;; - Changes to internal link system (thanks to David Wainberg for ideas). | ||
| 86 | ;; - in-file links: [[Search String]] instead of <file:::Search String> | ||
| 87 | ;; - automatic links to "radio targets". | ||
| 88 | ;; - CamelCase not longer active by default, configure org-activate-camels | ||
| 89 | ;; if you want to turn it back on. | ||
| 90 | ;; - After following a link, `C-c &' jumps back to it. | ||
| 91 | ;; - MH-E link support (thanks to Thomas Baumann). | ||
| 92 | ;; - Special table lines are no longer exported. | ||
| 93 | ;; - Bug fixes and minor improvements. | ||
| 94 | ;; | ||
| 84 | ;; Version 4.04 | 95 | ;; Version 4.04 |
| 85 | ;; - Cleanup tags display in agenda. | 96 | ;; - Cleanup tags display in agenda. |
| 86 | ;; - Bug fixes. | 97 | ;; - Bug fixes. |
| @@ -115,7 +126,7 @@ | |||
| 115 | 126 | ||
| 116 | ;;; Customization variables | 127 | ;;; Customization variables |
| 117 | 128 | ||
| 118 | (defvar org-version "4.04" | 129 | (defvar org-version "4.05" |
| 119 | "The version number of the file org.el.") | 130 | "The version number of the file org.el.") |
| 120 | (defun org-version () | 131 | (defun org-version () |
| 121 | (interactive) | 132 | (interactive) |
| @@ -775,7 +786,7 @@ as possible." | |||
| 775 | (defcustom org-level-color-stars-only nil | 786 | (defcustom org-level-color-stars-only nil |
| 776 | "Non-nil means fontify only the stars in each headline. | 787 | "Non-nil means fontify only the stars in each headline. |
| 777 | When nil, the entire headline is fontified. | 788 | When nil, the entire headline is fontified. |
| 778 | Changing it requires a restart of Emacs to become effective." | 789 | Changing it requires restart of Emacs to become effective." |
| 779 | :group 'org-structure | 790 | :group 'org-structure |
| 780 | :type 'boolean) | 791 | :type 'boolean) |
| 781 | 792 | ||
| @@ -930,6 +941,12 @@ Needs to be set before org.el is loaded." | |||
| 930 | :group 'org-link | 941 | :group 'org-link |
| 931 | :type 'boolean) | 942 | :type 'boolean) |
| 932 | 943 | ||
| 944 | (defcustom org-mark-ring-length 4 | ||
| 945 | "Number of different positions to be recorded in the ring | ||
| 946 | Changing this requires a restart of Emacs to work correctly." | ||
| 947 | :group 'org-link | ||
| 948 | :type 'interger) | ||
| 949 | |||
| 933 | (defcustom org-link-format "<%s>" | 950 | (defcustom org-link-format "<%s>" |
| 934 | "Default format for linkes in the buffer. | 951 | "Default format for linkes in the buffer. |
| 935 | This is a format string for printf, %s will be replaced by the link text. | 952 | This is a format string for printf, %s will be replaced by the link text. |
| @@ -948,13 +965,27 @@ recommend an additional URL: prefix, so the format would be \"<URL:%s>\"." | |||
| 948 | When nil, it becomes possible to put several links into a line. | 965 | When nil, it becomes possible to put several links into a line. |
| 949 | Note that in tables, a link never extends accross fields, so in a table | 966 | Note that in tables, a link never extends accross fields, so in a table |
| 950 | it is always possible to put several links into a line. | 967 | it is always possible to put several links into a line. |
| 951 | Changing this variable requires a restart of Emacs to become effective." | 968 | Changing this variable requires a restart of Emacs of become effective." |
| 969 | :group 'org-link | ||
| 970 | :type 'boolean) | ||
| 971 | |||
| 972 | (defcustom org-radio-targets t | ||
| 973 | "Non-nil means activate text matching a link target. | ||
| 974 | Radio targets are strings in triple angular brackets, like <<<My Target>>>. | ||
| 975 | When this option is set, any occurrence of \"my target\" in normal text | ||
| 976 | becomes a link." | ||
| 977 | :group 'org-link | ||
| 978 | :type 'boolean) | ||
| 979 | |||
| 980 | (defcustom org-activate-camels nil | ||
| 981 | "Non-nil means, treat words in CamelCase as in-file links. | ||
| 982 | Changing this requires restart of Emacs to become effective." | ||
| 952 | :group 'org-link | 983 | :group 'org-link |
| 953 | :type 'boolean) | 984 | :type 'boolean) |
| 954 | 985 | ||
| 955 | (defcustom org-context-in-file-links t | 986 | (defcustom org-context-in-file-links t |
| 956 | "Non-nil means, file links from `org-store-link' contain context. | 987 | "Non-nil means, file links from `org-store-link' contain context. |
| 957 | The line number will be added to the file name with :: as separator and | 988 | A search string will be added to the file name with :: as separator and |
| 958 | used to find the context when the link is activated by the command | 989 | used to find the context when the link is activated by the command |
| 959 | `org-open-at-point'. | 990 | `org-open-at-point'. |
| 960 | Using a prefix arg to the command \\[org-store-link] (`org-store-link') | 991 | Using a prefix arg to the command \\[org-store-link] (`org-store-link') |
| @@ -962,6 +993,12 @@ negates this setting for the duration of the command." | |||
| 962 | :group 'org-link | 993 | :group 'org-link |
| 963 | :type 'boolean) | 994 | :type 'boolean) |
| 964 | 995 | ||
| 996 | (defcustom org-file-link-context-use-camel-case nil | ||
| 997 | "Non-nil means, use CamelCase to store a search context in a file link. | ||
| 998 | When nil, the search string simply consists of the words of the string." | ||
| 999 | :group 'org-link | ||
| 1000 | :type 'boolean) | ||
| 1001 | |||
| 965 | (defcustom org-keep-stored-link-after-insertion nil | 1002 | (defcustom org-keep-stored-link-after-insertion nil |
| 966 | "Non-nil means, keep link in list for entire session. | 1003 | "Non-nil means, keep link in list for entire session. |
| 967 | 1004 | ||
| @@ -1082,13 +1119,15 @@ For more examples, see the system specific constants | |||
| 1082 | `org-file-apps-defaults-gnu'." | 1119 | `org-file-apps-defaults-gnu'." |
| 1083 | :group 'org-link | 1120 | :group 'org-link |
| 1084 | :type '(repeat | 1121 | :type '(repeat |
| 1085 | (cons (string :tag "Extension") | 1122 | (cons (choice :value "" |
| 1123 | (string :tag "Extension") | ||
| 1124 | (const :tag "Default for unrecognized files" t) | ||
| 1125 | (const :tag "Links to a directory" directory)) | ||
| 1086 | (choice :value "" | 1126 | (choice :value "" |
| 1087 | (const :tag "Visit with Emacs" 'emacs) | 1127 | (const :tag "Visit with Emacs" emacs) |
| 1088 | (const :tag "Use system default" 'default) | 1128 | (const :tag "Use system default" default) |
| 1089 | (string :tag "Command") | 1129 | (string :tag "Command") |
| 1090 | (sexp :tag "Lisp form"))))) | 1130 | (sexp :tag "Lisp form"))))) |
| 1091 | |||
| 1092 | 1131 | ||
| 1093 | (defgroup org-remember nil | 1132 | (defgroup org-remember nil |
| 1094 | "Options concerning interaction with remember.el." | 1133 | "Options concerning interaction with remember.el." |
| @@ -1508,6 +1547,15 @@ This option can also be set with the +OPTIONS line, e.g. \"|:nil\"." | |||
| 1508 | :group 'org-export | 1547 | :group 'org-export |
| 1509 | :type 'boolean) | 1548 | :type 'boolean) |
| 1510 | 1549 | ||
| 1550 | (defcustom org-export-table-remove-special-lines t | ||
| 1551 | "Remove special lines and marking characters in calculating tables. | ||
| 1552 | This removes the special marking character column from tables that are set | ||
| 1553 | up for spreadsheet calculations. It also removes the entire lines | ||
| 1554 | marked with `!', `_', or `^'. The lines with `$' are kept, because | ||
| 1555 | the values of constants may be useful to have." | ||
| 1556 | :group 'org-export | ||
| 1557 | :type 'boolean) | ||
| 1558 | |||
| 1511 | (defcustom org-export-prefer-native-exporter-for-tables nil | 1559 | (defcustom org-export-prefer-native-exporter-for-tables nil |
| 1512 | "Non-nil means, always export tables created with table.el natively. | 1560 | "Non-nil means, always export tables created with table.el natively. |
| 1513 | Natively means, use the HTML code generator in table.el. | 1561 | Natively means, use the HTML code generator in table.el. |
| @@ -1923,6 +1971,10 @@ When this is non-nil, the headline after the keyword is set to the | |||
| 1923 | (defvar gnus-group-name) | 1971 | (defvar gnus-group-name) |
| 1924 | (defvar gnus-article-current) | 1972 | (defvar gnus-article-current) |
| 1925 | (defvar w3m-current-url) | 1973 | (defvar w3m-current-url) |
| 1974 | (defvar mh-progs) | ||
| 1975 | (defvar mh-current-folder) | ||
| 1976 | (defvar mh-show-folder-buffer) | ||
| 1977 | (defvar mh-index-folder) | ||
| 1926 | (defvar org-selected-point) | 1978 | (defvar org-selected-point) |
| 1927 | (defvar calendar-mode-map) | 1979 | (defvar calendar-mode-map) |
| 1928 | (defvar remember-save-after-remembering) | 1980 | (defvar remember-save-after-remembering) |
| @@ -1981,17 +2033,11 @@ The following commands are available: | |||
| 1981 | 'org-unfontify-region) | 2033 | 'org-unfontify-region) |
| 1982 | ;; Activate before-change-function | 2034 | ;; Activate before-change-function |
| 1983 | (set (make-local-variable 'org-table-may-need-update) t) | 2035 | (set (make-local-variable 'org-table-may-need-update) t) |
| 1984 | (make-local-hook 'before-change-functions) ;; needed for XEmacs | 2036 | (org-add-hook 'before-change-functions 'org-before-change-function nil |
| 1985 | (add-hook 'before-change-functions 'org-before-change-function nil | 2037 | 'local) |
| 1986 | 'local) | ||
| 1987 | ;; FIXME: The following does not work because isearch-mode-end-hook | ||
| 1988 | ;; is called *before* the visibility overlays as removed. | ||
| 1989 | ;; There should be another hook then for me to be used. | ||
| 1990 | ;; (make-local-hook 'isearch-mode-end-hook) ;; needed for XEmacs | ||
| 1991 | ;; (add-hook 'isearch-mode-end-hook 'org-show-hierarchy-above nil | ||
| 1992 | ;; 'local) | ||
| 1993 | ;; Paragraphs and auto-filling | 2038 | ;; Paragraphs and auto-filling |
| 1994 | (org-set-autofill-regexps) | 2039 | (org-set-autofill-regexps) |
| 2040 | (org-update-radio-target-regexp) | ||
| 1995 | ;; Settings for Calc embedded mode | 2041 | ;; Settings for Calc embedded mode |
| 1996 | (set (make-local-variable 'calc-embedded-open-formula) "|\\|\n") | 2042 | (set (make-local-variable 'calc-embedded-open-formula) "|\\|\n") |
| 1997 | (set (make-local-variable 'calc-embedded-close-formula) "|\\|\n") | 2043 | (set (make-local-variable 'calc-embedded-close-formula) "|\\|\n") |
| @@ -2053,9 +2099,9 @@ The following commands are available: | |||
| 2053 | (defconst org-link-regexp | 2099 | (defconst org-link-regexp |
| 2054 | (if org-allow-space-in-links | 2100 | (if org-allow-space-in-links |
| 2055 | (concat | 2101 | (concat |
| 2056 | "\\(https?\\|ftp\\|mailto\\|file\\|news\\|bbdb\\|vm\\|wl\\|rmail\\|gnus\\|shell\\):\\([^" org-non-link-chars "]+[^ " org-non-link-chars "]\\)") | 2102 | "\\(https?\\|ftp\\|mailto\\|file\\|news\\|bbdb\\|vm\\|wl\\|mhe\\|rmail\\|gnus\\|shell\\):\\([^" org-non-link-chars "]+[^ " org-non-link-chars "]\\)") |
| 2057 | (concat | 2103 | (concat |
| 2058 | "\\(https?\\|ftp\\|mailto\\|file\\|news\\|bbdb\\|vm\\|wl\\|rmail\\|gnus\\|shell\\):\\([^ " org-non-link-chars "]+\\)") | 2104 | "\\(https?\\|ftp\\|mailto\\|file\\|news\\|bbdb\\|vm\\|wl\\|mhe\\|rmail\\|gnus\\|shell\\):\\([^ " org-non-link-chars "]+\\)") |
| 2059 | ) | 2105 | ) |
| 2060 | "Regular expression for matching links.") | 2106 | "Regular expression for matching links.") |
| 2061 | (defconst org-link-maybe-angles-regexp | 2107 | (defconst org-link-maybe-angles-regexp |
| @@ -2065,6 +2111,10 @@ The following commands are available: | |||
| 2065 | (concat "\000" org-link-regexp "\000") | 2111 | (concat "\000" org-link-regexp "\000") |
| 2066 | "Matches a link and optionally surrounding angle brackets.") | 2112 | "Matches a link and optionally surrounding angle brackets.") |
| 2067 | 2113 | ||
| 2114 | (defconst org-bracket-link-regexp | ||
| 2115 | "\\[\\[\\([^]]+\\)\\]\\(\\[\\([^]]+\\)\\]\\)?\\]" | ||
| 2116 | "Matches a link in double brackets.") | ||
| 2117 | |||
| 2068 | (defconst org-ts-lengths | 2118 | (defconst org-ts-lengths |
| 2069 | (cons (length (format-time-string (car org-time-stamp-formats))) | 2119 | (cons (length (format-time-string (car org-time-stamp-formats))) |
| 2070 | (length (format-time-string (cdr org-time-stamp-formats)))) | 2120 | (length (format-time-string (cdr org-time-stamp-formats)))) |
| @@ -2092,6 +2142,15 @@ The following commands are available: | |||
| 2092 | 'keymap org-mouse-map)) | 2142 | 'keymap org-mouse-map)) |
| 2093 | t))) | 2143 | t))) |
| 2094 | 2144 | ||
| 2145 | (defun org-activate-links2 (limit) | ||
| 2146 | "Run through the buffer and add overlays to links." | ||
| 2147 | (if (re-search-forward org-bracket-link-regexp limit t) | ||
| 2148 | (progn | ||
| 2149 | (add-text-properties (match-beginning 0) (match-end 0) | ||
| 2150 | (list 'mouse-face 'highlight | ||
| 2151 | 'keymap org-mouse-map)) | ||
| 2152 | t))) | ||
| 2153 | |||
| 2095 | (defun org-activate-dates (limit) | 2154 | (defun org-activate-dates (limit) |
| 2096 | "Run through the buffer and add overlays to dates." | 2155 | "Run through the buffer and add overlays to dates." |
| 2097 | (if (re-search-forward org-tsr-regexp limit t) | 2156 | (if (re-search-forward org-tsr-regexp limit t) |
| @@ -2101,19 +2160,75 @@ The following commands are available: | |||
| 2101 | 'keymap org-mouse-map)) | 2160 | 'keymap org-mouse-map)) |
| 2102 | t))) | 2161 | t))) |
| 2103 | 2162 | ||
| 2163 | (defvar org-target-link-regexp nil | ||
| 2164 | "Regular expression matching radio targets in plain text.") | ||
| 2165 | (defvar org-target-regexp "<<\\([^<>\n\r]+\\)>>" | ||
| 2166 | "Regular expression matching a link target.") | ||
| 2167 | (defvar org-radio-target-regexp "<<<\\([^<>\n\r]+\\)>>>" | ||
| 2168 | "Regular expression matching a link target.") | ||
| 2169 | |||
| 2170 | (defun org-activate-target-links (limit) | ||
| 2171 | "Run through the buffer and add overlays to target matches." | ||
| 2172 | (when org-radio-targets | ||
| 2173 | (let ((case-fold-search t)) | ||
| 2174 | (if (re-search-forward org-target-link-regexp limit t) | ||
| 2175 | (progn | ||
| 2176 | (add-text-properties (match-beginning 0) (match-end 0) | ||
| 2177 | (list 'mouse-face 'highlight | ||
| 2178 | 'keymap org-mouse-map | ||
| 2179 | 'org-linked-text t)) | ||
| 2180 | t))))) | ||
| 2181 | |||
| 2182 | (defun org-update-radio-target-regexp () | ||
| 2183 | "Find all radio targets in this file and update the regular expression." | ||
| 2184 | (interactive) | ||
| 2185 | (when org-radio-targets | ||
| 2186 | (setq org-target-link-regexp | ||
| 2187 | (org-make-target-link-regexp (org-all-targets 'radio))) | ||
| 2188 | (font-lock-mode -1) | ||
| 2189 | (font-lock-mode 1))) | ||
| 2190 | |||
| 2191 | (defun org-all-targets (&optional radio) | ||
| 2192 | "Return a list of all targets in this file. | ||
| 2193 | With optional argument RADIO, only find radio targets." | ||
| 2194 | (let ((re (if radio org-radio-target-regexp org-target-regexp)) | ||
| 2195 | rtn) | ||
| 2196 | (save-excursion | ||
| 2197 | (goto-char (point-min)) | ||
| 2198 | (while (re-search-forward re nil t) | ||
| 2199 | (add-to-list 'rtn (downcase (match-string-no-properties 1)))) | ||
| 2200 | rtn))) | ||
| 2201 | |||
| 2202 | (defun org-make-target-link-regexp (targets) | ||
| 2203 | "Make regular expression matching all strings in TARGETS. | ||
| 2204 | The regular expression finds the targets also if there is a line break | ||
| 2205 | between words." | ||
| 2206 | (concat | ||
| 2207 | "\\<\\(" | ||
| 2208 | (mapconcat | ||
| 2209 | (lambda (x) | ||
| 2210 | (while (string-match " +" x) | ||
| 2211 | (setq x (replace-match "\\s-+" t t x))) | ||
| 2212 | x) | ||
| 2213 | targets | ||
| 2214 | "\\|") | ||
| 2215 | "\\)\\>")) | ||
| 2216 | |||
| 2104 | (defvar org-camel-regexp "\\*?\\<[A-Z]+[a-z]+[A-Z][a-zA-Z]*\\>" | 2217 | (defvar org-camel-regexp "\\*?\\<[A-Z]+[a-z]+[A-Z][a-zA-Z]*\\>" |
| 2105 | "Matches CamelCase words, possibly with a star before it.") | 2218 | "Matches CamelCase words, possibly with a star before it.") |
| 2219 | |||
| 2106 | (defun org-activate-camels (limit) | 2220 | (defun org-activate-camels (limit) |
| 2107 | "Run through the buffer and add overlays to dates." | 2221 | "Run through the buffer and add overlays to dates." |
| 2108 | (if (re-search-forward org-camel-regexp limit t) | 2222 | (if org-activate-camels |
| 2109 | (progn | 2223 | (if (re-search-forward org-camel-regexp limit t) |
| 2110 | (add-text-properties (match-beginning 0) (match-end 0) | 2224 | (progn |
| 2111 | (list 'mouse-face 'highlight | 2225 | (add-text-properties (match-beginning 0) (match-end 0) |
| 2112 | 'keymap org-mouse-map)) | 2226 | (list 'mouse-face 'highlight |
| 2113 | t))) | 2227 | 'keymap org-mouse-map)) |
| 2228 | t)))) | ||
| 2114 | 2229 | ||
| 2115 | (defun org-activate-tags (limit) | 2230 | (defun org-activate-tags (limit) |
| 2116 | (if (re-search-forward "[ \t]\\(:[A-Za-z_:]+:\\)[ \r\n]" limit t) | 2231 | (if (re-search-forward "[ \t]\\(:[A-Za-z_@0-9:]+:\\)[ \r\n]" limit t) |
| 2117 | (progn | 2232 | (progn |
| 2118 | (add-text-properties (match-beginning 1) (match-end 1) | 2233 | (add-text-properties (match-beginning 1) (match-end 1) |
| 2119 | (list 'mouse-face 'highlight | 2234 | (list 'mouse-face 'highlight |
| @@ -2138,6 +2253,8 @@ The following commands are available: | |||
| 2138 | (let ((org-font-lock-extra-keywords | 2253 | (let ((org-font-lock-extra-keywords |
| 2139 | (list | 2254 | (list |
| 2140 | '(org-activate-links (0 'org-link t)) | 2255 | '(org-activate-links (0 'org-link t)) |
| 2256 | '(org-activate-links2 (0 'org-link t)) | ||
| 2257 | '(org-activate-target-links (0 'org-link t)) | ||
| 2141 | '(org-activate-dates (0 'org-link t)) | 2258 | '(org-activate-dates (0 'org-link t)) |
| 2142 | '(org-activate-camels (0 'org-link t)) | 2259 | '(org-activate-camels (0 'org-link t)) |
| 2143 | '(org-activate-tags (1 'org-link t)) | 2260 | '(org-activate-tags (1 'org-link t)) |
| @@ -2199,7 +2316,8 @@ The following commands are available: | |||
| 2199 | (inhibit-read-only t) (inhibit-point-motion-hooks t) | 2316 | (inhibit-read-only t) (inhibit-point-motion-hooks t) |
| 2200 | (inhibit-modification-hooks t) | 2317 | (inhibit-modification-hooks t) |
| 2201 | deactivate-mark buffer-file-name buffer-file-truename) | 2318 | deactivate-mark buffer-file-name buffer-file-truename) |
| 2202 | (remove-text-properties beg end '(mouse-face nil keymap nil)))) | 2319 | (remove-text-properties beg end |
| 2320 | '(mouse-face nil keymap nil org-linked-text nil)))) | ||
| 2203 | 2321 | ||
| 2204 | ;;; Visibility cycling | 2322 | ;;; Visibility cycling |
| 2205 | 2323 | ||
| @@ -2433,8 +2551,10 @@ to the new location, making it and the headline hierarchy above it visible." | |||
| 2433 | (org-get-location (current-buffer) org-goto-help))) | 2551 | (org-get-location (current-buffer) org-goto-help))) |
| 2434 | (if selected-point | 2552 | (if selected-point |
| 2435 | (progn | 2553 | (progn |
| 2554 | (org-mark-ring-push org-goto-start-pos) | ||
| 2436 | (goto-char selected-point) | 2555 | (goto-char selected-point) |
| 2437 | (if (org-invisible-p) (org-show-hierarchy-above))) | 2556 | (if (or (org-invisible-p) (org-invisible-p2)) |
| 2557 | (org-show-hierarchy-above))) | ||
| 2438 | (error "Quit")))) | 2558 | (error "Quit")))) |
| 2439 | 2559 | ||
| 2440 | (defun org-get-location (buf help) | 2560 | (defun org-get-location (buf help) |
| @@ -3213,7 +3333,7 @@ At all other locations, this simply calls `ispell-complete-word'." | |||
| 3213 | (let* ((end (point)) | 3333 | (let* ((end (point)) |
| 3214 | (beg1 (save-excursion | 3334 | (beg1 (save-excursion |
| 3215 | (if (equal (char-before (point)) ?\ ) (backward-char 1)) | 3335 | (if (equal (char-before (point)) ?\ ) (backward-char 1)) |
| 3216 | (skip-chars-backward "a-zA-Z_") | 3336 | (skip-chars-backward "a-zA-Z_@0-9") |
| 3217 | (point))) | 3337 | (point))) |
| 3218 | (beg (save-excursion | 3338 | (beg (save-excursion |
| 3219 | (if (equal (char-before (point)) ?\ ) (backward-char 1)) | 3339 | (if (equal (char-before (point)) ?\ ) (backward-char 1)) |
| @@ -3247,7 +3367,11 @@ At all other locations, this simply calls `ispell-complete-word'." | |||
| 3247 | (save-excursion | 3367 | (save-excursion |
| 3248 | (goto-char (point-min)) | 3368 | (goto-char (point-min)) |
| 3249 | (while (re-search-forward org-todo-line-regexp nil t) | 3369 | (while (re-search-forward org-todo-line-regexp nil t) |
| 3250 | (push (list (org-make-org-heading-camel (match-string 3))) | 3370 | (push (list |
| 3371 | (if org-file-link-context-use-camel-case | ||
| 3372 | (org-make-org-heading-camel (match-string 3) t) | ||
| 3373 | (org-make-org-heading-search-string | ||
| 3374 | (match-string 3) t))) | ||
| 3251 | tbl))) | 3375 | tbl))) |
| 3252 | tbl) | 3376 | tbl) |
| 3253 | (tag (setq type :tag beg beg1) | 3377 | (tag (setq type :tag beg beg1) |
| @@ -3475,9 +3599,8 @@ that the match should indeed be shown." | |||
| 3475 | (setq cnt (1+ cnt)) | 3599 | (setq cnt (1+ cnt)) |
| 3476 | (org-highlight-new-match (match-beginning 0) (match-end 0)) | 3600 | (org-highlight-new-match (match-beginning 0) (match-end 0)) |
| 3477 | (org-show-hierarchy-above)))) | 3601 | (org-show-hierarchy-above)))) |
| 3478 | (make-local-hook 'before-change-functions) ; needed for XEmacs | 3602 | (org-add-hook 'before-change-functions 'org-remove-occur-highlights |
| 3479 | (add-hook 'before-change-functions 'org-remove-occur-highlights | 3603 | nil 'local) |
| 3480 | nil 'local) | ||
| 3481 | (run-hooks 'org-occur-hook) | 3604 | (run-hooks 'org-occur-hook) |
| 3482 | (if (interactive-p) | 3605 | (if (interactive-p) |
| 3483 | (message "%d match(es) for regexp %s" cnt regexp)) | 3606 | (message "%d match(es) for regexp %s" cnt regexp)) |
| @@ -3488,7 +3611,8 @@ that the match should indeed be shown." | |||
| 3488 | (catch 'exit | 3611 | (catch 'exit |
| 3489 | (if (org-on-heading-p t) | 3612 | (if (org-on-heading-p t) |
| 3490 | (org-flag-heading nil) ; only show the heading | 3613 | (org-flag-heading nil) ; only show the heading |
| 3491 | (and (org-invisible-p) (org-show-hidden-entry))) ; show entire entry | 3614 | (and (or (org-invisible-p) (org-invisible-p2)) |
| 3615 | (org-show-hidden-entry))) ; show entire entry | ||
| 3492 | (save-excursion | 3616 | (save-excursion |
| 3493 | (and org-show-following-heading | 3617 | (and org-show-following-heading |
| 3494 | (outline-next-heading) | 3618 | (outline-next-heading) |
| @@ -3765,7 +3889,8 @@ used to insert the time stamp into the buffer to include the time." | |||
| 3765 | (progn | 3889 | (progn |
| 3766 | (use-local-map map) | 3890 | (use-local-map map) |
| 3767 | (setq ans (read-string prompt "" nil nil)) | 3891 | (setq ans (read-string prompt "" nil nil)) |
| 3768 | (setq ans (or ans1 ans2 ans))) | 3892 | (if (not (string-match "\\S-" ans)) (setq ans nil)) |
| 3893 | (setq ans (or ans1 ans ans2))) | ||
| 3769 | (use-local-map old-map))))) | 3894 | (use-local-map old-map))))) |
| 3770 | ;; Naked prompt only | 3895 | ;; Naked prompt only |
| 3771 | (setq ans (read-string prompt "" nil timestr))) | 3896 | (setq ans (read-string prompt "" nil timestr))) |
| @@ -4133,10 +4258,8 @@ The following commands are available: | |||
| 4133 | (use-local-map org-agenda-mode-map) | 4258 | (use-local-map org-agenda-mode-map) |
| 4134 | (easy-menu-add org-agenda-menu) | 4259 | (easy-menu-add org-agenda-menu) |
| 4135 | (if org-startup-truncated (setq truncate-lines t)) | 4260 | (if org-startup-truncated (setq truncate-lines t)) |
| 4136 | (make-local-hook 'post-command-hook) ; Needed for XEmacs | 4261 | (org-add-hook 'post-command-hook 'org-agenda-post-command-hook nil 'local) |
| 4137 | (add-hook 'post-command-hook 'org-agenda-post-command-hook nil 'local) | 4262 | (org-add-hook 'pre-command-hook 'org-unhighlight nil 'local) |
| 4138 | (make-local-hook 'pre-command-hook) ; Needed for XEmacs | ||
| 4139 | (add-hook 'pre-command-hook 'org-unhighlight nil 'local) | ||
| 4140 | (unless org-agenda-keep-modes | 4263 | (unless org-agenda-keep-modes |
| 4141 | (setq org-agenda-follow-mode nil | 4264 | (setq org-agenda-follow-mode nil |
| 4142 | org-agenda-show-log nil)) | 4265 | org-agenda-show-log nil)) |
| @@ -5285,27 +5408,6 @@ the documentation of `org-diary'." | |||
| 5285 | (throw 'exit t))) | 5408 | (throw 'exit t))) |
| 5286 | nil))) | 5409 | nil))) |
| 5287 | 5410 | ||
| 5288 | (defun org-get-tags-at (&optional pos) | ||
| 5289 | "Get a list of all headline targs applicable at POS. | ||
| 5290 | POS defaults to point. If tags are inherited, the list contains | ||
| 5291 | the targets in the same sequence as the headlines appear, i.e. | ||
| 5292 | the tags of the current headline come last." | ||
| 5293 | (interactive) | ||
| 5294 | (let (tags) | ||
| 5295 | (save-excursion | ||
| 5296 | (goto-char (or pos (point))) | ||
| 5297 | (save-match-data | ||
| 5298 | (org-back-to-heading t) | ||
| 5299 | (condition-case nil | ||
| 5300 | (while t | ||
| 5301 | (if (looking-at "[^\r\n]+?:\\([a-zA-Z_:]+\\):[ \t]*\\([\n\r]\\|\\'\\)") | ||
| 5302 | (setq tags (append (org-split-string (match-string 1) ":") tags))) | ||
| 5303 | (or org-use-tag-inheritance (error "")) | ||
| 5304 | (org-up-heading-all 1)) | ||
| 5305 | (error nil)))) | ||
| 5306 | (message "%s" tags) | ||
| 5307 | tags)) | ||
| 5308 | |||
| 5309 | (defun org-agenda-get-todos () | 5411 | (defun org-agenda-get-todos () |
| 5310 | "Return the TODO information for agenda display." | 5412 | "Return the TODO information for agenda display." |
| 5311 | (let* ((props (list 'face nil | 5413 | (let* ((props (list 'face nil |
| @@ -5726,7 +5828,7 @@ only the correctly processes TXT should be returned - this is used by | |||
| 5726 | (when (and (or (eq org-agenda-remove-tags-when-in-prefix t) | 5828 | (when (and (or (eq org-agenda-remove-tags-when-in-prefix t) |
| 5727 | (and org-agenda-remove-tags-when-in-prefix | 5829 | (and org-agenda-remove-tags-when-in-prefix |
| 5728 | org-prefix-has-tag)) | 5830 | org-prefix-has-tag)) |
| 5729 | (string-match ":[a-zA-Z_:]+:[ \t]*$" txt)) | 5831 | (string-match ":[a-zA-Z_@0-9:]+:[ \t]*$" txt)) |
| 5730 | (setq txt (replace-match "" t t txt))) | 5832 | (setq txt (replace-match "" t t txt))) |
| 5731 | 5833 | ||
| 5732 | ;; Create the final string | 5834 | ;; Create the final string |
| @@ -6076,6 +6178,27 @@ the same tree node, and the headline of the tree node in the Org-mode file." | |||
| 6076 | (org-agenda-change-all-lines newhead hdmarker) | 6178 | (org-agenda-change-all-lines newhead hdmarker) |
| 6077 | (beginning-of-line 1))) | 6179 | (beginning-of-line 1))) |
| 6078 | 6180 | ||
| 6181 | (defun org-get-tags-at (&optional pos) | ||
| 6182 | "Get a list of all headline targs applicable at POS. | ||
| 6183 | POS defaults to point. If tags are inherited, the list contains | ||
| 6184 | the targets in the same sequence as the headlines appear, i.e. | ||
| 6185 | the tags of the current headline come last." | ||
| 6186 | (interactive) | ||
| 6187 | (let (tags) | ||
| 6188 | (save-excursion | ||
| 6189 | (goto-char (or pos (point))) | ||
| 6190 | (save-match-data | ||
| 6191 | (org-back-to-heading t) | ||
| 6192 | (condition-case nil | ||
| 6193 | (while t | ||
| 6194 | (if (looking-at "[^\r\n]+?:\\([a-zA-Z_@0-9:]+\\):[ \t]*\\([\n\r]\\|\\'\\)") | ||
| 6195 | (setq tags (append (org-split-string (match-string 1) ":") tags))) | ||
| 6196 | (or org-use-tag-inheritance (error "")) | ||
| 6197 | (org-up-heading-all 1)) | ||
| 6198 | (error nil)))) | ||
| 6199 | (message "%s" tags) | ||
| 6200 | tags)) | ||
| 6201 | |||
| 6079 | (defun org-agenda-set-tags () | 6202 | (defun org-agenda-set-tags () |
| 6080 | "Set tags for the current headline." | 6203 | "Set tags for the current headline." |
| 6081 | (interactive) | 6204 | (interactive) |
| @@ -6298,7 +6421,7 @@ are included in the output." | |||
| 6298 | (mapconcat 'regexp-quote | 6421 | (mapconcat 'regexp-quote |
| 6299 | (nreverse (cdr (reverse org-todo-keywords))) | 6422 | (nreverse (cdr (reverse org-todo-keywords))) |
| 6300 | "\\|") | 6423 | "\\|") |
| 6301 | "\\>\\)\\)? *\\(.*?\\)\\(:[A-Za-z_:]+:\\)?[ \t]*[\n\r]")) | 6424 | "\\>\\)\\)? *\\(.*?\\)\\(:[A-Za-z_@0-9:]+:\\)?[ \t]*[\n\r]")) |
| 6302 | (props (list 'face nil | 6425 | (props (list 'face nil |
| 6303 | 'done-face 'org-done | 6426 | 'done-face 'org-done |
| 6304 | 'undone-face nil | 6427 | 'undone-face nil |
| @@ -6386,7 +6509,7 @@ MATCH can contain positive and negative selection of tags, like | |||
| 6386 | (let ((match0 match) minus tag mm matcher orterms term orlist) | 6509 | (let ((match0 match) minus tag mm matcher orterms term orlist) |
| 6387 | (setq orterms (org-split-string match "|")) | 6510 | (setq orterms (org-split-string match "|")) |
| 6388 | (while (setq term (pop orterms)) | 6511 | (while (setq term (pop orterms)) |
| 6389 | (while (string-match "^&?\\([-+:]\\)?\\([A-Za-z_]+\\)" term) | 6512 | (while (string-match "^&?\\([-+:]\\)?\\([A-Za-z_@0-9]+\\)" term) |
| 6390 | (setq minus (and (match-end 1) | 6513 | (setq minus (and (match-end 1) |
| 6391 | (equal (match-string 1 term) "-")) | 6514 | (equal (match-string 1 term) "-")) |
| 6392 | tag (match-string 2 term) | 6515 | tag (match-string 2 term) |
| @@ -6481,7 +6604,7 @@ With prefix ARG, realign all tags in headings in the current buffer." | |||
| 6481 | (re (concat "^" outline-regexp)) | 6604 | (re (concat "^" outline-regexp)) |
| 6482 | (col (current-column)) | 6605 | (col (current-column)) |
| 6483 | (current (org-get-tags)) | 6606 | (current (org-get-tags)) |
| 6484 | tags hd empty) | 6607 | tags hd empty invis) |
| 6485 | (if arg | 6608 | (if arg |
| 6486 | (save-excursion | 6609 | (save-excursion |
| 6487 | (goto-char (point-min)) | 6610 | (goto-char (point-min)) |
| @@ -6505,19 +6628,23 @@ With prefix ARG, realign all tags in headings in the current buffer." | |||
| 6505 | (if (equal current "") | 6628 | (if (equal current "") |
| 6506 | (progn | 6629 | (progn |
| 6507 | (end-of-line 1) | 6630 | (end-of-line 1) |
| 6508 | (or empty (insert " "))) | 6631 | (or empty (insert-before-markers " "))) |
| 6509 | (beginning-of-line 1) | 6632 | (beginning-of-line 1) |
| 6633 | (setq invis (org-invisible-p)) | ||
| 6510 | (looking-at (concat "\\(.*\\)\\(" (regexp-quote current) "\\)[ \t]*")) | 6634 | (looking-at (concat "\\(.*\\)\\(" (regexp-quote current) "\\)[ \t]*")) |
| 6511 | (setq hd (match-string 1)) | 6635 | (setq hd (match-string 1)) |
| 6512 | (delete-region (match-beginning 0) (match-end 0)) | 6636 | (delete-region (match-beginning 0) (match-end 0)) |
| 6513 | (insert (org-trim hd) (if empty "" " "))) | 6637 | (insert-before-markers (org-trim hd) (if empty "" " "))) |
| 6638 | ;; FIXME: What happens when adding a new tag??? Seems OK!!! | ||
| 6514 | (unless (equal tags "") | 6639 | (unless (equal tags "") |
| 6515 | (move-to-column (max (current-column) | 6640 | (move-to-column (max (current-column) |
| 6516 | (if (> org-tags-column 0) | 6641 | (if (> org-tags-column 0) |
| 6517 | org-tags-column | 6642 | org-tags-column |
| 6518 | (- (- org-tags-column) (length tags)))) | 6643 | (- (- org-tags-column) (length tags)))) |
| 6519 | t) | 6644 | t) |
| 6520 | (insert tags)) | 6645 | (insert-before-markers tags) |
| 6646 | (if (and (not invis) (org-invisible-p)) | ||
| 6647 | (outline-flag-region (point-at-bol) (point) nil))) | ||
| 6521 | (move-to-column col)))) | 6648 | (move-to-column col)))) |
| 6522 | 6649 | ||
| 6523 | (defun org-tags-completion-function (string predicate &optional flag) | 6650 | (defun org-tags-completion-function (string predicate &optional flag) |
| @@ -6551,7 +6678,7 @@ With prefix ARG, realign all tags in headings in the current buffer." | |||
| 6551 | (error "Not on a heading")) | 6678 | (error "Not on a heading")) |
| 6552 | (save-excursion | 6679 | (save-excursion |
| 6553 | (beginning-of-line 1) | 6680 | (beginning-of-line 1) |
| 6554 | (if (looking-at ".*[ \t]\\(:[A-Za-z_:]+:\\)[ \t]*\\(\r\\|$\\)") | 6681 | (if (looking-at ".*[ \t]\\(:[A-Za-z_@0-9:]+:\\)[ \t]*\\(\r\\|$\\)") |
| 6555 | (match-string 1) | 6682 | (match-string 1) |
| 6556 | ""))) | 6683 | ""))) |
| 6557 | 6684 | ||
| @@ -6560,7 +6687,7 @@ With prefix ARG, realign all tags in headings in the current buffer." | |||
| 6560 | (let (tags) | 6687 | (let (tags) |
| 6561 | (save-excursion | 6688 | (save-excursion |
| 6562 | (goto-char (point-min)) | 6689 | (goto-char (point-min)) |
| 6563 | (while (re-search-forward "[ \t]:\\([A-Za-z_:]+\\):[ \t\r\n]" nil t) | 6690 | (while (re-search-forward "[ \t]:\\([A-Za-z_@0-9:]+\\):[ \t\r\n]" nil t) |
| 6564 | (mapc (lambda (x) (add-to-list 'tags x)) | 6691 | (mapc (lambda (x) (add-to-list 'tags x)) |
| 6565 | (org-split-string (match-string 1) ":")))) | 6692 | (org-split-string (match-string 1) ":")))) |
| 6566 | (mapcar 'list tags))) | 6693 | (mapcar 'list tags))) |
| @@ -6591,9 +6718,34 @@ optional argument IN-EMACS is non-nil, Emacs will visit the file." | |||
| 6591 | (org-agenda-list nil (time-to-days (org-time-string-to-time | 6718 | (org-agenda-list nil (time-to-days (org-time-string-to-time |
| 6592 | (substring (match-string 1) 0 10))) | 6719 | (substring (match-string 1) 0 10))) |
| 6593 | 1) | 6720 | 1) |
| 6594 | (let (type path line search (pos (point))) | 6721 | (let (type path link line search (pos (point))) |
| 6595 | (catch 'match | 6722 | (catch 'match |
| 6596 | (save-excursion | 6723 | (save-excursion |
| 6724 | (skip-chars-forward "^]\n\r") | ||
| 6725 | (when (and (re-search-backward "\\[\\[" nil t) | ||
| 6726 | (looking-at org-bracket-link-regexp) | ||
| 6727 | (<= (match-beginning 0) pos) | ||
| 6728 | (>= (match-end 0) pos)) | ||
| 6729 | (setq link (match-string 1)) | ||
| 6730 | (while (string-match " *\n *" link) | ||
| 6731 | (setq link (replace-match " " t t link))) | ||
| 6732 | (if (string-match org-link-regexp link) | ||
| 6733 | (setq type (match-string 1) | ||
| 6734 | path (match-string 2)) | ||
| 6735 | (setq type "thisfile" | ||
| 6736 | path link)) | ||
| 6737 | (throw 'match t))) | ||
| 6738 | |||
| 6739 | (when (get-text-property (point) 'org-linked-text) | ||
| 6740 | (setq type "thisfile" | ||
| 6741 | pos (if (get-text-property (1+ (point)) 'org-linked-text) | ||
| 6742 | (1+ (point)) (point)) | ||
| 6743 | path (buffer-substring | ||
| 6744 | (previous-single-property-change pos 'org-linked-text) | ||
| 6745 | (next-single-property-change pos 'org-linked-text))) | ||
| 6746 | (throw 'match t)) | ||
| 6747 | |||
| 6748 | (save-excursion | ||
| 6597 | (skip-chars-backward | 6749 | (skip-chars-backward |
| 6598 | (concat (if org-allow-space-in-links "^" "^ ") | 6750 | (concat (if org-allow-space-in-links "^" "^ ") |
| 6599 | org-non-link-chars)) | 6751 | org-non-link-chars)) |
| @@ -6606,7 +6758,7 @@ optional argument IN-EMACS is non-nil, Emacs will visit the file." | |||
| 6606 | (throw 'match t))) | 6758 | (throw 'match t))) |
| 6607 | (save-excursion | 6759 | (save-excursion |
| 6608 | (skip-chars-backward "^ \t\n\r") | 6760 | (skip-chars-backward "^ \t\n\r") |
| 6609 | (when (looking-at "\\(:[A-Za-z_:]+\\):[ \t\r\n]") | 6761 | (when (looking-at "\\(:[A-Za-z_@0-9:]+\\):[ \t\r\n]") |
| 6610 | (setq type "tags" | 6762 | (setq type "tags" |
| 6611 | path (match-string 1)) | 6763 | path (match-string 1)) |
| 6612 | (while (string-match ":" path) | 6764 | (while (string-match ":" path) |
| @@ -6614,7 +6766,8 @@ optional argument IN-EMACS is non-nil, Emacs will visit the file." | |||
| 6614 | (throw 'match t))) | 6766 | (throw 'match t))) |
| 6615 | (save-excursion | 6767 | (save-excursion |
| 6616 | (skip-chars-backward "a-zA-Z_") | 6768 | (skip-chars-backward "a-zA-Z_") |
| 6617 | (when (looking-at org-camel-regexp) | 6769 | (when (and org-activate-camels |
| 6770 | (looking-at org-camel-regexp)) | ||
| 6618 | (setq type "camel" path (match-string 0)) | 6771 | (setq type "camel" path (match-string 0)) |
| 6619 | (if (equal (char-before) ?*) | 6772 | (if (equal (char-before) ?*) |
| 6620 | (setq path (concat "*" path)))) | 6773 | (setq path (concat "*" path)))) |
| @@ -6639,7 +6792,9 @@ optional argument IN-EMACS is non-nil, Emacs will visit the file." | |||
| 6639 | 6792 | ||
| 6640 | ((string= type "tags") | 6793 | ((string= type "tags") |
| 6641 | (org-tags-view in-emacs path)) | 6794 | (org-tags-view in-emacs path)) |
| 6642 | ((string= type "camel") | 6795 | ((or (string= type "camel") |
| 6796 | (string= type "thisfile")) | ||
| 6797 | (org-mark-ring-push) | ||
| 6643 | (org-link-search | 6798 | (org-link-search |
| 6644 | path | 6799 | path |
| 6645 | (cond ((equal in-emacs '(4)) 'occur) | 6800 | (cond ((equal in-emacs '(4)) 'occur) |
| @@ -6686,6 +6841,14 @@ optional argument IN-EMACS is non-nil, Emacs will visit the file." | |||
| 6686 | article (match-string 3 path)) | 6841 | article (match-string 3 path)) |
| 6687 | (org-follow-wl-link folder article))) | 6842 | (org-follow-wl-link folder article))) |
| 6688 | 6843 | ||
| 6844 | ((string= type "mhe") | ||
| 6845 | (let (folder article) | ||
| 6846 | (if (not (string-match "\\`\\([^#]+\\)\\(#\\(.*\\)\\)?" path)) | ||
| 6847 | (error "Error in MHE link")) | ||
| 6848 | (setq folder (match-string 1 path) | ||
| 6849 | article (match-string 3 path)) | ||
| 6850 | (org-follow-mhe-link folder article))) | ||
| 6851 | |||
| 6689 | ((string= type "rmail") | 6852 | ((string= type "rmail") |
| 6690 | (let (folder article) | 6853 | (let (folder article) |
| 6691 | (if (not (string-match "\\`\\([^#]+\\)\\(#\\(.*\\)\\)?" path)) | 6854 | (if (not (string-match "\\`\\([^#]+\\)\\(#\\(.*\\)\\)?" path)) |
| @@ -6717,11 +6880,19 @@ sparse tree. In ordinary files, `occur' will be used to list matches. | |||
| 6717 | If the current buffer is in `dired-mode', grep will be used to search | 6880 | If the current buffer is in `dired-mode', grep will be used to search |
| 6718 | in all files." | 6881 | in all files." |
| 6719 | (let ((case-fold-search t) | 6882 | (let ((case-fold-search t) |
| 6720 | (s0 s) | 6883 | (s0 (mapconcat 'identity (org-split-string s "[ \t\r\n]+") " ")) |
| 6721 | (pos (point)) | 6884 | (pos (point)) |
| 6722 | (pre "") (post "") | 6885 | (pre "") (post "") |
| 6723 | words re0 re1 re2 re3 re4 re5 reall) | 6886 | words re0 re1 re2 re3 re4 re5 reall camel) |
| 6724 | (cond ((string-match "^/\\(.*\\)/$" s) | 6887 | (cond ((save-excursion |
| 6888 | (goto-char (point-min)) | ||
| 6889 | (and | ||
| 6890 | (re-search-forward | ||
| 6891 | (concat "<<" (regexp-quote s0) ">>") nil t) | ||
| 6892 | (setq pos (match-beginning 0)))) | ||
| 6893 | ;; There is an exact target for this | ||
| 6894 | (goto-char pos)) | ||
| 6895 | ((string-match "^/\\(.*\\)/$" s) | ||
| 6725 | ;; A regular expression | 6896 | ;; A regular expression |
| 6726 | (cond | 6897 | (cond |
| 6727 | ((eq major-mode 'org-mode) | 6898 | ((eq major-mode 'org-mode) |
| @@ -6729,17 +6900,22 @@ in all files." | |||
| 6729 | ;;((eq major-mode 'dired-mode) | 6900 | ;;((eq major-mode 'dired-mode) |
| 6730 | ;; (grep (concat "grep -n -e '" (match-string 1 s) "' *"))) | 6901 | ;; (grep (concat "grep -n -e '" (match-string 1 s) "' *"))) |
| 6731 | (t (org-do-occur (match-string 1 s))))) | 6902 | (t (org-do-occur (match-string 1 s))))) |
| 6732 | ((string-match (concat "^" org-camel-regexp) s) | 6903 | ((or (setq camel (string-match (concat "^" org-camel-regexp "$") s)) |
| 6733 | ;; A camel | 6904 | t) |
| 6734 | (if (equal (string-to-char s) ?*) | 6905 | ;; A camel or a normal search string |
| 6735 | (setq pre "^\\*+[ \t]*\\(\\sw+\\)?[ \t]*" | 6906 | (when (equal (string-to-char s) ?*) |
| 6736 | post "[ \t]*$" | 6907 | ;; Anchor on headlines, post may include tags. |
| 6737 | s (substring s 1))) | 6908 | (setq pre "^\\*+[ \t]*\\(\\sw+\\)?[ \t]*" |
| 6909 | post "[ \t]*\\([ \t]+:[a-zA-Z_@0-9:+]:[ \t]*\\)?$" | ||
| 6910 | s (substring s 1))) | ||
| 6738 | (remove-text-properties | 6911 | (remove-text-properties |
| 6739 | 0 (length s) | 6912 | 0 (length s) |
| 6740 | '(face nil mouse-face nil keymap nil fontified nil) s) | 6913 | '(face nil mouse-face nil keymap nil fontified nil) s) |
| 6741 | ;; Make a series of regular expressions to find a match | 6914 | ;; Make a series of regular expressions to find a match |
| 6742 | (setq words (org-camel-to-words s) | 6915 | (setq words |
| 6916 | (if camel | ||
| 6917 | (org-camel-to-words s) | ||
| 6918 | (org-split-string s "[ \n\r\t]+")) | ||
| 6743 | re0 (concat "<<" (regexp-quote s0) ">>") | 6919 | re0 (concat "<<" (regexp-quote s0) ">>") |
| 6744 | re2 (concat "\\<" (mapconcat 'downcase words "[ \t]+") "\\>") | 6920 | re2 (concat "\\<" (mapconcat 'downcase words "[ \t]+") "\\>") |
| 6745 | re4 (concat "\\<" (mapconcat 'downcase words "[^a-zA-Z_\r\n]+") "\\>") | 6921 | re4 (concat "\\<" (mapconcat 'downcase words "[^a-zA-Z_\r\n]+") "\\>") |
| @@ -6770,7 +6946,8 @@ in all files." | |||
| 6770 | (goto-char (point-min)) | 6946 | (goto-char (point-min)) |
| 6771 | (if (search-forward s nil t) | 6947 | (if (search-forward s nil t) |
| 6772 | (goto-char (match-beginning 0)) | 6948 | (goto-char (match-beginning 0)) |
| 6773 | (error "No match")))))) | 6949 | (error "No match")))) |
| 6950 | (and (eq major-mode 'org-mode) (org-show-hierarchy-above)))) | ||
| 6774 | 6951 | ||
| 6775 | (defun org-do-occur (regexp &optional cleanup) | 6952 | (defun org-do-occur (regexp &optional cleanup) |
| 6776 | "Call the Emacs command `occur'. | 6953 | "Call the Emacs command `occur'. |
| @@ -6791,6 +6968,47 @@ to read." | |||
| 6791 | (goto-char (point-min)) | 6968 | (goto-char (point-min)) |
| 6792 | (select-window cwin)))) | 6969 | (select-window cwin)))) |
| 6793 | 6970 | ||
| 6971 | (defvar org-mark-ring nil | ||
| 6972 | "Mark ring for positions before jumps in Org-mode.") | ||
| 6973 | (defvar org-mark-ring-last-goto nil | ||
| 6974 | "Last position in the mark ring used to go back.") | ||
| 6975 | ;; Fill and close the ring | ||
| 6976 | (setq org-mark-ring nil org-mark-ring-last-goto nil) ;; in case file is reloaded | ||
| 6977 | (loop for i from 1 to org-mark-ring-length do | ||
| 6978 | (push (make-marker) org-mark-ring)) | ||
| 6979 | (setcdr (nthcdr (1- org-mark-ring-length) org-mark-ring) | ||
| 6980 | org-mark-ring) | ||
| 6981 | |||
| 6982 | (defun org-mark-ring-push (&optional pos buffer) | ||
| 6983 | "Put the current position or POS into the mark ring and rotate it." | ||
| 6984 | (interactive) | ||
| 6985 | (setq pos (or pos (point))) | ||
| 6986 | (setq org-mark-ring (nthcdr (1- org-mark-ring-length) org-mark-ring)) | ||
| 6987 | (move-marker (car org-mark-ring) | ||
| 6988 | (or pos (point)) | ||
| 6989 | (or buffer (current-buffer))) | ||
| 6990 | (message | ||
| 6991 | (substitute-command-keys | ||
| 6992 | "Position saved to mark ring, go back with \\[org-mark-ring-goto]."))) | ||
| 6993 | |||
| 6994 | (defun org-mark-ring-goto (&optional n) | ||
| 6995 | "Jump to the previous position in the mark ring. | ||
| 6996 | With prefix arg N, jump back that many stored positions. When | ||
| 6997 | called several times in succession, walk through the entire ring. | ||
| 6998 | Org-mode commands jumping to a different position in the current file, | ||
| 6999 | or to another Org-mode file, automatically push the old position | ||
| 7000 | onto the ring." | ||
| 7001 | (interactive "p") | ||
| 7002 | (let (p m) | ||
| 7003 | (if (eq last-command this-command) | ||
| 7004 | (setq p (nthcdr n (or org-mark-ring-last-goto org-mark-ring))) | ||
| 7005 | (setq p org-mark-ring)) | ||
| 7006 | (setq org-mark-ring-last-goto p) | ||
| 7007 | (setq m (car p)) | ||
| 7008 | (switch-to-buffer (marker-buffer m)) | ||
| 7009 | (goto-char m) | ||
| 7010 | (if (or (org-invisible-p) (org-invisible-p2)) (org-show-hierarchy-above)))) | ||
| 7011 | |||
| 6794 | (defun org-camel-to-words (s) | 7012 | (defun org-camel-to-words (s) |
| 6795 | "Split \"CamelCaseWords\" to (\"Camel\" \"Case\" \"Words\")." | 7013 | "Split \"CamelCaseWords\" to (\"Camel\" \"Case\" \"Words\")." |
| 6796 | (let ((case-fold-search nil) | 7014 | (let ((case-fold-search nil) |
| @@ -6800,10 +7018,20 @@ to read." | |||
| 6800 | (setq s (substring s (1+ (match-beginning 0))))) | 7018 | (setq s (substring s (1+ (match-beginning 0))))) |
| 6801 | (nreverse (cons s words)))) | 7019 | (nreverse (cons s words)))) |
| 6802 | 7020 | ||
| 7021 | (defun org-remove-angle-brackets (s) | ||
| 7022 | (if (equal (substring s 0 1) "<") (setq s (substring s 1))) | ||
| 7023 | (if (equal (substring s -1) ">") (setq s (substring s 0 -1))) | ||
| 7024 | s) | ||
| 7025 | (defun org-add-angle-brackets (s) | ||
| 7026 | (if (equal (substring s 0 1) "<") nil (setq s (concat "<" s))) | ||
| 7027 | (if (equal (substring s -1) ">") nil (setq s (concat s ">"))) | ||
| 7028 | s) | ||
| 7029 | |||
| 6803 | (defun org-follow-bbdb-link (name) | 7030 | (defun org-follow-bbdb-link (name) |
| 6804 | "Follow a BBDB link to NAME." | 7031 | "Follow a BBDB link to NAME." |
| 6805 | (require 'bbdb) | 7032 | (require 'bbdb) |
| 6806 | (let ((inhibit-redisplay t)) | 7033 | (let ((inhibit-redisplay t) |
| 7034 | (bbdb-electric-p nil)) | ||
| 6807 | (catch 'exit | 7035 | (catch 'exit |
| 6808 | ;; Exact match on name | 7036 | ;; Exact match on name |
| 6809 | (bbdb-name (concat "\\`" name "\\'") nil) | 7037 | (bbdb-name (concat "\\`" name "\\'") nil) |
| @@ -6839,6 +7067,7 @@ to read." | |||
| 6839 | (defun org-follow-vm-link (&optional folder article readonly) | 7067 | (defun org-follow-vm-link (&optional folder article readonly) |
| 6840 | "Follow a VM link to FOLDER and ARTICLE." | 7068 | "Follow a VM link to FOLDER and ARTICLE." |
| 6841 | (require 'vm) | 7069 | (require 'vm) |
| 7070 | (setq article (org-add-angle-brackets article)) | ||
| 6842 | (if (string-match "^//\\([a-zA-Z]+@\\)?\\([^:]+\\):\\(.*\\)" folder) | 7071 | (if (string-match "^//\\([a-zA-Z]+@\\)?\\([^:]+\\):\\(.*\\)" folder) |
| 6843 | ;; ange-ftp or efs or tramp access | 7072 | ;; ange-ftp or efs or tramp access |
| 6844 | (let ((user (or (match-string 1 folder) (user-login-name))) | 7073 | (let ((user (or (match-string 1 folder) (user-login-name))) |
| @@ -6872,12 +7101,14 @@ to read." | |||
| 6872 | 7101 | ||
| 6873 | (defun org-follow-wl-link (folder article) | 7102 | (defun org-follow-wl-link (folder article) |
| 6874 | "Follow a Wanderlust link to FOLDER and ARTICLE." | 7103 | "Follow a Wanderlust link to FOLDER and ARTICLE." |
| 7104 | (setq article (org-add-angle-brackets article)) | ||
| 6875 | (wl-summary-goto-folder-subr folder 'no-sync t nil t) | 7105 | (wl-summary-goto-folder-subr folder 'no-sync t nil t) |
| 6876 | (if article (wl-summary-jump-to-msg-by-message-id article)) | 7106 | (if article (wl-summary-jump-to-msg-by-message-id article ">")) |
| 6877 | (wl-summary-redisplay)) | 7107 | (wl-summary-redisplay)) |
| 6878 | 7108 | ||
| 6879 | (defun org-follow-rmail-link (folder article) | 7109 | (defun org-follow-rmail-link (folder article) |
| 6880 | "Follow an RMAIL link to FOLDER and ARTICLE." | 7110 | "Follow an RMAIL link to FOLDER and ARTICLE." |
| 7111 | (setq article (org-add-angle-brackets article)) | ||
| 6881 | (let (message-number) | 7112 | (let (message-number) |
| 6882 | (save-excursion | 7113 | (save-excursion |
| 6883 | (save-window-excursion | 7114 | (save-window-excursion |
| @@ -6898,6 +7129,107 @@ to read." | |||
| 6898 | message-number) | 7129 | message-number) |
| 6899 | (error "Message not found")))) | 7130 | (error "Message not found")))) |
| 6900 | 7131 | ||
| 7132 | ;; mh-e integration based on planner-mode | ||
| 7133 | (defun org-mhe-get-message-real-folder () | ||
| 7134 | "Return the name of the current message real folder, so if you use | ||
| 7135 | sequences, it will now work." | ||
| 7136 | (save-excursion | ||
| 7137 | (let* ((folder | ||
| 7138 | (if (equal major-mode 'mh-folder-mode) | ||
| 7139 | mh-current-folder | ||
| 7140 | ;; Refer to the show buffer | ||
| 7141 | mh-show-folder-buffer)) | ||
| 7142 | (end-index | ||
| 7143 | (if (boundp 'mh-index-folder) | ||
| 7144 | (min (length mh-index-folder) (length folder)))) | ||
| 7145 | ) | ||
| 7146 | ;; a simple test on mh-index-data does not work, because | ||
| 7147 | ;; mh-index-data is always nil in a show buffer. | ||
| 7148 | (if (and (boundp 'mh-index-folder) | ||
| 7149 | (string= mh-index-folder (substring folder 0 end-index))) | ||
| 7150 | (if (equal major-mode 'mh-show-mode) | ||
| 7151 | (save-window-excursion | ||
| 7152 | (when (buffer-live-p (get-buffer folder)) | ||
| 7153 | (progn | ||
| 7154 | (pop-to-buffer folder) | ||
| 7155 | (org-mhe-get-message-folder-from-index) | ||
| 7156 | ) | ||
| 7157 | )) | ||
| 7158 | (org-mhe-get-message-folder-from-index) | ||
| 7159 | ) | ||
| 7160 | folder | ||
| 7161 | ) | ||
| 7162 | ))) | ||
| 7163 | |||
| 7164 | (defun org-mhe-get-message-folder-from-index () | ||
| 7165 | "Returns the name of the message folder in a index folder | ||
| 7166 | buffer." | ||
| 7167 | (save-excursion | ||
| 7168 | (mh-index-previous-folder) | ||
| 7169 | (if (not (re-search-forward "^\\(+.*\\)$" nil t)) | ||
| 7170 | (message "Problem getting folder from index.") | ||
| 7171 | (message (match-string 1))))) | ||
| 7172 | |||
| 7173 | (defun org-mhe-get-message-folder () | ||
| 7174 | "Return the name of the current message folder. Be careful if you | ||
| 7175 | use sequences." | ||
| 7176 | (save-excursion | ||
| 7177 | (if (equal major-mode 'mh-folder-mode) | ||
| 7178 | mh-current-folder | ||
| 7179 | ;; Refer to the show buffer | ||
| 7180 | mh-show-folder-buffer))) | ||
| 7181 | |||
| 7182 | (defun org-mhe-get-message-num () | ||
| 7183 | "Return the number of the current message. Be careful if you | ||
| 7184 | use sequences." | ||
| 7185 | (save-excursion | ||
| 7186 | (if (equal major-mode 'mh-folder-mode) | ||
| 7187 | (mh-get-msg-num nil) | ||
| 7188 | ;; Refer to the show buffer | ||
| 7189 | (mh-show-buffer-message-number)))) | ||
| 7190 | |||
| 7191 | (defun org-mhe-get-header (header) | ||
| 7192 | "Return a header of the message in folder mode. This will create a | ||
| 7193 | show buffer for the corresponding message. If you have a more clever | ||
| 7194 | idea..." | ||
| 7195 | (let* ((folder (org-mhe-get-message-folder)) | ||
| 7196 | (num (org-mhe-get-message-num)) | ||
| 7197 | (buffer (get-buffer-create (concat "show-" folder))) | ||
| 7198 | (header-field)) | ||
| 7199 | (with-current-buffer buffer | ||
| 7200 | (mh-display-msg num folder) | ||
| 7201 | (if (equal major-mode 'mh-folder-mode) | ||
| 7202 | (mh-header-display) | ||
| 7203 | (mh-show-header-display)) | ||
| 7204 | (set-buffer buffer) | ||
| 7205 | (setq header-field (mh-get-header-field header)) | ||
| 7206 | (if (equal major-mode 'mh-folder-mode) | ||
| 7207 | (mh-show) | ||
| 7208 | (mh-show-show)) | ||
| 7209 | header-field))) | ||
| 7210 | |||
| 7211 | (defun org-follow-mhe-link (folder article) | ||
| 7212 | "Follow an MHE link to FOLDER and ARTICLE." | ||
| 7213 | (setq article (org-add-angle-brackets article)) | ||
| 7214 | ;; (require 'mh-e) | ||
| 7215 | (mh-rmail) ;; mh-e is standard with emacs 22 | ||
| 7216 | (let* ((show-buf (concat "show-" folder))) | ||
| 7217 | (get-buffer-create show-buf) | ||
| 7218 | (mh-display-msg | ||
| 7219 | (string-to-number | ||
| 7220 | (car (split-string | ||
| 7221 | (with-temp-buffer | ||
| 7222 | (call-process | ||
| 7223 | (expand-file-name "pick" mh-progs) | ||
| 7224 | nil t nil | ||
| 7225 | folder | ||
| 7226 | "--message-id" | ||
| 7227 | article) | ||
| 7228 | (buffer-string)) | ||
| 7229 | "\n"))) | ||
| 7230 | folder) | ||
| 7231 | (pop-to-buffer show-buf))) | ||
| 7232 | |||
| 6901 | (defun org-open-file (path &optional in-emacs line search) | 7233 | (defun org-open-file (path &optional in-emacs line search) |
| 6902 | "Open the file at PATH. | 7234 | "Open the file at PATH. |
| 6903 | First, this expands any special file name abbreviations. Then the | 7235 | First, this expands any special file name abbreviations. Then the |
| @@ -6913,7 +7245,11 @@ If the file does not exist, an error is thrown." | |||
| 6913 | (let* ((file (if (equal path "") | 7245 | (let* ((file (if (equal path "") |
| 6914 | (buffer-file-name) | 7246 | (buffer-file-name) |
| 6915 | (convert-standard-filename (org-expand-file-name path)))) | 7247 | (convert-standard-filename (org-expand-file-name path)))) |
| 7248 | (dirp (file-directory-p file)) | ||
| 6916 | (dfile (downcase file)) | 7249 | (dfile (downcase file)) |
| 7250 | (old-buffer (current-buffer)) | ||
| 7251 | (old-pos (point)) | ||
| 7252 | (old-mode major-mode) | ||
| 6917 | ext cmd apps) | 7253 | ext cmd apps) |
| 6918 | (if (and (not (file-exists-p file)) | 7254 | (if (and (not (file-exists-p file)) |
| 6919 | (not org-open-non-existing-files)) | 7255 | (not org-open-non-existing-files)) |
| @@ -6925,7 +7261,8 @@ If the file does not exist, an error is thrown." | |||
| 6925 | (setq apps (append org-file-apps (org-default-apps))) | 7261 | (setq apps (append org-file-apps (org-default-apps))) |
| 6926 | (if in-emacs | 7262 | (if in-emacs |
| 6927 | (setq cmd 'emacs) | 7263 | (setq cmd 'emacs) |
| 6928 | (setq cmd (or (cdr (assoc ext apps)) | 7264 | (setq cmd (or (and dirp (cdr (assoc 'directory apps))) |
| 7265 | (cdr (assoc ext apps)) | ||
| 6929 | (cdr (assoc t apps))))) | 7266 | (cdr (assoc t apps))))) |
| 6930 | (when (eq cmd 'mailcap) | 7267 | (when (eq cmd 'mailcap) |
| 6931 | (require 'mailcap) | 7268 | (require 'mailcap) |
| @@ -6948,7 +7285,11 @@ If the file does not exist, an error is thrown." | |||
| 6948 | (if search (org-link-search search)))) | 7285 | (if search (org-link-search search)))) |
| 6949 | ((consp cmd) | 7286 | ((consp cmd) |
| 6950 | (eval cmd)) | 7287 | (eval cmd)) |
| 6951 | (t (funcall (cdr (assq 'file org-link-frame-setup)) file))))) | 7288 | (t (funcall (cdr (assq 'file org-link-frame-setup)) file))) |
| 7289 | (and (eq major-mode 'org-mode) (eq old-mode 'org-mode) | ||
| 7290 | (or (not (equal old-buffer (current-buffer))) | ||
| 7291 | (not (equal old-pos (point)))) | ||
| 7292 | (org-mark-ring-push old-pos old-buffer)))) | ||
| 6952 | 7293 | ||
| 6953 | (defun org-default-apps () | 7294 | (defun org-default-apps () |
| 6954 | "Return the default applications for this operating system." | 7295 | "Return the default applications for this operating system." |
| @@ -6979,7 +7320,7 @@ For some link types, a prefix arg is interpreted: | |||
| 6979 | For links to usenet articles, arg negates `org-usenet-links-prefer-google'. | 7320 | For links to usenet articles, arg negates `org-usenet-links-prefer-google'. |
| 6980 | For file links, arg negates `org-context-in-file-links'." | 7321 | For file links, arg negates `org-context-in-file-links'." |
| 6981 | (interactive "P") | 7322 | (interactive "P") |
| 6982 | (let (link cpltxt) | 7323 | (let (link cpltxt txt (pos (point))) |
| 6983 | (cond | 7324 | (cond |
| 6984 | 7325 | ||
| 6985 | ((eq major-mode 'bbdb-mode) | 7326 | ((eq major-mode 'bbdb-mode) |
| @@ -7009,6 +7350,7 @@ For file links, arg negates `org-context-in-file-links'." | |||
| 7009 | (subject (vm-su-subject message)) | 7350 | (subject (vm-su-subject message)) |
| 7010 | (author (vm-su-full-name message)) | 7351 | (author (vm-su-full-name message)) |
| 7011 | (message-id (vm-su-message-id message))) | 7352 | (message-id (vm-su-message-id message))) |
| 7353 | (setq message-id (org-remove-angle-brackets message-id)) | ||
| 7012 | (setq folder (abbreviate-file-name folder)) | 7354 | (setq folder (abbreviate-file-name folder)) |
| 7013 | (if (string-match (concat "^" (regexp-quote vm-folder-directory)) | 7355 | (if (string-match (concat "^" (regexp-quote vm-folder-directory)) |
| 7014 | folder) | 7356 | folder) |
| @@ -7026,12 +7368,25 @@ For file links, arg negates `org-context-in-file-links'." | |||
| 7026 | msgnum (wl-summary-buffer-msgdb))) | 7368 | msgnum (wl-summary-buffer-msgdb))) |
| 7027 | (author (wl-summary-line-from)) ; FIXME: how to get author name? | 7369 | (author (wl-summary-line-from)) ; FIXME: how to get author name? |
| 7028 | (subject "???")) ; FIXME: How to get subject of email? | 7370 | (subject "???")) ; FIXME: How to get subject of email? |
| 7371 | (setq message-id (org-remove-angle-brackets message-id)) | ||
| 7029 | (setq cpltxt (concat author " on: " subject)) | 7372 | (setq cpltxt (concat author " on: " subject)) |
| 7030 | (setq link (concat cpltxt "\n " | 7373 | (setq link (concat cpltxt "\n " |
| 7031 | (org-make-link | 7374 | (org-make-link |
| 7032 | "wl:" wl-summary-buffer-folder-name | 7375 | "wl:" wl-summary-buffer-folder-name |
| 7033 | "#" message-id))))) | 7376 | "#" message-id))))) |
| 7034 | 7377 | ||
| 7378 | ((or (equal major-mode 'mh-folder-mode) | ||
| 7379 | (equal major-mode 'mh-show-mode)) | ||
| 7380 | (let ((from-header (org-mhe-get-header "From:")) | ||
| 7381 | (to-header (org-mhe-get-header "To:")) | ||
| 7382 | (subject (org-mhe-get-header "Subject:"))) | ||
| 7383 | (setq cpltxt (concat from-header " on: " subject)) | ||
| 7384 | (setq link (concat cpltxt "\n " | ||
| 7385 | (org-make-link | ||
| 7386 | "mhe:" (org-mhe-get-message-real-folder) "#" | ||
| 7387 | (org-remove-angle-brackets | ||
| 7388 | (org-mhe-get-header "Message-Id:"))))))) | ||
| 7389 | |||
| 7035 | ((eq major-mode 'rmail-mode) | 7390 | ((eq major-mode 'rmail-mode) |
| 7036 | (save-excursion | 7391 | (save-excursion |
| 7037 | (save-restriction | 7392 | (save-restriction |
| @@ -7040,6 +7395,7 @@ For file links, arg negates `org-context-in-file-links'." | |||
| 7040 | (message-id (mail-fetch-field "message-id")) | 7395 | (message-id (mail-fetch-field "message-id")) |
| 7041 | (author (mail-fetch-field "from")) | 7396 | (author (mail-fetch-field "from")) |
| 7042 | (subject (mail-fetch-field "subject"))) | 7397 | (subject (mail-fetch-field "subject"))) |
| 7398 | (setq message-id (org-remove-angle-brackets message-id)) | ||
| 7043 | (setq cpltxt (concat author " on: " subject)) | 7399 | (setq cpltxt (concat author " on: " subject)) |
| 7044 | (setq link (concat cpltxt "\n " | 7400 | (setq link (concat cpltxt "\n " |
| 7045 | (org-make-link | 7401 | (org-make-link |
| @@ -7093,19 +7449,26 @@ For file links, arg negates `org-context-in-file-links'." | |||
| 7093 | (abbreviate-file-name (buffer-file-name)))) | 7449 | (abbreviate-file-name (buffer-file-name)))) |
| 7094 | ;; Add a context search string | 7450 | ;; Add a context search string |
| 7095 | (when (org-xor org-context-in-file-links arg) | 7451 | (when (org-xor org-context-in-file-links arg) |
| 7452 | ;; Check if we are on a target | ||
| 7096 | (if (save-excursion | 7453 | (if (save-excursion |
| 7097 | (skip-chars-backward "a-zA-Z<") | 7454 | (skip-chars-forward "^>\n\r") |
| 7098 | (looking-at (concat "<<\\(" org-camel-regexp "\\)>>"))) | 7455 | (and (re-search-backward "<<" nil t) |
| 7456 | (looking-at "<<\\(.*?\\)>>") | ||
| 7457 | (<= (match-beginning 0) pos) | ||
| 7458 | (>= (match-end 0) pos))) | ||
| 7099 | (setq cpltxt (concat cpltxt "::" (match-string 1))) | 7459 | (setq cpltxt (concat cpltxt "::" (match-string 1))) |
| 7460 | (setq txt (cond | ||
| 7461 | ((org-on-heading-p) nil) | ||
| 7462 | ((org-region-active-p) | ||
| 7463 | (buffer-substring (region-beginning) (region-end))) | ||
| 7464 | (t (buffer-substring (point-at-bol) (point-at-eol))))) | ||
| 7100 | (setq cpltxt | 7465 | (setq cpltxt |
| 7101 | (concat cpltxt "::" | 7466 | (concat cpltxt "::" |
| 7102 | (org-make-org-heading-camel | 7467 | (if org-file-link-context-use-camel-case |
| 7103 | (cond | 7468 | (org-make-org-heading-camel txt) |
| 7104 | ((org-on-heading-p) nil) | 7469 | (org-make-org-heading-search-string txt)))))) |
| 7105 | ((org-region-active-p) | 7470 | (if (string-match "::\\'" cpltxt) |
| 7106 | (buffer-substring (region-beginning) (region-end))) | 7471 | (setq cpltxt (substring cpltxt 0 -2))) |
| 7107 | (t (buffer-substring (point-at-bol) (point-at-eol)))) | ||
| 7108 | ))))) | ||
| 7109 | (setq link (org-make-link cpltxt))) | 7472 | (setq link (org-make-link cpltxt))) |
| 7110 | 7473 | ||
| 7111 | ((buffer-file-name) | 7474 | ((buffer-file-name) |
| @@ -7114,19 +7477,21 @@ For file links, arg negates `org-context-in-file-links'." | |||
| 7114 | (abbreviate-file-name (buffer-file-name)))) | 7477 | (abbreviate-file-name (buffer-file-name)))) |
| 7115 | ;; Add a context string | 7478 | ;; Add a context string |
| 7116 | (when (org-xor org-context-in-file-links arg) | 7479 | (when (org-xor org-context-in-file-links arg) |
| 7480 | (setq txt (if (org-region-active-p) | ||
| 7481 | (buffer-substring (region-beginning) (region-end)) | ||
| 7482 | (buffer-substring (point-at-bol) (point-at-eol)))) | ||
| 7117 | (setq cpltxt | 7483 | (setq cpltxt |
| 7118 | (concat cpltxt "::" | 7484 | (concat cpltxt "::" |
| 7119 | (org-make-org-heading-camel | 7485 | (if org-file-link-context-use-camel-case |
| 7120 | (if (org-region-active-p) | 7486 | (org-make-org-heading-camel txt) |
| 7121 | (buffer-substring (region-beginning) (region-end)) | 7487 | (org-make-org-heading-search-string txt))))) |
| 7122 | (buffer-substring (point-at-bol) (point-at-eol))))))) | ||
| 7123 | (setq link (org-make-link cpltxt))) | 7488 | (setq link (org-make-link cpltxt))) |
| 7124 | 7489 | ||
| 7125 | ((interactive-p) | 7490 | ((interactive-p) |
| 7126 | (error "Cannot link to a buffer which is not visiting a file")) | 7491 | (error "Cannot link to a buffer which is not visiting a file")) |
| 7127 | 7492 | ||
| 7128 | (t (setq link nil))) | 7493 | (t (setq link nil))) |
| 7129 | 7494 | ||
| 7130 | (if (and (interactive-p) link) | 7495 | (if (and (interactive-p) link) |
| 7131 | (progn | 7496 | (progn |
| 7132 | (setq org-stored-links | 7497 | (setq org-stored-links |
| @@ -7134,14 +7499,37 @@ For file links, arg negates `org-context-in-file-links'." | |||
| 7134 | (message "Stored: %s" (or cpltxt link))) | 7499 | (message "Stored: %s" (or cpltxt link))) |
| 7135 | link))) | 7500 | link))) |
| 7136 | 7501 | ||
| 7137 | (defun org-make-org-heading-camel (&optional string) | 7502 | (defun org-make-org-heading-search-string (&optional string heading) |
| 7503 | "Make search string for S or current headline." | ||
| 7504 | (interactive) | ||
| 7505 | (let ((s (or string (org-get-heading)))) | ||
| 7506 | (unless (and string (not heading)) | ||
| 7507 | ;; We are using a headline, clean up garbage in there. | ||
| 7508 | (if (string-match org-todo-regexp s) | ||
| 7509 | (setq s (replace-match "" t t s))) | ||
| 7510 | (if (string-match ":[a-zA-Z_@0-9:]+:[ \t]*$" s) | ||
| 7511 | (setq s (replace-match "" t t s))) | ||
| 7512 | (setq s (org-trim s)) | ||
| 7513 | (if (string-match (concat "^\\(" org-quote-string "\\|" | ||
| 7514 | org-comment-string "\\)") s) | ||
| 7515 | (setq s (replace-match "" t t s))) | ||
| 7516 | (while (string-match org-ts-regexp s) | ||
| 7517 | (setq s (replace-match "" t t s)))) | ||
| 7518 | (while (string-match "[^a-zA-Z_0-9 \t]+" s) | ||
| 7519 | (setq s (replace-match " " t t s))) | ||
| 7520 | (or string (setq s (concat "*" s))) ; Add * for headlines | ||
| 7521 | (mapconcat 'identity (org-split-string s "[ \t]+") " "))) | ||
| 7522 | |||
| 7523 | (defun org-make-org-heading-camel (&optional string heading) | ||
| 7138 | "Make a CamelCase string for S or the current headline." | 7524 | "Make a CamelCase string for S or the current headline." |
| 7139 | (interactive) | 7525 | (interactive) |
| 7140 | (let ((s (or string (org-get-heading)))) | 7526 | (let ((s (or string (org-get-heading)))) |
| 7141 | (unless string | 7527 | (unless (and string (not heading)) |
| 7142 | ;; We are using a headline, clean up garbage in there. | 7528 | ;; We are using a headline, clean up garbage in there. |
| 7143 | (if (string-match org-todo-regexp s) | 7529 | (if (string-match org-todo-regexp s) |
| 7144 | (setq s (replace-match "" t t s))) | 7530 | (setq s (replace-match "" t t s))) |
| 7531 | (if (string-match ":[a-zA-Z_@0-9:]+:[ \t]*$" s) | ||
| 7532 | (setq s (replace-match "" t t s))) | ||
| 7145 | (setq s (org-trim s)) | 7533 | (setq s (org-trim s)) |
| 7146 | (if (string-match (concat "^\\(" org-quote-string "\\|" | 7534 | (if (string-match (concat "^\\(" org-quote-string "\\|" |
| 7147 | org-comment-string "\\)") s) | 7535 | org-comment-string "\\)") s) |
| @@ -7157,6 +7545,12 @@ For file links, arg negates `org-context-in-file-links'." | |||
| 7157 | "Concatenate STRINGS, format resulting string with `org-link-format'." | 7545 | "Concatenate STRINGS, format resulting string with `org-link-format'." |
| 7158 | (format org-link-format (apply 'concat strings))) | 7546 | (format org-link-format (apply 'concat strings))) |
| 7159 | 7547 | ||
| 7548 | (defun org-make-link2 (link &optional description) | ||
| 7549 | "Make a link with brackets." | ||
| 7550 | (concat "[[" link "]" | ||
| 7551 | (if description (concat "[" description "]") "") | ||
| 7552 | "]")) | ||
| 7553 | |||
| 7160 | (defun org-xor (a b) | 7554 | (defun org-xor (a b) |
| 7161 | "Exclusive or." | 7555 | "Exclusive or." |
| 7162 | (if a (not b) b)) | 7556 | (if a (not b) b)) |
| @@ -7245,15 +7639,18 @@ is in the current directory or below." | |||
| 7245 | (let* ((path (match-string 1 link)) | 7639 | (let* ((path (match-string 1 link)) |
| 7246 | (case-fold-search nil) | 7640 | (case-fold-search nil) |
| 7247 | (search (match-string 2 link))) | 7641 | (search (match-string 2 link))) |
| 7248 | (when (save-match-data | 7642 | (when (save-match-data |
| 7249 | (equal (file-truename (buffer-file-name)) | 7643 | (equal (file-truename (buffer-file-name)) |
| 7250 | (file-truename path))) | 7644 | (file-truename path))) |
| 7251 | (if (save-match-data | 7645 | ;; We are linking to this same file |
| 7252 | (string-match (concat "^" org-camel-regexp "$") search)) | 7646 | (if (and org-file-link-context-use-camel-case |
| 7253 | (setq link (replace-match search t t link) | 7647 | (save-match-data |
| 7254 | matched t) | 7648 | (string-match (concat "^" org-camel-regexp "$") search))) |
| 7255 | (setq link (replace-match (concat "<file:::" search ">") | 7649 | (setq link (replace-match search t t link) |
| 7256 | t t link)))))) | 7650 | matched t) |
| 7651 | (setq link (replace-match (concat "[[" search "]]") | ||
| 7652 | t t link) | ||
| 7653 | matched t))))) | ||
| 7257 | (let ((lines (org-split-string link "\n"))) | 7654 | (let ((lines (org-split-string link "\n"))) |
| 7258 | (insert (car lines)) | 7655 | (insert (car lines)) |
| 7259 | (setq matched (or matched (string-match org-link-regexp (car lines)))) | 7656 | (setq matched (or matched (string-match org-link-regexp (car lines)))) |
| @@ -9467,9 +9864,8 @@ table editor in arbitrary modes.") | |||
| 9467 | (and c (setq minor-mode-map-alist | 9864 | (and c (setq minor-mode-map-alist |
| 9468 | (cons c (delq c minor-mode-map-alist))))) | 9865 | (cons c (delq c minor-mode-map-alist))))) |
| 9469 | (set (make-local-variable (quote org-table-may-need-update)) t) | 9866 | (set (make-local-variable (quote org-table-may-need-update)) t) |
| 9470 | (make-local-hook (quote before-change-functions)) ; needed for XEmacs | 9867 | (org-add-hook 'before-change-functions 'org-before-change-function |
| 9471 | (add-hook 'before-change-functions 'org-before-change-function | 9868 | nil 'local) |
| 9472 | nil 'local) | ||
| 9473 | (set (make-local-variable 'org-old-auto-fill-inhibit-regexp) | 9869 | (set (make-local-variable 'org-old-auto-fill-inhibit-regexp) |
| 9474 | auto-fill-inhibit-regexp) | 9870 | auto-fill-inhibit-regexp) |
| 9475 | (set (make-local-variable 'auto-fill-inhibit-regexp) | 9871 | (set (make-local-variable 'auto-fill-inhibit-regexp) |
| @@ -9734,6 +10130,10 @@ a reduced column width." | |||
| 9734 | ((string-match "^#" line) | 10130 | ((string-match "^#" line) |
| 9735 | ;; an ordinary comment line | 10131 | ;; an ordinary comment line |
| 9736 | ) | 10132 | ) |
| 10133 | ((and org-export-table-remove-special-lines | ||
| 10134 | (string-match "^[ \t]*| *[!_^] *|" line)) | ||
| 10135 | ;; a special table line that should be removed | ||
| 10136 | ) | ||
| 9737 | (t (setq rtn (cons line rtn))))) | 10137 | (t (setq rtn (cons line rtn))))) |
| 9738 | (nreverse rtn))) | 10138 | (nreverse rtn))) |
| 9739 | 10139 | ||
| @@ -10587,7 +10987,7 @@ headlines. The default is 3. Lower levels will become bulleted lists." | |||
| 10587 | (concat "<a href=\"" thefile "\">\\1:\\2</a>")) | 10987 | (concat "<a href=\"" thefile "\">\\1:\\2</a>")) |
| 10588 | nil nil line)))) | 10988 | nil nil line)))) |
| 10589 | 10989 | ||
| 10590 | ((member type '("bbdb" "vm" "wl" "rmail" "gnus" "shell")) | 10990 | ((member type '("bbdb" "vm" "wl" "mhe" "rmail" "gnus" "shell")) |
| 10591 | (setq line (replace-match | 10991 | (setq line (replace-match |
| 10592 | "<i><\\1:\\2></i>" nil nil line))))) | 10992 | "<i><\\1:\\2></i>" nil nil line))))) |
| 10593 | 10993 | ||
| @@ -10727,6 +11127,29 @@ headlines. The default is 3. Lower levels will become bulleted lists." | |||
| 10727 | (setq lines (nreverse lines)) | 11127 | (setq lines (nreverse lines)) |
| 10728 | (if (string-match "^[ \t]*|-" (car lines)) (setq lines (cdr lines))) | 11128 | (if (string-match "^[ \t]*|-" (car lines)) (setq lines (cdr lines))) |
| 10729 | (setq lines (nreverse lines)) | 11129 | (setq lines (nreverse lines)) |
| 11130 | (when org-export-table-remove-special-lines | ||
| 11131 | ;; Check if the table has a marking column. If yes remove the | ||
| 11132 | ;; column and the special lines | ||
| 11133 | (let* ((special | ||
| 11134 | (not | ||
| 11135 | (memq nil | ||
| 11136 | (mapcar | ||
| 11137 | (lambda (x) | ||
| 11138 | (or (string-match "^[ \t]*|-" x) | ||
| 11139 | (string-match "^[ \t]*| *\\([#!$*_^ ]\\) *|" x))) | ||
| 11140 | lines))))) | ||
| 11141 | (if special | ||
| 11142 | (setq lines | ||
| 11143 | (delq nil | ||
| 11144 | (mapcar | ||
| 11145 | (lambda (x) | ||
| 11146 | (if (string-match "^[ \t]*| *[!_^] *|" x) | ||
| 11147 | nil ; ignore this line | ||
| 11148 | (and (or (string-match "^[ \t]*|-+\\+" x) | ||
| 11149 | (string-match "^[ \t]*|[^|]*|" x)) | ||
| 11150 | (replace-match "|" t t x)))) | ||
| 11151 | lines)))))) | ||
| 11152 | |||
| 10730 | (let ((head (and org-export-highlight-first-table-line | 11153 | (let ((head (and org-export-highlight-first-table-line |
| 10731 | (delq nil (mapcar | 11154 | (delq nil (mapcar |
| 10732 | (lambda (x) (string-match "^[ \t]*|-" x)) | 11155 | (lambda (x) (string-match "^[ \t]*|-" x)) |
| @@ -11210,10 +11633,10 @@ a time), or the day by one (if it does not contain a time)." | |||
| 11210 | 11633 | ||
| 11211 | ;; - Bindings in Org-mode map are currently | 11634 | ;; - Bindings in Org-mode map are currently |
| 11212 | ;; 0123456789abcdefghijklmnopqrstuvwxyz!?@#$%^&-+*/=()_{}[]:;"|,.<>~`'\t the alphabet | 11635 | ;; 0123456789abcdefghijklmnopqrstuvwxyz!?@#$%^&-+*/=()_{}[]:;"|,.<>~`'\t the alphabet |
| 11213 | ;; abcd fgh j lmnopqrstuvwxyz!? #$ -+*/= [] ; |,.<>~ \t necessary bindings | 11636 | ;; abcd fgh j lmnopqrstuvwxyz!? #$ ^ -+*/= [] ; |,.<>~ '\t necessary bindings |
| 11214 | ;; e (?) useful from outline-mode | 11637 | ;; e (?) useful from outline-mode |
| 11215 | ;; i k @ expendable from outline-mode | 11638 | ;; i k @ expendable from outline-mode |
| 11216 | ;; 0123456789 %^& ()_{} " `' free | 11639 | ;; 0123456789 % & ()_{} " ` free |
| 11217 | 11640 | ||
| 11218 | ;; Make `C-c C-x' a prefix key | 11641 | ;; Make `C-c C-x' a prefix key |
| 11219 | (define-key org-mode-map "\C-c\C-x" (make-sparse-keymap)) | 11642 | (define-key org-mode-map "\C-c\C-x" (make-sparse-keymap)) |
| @@ -11281,6 +11704,8 @@ a time), or the day by one (if it does not contain a time)." | |||
| 11281 | (define-key org-mode-map "\M-\C-m" 'org-insert-heading) | 11704 | (define-key org-mode-map "\M-\C-m" 'org-insert-heading) |
| 11282 | (define-key org-mode-map "\C-c\C-l" 'org-insert-link) | 11705 | (define-key org-mode-map "\C-c\C-l" 'org-insert-link) |
| 11283 | (define-key org-mode-map "\C-c\C-o" 'org-open-at-point) | 11706 | (define-key org-mode-map "\C-c\C-o" 'org-open-at-point) |
| 11707 | (define-key org-mode-map "\C-c%" 'org-mark-ring-push) | ||
| 11708 | (define-key org-mode-map "\C-c&" 'org-mark-ring-goto) | ||
| 11284 | (define-key org-mode-map "\C-c\C-z" 'org-time-stamp) ; Alternative binding | 11709 | (define-key org-mode-map "\C-c\C-z" 'org-time-stamp) ; Alternative binding |
| 11285 | (define-key org-mode-map "\C-c." 'org-time-stamp) ; Minor-mode reserved | 11710 | (define-key org-mode-map "\C-c." 'org-time-stamp) ; Minor-mode reserved |
| 11286 | (define-key org-mode-map "\C-c!" 'org-time-stamp-inactive) ; Minor-mode r. | 11711 | (define-key org-mode-map "\C-c!" 'org-time-stamp-inactive) ; Minor-mode r. |
| @@ -11594,6 +12019,7 @@ If the cursor is on a #+TBLFM line, re-apply the formulae to the table." | |||
| 11594 | (interactive "P") | 12019 | (interactive "P") |
| 11595 | (let ((org-enable-table-editor t)) | 12020 | (let ((org-enable-table-editor t)) |
| 11596 | (cond | 12021 | (cond |
| 12022 | ((org-on-target-p) (org-update-radio-target-regexp)) | ||
| 11597 | ((org-on-heading-p) (org-set-tags arg)) | 12023 | ((org-on-heading-p) (org-set-tags arg)) |
| 11598 | ((org-at-table.el-p) | 12024 | ((org-at-table.el-p) |
| 11599 | (require 'table) | 12025 | (require 'table) |
| @@ -11935,6 +12361,11 @@ work correctly." | |||
| 11935 | 12361 | ||
| 11936 | ;; Functions needed for Emacs/XEmacs region compatibility | 12362 | ;; Functions needed for Emacs/XEmacs region compatibility |
| 11937 | 12363 | ||
| 12364 | (defun org-add-hook (hook function &optional append local) | ||
| 12365 | "Add-hook, compatible with both Emacsen." | ||
| 12366 | (if (and local org-xemacs-p) (make-local-hook hook)) ;; Needed for XEmacs | ||
| 12367 | (add-hook hook function append local)) | ||
| 12368 | |||
| 11938 | (defun org-region-active-p () | 12369 | (defun org-region-active-p () |
| 11939 | "Is `transient-mark-mode' on and the region active? | 12370 | "Is `transient-mark-mode' on and the region active? |
| 11940 | Works on both Emacs and XEmacs." | 12371 | Works on both Emacs and XEmacs." |
| @@ -12030,6 +12461,19 @@ to a visible line beginning. This makes the function of C-a more intuitive." | |||
| 12030 | (skip-chars-backward "^\r\n") | 12461 | (skip-chars-backward "^\r\n") |
| 12031 | (equal (char-before) ?\r)))) | 12462 | (equal (char-before) ?\r)))) |
| 12032 | 12463 | ||
| 12464 | (defun org-invisible-p2 () | ||
| 12465 | "Check if point is at a character currently not visible." | ||
| 12466 | (save-excursion | ||
| 12467 | (if org-noutline-p | ||
| 12468 | (progn | ||
| 12469 | (if (and (eolp) (not (bobp))) (backward-char 1)) | ||
| 12470 | ;; Early versions of noutline don't have `outline-invisible-p'. | ||
| 12471 | (if (fboundp 'outline-invisible-p) | ||
| 12472 | (outline-invisible-p) | ||
| 12473 | (get-char-property (point) 'invisible))) | ||
| 12474 | (skip-chars-backward "^\r\n") | ||
| 12475 | (equal (char-before) ?\r)))) | ||
| 12476 | |||
| 12033 | (defun org-back-to-heading (&optional invisible-ok) | 12477 | (defun org-back-to-heading (&optional invisible-ok) |
| 12034 | "Move to previous heading line, or beg of this line if it's a heading. | 12478 | "Move to previous heading line, or beg of this line if it's a heading. |
| 12035 | Only visible heading lines are considered, unless INVISIBLE-OK is non-nil." | 12479 | Only visible heading lines are considered, unless INVISIBLE-OK is non-nil." |
| @@ -12058,6 +12502,16 @@ If INVISIBLE-OK is non-nil, an invisible heading line is ok too." | |||
| 12058 | (bobp) | 12502 | (bobp) |
| 12059 | (equal (char-before) ?\n)))))) | 12503 | (equal (char-before) ?\n)))))) |
| 12060 | 12504 | ||
| 12505 | (defun org-on-target-p () | ||
| 12506 | (let ((pos (point))) | ||
| 12507 | (save-excursion | ||
| 12508 | (skip-chars-forward "<") | ||
| 12509 | (and (re-search-backward "<<" nil t) | ||
| 12510 | (or (looking-at org-target-regexp) | ||
| 12511 | (looking-at org-radio-target-regexp)) | ||
| 12512 | (<= (match-beginning 0) pos) | ||
| 12513 | (>= (match-end 0) pos))))) | ||
| 12514 | |||
| 12061 | (defun org-up-heading-all (arg) | 12515 | (defun org-up-heading-all (arg) |
| 12062 | "Move to the heading line of which the present line is a subheading. | 12516 | "Move to the heading line of which the present line is a subheading. |
| 12063 | This function considers both visible and invisible heading lines. | 12517 | This function considers both visible and invisible heading lines. |
| @@ -12195,4 +12649,3 @@ Show the heading too, if it is currently invisible." | |||
| 12195 | ;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd | 12649 | ;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd |
| 12196 | ;;; org.el ends here | 12650 | ;;; org.el ends here |
| 12197 | 12651 | ||
| 12198 | |||
diff --git a/lisp/textmodes/reftex-auc.el b/lisp/textmodes/reftex-auc.el index ff044230803..394a0b52b19 100644 --- a/lisp/textmodes/reftex-auc.el +++ b/lisp/textmodes/reftex-auc.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; 2006 Free Software Foundation, Inc. | 3 | ;; 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Carsten Dominik <dominik@science.uva.nl> | 5 | ;; Author: Carsten Dominik <dominik@science.uva.nl> |
| 6 | ;; Version: VERSIONTAG | 6 | ;; Version: 4.31 |
| 7 | 7 | ||
| 8 | ;; This file is part of GNU Emacs. | 8 | ;; This file is part of GNU Emacs. |
| 9 | 9 | ||
diff --git a/lisp/textmodes/reftex-cite.el b/lisp/textmodes/reftex-cite.el index c6f43a07d26..ced44757ffd 100644 --- a/lisp/textmodes/reftex-cite.el +++ b/lisp/textmodes/reftex-cite.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; 2006 Free Software Foundation, Inc. | 3 | ;; 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Carsten Dominik <dominik@science.uva.nl> | 5 | ;; Author: Carsten Dominik <dominik@science.uva.nl> |
| 6 | ;; Version: VERSIONTAG | 6 | ;; Version: 4.31 |
| 7 | 7 | ||
| 8 | ;; This file is part of GNU Emacs. | 8 | ;; This file is part of GNU Emacs. |
| 9 | 9 | ||
diff --git a/lisp/textmodes/reftex-dcr.el b/lisp/textmodes/reftex-dcr.el index 7546c654f70..1e60b8e663e 100644 --- a/lisp/textmodes/reftex-dcr.el +++ b/lisp/textmodes/reftex-dcr.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; 2006 Free Software Foundation, Inc. | 3 | ;; 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Carsten Dominik <dominik@science.uva.nl> | 5 | ;; Author: Carsten Dominik <dominik@science.uva.nl> |
| 6 | ;; Version: VERSIONTAG | 6 | ;; Version: 4.31 |
| 7 | ;; | 7 | ;; |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| @@ -33,7 +33,7 @@ | |||
| 33 | (require 'reftex) | 33 | (require 'reftex) |
| 34 | ;;; | 34 | ;;; |
| 35 | 35 | ||
| 36 | (defun reftex-view-crossref (&optional arg auto-how) | 36 | (defun reftex-view-crossref (&optional arg auto-how fail-quietly) |
| 37 | "View cross reference of macro at point. Point must be on the KEY | 37 | "View cross reference of macro at point. Point must be on the KEY |
| 38 | argument. When at at `\\ref' macro, show corresponding `\\label' | 38 | argument. When at at `\\ref' macro, show corresponding `\\label' |
| 39 | definition, also in external documents (`xr'). When on a label, show | 39 | definition, also in external documents (`xr'). When on a label, show |
| @@ -56,52 +56,53 @@ to the functions `reftex-view-cr-cite' and `reftex-view-cr-ref'." | |||
| 56 | dw) | 56 | dw) |
| 57 | 57 | ||
| 58 | (if (or (null macro) (reftex-in-comment)) | 58 | (if (or (null macro) (reftex-in-comment)) |
| 59 | (error "Not on a crossref macro argument")) | 59 | (or fail-quietly |
| 60 | 60 | (error "Not on a crossref macro argument")) | |
| 61 | (setq reftex-call-back-to-this-buffer (current-buffer)) | 61 | |
| 62 | 62 | (setq reftex-call-back-to-this-buffer (current-buffer)) | |
| 63 | (cond | 63 | |
| 64 | ((string-match "\\`\\\\cite\\|cite\\*?\\'\\|bibentry" macro) | 64 | (cond |
| 65 | ;; A citation macro: search for bibitems or BibTeX entries | 65 | ((string-match "\\`\\\\cite\\|cite\\*?\\'\\|bibentry" macro) |
| 66 | (setq dw (reftex-view-cr-cite arg key auto-how))) | 66 | ;; A citation macro: search for bibitems or BibTeX entries |
| 67 | ((string-match "\\`\\\\ref\\|ref\\(range\\)?\\*?\\'" macro) | 67 | (setq dw (reftex-view-cr-cite arg key auto-how))) |
| 68 | ;; A reference macro: search for labels | 68 | ((string-match "\\`\\\\ref\\|ref\\(range\\)?\\*?\\'" macro) |
| 69 | (setq dw (reftex-view-cr-ref arg key auto-how))) | 69 | ;; A reference macro: search for labels |
| 70 | (auto-how nil) ;; No further action for automatic display (speed) | 70 | (setq dw (reftex-view-cr-ref arg key auto-how))) |
| 71 | ((or (equal macro "\\label") | 71 | (auto-how nil) ;; No further action for automatic display (speed) |
| 72 | (member macro reftex-macros-with-labels)) | 72 | ((or (equal macro "\\label") |
| 73 | ;; A label macro: search for reference macros | 73 | (member macro reftex-macros-with-labels)) |
| 74 | (reftex-access-scan-info arg) | 74 | ;; A label macro: search for reference macros |
| 75 | (setq dw (reftex-view-regexp-match | 75 | (reftex-access-scan-info arg) |
| 76 | (format reftex-find-reference-format (regexp-quote key)) | 76 | (setq dw (reftex-view-regexp-match |
| 77 | 4 nil nil))) | 77 | (format reftex-find-reference-format (regexp-quote key)) |
| 78 | ((equal macro "\\bibitem") | 78 | 4 nil nil))) |
| 79 | ;; A bibitem macro: search for citations | 79 | ((equal macro "\\bibitem") |
| 80 | (reftex-access-scan-info arg) | 80 | ;; A bibitem macro: search for citations |
| 81 | (setq dw (reftex-view-regexp-match | 81 | (reftex-access-scan-info arg) |
| 82 | (format reftex-find-citation-regexp-format (regexp-quote key)) | 82 | (setq dw (reftex-view-regexp-match |
| 83 | 4 nil nil))) | 83 | (format reftex-find-citation-regexp-format (regexp-quote key)) |
| 84 | ((member macro reftex-macros-with-index) | 84 | 4 nil nil))) |
| 85 | (reftex-access-scan-info arg) | 85 | ((member macro reftex-macros-with-index) |
| 86 | (setq dw (reftex-view-regexp-match | 86 | (reftex-access-scan-info arg) |
| 87 | (format reftex-find-index-entry-regexp-format | 87 | (setq dw (reftex-view-regexp-match |
| 88 | (regexp-quote key)) | 88 | (format reftex-find-index-entry-regexp-format |
| 89 | 3 nil nil))) | 89 | (regexp-quote key)) |
| 90 | (t | 90 | 3 nil nil))) |
| 91 | (reftex-access-scan-info arg) | 91 | (t |
| 92 | (catch 'exit | 92 | (reftex-access-scan-info arg) |
| 93 | (let ((list reftex-view-crossref-extra) | 93 | (catch 'exit |
| 94 | entry mre action group) | 94 | (let ((list reftex-view-crossref-extra) |
| 95 | (while (setq entry (pop list)) | 95 | entry mre action group) |
| 96 | (setq mre (car entry) | 96 | (while (setq entry (pop list)) |
| 97 | action (nth 1 entry) | 97 | (setq mre (car entry) |
| 98 | group (nth 2 entry)) | 98 | action (nth 1 entry) |
| 99 | (when (string-match mre macro) | 99 | group (nth 2 entry)) |
| 100 | (setq dw (reftex-view-regexp-match | 100 | (when (string-match mre macro) |
| 101 | (format action key) group nil nil)) | 101 | (setq dw (reftex-view-regexp-match |
| 102 | (throw 'exit t)))) | 102 | (format action key) group nil nil)) |
| 103 | (error "Not on a crossref macro argument")))) | 103 | (throw 'exit t)))) |
| 104 | (if (and (eq arg 2) (windowp dw)) (select-window dw)))) | 104 | (error "Not on a crossref macro argument")))) |
| 105 | (if (and (eq arg 2) (windowp dw)) (select-window dw))))) | ||
| 105 | 106 | ||
| 106 | (defun reftex-view-cr-cite (arg key how) | 107 | (defun reftex-view-cr-cite (arg key how) |
| 107 | ;; View crossreference of a ref cite. HOW can have the values | 108 | ;; View crossreference of a ref cite. HOW can have the values |
| @@ -243,7 +244,7 @@ With argument, actually select the window showing the cross reference." | |||
| 243 | (not (memq last-command '(reftex-view-crossref | 244 | (not (memq last-command '(reftex-view-crossref |
| 244 | reftex-mouse-view-crossref))) | 245 | reftex-mouse-view-crossref))) |
| 245 | ;; Quick precheck if this might be a relevant spot | 246 | ;; Quick precheck if this might be a relevant spot |
| 246 | ;; FIXME: Can fail with backslash in comment | 247 | ;; `reftex-view-crossref' will do a more thorough check. |
| 247 | (save-excursion | 248 | (save-excursion |
| 248 | (search-backward "\\" nil t) | 249 | (search-backward "\\" nil t) |
| 249 | (looking-at "\\\\[a-zA-Z]*\\(cite\\|ref\\|bibentry\\)")) | 250 | (looking-at "\\\\[a-zA-Z]*\\(cite\\|ref\\|bibentry\\)")) |
| @@ -252,9 +253,9 @@ With argument, actually select the window showing the cross reference." | |||
| 252 | (let ((current-prefix-arg nil)) | 253 | (let ((current-prefix-arg nil)) |
| 253 | (cond | 254 | (cond |
| 254 | ((eq reftex-auto-view-crossref t) | 255 | ((eq reftex-auto-view-crossref t) |
| 255 | (reftex-view-crossref -1 'echo)) | 256 | (reftex-view-crossref -1 'echo 'quiet)) |
| 256 | ((eq reftex-auto-view-crossref 'window) | 257 | ((eq reftex-auto-view-crossref 'window) |
| 257 | (reftex-view-crossref -1 'tmp-window)) | 258 | (reftex-view-crossref -1 'tmp-window 'quiet)) |
| 258 | (t nil))) | 259 | (t nil))) |
| 259 | (error nil)))) | 260 | (error nil)))) |
| 260 | 261 | ||
| @@ -267,7 +268,8 @@ With argument, actually select the window showing the cross reference." | |||
| 267 | ;; Display crossref info in echo area. | 268 | ;; Display crossref info in echo area. |
| 268 | (cond | 269 | (cond |
| 269 | ((null docstruct) | 270 | ((null docstruct) |
| 270 | (message "%s" (substitute-command-keys (format reftex-no-info-message "ref")))) | 271 | (message "%s" |
| 272 | (substitute-command-keys (format reftex-no-info-message "ref")))) | ||
| 271 | ((null entry) | 273 | ((null entry) |
| 272 | (message "ref: unknown label: %s" label)) | 274 | (message "ref: unknown label: %s" label)) |
| 273 | (t | 275 | (t |
| @@ -301,7 +303,7 @@ With argument, actually select the window showing the cross reference." | |||
| 301 | (if (and files (= (length all-files) (length files))) | 303 | (if (and files (= (length all-files) (length files))) |
| 302 | (message "cite: no such database entry: %s" key) | 304 | (message "cite: no such database entry: %s" key) |
| 303 | (message "%s" (substitute-command-keys | 305 | (message "%s" (substitute-command-keys |
| 304 | (format reftex-no-info-message "cite")))) | 306 | (format reftex-no-info-message "cite")))) |
| 305 | nil))) | 307 | nil))) |
| 306 | (when entry | 308 | (when entry |
| 307 | (if item | 309 | (if item |
diff --git a/lisp/textmodes/reftex-global.el b/lisp/textmodes/reftex-global.el index fafc1a30998..e1ae98a59df 100644 --- a/lisp/textmodes/reftex-global.el +++ b/lisp/textmodes/reftex-global.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; 2006 Free Software Foundation, Inc. | 3 | ;; 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Carsten Dominik <dominik@science.uva.nl> | 5 | ;; Author: Carsten Dominik <dominik@science.uva.nl> |
| 6 | ;; Version: VERSIONTAG | 6 | ;; Version: 4.31 |
| 7 | 7 | ||
| 8 | ;; This file is part of GNU Emacs. | 8 | ;; This file is part of GNU Emacs. |
| 9 | 9 | ||
diff --git a/lisp/textmodes/reftex-index.el b/lisp/textmodes/reftex-index.el index a7e7203a639..f005e7a3b87 100644 --- a/lisp/textmodes/reftex-index.el +++ b/lisp/textmodes/reftex-index.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; 2006 Free Software Foundation, Inc. | 3 | ;; 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Carsten Dominik <dominik@science.uva.nl> | 5 | ;; Author: Carsten Dominik <dominik@science.uva.nl> |
| 6 | ;; Version: VERSIONTAG | 6 | ;; Version: 4.31 |
| 7 | 7 | ||
| 8 | ;; This file is part of GNU Emacs. | 8 | ;; This file is part of GNU Emacs. |
| 9 | 9 | ||
diff --git a/lisp/textmodes/reftex-parse.el b/lisp/textmodes/reftex-parse.el index ce43840c888..76eb7c31df8 100644 --- a/lisp/textmodes/reftex-parse.el +++ b/lisp/textmodes/reftex-parse.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; 2006 Free Software Foundation, Inc. | 3 | ;; 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Carsten Dominik <dominik@science.uva.nl> | 5 | ;; Author: Carsten Dominik <dominik@science.uva.nl> |
| 6 | ;; Version: VERSIONTAG | 6 | ;; Version: 4.31 |
| 7 | ;; | 7 | ;; |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
diff --git a/lisp/textmodes/reftex-ref.el b/lisp/textmodes/reftex-ref.el index f1a8d6d3965..a850da3042e 100644 --- a/lisp/textmodes/reftex-ref.el +++ b/lisp/textmodes/reftex-ref.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; 2006 Free Software Foundation, Inc. | 3 | ;; 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Carsten Dominik <dominik@science.uva.nl> | 5 | ;; Author: Carsten Dominik <dominik@science.uva.nl> |
| 6 | ;; Version: VERSIONTAG | 6 | ;; Version: 4.31 |
| 7 | 7 | ||
| 8 | ;; This file is part of GNU Emacs. | 8 | ;; This file is part of GNU Emacs. |
| 9 | 9 | ||
diff --git a/lisp/textmodes/reftex-sel.el b/lisp/textmodes/reftex-sel.el index 9aa7edbf438..69a893ff177 100644 --- a/lisp/textmodes/reftex-sel.el +++ b/lisp/textmodes/reftex-sel.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; 2006 Free Software Foundation, Inc. | 3 | ;; 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Carsten Dominik <dominik@science.uva.nl> | 5 | ;; Author: Carsten Dominik <dominik@science.uva.nl> |
| 6 | ;; Version: VERSIONTAG | 6 | ;; Version: 4.31 |
| 7 | 7 | ||
| 8 | ;; This file is part of GNU Emacs. | 8 | ;; This file is part of GNU Emacs. |
| 9 | 9 | ||
diff --git a/lisp/textmodes/reftex-toc.el b/lisp/textmodes/reftex-toc.el index f9eb3cfef82..9b710b92a67 100644 --- a/lisp/textmodes/reftex-toc.el +++ b/lisp/textmodes/reftex-toc.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; 2006 Free Software Foundation, Inc. | 3 | ;; 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Carsten Dominik <dominik@science.uva.nl> | 5 | ;; Author: Carsten Dominik <dominik@science.uva.nl> |
| 6 | ;; Version: VERSIONTAG | 6 | ;; Version: 4.31 |
| 7 | 7 | ||
| 8 | ;; This file is part of GNU Emacs. | 8 | ;; This file is part of GNU Emacs. |
| 9 | 9 | ||
diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index b8eddcd0386..e866b03626f 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; 2006 Free Software Foundation, Inc. | 3 | ;; 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Carsten Dominik <dominik@science.uva.nl> | 5 | ;; Author: Carsten Dominik <dominik@science.uva.nl> |
| 6 | ;; Version: VERSIONTAG | 6 | ;; Version: 4.31 |
| 7 | 7 | ||
| 8 | ;; This file is part of GNU Emacs. | 8 | ;; This file is part of GNU Emacs. |
| 9 | 9 | ||
| @@ -1555,6 +1555,18 @@ TeX-file-extensions." | |||
| 1555 | :type '(repeat (cons (string :tag "File type") | 1555 | :type '(repeat (cons (string :tag "File type") |
| 1556 | (repeat (string :tag "Extension"))))) | 1556 | (repeat (string :tag "Extension"))))) |
| 1557 | 1557 | ||
| 1558 | (defcustom reftex-try-all-extensions nil | ||
| 1559 | "Non-nil means, try all extensions listed in `reftex-file-extensions'. | ||
| 1560 | When searching for a file, LaTeX uses only the default extension. However, | ||
| 1561 | if you are working with a noweb system that produces the .tex files from | ||
| 1562 | some other file, and you want RefTeX to scan the web file instead of the | ||
| 1563 | tex file, you need to set this option. You also need to make the noweb | ||
| 1564 | extension the default extension, i.e. the first in the list in | ||
| 1565 | `reftex-file-extensions'. | ||
| 1566 | Note that if you are using external file finders, this option has no effect." | ||
| 1567 | :group 'reftex-finding-files | ||
| 1568 | :type 'boolean) | ||
| 1569 | |||
| 1558 | (defcustom reftex-search-unrecursed-path-first t | 1570 | (defcustom reftex-search-unrecursed-path-first t |
| 1559 | "*Non-nil means, search all specified directories before trying recursion. | 1571 | "*Non-nil means, search all specified directories before trying recursion. |
| 1560 | Thus, in a path \".//:/tex/\", search first \"./\", then \"/tex/\" and then | 1572 | Thus, in a path \".//:/tex/\", search first \"./\", then \"/tex/\" and then |
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index cb2e960225d..d759aff8774 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; 2006 Free Software Foundation, Inc. | 3 | ;; 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Carsten Dominik <dominik@science.uva.nl> | 5 | ;; Author: Carsten Dominik <dominik@science.uva.nl> |
| 6 | ;; Version: VERSIONTAG | 6 | ;; Version: 4.31 |
| 7 | ;; Keywords: tex | 7 | ;; Keywords: tex |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| @@ -301,7 +301,7 @@ | |||
| 301 | ;;; Define the formal stuff for a minor mode named RefTeX. | 301 | ;;; Define the formal stuff for a minor mode named RefTeX. |
| 302 | ;;; | 302 | ;;; |
| 303 | 303 | ||
| 304 | (defconst reftex-version "RefTeX version VERSIONTAG" | 304 | (defconst reftex-version "RefTeX version 4.31" |
| 305 | "Version string for RefTeX.") | 305 | "Version string for RefTeX.") |
| 306 | 306 | ||
| 307 | (defvar reftex-mode nil | 307 | (defvar reftex-mode nil |
| @@ -1437,14 +1437,17 @@ When DIE is non-nil, throw an error if file not found." | |||
| 1437 | "\\)\\'")) | 1437 | "\\)\\'")) |
| 1438 | (files (if (string-match ext-re file) | 1438 | (files (if (string-match ext-re file) |
| 1439 | (cons file nil) | 1439 | (cons file nil) |
| 1440 | (cons (concat file def-ext) file))) | 1440 | (if reftex-try-all-extensions |
| 1441 | path old-path file1) | 1441 | (append (mapcar (lambda (x) (concat file x)) |
| 1442 | extensions) | ||
| 1443 | (list file)) | ||
| 1444 | (list (concat file def-ext) file)))) | ||
| 1445 | path old-path file1 f fs) | ||
| 1442 | (cond | 1446 | (cond |
| 1443 | ((file-name-absolute-p file) | 1447 | ((file-name-absolute-p file) |
| 1444 | (setq file1 | 1448 | (while (setq f (pop files)) |
| 1445 | (or | 1449 | (if (file-regular-p f) |
| 1446 | (and (car files) (file-regular-p (car files)) (car files)) | 1450 | (setq file1 f files nil)))) |
| 1447 | (and (cdr files) (file-regular-p (cdr files)) (cdr files))))) | ||
| 1448 | ((and reftex-use-external-file-finders | 1451 | ((and reftex-use-external-file-finders |
| 1449 | (assoc type reftex-external-file-finders)) | 1452 | (assoc type reftex-external-file-finders)) |
| 1450 | (setq file1 (reftex-find-file-externally file type master-dir))) | 1453 | (setq file1 (reftex-find-file-externally file type master-dir))) |
| @@ -1452,16 +1455,13 @@ When DIE is non-nil, throw an error if file not found." | |||
| 1452 | (while (and (null file1) rec-values) | 1455 | (while (and (null file1) rec-values) |
| 1453 | (setq path (reftex-access-search-path | 1456 | (setq path (reftex-access-search-path |
| 1454 | type (pop rec-values) master-dir file)) | 1457 | type (pop rec-values) master-dir file)) |
| 1455 | (if (or (null old-path) | 1458 | (setq fs files) |
| 1456 | (not (eq old-path path))) | 1459 | (while (and (null file1) (setq f (pop fs))) |
| 1457 | (setq old-path path | 1460 | (when (or (null old-path) |
| 1458 | path (cons master-dir path) | 1461 | (not (eq old-path path))) |
| 1459 | file1 (or (and (car files) | 1462 | (setq old-path path |
| 1460 | (reftex-find-file-on-path | 1463 | path (cons master-dir path)) |
| 1461 | (car files) path master-dir)) | 1464 | (setq file1 (reftex-find-file-on-path f path master-dir))))))) |
| 1462 | (and (cdr files) | ||
| 1463 | (reftex-find-file-on-path | ||
| 1464 | (cdr files) path master-dir)))))))) | ||
| 1465 | (cond (file1 file1) | 1465 | (cond (file1 file1) |
| 1466 | (die (error "No such file: %s" file) nil) | 1466 | (die (error "No such file: %s" file) nil) |
| 1467 | (t (message "No such file: %s (ignored)" file) nil)))) | 1467 | (t (message "No such file: %s (ignored)" file) nil)))) |
diff --git a/man/ChangeLog b/man/ChangeLog index 764e22eca15..3e7a62c09bf 100644 --- a/man/ChangeLog +++ b/man/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2006-02-22 Carsten Dominik <dominik@science.uva.nl> | ||
| 2 | |||
| 3 | * reftex.texi: Version number and date change only. | ||
| 4 | |||
| 5 | * org.texi: (Internal Links): Rewritten to cover the modified | ||
| 6 | linking system. | ||
| 7 | |||
| 1 | 2006-02-21 Nick Roberts <nickrob@snap.net.nz> | 8 | 2006-02-21 Nick Roberts <nickrob@snap.net.nz> |
| 2 | 9 | ||
| 3 | * building.texi (Watch Expressions): Update and describe | 10 | * building.texi (Watch Expressions): Update and describe |
diff --git a/man/org.texi b/man/org.texi index cf0881ff3ff..a93de06235e 100644 --- a/man/org.texi +++ b/man/org.texi | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | @setfilename ../info/org | 4 | @setfilename ../info/org |
| 5 | @settitle Org Mode Manual | 5 | @settitle Org Mode Manual |
| 6 | 6 | ||
| 7 | @set VERSION 4.04 | 7 | @set VERSION 4.05 |
| 8 | @set DATE January 2006 | 8 | @set DATE February 2006 |
| 9 | 9 | ||
| 10 | @dircategory Emacs | 10 | @dircategory Emacs |
| 11 | @direntry | 11 | @direntry |
| @@ -35,7 +35,7 @@ | |||
| 35 | @copying | 35 | @copying |
| 36 | This manual is for Org-mode (version @value{VERSION}). | 36 | This manual is for Org-mode (version @value{VERSION}). |
| 37 | 37 | ||
| 38 | Copyright @copyright{} 2004, 2005, 2006 Free Software Foundation, Inc. | 38 | Copyright @copyright{} 2004, 2005, 2006 Free Software Foundation |
| 39 | 39 | ||
| 40 | @quotation | 40 | @quotation |
| 41 | Permission is granted to copy, distribute and/or modify this document | 41 | Permission is granted to copy, distribute and/or modify this document |
| @@ -126,12 +126,17 @@ Calculations in tables | |||
| 126 | 126 | ||
| 127 | Hyperlinks | 127 | Hyperlinks |
| 128 | 128 | ||
| 129 | * Internal Links:: CamelCaseWords as internal links | 129 | * Internal Links:: Links to other places in the current file |
| 130 | * External Links:: URL-like links to the world | 130 | * External Links:: URL-like links to the world |
| 131 | * Managing links:: Creating, inserting and following | 131 | * Managing links:: Creating, inserting and following |
| 132 | * Search Options:: Linking to a specific location | 132 | * Search Options:: Linking to a specific location |
| 133 | * Remember:: Org-trees store quick notes | 133 | * Remember:: Org-trees store quick notes |
| 134 | 134 | ||
| 135 | Internal Links | ||
| 136 | |||
| 137 | * Radio targets:: Make targets trigger links in plain text. | ||
| 138 | * CamelCase links:: Activating CamelCase words as links | ||
| 139 | |||
| 135 | TODO items | 140 | TODO items |
| 136 | 141 | ||
| 137 | * TODO basics:: Marking and displaying TODO entries | 142 | * TODO basics:: Marking and displaying TODO entries |
| @@ -155,12 +160,12 @@ Agenda Views | |||
| 155 | * Agenda files:: Files being searched for agenda information | 160 | * Agenda files:: Files being searched for agenda information |
| 156 | * Agenda dispatcher:: Keyboard access to agenda views | 161 | * Agenda dispatcher:: Keyboard access to agenda views |
| 157 | * Weekly/Daily Agenda:: The calendar page with current tasks | 162 | * Weekly/Daily Agenda:: The calendar page with current tasks |
| 158 | * Global TODO list:: All infinished action items | 163 | * Global TODO list:: All unfinished action items |
| 159 | * Matching headline tags:: Structured information with fine-tuned search | 164 | * Matching headline tags:: Structured information with fine-tuned search |
| 160 | * Timeline:: Time-sorted view for single file | 165 | * Timeline:: Time-sorted view for single file |
| 161 | * Agenda commands:: Remote editing of org trees | 166 | * Agenda commands:: Remote editing of org trees |
| 162 | 167 | ||
| 163 | Weekly/Daily Agenda | 168 | The weekly/daily agenda |
| 164 | 169 | ||
| 165 | * Categories:: Not all tasks are equal | 170 | * Categories:: Not all tasks are equal |
| 166 | * Time-of-day specifications:: How the agenda knows the time | 171 | * Time-of-day specifications:: How the agenda knows the time |
| @@ -1314,7 +1319,8 @@ example in mail mode, use | |||
| 1314 | 1319 | ||
| 1315 | Complex ASCII tables with automatic line wrapping, column- and | 1320 | Complex ASCII tables with automatic line wrapping, column- and |
| 1316 | row-spanning, and alignment can be created using the Emacs table | 1321 | row-spanning, and alignment can be created using the Emacs table |
| 1317 | package by Takaaki Ota (@uref{http://sourceforge.net/projects/table}). | 1322 | package by Takaaki Ota (@uref{http://sourceforge.net/projects/table}, |
| 1323 | and also part of Emacs 22). | ||
| 1318 | When @key{TAB} or @kbd{C-c C-c} is pressed in such a table, Org-mode | 1324 | When @key{TAB} or @kbd{C-c C-c} is pressed in such a table, Org-mode |
| 1319 | will call @command{table-recognize-table} and move the cursor into the | 1325 | will call @command{table-recognize-table} and move the cursor into the |
| 1320 | table. Inside a table, the keymap of Org-mode is inactive. In order | 1326 | table. Inside a table, the keymap of Org-mode is inactive. In order |
| @@ -1343,7 +1349,7 @@ Just like HMTL, Org-mode provides links inside a file, and external | |||
| 1343 | links to other files, Usenet articles, emails and much more. | 1349 | links to other files, Usenet articles, emails and much more. |
| 1344 | 1350 | ||
| 1345 | @menu | 1351 | @menu |
| 1346 | * Internal Links:: CamelCaseWords as internal links | 1352 | * Internal Links:: Links to other places in the current file |
| 1347 | * External Links:: URL-like links to the world | 1353 | * External Links:: URL-like links to the world |
| 1348 | * Managing links:: Creating, inserting and following | 1354 | * Managing links:: Creating, inserting and following |
| 1349 | * Search Options:: Linking to a specific location | 1355 | * Search Options:: Linking to a specific location |
| @@ -1356,44 +1362,73 @@ links to other files, Usenet articles, emails and much more. | |||
| 1356 | @cindex links, internal | 1362 | @cindex links, internal |
| 1357 | @cindex CamelCase links | 1363 | @cindex CamelCase links |
| 1358 | 1364 | ||
| 1359 | Similar to Wiki implementations, Org-mode interprets words spelled in | 1365 | Strings inside double brackets like @samp{[[My Target]]} are links |
| 1360 | CamelCase (i.e. mixed case with at least one capital letter following | 1366 | that lead to a text search in the current file. The link can be |
| 1361 | on a small letter inside the word) as links. While in Wiki these | 1367 | followed with @kbd{C-c C-o} or with a mouse click (@pxref{Managing |
| 1362 | links usually point to another file, in Org-mode they point to a | 1368 | links}). The preferred match for such a link is a dedicated target: |
| 1363 | target in the current file. Targets are CamelCased words in double | 1369 | The same string in double angular brackets. Targets may be located |
| 1364 | angular brackets, and may be located anywhere, also in a comment line. | 1370 | anywhere, often it is convenient to put them into a comment line, for |
| 1365 | For example | 1371 | example |
| 1366 | @example | 1372 | @example |
| 1367 | # <<MyTarget>> | 1373 | # <<My Target>> |
| 1368 | @end example | 1374 | @end example |
| 1369 | 1375 | ||
| 1370 | Each occurrence of @samp{MyTarget} in the file is an active link that | 1376 | If no dedicated target exists, Org-mode will search for the words in |
| 1371 | can be followed with @kbd{C-c C-o} or with a mouse click | 1377 | the link, in the above example for @samp{my target}. Links starting |
| 1372 | (@pxref{Managing links}). If no dedicated target exists, org-mode will | 1378 | with a star like @samp{*My Target} restrict the search to headlines. |
| 1373 | search for the words in the link separated by white space, in the | 1379 | When searching, Org-mode will first try an exact match, but then move |
| 1374 | above example for @samp{my target}. If the link starts with a star | 1380 | on to more and more lenient searches. For example, the link |
| 1375 | like @samp{*MyTarget}, the search is restricted to headlines. | 1381 | @samp{[[*My Targets]]} will find any of the following |
| 1376 | Org-mode will first try an exact match of a full headline, but then | ||
| 1377 | move on to more and more lenient searches. The link @samp{*MyTargets} | ||
| 1378 | will find any of the following | ||
| 1379 | @example | 1382 | @example |
| 1380 | ** My targets | 1383 | ** My targets |
| 1381 | ** TODO my targets are bright | 1384 | ** TODO my targets are bright |
| 1382 | ** my 20 targets are | 1385 | ** my 20 targets are |
| 1383 | @end example | 1386 | @end example |
| 1387 | It is therefore often not necessary to set a dedicated target. To | ||
| 1388 | insert a link targeting a headline, in-buffer completion can be used. | ||
| 1389 | Just type a star followed by a few optional letters into the buffer | ||
| 1390 | and press @kbd{M-@key{TAB}}. All headlines in the current buffer will | ||
| 1391 | be offered as completions. @xref{Managing links}, for more commands | ||
| 1392 | creating links. | ||
| 1393 | |||
| 1394 | Following a link pushes a mark onto Org-mode's own mark ring. You can | ||
| 1395 | return to the previous position with @kbd{C-c &}. Using this command | ||
| 1396 | several times in direct succession goes back to positions recorded | ||
| 1397 | earlier. | ||
| 1398 | |||
| 1399 | @menu | ||
| 1400 | * Radio targets:: Make targets trigger links in plain text. | ||
| 1401 | * CamelCase links:: Activating CamelCase words as links | ||
| 1402 | @end menu | ||
| 1403 | |||
| 1404 | @node Radio targets, CamelCase links, Internal Links, Internal Links | ||
| 1405 | @subsection Radio targets | ||
| 1406 | |||
| 1407 | You can configure Org-mode to link any occurrences of certain target | ||
| 1408 | names in normal text. So without explicitly creating a link, the text | ||
| 1409 | connects to the target radioing its position. Radio targets are | ||
| 1410 | enclosed by triple angular brackets. For example, a target | ||
| 1411 | @samp{<<<My Target>>>} causes each occurrence of @samp{my target} in | ||
| 1412 | normal text to become activated as a link. The Org-mode file is | ||
| 1413 | scanned automatically for radio targets only when the file is first | ||
| 1414 | loaded into Emacs. To update the target list during editing, press | ||
| 1415 | @kbd{C-c C-c} with the cursor on or at a target. | ||
| 1416 | |||
| 1417 | @node CamelCase links, , Radio targets, Internal Links | ||
| 1418 | @subsection CamelCase words as links | ||
| 1384 | @cindex completion, of CamelCase links | 1419 | @cindex completion, of CamelCase links |
| 1385 | @cindex CamelCase links, completion of | 1420 | @cindex CamelCase links, completion of |
| 1386 | It is therefore often not even necessary to set a dedicated target. | 1421 | |
| 1387 | The link will automatically find a target. If you want to see what | 1422 | As an alternative to @samp{[[...]]} links, Org-mode also supports |
| 1388 | lines in the current buffer are matched by a given CamelCase link, | 1423 | CamelCase words as links. This feature is not turned on by default |
| 1389 | open the link with @kbd{C-u C-c C-o}. Even if there are several | 1424 | because of the occasional inconsistencies this system suffers from. |
| 1390 | matches, org-mode will usually find the right one since it tries | 1425 | To activate CamelCase words as links, and to make headline completion |
| 1391 | targets and exact matches first. To insert links targeting a | 1426 | offer CamelCase version of headlines, the following customization is |
| 1392 | headline, in-buffer completion can be used. Just type a star followed | 1427 | needed: |
| 1393 | by a few optional letters into the buffer and press @kbd{M-@key{TAB}}. | 1428 | @lisp |
| 1394 | CamelCased versions of all headlines in the current buffer will be | 1429 | (setq org-activate-camels t |
| 1395 | offered as completions. @xref{Managing links}, for more commands | 1430 | org-file-link-context-use-camel-case t) |
| 1396 | creating links. | 1431 | @end lisp |
| 1397 | 1432 | ||
| 1398 | @node External Links, Managing links, Internal Links, Hyperlinks | 1433 | @node External Links, Managing links, Internal Links, Hyperlinks |
| 1399 | @section External Links | 1434 | @section External Links |
| @@ -1407,6 +1442,7 @@ creating links. | |||
| 1407 | @cindex VM links | 1442 | @cindex VM links |
| 1408 | @cindex RMAIL links | 1443 | @cindex RMAIL links |
| 1409 | @cindex WANDERLUST links | 1444 | @cindex WANDERLUST links |
| 1445 | @cindex MH-E links | ||
| 1410 | @cindex USENET links | 1446 | @cindex USENET links |
| 1411 | @cindex SHELL links | 1447 | @cindex SHELL links |
| 1412 | 1448 | ||
| @@ -1426,6 +1462,8 @@ shows examples for each link type. | |||
| 1426 | <vm://myself@@some.where.org/folder#id> @r{VM on remote machine} | 1462 | <vm://myself@@some.where.org/folder#id> @r{VM on remote machine} |
| 1427 | <wl:folder> @r{WANDERLUST folder link} | 1463 | <wl:folder> @r{WANDERLUST folder link} |
| 1428 | <wl:folder#id> @r{WANDERLUST message link} | 1464 | <wl:folder#id> @r{WANDERLUST message link} |
| 1465 | <mhe:folder> @r{MH-E folder link} | ||
| 1466 | <mhe:folder#id> @r{MH-E message link} | ||
| 1429 | <rmail:folder> @r{RMAIL folder link} | 1467 | <rmail:folder> @r{RMAIL folder link} |
| 1430 | <rmail:folder#id> @r{RMAIL message link} | 1468 | <rmail:folder#id> @r{RMAIL message link} |
| 1431 | <gnus:group> @r{GNUS group link} | 1469 | <gnus:group> @r{GNUS group link} |
| @@ -1458,7 +1496,7 @@ VM, RMAIL, WANDERLUST, GNUS and BBDB buffers, the link will point to | |||
| 1458 | the current article/entry. For W3 and W3M buffer, the link goes to | 1496 | the current article/entry. For W3 and W3M buffer, the link goes to |
| 1459 | the current URL. For Org-mode files, the current headline is | 1497 | the current URL. For Org-mode files, the current headline is |
| 1460 | targeted. For any other files, the link will point to the file, with | 1498 | targeted. For any other files, the link will point to the file, with |
| 1461 | a CamelCase (@pxref{Search Options}) search string pointing to the | 1499 | a search string (@pxref{Search Options}) pointing to the |
| 1462 | contents of the current line. If there is an active region, the | 1500 | contents of the current line. If there is an active region, the |
| 1463 | selected words will form the basis of the search string. The key | 1501 | selected words will form the basis of the search string. The key |
| 1464 | binding @kbd{C-c l} is only a suggestion - see @ref{Installation and | 1502 | binding @kbd{C-c l} is only a suggestion - see @ref{Installation and |
| @@ -1510,6 +1548,20 @@ On links, @kbd{mouse-2} will open the link just like @kbd{C-c C-o} would. | |||
| 1510 | @kindex mouse-3 | 1548 | @kindex mouse-3 |
| 1511 | @item mouse-3 | 1549 | @item mouse-3 |
| 1512 | Like @kbd{mouse-2}, but force file links to be opened with Emacs. | 1550 | Like @kbd{mouse-2}, but force file links to be opened with Emacs. |
| 1551 | |||
| 1552 | @cindex mark ring | ||
| 1553 | @kindex C-c % | ||
| 1554 | @item C-c % | ||
| 1555 | Push the current position onto the mark ring, to be able to return | ||
| 1556 | easily. Commands following an internal link do this automatically. | ||
| 1557 | |||
| 1558 | @cindex links, returning to | ||
| 1559 | @kindex C-c & | ||
| 1560 | @item C-c & | ||
| 1561 | Jump back to a recorded position. A position is recorded by the | ||
| 1562 | commands following internal links, and by @kbd{C-c %}. Using this | ||
| 1563 | command several times in direct succession moves through a ring of | ||
| 1564 | previously recorded positions. | ||
| 1513 | @end table | 1565 | @end table |
| 1514 | 1566 | ||
| 1515 | 1567 | ||
| @@ -1525,8 +1577,8 @@ compatibility, line numbers can also follow a single colon.} colon. | |||
| 1525 | For example: | 1577 | For example: |
| 1526 | @example | 1578 | @example |
| 1527 | <file:~/code/main.c::255> | 1579 | <file:~/code/main.c::255> |
| 1528 | <file:~/xx.org::MyTarget> | 1580 | <file:~/xx.org::My Target> |
| 1529 | <file:~/xx.org::find me> | 1581 | <file:~/xx.org::*My Target> |
| 1530 | <file:~/xx.org::/regexp/> | 1582 | <file:~/xx.org::/regexp/> |
| 1531 | @end example | 1583 | @end example |
| 1532 | @noindent Here is what these options do. | 1584 | @noindent Here is what these options do. |
| @@ -1534,12 +1586,12 @@ For example: | |||
| 1534 | @table @code | 1586 | @table @code |
| 1535 | @item 255 | 1587 | @item 255 |
| 1536 | Jump to line 255. | 1588 | Jump to line 255. |
| 1537 | @item MyGoal | 1589 | @item My Target |
| 1538 | Search for a link target with name MyGoal, or do a text search for | 1590 | Search for a link target @samp{<<My Target>>}, or do a text search for |
| 1539 | @samp{my target}, similar to the CamelCase search in internal links, | 1591 | @samp{my target}, similar to the search in internal links, see |
| 1540 | see @ref{Internal Links}. | 1592 | @ref{Internal Links}. |
| 1541 | @item find me | 1593 | @item *My Target |
| 1542 | Do a normal text search for the text @samp{find me}. | 1594 | In an Org-mode file, restrict search to headlines. |
| 1543 | @item /regexp/ | 1595 | @item /regexp/ |
| 1544 | Do a regular expression search for @code{regexp}. This uses the Emacs | 1596 | Do a regular expression search for @code{regexp}. This uses the Emacs |
| 1545 | command @code{occur} to list all matches in a separate window. If the | 1597 | command @code{occur} to list all matches in a separate window. If the |
| @@ -1549,10 +1601,10 @@ sparse tree with the matches. | |||
| 1549 | @c @code{grep} will be used to search all files in the directory. | 1601 | @c @code{grep} will be used to search all files in the directory. |
| 1550 | @end table | 1602 | @end table |
| 1551 | 1603 | ||
| 1552 | To use the search options also for a search in the current file, a | 1604 | As a degenerate case, a file link with an empty file name can be used |
| 1553 | file link with an empty file name can be used. For example, | 1605 | to search the current file. For example, @code{<file:::find me>} does |
| 1554 | @code{<file:::find me>} does a search for @samp{find me} in the | 1606 | a search for @samp{find me} in the current file, just like |
| 1555 | current file. | 1607 | @samp{[[find me]]} would. |
| 1556 | 1608 | ||
| 1557 | @node Remember, , Search Options, Hyperlinks | 1609 | @node Remember, , Search Options, Hyperlinks |
| 1558 | @section Remember | 1610 | @section Remember |
| @@ -3248,6 +3300,8 @@ Org-mode would not be what it is without your input. | |||
| 3248 | 3300 | ||
| 3249 | @itemize @bullet | 3301 | @itemize @bullet |
| 3250 | @item | 3302 | @item |
| 3303 | Thomas Baumann contributed the code for links to the MH-E email system. | ||
| 3304 | @item | ||
| 3251 | Pavel Chalmoviansky reported bugs and suggested improvements | 3305 | Pavel Chalmoviansky reported bugs and suggested improvements |
| 3252 | related to the agenda treatment of items with specified time. | 3306 | related to the agenda treatment of items with specified time. |
| 3253 | @item | 3307 | @item |
| @@ -3267,7 +3321,7 @@ Emacs-Lisp compiler happy. | |||
| 3267 | Tim O'Callaghan suggested in-file links, search options for | 3321 | Tim O'Callaghan suggested in-file links, search options for |
| 3268 | general file links, and TAGS. | 3322 | general file links, and TAGS. |
| 3269 | @item | 3323 | @item |
| 3270 | Oliver Oppitz made useful suggestions. | 3324 | Oliver Oppitz suggested multi-state TODO items. |
| 3271 | @item | 3325 | @item |
| 3272 | Pete Phillips helped the development of the TAGS feature with beta | 3326 | Pete Phillips helped the development of the TAGS feature with beta |
| 3273 | testing and suggestions. | 3327 | testing and suggestions. |
| @@ -3289,8 +3343,8 @@ Linking to VM/BBDB/GNUS was inspired by Tom Shannon's | |||
| 3289 | Juergen Vollmer contributed code generating the table of contents | 3343 | Juergen Vollmer contributed code generating the table of contents |
| 3290 | in HTML output, and other export improvements. | 3344 | in HTML output, and other export improvements. |
| 3291 | @item | 3345 | @item |
| 3292 | David Wainberg suggested to implement an archiving mechanism and helped | 3346 | David Wainberg suggested the archiving mechanism and shaped the |
| 3293 | testing. | 3347 | internal link system with many suggestions and ideas. |
| 3294 | @item | 3348 | @item |
| 3295 | Scheduling TODO items was inspired by John Wiegley's @file{planner.el}. | 3349 | Scheduling TODO items was inspired by John Wiegley's @file{planner.el}. |
| 3296 | @item | 3350 | @item |
diff --git a/man/reftex.texi b/man/reftex.texi index 890d5b5064d..a32a0aff543 100644 --- a/man/reftex.texi +++ b/man/reftex.texi | |||
| @@ -7,9 +7,9 @@ | |||
| 7 | @syncodeindex fn cp | 7 | @syncodeindex fn cp |
| 8 | 8 | ||
| 9 | @c Version and Contact Info | 9 | @c Version and Contact Info |
| 10 | @set VERSION 4.30 | 10 | @set VERSION 4.31 |
| 11 | @set EDITION 4.30 | 11 | @set EDITION 4.31 |
| 12 | @set DATE September 2005 | 12 | @set DATE February 2006 |
| 13 | @set AUCTEXSITE @uref{http://www.nongnu.org/auctex/,AUCTeX distribution site} | 13 | @set AUCTEXSITE @uref{http://www.nongnu.org/auctex/,AUCTeX distribution site} |
| 14 | @set MAINTAINERSITE @uref{http://www.astro.uva.nl/~dominik/Tools/,maintainers webpage} | 14 | @set MAINTAINERSITE @uref{http://www.astro.uva.nl/~dominik/Tools/,maintainers webpage} |
| 15 | @set MAINTAINER Carsten Dominik | 15 | @set MAINTAINER Carsten Dominik |
| @@ -25,8 +25,7 @@ citations and indices for LaTeX documents with Emacs. | |||
| 25 | This is edition @value{EDITION} of the @b{Ref@TeX{}} User Manual for | 25 | This is edition @value{EDITION} of the @b{Ref@TeX{}} User Manual for |
| 26 | @b{Ref@TeX{}} @value{VERSION} | 26 | @b{Ref@TeX{}} @value{VERSION} |
| 27 | 27 | ||
| 28 | Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005, | 28 | Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. |
| 29 | 2006 Free Software Foundation, Inc. | ||
| 30 | 29 | ||
| 31 | @quotation | 30 | @quotation |
| 32 | Permission is granted to copy, distribute and/or modify this document | 31 | Permission is granted to copy, distribute and/or modify this document |
diff --git a/src/ChangeLog b/src/ChangeLog index c016dc46e4b..2630efe73b7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,35 @@ | |||
| 1 | 2006-02-22 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * window.c (Fwindow_list): Check `window' before doing XWINDOW. | ||
| 4 | The default `window' should not be "on a different frame". | ||
| 5 | |||
| 6 | 2006-02-22 Kim F. Storm <storm@cua.dk> | ||
| 7 | |||
| 8 | * indent.c (Fvertical_motion): Only try to move back if we can. | ||
| 9 | |||
| 10 | 2006-02-22 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 11 | |||
| 12 | * macgui.h (struct _XGC) [!MAC_OSX || !USE_ATSUI]: New member | ||
| 13 | n_clip_rects. | ||
| 14 | |||
| 15 | * macmenu.c (digest_single_submenu): Apply 2006-02-19 change for | ||
| 16 | xmenu.c. | ||
| 17 | |||
| 18 | * macterm.c (GC_CLIP_REGION): Remove macro. | ||
| 19 | (mac_begin_clip, mac_end_clip): Take arg GC instead of REGION. | ||
| 20 | All uses changed. Don't do clipping if n_clip_rects is zero. | ||
| 21 | (mac_set_clip_rectangles): Use xassert instead of abort. | ||
| 22 | Set n_clip_rects. Don't make clip_region empty when number of | ||
| 23 | clipping rectangles is zero. | ||
| 24 | (mac_reset_clip_rectangles): Set n_clip_rects directly instead of | ||
| 25 | calling mac_set_clip_rectangles. | ||
| 26 | (x_set_toolkit_scroll_bar_thumb): Temporarily hide scroll bar to | ||
| 27 | avoid multiple redraws. | ||
| 28 | |||
| 29 | 2006-02-22 Kim F. Storm <storm@cua.dk> | ||
| 30 | |||
| 31 | * fringe.c (draw_fringe_bitmap): Fix overlay-arrow display. | ||
| 32 | |||
| 1 | 2006-02-21 Kim F. Storm <storm@cua.dk> | 33 | 2006-02-21 Kim F. Storm <storm@cua.dk> |
| 2 | 34 | ||
| 3 | * fringe.c (syms_of_fringe) <fringe-bitmaps>: Doc fix. | 35 | * fringe.c (syms_of_fringe) <fringe-bitmaps>: Doc fix. |
| @@ -18,8 +50,8 @@ | |||
| 18 | BG_WIDTH. All uses changed. Draw background if BG_WIDTH is not zero. | 50 | BG_WIDTH. All uses changed. Draw background if BG_WIDTH is not zero. |
| 19 | (mac_draw_image_string, mac_draw_image_string_16): New arg BG_WIDTH. | 51 | (mac_draw_image_string, mac_draw_image_string_16): New arg BG_WIDTH. |
| 20 | [USE_CG_TEXT_DRAWING] (mac_draw_image_string_cg): Rename from | 52 | [USE_CG_TEXT_DRAWING] (mac_draw_image_string_cg): Rename from |
| 21 | mac_draw_string_cg. New arg BG_WIDTH. All uses changed. Draw | 53 | mac_draw_string_cg. New arg BG_WIDTH. All uses changed. |
| 22 | background if BG_WIDTH is not zero. Use float constants as | 54 | Draw background if BG_WIDTH is not zero. Use float constants as |
| 23 | divisors instead of double. Use alloca instead of xmalloc/xfree. | 55 | divisors instead of double. Use alloca instead of xmalloc/xfree. |
| 24 | (x_draw_glyph_string_background, x_draw_glyph_string_foreground) | 56 | (x_draw_glyph_string_background, x_draw_glyph_string_foreground) |
| 25 | [!MAC_OS8 || USE_ATSUI]: Background may be drawn using | 57 | [!MAC_OS8 || USE_ATSUI]: Background may be drawn using |
| @@ -30,6 +62,11 @@ | |||
| 30 | (mac_set_clip_rectangles): When resetting clip region, make it | 62 | (mac_set_clip_rectangles): When resetting clip region, make it |
| 31 | empty instead of disposing of it. | 63 | empty instead of disposing of it. |
| 32 | 64 | ||
| 65 | 2006-02-20 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 66 | |||
| 67 | * keymap.c (store_in_keymap): Change `def' arg to not be `register'. | ||
| 68 | Seems to trigger a bug in gcc-amd64 4.0.2 20051125 (Red Hat 4.0.2-8). | ||
| 69 | |||
| 33 | 2006-02-20 Kim F. Storm <storm@cua.dk> | 70 | 2006-02-20 Kim F. Storm <storm@cua.dk> |
| 34 | 71 | ||
| 35 | * Makefile.in: Add fringe.elc to WINDOW_SUPPORT. | 72 | * Makefile.in: Add fringe.elc to WINDOW_SUPPORT. |
| @@ -55,10 +92,10 @@ | |||
| 55 | (left_curly_arrow_bits): Rename from continuation_bits. | 92 | (left_curly_arrow_bits): Rename from continuation_bits. |
| 56 | (right_curly_arrow_bits): Rename from continued_bits. | 93 | (right_curly_arrow_bits): Rename from continued_bits. |
| 57 | (left_triangle_bits): Rename from ov_bits. | 94 | (left_triangle_bits): Rename from ov_bits. |
| 58 | (right_triangle_bits): Added. | 95 | (right_triangle_bits): Add. |
| 59 | (filled_rectangle_bits): Rename from filled_box_cursor_bits. | 96 | (filled_rectangle_bits): Rename from filled_box_cursor_bits. |
| 60 | (hollow_rectangle_bits): Rename from hollow_box_cursor_bits. | 97 | (hollow_rectangle_bits): Rename from hollow_box_cursor_bits. |
| 61 | (filled_square_bits): Added. | 98 | (filled_square_bits): Add. |
| 62 | (vertical_bar_bits): Rename from bar_cursor_bits. | 99 | (vertical_bar_bits): Rename from bar_cursor_bits. |
| 63 | (horizontal_bar_bits): Rename from hbar_cursor_bits. | 100 | (horizontal_bar_bits): Rename from hbar_cursor_bits. |
| 64 | (empty_line_bits): Rename from zv_bits. | 101 | (empty_line_bits): Rename from zv_bits. |
diff --git a/src/fringe.c b/src/fringe.c index 6a98b852e3e..721b572e373 100644 --- a/src/fringe.c +++ b/src/fringe.c | |||
| @@ -869,7 +869,7 @@ draw_fringe_bitmap (w, row, left_p) | |||
| 869 | if (left_p && row->overlay_arrow_bitmap != NO_FRINGE_BITMAP) | 869 | if (left_p && row->overlay_arrow_bitmap != NO_FRINGE_BITMAP) |
| 870 | draw_fringe_bitmap_1 (w, row, 1, 1, | 870 | draw_fringe_bitmap_1 (w, row, 1, 1, |
| 871 | (row->overlay_arrow_bitmap < 0 | 871 | (row->overlay_arrow_bitmap < 0 |
| 872 | ? get_logical_cursor_bitmap (w, Qoverlay_arrow) | 872 | ? get_logical_fringe_bitmap (w, Qoverlay_arrow, 0, 0) |
| 873 | : row->overlay_arrow_bitmap)); | 873 | : row->overlay_arrow_bitmap)); |
| 874 | } | 874 | } |
| 875 | 875 | ||
diff --git a/src/indent.c b/src/indent.c index 9b5a9e32c79..efc375e27f7 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -2109,7 +2109,8 @@ whether or not it is currently displayed in some window. */) | |||
| 2109 | it.vpos = 0; | 2109 | it.vpos = 0; |
| 2110 | /* Do this even if LINES is 0, so that we move back | 2110 | /* Do this even if LINES is 0, so that we move back |
| 2111 | to the beginning of the current line as we ought. */ | 2111 | to the beginning of the current line as we ought. */ |
| 2112 | move_it_by_lines (&it, XINT (lines), 0); | 2112 | if (XINT (lines) >= 0 || IT_CHARPOS (it) > 0) |
| 2113 | move_it_by_lines (&it, XINT (lines), 0); | ||
| 2113 | 2114 | ||
| 2114 | SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it)); | 2115 | SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it)); |
| 2115 | } | 2116 | } |
diff --git a/src/macgui.h b/src/macgui.h index cfe35e82945..a84fea1ae91 100644 --- a/src/macgui.h +++ b/src/macgui.h | |||
| @@ -217,13 +217,13 @@ typedef struct _XGC | |||
| 217 | RGBColor back_color; | 217 | RGBColor back_color; |
| 218 | 218 | ||
| 219 | #define MAX_CLIP_RECTS 2 | 219 | #define MAX_CLIP_RECTS 2 |
| 220 | /* QuickDraw clipping region. */ | 220 | /* Number of clipping rectangles. */ |
| 221 | int n_clip_rects; | ||
| 222 | |||
| 223 | /* QuickDraw clipping region. Ignored if n_clip_rects == 0. */ | ||
| 221 | RgnHandle clip_region; | 224 | RgnHandle clip_region; |
| 222 | 225 | ||
| 223 | #if defined (MAC_OSX) && USE_ATSUI | 226 | #if defined (MAC_OSX) && USE_ATSUI |
| 224 | /* Number of clipping rectangles used in Quartz 2D drawing. */ | ||
| 225 | int n_clip_rects; | ||
| 226 | |||
| 227 | /* Clipping rectangles used in Quartz 2D drawing. The y-coordinate | 227 | /* Clipping rectangles used in Quartz 2D drawing. The y-coordinate |
| 228 | is in QuickDraw's. */ | 228 | is in QuickDraw's. */ |
| 229 | CGRect clip_rects[MAX_CLIP_RECTS]; | 229 | CGRect clip_rects[MAX_CLIP_RECTS]; |
diff --git a/src/macmenu.c b/src/macmenu.c index fccbbe6402c..8cce41114de 100644 --- a/src/macmenu.c +++ b/src/macmenu.c | |||
| @@ -1257,8 +1257,11 @@ digest_single_submenu (start, end, top_level_items) | |||
| 1257 | wv->enabled = 1; | 1257 | wv->enabled = 1; |
| 1258 | wv->button_type = BUTTON_TYPE_NONE; | 1258 | wv->button_type = BUTTON_TYPE_NONE; |
| 1259 | wv->help = Qnil; | 1259 | wv->help = Qnil; |
| 1260 | save_wv = wv; | ||
| 1260 | } | 1261 | } |
| 1261 | save_wv = wv; | 1262 | else |
| 1263 | save_wv = first_wv; | ||
| 1264 | |||
| 1262 | prev_wv = 0; | 1265 | prev_wv = 0; |
| 1263 | i += MENU_ITEMS_PANE_LENGTH; | 1266 | i += MENU_ITEMS_PANE_LENGTH; |
| 1264 | } | 1267 | } |
diff --git a/src/macterm.c b/src/macterm.c index 5e341a4eeae..697bfd58556 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -267,14 +267,13 @@ extern void menubar_selection_callback (FRAME_PTR, int); | |||
| 267 | #define GC_FORE_COLOR(gc) (&(gc)->fore_color) | 267 | #define GC_FORE_COLOR(gc) (&(gc)->fore_color) |
| 268 | #define GC_BACK_COLOR(gc) (&(gc)->back_color) | 268 | #define GC_BACK_COLOR(gc) (&(gc)->back_color) |
| 269 | #define GC_FONT(gc) ((gc)->xgcv.font) | 269 | #define GC_FONT(gc) ((gc)->xgcv.font) |
| 270 | #define GC_CLIP_REGION(gc) ((gc)->clip_region) | ||
| 271 | #define FRAME_NORMAL_GC(f) ((f)->output_data.mac->normal_gc) | 270 | #define FRAME_NORMAL_GC(f) ((f)->output_data.mac->normal_gc) |
| 272 | 271 | ||
| 273 | static RgnHandle saved_port_clip_region = NULL; | 272 | static RgnHandle saved_port_clip_region = NULL; |
| 274 | 273 | ||
| 275 | static void | 274 | static void |
| 276 | mac_begin_clip (region) | 275 | mac_begin_clip (gc) |
| 277 | RgnHandle region; | 276 | GC gc; |
| 278 | { | 277 | { |
| 279 | static RgnHandle new_region = NULL; | 278 | static RgnHandle new_region = NULL; |
| 280 | 279 | ||
| @@ -283,19 +282,19 @@ mac_begin_clip (region) | |||
| 283 | if (new_region == NULL) | 282 | if (new_region == NULL) |
| 284 | new_region = NewRgn (); | 283 | new_region = NewRgn (); |
| 285 | 284 | ||
| 286 | if (region && !EmptyRgn (region)) | 285 | if (gc->n_clip_rects) |
| 287 | { | 286 | { |
| 288 | GetClip (saved_port_clip_region); | 287 | GetClip (saved_port_clip_region); |
| 289 | SectRgn (saved_port_clip_region, region, new_region); | 288 | SectRgn (saved_port_clip_region, gc->clip_region, new_region); |
| 290 | SetClip (new_region); | 289 | SetClip (new_region); |
| 291 | } | 290 | } |
| 292 | } | 291 | } |
| 293 | 292 | ||
| 294 | static void | 293 | static void |
| 295 | mac_end_clip (region) | 294 | mac_end_clip (gc) |
| 296 | RgnHandle region; | 295 | GC gc; |
| 297 | { | 296 | { |
| 298 | if (region && !EmptyRgn (region)) | 297 | if (gc->n_clip_rects) |
| 299 | SetClip (saved_port_clip_region); | 298 | SetClip (saved_port_clip_region); |
| 300 | } | 299 | } |
| 301 | 300 | ||
| @@ -323,10 +322,10 @@ mac_draw_line (f, gc, x1, y1, x2, y2) | |||
| 323 | 322 | ||
| 324 | RGBForeColor (GC_FORE_COLOR (gc)); | 323 | RGBForeColor (GC_FORE_COLOR (gc)); |
| 325 | 324 | ||
| 326 | mac_begin_clip (GC_CLIP_REGION (gc)); | 325 | mac_begin_clip (gc); |
| 327 | MoveTo (x1, y1); | 326 | MoveTo (x1, y1); |
| 328 | LineTo (x2, y2); | 327 | LineTo (x2, y2); |
| 329 | mac_end_clip (GC_CLIP_REGION (gc)); | 328 | mac_end_clip (gc); |
| 330 | } | 329 | } |
| 331 | 330 | ||
| 332 | void | 331 | void |
| @@ -367,9 +366,9 @@ mac_erase_rectangle (f, gc, x, y, width, height) | |||
| 367 | RGBBackColor (GC_BACK_COLOR (gc)); | 366 | RGBBackColor (GC_BACK_COLOR (gc)); |
| 368 | SetRect (&r, x, y, x + width, y + height); | 367 | SetRect (&r, x, y, x + width, y + height); |
| 369 | 368 | ||
| 370 | mac_begin_clip (GC_CLIP_REGION (gc)); | 369 | mac_begin_clip (gc); |
| 371 | EraseRect (&r); | 370 | EraseRect (&r); |
| 372 | mac_end_clip (GC_CLIP_REGION (gc)); | 371 | mac_end_clip (gc); |
| 373 | 372 | ||
| 374 | RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f))); | 373 | RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f))); |
| 375 | } | 374 | } |
| @@ -432,7 +431,7 @@ mac_draw_bitmap (f, gc, x, y, width, height, bits, overlay_p) | |||
| 432 | RGBBackColor (GC_BACK_COLOR (gc)); | 431 | RGBBackColor (GC_BACK_COLOR (gc)); |
| 433 | SetRect (&r, x, y, x + width, y + height); | 432 | SetRect (&r, x, y, x + width, y + height); |
| 434 | 433 | ||
| 435 | mac_begin_clip (GC_CLIP_REGION (gc)); | 434 | mac_begin_clip (gc); |
| 436 | #if TARGET_API_MAC_CARBON | 435 | #if TARGET_API_MAC_CARBON |
| 437 | { | 436 | { |
| 438 | CGrafPtr port; | 437 | CGrafPtr port; |
| @@ -447,7 +446,7 @@ mac_draw_bitmap (f, gc, x, y, width, height, bits, overlay_p) | |||
| 447 | CopyBits (&bitmap, &(FRAME_MAC_WINDOW (f)->portBits), &(bitmap.bounds), &r, | 446 | CopyBits (&bitmap, &(FRAME_MAC_WINDOW (f)->portBits), &(bitmap.bounds), &r, |
| 448 | overlay_p ? srcOr : srcCopy, 0); | 447 | overlay_p ? srcOr : srcCopy, 0); |
| 449 | #endif /* not TARGET_API_MAC_CARBON */ | 448 | #endif /* not TARGET_API_MAC_CARBON */ |
| 450 | mac_end_clip (GC_CLIP_REGION (gc)); | 449 | mac_end_clip (gc); |
| 451 | 450 | ||
| 452 | RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f))); | 451 | RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f))); |
| 453 | } | 452 | } |
| @@ -579,9 +578,9 @@ mac_fill_rectangle (f, gc, x, y, width, height) | |||
| 579 | RGBForeColor (GC_FORE_COLOR (gc)); | 578 | RGBForeColor (GC_FORE_COLOR (gc)); |
| 580 | SetRect (&r, x, y, x + width, y + height); | 579 | SetRect (&r, x, y, x + width, y + height); |
| 581 | 580 | ||
| 582 | mac_begin_clip (GC_CLIP_REGION (gc)); | 581 | mac_begin_clip (gc); |
| 583 | PaintRect (&r); /* using foreground color of gc */ | 582 | PaintRect (&r); /* using foreground color of gc */ |
| 584 | mac_end_clip (GC_CLIP_REGION (gc)); | 583 | mac_end_clip (gc); |
| 585 | } | 584 | } |
| 586 | 585 | ||
| 587 | 586 | ||
| @@ -601,9 +600,9 @@ mac_draw_rectangle (f, gc, x, y, width, height) | |||
| 601 | RGBForeColor (GC_FORE_COLOR (gc)); | 600 | RGBForeColor (GC_FORE_COLOR (gc)); |
| 602 | SetRect (&r, x, y, x + width + 1, y + height + 1); | 601 | SetRect (&r, x, y, x + width + 1, y + height + 1); |
| 603 | 602 | ||
| 604 | mac_begin_clip (GC_CLIP_REGION (gc)); | 603 | mac_begin_clip (gc); |
| 605 | FrameRect (&r); /* using foreground color of gc */ | 604 | FrameRect (&r); /* using foreground color of gc */ |
| 606 | mac_end_clip (GC_CLIP_REGION (gc)); | 605 | mac_end_clip (gc); |
| 607 | } | 606 | } |
| 608 | 607 | ||
| 609 | 608 | ||
| @@ -718,7 +717,7 @@ mac_draw_string_common (f, gc, x, y, buf, nchars, bg_width, bytes_per_char) | |||
| 718 | if (!mac_use_core_graphics) | 717 | if (!mac_use_core_graphics) |
| 719 | { | 718 | { |
| 720 | #endif | 719 | #endif |
| 721 | mac_begin_clip (GC_CLIP_REGION (gc)); | 720 | mac_begin_clip (gc); |
| 722 | RGBForeColor (GC_FORE_COLOR (gc)); | 721 | RGBForeColor (GC_FORE_COLOR (gc)); |
| 723 | if (bg_width) | 722 | if (bg_width) |
| 724 | { | 723 | { |
| @@ -734,7 +733,7 @@ mac_draw_string_common (f, gc, x, y, buf, nchars, bg_width, bytes_per_char) | |||
| 734 | ATSUDrawText (text_layout, | 733 | ATSUDrawText (text_layout, |
| 735 | kATSUFromTextBeginning, kATSUToTextEnd, | 734 | kATSUFromTextBeginning, kATSUToTextEnd, |
| 736 | kATSUUseGrafPortPenLoc, kATSUUseGrafPortPenLoc); | 735 | kATSUUseGrafPortPenLoc, kATSUUseGrafPortPenLoc); |
| 737 | mac_end_clip (GC_CLIP_REGION (gc)); | 736 | mac_end_clip (gc); |
| 738 | #ifdef MAC_OSX | 737 | #ifdef MAC_OSX |
| 739 | } | 738 | } |
| 740 | else | 739 | else |
| @@ -807,7 +806,7 @@ mac_draw_string_common (f, gc, x, y, buf, nchars, bg_width, bytes_per_char) | |||
| 807 | if (mac_use_core_graphics) | 806 | if (mac_use_core_graphics) |
| 808 | savedFlags = SwapQDTextFlags (kQDUseCGTextRendering); | 807 | savedFlags = SwapQDTextFlags (kQDUseCGTextRendering); |
| 809 | #endif | 808 | #endif |
| 810 | mac_begin_clip (GC_CLIP_REGION (gc)); | 809 | mac_begin_clip (gc); |
| 811 | RGBForeColor (GC_FORE_COLOR (gc)); | 810 | RGBForeColor (GC_FORE_COLOR (gc)); |
| 812 | #ifdef MAC_OS8 | 811 | #ifdef MAC_OS8 |
| 813 | if (bg_width) | 812 | if (bg_width) |
| @@ -843,7 +842,7 @@ mac_draw_string_common (f, gc, x, y, buf, nchars, bg_width, bytes_per_char) | |||
| 843 | DrawText (buf, 0, nchars * bytes_per_char); | 842 | DrawText (buf, 0, nchars * bytes_per_char); |
| 844 | if (bg_width) | 843 | if (bg_width) |
| 845 | RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f))); | 844 | RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f))); |
| 846 | mac_end_clip (GC_CLIP_REGION (gc)); | 845 | mac_end_clip (gc); |
| 847 | 846 | ||
| 848 | #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020 | 847 | #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020 |
| 849 | if (mac_use_core_graphics) | 848 | if (mac_use_core_graphics) |
| @@ -1185,7 +1184,7 @@ mac_copy_area (src, f, gc, src_x, src_y, width, height, dest_x, dest_y) | |||
| 1185 | ForeColor (blackColor); | 1184 | ForeColor (blackColor); |
| 1186 | BackColor (whiteColor); | 1185 | BackColor (whiteColor); |
| 1187 | 1186 | ||
| 1188 | mac_begin_clip (GC_CLIP_REGION (gc)); | 1187 | mac_begin_clip (gc); |
| 1189 | LockPixels (GetGWorldPixMap (src)); | 1188 | LockPixels (GetGWorldPixMap (src)); |
| 1190 | #if TARGET_API_MAC_CARBON | 1189 | #if TARGET_API_MAC_CARBON |
| 1191 | { | 1190 | { |
| @@ -1203,7 +1202,7 @@ mac_copy_area (src, f, gc, src_x, src_y, width, height, dest_x, dest_y) | |||
| 1203 | &src_r, &dest_r, srcCopy, 0); | 1202 | &src_r, &dest_r, srcCopy, 0); |
| 1204 | #endif /* not TARGET_API_MAC_CARBON */ | 1203 | #endif /* not TARGET_API_MAC_CARBON */ |
| 1205 | UnlockPixels (GetGWorldPixMap (src)); | 1204 | UnlockPixels (GetGWorldPixMap (src)); |
| 1206 | mac_end_clip (GC_CLIP_REGION (gc)); | 1205 | mac_end_clip (gc); |
| 1207 | 1206 | ||
| 1208 | RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f))); | 1207 | RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f))); |
| 1209 | } | 1208 | } |
| @@ -1229,7 +1228,7 @@ mac_copy_area_with_mask (src, mask, f, gc, src_x, src_y, | |||
| 1229 | ForeColor (blackColor); | 1228 | ForeColor (blackColor); |
| 1230 | BackColor (whiteColor); | 1229 | BackColor (whiteColor); |
| 1231 | 1230 | ||
| 1232 | mac_begin_clip (GC_CLIP_REGION (gc)); | 1231 | mac_begin_clip (gc); |
| 1233 | LockPixels (GetGWorldPixMap (src)); | 1232 | LockPixels (GetGWorldPixMap (src)); |
| 1234 | LockPixels (GetGWorldPixMap (mask)); | 1233 | LockPixels (GetGWorldPixMap (mask)); |
| 1235 | #if TARGET_API_MAC_CARBON | 1234 | #if TARGET_API_MAC_CARBON |
| @@ -1249,7 +1248,7 @@ mac_copy_area_with_mask (src, mask, f, gc, src_x, src_y, | |||
| 1249 | #endif /* not TARGET_API_MAC_CARBON */ | 1248 | #endif /* not TARGET_API_MAC_CARBON */ |
| 1250 | UnlockPixels (GetGWorldPixMap (mask)); | 1249 | UnlockPixels (GetGWorldPixMap (mask)); |
| 1251 | UnlockPixels (GetGWorldPixMap (src)); | 1250 | UnlockPixels (GetGWorldPixMap (src)); |
| 1252 | mac_end_clip (GC_CLIP_REGION (gc)); | 1251 | mac_end_clip (gc); |
| 1253 | 1252 | ||
| 1254 | RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f))); | 1253 | RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f))); |
| 1255 | } | 1254 | } |
| @@ -1287,9 +1286,9 @@ mac_scroll_area (f, gc, src_x, src_y, width, height, dest_x, dest_y) | |||
| 1287 | color mapping in CopyBits. Otherwise, it will be slow. */ | 1286 | color mapping in CopyBits. Otherwise, it will be slow. */ |
| 1288 | ForeColor (blackColor); | 1287 | ForeColor (blackColor); |
| 1289 | BackColor (whiteColor); | 1288 | BackColor (whiteColor); |
| 1290 | mac_begin_clip (GC_CLIP_REGION (gc)); | 1289 | mac_begin_clip (gc); |
| 1291 | CopyBits (&(w->portBits), &(w->portBits), &src_r, &dest_r, srcCopy, 0); | 1290 | CopyBits (&(w->portBits), &(w->portBits), &src_r, &dest_r, srcCopy, 0); |
| 1292 | mac_end_clip (GC_CLIP_REGION (gc)); | 1291 | mac_end_clip (gc); |
| 1293 | 1292 | ||
| 1294 | RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f))); | 1293 | RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f))); |
| 1295 | #endif /* not TARGET_API_MAC_CARBON */ | 1294 | #endif /* not TARGET_API_MAC_CARBON */ |
| @@ -1425,14 +1424,10 @@ mac_set_clip_rectangles (display, gc, rectangles, n) | |||
| 1425 | { | 1424 | { |
| 1426 | int i; | 1425 | int i; |
| 1427 | 1426 | ||
| 1428 | if (n < 0 || n > MAX_CLIP_RECTS) | 1427 | xassert (n >= 0 && n <= MAX_CLIP_RECTS); |
| 1429 | abort (); | 1428 | |
| 1430 | if (n == 0) | 1429 | gc->n_clip_rects = n; |
| 1431 | { | 1430 | if (n > 0) |
| 1432 | if (gc->clip_region) | ||
| 1433 | SetEmptyRgn (gc->clip_region); | ||
| 1434 | } | ||
| 1435 | else | ||
| 1436 | { | 1431 | { |
| 1437 | if (gc->clip_region == NULL) | 1432 | if (gc->clip_region == NULL) |
| 1438 | gc->clip_region = NewRgn (); | 1433 | gc->clip_region = NewRgn (); |
| @@ -1450,8 +1445,6 @@ mac_set_clip_rectangles (display, gc, rectangles, n) | |||
| 1450 | } | 1445 | } |
| 1451 | } | 1446 | } |
| 1452 | #if defined (MAC_OSX) && USE_ATSUI | 1447 | #if defined (MAC_OSX) && USE_ATSUI |
| 1453 | gc->n_clip_rects = n; | ||
| 1454 | |||
| 1455 | for (i = 0; i < n; i++) | 1448 | for (i = 0; i < n; i++) |
| 1456 | { | 1449 | { |
| 1457 | Rect *rect = rectangles + i; | 1450 | Rect *rect = rectangles + i; |
| @@ -1471,7 +1464,7 @@ mac_reset_clip_rectangles (display, gc) | |||
| 1471 | Display *display; | 1464 | Display *display; |
| 1472 | GC gc; | 1465 | GC gc; |
| 1473 | { | 1466 | { |
| 1474 | mac_set_clip_rectangles (display, gc, NULL, 0); | 1467 | gc->n_clip_rects = 0; |
| 1475 | } | 1468 | } |
| 1476 | 1469 | ||
| 1477 | 1470 | ||
| @@ -4536,8 +4529,7 @@ x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole) | |||
| 4536 | int portion, position, whole; | 4529 | int portion, position, whole; |
| 4537 | { | 4530 | { |
| 4538 | ControlHandle ch = SCROLL_BAR_CONTROL_HANDLE (bar); | 4531 | ControlHandle ch = SCROLL_BAR_CONTROL_HANDLE (bar); |
| 4539 | 4532 | int value, viewsize, maximum, visible_p; | |
| 4540 | int value, viewsize, maximum; | ||
| 4541 | 4533 | ||
| 4542 | if (whole == 0 || XINT (bar->track_height) == 0) | 4534 | if (whole == 0 || XINT (bar->track_height) == 0) |
| 4543 | value = 0, viewsize = 1, maximum = 0; | 4535 | value = 0, viewsize = 1, maximum = 0; |
| @@ -4550,11 +4542,17 @@ x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole) | |||
| 4550 | 4542 | ||
| 4551 | BLOCK_INPUT; | 4543 | BLOCK_INPUT; |
| 4552 | 4544 | ||
| 4545 | /* Temporarily hide the scroll bar to avoid multiple redraws. */ | ||
| 4546 | visible_p = IsControlVisible (ch); | ||
| 4547 | SetControlVisibility (ch, false, false); | ||
| 4548 | |||
| 4553 | SetControl32BitMinimum (ch, 0); | 4549 | SetControl32BitMinimum (ch, 0); |
| 4554 | SetControl32BitMaximum (ch, maximum); | 4550 | SetControl32BitMaximum (ch, maximum); |
| 4555 | SetControl32BitValue (ch, value); | 4551 | SetControl32BitValue (ch, value); |
| 4556 | SetControlViewSize (ch, viewsize); | 4552 | SetControlViewSize (ch, viewsize); |
| 4557 | 4553 | ||
| 4554 | SetControlVisibility (ch, visible_p, true); | ||
| 4555 | |||
| 4558 | UNBLOCK_INPUT; | 4556 | UNBLOCK_INPUT; |
| 4559 | } | 4557 | } |
| 4560 | 4558 | ||
diff --git a/src/window.c b/src/window.c index 350b4753491..29701a1ac62 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -1863,7 +1863,8 @@ MINIBUF neither nil nor t means never include the minibuffer window. */) | |||
| 1863 | Lisp_Object frame, minibuf, window; | 1863 | Lisp_Object frame, minibuf, window; |
| 1864 | { | 1864 | { |
| 1865 | if (NILP (window)) | 1865 | if (NILP (window)) |
| 1866 | window = selected_window; | 1866 | window = FRAMEP (frame) ? XFRAME (frame)->selected_window : selected_window; |
| 1867 | CHECK_WINDOW (window); | ||
| 1867 | if (NILP (frame)) | 1868 | if (NILP (frame)) |
| 1868 | frame = selected_frame; | 1869 | frame = selected_frame; |
| 1869 | 1870 | ||