aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/textmodes
diff options
context:
space:
mode:
authorMiles Bader2007-12-06 09:51:45 +0000
committerMiles Bader2007-12-06 09:51:45 +0000
commit0bd508417142ff377f34aec8dcec9438d9175c2c (patch)
tree4d60fe09e5cebf7d79766b11e9cda8cc1c9dbb9b /lisp/textmodes
parent98fe991da804a42f53f6a5e84cd5eab18a82e181 (diff)
parent9fb1ba8090da3528de56158a79bd3527d31c7f2f (diff)
downloademacs-0bd508417142ff377f34aec8dcec9438d9175c2c.tar.gz
emacs-0bd508417142ff377f34aec8dcec9438d9175c2c.zip
Merge from emacs--devo--0
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-294
Diffstat (limited to 'lisp/textmodes')
-rw-r--r--lisp/textmodes/css-mode.el4
-rw-r--r--lisp/textmodes/fill.el4
-rw-r--r--lisp/textmodes/flyspell.el59
-rw-r--r--lisp/textmodes/ispell.el28
-rw-r--r--lisp/textmodes/org-export-latex.el3
-rw-r--r--lisp/textmodes/org.el80
-rw-r--r--lisp/textmodes/paragraphs.el4
-rw-r--r--lisp/textmodes/reftex-auc.el12
-rw-r--r--lisp/textmodes/reftex-dcr.el4
-rw-r--r--lisp/textmodes/reftex-index.el3
-rw-r--r--lisp/textmodes/reftex-toc.el6
-rw-r--r--lisp/textmodes/remember-diary.el94
-rw-r--r--lisp/textmodes/remember.el63
-rw-r--r--lisp/textmodes/texinfmt.el13
14 files changed, 234 insertions, 143 deletions
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index 8660f75fa95..83af2156831 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -256,11 +256,9 @@
256(defvar css-font-lock-defaults 256(defvar css-font-lock-defaults
257 '(css-font-lock-keywords nil t)) 257 '(css-font-lock-keywords nil t))
258 258
259(unless (fboundp 'prog-mode) (defalias 'prog-mode 'fundamental-mode))
260
261;;;###autoload (add-to-list 'auto-mode-alist '("\\.css\\'" . css-mode)) 259;;;###autoload (add-to-list 'auto-mode-alist '("\\.css\\'" . css-mode))
262;;;###autoload 260;;;###autoload
263(define-derived-mode css-mode prog-mode "CSS" 261(define-derived-mode css-mode fundamental-mode "CSS"
264 "Major mode to edit Cascading Style Sheets." 262 "Major mode to edit Cascading Style Sheets."
265 (set (make-local-variable 'font-lock-defaults) css-font-lock-defaults) 263 (set (make-local-variable 'font-lock-defaults) css-font-lock-defaults)
266 (set (make-local-variable 'comment-start) "/*") 264 (set (make-local-variable 'comment-start) "/*")
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el
index 27c425de448..0516a4ab8a5 100644
--- a/lisp/textmodes/fill.el
+++ b/lisp/textmodes/fill.el
@@ -836,6 +836,10 @@ in the active region."
836 (fill-region-as-paragraph beg end justify)))))) 836 (fill-region-as-paragraph beg end justify))))))
837 fill-pfx))) 837 fill-pfx)))
838 838
839(declare-function comment-search-forward "newcomment" (limit &optional noerror))
840(declare-function comment-string-strip "newcomment" (str beforep afterp))
841
842
839(defun fill-comment-paragraph (&optional justify) 843(defun fill-comment-paragraph (&optional justify)
840 "Fill current comment. 844 "Fill current comment.
841If we're not in a comment, just return nil so that the caller 845If we're not in a comment, just return nil so that the caller
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 73e8ec49045..16265ae42d1 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -1531,29 +1531,42 @@ The buffer to mark them in is `flyspell-large-region-buffer'."
1531 (if flyspell-issue-message-flag (message "Checking region...")) 1531 (if flyspell-issue-message-flag (message "Checking region..."))
1532 (set-buffer curbuf) 1532 (set-buffer curbuf)
1533 (ispell-check-version) 1533 (ispell-check-version)
1534 (let ((c (apply 'ispell-call-process-region beg 1534 ;; Local dictionary becomes the global dictionary in use.
1535 end 1535 (setq ispell-current-dictionary
1536 ispell-program-name 1536 (or ispell-local-dictionary ispell-dictionary))
1537 nil 1537 (setq ispell-current-personal-dictionary
1538 buffer 1538 (or ispell-local-pdict ispell-personal-dictionary))
1539 nil 1539 (let ((args (ispell-get-ispell-args))
1540 (if ispell-really-aspell "list" "-l") 1540 (encoding (ispell-get-coding-system))
1541 (let (args) 1541 c)
1542 ;; Local dictionary becomes the global dictionary in use. 1542 (if (and ispell-current-dictionary ; use specified dictionary
1543 (if ispell-local-dictionary 1543 (not (member "-d" args))) ; only define if not overridden
1544 (setq ispell-dictionary ispell-local-dictionary)) 1544 (setq args
1545 (setq args (ispell-get-ispell-args)) 1545 (append (list "-d" ispell-current-dictionary) args)))
1546 (if ispell-dictionary ; use specified dictionary 1546 (if ispell-current-personal-dictionary ; use specified pers dict
1547 (setq args 1547 (setq args
1548 (append (list "-d" ispell-dictionary) args))) 1548 (append args
1549 (if ispell-personal-dictionary ; use specified pers dict 1549 (list "-p"
1550 (setq args 1550 (expand-file-name
1551 (append args 1551 ispell-current-personal-dictionary)))))
1552 (list "-p" 1552 (setq args (append args ispell-extra-args))
1553 (expand-file-name 1553 (if (and ispell-really-aspell
1554 ispell-personal-dictionary))))) 1554 ispell-aspell-supports-utf8)
1555 (setq args (append args ispell-extra-args)) 1555 (setq args
1556 args)))) 1556 (append args
1557 (list
1558 (concat "--encoding="
1559 (symbol-name
1560 encoding))))))
1561 (let ((process-coding-system-alist (list (cons "\\.*" encoding))))
1562 (setq c (apply 'ispell-call-process-region beg
1563 end
1564 ispell-program-name
1565 nil
1566 buffer
1567 nil
1568 (if ispell-really-aspell "list" "-l")
1569 args)))
1557 (if (eq c 0) 1570 (if (eq c 0)
1558 (progn 1571 (progn
1559 (flyspell-process-localwords buffer) 1572 (flyspell-process-localwords buffer)
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 926e0debda1..163f436e53d 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -981,7 +981,7 @@ Assumes that value contains no whitespace."
981 "[^[:alpha:]]" 981 "[^[:alpha:]]"
982 (regexp-opt otherchars) 982 (regexp-opt otherchars)
983 t ; We can't tell, so set this to t 983 t ; We can't tell, so set this to t
984 (list "-d" dict-name "--encoding=utf-8") 984 (list "-d" dict-name)
985 nil ; aspell doesn't support this 985 nil ; aspell doesn't support this
986 ;; Here we specify the encoding to use while communicating with 986 ;; Here we specify the encoding to use while communicating with
987 ;; aspell. This doesn't apply to command line arguments, so 987 ;; aspell. This doesn't apply to command line arguments, so
@@ -1161,12 +1161,13 @@ The variable `ispell-library-directory' defines the library location."
1161 (delete-menu-item '("Edit" "Spell")) ; in case already defined 1161 (delete-menu-item '("Edit" "Spell")) ; in case already defined
1162 (add-menu '("Edit") "Spell" ispell-menu-xemacs)))))) 1162 (add-menu '("Edit") "Spell" ispell-menu-xemacs))))))
1163 1163
1164;;; Allow incrementing characters as integers in XEmacs 20 1164(defalias 'ispell-int-char
1165(if (and (featurep 'xemacs) 1165 ;; Allow incrementing characters as integers in XEmacs 20
1166 (fboundp 'int-char)) 1166 (if (and (featurep 'xemacs)
1167 (fset 'ispell-int-char 'int-char) 1167 (fboundp 'int-char))
1168 ;; Emacs and XEmacs 19 or earlier 1168 'int-char
1169 (fset 'ispell-int-char 'identity)) 1169 ;; Emacs and XEmacs 19 or earlier
1170 'identity))
1170 1171
1171 1172
1172;;; ********************************************************************** 1173;;; **********************************************************************
@@ -2480,6 +2481,13 @@ Keeps argument list for future ispell invocations for no async support."
2480 (append args 2481 (append args
2481 (list "-p" 2482 (list "-p"
2482 (expand-file-name ispell-current-personal-dictionary))))) 2483 (expand-file-name ispell-current-personal-dictionary)))))
2484 (if (and ispell-really-aspell
2485 ispell-aspell-supports-utf8)
2486 (setq args
2487 (append args
2488 (list
2489 (concat "--encoding="
2490 (symbol-name (ispell-get-coding-system)))))))
2483 (setq args (append args ispell-extra-args)) 2491 (setq args (append args ispell-extra-args))
2484 2492
2485 ;; Initially we don't know any buffer's local words. 2493 ;; Initially we don't know any buffer's local words.
@@ -3503,9 +3511,9 @@ You can bind this to the key C-c i in GNUS or mail by adding to
3503 (cite-regexp ;Prefix of quoted text 3511 (cite-regexp ;Prefix of quoted text
3504 (cond 3512 (cond
3505 ((functionp 'sc-cite-regexp) ; sc 3.0 3513 ((functionp 'sc-cite-regexp) ; sc 3.0
3506 (concat "\\(" (sc-cite-regexp) "\\)" "\\|" 3514 (with-no-warnings
3507 (with-no-warnings 3515 (concat "\\(" (sc-cite-regexp) "\\)" "\\|"
3508 (ispell-non-empty-string sc-reference-tag-string)))) 3516 (ispell-non-empty-string sc-reference-tag-string))))
3509 ((boundp 'sc-cite-regexp) ; sc 2.3 3517 ((boundp 'sc-cite-regexp) ; sc 2.3
3510 (concat "\\(" sc-cite-regexp "\\)" "\\|" 3518 (concat "\\(" sc-cite-regexp "\\)" "\\|"
3511 (with-no-warnings 3519 (with-no-warnings
diff --git a/lisp/textmodes/org-export-latex.el b/lisp/textmodes/org-export-latex.el
index b1b31b622d1..eef1c10e5b6 100644
--- a/lisp/textmodes/org-export-latex.el
+++ b/lisp/textmodes/org-export-latex.el
@@ -1077,9 +1077,8 @@ Valid parameters are
1077 (path (insert (format "\\href{%s}{%s}" path desc))) 1077 (path (insert (format "\\href{%s}{%s}" path desc)))
1078 (t (insert "\\texttt{" desc "}"))))))) 1078 (t (insert "\\texttt{" desc "}")))))))
1079 1079
1080(defun org-export-latex-cleaned-string 1080(defun org-export-latex-cleaned-string (&optional commentsp)
1081 ;; FIXME remove commentsp call in org.el and here 1081 ;; FIXME remove commentsp call in org.el and here
1082 (&optional commentsp)
1083 "Clean stuff in the LaTeX export." 1082 "Clean stuff in the LaTeX export."
1084 1083
1085 ;; Preserve line breaks 1084 ;; Preserve line breaks
diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el
index b555e6c1102..0535f679c40 100644
--- a/lisp/textmodes/org.el
+++ b/lisp/textmodes/org.el
@@ -3883,6 +3883,84 @@ If it is less than 8, the level-1 face gets re-used for level N+1 etc."
3883 :type 'number 3883 :type 'number
3884 :group 'org-faces) 3884 :group 'org-faces)
3885 3885
3886;;; Function declarations.
3887(declare-function add-to-diary-list "diary-lib"
3888 (date string specifier &optional marker globcolor literal))
3889(declare-function table--at-cell-p "table" (position &optional object at-column))
3890(declare-function Info-find-node "info" (filename nodename &optional no-going-back))
3891(declare-function Info-goto-node "info" (nodename &optional fork))
3892(declare-function bbdb "ext:bbdb-com" (string elidep))
3893(declare-function bbdb-company "ext:bbdb-com" (string elidep))
3894(declare-function bbdb-current-record "ext:bbdb-com" (&optional planning-on-modifying))
3895(declare-function bbdb-name "ext:bbdb-com" (string elidep))
3896(declare-function bbdb-record-getprop "ext:bbdb" (record property))
3897(declare-function bbdb-record-name "ext:bbdb" (record))
3898(declare-function bibtex-beginning-of-entry "bibtex" ())
3899(declare-function bibtex-generate-autokey "bibtex" ())
3900(declare-function bibtex-parse-entry "bibtex" (&optional content))
3901(declare-function bibtex-url "bibtex" (&optional pos no-browse))
3902(declare-function calendar-astro-date-string "cal-julian" (&optional date))
3903(declare-function calendar-bahai-date-string "cal-bahai" (&optional date))
3904(declare-function calendar-check-holidays "holidays" (date))
3905(declare-function calendar-chinese-date-string "cal-china" (&optional date))
3906(declare-function calendar-coptic-date-string "cal-coptic" (&optional date))
3907(declare-function calendar-ethiopic-date-string "cal-coptic" (&optional date))
3908(declare-function calendar-forward-day "cal-move" (arg))
3909(declare-function calendar-french-date-string "cal-french" (&optional date))
3910(declare-function calendar-goto-date "cal-move" (date))
3911(declare-function calendar-goto-today "cal-move" ())
3912(declare-function calendar-hebrew-date-string "cal-hebrew" (&optional date))
3913(declare-function calendar-islamic-date-string "cal-islam" (&optional date))
3914(declare-function calendar-iso-date-string "cal-iso" (&optional date))
3915(declare-function calendar-julian-date-string "cal-julian" (&optional date))
3916(declare-function calendar-mayan-date-string "cal-mayan" (&optional date))
3917(declare-function calendar-persian-date-string "cal-persia" (&optional date))
3918(declare-function cdlatex-tab "ext:cdlatex" ())
3919(declare-function dired-get-filename "dired" (&optional localp no-error-if-not-filep))
3920(declare-function gnus-article-show-summary "gnus-art" ())
3921(declare-function gnus-summary-last-subject "gnus-sum" ())
3922(declare-function mh-display-msg "mh-show" (msg-num folder-name))
3923(declare-function mh-find-path "mh-utils" ())
3924(declare-function mh-get-header-field "mh-utils" (field))
3925(declare-function mh-get-msg-num "mh-utils" (error-if-no-message))
3926(declare-function mh-header-display "mh-show" ())
3927(declare-function mh-index-previous-folder "mh-search" ())
3928(declare-function mh-normalize-folder-name "mh-utils" (folder &optional empty-string-okay dont-remove-trailing-slash return-nil-if-folder-empty))
3929(declare-function mh-search "mh-search" (folder search-regexp &optional redo-search-flag window-config))
3930(declare-function mh-search-choose "mh-search" (&optional searcher))
3931(declare-function mh-show "mh-show" (&optional message redisplay-flag))
3932(declare-function mh-show-buffer-message-number "mh-comp" (&optional buffer))
3933(declare-function mh-show-header-display "mh-show" t t)
3934(declare-function mh-show-msg "mh-show" (msg))
3935(declare-function mh-show-show "mh-show" t t)
3936(declare-function mh-visit-folder "mh-folder" (folder &optional range index-data))
3937(declare-function org-export-latex-cleaned-string "org-export-latex" (&optional commentsp))
3938(declare-function parse-time-string "parse-time" (string))
3939(declare-function remember "remember" (&optional initial))
3940(declare-function remember-buffer-desc "remember" ())
3941(declare-function rmail-narrow-to-non-pruned-header "rmail" ())
3942(declare-function rmail-show-message "rmail" (&optional n no-summary))
3943(declare-function rmail-what-message "rmail" ())
3944(declare-function elmo-folder-exists-p "ext:elmo" (folder) t)
3945(declare-function elmo-message-entity-field "ext:elmo-msgdb" (entity field &optional type))
3946(declare-function elmo-message-field "ext:elmo" (folder number field &optional type) t)
3947(declare-function vm-beginning-of-message "ext:vm-page" ())
3948(declare-function vm-follow-summary-cursor "ext:vm-motion" ())
3949(declare-function vm-get-header-contents "ext:vm-summary" (message header-name-regexp &optional clump-sep))
3950(declare-function vm-isearch-narrow "ext:vm-search" ())
3951(declare-function vm-isearch-update "ext:vm-search" ())
3952(declare-function vm-select-folder-buffer "ext:vm-macro" ())
3953(declare-function vm-su-message-id "ext:vm-summary" (m))
3954(declare-function vm-su-subject "ext:vm-summary" (m))
3955(declare-function vm-summarize "ext:vm-summary" (&optional display raise))
3956(declare-function wl-folder-get-elmo-folder "ext:wl-folder" (entity &optional no-cache))
3957(declare-function wl-summary-goto-folder-subr "ext:wl-summary" (&optional name scan-type other-window sticky interactive scoring force-exit))
3958(declare-function wl-summary-jump-to-msg-by-message-id "ext:wl-summary" (&optional id))
3959(declare-function wl-summary-line-from "ext:wl-summary" ())
3960(declare-function wl-summary-line-subject "ext:wl-summary" ())
3961(declare-function wl-summary-message-number "ext:wl-summary" ())
3962(declare-function wl-summary-redisplay "ext:wl-summary" (&optional arg))
3963
3886;;; Variables for pre-computed regular expressions, all buffer local 3964;;; Variables for pre-computed regular expressions, all buffer local
3887 3965
3888(defvar org-drawer-regexp nil 3966(defvar org-drawer-regexp nil
@@ -16838,7 +16916,7 @@ D may be an absolute day number, or a calendar-type list (month day year)."
16838 16916
16839(defun org-calendar-holiday () 16917(defun org-calendar-holiday ()
16840 "List of holidays, for Diary display in Org-mode." 16918 "List of holidays, for Diary display in Org-mode."
16841 (let ((hl (check-calendar-holidays date))) 16919 (let ((hl (calendar-check-holidays date)))
16842 (if hl (mapconcat 'identity hl "; ")))) 16920 (if hl (mapconcat 'identity hl "; "))))
16843 16921
16844(defun org-diary-sexp-entry (sexp entry date) 16922(defun org-diary-sexp-entry (sexp entry date)
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el
index 201eeebb623..06ebeea9fa0 100644
--- a/lisp/textmodes/paragraphs.el
+++ b/lisp/textmodes/paragraphs.el
@@ -440,8 +440,8 @@ negative arg -N means kill forward to Nth end of paragraph."
440 (end-of-paragraph-text)))))) 440 (end-of-paragraph-text))))))
441 441
442(defun forward-sentence (&optional arg) 442(defun forward-sentence (&optional arg)
443 "Move forward to next `sentence-end'. With argument, repeat. 443 "Move forward to next end of sentence. With argument, repeat.
444With negative argument, move backward repeatedly to `sentence-beginning'. 444With negative argument, move backward repeatedly to start of sentence.
445 445
446The variable `sentence-end' is a regular expression that matches ends of 446The variable `sentence-end' is a regular expression that matches ends of
447sentences. Also, every paragraph boundary terminates sentences as well." 447sentences. Also, every paragraph boundary terminates sentences as well."
diff --git a/lisp/textmodes/reftex-auc.el b/lisp/textmodes/reftex-auc.el
index e49c408b6e5..e7d292f48bb 100644
--- a/lisp/textmodes/reftex-auc.el
+++ b/lisp/textmodes/reftex-auc.el
@@ -33,6 +33,18 @@
33(require 'reftex) 33(require 'reftex)
34;;; 34;;;
35 35
36(declare-function TeX-argument-insert "ext:tex" (name optional &optional prefix))
37(declare-function TeX-argument-prompt "ext:tex" (optional prompt default &optional complete))
38(declare-function multi-prompt "ext:multi-prompt"
39 (separator
40 unique prompt table
41 &optional mp-predicate require-match initial history))
42(declare-function LaTeX-add-index-entries "ext:tex" (&rest entries) t)
43(declare-function LaTeX-add-labels "ext:tex" (&rest entries) t)
44(declare-function LaTeX-bibitem-list "ext:tex" () t)
45(declare-function LaTeX-index-entry-list "ext:tex" () t)
46(declare-function LaTeX-label-list "ext:tex" () t)
47
36(defun reftex-plug-flag (which) 48(defun reftex-plug-flag (which)
37 ;; Tell if a certain flag is set in reftex-plug-into-AUCTeX 49 ;; Tell if a certain flag is set in reftex-plug-into-AUCTeX
38 (or (eq t reftex-plug-into-AUCTeX) 50 (or (eq t reftex-plug-into-AUCTeX)
diff --git a/lisp/textmodes/reftex-dcr.el b/lisp/textmodes/reftex-dcr.el
index cfee8b53c0b..86ad54a73fa 100644
--- a/lisp/textmodes/reftex-dcr.el
+++ b/lisp/textmodes/reftex-dcr.el
@@ -352,13 +352,15 @@ will display info in the echo area."
352 (message "Automatic display of crossref information was turned on"))) 352 (message "Automatic display of crossref information was turned on")))
353 353
354(defun reftex-start-itimer-once () 354(defun reftex-start-itimer-once ()
355 (and reftex-mode 355 (and (featurep 'xemacs) reftex-mode
356 (not (itimer-live-p reftex-auto-view-crossref-timer)) 356 (not (itimer-live-p reftex-auto-view-crossref-timer))
357 (setq reftex-auto-view-crossref-timer 357 (setq reftex-auto-view-crossref-timer
358 (start-itimer "RefTeX Idle Timer" 358 (start-itimer "RefTeX Idle Timer"
359 'reftex-view-crossref-when-idle 359 'reftex-view-crossref-when-idle
360 reftex-idle-time nil t)))) 360 reftex-idle-time nil t))))
361 361
362(declare-function bibtex-beginning-of-entry "bibtex" ())
363
362(defun reftex-view-crossref-from-bibtex (&optional arg) 364(defun reftex-view-crossref-from-bibtex (&optional arg)
363 "View location in a LaTeX document which cites the BibTeX entry at point. 365 "View location in a LaTeX document which cites the BibTeX entry at point.
364Since BibTeX files can be used by many LaTeX documents, this function 366Since BibTeX files can be used by many LaTeX documents, this function
diff --git a/lisp/textmodes/reftex-index.el b/lisp/textmodes/reftex-index.el
index f430e9bd01a..73bcf6d6a74 100644
--- a/lisp/textmodes/reftex-index.el
+++ b/lisp/textmodes/reftex-index.el
@@ -39,6 +39,9 @@
39(defvar transient-mark-mode) 39(defvar transient-mark-mode)
40(defvar TeX-master) 40(defvar TeX-master)
41;; END remove for XEmacs release 41;; END remove for XEmacs release
42
43(declare-function texmathp "ext:texmathp" ())
44
42(defun reftex-index-selection-or-word (&optional arg phrase) 45(defun reftex-index-selection-or-word (&optional arg phrase)
43 "Put selection or the word near point into the default index macro. 46 "Put selection or the word near point into the default index macro.
44This uses the information in `reftex-index-default-macro' to make an index 47This uses the information in `reftex-index-default-macro' to make an index
diff --git a/lisp/textmodes/reftex-toc.el b/lisp/textmodes/reftex-toc.el
index ae147cc6b97..d1d979b3fc0 100644
--- a/lisp/textmodes/reftex-toc.el
+++ b/lisp/textmodes/reftex-toc.el
@@ -995,8 +995,10 @@ always show the current section in connection with the option
995 (select-frame current-toc-frame) 995 (select-frame current-toc-frame)
996 (switch-to-buffer "*toc*") 996 (switch-to-buffer "*toc*")
997 (select-frame current-frame) 997 (select-frame current-frame)
998 (if (fboundp 'focus-frame) (focus-frame current-frame) 998 (if (fboundp 'x-focus-frame) (x-focus-frame current-frame)
999 (if (fboundp 'x-focus-frame) (x-focus-frame current-frame))) 999 ;; focus-frame has done nothing in Emacs since at least v21.
1000 (if (featurep 'xemacs)
1001 (if (fboundp 'focus-frame) (focus-frame current-frame))))
1000 (select-window current-window) 1002 (select-window current-window)
1001 (when (eq reftex-auto-recenter-toc 'frame) 1003 (when (eq reftex-auto-recenter-toc 'frame)
1002 (unless reftex-toc-auto-recenter-timer 1004 (unless reftex-toc-auto-recenter-timer
diff --git a/lisp/textmodes/remember-diary.el b/lisp/textmodes/remember-diary.el
deleted file mode 100644
index e35909fb589..00000000000
--- a/lisp/textmodes/remember-diary.el
+++ /dev/null
@@ -1,94 +0,0 @@
1;;; remember-diary --- extracting diary information from buffers
2
3;; Copyright (C) 1999, 2000, 2001, 2004, 2007 Free Software Foundation, Inc.
4
5;; Author: Sacha Chua <sacha@free.net.ph>
6;; Created: 24 Mar 2004
7;; Keywords: data memory todo pim diary
8;; URL: http://gna.org/projects/remember-el/
9
10;; This file is part of GNU Emacs.
11
12;; GNU Emacs is free software; you can redistribute it and/or modify
13;; it under the terms of the GNU General Public License as published by
14;; the Free Software Foundation; either version 3, or (at your option)
15;; any later version.
16
17;; GNU Emacs is distributed in the hope that it will be useful,
18;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20;; GNU General Public License for more details.
21
22;; You should have received a copy of the GNU General Public License
23;; along with GNU Emacs; see the file COPYING. If not, write to the
24;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
25;; Boston, MA 02110-1301, USA.
26
27;;; Commentary:
28
29;; This module recognizes entries of the form
30;;
31;; DIARY: ....
32;;
33;; and puts them in your ~/.diary (or remember-diary-file) together
34;; with an annotation. Planner-style dates (yyyy.mm.dd) are converted
35;; to yyyy-mm-dd so that diary can understand them.
36;;
37;; For example:
38;;
39;; DIARY: 2003.08.12 Sacha's birthday
40;;
41;; is stored as
42;;
43;; 2003.08.12 Sacha's birthday [[/home/sacha/notebook/emacs/emacs-wiki/remember-diary.el]]
44;;
45;; To use, add the following to your .emacs:
46;;
47;; (require 'remember-diary)
48;; ;; This should be before other entries that may return t
49;; (add-to-list 'remember-handler-functions 'remember-diary-extract-entries)
50;;
51
52(require 'remember)
53(require 'diary-lib)
54
55;;; Code:
56(defcustom remember-diary-file diary-file
57 "*File for extracted diary entries."
58 :type 'file
59 :group 'remember)
60
61(defun remember-diary-convert-entry (entry)
62 "Translate MSG to an entry readable by diary."
63 (save-match-data
64 (when remember-annotation
65 (setq entry (concat entry " " remember-annotation)))
66 (if (string-match "\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)" entry)
67 (replace-match
68 (if european-calendar-style
69 (concat (match-string 3 entry) "/"
70 (match-string 2 entry) "/"
71 (match-string 1 entry))
72 (concat (match-string 2 entry) "/"
73 (match-string 3 entry) "/"
74 (match-string 1 entry)))
75 t t entry)
76 entry)))
77
78;;;###autoload
79(defun remember-diary-extract-entries ()
80 "Extract diary entries from the region."
81 (save-excursion
82 (goto-char (point-min))
83 (let (list)
84 (while (re-search-forward "^DIARY:\\s-*\\(.+\\)" nil t)
85 (add-to-list 'list (remember-diary-convert-entry (match-string 1))))
86 (when list
87 (make-diary-entry (mapconcat 'identity list "\n")
88 nil remember-diary-file))
89 nil))) ;; Continue processing
90
91(provide 'remember-diary)
92
93;; arch-tag: bda8a3f8-9a9b-46aa-8493-d71d7f1e445d
94;;; remember-diary.el ends here
diff --git a/lisp/textmodes/remember.el b/lisp/textmodes/remember.el
index 7249f1d4c57..81be7ace146 100644
--- a/lisp/textmodes/remember.el
+++ b/lisp/textmodes/remember.el
@@ -153,6 +153,29 @@
153;; Faridu'd-Din `Attar wrote: "Be occupied as little as possible with 153;; Faridu'd-Din `Attar wrote: "Be occupied as little as possible with
154;; things of the outer world but much with things of the inner world; 154;; things of the outer world but much with things of the inner world;
155;; then right action will overcome inaction." 155;; then right action will overcome inaction."
156;;
157;; * Diary integration
158;;
159;; To use, add the following to your .emacs:
160;;
161;; ;; This should be before other entries that may return t
162;; (add-to-list 'remember-handler-functions 'remember-diary-extract-entries)
163;;
164;; This module recognizes entries of the form
165;;
166;; DIARY: ....
167;;
168;; and puts them in your ~/.diary (or remember-diary-file) together
169;; with an annotation. Dates in the form YYYY.MM.DD are converted to
170;; YYYY-MM-DD so that diary can understand them.
171;;
172;; For example:
173;;
174;; DIARY: 2003.08.12 Sacha's birthday
175;;
176;; is stored as
177;;
178;; 2003.08.12 Sacha's birthday
156 179
157;;; History: 180;;; History:
158 181
@@ -440,6 +463,46 @@ application."
440 (kill-buffer (current-buffer)) 463 (kill-buffer (current-buffer))
441 (jump-to-register remember-register))) 464 (jump-to-register remember-register)))
442 465
466;;; Diary integration
467
468(defcustom remember-diary-file nil
469 "*File for extracted diary entries.
470If this is nil, then `diary-file' will be used instead."
471 :type 'file
472 :group 'remember)
473
474(defun remember-diary-convert-entry (entry)
475 "Translate MSG to an entry readable by diary."
476 (save-match-data
477 (when remember-annotation
478 (setq entry (concat entry " " remember-annotation)))
479 (if (string-match "\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)" entry)
480 (replace-match
481 (if european-calendar-style
482 (concat (match-string 3 entry) "/"
483 (match-string 2 entry) "/"
484 (match-string 1 entry))
485 (concat (match-string 2 entry) "/"
486 (match-string 3 entry) "/"
487 (match-string 1 entry)))
488 t t entry)
489 entry)))
490
491(autoload 'make-diary-entry "diary-lib")
492
493;;;###autoload
494(defun remember-diary-extract-entries ()
495 "Extract diary entries from the region."
496 (save-excursion
497 (goto-char (point-min))
498 (let (list)
499 (while (re-search-forward "^DIARY:\\s-*\\(.+\\)" nil t)
500 (add-to-list 'list (remember-diary-convert-entry (match-string 1))))
501 (when list
502 (make-diary-entry (mapconcat 'identity list "\n")
503 nil (or remember-diary-file diary-file)))
504 nil))) ;; Continue processing
505
443;;; Internal Functions: 506;;; Internal Functions:
444 507
445(defvar remember-mode-map 508(defvar remember-mode-map
diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el
index 73b6ec3920e..55e7134f87e 100644
--- a/lisp/textmodes/texinfmt.el
+++ b/lisp/textmodes/texinfmt.el
@@ -3001,14 +3001,17 @@ Default is to leave paragraph indentation as is."
3001(put 'printindex 'texinfo-format 'texinfo-format-printindex) 3001(put 'printindex 'texinfo-format 'texinfo-format-printindex)
3002 3002
3003(defun texinfo-format-printindex () 3003(defun texinfo-format-printindex ()
3004 (let ((indexelts (symbol-value 3004 (let* ((arg (texinfo-parse-arg-discard))
3005 (cdr (assoc (texinfo-parse-arg-discard) 3005 (fmt (cdr (assoc arg texinfo-short-index-format-cmds-alist)))
3006 texinfo-indexvar-alist)))) 3006 (index-list (delq nil (mapcar (lambda (e)
3007 opoint) 3007 (and (eq fmt (get (cdr e) 'texinfo-format))
3008 (cdr (assoc (car e) texinfo-indexvar-alist))))
3009 texinfo-short-index-cmds-alist)))
3010 (indexelts (apply #'append nil (mapcar #'symbol-value index-list)))
3011 opoint)
3008 (insert "\n* Menu:\n\n") 3012 (insert "\n* Menu:\n\n")
3009 (setq opoint (point)) 3013 (setq opoint (point))
3010 (texinfo-print-index nil indexelts) 3014 (texinfo-print-index nil indexelts)
3011
3012 (if (memq system-type '(vax-vms windows-nt ms-dos)) 3015 (if (memq system-type '(vax-vms windows-nt ms-dos))
3013 (texinfo-sort-region opoint (point)) 3016 (texinfo-sort-region opoint (point))
3014 (shell-command-on-region opoint (point) "sort -fd" 1)))) 3017 (shell-command-on-region opoint (point) "sort -fd" 1))))