aboutsummaryrefslogtreecommitdiff
path: root/x-symbol/lisp
diff options
context:
space:
mode:
authorDavid Aspinall2003-09-24 22:57:23 +0000
committerDavid Aspinall2003-09-24 22:57:23 +0000
commitccf89d821d14ee75e0917f9e579f7a4f4958ecb7 (patch)
tree818421c013debacf8084d27e5603e598311036ab /x-symbol/lisp
parent41f47cd0f0657b06270df089ac9f6c2c2863f642 (diff)
Update to 4.5.1-beta from sourceforge.
Diffstat (limited to 'x-symbol/lisp')
-rw-r--r--x-symbol/lisp/ChangeLog31
-rw-r--r--x-symbol/lisp/_pkg.el2
-rw-r--r--x-symbol/lisp/auto-autoloads.el71
-rw-r--r--x-symbol/lisp/x-symbol-bib.el40
-rw-r--r--x-symbol/lisp/x-symbol-emacs.el32
-rw-r--r--x-symbol/lisp/x-symbol-hooks.el170
-rw-r--r--x-symbol/lisp/x-symbol-image.el50
-rw-r--r--x-symbol/lisp/x-symbol-macs.el2
-rw-r--r--x-symbol/lisp/x-symbol-mule.el2
-rw-r--r--x-symbol/lisp/x-symbol-nomule.el2
-rw-r--r--x-symbol/lisp/x-symbol-sgml.el80
-rw-r--r--x-symbol/lisp/x-symbol-tex.el96
-rw-r--r--x-symbol/lisp/x-symbol-texi.el38
-rw-r--r--x-symbol/lisp/x-symbol-vars.el488
-rw-r--r--x-symbol/lisp/x-symbol-xmacs.el4
-rw-r--r--x-symbol/lisp/x-symbol.el233
16 files changed, 780 insertions, 561 deletions
diff --git a/x-symbol/lisp/ChangeLog b/x-symbol/lisp/ChangeLog
index 1d3d95b0..87d9f0a8 100644
--- a/x-symbol/lisp/ChangeLog
+++ b/x-symbol/lisp/ChangeLog
@@ -1,4 +1,26 @@
-2003-03-06 Christoph Wedler <wedler@users.sourceforge.net>
+2003-05-12 Christoph Wedler <wedler@users.sourceforge.net>
+
+ * X-Symbol 4.5.1-beta.
+
+ * Bug fix: unique decoding would not be unique for TeX
+ accents starting with \c, \k, \v, \u, \H, \r.
+ * Bug fix, Emacs-21.2: Makefile.emacs would not work,
+ variable `image-types' is not defined in -batch Emacs.
+ * Emacs-21.3.50: Would not work with with default value
+ nil for `x-symbol-emacs-has-correct-find-safe-coding'.
+ * Emacs: would issue a warning with value "ASCII" for
+ `current-language-environment'.
+ * Don't provide Emacs bug workaround for images with
+ Emacs-21.3.50. I want to know why it's necessary, i.e.,
+ write an Emacs bug report...
+ * New variable `x-symbol-set-coding-system-if-undecided'
+ for Emacs, defaults to t.
+
+ Report from Andreas Klein, Eli Tziperman.
+
+2003-03-14 Christoph Wedler <wedler@users.sourceforge.net>
+
+ * X-Symbol 4.5-beta.
* Bug fix: would not hightlight subscripts when using
font-lock without any font-lock support mode if X-Symbol
@@ -7,8 +29,13 @@
crypt/crypt++.
* Bug fix, XEmacs: using C-s = isearch would not always
reveal the full subscript command when necessary.
- * Make |- and |= electric.
+ * Bug workaround, Emacs/Windows: would show boxes instead
+ Latin-9 characters, sort characters in Latin-9 bdf file.
+ * Emacs/Windows: add origfonts/ to Windows font path.
+ * Make contexts |- and |= electric.
* Provide unzipped PDF and PS version of manual on web.
+ * Internal: renamed the prefix of language accesses from
+ `x-symbol-' to `x-symbol-LANG-'.
* Manual, docstring and Makefile updates.
Report from Felix E. Klee, Gerwin Klein.
diff --git a/x-symbol/lisp/_pkg.el b/x-symbol/lisp/_pkg.el
index 29ae7244..21347fe5 100644
--- a/x-symbol/lisp/_pkg.el
+++ b/x-symbol/lisp/_pkg.el
@@ -1,5 +1,5 @@
;;;###autoload
(if (fboundp 'package-provide)
(package-provide 'x-symbol
- :version 4.50
+ :version 4.51
:type 'regular))
diff --git a/x-symbol/lisp/auto-autoloads.el b/x-symbol/lisp/auto-autoloads.el
index 11e61782..cdd29e1a 100644
--- a/x-symbol/lisp/auto-autoloads.el
+++ b/x-symbol/lisp/auto-autoloads.el
@@ -3,7 +3,7 @@
;;;### (autoloads nil "_pkg" "lisp/_pkg.el")
-(if (fboundp 'package-provide) (package-provide 'x-symbol :version 4.5 :type 'regular))
+(if (fboundp 'package-provide) (package-provide 'x-symbol :version 4.51 :type 'regular))
;;;***
@@ -24,24 +24,29 @@ nil." t nil)
(autoload 'x-symbol-mode "x-symbol-hooks" "\
Toggle X-Symbol mode.
-If ARG is a cons, e.g., when \\[x-symbol-mode] is preceded by one or
-more \\[universal-argument]'s with no digits, turn on X-Symbol mode
-conditionally, see MODE-ON in `x-symbol-auto-mode-alist'. Otherwise,
-turn X-Symbol mode on if ARG is positive, else turn it off. If some
-X-Symbol specific local variables are not buffer-local, set them to
-reasonable values according to `x-symbol-buffer-mode-alist' and
-`x-symbol-auto-mode-alist'.
+Toggle X-Symbol mode. If provided with a prefix argument, turn X-Symbol
+mode on if the numeric value of the argument is positive, else turn it
+off. If no token language can be deduced, ask for a token language; if
+provided with a non-numeric prefix argument, always ask.
+
+By default, X-Symbol mode is disabled in special major-modes visiting a
+file, e.g., `vm-mode'. Use a prefix argument to be asked whether to
+turn in on anyway.
+
+When not already defined, various buffer-local variables are set when
+turning on X-Symbol. See `x-symbol-auto-style-alist' and the language
+access `x-symbol-LANG-modes'.
Turning X-Symbol mode on requires a valid `x-symbol-language' and also
decodes tokens if the mode was turned off before, see
-\\[x-symbol-decode]. Turning X-Symbol mode off also encodes x-symbol
-characters if the mode was turned on before, see \\[x-symbol-encode].
-If argument INIT is non-nil, the old mode status is assumed to be off." t nil)
+\\[x-symbol-decode-recode]. Turning X-Symbol mode off also encodes
+x-symbol characters if the mode was turned on before, see
+\\[x-symbol-encode-recode]. If optional argument SPECIAL has value
+`init', the old mode status is assumed to be off." t nil)
(autoload 'turn-on-x-symbol-conditionally "x-symbol-hooks" "\
Turn on x-symbol mode conditionally, see `x-symbol-mode'.
-Call `x-symbol-mode' with a cons for ARG and a non-nil INIT. Used in
-`hack-local-variables-hook'." nil nil)
+Call `x-symbol-mode' with SPECIAL having value `init'." nil nil)
(autoload 'x-symbol-fontify "x-symbol-hooks" "\
Re-fontify region between BEG and END." t nil)
@@ -84,7 +89,7 @@ button2 starts an image editor, see `x-symbol-image-editor-alist'.
button3 pops up a menu, see `x-symbol-image-menu'.
The image insertion commands are recognized by keywords in the language
-access `x-symbol-image-keywords' whose value have the form
+access `x-symbol-LANG-image-keywords' whose value have the form
(IMAGE-REGEXP KEYWORD ...)
IMAGE-REGEXP should match all images files and is used to initialize the
buffer local memory cache, see `x-symbol-image-init-memory-cache'.
@@ -96,8 +101,8 @@ name of the corresponding image file. If FUNCTION returns nil, the
command is not highlighted.
Relative image file names are expanded in the directory returned by the
-function in the language access `x-symbol-master-directory', value nil
-means function `default-directory'. Implicitly relative image file
+function in the language access `x-symbol-LANG-master-directory', value
+nil means function `default-directory'. Implicitly relative image file
names are searched in a search path, see `x-symbol-image-use-remote'." t nil)
(autoload 'x-symbol-image-after-change-function "x-symbol-image" "\
@@ -200,9 +205,13 @@ commands `x-symbol-encode' and `x-symbol-mode'.
Note that in most token languages, different tokens might be decoded to
the same character, e.g., \\neq and \\ne in `tex', &Auml; and &#196;
-in `sgml'!" t nil)
+in `sgml', see `x-symbol-unique'!" t nil)
-(autoload 'x-symbol-decode "x-symbol" nil t nil)
+(autoload 'x-symbol-decode "x-symbol" "\
+Decode all tokens in active region or buffer to characters.
+As opposed to `x-symbol-decode-recode', this function performs no
+recoding, i.e., `x-symbol-coding' is considered to have the value of
+`x-symbol-default-coding'." t nil)
(autoload 'x-symbol-encode-recode "x-symbol" "\
Encode all characters in active region or buffer to tokens.
@@ -212,7 +221,13 @@ Variables `x-symbol-8bits' and `x-symbol-coding' determine whether to
encode 8bit characters. See also commands `x-symbol-decode' and
`x-symbol-mode'." t nil)
-(autoload 'x-symbol-encode "x-symbol" nil t nil)
+(autoload 'x-symbol-encode "x-symbol" "\
+Encode all characters in active region or buffer to tokens.
+As opposed to `x-symbol-encode-recode', this function performs no
+recoding, i.e., `x-symbol-coding' is considered to have the value of
+`x-symbol-default-coding'. Additionally, `x-symbol-8bits' is assumed to
+be nil if `x-symbol-coding' is not nil or not having the same value as
+`x-symbol-default-coding'." t nil)
(autoload 'x-symbol-unalias "x-symbol" "\
Resolve all character aliases in active region or buffer.
@@ -230,16 +245,14 @@ resolve a single character before point with \\[x-symbol-modify-key].
if you have a latin-1 font by default, the `adiaeresis' in a latin-2
encoded file is a latin-1 `adiaeresis' in the buffer. When saving the
buffer, its is again the right 8bit character in the latin-2 encoded
-file. But note: CHAR ALIASES ARE NOT ENCODED WHEN SAVING THE FILE.
-Invoke this command before, if your buffers have char aliases! Seven
-positions in latin-3 fonts are not used, the corresponding 8bit bytes in
-latin-3 encoded files are not changed.
-
-In normal cases, buffers do not have char aliases: in XEmacs/Mule, this
-is only possible if you copy characters from buffers with characters
-considered as char aliases by package x-symbol, e.g., from the Mule file
-\"european.el\". In XEmacs/no-Mule, this is only possible if you use
-commands like `\\[universal-argument] 2 3 4'.
+file. Seven positions in latin-3 fonts are not used, the corresponding
+8bit bytes in latin-3 encoded files are not changed.
+
+In normal cases, buffers do not have char aliases: with Mule support,
+this is only possible if you copy characters from buffers with
+characters considered as char aliases by package x-symbol, e.g., from
+the Mule file \"european.el\". Without Mule support, this is only
+possible if you use commands like `\\[universal-argument] 2 3 4'.
The reason why package x-symbol does not support all versions of
`adiaeresis'es:
diff --git a/x-symbol/lisp/x-symbol-bib.el b/x-symbol/lisp/x-symbol-bib.el
index 9f2fabc0..2b7e85d9 100644
--- a/x-symbol/lisp/x-symbol-bib.el
+++ b/x-symbol/lisp/x-symbol-bib.el
@@ -1,10 +1,10 @@
;;; x-symbol-bib.el --- token language "BibTeX macro" for package x-symbol
-;; Copyright (C) 2002 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2003 Free Software Foundation, Inc.
;;
;; Author: Christoph Wedler <wedler@users.sourceforge.net>
;; Maintainer: (Please use `M-x x-symbol-package-bug' to contact the maintainer)
-;; Version: 4.4.X
+;; Version: 4.5
;; Keywords: WYSIWYG, LaTeX, HTML, wp, math, internationalization
;; X-URL: http://x-symbol.sourceforge.net/
@@ -40,39 +40,42 @@
;;;===========================================================================
(defcustom x-symbol-bib-auto-style '(t nil nil nil nil nil)
- "TODO"
+ "Values for X-Symbol's buffer-local variables with language `bib'.
+See language access `x-symbol-LANG-auto-style'."
:group 'x-symbol-bib
:group 'x-symbol-mode
:type 'x-symbol-auto-style)
(defcustom x-symbol-bib-modeline-name "bib"
- "*String naming the language TeX in the modeline."
+ "Modeline name of token language `bib'.
+See language access `x-symbol-LANG-modeline-name'."
:group 'x-symbol-bib
:type 'string)
(defcustom x-symbol-bib-header-groups-alist x-symbol-tex-header-groups-alist
- "*If non-nil, used in TeX specific grid/menu.
-See `x-symbol-header-groups-alist'."
+ "Header/submenu specification of the specific menu for language `bib'.
+See language access `x-symbol-LANG-header-groups-alist'."
:group 'x-symbol-bib
:group 'x-symbol-input-init
:type 'x-symbol-headers)
(defcustom x-symbol-bib-electric-ignore x-symbol-tex-electric-ignore
- "*Additional TeX version of `x-symbol-electric-ignore'."
+ "Specification restricting input method ELECTRIC with language `bib'.
+See language access `x-symbol-LANG-electric-ignore'."
:group 'x-symbol-bib
:group 'x-symbol-input-control
:type 'x-symbol-function-or-regexp)
(defcustom x-symbol-bib-class-alist x-symbol-tex-class-alist
- "Alist for TeX's token classes displayed by info in echo area.
-See `x-symbol-language-access-alist' for details."
+ "Token classes displayed by info in echo area, for language `bib'.
+See language access `x-symbol-LANG-class-alist'."
:group 'x-symbol-bib
:group 'x-symbol-info-strings
:type 'x-symbol-class-info)
(defcustom x-symbol-bib-class-face-alist x-symbol-tex-class-face-alist
- "Alist for TeX's color scheme in TeX's grid and info.
-See `x-symbol-language-access-alist' for details."
+ "Color scheme in language specific grid and info, for language `bib'.
+See language access `x-symbol-LANG-class-face-alist'."
:group 'x-symbol-bib
:group 'x-symbol-input-init
:group 'x-symbol-info-general
@@ -90,21 +93,26 @@ See `x-symbol-language-access-alist' for details."
:decode-spec (?\\)
:input-spec (?\\ (math . "[a-z@-Z]"))
:token-list x-symbol-bib-default-token-list)
- "Token grammar for language `bib'.")
+ "Grammar of token language `bib'.
+See language access `x-symbol-LANG-token-grammar'.")
(defvar x-symbol-bib-required-fonts x-symbol-tex-required-fonts
- "List of features providing fonts for language `bib'.")
+ "Features providing required fonts for language `bib'.
+See language access `x-symbol-LANG-required-fonts'.")
(defvar x-symbol-bib-user-table nil
"User table defining TeX macros, used in `x-symbol-bib-table'.")
(defvar x-symbol-bib-table
(append x-symbol-bib-user-table x-symbol-tex-table)
- "Complete table defining Unique TeX macros, see `x-symbol-bib-user-table'.
-Default value uses all definitions in `x-symbol-bib-table'.")
+ "Table defining `bib' tokens for the characters.
+See language access `x-symbol-LANG-table'. Default value uses all
+definitions in `x-symbol-tex-table'. Use `x-symbol-bib-user-table' to
+define private TeX macros or shadow existing ones. ")
(defvar x-symbol-bib-generated-data nil
- "Internal.")
+ "Generated data for token language `bib'.
+See language access `x-symbol-LANG-generated-data'.")
(defun x-symbol-bib-default-token-list (tokens)
(if (stringp tokens)
diff --git a/x-symbol/lisp/x-symbol-emacs.el b/x-symbol/lisp/x-symbol-emacs.el
index 696d9b54..06025a48 100644
--- a/x-symbol/lisp/x-symbol-emacs.el
+++ b/x-symbol/lisp/x-symbol-emacs.el
@@ -4,7 +4,7 @@
;;
;; Authors: Stefan Monnier, Christoph Wedler
;; Maintainer: (Please use `M-x x-symbol-package-bug' to contact the maintainer)
-;; Version: 4.4.X
+;; Version: 4.5.X
;; Keywords: WYSIWYG, LaTeX, HTML, wp, math, internationalization
;; X-URL: http://x-symbol.sourceforge.net/
@@ -28,16 +28,22 @@
;; \\[x-symbol-package-web]) and read the info (use \\[x-symbol-package-info]).
(provide 'x-symbol-emacs)
+;; TODO: Emacs has `buffer-substring-no-properties'
(unless (fboundp 'emacs-version>=)
- (defun emacs-version>= (major &optional minor)
- "Return true if the Emacs version is >= to the given MAJOR, and
-MINOR numbers, MINOR is optional. MINOR is only used in the test if it
-is non-nil."
+(defun emacs-version>= (major &optional minor patch)
+ "Return true if the Emacs version is >= to the given version.
+The version is provided by the required argument MAJOR, and the optional
+arguments MINOR and PATCH. Only the non-nil arguments are used in the
+test."
(cond ((> emacs-major-version major))
((< emacs-major-version major) nil)
((null minor))
- ((>= emacs-minor-version minor)))))
+ ((> emacs-minor-version minor))
+ ((< emacs-minor-version minor) nil)
+ ((null patch))
+ ((string-match "^[0-9]+\\.[0-9]+\\.\\([0-9]+\\)" emacs-version)
+ (>= (string-to-int (match-string 1 emacs-version)) patch)))))
;;;===========================================================================
@@ -73,7 +79,8 @@ is non-nil."
;; src/fileio.c,v 1.447:
(defvar x-symbol-emacs-has-correct-find-safe-coding
- (emacs-version>= 21 4))
+ (not (and (boundp 'char-coding-system-table)
+ (arrayp char-coding-system-table))))
;; lisp/format.el,v 1.39 (with src/fileio.c,v 1.447):
;; (setq x-symbol-auto-conversion-method 'format)
@@ -86,7 +93,10 @@ is non-nil."
;;; Bugs:
-(defvar x-symbol-emacs-after-create-image-function 'clear-image-cache)
+(defvar x-symbol-emacs-after-create-image-function
+;; I want to know why `clear-image-cache' is necessary sometimes,
+;; 'redraw-display is not enough
+ (if (emacs-version>= 21 3 50) nil 'clear-image-cache))
;;; Todo:
@@ -109,6 +119,8 @@ is non-nil."
(require 'fontset) ;seems not to be loaded in batch mode
;; temp hack:
+(defvar image-types nil) ; necessary in Emacs-21.2 w/o image
+ ; support, still in Emacs-21.3?
(if (memq 'png image-types) (provide 'png))
(if (memq 'gif image-types) (provide 'gif))
@@ -220,6 +232,7 @@ is non-nil."
;;; Char tables ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; TODO: use 'x-symbol instead 'generic with Emacs
(put 'generic 'char-table-extra-slots 0)
(unless (fboundp 'put-char-table)
(defun put-char-table (range val tab) (set-char-table-range tab range val)))
@@ -324,6 +337,7 @@ are separated with SEPARATOR (\", \" by default)."
(< (length x) (length y))))
(or separator ", "))))
+;; defined in Emacs-21.3.50
(unless (fboundp 'file-remote-p)
(defun file-remote-p (file-name)
"Test whether FILE-NAME is looked for on a remote system."
@@ -382,7 +396,7 @@ are separated with SEPARATOR (\", \" by default)."
(defvar x-symbol-emacs-w32-font-directories
(mapcar (lambda (dir) (expand-file-name dir x-symbol-data-directory))
- '("fonts/" "genfonts/")))
+ '("fonts/" "origfonts/" "genfonts/")))
(if (and (eq window-system 'w32)
x-symbol-emacs-w32-font-directories
diff --git a/x-symbol/lisp/x-symbol-hooks.el b/x-symbol/lisp/x-symbol-hooks.el
index 41540816..22d82460 100644
--- a/x-symbol/lisp/x-symbol-hooks.el
+++ b/x-symbol/lisp/x-symbol-hooks.el
@@ -4,7 +4,7 @@
;;
;; Author: Christoph Wedler <wedler@users.sourceforge.net>
;; Maintainer: (Please use `M-x x-symbol-package-bug' to contact the maintainer)
-;; Version: 4.4.X
+;; Version: 4.5.X
;; Keywords: WYSIWYG, LaTeX, HTML, wp, math, internationalization
;; X-URL: http://x-symbol.sourceforge.net/
@@ -246,6 +246,9 @@ Use \"locale -ck code_set_name charmap\" and search for the value of
(when (coding-system-p cs)
(setq name (cdr (assq (coding-system-base cs)
'((raw-text . iso-8859-1) ; console
+ ;; (undecided . iso-8859-1) "-i" is correct
+ ;; here, see
+ ;; `x-symbol-set-coding-system-if-undecided'
(iso-latin-1 . iso-8859-1)
(iso-latin-1-with-esc . iso-8859-1)
(iso-latin-2 . iso-8859-2)
@@ -280,7 +283,8 @@ Use \"locale -ck code_set_name charmap\" and search for the value of
(let* ((cs (default-value 'buffer-file-coding-system))
(val (cond (cs
(x-symbol-buffer-coding cs))
- ((equal current-language-environment "English")
+ ((member (downcase current-language-environment)
+ '("english" "ascii"))
'iso-8859-1)))
(loc (x-symbol-coding-system-from-locale)))
(and loc
@@ -364,56 +368,64 @@ You should not set this variable directly, use
`x-symbol-register-language' instead!")
(defcustom x-symbol-charsym-name "x-symbol charsym"
- "Name of the pseudo token language x-symbol charsym.
-This pseudo language corresponds to `x-symbol-language' having value nil
-and is used for input methods, not for decoding and encoding. See
-`x-symbol-language-text'."
+ "Standard name of the pseudo token language x-symbol charsym.
+See language access `x-symbol-LANG-name'. The pseudo language
+corresponds to `x-symbol-language' having value nil and is only used for
+input methods. See `x-symbol-language-text'."
:group 'x-symbol-miscellaneous
:type 'string)
(defcustom x-symbol-tex-name "TeX macro"
- "Name of token language `tex'. See `x-symbol-name'."
+ "Standard name of token language `tex'.
+See language access `x-symbol-LANG-name'."
:group 'x-symbol-tex
:type 'string)
(defcustom x-symbol-tex-modes
'(tex-mode latex-mode plain-tex-mode noweb-mode)
- "Major modes using language `tex'. See `x-symbol-mode'."
+ "Major modes typically using X-Symbol with token language `tex'.
+See language access `x-symbol-LANG-modes'."
:group 'x-symbol-tex
:group 'x-symbol-mode
:type '(repeat function))
(defcustom x-symbol-sgml-name "SGML entity"
- "Name of token language `sgml'. See `x-symbol-name'."
+ "Standard name of token language `sgml'.
+See language access `x-symbol-LANG-name'."
:group 'x-symbol-sgml
:type 'string)
(defcustom x-symbol-sgml-modes
;;'(sgml-mode xml-mode html-mode hm--html-mode html-helper-mode)
'(html-mode hm--html-mode html-helper-mode)
- "Major modes using language `sgml'. See `x-symbol-modes'."
+ "Major modes typically using X-Symbol with language `sgml'.
+See language access `x-symbol-LANG-modes'."
:group 'x-symbol-sgml
:group 'x-symbol-mode
:type '(repeat function))
(defcustom x-symbol-bib-name "BibTeX macro"
- "Name of token language `bib'. See `x-symbol-name'."
+ "Standard name of token language `bib'.
+See language access `x-symbol-LANG-name'."
:group 'x-symbol-bib
:type 'string)
(defcustom x-symbol-bib-modes '(bibtex-mode)
- "Major modes using language `bib'. See `x-symbol-modes'."
+ "Major modes typically using X-Symbol with language `bib'.
+See language access `x-symbol-LANG-modes'."
:group 'x-symbol-bib
:group 'x-symbol-mode
:type '(repeat function))
(defcustom x-symbol-texi-name "TeXinfo command"
- "Name of token language `tex'. See `x-symbol-name'."
+ "Standard name of token language `texi'.
+See language access `x-symbol-LANG-name'."
:group 'x-symbol-texi
:type 'string)
(defcustom x-symbol-texi-modes '(texinfo-mode)
- "Major modes using language `texi'. See `x-symbol-modes'."
+ "Major modes typically using X-Symbol with language `texi'.
+See language access `x-symbol-LANG-modes'."
:group 'x-symbol-texi
:group 'x-symbol-mode
:type '(repeat function))
@@ -447,11 +459,18 @@ info in the echo area, etc.")
(defvar x-symbol-coding nil
"*Coding of 8bit characters in a file.
-Supported values are `iso-8859-1', `iso-8859-2', `iso-8859-3' and
-`iso-8859-9', value nil means the value of `x-symbol-default-coding'.
Determines which characters are considered to be 8bit characters for
-file operations. Function `x-symbol-mode' sets this variable to a
-reasonable value if the variable is not yet buffer-local.
+file operations. Supported values are `iso-8859-1', `iso-8859-2',
+`iso-8859-3', `iso-8859-9', and `iso-8859-15'. Value nil means a value
+according to `buffer-file-coding-system' with Mule support, or the value
+of `x-symbol-default-coding' without Mule support.
+
+With Mule support, any value other than `nil' is considered invalid if
+encoding according to `buffer-file-coding-system' is neither the same as
+this value nor the same as `x-symbol-default-coding'.
+
+Function `x-symbol-mode' sets this variable to a reasonable value if the
+variable is not yet buffer-local.
During decoding, e.g., when visiting a file, the value is always
important for the interpretation of 8bit characters, an invalid value is
@@ -469,8 +488,10 @@ is valid and `x-symbol-8bits' is non-nil.")
"*If non-nil, do not encode 8bit characters.
Variable `x-symbol-coding' determines which characters are assumed to be
8bit characters. Note that tokens representing 8bit characters are
-always decoded. Function `x-symbol-mode' sets this variable to a
-reasonable value if the variable is not yet buffer-local.")
+always decoded, except if `x-symbol-unique' is non-nil.
+
+Function `x-symbol-mode' sets this variable to a reasonable value if the
+variable is not yet buffer-local.")
;; TODO: link to `x-symbol-unique'
(make-variable-buffer-local 'x-symbol-8bits)
@@ -479,8 +500,14 @@ reasonable value if the variable is not yet buffer-local.")
'(x-symbol-update-modeline))
(defvar x-symbol-unique nil
- "*If non-nil, only decode canonical tokens.")
-;; TODO: link to `x-symbol-8bits'
+ "*If non-nil, only decode canonical tokens.
+Canonical tokens are those which are produced when X-Symbol encodes the
+corresponding character. If `x-symbol-8bits' is non-nil, do not decode
+tokens which would be decoded to 8bit characters according to
+`x-symbol-coding'.
+
+Function `x-symbol-mode' sets this variable to a reasonable value if the
+variable is not yet buffer-local.")
(make-variable-buffer-local 'x-symbol-unique)
(put 'x-symbol-unique 'permanent-local t)
@@ -489,10 +516,12 @@ reasonable value if the variable is not yet buffer-local.")
(defvar x-symbol-subscripts nil
"*If non-nil, use special fonts to display super- and subscripts.
-This feature must be supported by the token language dependent font-lock
-keywords. Function `x-symbol-mode' sets this variable to a reasonable
-value if the variable is not yet buffer-local. Some parts of the text
-might be invisible, see also variable `x-symbol-reveal-invisible'.")
+This feature must be supported by the token language via language access
+`x-symbol-LANG-subscript-matcher'. Some parts of the text might be
+invisible, see also variable `x-symbol-reveal-invisible'.
+
+Function `x-symbol-mode' sets this variable to a reasonable value if the
+variable is not yet buffer-local.")
(make-variable-buffer-local 'x-symbol-subscripts)
(x-symbol-define-user-options 'x-symbol-subscripts '(t)
@@ -500,10 +529,11 @@ might be invisible, see also variable `x-symbol-reveal-invisible'.")
(defvar x-symbol-image nil
"*If non-nil, show little glyphs after image insertion commands.
-This feature must be supported by the token language dependent image
-keywords, see `x-symbol-image-parse-buffer'. Function `x-symbol-mode'
-sets this variable to a reasonable value if the variable is not yet
-buffer-local.")
+This feature must be supported by the token language via language access
+`x-symbol-LANG-image-keywords'.
+
+Function `x-symbol-mode' sets this variable to a reasonable value if the
+variable is not yet buffer-local.")
(make-variable-buffer-local 'x-symbol-image)
(x-symbol-define-user-options 'x-symbol-image '(t)
@@ -535,6 +565,9 @@ Used when finding an appropriate value for `x-symbol-8bits'. See also
"*Alist to setup X-Symbol values for buffers visiting files.
Elements look like
(MATCH LANGUAGE MODE-ON CODING 8BITS UNIQUE SUBSCRIPTS IMAGE)
+or
+ (MATCH LANGUAGE . VARIABLE)
+
If MATCH matches a buffer in which command `x-symbol-mode' is invoked,
the rest of the element is used to setup some buffer-local x-symbol
specific variables. If no element matches, set `x-symbol-language' to
@@ -542,21 +575,22 @@ the symbol property `x-symbol-language' of the major mode symbol if the
variable is not already buffer-local.
If `x-symbol-mode' is not already buffer-local, MODE-ON determines
-whether to turn the mode on if `x-symbol-mode' is called with a cons as
-prefix argument. LANGUAGE, CODING, 8BITS, UNIQUE, SUBSCRIPTS and IMAGE
-are used to set `x-symbol-language', `x-symbol-coding',
-`x-symbol-8bits', `x-symbol-unique', `x-symbol-subscripts' and
-`x-symbol-image' if these values are not already buffer-local.
+whether to turn the mode on with `turn-on-x-symbol-conditionally'.
+LANGUAGE, CODING, 8BITS, UNIQUE, SUBSCRIPTS and IMAGE are used to set
+`x-symbol-language', `x-symbol-coding', `x-symbol-8bits',
+`x-symbol-unique', `x-symbol-subscripts' and `x-symbol-image' if these
+values are not already buffer-local.
MATCH is either a list of major modes which must include the mode of the
current buffer or a regexp matching the file name ignoring some
suffixes, see `x-symbol-auto-mode-suffixes', or a value used directly.
+
MODE-ON, LANGUAGE, CODING, 8BITS, UNIQUE, SUBSCRIPTS and IMAGE are
`eval'ed in that order. During the evaluation, `x-symbol-mode' is
non-nil according to MODE-ON.
-See the documentation of `x-symbol-auto-style' for the auto-style
-language accesses."
+VARIABLE is a symbol whose value contains the above mentioned values,
+see the language access `x-symbol-LANG-auto-style'."
:group 'x-symbol-mode
:type '(repeat (cons :format "%v"
(choice (repeat :tag "In major modes"
@@ -694,25 +728,29 @@ nil."
;;;###autoload
(defun x-symbol-mode (&optional arg special)
"Toggle X-Symbol mode.
-If ARG is a cons, e.g., when \\[x-symbol-mode] is preceded by one or
-more \\[universal-argument]'s with no digits, turn on X-Symbol mode
-conditionally, see MODE-ON in `x-symbol-auto-mode-alist'. Otherwise,
-turn X-Symbol mode on if ARG is positive, else turn it off. If some
-X-Symbol specific local variables are not buffer-local, set them to
-reasonable values according to `x-symbol-buffer-mode-alist' and
-`x-symbol-auto-mode-alist'.
+Toggle X-Symbol mode. If provided with a prefix argument, turn X-Symbol
+mode on if the numeric value of the argument is positive, else turn it
+off. If no token language can be deduced, ask for a token language; if
+provided with a non-numeric prefix argument, always ask.
+
+By default, X-Symbol mode is disabled in special major-modes visiting a
+file, e.g., `vm-mode'. Use a prefix argument to be asked whether to
+turn in on anyway.
+
+When not already defined, various buffer-local variables are set when
+turning on X-Symbol. See `x-symbol-auto-style-alist' and the language
+access `x-symbol-LANG-modes'.
Turning X-Symbol mode on requires a valid `x-symbol-language' and also
decodes tokens if the mode was turned off before, see
-\\[x-symbol-decode]. Turning X-Symbol mode off also encodes x-symbol
-characters if the mode was turned on before, see \\[x-symbol-encode].
-If argument INIT is non-nil, the old mode status is assumed to be off."
+\\[x-symbol-decode-recode]. Turning X-Symbol mode off also encodes
+x-symbol characters if the mode was turned on before, see
+\\[x-symbol-encode-recode]. If optional argument SPECIAL has value
+`init', the old mode status is assumed to be off."
(interactive (list current-prefix-arg 'interactive))
(if (eq special 'init) (setq x-symbol-mode nil))
(let* ((old-mode (if (eq special 'init) nil x-symbol-mode))
- (new-mode (if arg
- (> (prefix-numeric-value arg) 0)
- (not x-symbol-mode)))
+ (new-mode (if arg (> (prefix-numeric-value arg) 0) (not old-mode)))
(disabled0 (assq major-mode x-symbol-mode-disable-alist))
(disabled1 (if disabled0
(cdr disabled0)
@@ -757,7 +795,7 @@ If argument INIT is non-nil, the old mode status is assumed to be off."
(let ((langs x-symbol-language-alist))
(while langs
(if (memq major-mode
- (symbol-value (get (caar langs) 'x-symbol-modes)))
+ (symbol-value (get (caar langs) 'x-symbol-LANG-modes)))
(setq style (cons (caar langs) t)
langs nil)
(setq langs (cdr langs))))))
@@ -767,7 +805,7 @@ If argument INIT is non-nil, the old mode status is assumed to be off."
;; check language ----------------------------------------------------
(if (and x-symbol-language
(symbolp x-symbol-language)
- (get x-symbol-language 'x-symbol-feature))
+ (get x-symbol-language 'x-symbol-LANG-feature))
(when (and (eq special 'interactive) (consp arg))
(setq x-symbol-language
(x-symbol-read-language
@@ -784,12 +822,12 @@ If argument INIT is non-nil, the old mode status is assumed to be off."
(if x-symbol-language (setq x-symbol-language nil)))
(setq style nil))
(when x-symbol-language
- (require (get x-symbol-language 'x-symbol-feature))
+ (require (get x-symbol-language 'x-symbol-LANG-feature))
(setq style
(cond ((or (null style) (eq (cdr style) t)
(not (eq (car style) x-symbol-language)))
(symbol-value (get x-symbol-language
- 'x-symbol-auto-style)))
+ 'x-symbol-LANG-auto-style)))
((and (symbolp (cdr style)) (boundp (cdr style)))
(symbol-value (cdr style)))
(t
@@ -821,8 +859,7 @@ If argument INIT is non-nil, the old mode status is assumed to be off."
;;;###autoload
(defun turn-on-x-symbol-conditionally ()
"Turn on x-symbol mode conditionally, see `x-symbol-mode'.
-Call `x-symbol-mode' with a cons for ARG and a non-nil INIT. Used in
-`hack-local-variables-hook'."
+Call `x-symbol-mode' with SPECIAL having value `init'."
(x-symbol-mode (and (local-variable-p 'x-symbol-mode (current-buffer))
(if x-symbol-mode 1 0))
'init))
@@ -952,7 +989,7 @@ Added to `after-insert-file-functions' if
(setq len (- (point-max) (point-min)))))
(lwarn 'x-symbol 'warning
;; might leed to quite a few warnings with old XEmacs, get those
- "Wrong point position provided for function in `after-insert-file-functions'")))
+ "Wrong point position %d (len: %d, max: %d) provided by Emacs for functions in `after-insert-file-functions'" (point) len (point-max))))
len)
(defun x-symbol-write-region-annotate-function (start end)
@@ -1050,10 +1087,10 @@ Its value is set by `x-symbol-update-modeline'.")
(add-minor-mode 'x-symbol-mode 'x-symbol-modeline-string x-symbol-mode-map)
(put 'x-symbol-mode :menu-tag "X-Symbol")
-(defvar x-symbol-early-language-access-alist
- '((x-symbol-name "name" nil stringp)
- (x-symbol-modes "modes" t listp) ; TODO: non-optional
- (x-symbol-auto-style "auto-style" require)))
+(defconst x-symbol-early-language-access-alist
+ '((x-symbol-LANG-name "name" nil stringp)
+ (x-symbol-LANG-modes "modes" t listp) ; TODO: non-optional
+ (x-symbol-LANG-auto-style "auto-style" require)))
(defun x-symbol-init-language-accesses (language alist)
"Initialize accesses for token language LANGUAGE according to ALIST.
@@ -1061,7 +1098,7 @@ The symbol property `x-symbol-feature' of LANGUAGE must be set before.
See also `x-symbol-language-access-alist'."
;;If optional NO-TEST is nil, accesses which do not point to a bound
;;variable are not set.
- (let ((feature (get language 'x-symbol-feature))
+ (let ((feature (get language 'x-symbol-LANG-feature))
(ok t)
symbol)
(dolist (item alist)
@@ -1091,8 +1128,8 @@ See also `x-symbol-language-access-alist'."
FEATURE is a feature which `provide's LANGUAGE. MODES are major modes
which typically use LANGUAGE. Using LANGUAGE's accesses will initialize
LANGUAGE, see `x-symbol-language-value'."
- (unless (get language 'x-symbol-feature)
- (put language 'x-symbol-feature feature))
+ (unless (get language 'x-symbol-LANG-feature)
+ (put language 'x-symbol-LANG-feature feature))
(unless
(x-symbol-init-language-accesses language
x-symbol-early-language-access-alist)
@@ -1102,7 +1139,8 @@ LANGUAGE, see `x-symbol-language-value'."
(setq x-symbol-language-alist
(nconc x-symbol-language-alist
(list (cons language
- (symbol-value (get language 'x-symbol-name))))))))
+ (symbol-value
+ (get language 'x-symbol-LANG-name))))))))
;;;###autoload
(defun x-symbol-initialize (&optional arg)
@@ -1169,6 +1207,8 @@ X-Symbol twice."
x-symbol-font-directory) nil t)
(not (eq 0 (call-process "xset" nil nil nil "fp+"
x-symbol-font-directory))))))
+ ;; one cause: other dir with X-Symbol fonts already exists (old
+ ;; installation)
(lwarn 'x-symbol 'error
"Couldn't add %s to X font path" x-symbol-font-directory))
;; Package fast-lock -----------------------------------------------------
diff --git a/x-symbol/lisp/x-symbol-image.el b/x-symbol/lisp/x-symbol-image.el
index 33ea94b2..525c3c7c 100644
--- a/x-symbol/lisp/x-symbol-image.el
+++ b/x-symbol/lisp/x-symbol-image.el
@@ -1,10 +1,10 @@
;;; x-symbol-image.el --- display glyphs at the end of image insertion commands
-;; Copyright (C) 1997-1999, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1999, 2001, 2003 Free Software Foundation, Inc.
;;
;; Author: Christoph Wedler <wedler@users.sourceforge.net>
;; Maintainer: (Please use `M-x x-symbol-package-bug' to contact the maintainer)
-;; Version: 4.4.X
+;; Version: 4.5
;; Keywords: WYSIWYG, LaTeX, HTML, wp, math, internationalization
;; X-URL: http://x-symbol.sourceforge.net/
@@ -160,7 +160,7 @@ button2 starts an image editor, see `x-symbol-image-editor-alist'.
button3 pops up a menu, see `x-symbol-image-menu'.
The image insertion commands are recognized by keywords in the language
-access `x-symbol-image-keywords' whose value have the form
+access `x-symbol-LANG-image-keywords' whose value have the form
(IMAGE-REGEXP KEYWORD ...)
IMAGE-REGEXP should match all images files and is used to initialize the
buffer local memory cache, see `x-symbol-image-init-memory-cache'.
@@ -172,8 +172,8 @@ name of the corresponding image file. If FUNCTION returns nil, the
command is not highlighted.
Relative image file names are expanded in the directory returned by the
-function in the language access `x-symbol-master-directory', value nil
-means function `default-directory'. Implicitly relative image file
+function in the language access `x-symbol-LANG-master-directory', value
+nil means function `default-directory'. Implicitly relative image file
names are searched in a search path, see `x-symbol-image-use-remote'."
(interactive)
(save-excursion
@@ -239,12 +239,13 @@ cache files."
(unwind-protect
(let (;;(case-fold-search nil)
(keywords (cdr (x-symbol-language-value
- 'x-symbol-image-keywords)))
+ 'x-symbol-LANG-image-keywords)))
(cached-dirs (cons nil
(mapcar 'file-name-as-directory
(x-symbol-language-value
- 'x-symbol-image-cached-dirs))))
- (master-dir (x-symbol-language-value 'x-symbol-master-directory))
+ 'x-symbol-LANG-image-cached-dirs))))
+ (master-dir (x-symbol-language-value
+ 'x-symbol-LANG-master-directory))
keyword matcher file-fn file-args
file extent cache-elem extent-beg extent-end)
(if master-dir (funcall master-dir))
@@ -311,7 +312,7 @@ cache files."
(defun x-symbol-image-default-file-name (num &optional regexp extension)
"Return image file name for last match.
-Default FUNCTION in language access `x-symbol-image-keywords', see
+Default FUNCTION in language access `x-symbol-LANG-image-keywords', see
`x-symbol-image-parse-buffer'. Return text matched by the NUMth regexp
group of the corresponding keyword regexp. If REGEXP is non-nil and the
file name does not match REGEXP, add EXTENSION to the file name."
@@ -328,14 +329,16 @@ file name does not match REGEXP, add EXTENSION to the file name."
(defun x-symbol-image-init-memory-cache ()
"Create an empty memory cache.
Scan all directories in the searchpath and all subdirectories in the
-language access `x-symbol-image-cached-dirs' for files matched by
-IMAGE-REGEXP in the language access `x-symbol-image-keywords' to build
-`x-symbol-image-memory-cache' where all GLYPHs are nil."
+language access `x-symbol-LANG-image-cached-dirs' for files matched by
+IMAGE-REGEXP in the language access `x-symbol-LANG-image-keywords' to
+build `x-symbol-image-memory-cache' where all GLYPHs are nil."
(let* ((master-dir (funcall (x-symbol-language-value
- 'x-symbol-master-directory)))
- (cached-dirs (x-symbol-language-value 'x-symbol-image-cached-dirs))
+ 'x-symbol-LANG-master-directory)))
+ (cached-dirs (x-symbol-language-value
+ 'x-symbol-LANG-image-cached-dirs))
(path (x-symbol-image-searchpath master-dir))
- (suffixes (car (x-symbol-language-value 'x-symbol-image-keywords)))
+ (suffixes (car (x-symbol-language-value
+ 'x-symbol-LANG-image-keywords)))
implicit-dirs
dirs dir)
(setq x-symbol-image-memory-cache nil)
@@ -367,12 +370,12 @@ IMAGE-REGEXP in the language access `x-symbol-image-keywords' to build
(defun x-symbol-image-searchpath (master-dir)
"Return language dependent image searchpath in reverse order.
-Uses the language accesses `x-symbol-image-searchpath' and
-`x-symbol-master-directory' (via argument MASTER-DIR). Include all
+Uses the language accesses `x-symbol-LANG-image-searchpath' and
+`x-symbol-LANG-master-directory' (via argument MASTER-DIR). Include all
subdirectories of elements in the image searchpath ending with \"//\",
except symbolic links if `x-symbol-image-searchpath-follow-symlink' is
nil."
- (let ((path (or (x-symbol-language-value 'x-symbol-image-searchpath)
+ (let ((path (or (x-symbol-language-value 'x-symbol-LANG-image-searchpath)
'("./")))
(dirs nil)
dir truename slashslash)
@@ -431,10 +434,11 @@ nil."
"Start image editor for the image file FILE used in BUFFER.
If BUFFER is nil, just return string describing the command. See
`x-symbol-image-editor-alist' and `x-symbol-image-current-marker'."
- (interactive (list (read-file-name "Edit image design file for: "
- (funcall (x-symbol-language-value
- 'x-symbol-master-directory)))
- (current-buffer)))
+ (interactive
+ (list (read-file-name "Edit image design file for: "
+ (funcall (x-symbol-language-value
+ 'x-symbol-LANG-master-directory)))
+ (current-buffer)))
(let ((result (and file (x-symbol-match-in-alist
file x-symbol-image-editor-alist))))
(and file buffer (setq file (x-symbol-image-active-file file buffer)))
@@ -514,7 +518,7 @@ instead."
(save-excursion
(set-buffer buffer)
(let ((master-dir (funcall (x-symbol-language-value
- 'x-symbol-master-directory)))
+ 'x-symbol-LANG-master-directory)))
path)
(if (or (string-match x-symbol-image-explicitly-relative-regexp file)
(file-name-absolute-p file))
diff --git a/x-symbol/lisp/x-symbol-macs.el b/x-symbol/lisp/x-symbol-macs.el
index d8a60fc1..7245d3bb 100644
--- a/x-symbol/lisp/x-symbol-macs.el
+++ b/x-symbol/lisp/x-symbol-macs.el
@@ -4,7 +4,7 @@
;;
;; Author: Christoph Wedler <wedler@users.sourceforge.net>
;; Maintainer: (Please use `M-x x-symbol-package-bug' to contact the maintainer)
-;; Version: 4.4
+;; Version: 4.5
;; Keywords: WYSIWYG, LaTeX, HTML, wp, math, internationalization
;; X-URL: http://x-symbol.sourceforge.net/
diff --git a/x-symbol/lisp/x-symbol-mule.el b/x-symbol/lisp/x-symbol-mule.el
index c4e14150..7c25b5e7 100644
--- a/x-symbol/lisp/x-symbol-mule.el
+++ b/x-symbol/lisp/x-symbol-mule.el
@@ -4,7 +4,7 @@
;;
;; Author: Christoph Wedler <wedler@users.sourceforge.net>
;; Maintainer: (Please use `M-x x-symbol-package-bug' to contact the maintainer)
-;; Version: 4.4.X
+;; Version: 4.5
;; Keywords: WYSIWYG, LaTeX, HTML, wp, math, internationalization, Mule
;; X-URL: http://x-symbol.sourceforge.net/
diff --git a/x-symbol/lisp/x-symbol-nomule.el b/x-symbol/lisp/x-symbol-nomule.el
index 38f8c532..9ca2d483 100644
--- a/x-symbol/lisp/x-symbol-nomule.el
+++ b/x-symbol/lisp/x-symbol-nomule.el
@@ -4,7 +4,7 @@
;;
;; Author: Christoph Wedler <wedler@users.sourceforge.net>
;; Maintainer: (Please use `M-x x-symbol-package-bug' to contact the maintainer)
-;; Version: 4.4.X
+;; Version: 4.5
;; Keywords: WYSIWYG, LaTeX, HTML, wp, math, internationalization
;; X-URL: http://x-symbol.sourceforge.net/
diff --git a/x-symbol/lisp/x-symbol-sgml.el b/x-symbol/lisp/x-symbol-sgml.el
index 8bb89844..98ae41a2 100644
--- a/x-symbol/lisp/x-symbol-sgml.el
+++ b/x-symbol/lisp/x-symbol-sgml.el
@@ -1,10 +1,10 @@
;;; x-symbol-sgml.el --- token language "SGML entity" for package x-symbol
-;; Copyright (C) 1996-1999, 2002 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2002, 2003 Free Software Foundation, Inc.
;;
;; Author: Christoph Wedler <wedler@users.sourceforge.net>
;; Maintainer: (Please use `M-x x-symbol-package-bug' to contact the maintainer)
-;; Version: 4.4.X
+;; Version: 4.5
;; Keywords: WYSIWYG, HTML, wp, math, internationalization
;; X-URL: http://x-symbol.sourceforge.net/
@@ -43,7 +43,8 @@
(x-symbol-auto-coding-alist x-symbol-sgml-auto-coding-alist)
x-symbol-coding (not x-symbol-mode)
x-symbol-mode x-symbol-mode)
- "TODO"
+ "Values for X-Symbol's buffer-local variables with language `sgml'.
+See language access `x-symbol-LANG-auto-style'."
:group 'x-symbol-sgml
:group 'x-symbol-mode
:type 'x-symbol-auto-style)
@@ -55,9 +56,9 @@
("iso-8859-3" . iso-8859-3)
("iso-8859-9" . iso-8859-9)
("iso-8859-15" . iso-8859-15)))
- "*Alist used to determine the file coding of SGML/HTML buffers.
-Used in the default value of `x-symbol-auto-mode-alist'. See
-variable `x-symbol-auto-coding-alist' for details."
+ "*Alist used to determine the file coding with language `sgml'.
+Used in the default value of `x-symbol-sgml-auto-style'. See variable
+`x-symbol-auto-coding-alist' for details."
:group 'x-symbol-sgml
:group 'x-symbol-mode
:type 'x-symbol-auto-coding)
@@ -84,7 +85,8 @@ Used in `x-symbol-sgml-class-face-alist'."
:group 'x-symbol-info-general)
(defcustom x-symbol-sgml-modeline-name "sgml"
- "*String naming the language SGML in the modeline."
+ "Modeline name of token language `sgml'.
+See language access `x-symbol-LANG-modeline-name'."
:group 'x-symbol-sgml
:type 'string)
@@ -102,8 +104,8 @@ Used in `x-symbol-sgml-class-face-alist'."
("Circumflex, Caron" circumflex caron)
("Diaeresis, Umlaut" diaeresis hungarumlaut)
("Acute, Grave" acute grave))
- "*If non-nil, used in SGML specific grid/menu.
-See `x-symbol-header-groups-alist'."
+ "Header/submenu specification of the specific menu for language `sgml'.
+See language access `x-symbol-LANG-header-groups-alist'."
:group 'x-symbol-sgml
:group 'x-symbol-input-init
:type 'x-symbol-headers)
@@ -113,8 +115,8 @@ See `x-symbol-header-groups-alist'."
(noname "SGML char-ref" (x-symbol-emph-info-face))
(VALID "SGML entity" (x-symbol-info-face))
(INVALID "no SGML entity" (x-symbol-emph-info-face)))
- "Alist for SGML's token classes displayed by info in echo area.
-See `x-symbol-language-access-alist' for details."
+ "Token classes displayed by info in echo area, for language `sgml'.
+See language access `x-symbol-LANG-class-alist'."
:group 'x-symbol-sgml
:group 'x-symbol-info-strings
:type 'x-symbol-class-info)
@@ -122,38 +124,48 @@ See `x-symbol-language-access-alist' for details."
(defcustom x-symbol-sgml-class-face-alist
'((symbol x-symbol-sgml-symbol-face (x-symbol-sgml-symbol-face))
(noname x-symbol-sgml-noname-face (x-symbol-sgml-noname-face)))
- "Alist for SGML's color scheme in SGML's grid and info.
-See `x-symbol-language-access-alist' for details."
+ "Color scheme in language specific grid and info, for language `sgml'.
+See language access `x-symbol-LANG-class-face-alist'."
:group 'x-symbol-sgml
:group 'x-symbol-input-init
:group 'x-symbol-info-general
:type 'x-symbol-class-faces)
(defcustom x-symbol-sgml-electric-ignore nil
- "*Additional SGML version of `x-symbol-electric-ignore'."
+ "Specification restricting input method ELECTRIC with language `sgml'.
+See language access `x-symbol-LANG-electric-ignore'."
:group 'x-symbol-sgml
:group 'x-symbol-input-control
:type 'x-symbol-function-or-regexp)
-
(defvar x-symbol-sgml-token-list 'x-symbol-sgml-token-list-name
- "Function returning a list of SGML entities from table specification.
-The TOKEN-SPEC in sgml table look like (NUMBER STRING...) where NUMBER
-is the Unicode value. See `x-symbol-init-language',
-`x-symbol-sgml-token-list-name', `x-symbol-sgml-token-list-code' and
-`x-symbol-sgml-token-list-netscape'.")
+ "Symbol specifying the token definition for language `sgml'.
+Allowed values are
+ - `x-symbol-sgml-token-list-name': the canonical token for a character
+ is a entity references,
+ - `x-symbol-sgml-token-list-code': the canonical token for a character
+ is a character references,
+ - `x-symbol-sgml-token-list-netscape': the canonical token for a
+ Latin-1 character is a entity references, for others, it is a
+ character references. Bug workaround for Netscape, v4.6 or lower.
+
+The value is used by function `x-symbol-sgml-default-token-list' which
+is used for the definition of the conversion tables. See
+`x-symbol-sgml-token-grammar'.")
(defvar x-symbol-sgml-token-grammar
'(x-symbol-make-grammar
:decode-regexp "&[#0-9A-Za-z]+;"
:token-list x-symbol-sgml-default-token-list)
- "Token grammar for language `sgml'.")
+ "Grammar of token language `sgml'.
+See language access `x-symbol-LANG-token-grammar'.")
(defvar x-symbol-sgml-user-table nil
"User table defining SGML entities, used in `x-symbol-sgml-table'.")
(defvar x-symbol-sgml-generated-data nil
- "Internal.")
+ "Generated data for token language `sgml'.
+See language access `x-symbol-LANG-generated-data'.")
;;;===========================================================================
@@ -168,15 +180,15 @@ See `x-symbol-image-parse-buffer'."
:type 'function)
(defcustom x-symbol-sgml-image-searchpath '("./")
- "Search path used for implicitly relative image file names.
-See `x-symbol-image-use-remote'."
+ "Search path for implicitly relative image file names.
+See language access `x-symbol-LANG-image-searchpath'."
:group 'x-symbol-sgml
:group 'x-symbol-image-language
:type '(repeat directory))
(defcustom x-symbol-sgml-image-cached-dirs '("images/" "pictures/")
- "Directory parts of image file names stored in the memory cache.
-See `x-symbol-image-use-remote'."
+ "Directory parts of images stored in the memory cache.
+See language access `x-symbol-LANG-image-cached-dirs'."
:group 'x-symbol-sgml
:group 'x-symbol-image-language
:type '(repeat string))
@@ -215,8 +227,8 @@ E.g., I add the following element to this variable:
'("\\.\\(gif\\|png\\|jpe?g\\)\\'"
("<img[ \t][^\n>]*src=\"\\([^\n\"]+\\)\"[^\n>]*>"
x-symbol-sgml-image-file-truename 1))
- "Keywords used to find image insertion commands.
-See `x-symbol-image-parse-buffer'."
+ "Keywords for image insertion commands of language `sgml'.
+See language access `x-symbol-LANG-image-keywords'."
:group 'x-symbol-sgml
:group 'x-symbol-image-language
:type 'x-symbol-image-keywords)
@@ -236,7 +248,8 @@ keyword regexp, after being processed according to
;;;===========================================================================
(defcustom x-symbol-sgml-subscript-matcher 'x-symbol-sgml-subscript-matcher
- "TODO"
+ "Function matching super-/subscripts for language `sgml'.
+See language access `x-symbol-LANG-subscript-matcher'."
:group 'x-symbol-sgml
:type 'function)
@@ -262,7 +275,7 @@ or subscript tag."
(defcustom x-symbol-sgml-font-lock-alist
'(("<sub>" . "</sub>") ("<sup>" . "</sup>"))
- "Alist for correct tag pairs for SGML's super- and subscripts.
+ "Alist for correct tag pairs for HTML's super- and subscripts.
Each element looks like (OPEN . CLOSE). All keys OPEN in this alist
should be matched by `x-symbol-sgml-font-lock-regexp', all CLOSEs should
be matched by `x-symbol-sgml-font-lock-limit-regexp'."
@@ -631,9 +644,10 @@ be matched by `x-symbol-sgml-font-lock-limit-regexp'."
x-symbol-sgml-latinN-table
x-symbol-sgml-xsymb0-table
x-symbol-sgml-xsymb1-table)
- "Complete table defining SGML entities.
-Use `x-symbol-sgml-user-table' to define/shadow private entities.
-See `x-symbol-init-language' and `x-symbol-sgml-token-list'.")
+ "Table defining `sgml' tokens for the characters.
+See language access `x-symbol-LANG-table' and variable
+`x-symbol-sgml-token-list'. Use `x-symbol-sgml-user-table' to define
+private SGML entities or shadow existing ones.")
;;;===========================================================================
diff --git a/x-symbol/lisp/x-symbol-tex.el b/x-symbol/lisp/x-symbol-tex.el
index cfcbaf4e..d9c073f9 100644
--- a/x-symbol/lisp/x-symbol-tex.el
+++ b/x-symbol/lisp/x-symbol-tex.el
@@ -4,7 +4,7 @@
;;
;; Author: Christoph Wedler <wedler@users.sourceforge.net>
;; Maintainer: (Please use `M-x x-symbol-package-bug' to contact the maintainer)
-;; Version: 4.4.X
+;; Version: 4.5.X
;; Keywords: WYSIWYG, LaTeX, wp, math, internationalization
;; X-URL: http://x-symbol.sourceforge.net/
@@ -61,7 +61,8 @@
'x-symbol-tex-auto-coding-alist)))
x-symbol-coding (not x-symbol-mode)
x-symbol-mode x-symbol-mode)
- "See the documentation of `x-symbol-auto-style'."
+ "Values for X-Symbol's buffer-local variables with language `tex'.
+See language access `x-symbol-LANG-auto-style'."
:group 'x-symbol-tex
:group 'x-symbol-mode
:type 'x-symbol-auto-style)
@@ -76,15 +77,16 @@
("\\`[ \t]*%&.*[ \t]+--?translate-file[ \t]*=[ \t]*i\\([A-Za-z]+[0-9]+\\)-" 1
("l1" . iso-8859-1)
("l2" . iso-8859-2)))
- "*Alist used to determine the file coding of TeX/LaTeX buffers.
-Used in the default value of `x-symbol-auto-mode-alist'. See
-variable `x-symbol-auto-coding-alist' for details."
+ "*Alist used to determine the file coding with language `tex'.
+Used in the default value of `x-symbol-tex-auto-style'. See variable
+`x-symbol-auto-coding-alist' for details."
:group 'x-symbol-tex
:group 'x-symbol-mode
:type 'x-symbol-auto-coding)
(defcustom x-symbol-tex-coding-master 'TeX-master
- "*If non-nil, symbol of local variable with name of master file."
+ "*If non-nil, symbol of local variable with name of master file.
+Used inside function `x-symbol-tex-auto-coding-alist'."
:group 'x-symbol-tex
:group 'x-symbol-mode
:type 'boolean)
@@ -95,25 +97,27 @@ variable `x-symbol-auto-coding-alist' for details."
;;;===========================================================================
(defcustom x-symbol-tex-modeline-name "tex"
- "*String naming the language TeX in the modeline."
+ "Modeline name of token language `tex'.
+See language access `x-symbol-LANG-modeline-name'."
:group 'x-symbol-tex
:type 'string)
(defcustom x-symbol-tex-header-groups-alist nil
- "*If non-nil, used in TeX specific grid/menu.
-See `x-symbol-header-groups-alist'."
+ "Header/submenu specification of the specific menu for language `tex'.
+See language access `x-symbol-LANG-header-groups-alist'."
:group 'x-symbol-tex
:group 'x-symbol-input-init
:type 'x-symbol-headers)
(defcustom x-symbol-tex-electric-ignore 'x-symbol-tex-default-electric-ignore
- "*Additional TeX version of `x-symbol-electric-ignore'."
+ "Specification restricting input method ELECTRIC with language `tex'.
+See language access `x-symbol-LANG-electric-ignore'."
:group 'x-symbol-tex
:group 'x-symbol-input-control
:type 'x-symbol-function-or-regexp)
(defcustom x-symbol-tex-electric-ignore-regexp "[A-Za-z]~\\'"
- "*Regexp match contexts not to be used in TeX for input method ELECTRIC.
+ "*Regexp matching contexts not to be used for input method ELECTRIC.
Used by `x-symbol-tex-default-electric-ignore'."
:group 'x-symbol-tex
:group 'x-symbol-input-control
@@ -135,7 +139,8 @@ according to `x-symbol-token-input', it will not insert the space."
:active (and x-symbol-mode (not buffer-read-only))]
["tex: Remove Braces around Letters" x-symbol-tex-xdecode-old
:active (and x-symbol-mode (not buffer-read-only))]))
- "Extra menu entries for language `tex'.")
+ "Extra menu entries in menu for language `tex'.
+See language access `x-symbol-LANG-extra-menu-items'.")
(defvar x-symbol-tex-token-grammar
'(x-symbol-make-grammar
@@ -146,7 +151,8 @@ according to `x-symbol-token-input', it will not insert the space."
:input-spec x-symbol-tex-token-input
:token-list x-symbol-tex-default-token-list
:after-init x-symbol-tex-after-init-language)
- "Token grammar for language `tex'.")
+ "Grammar of token language `tex'.
+See language access `x-symbol-LANG-token-grammar'.")
;; The following vars could be made customizable, but it would not be a good
;; idea if different users have a different decode behavior:
@@ -167,7 +173,8 @@ The regexp should also match the surrounding braces.")
"User table defining TeX macros, used in `x-symbol-tex-table'.")
(defvar x-symbol-tex-generated-data nil
- "Internal.")
+ "Generated data for token language `tex'.
+See language access `x-symbol-LANG-generated-data'.")
;;;===========================================================================
@@ -175,8 +182,8 @@ The regexp should also match the surrounding braces.")
;;;===========================================================================
(defcustom x-symbol-tex-master-directory 'x-symbol-tex-default-master-directory
- "Function returning the directory of the master file or nil.
-See `x-symbol-image-parse-buffer'."
+ "Specification of the master directory for images for language `tex'.
+See language access `x-symbol-LANG-master-directory'."
:group 'x-symbol-tex
:group 'x-symbol-image-language
:type 'function)
@@ -193,15 +200,15 @@ See `x-symbol-image-parse-buffer'."
(member (setq dir (file-name-as-directory dir)) result)
(push dir result))))
(nreverse (if (member "./" result) result (cons "./" result))))
- "Search path used for implicitly relative image file names.
-See `x-symbol-image-use-remote'."
+ "Search path for implicitly relative image file names.
+See language access `x-symbol-LANG-image-searchpath'."
:group 'x-symbol-tex
:group 'x-symbol-image-language
:type '(repeat directory))
(defcustom x-symbol-tex-image-cached-dirs '("figures/")
- "Directory parts of image file names stored in the memory cache.
-See `x-symbol-image-use-remote'."
+ "Directory parts of images stored in the memory cache.
+See language access `x-symbol-LANG-image-cached-dirs'."
:group 'x-symbol-tex
:group 'x-symbol-image-language
:type '(repeat string))
@@ -213,8 +220,8 @@ See `x-symbol-image-use-remote'."
("\\\\e?psfig[ \t]*{file=\\([^ \t\n,{}]+\\.e?ps\\)[^\n{}]*}" 1)
("\\\\includegraphics\\*?[ \t]*\\(\\[[^][\n]*\\]\\)?\\(\\[[^][\n]*\\]\\)?{\\([^ \t\n,{}]+\\)}" 3 ".\\.[^./]+\\'" ".eps")
("\\\\input[ \t]*{\\([^ \t\n,{}]+\\.pstex\\)_t}" 1))
- "Keywords used to find image insertion commands.
-See `x-symbol-image-parse-buffer'."
+ "Keywords for image insertion commands of language `tex'.
+See language access `x-symbol-LANG-image-keywords'."
:group 'x-symbol-tex
:group 'x-symbol-image-language
:type 'x-symbol-image-keywords)
@@ -224,15 +231,16 @@ See `x-symbol-image-parse-buffer'."
;;; Super- and Subscripts
;;;===========================================================================
-(defcustom x-symbol-tex-invisible-braces nil
- "TODO"
+(defcustom x-symbol-tex-subscript-matcher 'x-symbol-tex-subscript-matcher
+ "Function matching super-/subscripts for language `tex'.
+See language access `x-symbol-LANG-subscript-matcher'."
:group 'x-symbol-tex
- :type 'boolean)
+ :type 'function)
-(defcustom x-symbol-tex-subscript-matcher 'x-symbol-tex-subscript-matcher
+(defcustom x-symbol-tex-invisible-braces nil
"TODO"
:group 'x-symbol-tex
- :type 'function)
+ :type 'boolean)
(defcustom x-symbol-tex-font-lock-allowed-faces
'(tex-math-face
@@ -303,8 +311,8 @@ Used in `x-symbol-tex-class-face-alist'."
(user "user" (x-symbol-emph-info-face))
(VALID "unknown TeX class" (x-symbol-emph-info-face))
(INVALID "no TeX macro" (x-symbol-emph-info-face)))
- "Alist for TeX's token classes displayed by info in echo area.
-See `x-symbol-language-access-alist' for details."
+ "Token classes displayed by info in echo area, for language `tex'.
+See language access `x-symbol-LANG-class-alist'."
:group 'x-symbol-tex
:group 'x-symbol-info-strings
:type 'x-symbol-class-info)
@@ -312,8 +320,8 @@ See `x-symbol-language-access-alist' for details."
(defcustom x-symbol-tex-class-face-alist
'((math x-symbol-tex-math-face (x-symbol-tex-math-face))
(text x-symbol-tex-text-face (x-symbol-tex-text-face)))
- "Alist for TeX's color scheme in TeX's grid and info.
-See `x-symbol-language-access-alist' for details."
+ "Color scheme in language specific grid and info, for language `tex'.
+See language access `x-symbol-LANG-class-face-alist'."
:group 'x-symbol-tex
:group 'x-symbol-input-init
:group 'x-symbol-info-general
@@ -409,7 +417,8 @@ as default value for `x-symbol-tex-electric-ignore'."
;;;===========================================================================
(defvar x-symbol-tex-required-fonts nil
- "List of features providing fonts for language `tex'.")
+ "Features providing required fonts for language `tex'.
+See language access `x-symbol-LANG-required-fonts'.")
(defvar x-symbol-tex-latin1-table
'((nobreakspace (space) . "\\nobreakspace")
@@ -881,9 +890,10 @@ as default value for `x-symbol-tex-electric-ignore'."
x-symbol-tex-latinN-table
x-symbol-tex-xsymb0-table
x-symbol-tex-xsymb1-table)
- "Complete table defining TeX macros.
-Use `x-symbol-tex-user-table' to define/shadow private TeX macros.
-See `x-symbol-init-language' and `x-symbol-tex-token-list'.")
+ "Table defining `tex' tokens for the characters.
+See language access `x-symbol-LANG-table'. Use
+`x-symbol-tex-user-table' to define private TeX macros or shadow
+existing ones.")
;;;===========================================================================
@@ -1025,14 +1035,14 @@ See `x-symbol-init-language' and `x-symbol-tex-token-list'.")
;; here instead using an complicated regexp for the main search
(when (looking-at " [A-Za-z]\\|{}")
(goto-char (setq end (match-end 0)))
- (when (setq token (buffer-substring beg end)
- token (symbol-value
- (intern-soft (buffer-substring beg end)
- decode-obarray)))
- (goto-char end)
- (insert-before-markers (gethash (car token)
- x-symbol-cstring-table))
- (delete-region beg end))))))))
+ (when (setq token (symbol-value
+ (intern-soft (buffer-substring beg end)
+ decode-obarray)))
+ (unless (x-symbol-decode-unique-test token unique)
+ (goto-char end)
+ (insert-before-markers (gethash (car token)
+ x-symbol-cstring-table))
+ (delete-region beg end)))))))))
(defun x-symbol-tex-token-input (input-regexp decode-obarray command-char)
(let ((res (x-symbol-match-token-before
diff --git a/x-symbol/lisp/x-symbol-texi.el b/x-symbol/lisp/x-symbol-texi.el
index cad7885a..79fceeee 100644
--- a/x-symbol/lisp/x-symbol-texi.el
+++ b/x-symbol/lisp/x-symbol-texi.el
@@ -1,10 +1,10 @@
;;; x-symbol-texi.el --- token language "TeXinfo command" for package x-symbol
-;; Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
;;
;; Author: Christoph Wedler <wedler@users.sourceforge.net>
;; Maintainer: (Please use `M-x x-symbol-package-bug' to contact the maintainer)
-;; Version: 4.4.X
+;; Version: 4.5
;; Keywords: WYSIWYG, TeXinfo, wp, internationalization
;; X-URL: http://x-symbol.sourceforge.net/
@@ -39,13 +39,15 @@
;;;===========================================================================
(defcustom x-symbol-texi-auto-style '(t nil nil nil nil nil)
- "TODO"
+ "Values for X-Symbol's buffer-local variables with language `texi'.
+See language access `x-symbol-LANG-auto-style'."
:group 'x-symbol-texi
:group 'x-symbol-mode
:type 'x-symbol-auto-style)
(defcustom x-symbol-texi-modeline-name "texi"
- "*String naming the language TeXinfo in the modeline."
+ "Modeline name of token language `texi'.
+See language access `x-symbol-LANG-modeline-name'."
:group 'x-symbol-texi
:type 'string)
@@ -58,14 +60,15 @@
("Circumflex, Caron" circumflex caron)
("Diaeresis, Umlaut" diaeresis hungarumlaut)
("Acute, Grave" acute grave))
- "*If non-nil, used in TeXinfo specific grid/menu.
-See `x-symbol-header-groups-alist'."
+ "Header/submenu specification of the specific menu for language `texi'.
+See language access `x-symbol-LANG-header-groups-alist'."
:group 'x-symbol-texi
:group 'x-symbol-input-init
:type 'x-symbol-headers)
(defcustom x-symbol-texi-electric-ignore nil
- "*Additional TeXinfo version of `x-symbol-electric-ignore'."
+ "Specification restricting input method ELECTRIC with language `texi'.
+See language access `x-symbol-LANG-electric-ignore'."
:group 'x-symbol-texi
:group 'x-symbol-input-control
:type 'x-symbol-function-or-regexp)
@@ -77,15 +80,15 @@ See `x-symbol-header-groups-alist'."
(no-code "not as code" (x-symbol-emph-info-face))
(VALID "unknown TeXinfo command" (x-symbol-emph-info-face))
(INVALID "no TeXinfo command" (x-symbol-emph-info-face)))
- "Alist for TeXinfo's token classes displayed by info in echo area.
-See `x-symbol-language-access-alist' for details."
+ "Token classes displayed by info in echo area, for language `texi'.
+See language access `x-symbol-LANG-class-alist'."
:group 'x-symbol-texi
:group 'x-symbol-info-strings
:type 'x-symbol-class-info)
(defcustom x-symbol-texi-class-face-alist nil
- "Alist for TeXinfo's color scheme in TeXinfo's grid and info.
-See `x-symbol-language-access-alist' for details."
+ "Color scheme in language specific grid and info, for language `texi'.
+See language access `x-symbol-LANG-class-face-alist'."
:group 'x-symbol-texi
:group 'x-symbol-input-init
:group 'x-symbol-info-general
@@ -98,13 +101,15 @@ See `x-symbol-language-access-alist' for details."
:decode-regexp
"@\\(?:[A-Za-z]+{[A-Za-z]?}\\|[{}]\\|[~^\"'`][A-Za-z]\\|,{[A-Za-z]}\\)"
:decode-spec (?@))
- "Token grammar for language `texi'.")
+ "Grammar of token language `texi'.
+See language access `x-symbol-LANG-token-grammar'.")
(defvar x-symbol-texi-user-table nil
"User table defining TeXinfo commands, used in `x-symbol-texi-table'.")
(defvar x-symbol-texi-generated-data nil
- "Internal.")
+ "Generated data for token language `texi'.
+See language access `x-symbol-LANG-generated-data'.")
;;;===========================================================================
@@ -325,9 +330,10 @@ See `x-symbol-language-access-alist' for details."
x-symbol-texi-latin1-table
x-symbol-texi-latinN-table
x-symbol-texi-xsymbX-table)
- "Complete table defining TeXinfo commands.
-Use `x-symbol-texi-user-table' to define/shadow private TeXinfo commands.
-See `x-symbol-init-language' and `x-symbol-texi-token-list'.")
+ "Table defining `texi' tokens for the characters.
+See language access `x-symbol-LANG-table'. Use
+`x-symbol-texi-user-table' to define private TeXinfo commands or shadow
+existing ones.")
;;; Local IspellPersDict: .ispell_xsymb
;;; x-symbol-texi.el ends here
diff --git a/x-symbol/lisp/x-symbol-vars.el b/x-symbol/lisp/x-symbol-vars.el
index fae76fb1..3fc3358c 100644
--- a/x-symbol/lisp/x-symbol-vars.el
+++ b/x-symbol/lisp/x-symbol-vars.el
@@ -4,7 +4,7 @@
;;
;; Author: Christoph Wedler <wedler@users.sourceforge.net>
;; Maintainer: (Please use `M-x x-symbol-package-bug' to contact the maintainer)
-;; Version: 4.4.X
+;; Version: 4.5.X
;; Keywords: WYSIWYG, LaTeX, HTML, wp, math, internationalization
;; X-URL: http://x-symbol.sourceforge.net/
@@ -37,7 +37,7 @@
(require 'x-symbol-hooks)
(eval-when-compile (require 'cl))
-(defconst x-symbol-version "4.4.5g"
+(defconst x-symbol-version "4.5.1"
"Current development version of package X-Symbol.
Check <http://x-symbol.sourceforge.net/> for the newest.")
@@ -147,19 +147,140 @@ Check <http://x-symbol.sourceforge.net/> for the newest.")
(sexp :tag "Super/subscripts (eval'd)")
(sexp :tag "Show images (eval'd)")))
-(defconst x-symbol-name 'stringp
- "Variable used to document a language access.
-For each token language LANG, `x-symbol-LANG-name' contains the long
-name of the token language LANG. See `x-symbol-register-language'.")
-(defconst x-symbol-modes 'listp
- "Variable used to document a language access.
-For each token language LANG, `x-symbol-LANG-modes' contains the major
-modes of buffer which will typically use X-Symbol with token language
-LANG. See `x-symbol-register-language'.")
+;;;===========================================================================
+;;; Custom widgets, general
+;;;===========================================================================
+
+;; Shouldn't this be generally a useful widget type?
+(define-widget 'x-symbol-command 'function
+ "A lisp command."
+ :prompt-match 'commandp
+ :tag "Command")
+
+(define-widget 'x-symbol-charsym 'symbol
+ "X-Symbol charsym."
+ :tag "X-Symbol charsym")
+
+(define-widget 'x-symbol-group 'symbol
+ "X-Symbol charsym group."
+ :tag "Charsym group")
+
+(define-widget 'x-symbol-coding 'choice
+ "X-Symbol 8bit character coding."
+ :tag "8bit coding"
+ :args '((const iso-8859-1)
+ (const iso-8859-2)
+ (const iso-8859-3)
+ (const iso-8859-9)
+ (const iso-8859-15)))
+
+(define-widget 'x-symbol-function-or-regexp 'choice
+ "Function or regexp, see `x-symbol-call-function-or-regexp'."
+ :args '((const :tag "None" nil) regexp function))
+
+(define-widget 'x-symbol-fancy-spec 'repeat
+ "X-Symbol specification for fancy strings, without string."
+ :args '((group :value (0 -1 x-symbol-info-face)
+ (option (group :inline t :extra-offset -4
+ :value (0 -1)
+ (integer :tag "From")
+ (option (integer :tag "To" :value -1))))
+ (repeat :tag "Faces" :inline t (face :tag "Face")))))
-(defconst x-symbol-auto-style nil
- "Variable used to document a language access.
+(define-widget 'x-symbol-fancy 'cons
+ "X-Symbol specification for fancy strings, with string."
+ :args '(string (x-symbol-fancy-spec :tag "Face specifications")))
+
+
+;;;===========================================================================
+;;; Custom simple, special
+;;;===========================================================================
+
+(define-widget 'x-symbol-auto-coding 'repeat
+ "X-Symbol automatic coding control."
+ :args '((cons :format "%v"
+ regexp
+ (choice x-symbol-coding
+ (cons :tag "Depending on"
+ (integer :tag "Match")
+ (repeat (cons :format "%v"
+ (string :tag "Key")
+ x-symbol-coding)))))))
+
+(define-widget 'x-symbol-headers 'repeat
+ "Headers for grid and menu."
+ :args '((cons :format "%v"
+ (string :tag "Header")
+ (repeat x-symbol-group))))
+
+(define-widget 'x-symbol-class-info 'repeat
+ "Definitions for X-Symbol token language classes."
+ :args '((cons :format "%v"
+ (symbol :tag "Token class" :value VALID)
+ (choice (const :tag "No info" nil)
+ (x-symbol-fancy :tag "Info")))))
+
+(define-widget 'x-symbol-class-faces 'repeat
+ "Definitions for X-Symbol token language classes."
+ :args '((list :format "%v"
+ (symbol :tag "Token class")
+ (face :tag "Face in grid" :value default)
+ (x-symbol-fancy-spec :inline t
+ :tag "Faces for tokens in info"))))
+
+(define-widget 'x-symbol-image-keywords 'cons
+ "Format of image keywords"
+ :args '((regexp :tag "Regexp matching all image files")
+ (repeat
+ (list :format "%v"
+ :value ("IMAGE \"\\([A-Za-z0-9]\\)\"" 1)
+ regexp
+ (option (function :match (lambda (widget arg)
+ (and arg (symbolp arg)))
+ :value x-symbol-image-default-file-name))
+ (repeat :inline t :tag "Arguments" sexp)))))
+
+
+;;;===========================================================================
+;;; custom set function
+;;;===========================================================================
+
+(defconst x-symbol-cache-variables '(x-symbol-fancy-value-cache
+ x-symbol-charsym-info-cache
+ x-symbol-charsym-info-cache
+ x-symbol-language-info-caches
+ x-symbol-coding-info-cache
+ x-symbol-keys-info-cache)
+ "Internal. Cache variables.")
+
+;; TODO: not used anymore (would prevent files to be compilable w/o X-Symbol
+(defun x-symbol-set-cache-variable (var value)
+ "Set VAR's value to VALUE.
+Custom set function of variables for fancy strings."
+ (set var value)
+ (dolist (cache x-symbol-cache-variables)
+ (and (boundp cache) (set cache nil))))
+
+
+;;;===========================================================================
+;;; Language Accesses
+;;;===========================================================================
+
+(defconst x-symbol-LANG-name "Token Language"
+ "Language access: standard name of the token language.
+For each token language LANG, `x-symbol-LANG-name' is a string with the
+standard name of the token language LANG. See
+`x-symbol-register-language'.")
+
+(defconst x-symbol-LANG-modes '(major-mode-1 major-mode-2)
+ "Language access: major modes typically using the token language.
+For each token language LANG, `x-symbol-LANG-modes' is a list of major
+modes of buffers which will typically use X-Symbol with token language
+LANG. See `x-symbol-register-language' and `x-symbol-mode'.")
+
+(defconst x-symbol-LANG-auto-style '(t nil nil nil nil nil)
+ "Language access: values for X-Symbol's buffer-local variables.
For each token language LANG, `x-symbol-LANG-auto-style' determines how
to set X-Symbol specific buffer-local variables if these variables do
not already have a buffer-local value.
@@ -168,9 +289,9 @@ A value of such a language access looks like
(MODE-ON CODING 8BITS UNIQUE SUBSCRIPTS IMAGE)
If `x-symbol-mode' is not already buffer-local, MODE-ON determines
-whether to turn the mode on if \\[x-symbol-mode] is called with a cons
-as prefix argument. CODING, 8BITS, UNIQUE, SUBSCRIPTS and IMAGE are
-used to set `x-symbol-coding', `x-symbol-8bits', `x-symbol-unique',
+whether to turn the mode on with `turn-on-x-symbol-conditionally'.
+CODING, 8BITS, UNIQUE, SUBSCRIPTS and IMAGE are used to set
+`x-symbol-coding', `x-symbol-8bits', `x-symbol-unique',
`x-symbol-subscripts' and `x-symbol-image' if these values are not
already buffer-local.
@@ -212,18 +333,23 @@ Users might prefer to customize `x-symbol-auto-style-alist' instead.")
;; :inline t :extra-offset -4
;; (sexp :tag "Show images (eval'd)"))))))))))))))
-;; `x-symbol-modeline-name' is also variable
+(defcustom x-symbol-LANG-modeline-name "lang"
+ "Language access: modeline name of the token language.
+For each token language LANG, `x-symbol-LANG-modeline-name' is a
+string with the name of the token language LANG in the modeline."
+ :group 'x-symbol-miscellaneous
+ :type 'string)
-(defconst x-symbol-required-fonts 'listp
- "Variable used to document a language access.
-For each token language LANG, optional `x-symbol-LANG-required-fonts'
-contains the features which are required for the tokens of language
-LANG.")
+(defconst x-symbol-LANG-required-fonts nil
+ "Language access: features providing required fonts.
+For each token language LANG, `x-symbol-LANG-required-fonts' is a list
+of features which are required for the tokens of language LANG.")
-(defconst x-symbol-token-grammar 'x-symbol-make-grammar
- "Variable used to document a language access.
-For each token language LANG, `x-symbol-LANG-token-grammar' contains the
-grammar of the language LANG. The value looks like
+(defconst x-symbol-LANG-token-grammar
+ '(x-symbol-make-grammar :decode-regexp "&[#0-9A-Za-z]+;")
+ "Language access: grammar of token language.
+For each token language LANG, `x-symbol-LANG-token-grammar' describes
+the grammar of the language LANG. The value looks like
(x-symbol-make-grammar
:token-list TOKEN-LIST
:after-init AFTER-INIT
@@ -287,65 +413,89 @@ matches the character before the position. In AFTER, each REGEXP
matches the buffer contents directly following the position, except in
INPUT-SPEC.")
-(defconst x-symbol-generated-data 'null
- "Variable used to document a generated language access.
-For each token language LANG, `x-symbol-LANG-generated-data' contains
-various generated data for a token language, like the conversion
+(defconst x-symbol-LANG-generated-data nil
+ "Language access: generated data for token language.
+For each token language LANG, `x-symbol-LANG-generated-data' is used to
+store various generated data for a token language, like the conversion
tables.")
-(defconst x-symbol-table 'consp
- "Variable used to document a language access.
-For each token language LANG, `x-symbol-LANG-table' defines the tokens
-for the characters with its token classes etc. Each element in TABLE
-looks like \(CHARSYM CLASSES . TOKEN-SPEC) or nil.\
+(defconst x-symbol-LANG-table '((adiaeresis () "&auml;"))
+ "Language access: table defining tokens for the characters.
+For each token language LANG, `x-symbol-LANG-table' is a list with
+elements defining the tokens for the characters with its token classes
+etc. Each element in TABLE looks like
+
+ \(CHARSYM CLASSES . TOKEN-SPEC) or nil.
CHARSYM is the charsym of the character which represents the tokens
defined via TOKEN-SPEC, see also TOKEN-LIST in language access
-`x-symbol-token-grammar'. CLASSES are the token classes of the
+`x-symbol-LANG-token-grammar'. CLASSES are the token classes of the
character.")
-;; `x-symbol-header-groups-alist' is also a variable
+(defconst x-symbol-LANG-header-groups-alist nil
+ "Language access: header/submenu specification for characters.
+For each token language LANG, `x-symbol-LANG-header-groups-alist', if
+non-nil, is used instead `x-symbol-header-groups-alist' to specify the
+structure of language specific grid and menu.")
+
+(defconst x-symbol-LANG-class-alist
+ '((VALID "Language Token" (x-symbol-info-face))
+ (INVALID "no Language Token" (x-symbol-emph-info-face)))
+ "Language access: token classes displayed by info in echo area.
+For each token language LANG, `x-symbol-LANG-class-alist' is a list of
+token class specifications used for the info in the echo area, see
+`x-symbol-character-info'. Each element looks like
+
+ \(CLASS . SPEC)
-(defconst x-symbol-class-alist 'listp
- "Variable used to document a language access.
-For each token language LANG, `x-symbol-LANG-class-alist' is used for
-the info in the echo area, see `x-symbol-character-info'. Each element
-looks like \(CLASS . SPEC) where CLASS is a valid token class, see
-`x-symbol-init-language' and SPEC is used according to
-`x-symbol-fancy-string'. You should define entries for the CLASSes
-`VALID' and `INVALID'.")
+where CLASS is a valid token class, see `x-symbol-init-language' and
+SPEC is used according to `x-symbol-fancy-string'. You should define
+entries for the CLASSes `VALID' and `INVALID'.")
-(defconst x-symbol-class-face-alist 'listp
- "Variable used to document an language access.
+(defconst x-symbol-LANG-class-face-alist nil
+ "Language access: color scheme in language specific grid and info.
For each token language LANG, `x-symbol-LANG-class-face-alist' is used
for the color scheme in the language dependent grid and token info.
-Each element looks like \(CLASS FACE . FACE-SPECS) where CLASS is a
-valid token class, FACE is used for the character in the grid, and
-FACE-SPECS is used according to `x-symbol-fancy-string'.")
-
-;; `x-symbol-electric-ignore' is also a variable
-
-(defconst x-symbol-extra-menu-items 'listp
- "Variable used to document a language access.
-For each token language LANG, `x-symbol-LANG-extra-menu-items' define
-extra menu items to be used in the language specific menu. It contains
-elements of the form \(SUBMENU ITEM...) where SUBMENU is either
-\"Conversion\" or \"Other Commands\", the ITEMs are additional menu
-items at the end of the corresponding submenu.")
-
-(defvar x-symbol-subscript-matcher nil
- "Internal. Variable used to document a language access.
+Each element looks like
+
+ \(CLASS FACE . FACE-SPECS)
+
+where CLASS is a valid token class, FACE is used for the character in
+the grid, and FACE-SPECS is used according to `x-symbol-fancy-string'.")
+
+(defconst x-symbol-LANG-electric-ignore nil
+ "Language access: specification restricting input method ELECTRIC.
+For each token language LANG, `x-symbol-LANG-electric-ignore' is used
+additionaly to `x-symbol-electric-ignore' to match contexts/charsyms to
+be ignored by input method ELECTRIC.
+
+The value is nil, a regexp matching contexts not to be replaced, or a
+function valled with arguments CONTEXT and CHARSYM, which should return
+non-nil if the context should not be replaced by the character for
+CHARSYM.")
+
+(defconst x-symbol-LANG-extra-menu-items nil
+ "Language access: extra menu items in language specific menu.
+For each token language LANG, `x-symbol-LANG-extra-menu-items' defines
+extra menu items to be used in the language specific menu. Its value is
+a list of elements in the form \(SUBMENU ITEM...) where SUBMENU is
+either \"Conversion\" or \"Other Commands\", the ITEMs are additional
+menu items at the end of the corresponding submenu.")
+
+(defconst x-symbol-LANG-subscript-matcher nil
+ "Language access: function matching super-/subscripts.
For each token language LANG, `x-symbol-LANG-subscript-matcher', if
-non-nil, contains a matcher function for font-lock. It should return
-nil for no match, `x-symbol-sup-face'/`x-symbol-sub-face' for a
-super-/subscript match. The `match-date' should have three regexp
-groups: group 1 for the open command, group 2 for the contents, and
-group 3 for the close command.")
+non-nil, is a matcher function for font-lock. It should return nil for
+no match, `x-symbol-sup-face'/`x-symbol-sub-face' for a super-/subscript
+match. The `match-date' should have three regexp groups: group 1 for
+the open command, group 2 for the contents, and group 3 for the close
+command.")
-(defconst x-symbol-image-keywords 'listp
- "Variable used to document a language access.
-For each token language LANG, `x-symbol-LANG-image-keywords' contains
-the value \(IMAGE-REGEXP KEYWORD ...).
+(defconst x-symbol-LANG-image-keywords nil
+ "Language access: keywords for image insertion commands.
+For each token language LANG, `x-symbol-LANG-image-keywords' is a list
+
+ \(IMAGE-REGEXP KEYWORD...).
IMAGE-REGEXP should match all images files and is used to initialize the
buffer local memory cache, see `x-symbol-image-init-memory-cache'.
@@ -356,138 +506,25 @@ commands matched by REGEXP are highlighted. FUNCTION, which defaults to
name of the corresponding image file. If FUNCTION returns nil, the
command is not highlighted. See `x-symbol-image-parse-buffer'.")
-(defconst x-symbol-master-directory 'functionp
- "Variable used to document a language access.
-For each token language LANG, `x-symbol-LANG-master-directory' contains
-a function which returns the directory of the master file, see
-`x-symbol-image-parse-buffer'.")
-
-(defconst x-symbol-image-searchpath 'listp
- "Variable used to document a language access.
-For each token language LANG, `x-symbol-LANG-image-searchpath' contains
-the search path for implicitly relative image file names, i.e., a list
-of relative directories. See x-symbol-image-use-remote'.")
-
-(defconst x-symbol-image-cached-dirs 'listp
- "Variable used to document a language access.
-For each token language LANG, `x-symbol-LANG-image-cached-dirs' contains
-a list of directory parts of image file names stored in the memory
-cache. See `x-symbol-image-use-remote'.")
-
-
-;;;===========================================================================
-;;; Custom widgets, general
-;;;===========================================================================
-
-;; Shouldn't this be generally a useful widget type?
-(define-widget 'x-symbol-command 'function
- "A lisp command."
- :prompt-match 'commandp
- :tag "Command")
-
-(define-widget 'x-symbol-charsym 'symbol
- "X-Symbol charsym."
- :tag "X-Symbol charsym")
-
-(define-widget 'x-symbol-group 'symbol
- "X-Symbol charsym group."
- :tag "Charsym group")
-
-(define-widget 'x-symbol-coding 'choice
- "X-Symbol 8bit character coding."
- :tag "8bit coding"
- :args '((const iso-8859-1)
- (const iso-8859-2)
- (const iso-8859-3)
- (const iso-8859-9)
- (const iso-8859-15)))
-
-(define-widget 'x-symbol-function-or-regexp 'choice
- "Function or regexp, see `x-symbol-call-function-or-regexp'."
- :args '((const :tag "None" nil) regexp function))
+(defconst x-symbol-LANG-master-directory nil
+ "Language access: specification of the master directory for images.
+For each token language LANG, `x-symbol-LANG-master-directory', if
+non-nil, is a function which returns the directory of the master file,
+see `x-symbol-image-parse-buffer'.")
-(define-widget 'x-symbol-fancy-spec 'repeat
- "X-Symbol specification for fancy strings, without string."
- :args '((group :value (0 -1 x-symbol-info-face)
- (option (group :inline t :extra-offset -4
- :value (0 -1)
- (integer :tag "From")
- (option (integer :tag "To" :value -1))))
- (repeat :tag "Faces" :inline t (face :tag "Face")))))
+(defconst x-symbol-LANG-image-searchpath nil
+ "Language access: search path for implicitly relative image file names.
+For each token language LANG, `x-symbol-LANG-image-searchpath' is a list
+of directories which are checked if the image file name is implicitly
+relative. Relative directories are relative to the directory returned
+by the language access `x-symbol-LANG-master-directory'. See
+`x-symbol-image-use-remote'.")
-(define-widget 'x-symbol-fancy 'cons
- "X-Symbol specification for fancy strings, with string."
- :args '(string (x-symbol-fancy-spec :tag "Face specifications")))
-
-
-;;;===========================================================================
-;;; Custom simple, special
-;;;===========================================================================
-
-(define-widget 'x-symbol-auto-coding 'repeat
- "X-Symbol automatic coding control."
- :args '((cons :format "%v"
- regexp
- (choice x-symbol-coding
- (cons :tag "Depending on"
- (integer :tag "Match")
- (repeat (cons :format "%v"
- (string :tag "Key")
- x-symbol-coding)))))))
-
-(define-widget 'x-symbol-headers 'repeat
- "Headers for grid and menu."
- :args '((cons :format "%v"
- (string :tag "Header")
- (repeat x-symbol-group))))
-
-(define-widget 'x-symbol-class-info 'repeat
- "Definitions for X-Symbol token language classes."
- :args '((cons :format "%v"
- (symbol :tag "Token class" :value VALID)
- (choice (const :tag "No info" nil)
- (x-symbol-fancy :tag "Info")))))
-
-(define-widget 'x-symbol-class-faces 'repeat
- "Definitions for X-Symbol token language classes."
- :args '((list :format "%v"
- (symbol :tag "Token class")
- (face :tag "Face in grid" :value default)
- (x-symbol-fancy-spec :inline t
- :tag "Faces for tokens in info"))))
-
-(define-widget 'x-symbol-image-keywords 'cons
- "Format of image keywords"
- :args '((regexp :tag "Regexp matching all image files")
- (repeat
- (list :format "%v"
- :value ("IMAGE \"\\([A-Za-z0-9]\\)\"" 1)
- regexp
- (option (function :match (lambda (widget arg)
- (and arg (symbolp arg)))
- :value x-symbol-image-default-file-name))
- (repeat :inline t :tag "Arguments" sexp)))))
-
-
-;;;===========================================================================
-;;; custom set function
-;;;===========================================================================
-
-(defconst x-symbol-cache-variables '(x-symbol-fancy-value-cache
- x-symbol-charsym-info-cache
- x-symbol-charsym-info-cache
- x-symbol-language-info-caches
- x-symbol-coding-info-cache
- x-symbol-keys-info-cache)
- "Internal. Cache variables.")
-
-;; TODO: not used anymore (would prevent files to be compilable w/o X-Symbol
-(defun x-symbol-set-cache-variable (var value)
- "Set VAR's value to VALUE.
-Custom set function of variables for fancy strings."
- (set var value)
- (dolist (cache x-symbol-cache-variables)
- (and (boundp cache) (set cache nil))))
+(defconst x-symbol-LANG-image-cached-dirs nil
+ "Language access: directory parts of images stored in the memory cache.
+For each token language LANG, `x-symbol-LANG-image-cached-dirs' is a
+list of directory parts of image file names stored in the memory cache.
+See `x-symbol-image-use-remote'.")
;;;===========================================================================
@@ -551,9 +588,8 @@ quite annoying, the following conditions must be fulfilled:
* Contexts matched by a global or a token language dependent regexp are
not replaced. Functions can also be used to prevent a context to be
replaced by a character. E.g., with language \"TeX macro\", only
- replace \"->\" by \\to if we are in TeX's math mode (using library
- texmathp by Carsten Dominik). See `x-symbol-context-ignore' and
- `x-symbol-electric-ignore'."
+ replace \"->\" by \\to if we are in TeX's math mode (using texmathp).
+ See `x-symbol-context-ignore' and `x-symbol-electric-ignore'."
:group 'x-symbol-input-control
:type 'boolean)
@@ -671,11 +707,9 @@ before point. See also `x-symbol-character-info'."
;;; Texts, Modeline appearance
;;;===========================================================================
-(defcustom x-symbol-modeline-name "none"
- "*String naming the pseudo language \"x-symbol charsym\" in the modeline.
-
-For each token language LANG, `x-symbol-LANG-modeline-name' contains a
-string naming LANG in the modeline."
+(defcustom x-symbol-charsym-modeline-name "none"
+ "Modeline name of the pseudo language x-symbol charsym.
+See language access `x-symbol-LANG-modeline-name'."
:group 'x-symbol-miscellaneous
:type 'string)
@@ -713,6 +747,7 @@ The elements look like (CODING . NAME) where CODING is a valid value for
(iso-8859-15 . "-l9")
(info . "-i")
(error . "-err"))
+ ;; TODO: describe none, info, error
"*Alist of codings with their names in the modeline.
The elements look like (CODING . NAME) where CODING is a valid value for
`x-symbol-coding' and NAME is used by `x-symbol-coding-modeline-text'."
@@ -721,7 +756,7 @@ The elements look like (CODING . NAME) where CODING is a valid value for
(defcustom x-symbol-modeline-state-list
'(" XS:"
- (x-symbol-modeline-name . x-symbol-language-modeline-text)
+ (x-symbol-language . x-symbol-language-modeline-text)
(x-symbol-8bits "8")
(x-symbol-unique "*")
(x-symbol-coding . x-symbol-coding-modeline-text)
@@ -733,14 +768,14 @@ This function constructs `x-symbol-modeline-string' by concatenating the
result from the elements in this list. Each element looks like
SEPARATOR or
(VARIABLE NON-NIL . NIL) or
- (ARG . FUNCTION)
+ (VARIABLE . FUNCTION)
SEPARATOR is a string and is used directly, only use the first from two
consecutive SEPARATORs. If VARIABLE is non-nil, use NON-NIL, otherwise
NIL, both NON-NIL and NIL should be strings or nil. FUNCTION is called
-with argument ARG and should return a string or nil. Two SEPARATORs
-where all the elements in between return nil, are considered to be
-consecutive."
+with the value of VARIABLE as argument and should return a string or
+nil. Two SEPARATORs where all the elements in between return nil, are
+considered to be consecutive."
:group 'x-symbol-mode
:type '(repeat (choice (string :tag "Separator")
(cons :tag "Depending on variable"
@@ -755,6 +790,15 @@ consecutive."
(sexp :tag "With argument")
function))))
+;; Emacs only?
+(defcustom x-symbol-set-coding-system-if-undecided t ; TODO: nil?
+ "*If non-nil, set coding system if undecided when turning on X-Symbol.
+If this variable is non-nil, `x-symbol-default-coding' is non-nil, and
+`buffer-file-coding-system' specifies an undecided coding system, set
+`buffer-file-coding-system' according to `x-symbol-default-coding'."
+ :group 'x-symbol-mode
+ :type 'boolean)
+
;;;===========================================================================
;;; Minor mode control
@@ -1608,7 +1652,7 @@ See `x-symbol-latin5-cset' and `x-symbol-init-cset'.")
;; the normal helvetica font...
(defvar x-symbol-latin9-fonts
'("-vh-herilane%s-medium-r-normal-*-%d-*-*-*-*-*-iso8859-15")
- "Fonts with registry/encoding \"iso8859-1\".
+ "Fonts with registry/encoding \"iso8859-15\".
See `x-symbol-latin9-cset' and `x-symbol-init-cset'.")
(defvar x-symbol-xsymb0-fonts
@@ -1656,9 +1700,9 @@ cached image. See also `x-symbol-image-special-glyphs'."
(defcustom x-symbol-image-use-remote nil
"*If nil, only show glyphs which can be stored in the memory cache.
The memory cache stores glyphs for file names without directory part or
-a directory part in the language access `x-symbol-image-cached-dirs',
-e.g., it should contain \"images\", if \"images/mail.png\" should be
-stored in the memory cache.
+a directory part in the language access
+`x-symbol-LANG-image-cached-dirs', e.g., it should contain \"images\",
+if \"images/mail.png\" should be stored in the memory cache.
If this variable is nil, use `x-symbol-image-remote-glyph' for image
files not in the memory cache. If it is non-nil, try to find the image
@@ -1668,13 +1712,13 @@ since file accesses are necessary for every command.
When searching for the images file, all file names, including
directories in a search path, are relative to the return value of the
-function in language access `x-symbol-master-directory', value nil means
-function `default-directory'.
+function in language access `x-symbol-LANG-master-directory', value nil
+means function `default-directory'.
Implicitly relative file names, i.e., those which are neither absolute
nor are matched by `x-symbol-image-explicitly-relative-regexp', are
searched in the directories of language access
-`x-symbol-image-searchpath'."
+`x-symbol-LANG-image-searchpath'."
:group 'x-symbol-image-general
:type 'boolean)
diff --git a/x-symbol/lisp/x-symbol-xmacs.el b/x-symbol/lisp/x-symbol-xmacs.el
index 8e62d4b5..88a21be9 100644
--- a/x-symbol/lisp/x-symbol-xmacs.el
+++ b/x-symbol/lisp/x-symbol-xmacs.el
@@ -1,10 +1,10 @@
;;; x-symbol-xmacs.el --- make package x-symbol work with XEmacs
-;; Copyright (C) 1998-1999, 2001-2002 Free Software Foundation, Inc.
+;; Copyright (C) 1998-1999, 2001-2003 Free Software Foundation, Inc.
;;
;; Author: Christoph Wedler <wedler@users.sourceforge.net>
;; Maintainer: (Please use `M-x x-symbol-package-bug' to contact the maintainer)
-;; Version: 4.4.X
+;; Version: 4.5
;; Keywords: WYSIWYG, LaTeX, HTML, wp, math, internationalization
;; X-URL: http://x-symbol.sourceforge.net/
diff --git a/x-symbol/lisp/x-symbol.el b/x-symbol/lisp/x-symbol.el
index 4abb96dd..093fcc89 100644
--- a/x-symbol/lisp/x-symbol.el
+++ b/x-symbol/lisp/x-symbol.el
@@ -4,7 +4,7 @@
;;
;; Author: Christoph Wedler <wedler@users.sourceforge.net>
;; Maintainer: (Please use `M-x x-symbol-package-bug' to contact the maintainer)
-;; Version: 4.4.X
+;; Version: 4.5.X
;; Keywords: WYSIWYG, LaTeX, HTML, wp, math, internationalization
;; X-URL: http://x-symbol.sourceforge.net/
@@ -64,32 +64,37 @@
;;;===========================================================================
(defconst x-symbol-language-access-alist
- `((x-symbol-auto-style "auto-style" t listp) ; redefinition, TODO: optional is just temporary
- (x-symbol-modeline-name "modeline-name" nil stringp)
- (x-symbol-required-fonts "required-fonts" t listp)
- (x-symbol-token-grammar "token-grammar" nil
- ,(lambda (x)
- (or (vectorp x)
- (eq (car-safe x) 'x-symbol-make-grammar))))
+ `((x-symbol-LANG-auto-style "auto-style" t listp) ; redefinition, TODO: optional is just temporary
+ (x-symbol-LANG-modeline-name "modeline-name" nil stringp)
+ (x-symbol-LANG-required-fonts "required-fonts" t listp)
+ (x-symbol-LANG-token-grammar "token-grammar" nil
+ ,(lambda (x)
+ (or (vectorp x)
+ (eq (car-safe x)
+ 'x-symbol-make-grammar))))
;;(x-symbol-input-token-grammar "input-token-grammar" nil consp)
- (x-symbol-table "table" nil consp)
- (x-symbol-generated-data "generated-data" nil null)
+ (x-symbol-LANG-table "table" nil consp)
+ (x-symbol-LANG-generated-data "generated-data" nil null)
;; input methods
- (x-symbol-header-groups-alist "header-groups-alist" nil listp)
- (x-symbol-class-alist "class-alist" nil listp)
- (x-symbol-class-face-alist "class-face-alist" t listp)
- (x-symbol-electric-ignore "electric-ignore")
- (x-symbol-extra-menu-items "extra-menu-items" t listp)
+ (x-symbol-LANG-header-groups-alist "header-groups-alist" nil listp)
+ (x-symbol-LANG-class-alist "class-alist" nil listp)
+ (x-symbol-LANG-class-face-alist "class-face-alist" t listp)
+ (x-symbol-LANG-electric-ignore "electric-ignore")
+ (x-symbol-LANG-extra-menu-items "extra-menu-items" t listp)
;; super-/subscripts, images
- (x-symbol-subscript-matcher "subscript-matcher" t)
- (x-symbol-image-keywords "image-keywords" t listp)
- (x-symbol-master-directory "master-directory" x-symbol-image-keywords
- functionp)
- (x-symbol-image-searchpath "image-searchpath" x-symbol-image-keywords
- listp)
- (x-symbol-image-cached-dirs "image-cached-dirs" x-symbol-image-keywords
- listp))
+ (x-symbol-LANG-subscript-matcher "subscript-matcher" t)
+ (x-symbol-LANG-image-keywords "image-keywords" t listp)
+ (x-symbol-LANG-master-directory "master-directory"
+ x-symbol-LANG-image-keywords
+ functionp)
+ (x-symbol-LANG-image-searchpath "image-searchpath"
+ x-symbol-LANG-image-keywords
+ listp)
+ (x-symbol-LANG-image-cached-dirs "image-cached-dirs"
+ x-symbol-LANG-image-keywords
+ listp))
"Alist of token language dependent variable accesses.
+OUTDATED.
Each element looks like (ACCESS . SUFFIX) or (ACCESS MULE . NOMULE).
With the first form, the symbol of the LANGUAGE dependent variable is
`FEATURE-SUFFIX' where FEATURE is the value of LANGUAGE's symbol
@@ -410,16 +415,17 @@ accesses, see `x-symbol-language-access-alist'."
The returned value is (FACE . FACE-SPECS) where FACE is used for the
grid and FACE-SPECS for the token in the info. For the format of
FACE-SPECS, see `x-symbol-fancy-string'. The value depends on the first
-token class and the language access `x-symbol-class-face-alist'."
+token class and the language access `x-symbol-LANG-class-face-alist'."
(cdr (assq (car (gethash charsym
(x-symbol-generated-token-classes
(x-symbol-language-value
- 'x-symbol-generated-data language))))
- (x-symbol-language-value 'x-symbol-class-face-alist language))))
+ 'x-symbol-LANG-generated-data language))))
+ (x-symbol-language-value 'x-symbol-LANG-class-face-alist
+ language))))
(defun x-symbol-image-available-p ()
"Non-nil, if `x-symbol-image' can be set in current file."
- (and (x-symbol-language-value 'x-symbol-image-keywords)
+ (and (x-symbol-language-value 'x-symbol-LANG-image-keywords)
(null (file-remote-p default-directory))))
(defun x-symbol-default-context-info-ignore (context charsym)
@@ -472,7 +478,7 @@ If LANGUAGE is non-nil, the result looks like (TOKEN . MISC)."
x-symbol-fchar-tables)))))
(gethash charsym (x-symbol-generated-encode-table
(x-symbol-language-value
- 'x-symbol-generated-data
+ 'x-symbol-LANG-generated-data
(or language x-symbol-language)))))
(gethash charsym (cdr (assq (or (x-symbol-buffer-coding)
x-symbol-default-coding
@@ -563,7 +569,7 @@ When non-nil, use format string FORMAT."
"Return text for LANGUAGE, to be presented to the user.
LANGUAGE defaults to `x-symbol-language'. If LANGUAGE is nil, return
`x-symbol-charsym-name'. When non-nil, use format string FORMAT."
- (let ((text (or (x-symbol-language-value 'x-symbol-name language)
+ (let ((text (or (x-symbol-language-value 'x-symbol-LANG-name language)
x-symbol-charsym-name)))
(if format (format format text) text)))
@@ -587,15 +593,14 @@ otherwise just return text for CODING1."
(defun x-symbol-language-modeline-text (language)
"Return text for LANGUAGE, to be presented in the modeline."
- (or (and (setq language (and (boundp language) (symbol-value language)))
- (x-symbol-language-value 'x-symbol-modeline-name))
- x-symbol-modeline-name))
+ (if language
+ (x-symbol-language-value 'x-symbol-LANG-modeline-name language)
+ x-symbol-charsym-modeline-name))
(defun x-symbol-coding-modeline-text (coding)
- "Return text for symbol value of CODING, to be used in the modeline.
-Use association in `x-symbol-coding-modeline-alist' if value of CODING
-differs from `x-symbol-default-coding', \"\" otherwise."
- (setq coding (and (boundp coding) (symbol-value coding)))
+ "Return text for CODING, to be used in the modeline.
+Use association in `x-symbol-coding-modeline-alist' if CODING differs
+from `x-symbol-default-coding', \"\" otherwise."
(let ((buffer-coding (x-symbol-buffer-coding)))
(cdr (assq (cond ((null buffer-coding)
(if x-symbol-8bits 'error (if coding 'info 'none)))
@@ -743,7 +748,7 @@ package X-Symbol:
Thank you for trying package X-Symbol. If you have problems, please use
`M-x x-symbol-package-bug' to contact the maintainer. Do not assume
that I remember the contents of your message (appended to this reply)...
-er, I have actually deleted it.")
+err, I have actually deleted it.")
(goto-char (point-max))
(when (get-buffer " *gnus article copy*")
(newline)
@@ -794,11 +799,11 @@ which defaults to `x-symbol-exec-threshold'. Before decoding, decode
;; * Latin decode alists are ordered, see `x-symbol-init-latin-decoding'
;; * No part of the association is a KEY in the conversion alists
;; * Keys in conversion alists are ordered: long...short
- (let* ((grammar (x-symbol-language-value 'x-symbol-token-grammar))
+ (let* ((grammar (x-symbol-language-value 'x-symbol-LANG-token-grammar))
(decode-obarray (if x-symbol-language
(x-symbol-generated-decode-obarray
(x-symbol-language-value
- 'x-symbol-generated-data))))
+ 'x-symbol-LANG-generated-data))))
(buffer-coding (x-symbol-buffer-coding))
(unique (and x-symbol-unique t)))
;; TODO: recheck. Decode uniquely and do not decode to 8bit if current
@@ -854,7 +859,7 @@ which defaults to `x-symbol-exec-threshold'. Before decoding, decode
(intern-soft string
(x-symbol-generated-decode-obarray
(x-symbol-language-value
- 'x-symbol-generated-data))))))
+ 'x-symbol-LANG-generated-data))))))
(if token (gethash (car token) x-symbol-cstring-table)))))
(defun x-symbol-decode-lisp (contexts decode-regexp decode-obarray unique)
@@ -910,10 +915,10 @@ characters in `x-symbol-coding' or `x-symbol-default-coding' if
between START and END to BUFFER, make BUFFER current and do conversion
there. If BUFFER is non-nil, START and END must be buffer positions or
START is a string, see kludgy feature of `write-region'."
- (let ((grammar (x-symbol-language-value 'x-symbol-token-grammar))
+ (let ((grammar (x-symbol-language-value 'x-symbol-LANG-token-grammar))
(encode-table (x-symbol-generated-encode-table
(x-symbol-language-value
- 'x-symbol-generated-data)))
+ 'x-symbol-LANG-generated-data)))
(buffer-coding (x-symbol-buffer-coding))
(coding (if x-symbol-coding
(if (assq x-symbol-coding x-symbol-fchar-tables)
@@ -1007,7 +1012,7 @@ commands `x-symbol-encode' and `x-symbol-mode'.
Note that in most token languages, different tokens might be decoded to
the same character, e.g., \\neq and \\ne in `tex', &Auml\; and &#196\;
-in `sgml'!"
+in `sgml', see `x-symbol-unique'!"
(interactive (and (region-active-p) (list (region-beginning) (region-end))))
(unless x-symbol-language
(error "No token language which can be used for decoding"))
@@ -1029,6 +1034,10 @@ in `sgml'!"
;;;###autoload
(defun x-symbol-decode (&optional beg end)
+ "Decode all tokens in active region or buffer to characters.
+As opposed to `x-symbol-decode-recode', this function performs no
+recoding, i.e., `x-symbol-coding' is considered to have the value of
+`x-symbol-default-coding'."
(interactive (and (region-active-p) (list (region-beginning) (region-end))))
(if (or (null x-symbol-coding)
(eq x-symbol-coding x-symbol-default-coding))
@@ -1066,11 +1075,12 @@ encode 8bit characters. See also commands `x-symbol-decode' and
;;;###autoload
(defun x-symbol-encode (&optional beg end)
-;; "Encode all characters in active region or buffer to tokens.
-;;If called interactively and if the region is active, BEG and END are the
-;;boundaries of the region. BEG and END default to the buffer boundaries.
-;;Always encode all 8bit characters, as opposed to \\[x-symbol-encode],
-;;i.e., `x-symbol-8bits' is assumed to be nil here."
+ "Encode all characters in active region or buffer to tokens.
+As opposed to `x-symbol-encode-recode', this function performs no
+recoding, i.e., `x-symbol-coding' is considered to have the value of
+`x-symbol-default-coding'. Additionally, `x-symbol-8bits' is assumed to
+be nil if `x-symbol-coding' is not nil or not having the same value as
+`x-symbol-default-coding'."
(interactive (and (region-active-p) (list (region-beginning) (region-end))))
(if (or (null x-symbol-coding)
(eq x-symbol-coding x-symbol-default-coding))
@@ -1098,16 +1108,14 @@ resolve a single character before point with \\[x-symbol-modify-key].
if you have a latin-1 font by default, the `adiaeresis' in a latin-2
encoded file is a latin-1 `adiaeresis' in the buffer. When saving the
buffer, its is again the right 8bit character in the latin-2 encoded
-file. But note: CHAR ALIASES ARE NOT ENCODED WHEN SAVING THE FILE.
-Invoke this command before, if your buffers have char aliases! Seven
-positions in latin-3 fonts are not used, the corresponding 8bit bytes in
-latin-3 encoded files are not changed.
+file. Seven positions in latin-3 fonts are not used, the corresponding
+8bit bytes in latin-3 encoded files are not changed.
-In normal cases, buffers do not have char aliases: in XEmacs/Mule, this
-is only possible if you copy characters from buffers with characters
-considered as char aliases by package x-symbol, e.g., from the Mule file
-\"european.el\". In XEmacs/no-Mule, this is only possible if you use
-commands like `\\[universal-argument] 2 3 4'.
+In normal cases, buffers do not have char aliases: with Mule support,
+this is only possible if you copy characters from buffers with
+characters considered as char aliases by package x-symbol, e.g., from
+the Mule file \"european.el\". Without Mule support, this is only
+possible if you use commands like `\\[universal-argument] 2 3 4'.
The reason why package x-symbol does not support all versions of
`adiaeresis'es:
@@ -1148,6 +1156,9 @@ The reason why package x-symbol does not support all versions of
count (x-symbol-region-text t)))))
(defun x-symbol-copy-region-encoded (start end)
+ "Save the region encoded, as if killed.
+Encode characters as `x-symbol-encode' does, but without traces in
+current buffer. Save the region as `copy-region-as-kill' does."
;; WARNING: args might change (for prefix arg: kill, append/prepend). No,
;; this command does not append after a kill as `copy-region-as-kill' does.
;; I think it's quite strange to append after a kill, but not after another
@@ -1173,6 +1184,9 @@ The reason why package x-symbol does not support all versions of
(copy-region-as-kill start end)))
(defun x-symbol-yank-decoded (&optional arg)
+ "Reinsert and decode the last stretch of killed text.
+Reinsert text as `yank' does. Decode characters as `x-symbol-decode'
+does, but without adding unnessary entries to the `buffer-undo-list'."
;; Can also be inserted+decoded directly. But it would be much longer when
;; doing it right (`buffer-undo-list', disable font-lock, etc).
(interactive "*P")
@@ -1203,11 +1217,10 @@ The reason why package x-symbol does not support all versions of
(while alist
(cond ((stringp (car alist))
(or sep (setq sep (car alist))))
- ((setq string (if (functionp (cdar alist))
- (funcall (cdar alist) (caar alist))
- (if (symbol-value (caar alist))
- (cadar alist)
- (cddar alist))))
+ ((setq string (let ((value (symbol-value (caar alist))))
+ (if (functionp (cdar alist))
+ (funcall (cdar alist) value)
+ (if value (cadar alist) (cddar alist)))))
(when sep (push sep strings) (setq sep nil))
(push string strings)))
(setq alist (cdr alist)))
@@ -1316,6 +1329,10 @@ where KEY is equal to the MATCH'th regexp group of the match."
(0 (progn x-symbol-nomule-font-lock-face) prepend)))))
"TODO")
+(defvar x-symbol-subscript-matcher nil
+ "Internal.
+Used during the font-lock highlighting process.")
+
(defvar x-symbol-subscript-type nil
"Internal")
@@ -1330,7 +1347,7 @@ where KEY is equal to the MATCH'th regexp group of the match."
(and x-symbol-mode x-symbol-subscripts
(find-face 'x-symbol-sub-face) ; TODO: not if in Emacs-21.4
(find-face 'x-symbol-sup-face) ; ditto
- (x-symbol-language-value 'x-symbol-subscript-matcher)))
+ (x-symbol-language-value 'x-symbol-LANG-subscript-matcher)))
(if (eq x-symbol-subscript-matcher 'ignore)
(setq x-symbol-subscript-matcher nil)))
@@ -1406,7 +1423,17 @@ command `x-symbol-mode' for details."
(progn
(decode-coding-region (point-min) (point-max) 'undecided)
(set-buffer-multibyte t))
- (set-buffer-modified-p modified)))))
+ (set-buffer-modified-p modified))))
+ (and x-symbol-mode
+ x-symbol-set-coding-system-if-undecided
+ x-symbol-default-coding
+ (let ((cs (car (rassq x-symbol-default-coding
+ '((iso-latin-1 . iso-8859-1)
+ (iso-latin-2 . iso-8859-2)
+ (iso-latin-3 . iso-8859-3)
+ (iso-latin-9 . iso-8859-9)
+ (iso-latin-15 . iso-8859-15))))))
+ (if cs (set-buffer-file-coding-system cs)))))
(if x-symbol-mode (x-symbol-init-font-lock))
(if conversion
(let ((modified (buffer-modified-p))
@@ -1505,7 +1532,8 @@ Used in `change-major-mode-hook'."
(defun x-symbol-extra-filter (menu-items)
(let ((extra (assoc (aref (car menu-items) 0)
- (x-symbol-language-value 'x-symbol-extra-menu-items))))
+ (x-symbol-language-value
+ 'x-symbol-LANG-extra-menu-items))))
(if extra
(append (cdr menu-items) (cdr extra))
(cdr menu-items))))
@@ -1525,7 +1553,7 @@ Append the global or token-language specific menu to MENU-ITEMS."
(or (and x-symbol-local-menu
x-symbol-language
(x-symbol-generated-menu-alist
- (x-symbol-language-value 'x-symbol-generated-data)))
+ (x-symbol-language-value 'x-symbol-LANG-generated-data)))
x-symbol-menu-alist)))
@@ -1721,10 +1749,10 @@ See `x-symbol-init-language'."
(if language
(if (get language 'x-symbol-initialized)
(message "Token language %S is already initialized"
- (x-symbol-language-value 'x-symbol-name language))
+ (x-symbol-language-value 'x-symbol-LANG-name language))
(if (x-symbol-init-language language)
(message "Token language %S has been initialized"
- (x-symbol-language-value 'x-symbol-name language))
+ (x-symbol-language-value 'x-symbol-LANG-name language))
(error "Failed to initialize token language `%s'" language)))))
(defun x-symbol-list-menu (reference charsym)
@@ -1744,7 +1772,7 @@ buffer REFERENCE, see `x-symbol-insert-command'."
(car (gethash charsym
(x-symbol-generated-encode-table
(x-symbol-language-value
- 'x-symbol-generated-data
+ 'x-symbol-LANG-generated-data
(car language)))))
(symbol-name charsym)))
(push (vector token
@@ -1859,7 +1887,7 @@ mouse is in the upper half of the window, scroll up, otherwise."
(plist-put x-symbol-language-info-caches language cache)))
(or (gethash charsym cache)
(let* ((data (x-symbol-language-value
- 'x-symbol-generated-data language))
+ 'x-symbol-LANG-generated-data language))
(token (gethash charsym
(x-symbol-generated-encode-table data))))
(x-symbol-puthash
@@ -1874,7 +1902,8 @@ mouse is in the upper half of the window, scroll up, otherwise."
(x-symbol-fancy-associations
(gethash charsym
(x-symbol-generated-token-classes data))
- (x-symbol-language-value 'x-symbol-class-alist language)
+ (x-symbol-language-value 'x-symbol-LANG-class-alist
+ language)
'x-symbol-info-classes-pre
'x-symbol-info-classes-sep
'x-symbol-info-classes-post
@@ -1932,7 +1961,7 @@ describing key bindings."
(concat intro
(gethash charsym x-symbol-fontified-cstring-table)
(x-symbol-fancy-value 'x-symbol-info-token-pre)
- (if (get language 'x-symbol-name)
+ (if (get language 'x-symbol-LANG-name)
(x-symbol-language-info charsym language)
(x-symbol-charsym-info charsym))
(x-symbol-coding-info charsym)
@@ -2123,7 +2152,12 @@ See `x-symbol-reveal-invisible', `x-symbol-character-info' and
;; (setq cw2 quail-overlay)))
;; ;;(quail-point-in-conversion-region)))
(setq info (x-symbol-point-info after before))
- (display-message 'no-log info)))))
+ (if (featurep 'xemacs)
+ (display-message 'no-log info)
+ (let ((resize-mini-windows nil))
+ (display-message 'no-log info)
+ ;;(sit-for 0.01) ; does not work, resizes after 0.01s
+ ))))))
(defun x-symbol-start-itimer-once ()
"Start idle timer for function `x-symbol-show-info-and-invisible'.
@@ -2160,7 +2194,8 @@ Used in `x-symbol-post-command-hook.'"
(defvar x-symbol-language-history nil
- "History of token languages, long form, see access `x-symbol-name'.")
+ "History of token languages, long form.
+See language access `x-symbol-LANG-name'.")
(defvar x-symbol-token-history nil
"History of tokens of any language.")
@@ -2223,7 +2258,7 @@ Otherwise signal error `undefined-keystroke-sequence'."
(let* ((token (if x-symbol-language
(car (gethash charsym (x-symbol-generated-encode-table
(x-symbol-language-value
- 'x-symbol-generated-data))))))
+ 'x-symbol-LANG-generated-data))))))
(language (x-symbol-read-language
(format "Insert %s in token language (default %s): "
charsym
@@ -2235,12 +2270,12 @@ Otherwise signal error `undefined-keystroke-sequence'."
(or (null (setq lang (cdr lang)))
(gethash charsym (x-symbol-generated-encode-table
(x-symbol-language-value
- 'x-symbol-generated-data
+ 'x-symbol-LANG-generated-data
lang))))))))
(or (if language
(car (gethash charsym (x-symbol-generated-encode-table
(x-symbol-language-value
- 'x-symbol-generated-data
+ 'x-symbol-LANG-generated-data
language)))))
(symbol-name charsym))))
@@ -2325,13 +2360,13 @@ nil, argument ARG is passed to `x-symbol-insert-command'."
(decode-obarray (if language
(x-symbol-generated-decode-obarray
(x-symbol-language-value
- 'x-symbol-generated-data language))
+ 'x-symbol-LANG-generated-data language))
x-symbol-charsym-decode-obarray))
(completion (try-completion "" decode-obarray))
(completion-ignore-case (if language
(x-symbol-grammar-case-function
(x-symbol-language-value
- 'x-symbol-token-grammar language))))
+ 'x-symbol-LANG-token-grammar language))))
(cstring (completing-read
(format "Insert %s %s: " (car arg-strings) (cdr arg-strings))
decode-obarray
@@ -2374,7 +2409,7 @@ non-nil, see `x-symbol-list-restore'."
x-symbol-language
(x-symbol-generated-grid-alist
(x-symbol-language-value
- 'x-symbol-generated-data))))
+ 'x-symbol-LANG-generated-data))))
(language (and grid-alist x-symbol-language))
(win-config (and x-symbol-temp-grid (current-window-configuration)))
;;(ref-buffer (and x-symbol-temp-grid (current-buffer)))
@@ -2490,11 +2525,12 @@ argument. Also prepare the use of `undo' and `unexpand-abbrev'."
(defun x-symbol-replace-token (&optional command-char)
"Replace token by corresponding character.
If COMMAND-STRING is non-nil, check token shape."
- (let* ((grammar (x-symbol-language-value 'x-symbol-token-grammar))
- (generated (x-symbol-language-value 'x-symbol-generated-data))
+ (let* ((grammar (x-symbol-language-value 'x-symbol-LANG-token-grammar))
+ (generated (x-symbol-language-value 'x-symbol-LANG-generated-data))
(decode-obarray (x-symbol-generated-decode-obarray generated))
(case-fold-search (x-symbol-grammar-case-function ;#dynamic
- (x-symbol-language-value 'x-symbol-token-grammar)))
+ (x-symbol-language-value
+ 'x-symbol-LANG-token-grammar)))
(input-regexp (x-symbol-grammar-input-regexp grammar))
(input-spec (x-symbol-grammar-input-spec grammar))
(beg (- (point) (x-symbol-generated-max-token-len generated)
@@ -2695,7 +2731,7 @@ Called in `x-symbol-post-command-hook', see `x-symbol-electric-input'."
(x-symbol-call-function-or-regexp
x-symbol-electric-ignore context (cdr pos+charsym))
(x-symbol-call-function-or-regexp
- (x-symbol-language-value 'x-symbol-electric-ignore)
+ (x-symbol-language-value 'x-symbol-LANG-electric-ignore)
context (cdr pos+charsym))
(x-symbol-replace-from (car pos+charsym)
(cdr pos+charsym)))))))
@@ -3526,7 +3562,7 @@ The rotate score is more important than the modify score."
"Return an alists with headers and their charsyms.
If optional argument LANGUAGE is non-nil, only collect valid charsym in
that language. Used for menu and grid. See variable and language
-access `x-symbol-header-groups-alist'."
+access `x-symbol-LANG-header-groups-alist'."
(let (group-alist)
(dolist (charsym x-symbol-all-charsyms)
(when (or (null language)
@@ -3545,7 +3581,7 @@ access `x-symbol-header-groups-alist'."
(cdr header-groups)))))
(or (and language
(symbol-value
- (get language 'x-symbol-header-groups-alist)))
+ (get language 'x-symbol-LANG-header-groups-alist)))
x-symbol-header-groups-alist))))
(defun x-symbol-init-grid/menu (&optional language)
@@ -3607,7 +3643,7 @@ language."
menu-alist (nreverse menu-alist))
(if language
(let ((generated (symbol-value
- (get language 'x-symbol-generated-data))))
+ (get language 'x-symbol-LANG-generated-data))))
(setf (x-symbol-generated-menu-alist generated) menu-alist)
(setf (x-symbol-generated-grid-alist generated) grid-alist))
(setq x-symbol-menu-alist menu-alist
@@ -3823,7 +3859,8 @@ Set conversion alists according to table and initialize executables, see
`x-symbol-init-input'. LANGUAGE should have been registered with
`x-symbol-register-language' before.
-Each element in TABLE, the language access `x-symbol-table', looks like
+Each element in TABLE, the language access `x-symbol-LANG-table', looks
+like
(CHARSYM CLASSES . TOKEN-SPEC) or nil.
With the first form, pass TOKEN-SPEC to the language aspect
@@ -3841,32 +3878,34 @@ CLASSES are a list of symbols which are used for the character info in
the echo are, see `x-symbol-character-info', the grid coloring scheme,
and probably by the token language dependent control of input method
ELECTRIC, see `x-symbol-electric-input'. They are used by the language
-accesses `x-symbol-class-alist' and `x-symbol-class-face-alist'.
+accesses `x-symbol-LANG-class-alist' and
+`x-symbol-LANG-class-face-alist'.
If non-nil, the language aspect `x-symbol-input-token-ignore' \"hides\"
some tokens from input method token. `x-symbol-call-function-or-regexp'
uses it with TOKEN and CHARSYM."
- (when (get language 'x-symbol-feature)
- (require (get language 'x-symbol-feature))
+ (when (get language 'x-symbol-LANG-feature)
+ (require (get language 'x-symbol-LANG-feature))
(x-symbol-init-language-accesses language x-symbol-language-access-alist)
(put language 'x-symbol-initialized t)
- (dolist (feature (x-symbol-language-value 'x-symbol-required-fonts
+ (dolist (feature (x-symbol-language-value 'x-symbol-LANG-required-fonts
language))
(require feature))
(x-symbol-init-input)
- (let ((grammar (x-symbol-language-value 'x-symbol-token-grammar language)))
+ (let ((grammar (x-symbol-language-value 'x-symbol-LANG-token-grammar
+ language)))
(when (eq (car-safe grammar) 'x-symbol-make-grammar)
(setq grammar (apply 'x-symbol-make-grammar (cdr grammar)))
- (set (get language 'x-symbol-token-grammar) grammar))
+ (set (get language 'x-symbol-LANG-token-grammar) grammar))
(let ((token-list (x-symbol-grammar-token-list grammar))
(after-init (x-symbol-grammar-after-init grammar))
- (class-alist (x-symbol-language-value 'x-symbol-class-alist
+ (class-alist (x-symbol-language-value 'x-symbol-LANG-class-alist
language))
decode-alist encode-alist classes-alist
(warn-double t)
used-charsyms used-tokens secondary
(max-token-len 0) tlen)
- (dolist (entry (x-symbol-language-value 'x-symbol-table language))
+ (dolist (entry (x-symbol-language-value 'x-symbol-LANG-table language))
(if (null entry)
(setq warn-double nil)
(let* ((charsym (car entry))
@@ -3913,7 +3952,7 @@ uses it with TOKEN and CHARSYM."
(setq max-token-len tlen))
(setq secondary t)))))))
;; set vars ----------------------------------------------------------
- (set (get language 'x-symbol-generated-data)
+ (set (get language 'x-symbol-LANG-generated-data)
(x-symbol-make-generated-data
:encode-table (x-symbol-alist-to-hash-table encode-alist)
:decode-obarray (x-symbol-alist-to-obarray decode-alist)