summaryrefslogtreecommitdiff
path: root/lisp/textmodes
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2005-11-01 06:23:08 +0000
committerKaroly Lorentey <lorentey@elte.hu>2005-11-01 06:23:08 +0000
commitcd0cf71c4f41023a8d9c20b3a26e44b980992b5a (patch)
treeb763cfec551254e2228335be4e218ed7a9a19109 /lisp/textmodes
parentc40bb1ba81a5df164f0b9b61e3480c55808717b7 (diff)
parent895725e10c0fb68ed21abb48183cc8843bcaadf3 (diff)
downloademacs-cd0cf71c4f41023a8d9c20b3a26e44b980992b5a.tar.gz
emacs-cd0cf71c4f41023a8d9c20b3a26e44b980992b5a.tar.bz2
emacs-cd0cf71c4f41023a8d9c20b3a26e44b980992b5a.zip
Merged from miles@gnu.org--gnu-2005 (patch 142-148, 615-628)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-615 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-616 Add lisp/mh-e/.arch-inventory * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-617 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-618 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-619 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-620 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-621 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-622 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-623 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-624 Update from CVS: lisp/smerge-mode.el: Add 'tools' to file keywords. * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-625 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-626 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-627 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-628 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-142 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-143 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-144 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-145 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-146 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-147 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-148 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-435
Diffstat (limited to 'lisp/textmodes')
-rw-r--r--lisp/textmodes/flyspell.el19
-rw-r--r--lisp/textmodes/ispell.el90
-rw-r--r--lisp/textmodes/org.el4
-rw-r--r--lisp/textmodes/paragraphs.el10
-rw-r--r--lisp/textmodes/texinfo.el6
5 files changed, 75 insertions, 54 deletions
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 74c7cbc5762..ee94ff01d64 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -1333,7 +1333,7 @@ The buffer to mark them in is `flyspell-large-region-buffer'."
;; Loop over incorrect words.
(while (re-search-forward "\\([^\n]+\\)\n" (point-max) t)
;; Bind WORD to the next one.
- (let ((word (match-string 1)))
+ (let ((word (match-string 1)) (wordpos (point)))
;; Here there used to be code to see if WORD is the same
;; as the previous iteration, and count the number of consecutive
;; identical words, and the loop below would search for that many.
@@ -1350,11 +1350,15 @@ The buffer to mark them in is `flyspell-large-region-buffer'."
(with-current-buffer flyspell-large-region-buffer
(goto-char flyspell-large-region-beg)
(let ((keep t))
- (while (and keep
- (search-forward word flyspell-large-region-end t))
- (goto-char (- (point) 1))
- (setq keep (flyspell-word)))
- (setq flyspell-large-region-beg (point))))))
+ (while keep
+ (if (search-forward word
+ flyspell-large-region-end t)
+ (progn
+ (setq flyspell-large-region-beg (point))
+ (goto-char (- (point) 1))
+ (setq keep (flyspell-word)))
+ (error "Bug: misspelled word `%s' (output pos %d) not found in buffer"
+ word wordpos)))))))
;; we are done
(if flyspell-issue-message-flag (message "Spell Checking completed.")))
;; Kill and forget the buffer with the list of incorrect words.
@@ -1376,6 +1380,7 @@ The buffer to mark them in is `flyspell-large-region-buffer'."
;; this is done, we can start checking...
(if flyspell-issue-message-flag (message "Checking region..."))
(set-buffer curbuf)
+ (ispell-check-version)
(let ((c (apply 'call-process-region beg
end
ispell-program-name
@@ -1388,6 +1393,8 @@ The buffer to mark them in is `flyspell-large-region-buffer'."
(if ispell-local-dictionary
(setq ispell-dictionary ispell-local-dictionary))
(setq args (ispell-get-ispell-args))
+ (if (eq ispell-parser 'tex)
+ (setq args (cons "-t" args)))
(if ispell-dictionary ; use specified dictionary
(setq args
(append (list "-d" ispell-dictionary) args)))
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 95a3cce5144..7c438b4269e 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -445,7 +445,7 @@ where DICTNAME is the name of your default dictionary."
(defvar ispell-local-dictionary-overridden nil
"Non-nil means the user has explicitly set this buffer's Ispell dictionary.")
-(make-variable-buffer-local 'ispell-local-dictionary)
+(make-variable-buffer-local 'ispell-local-dictionary-overridden)
(defcustom ispell-local-dictionary nil
"If non-nil, the dictionary to be used for Ispell commands in this buffer.
@@ -721,7 +721,7 @@ LANGUAGE.aff file \(e.g., english.aff\).")
(defvar ispell-aspell-supports-utf8 nil
"Non-nil means to try to automatically find aspell dictionaries.
-This is set to t in ispell-check-version for aspell >= 0.60.
+This is set to t in `ispell-check-version' for aspell >= 0.60.
Earlier aspell versions do not consistently support UTF-8. Handling
this would require some extra guessing in `ispell-aspell-find-dictionary'.")
@@ -894,13 +894,22 @@ and added as a submenu of the \"Edit\" menu.")
"Find Aspell's dictionaries, and record in `ispell-dictionary-alist'."
(unless ispell-really-aspell
(error "This function only works with aspell"))
- (let ((dictionaries
- (split-string
- (with-temp-buffer
- (call-process ispell-program-name nil t nil "dicts")
- (buffer-string)))))
- (setq ispell-dictionary-alist
- (mapcar #'ispell-aspell-find-dictionary dictionaries))
+ (let* ((dictionaries
+ (split-string
+ (with-temp-buffer
+ (call-process ispell-program-name nil t nil "dicts")
+ (buffer-string))))
+ ;; Search for the named dictionaries.
+ (found
+ (delq nil
+ (mapcar #'ispell-aspell-find-dictionary dictionaries))))
+ ;; Merge into FOUND any elements from the standard ispell-dictionary-alist
+ ;; which have no element in FOUND at all.
+ (dolist (dict ispell-dictionary-alist)
+ (unless (assoc (car dict) found)
+ (setq found (nconc found (list dict)))))
+ (setq ispell-dictionary-alist found)
+
(ispell-aspell-add-aliases)
;; Add a default entry
(let* ((english-dict (assoc "en" ispell-dictionary-alist))
@@ -922,6 +931,9 @@ Assumes that value contains no whitespace."
(car (split-string (buffer-string)))))
(defun ispell-aspell-find-dictionary (dict-name)
+ ;; This returns nil if the data file does not exist.
+ ;; Can someone please explain the return value format when the
+ ;; file does exist -- rms?
(let* ((lang ;; Strip out region, variant, etc.
(and (string-match "^[[:alpha:]]+" dict-name)
(match-string 0 dict-name)))
@@ -931,35 +943,37 @@ Assumes that value contains no whitespace."
(ispell-get-aspell-config-value "data-dir")))
"/" lang ".dat"))
otherchars)
- ;; This file really should exist; there is no sensible recovery.
- (with-temp-buffer
- (insert-file-contents data-file)
- ;; There is zero or one line with special characters declarations.
- (when (search-forward-regexp "^special" nil t)
- (let ((specials (split-string
- (buffer-substring (point)
- (progn (end-of-line) (point))))))
- ;; The line looks like: special ' -** - -** . -** : -*-
- ;; -** means that this character
- ;; - doesn't appear at word start
- ;; * may appear in the middle of a word
- ;; * may appear at word end
- ;; `otherchars' is about the middle case.
- (while specials
- (when (eq (aref (cadr specials) 1) ?*)
- (push (car specials) otherchars))
- (setq specials (cddr specials))))))
- (list dict-name
- "[[:alpha:]]"
- "[^[:alpha:]]"
- (regexp-opt otherchars)
- t ; We can't tell, so set this to t
- (list "-d" dict-name "--encoding=utf-8")
- nil ; aspell doesn't support this
- ;; Here we specify the encoding to use while communicating with
- ;; aspell. This doesn't apply to command line arguments, so
- ;; just don't pass words to spellcheck as arguments...
- 'utf-8)))
+ (condition-case ()
+ (with-temp-buffer
+ (insert-file-contents data-file)
+ ;; There is zero or one line with special characters declarations.
+ (when (search-forward-regexp "^special" nil t)
+ (let ((specials (split-string
+ (buffer-substring (point)
+ (progn (end-of-line) (point))))))
+ ;; The line looks like: special ' -** - -** . -** : -*-
+ ;; -** means that this character
+ ;; - doesn't appear at word start
+ ;; * may appear in the middle of a word
+ ;; * may appear at word end
+ ;; `otherchars' is about the middle case.
+ (while specials
+ (when (eq (aref (cadr specials) 1) ?*)
+ (push (car specials) otherchars))
+ (setq specials (cddr specials)))))
+ (list dict-name
+ "[[:alpha:]]"
+ "[^[:alpha:]]"
+ (regexp-opt otherchars)
+ t ; We can't tell, so set this to t
+ (list "-d" dict-name "--encoding=utf-8")
+ nil ; aspell doesn't support this
+ ;; Here we specify the encoding to use while communicating with
+ ;; aspell. This doesn't apply to command line arguments, so
+ ;; just don't pass words to spellcheck as arguments...
+ 'utf-8))
+ (file-error
+ nil))))
(defun ispell-aspell-add-aliases ()
"Find aspell's dictionary aliases and add them to `ispell-dictionary-alist'."
diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el
index a84f2be28ae..18df2ab226c 100644
--- a/lisp/textmodes/org.el
+++ b/lisp/textmodes/org.el
@@ -9574,13 +9574,13 @@ END:VTODO\n"
(let ((user user-full-name)
(calname "something")
(name (or name "unknown"))
- (timezone "FIXME"))
+ (timezone "Europe/Amsterdam")) ;; FIXME: How to get the real timezone?
(princ
(format "BEGIN:VCALENDAR
VERSION:2.0
X-WR-CALNAME:%s
PRODID:-//%s//Emacs with Org-mode//EN
-X-WR-TIMEZONE:Europe/Amsterdam
+X-WR-TIMEZONE:Europe/%s
CALSCALE:GREGORIAN\n" name user timezone))))
(defun org-finish-icalendar-file ()
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el
index 1ed43279c3d..b196001c799 100644
--- a/lisp/textmodes/paragraphs.el
+++ b/lisp/textmodes/paragraphs.el
@@ -159,7 +159,7 @@ to obtain the value of this variable."
:group 'paragraphs
:type '(choice regexp (const :tag "Use default value" nil)))
-(defcustom sentence-end-base "[.?!][]\"'\xd0c9\x5397d)}]*"
+(defcustom sentence-end-base "[.?!][]\"'$B!I$,1r}(B)}]*"
"*Regexp matching the basic end of a sentence, not including following space."
:group 'paragraphs
:type 'string
@@ -502,9 +502,9 @@ ones already marked."
(interactive "*p")
(transpose-subr 'forward-sentence arg))
-;;; Local Variables:
-;;; coding: iso-2022-7bit
-;;; End:
+;; Local Variables:
+;; coding: iso-2022-7bit
+;; End:
-;;; arch-tag: e727eb1a-527a-4464-b9d7-9d3ec0d1a575
+;; arch-tag: e727eb1a-527a-4464-b9d7-9d3ec0d1a575
;;; paragraphs.el ends here
diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el
index 3507f6e57cf..a10851aa765 100644
--- a/lisp/textmodes/texinfo.el
+++ b/lisp/textmodes/texinfo.el
@@ -1,4 +1,4 @@
-;;; texinfo.el --- major mode for editing Texinfo files
+;;; texinfo.el --- major mode for editing Texinfo files -*- coding: iso-2022-7bit -*-
;; Copyright (C) 1985, 1988, 1989, 1990, 1991, 1992, 1993, 1996, 1997,
;; 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
@@ -595,7 +595,7 @@ value of `texinfo-mode-hook'."
(setq paragraph-start (concat "\b\\|@[a-zA-Z]*[ \n]\\|" paragraph-start))
(make-local-variable 'sentence-end-base)
(setq sentence-end-base
- "\\(@\\(end\\)?dots{}\\|[.?!]\\)[]\"'\xd0c9\x5397d)}]*")
+ "\\(@\\(end\\)?dots{}\\|[.?!]\\)[]\"'$B!I$,1r}(B)}]*")
(make-local-variable 'adaptive-fill-mode)
(setq adaptive-fill-mode nil)
(make-local-variable 'fill-column)
@@ -1059,5 +1059,5 @@ You are prompted for the job number (use a number shown by a previous
(provide 'texinfo)
-;;; arch-tag: 005d7c38-43b9-4b7d-aa1d-aea69bae73e1
+;; arch-tag: 005d7c38-43b9-4b7d-aa1d-aea69bae73e1
;;; texinfo.el ends here