;;; x-symbol-sgml.el --- token language "SGML entity" for package x-symbol ;; Copyright (C) 1996-1999, 2002 Free Software Foundation, Inc. ;; ;; Author: Christoph Wedler ;; Maintainer: (Please use `M-x x-symbol-package-bug' to contact the maintainer) ;; Version: 4.4 ;; Keywords: WYSIWYG, HTML, wp, math, internationalization ;; X-URL: http://x-symbol.sourceforge.net/ ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with this program; if not, write to the Free Software ;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ;;; Commentary: ;; If you want to use package x-symbol, please visit the URL (use ;; \\[x-symbol-package-web]) and read the info (use \\[x-symbol-package-info]). ;; Token language haskell is registered in x-symbol-hooks. ;;; Code: (provide 'x-symbol-haskell) (require 'x-symbol-vars) ;;;=========================================================================== ;;; Miscellaneous variables ;;;=========================================================================== (defface x-symbol-haskell-non-l1-face '((((class color) (background light)) (:foreground "orange4"))) "*Face, normally used for tokens only allowed in TeX's math mode. Used in `x-symbol-tex-class-face-alist'." :group 'x-symbol-haskell :group 'x-symbol-info-general) (defcustom x-symbol-haskell-modeline-name "haskell" "*String naming the language HASKELL in the modeline." :group 'x-symbol-haskell :type 'string) (defcustom x-symbol-haskell-header-groups-alist '(("Operator" bigop operator) ("Relation" relation) ("Arrow, Punctuation" arrow triangle shape white line dots punctuation quote parenthesis) ("Symbol" symbol currency mathletter setsymbol) ("Greek Letter" greek greek1) ("Misc. Letter" letter slash) ("Cedilla, Ogonek" cedilla ogonek) ("Dotaccent, Ring" dotaccent ring) ("Tilde, Breve" tilde breve) ("Circumflex, Caron" circumflex caron) ("Diaeresis, Umlaut" diaeresis hungarumlaut) ("Acute, Grave" acute grave)) "*If non-nil, used in HASKELL specific grid/menu. See `x-symbol-header-groups-alist'." :group 'x-symbol-haskell :group 'x-symbol-input-init :type 'x-symbol-headers) (defcustom x-symbol-haskell-class-alist '((non-l1) (VALID "HASKELL entity" (x-symbol-info-face)) (INVALID "no HASKELL entity" (x-symbol-emph-info-face))) "Alist for HASKELL's token classes displayed by info in echo area. See `x-symbol-language-access-alist' for details." :group 'x-symbol-haskell :group 'x-symbol-info-strings :set 'x-symbol-set-cache-variable :type 'x-symbol-class-info) (defcustom x-symbol-haskell-class-face-alist '((non-l1 x-symbol-haskell-non-l1-face (x-symbol-haskell-non-l1-face))) "Alist for HASKELL's color scheme in HASKELL's grid and info. See `x-symbol-language-access-alist' for details." :group 'x-symbol-haskell :group 'x-symbol-input-init :group 'x-symbol-info-general :set 'x-symbol-set-cache-variable :type 'x-symbol-class-faces) (defcustom x-symbol-haskell-electric-ignore nil "*Additional HASKELL version of `x-symbol-electric-ignore'." :group 'x-symbol-haskell :group 'x-symbol-input-control :type 'x-symbol-function-or-regexp) (defvar x-symbol-haskell-required-fonts nil "List of features providing fonts for language `haskell'.") (defvar x-symbol-haskell-extra-menu-items nil "Extra menu entries for language `haskell'.") (defvar x-symbol-haskell-token-list 'x-symbol-haskell-token-list-netscape "Function returning a list of HASKELL entities from table specification. The TOKEN-SPEC in haskell table look like (NUMBER STRING...) where NUMBER is the Unicode value. See `x-symbol-init-language', `x-symbol-haskell-token-list-name', `x-symbol-haskell-token-list-code' and `x-symbol-haskell-token-list-netscape'.") (defvar x-symbol-haskell-token-grammar (x-symbol-make-grammar :decode-regexp "_[#0-9A-Za-z]+" :token-list #'x-symbol-haskell-default-token-list) "Token grammar for language `haskell'.") (defvar x-symbol-haskell-input-token-grammar '("_[#0-9A-Za-z]+\\'") "Grammar of input method Token for language `haskell'.") (defvar x-symbol-haskell-user-table nil "User table defining HASKELL entities, used in `x-symbol-haskell-table'.") (defvar x-symbol-haskell-generated-data nil "Internal.") ;;;=========================================================================== ;;; Image support ;;;=========================================================================== (defcustom x-symbol-haskell-master-directory 'ignore "Function returning the directory of the master file or nil. See `x-symbol-image-parse-buffer'." :group 'x-symbol-haskell :group 'x-symbol-image-language :type 'function) (defcustom x-symbol-haskell-image-searchpath '("./") "Search path used for implicitly relative image file names. See `x-symbol-image-use-remote'." :group 'x-symbol-haskell :group 'x-symbol-image-language :type '(repeat directory)) (defcustom x-symbol-haskell-image-cached-dirs '("images/" "pictures/") "Directory parts of image file names stored in the memory cache. See `x-symbol-image-use-remote'." :group 'x-symbol-haskell :group 'x-symbol-image-language :type '(repeat string)) (defcustom x-symbol-haskell-image-file-truename-alist '(("\\`file:" . "") ("\\`[A-Za-z]+:")) "Alist used to determine the file name of an image URL. Each element looks like (REGEXP) or (REGEXP . NEWTEXT) or (REGEXP FUNCTION ARG...) If the the image file name is matched by REGEXP, the corresponding element is processed, if no REGEXP matches, the image file name is used as it is. With the first form, the image command will not be highlighted. With the second form, replace text matched by REGEXP with NEWTEXT, see `replace-match' for details. With the third form, FUNCTION, call FUNCTION with the image file name and the remaining arguments ARGs to get the true file name. E.g., I add the following element to this variable: (\"\\\\`http://www\\\\.fmi\\\\.uni-passau\\\\.de/~wedler/\" \. \"~/public_html/\")" :group 'x-symbol-haskell :group 'x-symbol-image-language :type '(repeat (cons :format "%v" :value ("" . "") ; doesn't work (custom bug?) regexp (choice ;;:value "" (const :tag "Not highlighted" nil) (string :tag "Replace match with") (cons :tag "Call" function (repeat :tag "With arguments" sexp)))))) (defcustom x-symbol-haskell-image-keywords '("\\.\\(gif\\|png\\|jpe?g\\)\\'" ("]*src=\"\\([^\n\"]+\\)\"[^\n>]*>" x-symbol-haskell-image-file-truename 1)) "Keywords used to find image insertion commands. See `x-symbol-image-parse-buffer'." :group 'x-symbol-haskell :group 'x-symbol-image-language :type 'x-symbol-image-keywords) (defun x-symbol-haskell-image-file-truename (num) "Return true image file name for last match. Return text matched by the NUMth regexp group of the corresponding keyword regexp, after being processed according to `x-symbol-haskell-image-file-truename-alist'." (x-symbol-match-in-alist (setq num (match-string num)) x-symbol-haskell-image-file-truename-alist num t)) ;;;=========================================================================== ;;; Super- and Subscripts ;;;=========================================================================== (defvar x-symbol-haskell-font-lock-keywords '((x-symbol-haskell-match-subscript (1 x-symbol-invisible-face t) (2 (if (eq (char-after (+ 3 (match-beginning 1))) ?b) 'x-symbol-sub-face 'x-symbol-sup-face) prepend) (3 x-symbol-invisible-face t))) "HASKELL's font-lock keywords for super- and subscripts.") (defcustom x-symbol-haskell-font-lock-regexp "" "Regexp matching the start tag of HASKELL's super- and subscripts. See also `x-symbol-haskell-font-lock-alist'." :group 'x-symbol-haskell :type 'regexp) (defcustom x-symbol-haskell-font-lock-limit-regexp "\n\\|" "Regexp matching the end tag of HASKELL's super- and subscripts. This regexp should match the end of line and the closing tags in `x-symbol-haskell-font-lock-alist'." :group 'x-symbol-haskell :type 'regexp) (defcustom x-symbol-haskell-font-lock-contents-regexp "[^ \t\n\240]" "*Regexp matching the super- and subscript contents. This regexp should match the text between the opening and closing super- or subscript tag." :group 'x-symbol-haskell :type 'regexp) (defcustom x-symbol-haskell-font-lock-alist '(("" . "") ("" . "")) "Alist for correct tag pairs for HASKELL's super- and subscripts. Each element looks like (OPEN . CLOSE). All keys OPEN in this alist should be matched by `x-symbol-haskell-font-lock-regexp', all CLOSEs should be matched by `x-symbol-haskell-font-lock-limit-regexp'." :group 'x-symbol-haskell :type '(repeat (cons :format "%v" (string :tag "Open tag") (string :tag "Close tag")))) ;;;=========================================================================== ;;; The tables ;;;=========================================================================== (defun x-symbol-haskell-default-token-list (tokens) (mapcar #'list (if (car tokens) (if (or (eq x-symbol-haskell-token-list 'x-symbol-haskell-token-list-name) (and (eq x-symbol-haskell-token-list 'x-symbol-haskell-token-list-netscape) (< (car tokens) 256))) (append (cdr tokens) (list (format "_#%d" (car tokens)))) (cons (format "_#%d" (car tokens)) (cdr tokens)))))) ;; http://www.w3.org/TR/REC-html40/haskell/entities.html ;; (query-replace-regexp "[ \t]*.*$" " (\\1 () \\2 \"_\\1;\") ; \\3") (defvar x-symbol-haskell-latin1-table '((nobreakspace () 160 "_nbsp") (exclamdown () 161 "_iexcl") (cent () 162 "_cent") (sterling () 163 "_pound") (currency () 164 "_curren") (yen () 165 "_yen") (brokenbar () 166 "_brvbar" "_brkbar") (section () 167 "_sect") (diaeresis () 168 "_uml" "_die") (copyright () 169 "_copy") (ordfeminine () 170 "_ordf") (guillemotleft () 171 "_laquo") (notsign () 172 "_not") (hyphen () 173 "_shy") (registered () 174 "_reg") (macron () 175 "_macr" "_hibar") (degree () 176 "_deg") (plusminus () 177 "_plusmn") (twosuperior () 178 "_sup2") (threesuperior () 179 "_sup3") (acute () 180 "_acute") (mu1 () 181 "_micro") (paragraph () 182 "_para") (periodcentered () 183 "_middot") (cedilla () 184 "_cedil") (onesuperior () 185 "_sup1") (masculine () 186 "_ordm") (guillemotright () 187 "_raquo") (onequarter () 188 "_frac14") (onehalf () 189 "_frac12") (threequarters () 190 "_frac34") (questiondown () 191 "_iquest") (Agrave () 192 "_Agrave") (Aacute () 193 "_Aacute") (Acircumflex () 194 "_Acirc") (Atilde () 195 "_Atilde") (Adiaeresis () 196 "_Auml") (Aring () 197 "_Aring") (AE () 198 "_AElig") (Ccedilla () 199 "_Ccedil") (Egrave () 200 "_Egrave") (Eacute () 201 "_Eacute") (Ecircumflex () 202 "_Ecirc") (Ediaeresis () 203 "_Euml") (Igrave () 204 "_Igrave") (Iacute () 205 "_Iacute") (Icircumflex () 206 "_Icirc") (Idiaeresis () 207 "_Iuml") (ETH () 208 "_ETH") ; "_Dstrok" for Dbar (U0110) = latin2#208? (Ntilde () 209 "_Ntilde") (Ograve () 210 "_Ograve") (Oacute () 211 "_Oacute") (Ocircumflex () 212 "_Ocirc") (Otilde () 213 "_Otilde") (Odiaeresis () 214 "_Ouml") (multiply () 215 "_times") (Ooblique () 216 "_Oslash") (Ugrave () 217 "_Ugrave") (Uacute () 218 "_Uacute") (Ucircumflex () 219 "_Ucirc") (Udiaeresis () 220 "_Uuml") (Yacute () 221 "_Yacute") (THORN () 222 "_THORN") (ssharp () 223 "_szlig") (agrave () 224 "_agrave") (aacute () 225 "_aacute") (acircumflex () 226 "_acirc") (atilde () 227 "_atilde") (adiaeresis () 228 "_auml") (aring () 229 "_aring") (ae () 230 "_aelig") (ccedilla () 231 "_ccedil") (egrave () 232 "_egrave") (eacute () 233 "_eacute") (ecircumflex () 234 "_ecirc") (ediaeresis () 235 "_euml") (igrave () 236 "_igrave") (iacute () 237 "_iacute") (icircumflex () 238 "_icirc") (idiaeresis () 239 "_iuml") (eth () 240 "_eth") (ntilde () 241 "_ntilde") (ograve () 242 "_ograve") (oacute () 243 "_oacute") (ocircumflex () 244 "_ocirc") (otilde () 245 "_otilde") (odiaeresis () 246 "_ouml") (division () 247 "_divide") (oslash () 248 "_oslash") (ugrave () 249 "_ugrave") (uacute () 250 "_uacute") (ucircumflex () 251 "_ucirc") (udiaeresis () 252 "_uuml") (yacute () 253 "_yacute") (thorn () 254 "_thorn") (ydiaeresis () 255 "_yuml")) "Table defining HASKELL entities, see `x-symbol-haskell-table'.") (defvar x-symbol-haskell-latinN-table '((Aogonek (non-l1) 260) (breve (non-l1) 728) (Lslash (non-l1) 321) (Lcaron (non-l1) 317) (Sacute (non-l1) 346) (Scaron (non-l1) 352 "_Scaron") (Scedilla (non-l1) 350) (Tcaron (non-l1) 356) (Zacute (non-l1) 377) (Zcaron (non-l1) 381) (Zdotaccent (non-l1) 379) (aogonek (non-l1) 261) (ogonek (non-l1) 731) (lslash (non-l1) 322) (lcaron (non-l1) 318) (sacute (non-l1) 347) (caron (non-l1) 711) (scaron (non-l1) 353 "_scaron") (scedilla (non-l1) 351) (tcaron (non-l1) 357) (zacute (non-l1) 378) (hungarumlaut (non-l1) 733) (zcaron (non-l1) 382) (zdotaccent (non-l1) 380) (Racute (non-l1) 340) (Abreve (non-l1) 258) (Lacute (non-l1) 313) (Cacute (non-l1) 262) (Ccaron (non-l1) 268) (Eogonek (non-l1) 280) (Ecaron (non-l1) 282) (Dcaron (non-l1) 270) (Dbar (non-l1) 272) (Nacute (non-l1) 323) (Ncaron (non-l1) 327) (Ohungarumlaut (non-l1) 336) (Rcaron (non-l1) 344) (Uring (non-l1) 366) (Uhungarumlaut (non-l1) 368) (Tcedilla (non-l1) 354) (racute (non-l1) 341) (abreve (non-l1) 259) (lacute (non-l1) 314) (cacute (non-l1) 263) (ccaron (non-l1) 269) (eogonek (non-l1) 281) (ecaron (non-l1) 283) (dcaron (non-l1) 271) (dbar (non-l1) 273) (nacute (non-l1) 324) (ncaron (non-l1) 328) (ohungarumlaut (non-l1) 337) (rcaron (non-l1) 345) (uring (non-l1) 367) (uhungarumlaut (non-l1) 369) (tcedilla (non-l1) 355) (dotaccent (non-l1) 729) (Hbar (non-l1) 294) (Hcircumflex (non-l1) 292) (Idotaccent (non-l1) 304) (Gbreve (non-l1) 286) (Jcircumflex (non-l1) 308) (hbar (non-l1) 295) (hcircumflex (non-l1) 293) (dotlessi (non-l1) 305) (gbreve (non-l1) 287) (jcircumflex (non-l1) 309) (Cdotaccent (non-l1) 266) (Ccircumflex (non-l1) 264) (Gdotaccent (non-l1) 288) (Gcircumflex (non-l1) 284) (Ubreve (non-l1) 364) (Scircumflex (non-l1) 348) (cdotaccent (non-l1) 267) (ccircumflex (non-l1) 265) (gdotaccent (non-l1) 289) (gcircumflex (non-l1) 285) (ubreve (non-l1) 365) (scircumflex (non-l1) 349) (euro (non-l1) 8364 "_euro") (OE (non-l1) 338 "_OElig") (oe (non-l1) 339 "_oelig") (Ydiaeresis (non-l1) 376 "_Yuml")) "Table defining HASKELL entities, see `x-symbol-haskell-table'.") (defvar x-symbol-haskell-xsymb0-table '((Delta (non-l1) 916 "_Delta") (Phi (non-l1) 934 "_Phi") (Gamma (non-l1) 915 "_Gamma") (theta1 (non-l1) 977 "_thetasym") (Lambda (non-l1) 923 "_Lambda") (Pi (non-l1) 928 "_Pi") (Theta (non-l1) 920 "_Theta") (Sigma (non-l1) 931 "_Sigma") (sigma1 (non-l1) 962 "_sigmaf") (Omega (non-l1) 937 "_Omega") (Xi (non-l1) 926 "_Xi") (Psi (non-l1) 936 "_Psi") (alpha (non-l1) 945 "_alpha") (beta (non-l1) 946 "_beta") (chi (non-l1) 967 "_chi") (delta (non-l1) 948 "_delta") (epsilon (non-l1) 949 "_epsilon") (phi (non-l1) 966 "_phi") (gamma (non-l1) 947 "_gamma") (eta (non-l1) 951 "_eta") (iota (non-l1) 953 "_iota") (kappa (non-l1) 954 "_kappa") (lambda (non-l1) 955 "_lambda") (mu (non-l1) 956 "_mu") (nu (non-l1) 957 "_nu") (pi (non-l1) 960 "_pi") (theta (non-l1) 952 "_theta") (rho (non-l1) 961 "_rho") (sigma (non-l1) 963 "_sigma") (tau (non-l1) 964 "_tau") (upsilon (non-l1) 965 "_upsilon") (omega1 (non-l1) 982 "_piv") (omega (non-l1) 969 "_omega") (xi (non-l1) 958 "_xi") (psi (non-l1) 968 "_psi") (zeta (non-l1) 950 "_zeta") (Upsilon1 (non-l1) 978 "_upsih") (florin (non-l1) 402 "_fnof") (bullet (non-l1) 8226 "_bull") (ellipsis (non-l1) 8230 "_hellip") (minute (non-l1) 8242 "_prime") (second (non-l1) 8243 "_Prime") (radicalex (non-l1) 8254 "_oline") (fraction (non-l1) 8260 "_frasl") (weierstrass (non-l1) 8472 "_weierp") (Ifraktur (non-l1) 8465 "_image") (Rfraktur (non-l1) 8476 "_real") (trademark (non-l1) 8482 "_trade") (aleph (non-l1) 8501 "_alefsym") (arrowleft (non-l1) 8592 "_larr") (arrowup (non-l1) 8593 "_uarr") (arrowright (non-l1) 8594 "_rarr") (arrowdown (non-l1) 8595 "_darr") (arrowboth (non-l1) 8596 "_harr") (carriagereturn (non-l1) 8629 "_crarr") (arrowdblleft (non-l1) 8656 "_lArr") (arrowdblup (non-l1) 8657 "_uArr") (arrowdblright (non-l1) 8658 "_rArr") (arrowdbldown (non-l1) 8659 "_dArr") (arrowdblboth (non-l1) 8660 "_hArr") (partialdiff (non-l1) 8706 "_part") (emptyset (non-l1) 8709 "_empty") (gradient (non-l1) 8711 "_nabla") (element (non-l1) 8712 "_isin") (notelement (non-l1) 8713 "_notin") (suchthat (non-l1) 8715 "_ni") (product (non-l1) 8719 "_prod") (summation (non-l1) 8721 "_sum") (minus1 (non-l1) 8722 "_minus") (asterisk1 (non-l1) 8727 "_lowast") (radical (non-l1) 8730 "_radic") (proportional (non-l1) 8733 "_prop") (infinity (non-l1) 8734 "_infin") (angle (non-l1) 8736 "_ang") (logicaland (non-l1) 8743 "_and") (logicalor (non-l1) 8744 "_or") (intersection (non-l1) 8745 "_cap") (union (non-l1) 8746 "_cup") (integral (non-l1) 8747 "_int") (similar (non-l1) 8764 "_sim") (congruent (non-l1) 8773 "_cong") (notequal (non-l1) 8800 "_ne") (equivalence (non-l1) 8801 "_equiv") (lessequal (non-l1) 8804 "_le") (greaterequal (non-l1) 8805 "_ge") (propersubset (non-l1) 8834 "_sub") (propersuperset (non-l1) 8835 "_sup") (notsubset (non-l1) 8836 "_nsub") (reflexsubset (non-l1) 8838 "_sube") (reflexsuperset (non-l1) 8839 "_supe") (circleplus (non-l1) 8853 "_oplus") (circlemultiply (non-l1) 8855 "_otimes") (perpendicular (non-l1) 8869 "_perp") (periodcentered1 (non-l1) 8901 "_sdot") (angleleft (non-l1) 9001 "_lang") (angleright (non-l1) 9002 "_rang") (lozenge (non-l1) 9674 "_loz") (spade (non-l1) 9824 "_spades") (club (non-l1) 9827 "_clubs") (heart (non-l1) 9829 "_hearts") (diamond (non-l1) 9830 "_diams")) "Table defining HASKELL entities, see `x-symbol-haskell-table'.") (defvar x-symbol-haskell-xsymb1-table '((ampersand2 () 38 "_amp") (quotedbl1 () 34 "_quot") (less2 () 60 "_lt") (greater2 () 62 "_gt") (universal1 (non-l1) 8704 "_forall") (existential1 (non-l1) 8707 "_exist") (circumflex (non-l1) 710 "_circ") (tilde (non-l1) 732 "_tilde") ;;(ensp (non-l1) 8194 "_ensp") ; en space, U+2002 ISOpub ;;(emsp (non-l1) 8195 "_emsp") ; em space, U+2003 ISOpub ;;(thinsp (non-l1) 8201 "_thinsp") ; thin space, U+2009 ISOpub ;;(zwnj (non-l1) 8204 "_zwnj") ; zero width non-joiner, U+200C NEW RFC 2070 ;;(zwj (non-l1) 8205 "_zwj") ; zero width joiner, U+200D NEW RFC 2070 ;;(lrm (non-l1) 8206 "_lrm") ; left-to-right mark, U+200E NEW RFC 2070 ;;(rlm (non-l1) 8207 "_rlm") ; right-to-left mark, U+200F NEW RFC 2070 (endash (non-l1) 8211 "_ndash") (emdash (non-l1) 8212 "_mdash") ;;(lsquo (non-l1) 8216 "_lsquo") ; left single quotation mark, U+2018 ISOnum ;;(rsquo (non-l1) 8217 "_rsquo") ; right single quotation mark, U+2019 ISOnum ;;(sbquo (non-l1) 8218 "_sbquo") ; single low-9 quotation mark, U+201A NEW ;;(ldquo (non-l1) 8220 "_ldquo") ; left double quotation mark, U+201C ISOnum ;;(rdquo (non-l1) 8221 "_rdquo") ; right double quotation mark, U+201D ISOnum ;;(bdquo (non-l1) 8222 "_bdquo") ; double low-9 quotation mark, U+201E NEW (dagger (non-l1) 8224 "_dagger") (daggerdbl (non-l1) 8225 "_Dagger") (perthousand (non-l1) 8240 "_permil") (guilsinglleft (non-l1) 8249 "_lsaquo") (guilsinglright (non-l1) 8250 "_rsaquo") (therefore1 (non-l1) 8756 "_there4") (ceilingleft (non-l1) 8968 "_lceil") (ceilingright (non-l1) 8969 "_rceil") (floorleft (non-l1) 8970 "_lfloor") (floorright (non-l1) 8971 "_rfloor") (asym (non-l1) 8776 "_asymp") ) "Table defining HASKELL entities, see `x-symbol-haskell-table'.") ;; Should I add symbols from http://www.bbsinc.com/iso8859.html ? (defvar x-symbol-haskell-table (append x-symbol-haskell-user-table '(nil) x-symbol-haskell-latin1-table x-symbol-haskell-latinN-table x-symbol-haskell-xsymb0-table x-symbol-haskell-xsymb1-table) "Complete table defining HASKELL entities. Use `x-symbol-haskell-user-table' to define/shadow private entities. See `x-symbol-init-language' and `x-symbol-haskell-token-list'.") ;;;=========================================================================== ;;; Subscript functions ;;;=========================================================================== (defun x-symbol-haskell-match-subscript (limit) ;; checkdoc-params: (limit) "Match and skip over super- and subscripts. Return nil if `x-symbol-mode' or `x-symbol-subscripts' is nil. Uses `x-symbol-haskell-font-lock-regexp'." (and x-symbol-mode x-symbol-subscripts (let (open-beg open-end close-end close-beg) (while (and (setq open-end (re-search-forward x-symbol-haskell-font-lock-regexp limit t)) (setq open-beg (match-beginning 0)) (not (and (setq close-end (re-search-forward x-symbol-haskell-font-lock-limit-regexp limit 'limit)) (setq close-beg (match-beginning 0)) (equal (cdr (assoc (downcase (buffer-substring open-beg open-end)) x-symbol-haskell-font-lock-alist)) (downcase (buffer-substring close-beg close-end))) (save-excursion (goto-char open-end) (re-search-forward x-symbol-haskell-font-lock-contents-regexp close-beg t)))))) (when open-end (store-match-data (list open-beg close-end open-beg open-end open-end close-beg close-beg close-end)) t)))) ;;; Local IspellPersDict: .ispell_xsymb ;;; x-symbol-haskell.el ends here