* textmodes/refbib.el, textmodes/refer.el, textmodes/reftex-cite.el,

textmodes/reftex-index.el, textmodes/reftex-parse.el,
textmodes/reftex-ref.el, textmodes/reftex-vars.el,
textmodes/reftex.el, textmodes/org.el: Replace `illegal' with
`invalid'.
This commit is contained in:
Werner LEMBERG 2005-03-25 09:03:24 +00:00
parent eac9c0efd6
commit 5181ff9f3d
10 changed files with 43 additions and 32 deletions

View file

@ -13,6 +13,11 @@
progmodes/ebnf-yac.el, progmodes/ebnf2ps.el, progmodes/idlwave.el,
progmodes/sh-script.el, progmodes/xscheme.el: Replace `illegal' with
`invalid'.
* textmodes/refbib.el, textmodes/refer.el, textmodes/reftex-cite.el,
textmodes/reftex-index.el, textmodes/reftex-parse.el,
textmodes/reftex-ref.el, textmodes/reftex-vars.el,
textmodes/reftex.el, textmodes/org.el: Replace `illegal' with
`invalid'.
2005-03-24 Stefan Monnier <monnier@iro.umontreal.ca>

View file

@ -1,6 +1,6 @@
;; org.el --- Outline-based notes management and organizer
;; Carstens outline-mode for keeping track of everything.
;; Copyright (c) 2003, 2004 Free Software Foundation
;; Copyright (c) 2003, 2004, 2005 Free Software Foundation
;; Author: Carsten Dominik <dominik at science dot uva dot nl>
;; Keywords: outlines, hypermedia, calendar
@ -2380,7 +2380,7 @@ ACTION can be set, up, or down."
(setq new (1- current)))
((eq action 'down)
(setq new (1+ current)))
(t (error "Illegal ection")))
(t (error "Invalid action")))
(setq new (min (max ?A (upcase new)) org-lowest-priority))
(setq news (format "%c" new))
(if have
@ -5902,13 +5902,13 @@ separator line)."
(string-to-int (match-string 1 form))
n0)
x (nth n fields))
(unless x (error "Illegal field specifier \"%s\""
(unless x (error "Invalid field specifier \"%s\""
(match-string 0 form)))
(if (equal (string-to-number x) 0) (setq x "0"))
(setq form (replace-match x t t form)))
(setq ev (calc-eval (list form) 'num))
(if (listp ev)
(error "Illegal expression: %s (%s at %d)" form (nth 1 ev) (car ev)))
(error "Invalid expression: %s (%s at %d)" form (nth 1 ev) (car ev)))
(org-table-blank-field)
(if fmt
(insert (format fmt (string-to-number ev)))

View file

@ -1,6 +1,6 @@
;;; refbib.el --- convert refer-style references to ones usable by Latex bib
;; Copyright (C) 1989 Free Software Foundation, Inc.
;; Copyright (C) 1989, 2005 Free Software Foundation, Inc.
;; Author: Henry Kautz <kautz@research.att.com>
;; Keywords: bib, tex
@ -35,7 +35,7 @@
;; 9/88, created H.Kautz
;; modified 1/19/89, allow books with editor but no author;
;; added %O ordering field;
;; appended illegal multiple fields, instead of
;; appended invalid multiple fields, instead of
;; discarding;
;; added rule, a tech report whose %R number
;; contains "ISBN" is really a book
@ -292,7 +292,7 @@ title if CAPITALIZE is true. Returns value of VAR."
(setq val item)
(if unique
(progn
(r2b-warning "*Illegal multiple field %s %s" field item)
(r2b-warning "*Invalid multiple field %s %s" field item)
(setq val (concat val "\n" item))
)
(setq val (concat val "\n\t\tand " item))

View file

@ -1,6 +1,6 @@
;;; refer.el --- look up references in bibliography files
;; Copyright (C) 1992, 1996, 2001, 2004 Free Software Foundation, Inc.
;; Copyright (C) 1992, 1996, 2001, 2004, 2005 Free Software Foundation, Inc.
;; Author: Ashwin Ram <ashwin@cc.gatech.edu>
;; Maintainer: Gernot Heiser <gernot@acm.org>
@ -388,7 +388,7 @@ found on the last refer-find-entry or refer-find-next-entry."
(eq refer-bib-directory 'bibinputs)))
(refer-expand-files refer-bib-files dir-list))
((listp refer-bib-files) refer-bib-files)
(t (error "Illegal value for refer-bib-files: %s"
(t (error "Invalid value for refer-bib-files: %s"
refer-bib-files)))))
(if (or (eq refer-bib-directory 'texinputs)
(eq refer-bib-directory 'bibinputs))

View file

@ -1,5 +1,6 @@
;;; reftex-cite.el --- creating citations with RefTeX
;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004, 2005
;; Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
;; Version: 4.26
@ -982,7 +983,7 @@ While entering the regexp, completion on knows citation keys is possible.
(if (and reftex-comment-citations
(string-match "%l" reftex-cite-comment-format))
(error "reftex-cite-comment-format contains illegal %%l"))
(error "reftex-cite-comment-format contains invalid %%l"))
(while (string-match
"\\(\\`\\|[^%]\\)\\(\\(%\\([0-9]*\\)\\([a-zA-Z]\\)\\)[.,;: ]*\\)"

View file

@ -1,5 +1,6 @@
;;; reftex-index.el --- index support with RefTeX
;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004, 2005
;; Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
;; Version: 4.26
@ -928,7 +929,7 @@ When index is restricted, select the previous section as restriction criterion."
(error "Not changed"))
((string= npart "")
(if dont-allow-empty
(error "Illegal value")
(error "Invalid value")
(setf (nth n analyze) npart)))
(t (setf (nth n analyze) (concat initial npart))))
(setq new (apply 'concat analyze))
@ -1385,7 +1386,7 @@ match, the user will be asked to confirm the replacement."
(file-regular-p reftex-index-phrases-restrict-file))
(list reftex-index-phrases-restrict-file))
((stringp reftex-index-phrases-restrict-file)
(error "Illegal restriction file %s"
(error "Invalid restriction file %s"
reftex-index-phrases-restrict-file))
(t reftex-index-phrases-files)))
(as-words reftex-index-phrases-search-whole-words))

View file

@ -1,5 +1,6 @@
;;; reftex-parse.el --- parser functions for RefTeX
;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004, 2005
;; Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
;; Version: 4.26
@ -544,7 +545,7 @@ of master file."
(funcall parse env)
(error (format "HOOK ERROR: %s" (cdr error-var))))))
(t
"ILLEGAL VALUE OF PARSE"))))
"INVALID VALUE OF PARSE"))))
(defun reftex-where-am-I ()
;; Return the docstruct entry above point. Actually returns a cons

View file

@ -1,5 +1,6 @@
;;; reftex-ref.el --- code to create labels and references with RefTeX
;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004, 2005
;; Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
;; Version: 4.26
@ -172,7 +173,7 @@ This function is controlled by the settings of reftex-insert-label-flags."
(nth 2 (reftex-label-info " " nil nil t))))
;; Catch the cases where the is actually no context available.
(if (or (string-match "NO MATCH FOR CONTEXT REGEXP" default)
(string-match "ILLEGAL VALUE OF PARSE" default)
(string-match "INVALID VALUE OF PARSE" default)
(string-match "SECTION HEADING NOT FOUND" default)
(string-match "HOOK ERROR" default)
(string-match "^[ \t]*$" default))
@ -217,7 +218,7 @@ This function is controlled by the settings of reftex-insert-label-flags."
;; Test if label contains strange characters
((string-match reftex-label-illegal-re label)
(message "Label \"%s\" contains illegal characters" label)
(message "Label \"%s\" contains invalid characters" label)
(ding)
(sit-for 2))

View file

@ -1,5 +1,6 @@
;;; reftex-vars.el --- configuration variables for RefTeX
;; Copyright (c) 1997, 1998, 1999, 2003, 2004 Free Software Foundation, Inc.
;; Copyright (c) 1997, 1998, 1999, 2003, 2004, 2005
;; Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
;; Version: 4.26
@ -811,8 +812,8 @@ This variable is a list of the following items.
NWORDS Number of words to use.
MAXCHAR Maximum number of characters in a label string.
ILLEGAL nil: Throw away any words containing characters illegal in labels.
t: Throw away only the illegal characters, not the whole word.
INVALID nil: Throw away any words containing characters invalid in labels.
t: Throw away only the invalid characters, not the whole word.
ABBREV nil: Never abbreviate words.
t: Always abbreviate words (see `reftex-abbrev-parameters').
not t and not nil: Abbreviate words if necessary to shorten
@ -823,7 +824,7 @@ DOWNCASE t: Downcase words before using them."
:group 'reftex-making-and-inserting-labels
:type '(list (integer :tag "Number of words " 3)
(integer :tag "Maximum label length " 20)
(choice :tag "Illegal characters in words"
(choice :tag "Invalid characters in words"
(const :tag "throw away entire word" nil)
(const :tag "throw away single chars" t))
(choice :tag "Abbreviate words "
@ -837,7 +838,7 @@ DOWNCASE t: Downcase words before using them."
(option (boolean :tag "Downcase words "))))
(defcustom reftex-label-illegal-re "[^-a-zA-Z0-9_+=:;,.]"
"Regexp matching characters not legal in labels."
"Regexp matching characters not valid in labels."
:group 'reftex-making-and-inserting-labels
:type '(regexp :tag "Regular Expression"))

View file

@ -1,5 +1,6 @@
;;; reftex.el --- minor mode for doing \label, \ref, \cite, \index in LaTeX
;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004, 2005
;; Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
;; Version: 4.26
@ -1416,7 +1417,7 @@ Valid actions are: readable, restore, read, kill, write."
((= key ?\C-i)
(setq prefix (completing-read "Prefix: " xr-alist nil t))
(- len (length (memq (assoc prefix xr-alist) xr-alist))))
(t (error "Illegal document selection [%c]" key)))))))))
(t (error "Invalid document selection [%c]" key)))))))))
;;; =========================================================================
;;;
@ -2167,17 +2168,17 @@ Works on both Emacs and XEmacs."
(reftex-convert-string string "[-~ \t\n\r,;]" nil t t
5 40 nil 1 " " (nth 5 reftex-derive-label-parameters)))
(defun reftex-convert-string (string split-re illegal-re dot keep-fp
nwords maxchar illegal abbrev sep
(defun reftex-convert-string (string split-re invalid-re dot keep-fp
nwords maxchar invalid abbrev sep
ignore-words &optional downcase)
"Convert a string (a sentence) to something shorter.
SPLIT-RE is the regular expression used to split the string into words.
ILLEGAL-RE matches characters which are illegal in the final string.
INVALID-RE matches characters which are invalid in the final string.
DOT t means add dots to abbreviated words.
KEEP-FP t means to keep a final punctuation when applicable.
NWORDS Number of words to use.
MAXCHAR Maximum number of characters in the final string.
ILLEGAL nil: Throw away any words containing stuff matched with ILLEGAL-RE.
INVALID nil: Throw away any words containing stuff matched with INVALID-RE.
t: Throw away only the matched part, not the whole word.
ABBREV nil: Never abbreviate words.
t: Always abbreviate words (see `reftex-abbrev-parameters').
@ -2187,7 +2188,7 @@ SEP String separating different words in the output string.
IGNORE-WORDS List of words which should be removed from the string."
(let* ((words0 (split-string string (or split-re "[ \t\n\r]")))
(reftex-label-illegal-re (or illegal-re "\000"))
(reftex-label-illegal-re (or invalid-re "\000"))
(abbrev-re (concat
"\\`\\("
(make-string (nth 0 reftex-abbrev-parameters) ?.)
@ -2203,7 +2204,7 @@ IGNORE-WORDS List of words which should be removed from the string."
(cond
((member (downcase word) ignore-words))
((string-match reftex-label-illegal-re word)
(when illegal
(when invalid
(while (string-match reftex-label-illegal-re word)
(setq word (replace-match "" nil nil word)))
(push word words)))