Skip to content
Browse files

Remove nxhtml. You can download this manually if you want it.

It causes some bad behaviour (flymake going nuts, treating .erb files
as HTML, etc) and is huge.
  • Loading branch information...
1 parent b396615 commit 2c0ee8268f176343db78ae3f8f9de062f86862d9 @technomancy technomancy committed May 2, 2010
Showing with 0 additions and 45,438 deletions.
  1. +0 −1 elpa-to-submit/nxhtml/.nosearch
  2. +0 −707 elpa-to-submit/nxhtml/alts/javascript-mozlab.el
  3. +0 −181 elpa-to-submit/nxhtml/alts/js2-font-lock-new.el
  4. +0 −166 elpa-to-submit/nxhtml/alts/js2-font-lock.el
  5. +0 −11,356 elpa-to-submit/nxhtml/alts/js2-mumamo.el
  6. +0 −11,302 elpa-to-submit/nxhtml/alts/js2-new.el
  7. +0 −1,103 elpa-to-submit/nxhtml/alts/php-mode-1.5.0.el
  8. +0 −1,118 elpa-to-submit/nxhtml/alts/php-mode-2008-10-23.el
  9. +0 −2,715 elpa-to-submit/nxhtml/alts/smarty-mode-vdebout.el
  10. +0 −633 elpa-to-submit/nxhtml/alts/snippet.el
  11. +0 −186 elpa-to-submit/nxhtml/autostart.el
  12. +0 −70 elpa-to-submit/nxhtml/autostart22.el
  13. +0 −1 elpa-to-submit/nxhtml/emacs22.cmd
  14. BIN elpa-to-submit/nxhtml/etc/img/pause/pause.jpg
  15. BIN elpa-to-submit/nxhtml/etc/img/pause/pause2.jpg
  16. +0 −3 elpa-to-submit/nxhtml/etc/schema/genshi-schemas.xml
  17. +0 −27 elpa-to-submit/nxhtml/etc/schema/genshi.rnc
  18. +0 −74 elpa-to-submit/nxhtml/etc/schema/mjt.rnc
  19. +0 −37 elpa-to-submit/nxhtml/etc/schema/nxml-erb.patch
  20. +0 −58 elpa-to-submit/nxhtml/etc/schema/qtmstr-xhtml.rnc
  21. +0 −95 elpa-to-submit/nxhtml/etc/schema/schema-path-patch.el
  22. +0 −11 elpa-to-submit/nxhtml/etc/schema/xinclude.rnc
  23. +0 −25 elpa-to-submit/nxhtml/etc/templates/rollover-2v.css
  24. +0 −59 elpa-to-submit/nxhtml/etc/viper-tut/0intro
  25. +0 −187 elpa-to-submit/nxhtml/etc/viper-tut/1basics
  26. +0 −269 elpa-to-submit/nxhtml/etc/viper-tut/2moving
  27. +0 −318 elpa-to-submit/nxhtml/etc/viper-tut/3cutpaste
  28. +0 −180 elpa-to-submit/nxhtml/etc/viper-tut/4inserting
  29. +0 −229 elpa-to-submit/nxhtml/etc/viper-tut/5tricks
  30. +0 −49 elpa-to-submit/nxhtml/etc/viper-tut/README
  31. +0 −131 elpa-to-submit/nxhtml/etc/viper-tut/outline
  32. +0 −3,318 elpa-to-submit/nxhtml/nxhtml-loaddefs.el
  33. +0 −22 elpa-to-submit/nxhtml/nxhtml/.htaccess
  34. +0 −17 elpa-to-submit/nxhtml/nxhtml/ChangeLog
  35. 0 elpa-to-submit/nxhtml/nxhtml/doc/.nosearch
  36. +0 −55 elpa-to-submit/nxhtml/nxhtml/doc/cedet-build.el
  37. +0 −71 elpa-to-submit/nxhtml/nxhtml/doc/demo.html
  38. +0 −339 elpa-to-submit/nxhtml/nxhtml/doc/fontif-err.html
  39. +0 −339 elpa-to-submit/nxhtml/nxhtml/doc/fontif-err.php
  40. +0 −279 elpa-to-submit/nxhtml/nxhtml/doc/hfy-temp.html
  41. +0 −39 elpa-to-submit/nxhtml/nxhtml/doc/html2xhtml.html
  42. +0 −424 elpa-to-submit/nxhtml/nxhtml/doc/htmlfontify-example.html
  43. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/Las_Medulas.jpg
  44. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/Thumbs.db
  45. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/Toco_toucan.jpg
  46. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/bacchante2.jpg
  47. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/butterflies.jpg
  48. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/butterflies.png
  49. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/butterflies.xcf
  50. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/continue-play.jpg
  51. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/divine2.jpg
  52. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/edit-part.png
  53. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/editing-web-files.png
  54. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/editing-web-files.xcf
  55. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/emacs-style-completion.png
  56. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/emacsP.png
  57. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/emacsP16.png
  58. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/embedded-css.png
  59. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/embedded-xhtml.png
  60. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/fun-brain-2.png
  61. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/getitbuttons-1.png
  62. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/getitbuttons-1.xcf
  63. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/getitbuttons-2.png
  64. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/getitbuttons.png
  65. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/getitbuttons.xcf
  66. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/giraffe.jpg
  67. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/healthy_feet2.jpg
  68. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/itsalltext-pref.png
  69. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/links-appmenu.png
  70. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/nxml-where.png
  71. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/php-in-nxhtml-2.png
  72. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/php-in-nxhtml.png
  73. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/php-in-php.png
  74. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/php-in-xhtml.png
  75. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/popup-compl.png
  76. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/raindrops2.jpg
  77. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/region-selected-after.png
  78. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/region-selected-completion.png
  79. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/region-selected.png
  80. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/rembrandt-self-portrait.jpg
  81. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/style-in-nxhtml.png
  82. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/use-nXhtml-trans.png
  83. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/use-nXhtml-trans2.png
  84. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/use-nXhtml.png
  85. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/use-nXhtml.xcf
  86. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/validation-error.png
  87. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/volga.jpg
  88. BIN elpa-to-submit/nxhtml/nxhtml/doc/img/xml-validation-header.png
  89. BIN elpa-to-submit/nxhtml/nxhtml/doc/js/smoothgallery/css/img/carrow1.gif
  90. BIN elpa-to-submit/nxhtml/nxhtml/doc/js/smoothgallery/css/img/carrow2.gif
  91. BIN elpa-to-submit/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche1.gif
  92. BIN elpa-to-submit/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche1.png
  93. BIN elpa-to-submit/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche2.gif
  94. BIN elpa-to-submit/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche2.png
  95. BIN elpa-to-submit/nxhtml/nxhtml/doc/js/smoothgallery/css/img/loading-bar-black.gif
  96. BIN elpa-to-submit/nxhtml/nxhtml/doc/js/smoothgallery/css/img/open.gif
  97. BIN elpa-to-submit/nxhtml/nxhtml/doc/js/smoothgallery/css/img/open.png
  98. +0 −238 elpa-to-submit/nxhtml/nxhtml/doc/js/smoothgallery/css/jd.gallery.css
  99. +0 −91 elpa-to-submit/nxhtml/nxhtml/doc/js/smoothgallery/css/layout.css
  100. +0 −449 elpa-to-submit/nxhtml/nxhtml/doc/js/smoothgallery/scripts/jd.gallery.js
  101. +0 −2 elpa-to-submit/nxhtml/nxhtml/doc/js/smoothgallery/scripts/mootools.js
  102. +0 −4,078 elpa-to-submit/nxhtml/nxhtml/doc/js/smoothgallery/scripts/mootools.uncompressed.js
  103. +0 −3,064 elpa-to-submit/nxhtml/nxhtml/doc/nxhtml-changes.html
  104. +0 −100 elpa-to-submit/nxhtml/nxhtml/doc/nxhtml-old-multiple.html
  105. +0 −171 elpa-to-submit/nxhtml/nxhtml/doc/nxhtml.css
  106. +0 −967 elpa-to-submit/nxhtml/nxhtml/doc/nxhtml.html
  107. +0 −73 elpa-to-submit/nxhtml/nxhtml/doc/temp.css
  108. +0 −11 elpa-to-submit/nxhtml/nxhtml/doc/temp.htm
Sorry, we could not display the entire diff because too many files (480) changed.
View
1 elpa-to-submit/nxhtml/.nosearch
@@ -1 +0,0 @@
-See readme for how to setup nXhtml
View
707 elpa-to-submit/nxhtml/alts/javascript-mozlab.el
@@ -1,707 +0,0 @@
-;;; javascript.el --- Major mode for editing JavaScript source text
-
-;; Copyright (C) 2006 Karl Landström
-
-;; Author: Karl Landström <kland@comhem.se>
-;; Maintainer: Karl Landström <kland@comhem.se>
-;; Version: 2.0 Beta 8
-;; Date: 2006-12-26
-;; Keywords: languages, oop
-
-;; This file 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 file 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 GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-
-;;; Commentary:
-;;
-;; The main features of this JavaScript mode are syntactic
-;; highlighting (enabled with `font-lock-mode' or
-;; `global-font-lock-mode'), automatic indentation and filling of
-;; comments.
-;;
-;; This package has (only) been tested with GNU Emacs 21.4 (the latest
-;; stable release).
-;;
-;; Installation:
-;;
-;; Put this file in a directory where Emacs can find it (`C-h v
-;; load-path' for more info). Then add the following lines to your
-;; Emacs initialization file:
-;;
-;; (add-to-list 'auto-mode-alist '("\\.js\\'" . javascript-mode))
-;; (autoload 'javascript-mode "javascript" nil t)
-;;
-;; General Remarks:
-;;
-;; This mode assumes that block comments are not nested inside block
-;; comments and that strings do not contain line breaks.
-;;
-;; Exported names start with "javascript-" whereas private names start
-;; with "js-".
-;;
-;; Changes:
-;;
-;; See javascript.el.changelog.
-
-;;; Code:
-
-(require 'cc-mode)
-(require 'font-lock)
-(require 'newcomment)
-
-(defgroup javascript nil
- "Customization variables for `javascript-mode'."
- :tag "JavaScript"
- :group 'languages)
-
-(defcustom javascript-indent-level 4
- "Number of spaces for each indentation step."
- :type 'integer
- :group 'javascript)
-
-(defcustom javascript-auto-indent-flag t
- "Automatic indentation with punctuation characters. If non-nil, the
-current line is indented when certain punctuations are inserted."
- :type 'boolean
- :group 'javascript)
-
-
-;; --- Keymap ---
-
-(defvar javascript-mode-map nil
- "Keymap used in JavaScript mode.")
-
-(unless javascript-mode-map
- (setq javascript-mode-map (make-sparse-keymap)))
-
-(when javascript-auto-indent-flag
- (mapc (lambda (key)
- (define-key javascript-mode-map key 'javascript-insert-and-indent))
- '("{" "}" "(" ")" ":" ";" ",")))
-
-(defun javascript-insert-and-indent (key)
- "Run command bound to key and indent current line. Runs the command
-bound to KEY in the global keymap and indents the current line."
- (interactive (list (this-command-keys)))
- (call-interactively (lookup-key (current-global-map) key))
- (indent-according-to-mode))
-
-
-;; --- Syntax Table And Parsing ---
-
-(defvar javascript-mode-syntax-table
- (let ((table (make-syntax-table)))
- (c-populate-syntax-table table)
-
- ;; The syntax class of underscore should really be `symbol' ("_")
- ;; but that makes matching of tokens much more complex as e.g.
- ;; "\\<xyz\\>" matches part of e.g. "_xyz" and "xyz_abc". Defines
- ;; it as word constituent for now.
- (modify-syntax-entry ?_ "w" table)
-
- table)
- "Syntax table used in JavaScript mode.")
-
-
-(defun js-re-search-forward-inner (regexp &optional bound count)
- "Auxiliary function for `js-re-search-forward'."
- (let ((parse)
- (saved-point (point-min)))
- (while (> count 0)
- (re-search-forward regexp bound)
- (setq parse (parse-partial-sexp saved-point (point)))
- (cond ((nth 3 parse)
- (re-search-forward
- (concat "\\([^\\]\\|^\\)" (string (nth 3 parse)))
- (save-excursion (end-of-line) (point)) t))
- ((nth 7 parse)
- (forward-line))
- ((or (nth 4 parse)
- (and (eq (char-before) ?\/) (eq (char-after) ?\*)))
- (re-search-forward "\\*/"))
- (t
- (setq count (1- count))))
- (setq saved-point (point))))
- (point))
-
-
-(defun js-re-search-forward (regexp &optional bound noerror count)
- "Search forward but ignore strings and comments. Invokes
-`re-search-forward' but treats the buffer as if strings and
-comments have been removed."
- (let ((saved-point (point))
- (search-expr
- (cond ((null count)
- '(js-re-search-forward-inner regexp bound 1))
- ((< count 0)
- '(js-re-search-backward-inner regexp bound (- count)))
- ((> count 0)
- '(js-re-search-forward-inner regexp bound count)))))
- (condition-case err
- (eval search-expr)
- (search-failed
- (goto-char saved-point)
- (unless noerror
- (error (error-message-string err)))))))
-
-
-(defun js-re-search-backward-inner (regexp &optional bound count)
- "Auxiliary function for `js-re-search-backward'."
- (let ((parse)
- (saved-point (point-min)))
- (while (> count 0)
- (re-search-backward regexp bound)
- (when (and (> (point) (point-min))
- (save-excursion (backward-char) (looking-at "/[/*]")))
- (forward-char))
- (setq parse (parse-partial-sexp saved-point (point)))
- (cond ((nth 3 parse)
- (re-search-backward
- (concat "\\([^\\]\\|^\\)" (string (nth 3 parse)))
- (save-excursion (beginning-of-line) (point)) t))
- ((nth 7 parse)
- (goto-char (nth 8 parse)))
- ((or (nth 4 parse)
- (and (eq (char-before) ?/) (eq (char-after) ?*)))
- (re-search-backward "/\\*"))
- (t
- (setq count (1- count))))))
- (point))
-
-
-(defun js-re-search-backward (regexp &optional bound noerror count)
- "Search backward but ignore strings and comments. Invokes
-`re-search-backward' but treats the buffer as if strings and
-comments have been removed."
- (let ((saved-point (point))
- (search-expr
- (cond ((null count)
- '(js-re-search-backward-inner regexp bound 1))
- ((< count 0)
- '(js-re-search-forward-inner regexp bound (- count)))
- ((> count 0)
- '(js-re-search-backward-inner regexp bound count)))))
- (condition-case err
- (eval search-expr)
- (search-failed
- (goto-char saved-point)
- (unless noerror
- (error (error-message-string err)))))))
-
-
-(defun js-continued-var-decl-list-p ()
- "Return non-nil if point is inside a continued variable declaration
-list."
- (interactive)
- (let ((start (save-excursion (js-re-search-backward "\\<var\\>" nil t))))
- (and start
- (save-excursion (re-search-backward "\n" start t))
- (not (save-excursion
- (js-re-search-backward
- ";\\|[^, \t][ \t]*\\(/[/*]\\|$\\)" start t))))))
-
-
-;; --- Font Lock ---
-
-(defun js-inside-param-list-p ()
- "Return non-nil if point is inside a function parameter list."
- (condition-case err
- (save-excursion
- (up-list -1)
- (and (looking-at "(")
- (progn (backward-word 1)
- (or (looking-at "function")
- (progn (backward-word 1) (looking-at "function"))))))
- (error nil)))
-
-
-(defconst js-function-heading-1-re
- "^[ \t]*function[ \t]+\\(\\w+\\)"
- "Regular expression matching the start of a function header.")
-
-(defconst js-function-heading-2-re
- "^[ \t]*\\(\\w+\\)[ \t]*:[ \t]*function\\>"
- "Regular expression matching the start of a function entry in
- an associative array.")
-
-(defconst js-keyword-re
- (regexp-opt '("abstract" "break" "case" "catch" "class" "const"
- "continue" "debugger" "default" "delete" "do" "else"
- "enum" "export" "extends" "final" "finally" "for"
- "function" "goto" "if" "implements" "import" "in"
- "instanceof" "interface" "native" "new" "package"
- "private" "protected" "public" "return" "static"
- "super" "switch" "synchronized" "this" "throw"
- "throws" "transient" "try" "typeof" "var" "void"
- "volatile" "while" "with"
- "let") 'words)
- "Regular expression matching any JavaScript keyword.")
-
-(defconst js-basic-type-re
- (regexp-opt '("boolean" "byte" "char" "double" "float" "int" "long"
- "short" "void") 'words)
- "Regular expression matching any predefined type in JavaScript.")
-
-(defconst js-constant-re
- (regexp-opt '("false" "null" "true") 'words)
- "Regular expression matching any future reserved words in JavaScript.")
-
-
-(defconst js-font-lock-keywords-1
- (list
- "\\<import\\>"
- (list js-function-heading-1-re 1 font-lock-function-name-face)
- (list js-function-heading-2-re 1 font-lock-function-name-face)
- (list "[=(][ \t]*\\(/.*?[^\\]/\\w*\\)" 1 font-lock-string-face))
- "Level one font lock.")
-
-(defconst js-font-lock-keywords-2
- (append js-font-lock-keywords-1
- (list (list js-keyword-re 1 font-lock-keyword-face)
- (cons js-basic-type-re font-lock-type-face)
- (cons js-constant-re font-lock-constant-face)))
- "Level two font lock.")
-
-
-;; Limitations with variable declarations: There seems to be no
-;; sensible way to highlight variables occuring after an initialized
-;; variable in a variable list. For instance, in
-;;
-;; var x, y = f(a, b), z
-;;
-;; z will not be highlighted.
-
-(defconst js-font-lock-keywords-3
- (append
- js-font-lock-keywords-2
- (list
-
- ;; variable declarations
- (list
- (concat "\\<\\(const\\|var\\)\\>\\|" js-basic-type-re)
- (list "\\(\\w+\\)[ \t]*\\([=;].*\\|,\\|/[/*]\\|$\\)"
- nil
- nil
- '(1 font-lock-variable-name-face)))
-
- ;; continued variable declaration list
- (list
- (concat "^[ \t]*\\w+[ \t]*\\([,;=]\\|/[/*]\\|$\\)")
- (list "\\(\\w+\\)[ \t]*\\([=;].*\\|,\\|/[/*]\\|$\\)"
- '(if (save-excursion (backward-char) (js-continued-var-decl-list-p))
- (backward-word 1)
- (end-of-line))
- '(end-of-line)
- '(1 font-lock-variable-name-face)))
-
- ;; formal parameters
- (list
- (concat "\\<function\\>\\([ \t]+\\w+\\)?[ \t]*([ \t]*\\w")
- (list "\\(\\w+\\)\\([ \t]*).*\\)?"
- '(backward-char)
- '(end-of-line)
- '(1 font-lock-variable-name-face)))
-
- ;; continued formal parameter list
- (list
- (concat "^[ \t]*\\w+[ \t]*[,)]")
- (list "\\w+"
- '(if (save-excursion (backward-char) (js-inside-param-list-p))
- (backward-word 1)
- (end-of-line))
- '(end-of-line)
- '(0 font-lock-variable-name-face)))))
- "Level three font lock.")
-
-(defconst js-font-lock-keywords
- '(js-font-lock-keywords-3 js-font-lock-keywords-1 js-font-lock-keywords-2
- js-font-lock-keywords-3)
- "See `font-lock-keywords'.")
-
-
-;; --- Indentation ---
-
-(defconst js-possibly-braceless-keyword-re
- (regexp-opt
- '("catch" "do" "else" "finally" "for" "if" "try" "while" "with" "let")
- 'words)
- "Regular expression matching keywords that are optionally
- followed by an opening brace.")
-
-(defconst js-indent-operator-re
- (concat "[-+*/%<>=&^|?:.]\\([^-+*/]\\|$\\)\\|"
- (regexp-opt '("in" "instanceof") 'words))
- "Regular expression matching operators that affect indentation
- of continued expressions.")
-
-
-(defun js-looking-at-operator-p ()
- "Return non-nil if text after point is an operator (that is not
-a comma)."
- (save-match-data
- (and (looking-at js-indent-operator-re)
- (or (not (looking-at ":"))
- (save-excursion
- (and (js-re-search-backward "[?:{]\\|\\<case\\>" nil t)
- (looking-at "?")))))))
-
-
-(defun js-continued-expression-p ()
- "Returns non-nil if the current line continues an expression."
- (save-excursion
- (back-to-indentation)
- (or (js-looking-at-operator-p)
- (and (js-re-search-backward "\n" nil t)
- (progn
- (skip-chars-backward " \t")
- (backward-char)
- (and (> (point) (point-min))
- (save-excursion (backward-char) (not (looking-at "[/*]/")))
- (js-looking-at-operator-p)
- (and (progn (backward-char)
- (not (looking-at "++\\|--\\|/[/*]"))))))))))
-
-
-(defun js-end-of-do-while-loop-p ()
- "Returns non-nil if word after point is `while' of a do-while
-statement, else returns nil. A braceless do-while statement
-spanning several lines requires that the start of the loop is
-indented to the same column as the current line."
- (interactive)
- (save-excursion
- (save-match-data
- (when (looking-at "\\s-*\\<while\\>")
- (if (save-excursion
- (skip-chars-backward "[ \t\n]*}")
- (looking-at "[ \t\n]*}"))
- (save-excursion
- (backward-list) (backward-word 1) (looking-at "\\<do\\>"))
- (js-re-search-backward "\\<do\\>" (point-at-bol) t)
- (or (looking-at "\\<do\\>")
- (let ((saved-indent (current-indentation)))
- (while (and (js-re-search-backward "^[ \t]*\\<" nil t)
- (/= (current-indentation) saved-indent)))
- (and (looking-at "[ \t]*\\<do\\>")
- (not (js-re-search-forward
- "\\<while\\>" (point-at-eol) t))
- (= (current-indentation) saved-indent)))))))))
-
-
-(defun js-ctrl-statement-indentation ()
- "Returns the proper indentation of the current line if it
-starts the body of a control statement without braces, else
-returns nil."
- (save-excursion
- (back-to-indentation)
- (when (save-excursion
- (and (not (looking-at "[{]"))
- (progn
- (js-re-search-backward "[[:graph:]]" nil t)
- (forward-char)
- (when (= (char-before) ?\)) (backward-list))
- (skip-syntax-backward " ")
- (skip-syntax-backward "w")
- (looking-at js-possibly-braceless-keyword-re))
- (not (js-end-of-do-while-loop-p))))
- (save-excursion
- (goto-char (match-beginning 0))
- (+ (current-indentation) javascript-indent-level)))))
-
-
-(defun js-proper-indentation (parse-status)
- "Return the proper indentation for the current line."
- (save-excursion
- (back-to-indentation)
- (let ((ctrl-stmt-indent (js-ctrl-statement-indentation))
- (same-indent-p (looking-at "[]})]\\|\\<case\\>\\|\\<default\\>"))
- (continued-expr-p (js-continued-expression-p)))
- (cond (ctrl-stmt-indent)
- ((js-continued-var-decl-list-p)
- (js-re-search-backward "\\<var\\>" nil t)
- (+ (current-indentation) javascript-indent-level))
- ((nth 1 parse-status)
- (goto-char (nth 1 parse-status))
- (if (looking-at "[({[][ \t]*\\(/[/*]\\|$\\)")
- (progn
- (skip-syntax-backward " ")
- (when (= (char-before) ?\)) (backward-list))
- (back-to-indentation)
- (cond (same-indent-p
- (current-column))
- (continued-expr-p
- (+ (current-column) (* 2 javascript-indent-level)))
- (t
- (+ (current-column) javascript-indent-level))))
- (unless same-indent-p
- (forward-char)
- (skip-chars-forward " \t"))
- (current-column)))
- (continued-expr-p javascript-indent-level)
- (t 0)))))
-
-
-(defun javascript-indent-line ()
- "Indent the current line as JavaScript source text."
- (interactive)
- (let ((parse-status
- (save-excursion (parse-partial-sexp (point-min) (point-at-bol))))
- (offset (- (current-column) (current-indentation))))
- (when (not (nth 8 parse-status))
- (indent-line-to (js-proper-indentation parse-status))
- (when (> offset 0) (forward-char offset)))))
-
-
-;; --- Filling ---
-
-;; FIXME: It should be possible to use the more sofisticated function
-;; `c-fill-paragraph' in `cc-cmds.el' instead. However, just setting
-;; `fill-paragraph-function' to `c-fill-paragraph' does not work;
-;; inside `c-fill-paragraph', `fill-paragraph-function' evaluates to
-;; nil!?
-
-(defun js-backward-paragraph ()
- "Move backward to start of paragraph. Postcondition: Point is at
-beginning of buffer or the previous line contains only whitespace."
- (forward-line -1)
- (while (not (or (bobp) (looking-at "^[ \t]*$")))
- (forward-line -1))
- (when (not (bobp)) (forward-line 1)))
-
-
-(defun js-forward-paragraph ()
- "Move forward to end of paragraph. Postcondition: Point is at
-end of buffer or the next line contains only whitespace."
- (forward-line 1)
- (while (not (or (eobp) (looking-at "^[ \t]*$")))
- (forward-line 1))
- (when (not (eobp)) (backward-char 1)))
-
-
-(defun js-fill-block-comment-paragraph (parse-status justify)
- "Fill current paragraph as a block comment. PARSE-STATUS is the
-result of `parse-partial-regexp' from beginning of buffer to
-point. JUSTIFY has the same meaning as in `fill-paragraph'."
- (let ((offset (save-excursion
- (goto-char (nth 8 parse-status)) (current-indentation))))
- (save-excursion
- (save-restriction
- (narrow-to-region (save-excursion
- (goto-char (nth 8 parse-status)) (point-at-bol))
- (save-excursion
- (goto-char (nth 8 parse-status))
- (re-search-forward "*/")))
- (narrow-to-region (save-excursion
- (js-backward-paragraph)
- (when (looking-at "^[ \t]*$") (forward-line 1))
- (point))
- (save-excursion
- (js-forward-paragraph)
- (when (looking-at "^[ \t]*$") (backward-char))
- (point)))
- (goto-char (point-min))
- (while (not (eobp))
- (delete-horizontal-space)
- (forward-line 1))
- (let ((fill-column (- fill-column offset))
- (fill-paragraph-function nil))
- (fill-paragraph justify))
-
- ;; In Emacs 21.4 as opposed to CVS Emacs 22,
- ;; `fill-paragraph' seems toadd a newline at the end of the
- ;; paragraph. Remove it!
- (goto-char (point-max))
- (when (looking-at "^$") (backward-delete-char 1))
-
- (goto-char (point-min))
- (while (not (eobp))
- (indent-to offset)
- (forward-line 1))))))
-
-
-(defun js-sline-comment-par-start ()
- "Return point at the beginning of the line where the current
-single-line comment paragraph starts."
- (save-excursion
- (beginning-of-line)
- (while (and (not (bobp))
- (looking-at "^[ \t]*//[ \t]*[[:graph:]]"))
- (forward-line -1))
- (unless (bobp) (forward-line 1))
- (point)))
-
-
-(defun js-sline-comment-par-end ()
- "Return point at end of current single-line comment paragraph."
- (save-excursion
- (beginning-of-line)
- (while (and (not (eobp))
- (looking-at "^[ \t]*//[ \t]*[[:graph:]]"))
- (forward-line 1))
- (unless (bobp) (backward-char))
- (point)))
-
-
-(defun js-sline-comment-offset (line)
- "Return the column at the start of the current single-line
-comment paragraph."
- (save-excursion
- (goto-line line)
- (re-search-forward "//" (point-at-eol))
- (goto-char (match-beginning 0))
- (current-column)))
-
-
-(defun js-sline-comment-text-offset (line)
- "Return the column at the start of the text of the current
-single-line comment paragraph."
- (save-excursion
- (goto-line line)
- (re-search-forward "//[ \t]*" (point-at-eol))
- (current-column)))
-
-
-(defun js-at-empty-sline-comment-p ()
- "Return non-nil if inside an empty single-line comment."
- (and (save-excursion
- (beginning-of-line)
- (not (looking-at "^.*//.*[[:graph:]]")))
- (save-excursion
- (re-search-backward "//" (point-at-bol) t))))
-
-
-(defun js-fill-sline-comments (parse-status justify)
- "Fill current paragraph as a sequence of single-line comments.
-PARSE-STATUS is the result of `parse-partial-regexp' from
-beginning of buffer to point. JUSTIFY has the same meaning as in
-`fill-paragraph'."
- (when (not (js-at-empty-sline-comment-p))
- (let* ((start (js-sline-comment-par-start))
- (start-line (1+ (count-lines (point-min) start)))
- (end (js-sline-comment-par-end))
- (offset (js-sline-comment-offset start-line))
- (text-offset (js-sline-comment-text-offset start-line)))
- (save-excursion
- (save-restriction
- (narrow-to-region start end)
- (goto-char (point-min))
- (while (re-search-forward "^[ \t]*//[ \t]*" nil t)
- (replace-match "")
- (forward-line 1))
- (let ((fill-paragraph-function nil)
- (fill-column (- fill-column text-offset)))
- (fill-paragraph justify))
-
- ;; In Emacs 21.4 as opposed to CVS Emacs 22,
- ;; `fill-paragraph' seems toadd a newline at the end of the
- ;; paragraph. Remove it!
- (goto-char (point-max))
- (when (looking-at "^$") (backward-delete-char 1))
-
- (goto-char (point-min))
- (while (not (eobp))
- (indent-to offset)
- (insert "//")
- (indent-to text-offset)
- (forward-line 1)))))))
-
-
-(defun js-trailing-comment-p (parse-status)
- "Return non-nil if inside a trailing comment. PARSE-STATUS is
-the result of `parse-partial-regexp' from beginning of buffer to
-point."
- (save-excursion
- (when (nth 4 parse-status)
- (goto-char (nth 8 parse-status))
- (skip-chars-backward " \t")
- (not (bolp)))))
-
-
-(defun js-block-comment-p (parse-status)
- "Return non-nil if inside a block comment. PARSE-STATUS is the
-result of `parse-partial-regexp' from beginning of buffer to
-point."
- (save-excursion
- (save-match-data
- (when (nth 4 parse-status)
- (goto-char (nth 8 parse-status))
- (looking-at "/\\*")))))
-
-
-(defun javascript-fill-paragraph (&optional justify)
- "If inside a comment, fill the current comment paragraph.
-Trailing comments are ignored."
- (interactive)
- (let ((parse-status (parse-partial-sexp (point-min) (point))))
- (when (and (nth 4 parse-status)
- (not (js-trailing-comment-p parse-status)))
- (if (js-block-comment-p parse-status)
- (js-fill-block-comment-paragraph parse-status justify)
- (js-fill-sline-comments parse-status justify))))
- t)
-
-
-;; --- Imenu ---
-
-(defconst js-imenu-generic-expression
- (list
- (list
- nil
- "function\\s-+\\(\\w+\\)\\s-*("
- 1))
- "Regular expression matching top level procedures. Used by imenu.")
-
-
-;; --- Main Function ---
-
-;;;###autoload
-(defun javascript-mode ()
- "Major mode for editing JavaScript source text.
-
-Key bindings:
-
-\\{javascript-mode-map}"
- (interactive)
- (kill-all-local-variables)
-
- (use-local-map javascript-mode-map)
- (set-syntax-table javascript-mode-syntax-table)
- (set (make-local-variable 'indent-line-function) 'javascript-indent-line)
- (set (make-local-variable 'font-lock-defaults) (list js-font-lock-keywords))
-
- (set (make-local-variable 'parse-sexp-ignore-comments) t)
-
- ;; Comments
- (setq comment-start "// ")
- (setq comment-end "")
- (set (make-local-variable 'fill-paragraph-function)
- 'javascript-fill-paragraph)
-
- ;; Make c-mark-function work
- (setq c-nonsymbol-token-regexp "!=\\|%=\\|&[&=]\\|\\*[/=]\\|\\+[+=]\\|-[=-]\\|/[*/=]\\|<\\(?:<=\\|[<=]\\)\\|==\\|>\\(?:>\\(?:>=\\|[=>]\\)\\|[=>]\\)\\|\\^=\\||[=|]\\|[]!%&(-,./:-?[{-~^-]"
- c-stmt-delim-chars "^;{}?:"
- c-syntactic-ws-end "[ \n
- \f/]"
- c-syntactic-eol "\\(\\s \\|/\\*\\([^*\n
-]\\|\\*[^/\n
-]\\)*\\*/\\)*\\(\\(/\\*\\([^*\n
-]\\|\\*[^/\n
-]\\)*\\|\\\\\\)?$\\|//\\)")
-
- ;; Imenu
- (setq imenu-case-fold-search nil)
- (set (make-local-variable 'imenu-generic-expression)
- js-imenu-generic-expression)
-
- (setq major-mode 'javascript-mode)
- (setq mode-name "JavaScript")
View
181 elpa-to-submit/nxhtml/alts/js2-font-lock-new.el
@@ -1,181 +0,0 @@
-;;; js2-fl-mode.el --- Jit lock support for js2
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-03-31T23:17:42+0200 Mon
-;; Version:
-;; Last-Updated: 2008-04-30T01:28:19+0200 Tue
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; Required feature `js2-font-lock-new' was not provided.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Just adds a new major mode `js2-fl-mode' that is just `js2-mode'
-;; with some small changes to support `jit-lock-mode'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; 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; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(let ((dir (file-name-directory
- (or load-file-name (buffer-file-name)))))
- (load (expand-file-name "js2-new" dir)))
-
-(defun js2-fontify-region (beg end &optional loudly)
- ;;(message "js2-fontify-region beg-end=%s-%s, min-max=%s-%s" beg end (point-min) (point-max))
- (let (interrupted
- (js2-compiler-strict-mode js2-mode-show-strict-warnings))
- (unwind-protect
- (progn
- ;;(js2-with-unmodifying-text-property-changes (js2-clear-face (point-min) (point-max)))
- (setq interrupted-p
- (catch 'interrupted
- (setq js2-mode-ast (js2-parse (current-buffer) nil))
- (js2-mode-fontify-regions)
- (js2-mode-show-warnings)
- (js2-mode-show-errors)
- ;; fix-me: Can't be used now since font-lock-keywords is not buffer local
- ;;(when font-lock-keywords (font-lock-fontify-keywords-region (point-min) (point-max)))
- )))
- (when interrupted
- (js2-with-unmodifying-text-property-changes
- (put-text-property beg end 'fontified nil))))))
-
-(defun js2-unfontify-region (beg end)
- (js2-mode-exit))
-
-(defun js2-extend-jit-lock-region-after-change (beg end old-len)
- "Function meant for `jit-lock-after-change-extend-region-functions'.
-Tell the js2 parser where there has been a change. The parser
-should check this list for what to do."
- ;; Handle jit-lock-chunk-size here:
- (setq jit-lock-chunk-size (1+ (buffer-size)))
- (setq js2-fl-changed (cons beg js2-fl-changed)))
-
-(defun js2-fl-mode ()
- "Major mode for editing JavaScript code."
- (interactive)
- (js2-mode-check-compat)
- (kill-all-local-variables)
- (set-syntax-table js2-mode-syntax-table)
- (use-local-map js2-mode-map)
- (setq major-mode 'js2-fl-mode
- mode-name "JavaScript-IDE-fl"
- comment-start "//" ; used by comment-region; don't change it
- comment-end "")
- (setq local-abbrev-table js2-mode-abbrev-table)
- (set (make-local-variable 'max-lisp-eval-depth)
- (max max-lisp-eval-depth 3000))
- (set (make-local-variable 'indent-line-function) #'js2-indent-line)
- (set (make-local-variable 'indent-region-function) #'js2-indent-region)
- (set (make-local-variable 'fill-paragraph-function) #'js2-fill-paragraph)
- (set (make-local-variable 'before-save-hook) #'js2-before-save)
- (set (make-local-variable 'next-error-function) #'js2-next-error)
- (set (make-local-variable 'beginning-of-defun-function) #'js2-beginning-of-defun)
- (set (make-local-variable 'end-of-defun-function) #'js2-end-of-defun)
- ;; We un-confuse `parse-partial-sexp' by setting syntax-table properties
- ;; for characters inside regexp literals.
- (set (make-local-variable 'parse-sexp-lookup-properties) t)
- ;; this is necessary to make `show-paren-function' work properly
- (set (make-local-variable 'parse-sexp-ignore-comments) t)
- ;; needed for M-x rgrep, among other things
- (put 'js2-mode 'find-tag-default-function #'js2-mode-find-tag)
-
- ;; some variables needed by cc-engine for paragraph-fill, etc.
- (setq c-buffer-is-cc-mode t
- c-comment-prefix-regexp js2-comment-prefix-regexp
- c-paragraph-start js2-paragraph-start
- c-paragraph-separate "$"
- c-syntactic-ws-start js2-syntactic-ws-start
- c-syntactic-ws-end js2-syntactic-ws-end
- c-syntactic-eol js2-syntactic-eol)
- (set (make-local-variable 'comment-start-skip) js2-comment-start-skip)
- (if js2-emacs22
- (c-setup-paragraph-variables))
-
-;;; ;; We do our own syntax highlighting based on the parse tree.
-;;; (if (fboundp #'font-lock-mode)
-;;; (font-lock-mode -1))
-;;; ;; Don't let forced fontification ruin our lovely highlighting.
-;;; (dolist (var '(font-lock-fontify-buffer-function
-;;; font-lock-unfontify-buffer-function
-;;; font-lock-fontify-region-function
-;;; font-lock-unfontify-region-function))
-;;; (set (make-local-variable var) (lambda (&rest args) t)))
- ;; Experiment: make reparse-delay longer for longer files.
- (if (plusp js2-dynamic-idle-timer-adjust)
- (setq js2-idle-timer-delay
- (* js2-idle-timer-delay
- (/ (point-max) js2-dynamic-idle-timer-adjust))))
-;;; (add-hook 'change-major-mode-hook #'js2-mode-exit nil t)
-;;; (add-hook 'after-change-functions #'js2-mode-edit nil t)
- (set (make-local-variable 'font-lock-fontify-region-function)
- 'js2-fontify-region)
- (set (make-local-variable 'font-lock-unfontify-region-function)
- 'js2-unfontify-region)
- (add-hook 'jit-lock-after-change-extend-region-functions
- 'js2-extend-jit-lock-region-after-change t t)
- (set (make-local-variable 'jit-lock-defer-time) js2-idle-timer-delay)
- (set (make-local-variable 'jit-lock-defer-timer) nil)
- (set (make-local-variable 'jit-lock-contextually) nil)
- (set (make-local-variable 'jit-lock-context-time) nil)
- (set (make-local-variable 'jit-lock-context-timer) nil)
- ;; Make jit-lock-chunk-size that big that it is just called one time:
- (set (make-local-variable 'jit-lock-chunk-size) (1+ (buffer-size)))
-
-;;; ;; From Karl's
-;;; (set-syntax-table javascript-mode-syntax-table)
-;;; (set (make-local-variable 'parse-sexp-ignore-comments) t)
-;;; (set (make-local-variable 'comment-start) "// ")
-;;; (set (make-local-variable 'comment-end) "")
-;;; (set (make-local-variable 'font-lock-defaults) nil)
-
- (setq imenu-create-index-function #' js2-mode-create-imenu-index)
- (imenu-add-to-menubar (concat "IM-" mode-name))
- (when js2-mirror-mode
- (js2-enter-mirror-mode))
- (add-to-invisibility-spec '(js2-outline . t))
- (set (make-local-variable 'line-move-ignore-invisible) t)
- (set (make-local-variable 'forward-sexp-function)
- #'js2-mode-forward-sexp)
- (setq js2-mode-functions-hidden nil
- js2-mode-comments-hidden nil)
-;;; (setq js2-mode-buffer-dirty-p t
-;;; js2-mode-parsing nil)
-;;; (js2-reparse)
- (jit-lock-register 'font-lock-fontify-region nil)
- ;;(js2-fontify-region (point-min) (point-max))
- (run-hooks 'js2-mode-hook))
-
-
-(provide 'js2-fl-mode)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; js2-fl-mode.el ends here
View
166 elpa-to-submit/nxhtml/alts/js2-font-lock.el
@@ -1,166 +0,0 @@
-;;; js2-fl-mode.el --- Jit lock support for js2
-;;
-;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Created: 2008-03-31T23:17:42+0200 Mon
-;; Version:
-;; Last-Updated:
-;; URL:
-;; Keywords:
-;; Compatibility:
-;;
-;; Features that might be required by this library:
-;;
-;; Required feature `js2-font-lock' was not provided.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Commentary:
-;;
-;; Just adds a new major mode `js2-fl-mode' that is just `js2-mode'
-;; with some small changes to support `jit-lock-mode'.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Change log:
-;;
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; 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; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;;; Code:
-
-(let ((dir (file-name-directory
- (or load-file-name (buffer-file-name)))))
- (load (expand-file-name "js2" dir)))
-
-(defun js2-fontify-region (beg end &optional loudly)
- (message "js2-fontify-region beg-end=%s-%s, min-max=%s-%s" beg end (point-min) (point-max))
- (let (interrupted
- (js2-compiler-strict-mode js2-mode-show-strict-warnings))
- (unwind-protect
- (progn
- ;;(js2-with-unmodifying-text-property-changes (js2-clear-face (point-min) (point-max)))
- (setq interrupted-p
- (catch 'interrupted
- (setq js2-mode-ast (js2-parse (current-buffer) nil))
- (js2-mode-show-errors)
- (js2-mode-show-warnings))))
- (when interrupted
- (js2-with-unmodifying-text-property-changes
- (put-text-property beg end 'fontified nil))))))
-
-(defun js2-unfontify-region (beg end)
- (js2-mode-exit))
-
-(defun js2-extend-jit-lock-region-after-change (beg end old-len)
- "Function meant for `jit-lock-after-change-extend-region-functions'.
-Tell the js2 parser where there has been a change. The parser
-should check this list for what to do."
- ;; Handle jit-lock-chunk-size here:
- (setq jit-lock-chunk-size (1+ (buffer-size)))
- (setq js2-fl-changed (cons beg js2-fl-changed)))
-
-(defun js2-fl-mode ()
- "Major mode for editing JavaScript code."
- (interactive)
- (js2-mode-check-compat)
- (kill-all-local-variables)
- (set-syntax-table js2-mode-syntax-table)
- (use-local-map js2-mode-map)
- (setq major-mode 'js2-fl-mode
- mode-name "JavaScript-IDE-fl"
- comment-start "//" ; used by comment-region; don't change it
- comment-end "")
- (set (make-local-variable 'max-lisp-eval-depth)
- (max max-lisp-eval-depth 3000))
- (set (make-local-variable 'indent-line-function) #'js2-indent-line)
- (set (make-local-variable 'indent-region-function) #'js2-indent-region)
- (set (make-local-variable 'fill-paragraph-function) #'js2-fill-paragraph)
- (set (make-local-variable 'before-save-hook) #'js2-before-save)
- ;; some variables needed by cc-engine for paragraph-fill, etc.
- (setq c-buffer-is-cc-mode t
- c-comment-prefix-regexp js2-comment-prefix-regexp
- c-paragraph-start js2-paragraph-start
- c-paragraph-separate "$"
- c-syntactic-ws-start js2-syntactic-ws-start
- c-syntactic-ws-end js2-syntactic-ws-end
- c-syntactic-eol js2-syntactic-eol)
- (set (make-local-variable 'comment-start-skip) js2-comment-start-skip)
- (if (>= emacs-major-version 22)
- (c-setup-paragraph-variables))
-
-;;; ;; We do our own syntax highlighting based on the parse tree.
-;;; (if (fboundp #'font-lock-mode)
-;;; (font-lock-mode -1))
-;;; ;; Don't let forced fontification ruin our lovely highlighting.
-;;; (dolist (var '(font-lock-fontify-buffer-function
-;;; font-lock-unfontify-buffer-function
-;;; font-lock-fontify-region-function
-;;; font-lock-unfontify-region-function))
-;;; (set (make-local-variable var) (lambda (&rest args) t)))
- ;; Experiment: make reparse-delay longer for longer files.
- (if (plusp js2-dynamic-idle-timer-adjust)
- (setq js2-idle-timer-delay
- (* js2-idle-timer-delay
- (/ (point-max) js2-dynamic-idle-timer-adjust))))
-;;; (add-hook 'change-major-mode-hook #'js2-mode-exit nil t)
-;;; (add-hook 'after-change-functions #'js2-mode-edit nil t)
- (set (make-local-variable 'font-lock-fontify-region-function)
- 'js2-fontify-region)
- (set (make-local-variable 'font-lock-unfontify-region-function)
- 'js2-unfontify-region)
- (add-hook 'jit-lock-after-change-extend-region-functions
- 'js2-extend-jit-lock-region-after-change t t)
- (set (make-local-variable 'jit-lock-defer-time) js2-idle-timer-delay)
- (set (make-local-variable 'jit-lock-defer-timer) nil)
- (set (make-local-variable 'jit-lock-contextually) nil)
- (set (make-local-variable 'jit-lock-context-time) nil)
- (set (make-local-variable 'jit-lock-context-timer) nil)
- ;; Make jit-lock-chunk-size that big that it is just called one time:
- (set (make-local-variable 'jit-lock-chunk-size) (1+ (buffer-size)))
-
-;;; ;; From Karl's
-;;; (set-syntax-table javascript-mode-syntax-table)
-;;; (set (make-local-variable 'parse-sexp-ignore-comments) t)
-;;; (set (make-local-variable 'comment-start) "// ")
-;;; (set (make-local-variable 'comment-end) "")
-;;; (set (make-local-variable 'font-lock-defaults) nil)
-
- ;; this needs work. see python-mode's version.
- (setq imenu-create-index-function #' js2-mode-create-imenu-index)
- (imenu-add-to-menubar (concat "IM-" mode-name))
- (when js2-mirror-mode
- (js2-enter-mirror-mode))
- (add-to-invisibility-spec '(js2-outline . t))
- (set (make-local-variable 'line-move-ignore-invisible) t)
- (set (make-local-variable 'forward-sexp-function)
- #'js2-mode-forward-sexp)
- (setq js2-mode-functions-hidden nil
- js2-mode-comments-hidden nil)
-;;; (setq js2-mode-buffer-dirty-p t
-;;; js2-mode-parsing nil)
-;;; (js2-reparse)
- (jit-lock-register 'font-lock-fontify-region nil)
- ;;(js2-fontify-region (point-min) (point-max))
- (run-hooks 'js2-mode-hook))
-
-
-(provide 'js2-fl-mode)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; js2-fl-mode.el ends here
View
11,356 elpa-to-submit/nxhtml/alts/js2-mumamo.el
0 additions, 11,356 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
11,302 elpa-to-submit/nxhtml/alts/js2-new.el
0 additions, 11,302 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1,103 elpa-to-submit/nxhtml/alts/php-mode-1.5.0.el
@@ -1,1103 +0,0 @@
-;;; php-mode.el --- major mode for editing PHP code
-
-;; Copyright (C) 1999, 2000, 2001, 2003, 2004 Turadg Aleahmad
-;; 2008 Aaron S. Hawley
-
-;; Maintainer: Aaron S. Hawley <ashawley at users.sourceforge.net>
-;; Author: Turadg Aleahmad, 1999-2004
-;; Keywords: php languages oop
-;; Created: 1999-05-17
-;; Modified: 2008-11-04
-;; X-URL: http://php-mode.sourceforge.net/
-
-(defconst php-mode-version-number "1.5.0"
- "PHP Mode version number.")
-
-;;; License
-
-;; This file 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 3
-;; of the License, or (at your option) any later version.
-
-;; This file 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 file; if not, write to the Free Software
-;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-;; 02110-1301, USA.
-
-;;; Usage
-
-;; Put this file in your Emacs lisp path (eg. site-lisp) and add to
-;; your .emacs file:
-;;
-;; (require 'php-mode)
-
-;; To use abbrev-mode, add lines like this:
-;; (add-hook 'php-mode-hook
-;; '(lambda () (define-abbrev php-mode-abbrev-table "ex" "extends")))
-
-;; To make php-mode compatible with html-mode, see http://php-mode.sf.net
-
-;; Many options available under Help:Customize
-;; Options specific to php-mode are in
-;; Programming/Languages/Php
-;; Since it inherits much functionality from c-mode, look there too
-;; Programming/Languages/C
-
-;;; Commentary:
-
-;; PHP mode is a major mode for editing PHP 3 and 4 source code. It's
-;; an extension of C mode; thus it inherits all C mode's navigation
-;; functionality. But it colors according to the PHP grammar and indents
-;; according to the PEAR coding guidelines. It also includes a couple
-;; handy IDE-type features such as documentation search and a source
-;; and class browser.
-
-;;; Contributors: (in chronological order)
-
-;; Juanjo, Torsten Martinsen, Vinai Kopp, Sean Champ, Doug Marcey,
-;; Kevin Blake, Rex McMaster, Mathias Meyer, Boris Folgmann, Roland
-;; Rosenfeld, Fred Yankowski, Craig Andrews, John Keller, Ryan
-;; Sammartino, ppercot, Valentin Funk, Stig Bakken, Gregory Stark,
-;; Chris Morris, Nils Rennebarth, Gerrit Riessen, Eric Mc Sween,
-;; Ville Skytta, Giacomo Tesio, Lennart Borgman, Stefan Monnier,
-;; Aaron S. Hawley, Ian Eure, Bill Lovett, Dias Badekas, David House
-
-;;; Changelog:
-
-;; 1.5
-;; Support function keywords like public, private and the ampersand
-;; character for function-based commands. Support abstract, final,
-;; static, public, private and protected keywords in Imenu. Fix
-;; reversed order of Imenu entries. Use font-lock-preprocessor-face
-;; for PHP and ASP tags. Make php-mode-modified a literal value
-;; rather than a computed string. Add date and time constants of
-;; PHP. (Dias Badekas) Fix false syntax highlighting of keywords
-;; because of underscore character. Change HTML indentation warning
-;; to match only HTML at the beginning of the line. Fix
-;; byte-compiler warnings. Clean-up whitespace and audited style
-;; consistency of code. Remove conditional bindings and XEmacs code
-;; that likely does nothing.
-;;
-;; 1.4
-;; Updated GNU GPL to version 3. Ported to Emacs 22 (CC mode
-;; 5.31). M-x php-mode-version shows version. Provide end-of-defun
-;; beginning-of-defun functionality. Support add-log library.
-;; Fix __CLASS__ constant (Ian Eure). Allow imenu to see visibility
-;; declarations -- "private", "public", "protected". (Bill Lovett)
-;;
-;; 1.3
-;; Changed the definition of # using a tip from Stefan
-;; Monnier to correct highlighting and indentation. (Lennart Borgman)
-;; Changed the highlighting of the HTML part. (Lennart Borgman)
-;;
-;; See the ChangeLog file included with the source package.
-
-
-;;; Code:
-
-(require 'speedbar)
-(require 'font-lock)
-(require 'cc-mode)
-(require 'cc-langs)
-(require 'custom)
-(require 'etags)
-(eval-when-compile
- (require 'regexp-opt))
-
-;; Local variables
-(defgroup php nil
- "Major mode `php-mode' for editing PHP code."
- :prefix "php-"
- :group 'languages)
-
-(defcustom php-default-face 'default
- "Default face in `php-mode' buffers."
- :type 'face
- :group 'php)
-
-(defcustom php-speedbar-config t
- "When set to true automatically configures Speedbar to observe PHP files.
-Ignores php-file patterns option; fixed to expression \"\\.\\(inc\\|php[s34]?\\)\""
- :type 'boolean
- :set (lambda (sym val)
- (set-default sym val)
- (if (and val (boundp 'speedbar))
- (speedbar-add-supported-extension
- "\\.\\(inc\\|php[s34]?\\|phtml\\)")))
- :group 'php)
-
-(defcustom php-mode-speedbar-open nil
- "Normally `php-mode' starts with the speedbar closed.
-Turning this on will open it whenever `php-mode' is loaded."
- :type 'boolean
- :set (lambda (sym val)
- (set-default sym val)
- (when val
- (speedbar 1)))
- :group 'php)
-
-(defvar php-imenu-generic-expression
- '(
- ("Private Methods"
- "^\\s-*\\(?:\\(?:abstract\\|final\\)\\s-+\\)?private\\s-+\\(?:static\\s-+\\)?function\\s-+\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*(" 1)
- ("Protected Methods"
- "^\\s-*\\(?:\\(?:abstract\\|final\\)\\s-+\\)?protected\\s-+\\(?:static\\s-+\\)?function\\s-+\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*(" 1)
- ("Public Methods"
- "^\\s-*\\(?:\\(?:abstract\\|final\\)\\s-+\\)?public\\s-+\\(?:static\\s-+\\)?function\\s-+\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*(" 1)
- ("Classes"
- "^\\s-*class\\s-+\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*" 1)
- ("All Functions"
- "^\\s-*\\(?:\\(?:abstract\\|final\\|private\\|protected\\|public\\|static\\)\\s-+\\)*function\\s-+\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*(" 1)
- )
- "Imenu generic expression for PHP Mode. See `imenu-generic-expression'."
- )
-
-(defcustom php-manual-url "http://www.php.net/manual/en/"
- "URL at which to find PHP manual.
-You can replace \"en\" with your ISO language code."
- :type 'string
- :group 'php)
-
-(defcustom php-search-url "http://www.php.net/"
- "URL at which to search for documentation on a word."
- :type 'string
- :group 'php)
-
-(defcustom php-completion-file ""
- "Path to the file which contains the function names known to PHP."
- :type 'string
- :group 'php)
-
-(defcustom php-manual-path ""
- "Path to the directory which contains the PHP manual."
- :type 'string
- :group 'php)
-
-;;;###autoload
-(defcustom php-file-patterns '("\\.php[s34]?\\'" "\\.phtml\\'" "\\.inc\\'")
- "List of file patterns for which to automatically invoke `php-mode'."
- :type '(repeat (regexp :tag "Pattern"))
- :set (lambda (sym val)
- (set-default sym val)
- (let ((php-file-patterns-temp val))
- (while php-file-patterns-temp
- (add-to-list 'auto-mode-alist
- (cons (car php-file-patterns-temp) 'php-mode))
- (setq php-file-patterns-temp (cdr php-file-patterns-temp)))))
- :group 'php)
-
-(defcustom php-mode-hook nil
- "List of functions to be executed on entry to `php-mode'."
- :type 'hook
- :group 'php)
-
-(defcustom php-mode-pear-hook nil
- "Hook called when a PHP PEAR file is opened with `php-mode'."
- :type 'hook
- :group 'php)
-
-(defcustom php-mode-force-pear nil
- "Normally PEAR coding rules are enforced only when the filename contains \"PEAR.\"
-Turning this on will force PEAR rules on all PHP files."
- :type 'boolean
- :group 'php)
-
-(defconst php-mode-modified "2008-11-04"
- "PHP Mode build date.")
-
-(defun php-mode-version ()
- "Display string describing the version of PHP mode."
- (interactive)
- (message "PHP mode %s of %s"
- php-mode-version-number php-mode-modified))
-
-(defconst php-beginning-of-defun-regexp
- "^\\s-*\\(?:\\(?:abstract\\|final\\|private\\|protected\\|public\\|static\\)\\s-+\\)*function\\s-+&?\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*("
- "Regular expression for a PHP function.")
-
-(defun php-beginning-of-defun (&optional arg)
- "Move to the beginning of the ARGth PHP function from point.
-Implements PHP version of `beginning-of-defun-function'."
- (interactive "p")
- (let ((arg (or arg 1)))
- (while (> arg 0)
- (re-search-backward php-beginning-of-defun-regexp
- nil 'noerror)
- (setq arg (1- arg)))
- (while (< arg 0)
- (end-of-line 1)
- (let ((opoint (point)))
- (beginning-of-defun 1)
- (forward-list 2)
- (forward-line 1)
- (if (eq opoint (point))
- (re-search-forward php-beginning-of-defun-regexp
- nil 'noerror))
- (setq arg (1+ arg))))))
-
-(defun php-end-of-defun (&optional arg)
- "Move the end of the ARGth PHP function from point.
-Implements PHP befsion of `end-of-defun-function'
-
-See `php-beginning-of-defun'."
- (interactive "p")
- (php-beginning-of-defun (- (or arg 1))))
-
-
-(defvar php-warned-bad-indent nil)
-(make-variable-buffer-local 'php-warned-bad-indent)
-
-;; Do it but tell it is not good if html tags in buffer.
-(defun php-check-html-for-indentation ()
- (let ((html-tag-re "^\\s-*</?\\sw+.*?>")
- (here (point)))
- (if (not (or (re-search-forward html-tag-re (line-end-position) t)
- (re-search-backward html-tag-re (line-beginning-position) t)))
- t
- (goto-char here)
- (setq php-warned-bad-indent t)
- (lwarn 'php-indent :warning
- "\n\t%s\n\t%s\n\t%s\n"
- "Indentation fails badly with mixed HTML and PHP."
- "Look for an Emacs Lisp library that supports \"multiple"
- "major modes\" like mumamo, mmm-mode or multi-mode.")
- nil)))
-
-(defun php-cautious-indent-region (start end &optional quiet)
- (if (or php-warned-bad-indent
- (php-check-html-for-indentation))
- (funcall 'c-indent-region start end quiet)))
-
-(defun php-cautious-indent-line ()
- (if (or php-warned-bad-indent
- (php-check-html-for-indentation))
- (funcall 'c-indent-line)))
-
-(defconst php-tags '("<?php" "?>" "<?" "<?="))
-(defconst php-tags-key (regexp-opt php-tags))
-
-(defconst php-block-stmt-1-kwds '("do" "else" "finally" "try"))
-(defconst php-block-stmt-2-kwds
- '("for" "if" "while" "switch" "foreach" "elseif" "catch all"))
-
-(defconst php-block-stmt-1-key
- (regexp-opt php-block-stmt-1-kwds))
-(defconst php-block-stmt-2-key
- (regexp-opt php-block-stmt-2-kwds))
-
-(defconst php-class-decl-kwds '("class" "interface"))
-
-(defconst php-class-key
- (concat
- "\\(" (regexp-opt php-class-decl-kwds) "\\)\\s-+"
- (c-lang-const c-symbol-key c) ;; Class name.
- "\\(\\s-+extends\\s-+" (c-lang-const c-symbol-key c) "\\)?" ;; Name of superclass.
- "\\(\\s-+implements\\s-+[^{]+{\\)?")) ;; List of any adopted protocols.
-
-;;;###autoload
-(define-derived-mode php-mode c-mode "PHP"
- "Major mode for editing PHP code.\n\n\\{php-mode-map}"
- (c-add-language 'php-mode 'c-mode)
-
-;; PHP doesn't have C-style macros.
-;; HACK: Overwrite this syntax with rules to match <?php and others.
-;; (c-lang-defconst c-opt-cpp-start php php-tags-key)
-;; (c-lang-defvar c-opt-cpp-start (c-lang-const c-opt-cpp-start))
- (set (make-local-variable 'c-opt-cpp-start) php-tags-key)
-;; (c-lang-defconst c-opt-cpp-start php php-tags-key)
-;; (c-lang-defvar c-opt-cpp-start (c-lang-const c-opt-cpp-start))
- (set (make-local-variable 'c-opt-cpp-prefix) php-tags-key)
-
- (c-set-offset 'cpp-macro 0)
-
-;; (c-lang-defconst c-block-stmt-1-kwds php php-block-stmt-1-kwds)
-;; (c-lang-defvar c-block-stmt-1-kwds (c-lang-const c-block-stmt-1-kwds))
- (set (make-local-variable 'c-block-stmt-1-key) php-block-stmt-1-key)
-
-;; (c-lang-defconst c-block-stmt-2-kwds php php-block-stmt-2-kwds)
-;; (c-lang-defvar c-block-stmt-2-kwds (c-lang-const c-block-stmt-2-kwds))
- (set (make-local-variable 'c-block-stmt-2-key) php-block-stmt-2-key)
-
- ;; Specify that cc-mode recognize Javadoc comment style
- (set (make-local-variable 'c-doc-comment-style)
- '((php-mode . javadoc)))
-
-;; (c-lang-defconst c-class-decl-kwds
-;; php php-class-decl-kwds)
- (set (make-local-variable 'c-class-key) php-class-key)
-
- (make-local-variable 'font-lock-defaults)
- (setq font-lock-defaults
- '((php-font-lock-keywords-1
- php-font-lock-keywords-2
- ;; Comment-out the next line if the font-coloring is too
- ;; extreme/ugly for you.
- php-font-lock-keywords-3)
- nil ; KEYWORDS-ONLY
- t ; CASE-FOLD
- (("_" . "w")) ; SYNTAX-ALIST
- nil)) ; SYNTAX-BEGIN
-
- ;; Electric behaviour must be turned off, they do not work since
- ;; they can not find the correct syntax in embedded PHP.
- ;;
- ;; Seems to work with narrowing so let it be on if the user prefers it.
- ;;(setq c-electric-flag nil)
-
- (setq font-lock-maximum-decoration t
- case-fold-search t ; PHP vars are case-sensitive
- imenu-generic-expression php-imenu-generic-expression)
-
- ;; Do not force newline at end of file. Such newlines can cause
- ;; trouble if the PHP file is included in another file before calls
- ;; to header() or cookie().
- (set (make-local-variable 'require-final-newline) nil)
- (set (make-local-variable 'next-line-add-newlines) nil)
-
- ;; PEAR coding standards
- (add-hook 'php-mode-pear-hook
- (lambda ()
- (set (make-local-variable 'tab-width) 4)
- (set (make-local-variable 'c-basic-offset) 4)
- (set (make-local-variable 'indent-tabs-mode) nil)
- (c-set-offset 'block-open' - )
- (c-set-offset 'block-close' 0 )) nil t)
-
- (if (or php-mode-force-pear
- (and (stringp buffer-file-name)
- (string-match "PEAR\\|pear"
- (buffer-file-name))
- (string-match "\\.php$" (buffer-file-name))))
- (run-hooks 'php-mode-pear-hook))
-
- (setq indent-line-function 'php-cautious-indent-line)
- (setq indent-region-function 'php-cautious-indent-region)
- (setq c-special-indent-hook nil)
-
- (set (make-local-variable 'beginning-of-defun-function)
- 'php-beginning-of-defun)
- (set (make-local-variable 'end-of-defun-function)
- 'php-end-of-defun)
- (set (make-local-variable 'open-paren-in-column-0-is-defun-start)
- nil)
- (set (make-local-variable 'defun-prompt-regexp)
- "^\\s-*function\\s-+&?\\s-*\\(\\(\\sw\\|\\s_\\)+\\)\\s-*")
- (set (make-local-variable 'add-log-current-defun-header-regexp)
- php-beginning-of-defun-regexp)
-
- (run-hooks 'php-mode-hook))
-
-;; Make a menu keymap (with a prompt string)
-;; and make it the menu bar item's definition.
-(define-key php-mode-map [menu-bar] (make-sparse-keymap))
-(define-key php-mode-map [menu-bar php]
- (cons "PHP" (make-sparse-keymap "PHP")))
-
-;; Define specific subcommands in this menu.
-(define-key php-mode-map [menu-bar php complete-function]
- '("Complete function name" . php-complete-function))
-(define-key php-mode-map
- [menu-bar php browse-manual]
- '("Browse manual" . php-browse-manual))
-(define-key php-mode-map
- [menu-bar php search-documentation]
- '("Search documentation" . php-search-documentation))
-
-;; Define function name completion function
-(defvar php-completion-table nil
- "Obarray of tag names defined in current tags table and functions known to PHP.")
-
-(defun php-complete-function ()
- "Perform function completion on the text around point.
-Completes to the set of names listed in the current tags table
-and the standard php functions.
-The string to complete is chosen in the same way as the default
-for \\[find-tag] (which see)."
- (interactive)
- (let ((pattern (php-get-pattern))
- beg
- completion
- (php-functions (php-completion-table)))
- (if (not pattern) (message "Nothing to complete")
- (search-backward pattern)
- (setq beg (point))
- (forward-char (length pattern))
- (setq completion (try-completion pattern php-functions nil))
- (cond ((eq completion t))
- ((null completion)
- (message "Can't find completion for \"%s\"" pattern)
- (ding))
- ((not (string= pattern completion))
- (delete-region beg (point))
- (insert completion))
- (t
- (message "Making completion list...")
- (with-output-to-temp-buffer "*Completions*"
- (display-completion-list
- (all-completions pattern php-functions)))
- (message "Making completion list...%s" "done"))))))
-
-(defun php-completion-table ()
- "Build variable `php-completion-table' on demand.
-The table includes the PHP functions and the tags from the
-current `tags-file-name'."
- (or (and tags-file-name
- (save-excursion (tags-verify-table tags-file-name))
- php-completion-table)
- (let ((tags-table
- (if (and tags-file-name
- (functionp 'etags-tags-completion-table))
- (with-current-buffer (get-file-buffer tags-file-name)
- (etags-tags-completion-table))
- nil))
- (php-table
- (cond ((and (not (string= "" php-completion-file))
- (file-readable-p php-completion-file))
- (php-build-table-from-file php-completion-file))
- (php-manual-path
- (php-build-table-from-path php-manual-path))
- (t nil))))
- (unless (or php-table tags-table)
- (error
- (concat "No TAGS file active nor are "
- "`php-completion-file' or `php-manual-path' set")))
- (when tags-table
- ;; Combine the tables.
- (mapatoms (lambda (sym) (intern (symbol-name sym) php-table))
- tags-table))
- (setq php-completion-table php-table))))
-
-(defun php-build-table-from-file (filename)
- (let ((table (make-vector 1022 0))
- (buf (find-file-noselect filename)))
- (save-excursion
- (set-buffer buf)
- (goto-char (point-min))
- (while (re-search-forward
- "^\\([-a-zA-Z0-9_.]+\\)\n"
- nil t)
- (intern (buffer-substring (match-beginning 1) (match-end 1))
- table)))
- (kill-buffer buf)
- table))
-
-(defun php-build-table-from-path (path)
- (let ((table (make-vector 1022 0))
- (files (directory-files
- path
- nil
- "^function\\..+\\.html$")))
- (mapc (lambda (file)
- (string-match "\\.\\([-a-zA-Z_0-9]+\\)\\.html$" file)
- (intern
- (replace-regexp-in-string
- "-" "_" (substring file (match-beginning 1) (match-end 1)) t)
- table))
- files)
- table))
-
-;; Find the pattern we want to complete
-;; find-tag-default from GNU Emacs etags.el
-(defun php-get-pattern ()
- (save-excursion
- (while (looking-at "\\sw\\|\\s_")
- (forward-char 1))
- (if (or (re-search-backward "\\sw\\|\\s_"
- (save-excursion (beginning-of-line) (point))
- t)
- (re-search-forward "\\(\\sw\\|\\s_\\)+"
- (save-excursion (end-of-line) (point))
- t))
- (progn (goto-char (match-end 0))
- (buffer-substring-no-properties
- (point)
- (progn (forward-sexp -1)
- (while (looking-at "\\s'")
- (forward-char 1))
- (point))))
- nil)))
-
-(defun php-show-arglist ()
- (interactive)
- (let* ((tagname (php-get-pattern))
- (buf (find-tag-noselect tagname nil nil))
- arglist)
- (save-excursion
- (set-buffer buf)
- (goto-char (point-min))
- (when (re-search-forward
- (format "function\\s-+%s\\s-*(\\([^{]*\\))" tagname)
- nil t)
- (setq arglist (buffer-substring-no-properties
- (match-beginning 1) (match-end 1)))))
- (if arglist
- (message "Arglist for %s: %s" tagname arglist)
- (message "Unknown function: %s" tagname))))
-
-;; Define function documentation function
-(defun php-search-documentation ()
- "Search PHP documentation for the word at point."
- (interactive)
- (browse-url (concat php-search-url (current-word t))))
-
-;; Define function for browsing manual
-(defun php-browse-manual ()
- "Bring up manual for PHP."
- (interactive)
- (browse-url php-manual-url))
-
-;; Define shortcut
-(define-key php-mode-map
- "\C-c\C-f"
- 'php-search-documentation)
-
-;; Define shortcut
-(define-key php-mode-map
- [(meta tab)]
- 'php-complete-function)
-
-;; Define shortcut
-(define-key php-mode-map
- "\C-c\C-m"
- 'php-browse-manual)
-
-;; Define shortcut
-(define-key php-mode-map
- '[(control .)]
- 'php-show-arglist)
-
-(defconst php-constants
- (eval-when-compile
- (regexp-opt
- '(;; core constants
- "__LINE__" "__FILE__"
- "__FUNCTION__" "__CLASS__" "__METHOD__"
- "PHP_OS" "PHP_VERSION"
- "TRUE" "FALSE" "NULL"
- "E_ERROR" "E_NOTICE" "E_PARSE" "E_WARNING" "E_ALL" "E_STRICT"
- "E_USER_ERROR" "E_USER_WARNING" "E_USER_NOTICE"
- "DEFAULT_INCLUDE_PATH" "PEAR_INSTALL_DIR" "PEAR_EXTENSION_DIR"
- "PHP_BINDIR" "PHP_LIBDIR" "PHP_DATADIR" "PHP_SYSCONFDIR"
- "PHP_LOCALSTATEDIR" "PHP_CONFIG_FILE_PATH"
- "PHP_EOL"
-
- ;; date and time constants
- "DATE_ATOM" "DATE_COOKIE" "DATE_ISO8601"
- "DATE_RFC822" "DATE_RFC850" "DATE_RFC1036" "DATE_RFC1123"
- "DATE_RFC2822" "DATE_RFC3339"
- "DATE_RSS" "DATE_W3C"
-
- ;; from ext/standard:
- "EXTR_OVERWRITE" "EXTR_SKIP" "EXTR_PREFIX_SAME"
- "EXTR_PREFIX_ALL" "EXTR_PREFIX_INVALID" "SORT_ASC" "SORT_DESC"
- "SORT_REGULAR" "SORT_NUMERIC" "SORT_STRING" "ASSERT_ACTIVE"
- "ASSERT_CALLBACK" "ASSERT_BAIL" "ASSERT_WARNING"
- "ASSERT_QUIET_EVAL" "CONNECTION_ABORTED" "CONNECTION_NORMAL"
- "CONNECTION_TIMEOUT" "M_E" "M_LOG2E" "M_LOG10E" "M_LN2"
- "M_LN10" "M_PI" "M_PI_2" "M_PI_4" "M_1_PI" "M_2_PI"
- "M_2_SQRTPI" "M_SQRT2" "M_SQRT1_2" "CRYPT_SALT_LENGTH"
- "CRYPT_STD_DES" "CRYPT_EXT_DES" "CRYPT_MD5" "CRYPT_BLOWFISH"
- "DIRECTORY_SEPARATOR" "SEEK_SET" "SEEK_CUR" "SEEK_END"
- "LOCK_SH" "LOCK_EX" "LOCK_UN" "LOCK_NB" "HTML_SPECIALCHARS"
- "HTML_ENTITIES" "ENT_COMPAT" "ENT_QUOTES" "ENT_NOQUOTES"
- "INFO_GENERAL" "INFO_CREDITS" "INFO_CONFIGURATION"
- "INFO_ENVIRONMENT" "INFO_VARIABLES" "INFO_LICENSE" "INFO_ALL"
- "CREDITS_GROUP" "CREDITS_GENERAL" "CREDITS_SAPI"
- "CREDITS_MODULES" "CREDITS_DOCS" "CREDITS_FULLPAGE"
- "CREDITS_QA" "CREDITS_ALL" "PHP_OUTPUT_HANDLER_START"
- "PHP_OUTPUT_HANDLER_CONT" "PHP_OUTPUT_HANDLER_END"
- "STR_PAD_LEFT" "STR_PAD_RIGHT" "STR_PAD_BOTH"
- "PATHINFO_DIRNAME" "PATHINFO_BASENAME" "PATHINFO_EXTENSION"
- "CHAR_MAX" "LC_CTYPE" "LC_NUMERIC" "LC_TIME" "LC_COLLATE"
- "LC_MONETARY" "LC_ALL" "LC_MESSAGES" "LOG_EMERG" "LOG_ALERT"
- "LOG_CRIT" "LOG_ERR" "LOG_WARNING" "LOG_NOTICE" "LOG_INFO"
- "LOG_DEBUG" "LOG_KERN" "LOG_USER" "LOG_MAIL" "LOG_DAEMON"
- "LOG_AUTH" "LOG_SYSLOG" "LOG_LPR" "LOG_NEWS" "LOG_UUCP"
- "LOG_CRON" "LOG_AUTHPRIV" "LOG_LOCAL0" "LOG_LOCAL1"
- "LOG_LOCAL2" "LOG_LOCAL3" "LOG_LOCAL4" "LOG_LOCAL5"
- "LOG_LOCAL6" "LOG_LOCAL7" "LOG_PID" "LOG_CONS" "LOG_ODELAY"
- "LOG_NDELAY" "LOG_NOWAIT" "LOG_PERROR"
-
- ;; Disabled by default because they slow buffer loading
- ;; If you have use for them, uncomment the strings
- ;; that you want colored.
- ;; To compile, you may have to increase 'max-specpdl-size'
-
- ;; from other bundled extensions:
-; "CAL_EASTER_TO_xxx" "VT_NULL" "VT_EMPTY" "VT_UI1" "VT_I2"
-; "VT_I4" "VT_R4" "VT_R8" "VT_BOOL" "VT_ERROR" "VT_CY" "VT_DATE"
-; "VT_BSTR" "VT_DECIMAL" "VT_UNKNOWN" "VT_DISPATCH" "VT_VARIANT"
-; "VT_I1" "VT_UI2" "VT_UI4" "VT_INT" "VT_UINT" "VT_ARRAY"
-; "VT_BYREF" "CP_ACP" "CP_MACCP" "CP_OEMCP" "CP_SYMBOL"
-; "CP_THREAD_ACP" "CP_UTF7" "CP_UTF8" "CPDF_PM_NONE"
-; "CPDF_PM_OUTLINES" "CPDF_PM_THUMBS" "CPDF_PM_FULLSCREEN"
-; "CPDF_PL_SINGLE" "CPDF_PL_1COLUMN" "CPDF_PL_2LCOLUMN"
-; "CPDF_PL_2RCOLUMN" "CURLOPT_PORT" "CURLOPT_FILE"
-; "CURLOPT_INFILE" "CURLOPT_INFILESIZE" "CURLOPT_URL"
-; "CURLOPT_PROXY" "CURLOPT_VERBOSE" "CURLOPT_HEADER"
-; "CURLOPT_HTTPHEADER" "CURLOPT_NOPROGRESS" "CURLOPT_NOBODY"
-; "CURLOPT_FAILONERROR" "CURLOPT_UPLOAD" "CURLOPT_POST"
-; "CURLOPT_FTPLISTONLY" "CURLOPT_FTPAPPEND" "CURLOPT_NETRC"
-; "CURLOPT_FOLLOWLOCATION" "CURLOPT_FTPASCII" "CURLOPT_PUT"
-; "CURLOPT_MUTE" "CURLOPT_USERPWD" "CURLOPT_PROXYUSERPWD"
-; "CURLOPT_RANGE" "CURLOPT_TIMEOUT" "CURLOPT_POSTFIELDS"
-; "CURLOPT_REFERER" "CURLOPT_USERAGENT" "CURLOPT_FTPPORT"
-; "CURLOPT_LOW_SPEED_LIMIT" "CURLOPT_LOW_SPEED_TIME"
-; "CURLOPT_RESUME_FROM" "CURLOPT_COOKIE" "CURLOPT_SSLCERT"
-; "CURLOPT_SSLCERTPASSWD" "CURLOPT_WRITEHEADER"
-; "CURLOPT_COOKIEFILE" "CURLOPT_SSLVERSION"
-; "CURLOPT_TIMECONDITION" "CURLOPT_TIMEVALUE"
-; "CURLOPT_CUSTOMREQUEST" "CURLOPT_STDERR" "CURLOPT_TRANSFERTEXT"
-; "CURLOPT_RETURNTRANSFER" "CURLOPT_QUOTE" "CURLOPT_POSTQUOTE"
-; "CURLOPT_INTERFACE" "CURLOPT_KRB4LEVEL"
-; "CURLOPT_HTTPPROXYTUNNEL" "CURLOPT_FILETIME"
-; "CURLOPT_WRITEFUNCTION" "CURLOPT_READFUNCTION"
-; "CURLOPT_PASSWDFUNCTION" "CURLOPT_HEADERFUNCTION"
-; "CURLOPT_MAXREDIRS" "CURLOPT_MAXCONNECTS" "CURLOPT_CLOSEPOLICY"
-; "CURLOPT_FRESH_CONNECT" "CURLOPT_FORBID_REUSE"
-; "CURLOPT_RANDOM_FILE" "CURLOPT_EGDSOCKET"
-; "CURLOPT_CONNECTTIMEOUT" "CURLOPT_SSL_VERIFYPEER"
-; "CURLOPT_CAINFO" "CURLOPT_BINARYTRANSER"
-; "CURLCLOSEPOLICY_LEAST_RECENTLY_USED" "CURLCLOSEPOLICY_OLDEST"
-; "CURLINFO_EFFECTIVE_URL" "CURLINFO_HTTP_CODE"
-; "CURLINFO_HEADER_SIZE" "CURLINFO_REQUEST_SIZE"
-; "CURLINFO_TOTAL_TIME" "CURLINFO_NAMELOOKUP_TIME"
-; "CURLINFO_CONNECT_TIME" "CURLINFO_PRETRANSFER_TIME"
-; "CURLINFO_SIZE_UPLOAD" "CURLINFO_SIZE_DOWNLOAD"
-; "CURLINFO_SPEED_DOWNLOAD" "CURLINFO_SPEED_UPLOAD"
-; "CURLINFO_FILETIME" "CURLE_OK" "CURLE_UNSUPPORTED_PROTOCOL"
-; "CURLE_FAILED_INIT" "CURLE_URL_MALFORMAT"
-; "CURLE_URL_MALFORMAT_USER" "CURLE_COULDNT_RESOLVE_PROXY"
-; "CURLE_COULDNT_RESOLVE_HOST" "CURLE_COULDNT_CONNECT"
-; "CURLE_FTP_WEIRD_SERVER_REPLY" "CURLE_FTP_ACCESS_DENIED"
-; "CURLE_FTP_USER_PASSWORD_INCORRECT"
-; "CURLE_FTP_WEIRD_PASS_REPLY" "CURLE_FTP_WEIRD_USER_REPLY"
-; "CURLE_FTP_WEIRD_PASV_REPLY" "CURLE_FTP_WEIRD_227_FORMAT"
-; "CURLE_FTP_CANT_GET_HOST" "CURLE_FTP_CANT_RECONNECT"
-; "CURLE_FTP_COULDNT_SET_BINARY" "CURLE_PARTIAL_FILE"
-; "CURLE_FTP_COULDNT_RETR_FILE" "CURLE_FTP_WRITE_ERROR"
-; "CURLE_FTP_QUOTE_ERROR" "CURLE_HTTP_NOT_FOUND"
-; "CURLE_WRITE_ERROR" "CURLE_MALFORMAT_USER"
-; "CURLE_FTP_COULDNT_STOR_FILE" "CURLE_READ_ERROR"
-; "CURLE_OUT_OF_MEMORY" "CURLE_OPERATION_TIMEOUTED"
-; "CURLE_FTP_COULDNT_SET_ASCII" "CURLE_FTP_PORT_FAILED"
-; "CURLE_FTP_COULDNT_USE_REST" "CURLE_FTP_COULDNT_GET_SIZE"
-; "CURLE_HTTP_RANGE_ERROR" "CURLE_HTTP_POST_ERROR"
-; "CURLE_SSL_CONNECT_ERROR" "CURLE_FTP_BAD_DOWNLOAD_RESUME"
-; "CURLE_FILE_COULDNT_READ_FILE" "CURLE_LDAP_CANNOT_BIND"
-; "CURLE_LDAP_SEARCH_FAILED" "CURLE_LIBRARY_NOT_FOUND"
-; "CURLE_FUNCTION_NOT_FOUND" "CURLE_ABORTED_BY_CALLBACK"
-; "CURLE_BAD_FUNCTION_ARGUMENT" "CURLE_BAD_CALLING_ORDER"
-; "CURLE_HTTP_PORT_FAILED" "CURLE_BAD_PASSWORD_ENTERED"
-; "CURLE_TOO_MANY_REDIRECTS" "CURLE_UNKOWN_TELNET_OPTION"
-; "CURLE_TELNET_OPTION_SYNTAX" "CURLE_ALREADY_COMPLETE"
-; "DBX_MYSQL" "DBX_ODBC" "DBX_PGSQL" "DBX_MSSQL" "DBX_PERSISTENT"
-; "DBX_RESULT_INFO" "DBX_RESULT_INDEX" "DBX_RESULT_ASSOC"
-; "DBX_CMP_TEXT" "DBX_CMP_NUMBER" "XML_ELEMENT_NODE"
-; "XML_ATTRIBUTE_NODE" "XML_TEXT_NODE" "XML_CDATA_SECTION_NODE"
-; "XML_ENTITY_REF_NODE" "XML_ENTITY_NODE" "XML_PI_NODE"
-; "XML_COMMENT_NODE" "XML_DOCUMENT_NODE" "XML_DOCUMENT_TYPE_NODE"
-; "XML_DOCUMENT_FRAG_NODE" "XML_NOTATION_NODE"
-; "XML_HTML_DOCUMENT_NODE" "XML_DTD_NODE" "XML_ELEMENT_DECL_NODE"
-; "XML_ATTRIBUTE_DECL_NODE" "XML_ENTITY_DECL_NODE"
-; "XML_NAMESPACE_DECL_NODE" "XML_GLOBAL_NAMESPACE"
-; "XML_LOCAL_NAMESPACE" "XML_ATTRIBUTE_CDATA" "XML_ATTRIBUTE_ID"
-; "XML_ATTRIBUTE_IDREF" "XML_ATTRIBUTE_IDREFS"
-; "XML_ATTRIBUTE_ENTITY" "XML_ATTRIBUTE_NMTOKEN"
-; "XML_ATTRIBUTE_NMTOKENS" "XML_ATTRIBUTE_ENUMERATION"
-; "XML_ATTRIBUTE_NOTATION" "XPATH_UNDEFINED" "XPATH_NODESET"
-; "XPATH_BOOLEAN" "XPATH_NUMBER" "XPATH_STRING" "XPATH_POINT"
-; "XPATH_RANGE" "XPATH_LOCATIONSET" "XPATH_USERS" "FBSQL_ASSOC"
-; "FBSQL_NUM" "FBSQL_BOTH" "FDFValue" "FDFStatus" "FDFFile"
-; "FDFID" "FDFFf" "FDFSetFf" "FDFClearFf" "FDFFlags" "FDFSetF"
-; "FDFClrF" "FDFAP" "FDFAS" "FDFAction" "FDFAA" "FDFAPRef"
-; "FDFIF" "FDFEnter" "FDFExit" "FDFDown" "FDFUp" "FDFFormat"
-; "FDFValidate" "FDFKeystroke" "FDFCalculate"
-; "FRIBIDI_CHARSET_UTF8" "FRIBIDI_CHARSET_8859_6"
-; "FRIBIDI_CHARSET_8859_8" "FRIBIDI_CHARSET_CP1255"
-; "FRIBIDI_CHARSET_CP1256" "FRIBIDI_CHARSET_ISIRI_3342"
-; "FTP_ASCII" "FTP_BINARY" "FTP_IMAGE" "FTP_TEXT" "IMG_GIF"
-; "IMG_JPG" "IMG_JPEG" "IMG_PNG" "IMG_WBMP" "IMG_COLOR_TILED"
-; "IMG_COLOR_STYLED" "IMG_COLOR_BRUSHED"
-; "IMG_COLOR_STYLEDBRUSHED" "IMG_COLOR_TRANSPARENT"
-; "IMG_ARC_ROUNDED" "IMG_ARC_PIE" "IMG_ARC_CHORD"
-; "IMG_ARC_NOFILL" "IMG_ARC_EDGED" "GMP_ROUND_ZERO"
-; "GMP_ROUND_PLUSINF" "GMP_ROUND_MINUSINF" "HW_ATTR_LANG"
-; "HW_ATTR_NR" "HW_ATTR_NONE" "IIS_READ" "IIS_WRITE"
-; "IIS_EXECUTE" "IIS_SCRIPT" "IIS_ANONYMOUS" "IIS_BASIC"
-; "IIS_NTLM" "NIL" "OP_DEBUG" "OP_READONLY" "OP_ANONYMOUS"
-; "OP_SHORTCACHE" "OP_SILENT" "OP_PROTOTYPE" "OP_HALFOPEN"
-; "OP_EXPUNGE" "OP_SECURE" "CL_EXPUNGE" "FT_UID" "FT_PEEK"
-; "FT_NOT" "FT_INTERNAL" "FT_PREFETCHTEXT" "ST_UID" "ST_SILENT"
-; "ST_SET" "CP_UID" "CP_MOVE" "SE_UID" "SE_FREE" "SE_NOPREFETCH"
-; "SO_FREE" "SO_NOSERVER" "SA_MESSAGES" "SA_RECENT" "SA_UNSEEN"
-; "SA_UIDNEXT" "SA_UIDVALIDITY" "SA_ALL" "LATT_NOINFERIORS"
-; "LATT_NOSELECT" "LATT_MARKED" "LATT_UNMARKED" "SORTDATE"
-; "SORTARRIVAL" "SORTFROM" "SORTSUBJECT" "SORTTO" "SORTCC"
-; "SORTSIZE" "TYPETEXT" "TYPEMULTIPART" "TYPEMESSAGE"
-; "TYPEAPPLICATION" "TYPEAUDIO" "TYPEIMAGE" "TYPEVIDEO"
-; "TYPEOTHER" "ENC7BIT" "ENC8BIT" "ENCBINARY" "ENCBASE64"
-; "ENCQUOTEDPRINTABLE" "ENCOTHER" "INGRES_ASSOC" "INGRES_NUM"
-; "INGRES_BOTH" "IBASE_DEFAULT" "IBASE_TEXT" "IBASE_UNIXTIME"
-; "IBASE_READ" "IBASE_COMMITTED" "IBASE_CONSISTENCY"
-; "IBASE_NOWAIT" "IBASE_TIMESTAMP" "IBASE_DATE" "IBASE_TIME"
-; "LDAP_DEREF_NEVER" "LDAP_DEREF_SEARCHING" "LDAP_DEREF_FINDING"
-; "LDAP_DEREF_ALWAYS" "LDAP_OPT_DEREF" "LDAP_OPT_SIZELIMIT"
-; "LDAP_OPT_TIMELIMIT" "LDAP_OPT_PROTOCOL_VERSION"
-; "LDAP_OPT_ERROR_NUMBER" "LDAP_OPT_REFERRALS" "LDAP_OPT_RESTART"
-; "LDAP_OPT_HOST_NAME" "LDAP_OPT_ERROR_STRING"
-; "LDAP_OPT_MATCHED_DN" "LDAP_OPT_SERVER_CONTROLS"
-; "LDAP_OPT_CLIENT_CONTROLS" "GSLC_SSL_NO_AUTH"
-; "GSLC_SSL_ONEWAY_AUTH" "GSLC_SSL_TWOWAY_AUTH" "MCAL_SUNDAY"
-; "MCAL_MONDAY" "MCAL_TUESDAY" "MCAL_WEDNESDAY" "MCAL_THURSDAY"
-; "MCAL_FRIDAY" "MCAL_SATURDAY" "MCAL_JANUARY" "MCAL_FEBRUARY"
-; "MCAL_MARCH" "MCAL_APRIL" "MCAL_MAY" "MCAL_JUNE" "MCAL_JULY"
-; "MCAL_AUGUST" "MCAL_SEPTEMBER" "MCAL_OCTOBER" "MCAL_NOVEMBER"
-; "MCAL_RECUR_NONE" "MCAL_RECUR_DAILY" "MCAL_RECUR_WEEKLY"
-; "MCAL_RECUR_MONTHLY_MDAY" "MCAL_RECUR_MONTHLY_WDAY"
-; "MCAL_RECUR_YEARLY" "MCAL_M_SUNDAY" "MCAL_M_MONDAY"
-; "MCAL_M_TUESDAY" "MCAL_M_WEDNESDAY" "MCAL_M_THURSDAY"
-; "MCAL_M_FRIDAY" "MCAL_M_SATURDAY" "MCAL_M_WEEKDAYS"
-; "MCAL_M_WEEKEND" "MCAL_M_ALLDAYS" "MCRYPT_" "MCRYPT_"
-; "MCRYPT_ENCRYPT" "MCRYPT_DECRYPT" "MCRYPT_DEV_RANDOM"
-; "MCRYPT_DEV_URANDOM" "MCRYPT_RAND" "SWFBUTTON_HIT"
-; "SUNFUNCS_RET_STRING" "SUNFUNCS_RET_DOUBLE"
-; "SWFBUTTON_DOWN" "SWFBUTTON_OVER" "SWFBUTTON_UP"
-; "SWFBUTTON_MOUSEUPOUTSIDE" "SWFBUTTON_DRAGOVER"
-; "SWFBUTTON_DRAGOUT" "SWFBUTTON_MOUSEUP" "SWFBUTTON_MOUSEDOWN"
-; "SWFBUTTON_MOUSEOUT" "SWFBUTTON_MOUSEOVER"
-; "SWFFILL_RADIAL_GRADIENT" "SWFFILL_LINEAR_GRADIENT"
-; "SWFFILL_TILED_BITMAP" "SWFFILL_CLIPPED_BITMAP"
-; "SWFTEXTFIELD_HASLENGTH" "SWFTEXTFIELD_NOEDIT"
-; "SWFTEXTFIELD_PASSWORD" "SWFTEXTFIELD_MULTILINE"
-; "SWFTEXTFIELD_WORDWRAP" "SWFTEXTFIELD_DRAWBOX"
-; "SWFTEXTFIELD_NOSELECT" "SWFTEXTFIELD_HTML"
-; "SWFTEXTFIELD_ALIGN_LEFT" "SWFTEXTFIELD_ALIGN_RIGHT"
-; "SWFTEXTFIELD_ALIGN_CENTER" "SWFTEXTFIELD_ALIGN_JUSTIFY"
-; "UDM_FIELD_URLID" "UDM_FIELD_URL" "UDM_FIELD_CONTENT"
-; "UDM_FIELD_TITLE" "UDM_FIELD_KEYWORDS" "UDM_FIELD_DESC"
-; "UDM_FIELD_DESCRIPTION" "UDM_FIELD_TEXT" "UDM_FIELD_SIZE"
-; "UDM_FIELD_RATING" "UDM_FIELD_SCORE" "UDM_FIELD_MODIFIED"
-; "UDM_FIELD_ORDER" "UDM_FIELD_CRC" "UDM_FIELD_CATEGORY"
-; "UDM_PARAM_PAGE_SIZE" "UDM_PARAM_PAGE_NUM"
-; "UDM_PARAM_SEARCH_MODE" "UDM_PARAM_CACHE_MODE"
-; "UDM_PARAM_TRACK_MODE" "UDM_PARAM_PHRASE_MODE"
-; "UDM_PARAM_CHARSET" "UDM_PARAM_STOPTABLE"
-; "UDM_PARAM_STOP_TABLE" "UDM_PARAM_STOPFILE"
-; "UDM_PARAM_STOP_FILE" "UDM_PARAM_WEIGHT_FACTOR"
-; "UDM_PARAM_WORD_MATCH" "UDM_PARAM_MAX_WORD_LEN"
-; "UDM_PARAM_MAX_WORDLEN" "UDM_PARAM_MIN_WORD_LEN"
-; "UDM_PARAM_MIN_WORDLEN" "UDM_PARAM_ISPELL_PREFIXES"
-; "UDM_PARAM_ISPELL_PREFIX" "UDM_PARAM_PREFIXES"
-; "UDM_PARAM_PREFIX" "UDM_PARAM_CROSS_WORDS"
-; "UDM_PARAM_CROSSWORDS" "UDM_LIMIT_CAT" "UDM_LIMIT_URL"
-; "UDM_LIMIT_TAG" "UDM_LIMIT_LANG" "UDM_LIMIT_DATE"
-; "UDM_PARAM_FOUND" "UDM_PARAM_NUM_ROWS" "UDM_PARAM_WORDINFO"
-; "UDM_PARAM_WORD_INFO" "UDM_PARAM_SEARCHTIME"
-; "UDM_PARAM_SEARCH_TIME" "UDM_PARAM_FIRST_DOC"
-; "UDM_PARAM_LAST_DOC" "UDM_MODE_ALL" "UDM_MODE_ANY"
-; "UDM_MODE_BOOL" "UDM_MODE_PHRASE" "UDM_CACHE_ENABLED"
-; "UDM_CACHE_DISABLED" "UDM_TRACK_ENABLED" "UDM_TRACK_DISABLED"
-; "UDM_PHRASE_ENABLED" "UDM_PHRASE_DISABLED"
-; "UDM_CROSS_WORDS_ENABLED" "UDM_CROSSWORDS_ENABLED"
-; "UDM_CROSS_WORDS_DISABLED" "UDM_CROSSWORDS_DISABLED"
-; "UDM_PREFIXES_ENABLED" "UDM_PREFIX_ENABLED"
-; "UDM_ISPELL_PREFIXES_ENABLED" "UDM_ISPELL_PREFIX_ENABLED"
-; "UDM_PREFIXES_DISABLED" "UDM_PREFIX_DISABLED"
-; "UDM_ISPELL_PREFIXES_DISABLED" "UDM_ISPELL_PREFIX_DISABLED"
-; "UDM_ISPELL_TYPE_AFFIX" "UDM_ISPELL_TYPE_SPELL"
-; "UDM_ISPELL_TYPE_DB" "UDM_ISPELL_TYPE_SERVER" "UDM_MATCH_WORD"
-; "UDM_MATCH_BEGIN" "UDM_MATCH_SUBSTR" "UDM_MATCH_END"
-; "MSQL_ASSOC" "MSQL_NUM" "MSQL_BOTH" "MYSQL_ASSOC" "MYSQL_NUM"
-; "MYSQL_BOTH" "MYSQL_USE_RESULT" "MYSQL_STORE_RESULT"
-; "OCI_DEFAULT" "OCI_DESCRIBE_ONLY" "OCI_COMMIT_ON_SUCCESS"
-; "OCI_EXACT_FETCH" "SQLT_BFILEE" "SQLT_CFILEE" "SQLT_CLOB"
-; "SQLT_BLOB" "SQLT_RDD" "OCI_B_SQLT_NTY" "OCI_SYSDATE"
-; "OCI_B_BFILE" "OCI_B_CFILEE" "OCI_B_CLOB" "OCI_B_BLOB"
-; "OCI_B_ROWID" "OCI_B_CURSOR" "OCI_B_BIN" "OCI_ASSOC" "OCI_NUM"
-; "OCI_BOTH" "OCI_RETURN_NULLS" "OCI_RETURN_LOBS"
-; "OCI_DTYPE_FILE" "OCI_DTYPE_LOB" "OCI_DTYPE_ROWID" "OCI_D_FILE"
-; "OCI_D_LOB" "OCI_D_ROWID" "ODBC_TYPE" "ODBC_BINMODE_PASSTHRU"
-; "ODBC_BINMODE_RETURN" "ODBC_BINMODE_CONVERT" "SQL_ODBC_CURSORS"
-; "SQL_CUR_USE_DRIVER" "SQL_CUR_USE_IF_NEEDED" "SQL_CUR_USE_ODBC"
-; "SQL_CONCURRENCY" "SQL_CONCUR_READ_ONLY" "SQL_CONCUR_LOCK"
-; "SQL_CONCUR_ROWVER" "SQL_CONCUR_VALUES" "SQL_CURSOR_TYPE"
-; "SQL_CURSOR_FORWARD_ONLY" "SQL_CURSOR_KEYSET_DRIVEN"
-; "SQL_CURSOR_DYNAMIC" "SQL_CURSOR_STATIC" "SQL_KEYSET_SIZE"
-; "SQL_CHAR" "SQL_VARCHAR" "SQL_LONGVARCHAR" "SQL_DECIMAL"
-; "SQL_NUMERIC" "SQL_BIT" "SQL_TINYINT" "SQL_SMALLINT"
-; "SQL_INTEGER" "SQL_BIGINT" "SQL_REAL" "SQL_FLOAT" "SQL_DOUBLE"
-; "SQL_BINARY" "SQL_VARBINARY" "SQL_LONGVARBINARY" "SQL_DATE"
-; "SQL_TIME" "SQL_TIMESTAMP" "SQL_TYPE_DATE" "SQL_TYPE_TIME"
-; "SQL_TYPE_TIMESTAMP" "SQL_BEST_ROWID" "SQL_ROWVER"
-; "SQL_SCOPE_CURROW" "SQL_SCOPE_TRANSACTION" "SQL_SCOPE_SESSION"
-; "SQL_NO_NULLS" "SQL_NULLABLE" "SQL_INDEX_UNIQUE"
-; "SQL_INDEX_ALL" "SQL_ENSURE" "SQL_QUICK"
-; "X509_PURPOSE_SSL_CLIENT" "X509_PURPOSE_SSL_SERVER"
-; "X509_PURPOSE_NS_SSL_SERVER" "X509_PURPOSE_SMIME_SIGN"
-; "X509_PURPOSE_SMIME_ENCRYPT" "X509_PURPOSE_CRL_SIGN"
-; "X509_PURPOSE_ANY" "PKCS7_DETACHED" "PKCS7_TEXT"
-; "PKCS7_NOINTERN" "PKCS7_NOVERIFY" "PKCS7_NOCHAIN"
-; "PKCS7_NOCERTS" "PKCS7_NOATTR" "PKCS7_BINARY" "PKCS7_NOSIGS"
-; "OPENSSL_PKCS1_PADDING" "OPENSSL_SSLV23_PADDING"
-; "OPENSSL_NO_PADDING" "OPENSSL_PKCS1_OAEP_PADDING"
-; "ORA_BIND_INOUT" "ORA_BIND_IN" "ORA_BIND_OUT"
-; "ORA_FETCHINTO_ASSOC" "ORA_FETCHINTO_NULLS"
-; "PREG_PATTERN_ORDER" "PREG_SET_ORDER" "PREG_SPLIT_NO_EMPTY"
-; "PREG_SPLIT_DELIM_CAPTURE"
-; "PGSQL_ASSOC" "PGSQL_NUM" "PGSQL_BOTH"
-; "PRINTER_COPIES" "PRINTER_MODE" "PRINTER_TITLE"
-; "PRINTER_DEVICENAME" "PRINTER_DRIVERVERSION"
-; "PRINTER_RESOLUTION_Y" "PRINTER_RESOLUTION_X" "PRINTER_SCALE"
-; "PRINTER_BACKGROUND_COLOR" "PRINTER_PAPER_LENGTH"
-; "PRINTER_PAPER_WIDTH" "PRINTER_PAPER_FORMAT"
-; "PRINTER_FORMAT_CUSTOM" "PRINTER_FORMAT_LETTER"
-; "PRINTER_FORMAT_LEGAL" "PRINTER_FORMAT_A3" "PRINTER_FORMAT_A4"
-; "PRINTER_FORMAT_A5" "PRINTER_FORMAT_B4" "PRINTER_FORMAT_B5"
-; "PRINTER_FORMAT_FOLIO" "PRINTER_ORIENTATION"
-; "PRINTER_ORIENTATION_PORTRAIT" "PRINTER_ORIENTATION_LANDSCAPE"
-; "PRINTER_TEXT_COLOR" "PRINTER_TEXT_ALIGN" "PRINTER_TA_BASELINE"
-; "PRINTER_TA_BOTTOM" "PRINTER_TA_TOP" "PRINTER_TA_CENTER"
-; "PRINTER_TA_LEFT" "PRINTER_TA_RIGHT" "PRINTER_PEN_SOLID"
-; "PRINTER_PEN_DASH" "PRINTER_PEN_DOT" "PRINTER_PEN_DASHDOT"
-; "PRINTER_PEN_DASHDOTDOT" "PRINTER_PEN_INVISIBLE"
-; "PRINTER_BRUSH_SOLID" "PRINTER_BRUSH_CUSTOM"
-; "PRINTER_BRUSH_DIAGONAL" "PRINTER_BRUSH_CROSS"
-; "PRINTER_BRUSH_DIAGCROSS" "PRINTER_BRUSH_FDIAGONAL"
-; "PRINTER_BRUSH_HORIZONTAL" "PRINTER_BRUSH_VERTICAL"
-; "PRINTER_FW_THIN" "PRINTER_FW_ULTRALIGHT" "PRINTER_FW_LIGHT"
-; "PRINTER_FW_NORMAL" "PRINTER_FW_MEDIUM" "PRINTER_FW_BOLD"
-; "PRINTER_FW_ULTRABOLD" "PRINTER_FW_HEAVY" "PRINTER_ENUM_LOCAL"
-; "PRINTER_ENUM_NAME" "PRINTER_ENUM_SHARED"
-; "PRINTER_ENUM_DEFAULT" "PRINTER_ENUM_CONNECTIONS"
-; "PRINTER_ENUM_NETWORK" "PRINTER_ENUM_REMOTE" "PSPELL_FAST"
-; "PSPELL_NORMAL" "PSPELL_BAD_SPELLERS" "PSPELL_RUN_TOGETHER"
-; "SID" "SID" "AF_UNIX" "AF_INET" "SOCK_STREAM" "SOCK_DGRAM"
-; "SOCK_RAW" "SOCK_SEQPACKET" "SOCK_RDM" "MSG_OOB" "MSG_WAITALL"
-; "MSG_PEEK" "MSG_DONTROUTE" "SO_DEBUG" "SO_REUSEADDR"
-; "SO_KEEPALIVE" "SO_DONTROUTE" "SO_LINGER" "SO_BROADCAST"
-; "SO_OOBINLINE" "SO_SNDBUF" "SO_RCVBUF" "SO_SNDLOWAT"
-; "SO_RCVLOWAT" "SO_SNDTIMEO" "SO_RCVTIMEO" "SO_TYPE" "SO_ERROR"
-; "SOL_SOCKET" "PHP_NORMAL_READ" "PHP_BINARY_READ"
-; "PHP_SYSTEM_READ" "SOL_TCP" "SOL_UDP" "MOD_COLOR" "MOD_MATRIX"
-; "TYPE_PUSHBUTTON" "TYPE_MENUBUTTON" "BSHitTest" "BSDown"
-; "BSOver" "BSUp" "OverDowntoIdle" "IdletoOverDown"
-; "OutDowntoIdle" "OutDowntoOverDown" "OverDowntoOutDown"
-; "OverUptoOverDown" "OverUptoIdle" "IdletoOverUp" "ButtonEnter"
-; "ButtonExit" "MenuEnter" "MenuExit" "XML_ERROR_NONE"
-; "XML_ERROR_NO_MEMORY" "XML_ERROR_SYNTAX"
-; "XML_ERROR_NO_ELEMENTS" "XML_ERROR_INVALID_TOKEN"
-; "XML_ERROR_UNCLOSED_TOKEN" "XML_ERROR_PARTIAL_CHAR"
-; "XML_ERROR_TAG_MISMATCH" "XML_ERROR_DUPLICATE_ATTRIBUTE"
-; "XML_ERROR_JUNK_AFTER_DOC_ELEMENT" "XML_ERROR_PARAM_ENTITY_REF"
-; "XML_ERROR_UNDEFINED_ENTITY" "XML_ERROR_RECURSIVE_ENTITY_REF"
-; "XML_ERROR_ASYNC_ENTITY" "XML_ERROR_BAD_CHAR_REF"
-; "XML_ERROR_BINARY_ENTITY_REF"
-; "XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF"
-; "XML_ERROR_MISPLACED_XML_PI" "XML_ERROR_UNKNOWN_ENCODING"
-; "XML_ERROR_INCORRECT_ENCODING"
-; "XML_ERROR_UNCLOSED_CDATA_SECTION"
-; "XML_ERROR_EXTERNAL_ENTITY_HANDLING" "XML_OPTION_CASE_FOLDING"
-; "XML_OPTION_TARGET_ENCODING" "XML_OPTION_SKIP_TAGSTART"
-; "XML_OPTION_SKIP_WHITE" "YPERR_BADARGS" "YPERR_BADDB"
-; "YPERR_BUSY" "YPERR_DOMAIN" "YPERR_KEY" "YPERR_MAP"
-; "YPERR_NODOM" "YPERR_NOMORE" "YPERR_PMAP" "YPERR_RESRC"
-; "YPERR_RPC" "YPERR_YPBIND" "YPERR_YPERR" "YPERR_YPSERV"
-; "YPERR_VERS" "FORCE_GZIP" "FORCE_DEFLATE"
-
- ;; PEAR constants
-; "PEAR_ERROR_RETURN" "PEAR_ERROR_PRINT" "PEAR_ERROR_TRIGGER"
-; "PEAR_ERROR_DIE" "PEAR_ERROR_CALLBACK" "OS_WINDOWS" "OS_UNIX"
-; "PEAR_OS" "DB_OK" "DB_ERROR" "DB_ERROR_SYNTAX"
-; "DB_ERROR_CONSTRAINT" "DB_ERROR_NOT_FOUND"
-; "DB_ERROR_ALREADY_EXISTS" "DB_ERROR_UNSUPPORTED"
-; "DB_ERROR_MISMATCH" "DB_ERROR_INVALID" "DB_ERROR_NOT_CAPABLE"
-; "DB_ERROR_TRUNCATED" "DB_ERROR_INVALID_NUMBER"
-; "DB_ERROR_INVALID_DATE" "DB_ERROR_DIVZERO"
-; "DB_ERROR_NODBSELECTED" "DB_ERROR_CANNOT_CREATE"
-; "DB_ERROR_CANNOT_DELETE" "DB_ERROR_CANNOT_DROP"
-; "DB_ERROR_NOSUCHTABLE" "DB_ERROR_NOSUCHFIELD"
-; "DB_ERROR_NEED_MORE_DATA" "DB_ERROR_NOT_LOCKED"
-; "DB_ERROR_VALUE_COUNT_ON_ROW" "DB_ERROR_INVALID_DSN"
-; "DB_ERROR_CONNECT_FAILED" "DB_WARNING" "DB_WARNING_READ_ONLY"
-; "DB_PARAM_SCALAR" "DB_PARAM_OPAQUE" "DB_BINMODE_PASSTHRU"
-; "DB_BINMODE_RETURN" "DB_BINMODE_CONVERT" "DB_FETCHMODE_DEFAULT"
-; "DB_FETCHMODE_ORDERED" "DB_FETCHMODE_ASSOC"
-; "DB_FETCHMODE_FLIPPED" "DB_GETMODE_ORDERED" "DB_GETMODE_ASSOC"
-; "DB_GETMODE_FLIPPED" "DB_TABLEINFO_ORDER"
-; "DB_TABLEINFO_ORDERTABLE" "DB_TABLEINFO_FULL"
-
- )))
- "PHP constants.")
-
-(defconst php-keywords
- (eval-when-compile
- (regexp-opt
- ;; "class", "new" and "extends" get special treatment
- ;; "case" and "default" get special treatment elsewhere
- '("and" "as" "break" "continue" "declare" "do" "echo" "else" "elseif"
- "endfor" "endforeach" "endif" "endswitch" "endwhile" "exit"
- "extends" "for" "foreach" "global" "if" "include" "include_once"
- "next" "or" "require" "require_once" "return" "static" "switch"
- "then" "var" "while" "xor" "throw" "catch" "try"
- "instanceof" "catch all" "finally")))
- "PHP keywords.")
-
-(defconst php-identifier
- (eval-when-compile
- '"[a-zA-Z\_\x7f-\xff][a-zA-Z0-9\_\x7f-\xff]*")
- "Characters in a PHP identifier.")
-
-(defconst php-types
- (eval-when-compile
- (regexp-opt '("array" "bool" "boolean" "char" "const" "double" "float"
- "int" "integer" "long" "mixed" "object" "real"
- "string")))
- "PHP types.")
-
-(defconst php-superglobals
- (eval-when-compile
- (regexp-opt '("_GET" "_POST" "_COOKIE" "_SESSION" "_ENV" "GLOBALS"
- "_SERVER" "_FILES" "_REQUEST")))
- "PHP superglobal variables.")
-
-;; Set up font locking
-(defconst php-font-lock-keywords-1
- (list
- ;; Fontify constants
- (cons
- (concat "[^_$]?\\<\\(" php-constants "\\)\\>[^_]?")
- '(1 font-lock-constant-face))
-
- ;; Fontify keywords
- (cons
- (concat "[^_$]?\\<\\(" php-keywords "\\)\\>[^_]?")
- '(1 font-lock-keyword-face))
-
- ;; Fontify keywords and targets, and case default tags.
- (list "\\<\\(break\\|case\\|continue\\)\\>\\s-+\\(-?\\sw+\\)?"
- '(1 font-lock-keyword-face) '(2 font-lock-constant-face t t))
- ;; This must come after the one for keywords and targets.
- '(":" ("^\\s-+\\(\\sw+\\)\\s-+\\s-+$"
- (beginning-of-line) (end-of-line)
- (1 font-lock-constant-face)))
-
- ;; treat 'print' as keyword only when not used like a function name
- '("\\<print\\s-*(" . php-default-face)
- '("\\<print\\>" . font-lock-keyword-face)
-
- ;; Fontify PHP tag
- (cons php-tags-key font-lock-preprocessor-face)
-
- ;; Fontify ASP-style tag
- '("<\\%\\(=\\)?" . font-lock-preprocessor-face)
- '("\\%>" . font-lock-preprocessor-face)
-
- )
- "Subdued level highlighting for PHP mode.")
-
-(defconst php-font-lock-keywords-2
- (append
- php-font-lock-keywords-1
- (list
-
- ;; class declaration
- '("\\<\\(class\\|interface\\)\\s-+\\(\\sw+\\)?"
- (1 font-lock-keyword-face) (2 font-lock-type-face nil t))
- ;; handle several words specially, to include following word,
- ;; thereby excluding it from unknown-symbol checks later
- ;; FIX to handle implementing multiple
- ;; currently breaks on "class Foo implements Bar, Baz"
- '("\\<\\(new\\|extends\\|implements\\)\\s-+\\$?\\(\\sw+\\)"
- (1 font-lock-keyword-face) (2 font-lock-type-face))
-
- ;; function declaration
- '("\\<\\(function\\)\\s-+&?\\(\\sw+\\)\\s-*("
- (1 font-lock-keyword-face)
- (2 font-lock-function-name-face nil t))
-
- ;; class hierarchy
- '("\\<\\(self\\|parent\\)\\>" (1 font-lock-constant-face nil nil))
-
- ;; method and variable features
- '("\\<\\(private\\|protected\\|public\\)\\s-+\\$?\\sw+"
- (1 font-lock-keyword-face))
-
- ;; method features
- '("^\\s-*\\(abstract\\|static\\|final\\)\\s-+\\$?\\sw+"
- (1 font-lock-keyword-face))
-
- ;; variable features
- '("^\\s-*\\(static\\|const\\)\\s-+\\$?\\sw+"
- (1 font-lock-keyword-face))
- ))
- "Medium level highlighting for PHP mode.")
-
-(defconst php-font-lock-keywords-3
- (append
- php-font-lock-keywords-2
- (list
-
- ;; <word> or </word> for HTML
- ;;'("</?\\sw+[^> ]*>" . font-lock-constant-face)
- ;;'("</?\\sw+[^>]*" . font-lock-constant-face)
- ;;'("<!DOCTYPE" . font-lock-constant-face)
- '("</?[a-z!:]+" . font-lock-constant-face)
-
- ;; HTML >
- '("<[^>]*\\(>\\)" (1 font-lock-constant-face))
-
- ;; HTML tags
- '("\\(<[a-z]+\\)[[:space:]]+\\([a-z:]+=\\)[^>]*?" (1 font-lock-constant-face) (2 font-lock-constant-face) )
- '("\"[[:space:]]+\\([a-z:]+=\\)" (1 font-lock-constant-face))
-
- ;; HTML entities
- ;;'("&\\w+;" . font-lock-variable-name-face)
-
- ;; warn about '$' immediately after ->
- '("\\$\\sw+->\\s-*\\(\\$\\)\\(\\sw+\\)"
- (1 font-lock-warning-face) (2 php-default-face))
-
- ;; warn about $word.word -- it could be a valid concatenation,
- ;; but without any spaces we'll assume $word->word was meant.
- '("\\$\\sw+\\(\\.\\)\\sw"
- 1 font-lock-warning-face)
-
- ;; Warn about ==> instead of =>
- '("==+>" . font-lock-warning-face)
-
- ;; exclude casts from bare-word treatment (may contain spaces)
- `(,(concat "(\\s-*\\(" php-types "\\)\\s-*)")
- 1 font-lock-type-face)
-
- ;; PHP5: function declarations may contain classes as parameters type
- `(,(concat "[(,]\\s-*\\(\\sw+\\)\\s-+&?\\$\\sw+\\>")
- 1 font-lock-type-face)
-
- ;; Fontify variables and function calls
- '("\\$\\(this\\|that\\)\\W" (1 font-lock-constant-face nil nil))
- `(,(concat "\\$\\(" php-superglobals "\\)\\W")
- (1 font-lock-constant-face nil nil)) ;; $_GET & co
- '("\\$\\(\\sw+\\)" (1 font-lock-variable-name-face)) ;; $variable
- '("->\\(\\sw+\\)" (1 font-lock-variable-name-face t t)) ;; ->variable
- '("->\\(\\sw+\\)\\s-*(" . (1 php-default-face t t)) ;; ->function_call
- '("\\(\\sw+\\)::\\sw+\\s-*(?" . (1 font-lock-type-face)) ;; class::member
- '("::\\(\\sw+\\>[^(]\\)" . (1 php-default-face)) ;; class::constant
- '("\\<\\sw+\\s-*[[(]" . php-default-face) ;; word( or word[
- '("\\<[0-9]+" . php-default-face) ;; number (also matches word)
-
- ;; Warn on any words not already fontified
- '("\\<\\sw+\\>" . font-lock-warning-face)
-
- ))
- "Gauchy level highlighting for PHP mode.")
-
-(provide 'php-mode)
-
-;;; php-mode.el ends here
View
1,118 elpa-to-submit/nxhtml/alts/php-mode-2008-10-23.el