diff --git a/emacs.d/00-paths.el b/emacs.d/00-paths.el index 722b8c8..41f9a31 100644 --- a/emacs.d/00-paths.el +++ b/emacs.d/00-paths.el @@ -1,3 +1,4 @@ (add-to-list 'load-path "~/.emacs.d/elisp") (add-to-list 'load-path "~/.emacs.d/naquadah-theme") (add-to-list 'load-path "~/.emacs.d/auto-complete-clang") +(add-to-list 'load-path "~/.emacs.d/nxhtml") diff --git a/emacs.d/10-file-associations.el b/emacs.d/10-file-associations.el index 00084f4..52a7e23 100644 --- a/emacs.d/10-file-associations.el +++ b/emacs.d/10-file-associations.el @@ -3,6 +3,8 @@ (add-to-list 'auto-mode-alist '("\\.cs$" . csharp-mode)) (add-to-list 'auto-mode-alist '("\\.bat$" . batch-mode)) (add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode)) +(add-to-list 'auto-mode-alist '("\\.php[345]?$" . php-mode)) +(add-to-list 'auto-mode-alist '("\\.js\\(on\\)?$" . javascript-mode)) (add-to-list 'file-coding-system-alist '("\\.vala$" . utf-8)) (add-to-list 'file-coding-system-alist '("\\.vapi$" . utf-8)) diff --git a/emacs.d/10-modules.el b/emacs.d/10-modules.el index 3db81b7..61c2533 100644 --- a/emacs.d/10-modules.el +++ b/emacs.d/10-modules.el @@ -1,6 +1,7 @@ (require 'minimap) (require 'naquadah-theme) ;(require 'auto-complete-clang) +(load "autostart.el") (autoload 'vala-mode "vala-mode" "A Major mode for editing Vala files" t) @@ -14,3 +15,5 @@ "batch-mode" "A Major mode for editing Batch files" t) (autoload 'lua-mode "lua-mode" "A Major mode for editing Lua files" t) +(autoload 'php-mode + "php-mode" "A Major mode for editing PHP files" t) diff --git a/emacs.d/20-org.el b/emacs.d/20-org.el index ccface5..6aa5b0a 100644 --- a/emacs.d/20-org.el +++ b/emacs.d/20-org.el @@ -1,12 +1,25 @@ (require 'org-crypt) -(setq org-todo-keywords '((sequence "TODO" "IN PROGRESS" "|" "DONE"))) +(setq org-todo-keywords '((sequence "TODO(t)" + "IN PROGRESS(p)" + "WAITING(w@/!)" + "|" + "DONE(d!/!)" + "CANCELLED(c@/!)"))) (setq org-ditaa-jar-path "/usr/share/java/ditaa/ditaa-0_9.jar") (setq org-babel-load-languages '((ditaa . t))) (setq org-confirm-babel-evaluate nil) (setq org-tags-exclude-from-inheritance '("crypt")) (setq org-crypt-key "33E8CC1CC4") ; GPG key used for encryption +(setq org-use-fast-todo-selection t) + +(setq org-todo-keyword-faces + '(("TODO" :foreground "red" :weight bold) + ("IN PROGRESS" :foreground "yellow" :weight bold) + ("DONE" :foreground "forest green" :weight bold) + ("WAITING" :foreground "orange" :weight bold) + ("CANCELLED" :foreground "orangered" :weight bold))) (global-set-key "\C-cl" 'org-store-link) (global-set-key "\C-cc" 'org-capture) diff --git a/emacs.d/30-django-mumamo.el b/emacs.d/30-django-mumamo.el new file mode 100644 index 0000000..456eea4 --- /dev/null +++ b/emacs.d/30-django-mumamo.el @@ -0,0 +1 @@ +(setq mumamo-background-colors nil) diff --git a/emacs.d/elisp/php-mode.el b/emacs.d/elisp/php-mode.el new file mode 100644 index 0000000..a8e34bf --- /dev/null +++ b/emacs.d/elisp/php-mode.el @@ -0,0 +1,291 @@ + + + + + + + +SourceForge.net Repository - [php-mode] Index of / + + + + +SourceForge.net Repository - php-mode Index of / + + + + + + + + + + + + + + + + + + +
+
+
+
+ +
+ +
+
+
+
+
+
+ + + + + + + + + + + +
+

SCM Repositories - php-mode

+
+
+
+
+ + + +
+
+
+
+ + + +
+ + + + + + + + + + + + + + +
Files shown:0 + + +
Directory revision:97 (of 97)
Sticky Revision:
+
+ + + + + +
+
+ +
+ + +
+
+
+
+
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+File + + + + +Rev. + + +Age + + +Author + + +Last log entry + +
+ + + + +branches/ + + 3 7 years turadg Initial import. +
+ + + + +tags/ + + 94 2 years ashawley Remove typo tag.
+ + + + +trunk/ + + 97 2 years ashawley Require add-log to avoid byte compilation warning +for add-log-current-defun-head…
+
+ + + + +

Download GNU tarball

+ + +
+
+
+
+
+
+ + +
+
+
+ + + + + + + + diff --git a/emacs.d/nxhtml/README.txt b/emacs.d/nxhtml/README.txt new file mode 100644 index 0000000..e9204b4 --- /dev/null +++ b/emacs.d/nxhtml/README.txt @@ -0,0 +1,46 @@ +To install nXhtml put this in your .emacs: + + (load "YOUR-PATH-TO/nxhtml/autostart.el") + +where autostart.el is the file in the same directory as this +readme.txt file. + +Note 1: If you are using Emacs+EmacsW32 then nXhtml is already + installed. + +Note 2: If you are using Emacs 22 then you need to install nXml + separately. (It is included in Emacs 23.) + +Note 3: You may optionally also byte compile nXhtml from the nXhtml + menu (recommended). + + + +Files that are now in Emacs' development (CVS/Bazaar) repository +================================================================ + +Some files that were previously distributed with nXhtml are now in +Emacs' development repository. Distributing them also with nXhtml is +a bad idea since that can lead to that the wrong file is loaded. They +are therefore not distributed with nXhtml anymore. + +Instead you can (if you do not have the files in your Emacs) in many +cases use the version from the repository. To do that you can +currently start from + + http://cvs.savannah.gnu.org/viewvc/emacs/emacs/lisp/ + +Files you can download and use this way are for example + + js.el (JavaScript, formerly called espresso.el) + htmlfontify.el + +If you do that I suggest that you put these files in a special +directory and add that to load-path in your .emacs and make that +adding to load-path depend on your Emacs version so that they will not +be loaded when you have upgraded your Emacs. + +Note that if you want to use nxml-mode (and it is not in your Emacs) +you should not download it from Emacs' development directory. Instead go to + + http://www.thaiopensource.com/download/ diff --git a/emacs.d/nxhtml/alts/find-recursive-orig.el b/emacs.d/nxhtml/alts/find-recursive-orig.el new file mode 100644 index 0000000..509a038 --- /dev/null +++ b/emacs.d/nxhtml/alts/find-recursive-orig.el @@ -0,0 +1,137 @@ +;; find-recursive.el -- Find files recursively into a directory +;; +;; Copyright (C) 2001 Ovidiu Predescu +;; +;; Author: Ovidiu Predescu +;; Date: March 26, 2001 +;; +;; 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 +;; of the License, 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. + +;; +;; Setup: put this file in your Lisp path and add the following line in +;; your .emacs: +;; +;; (require 'find-recursive) +;; + +(require 'cl) + +(defcustom find-recursive-exclude-files '(".*.class$" ".*~$" ".*.elc$") + "List of regular expressions of files to be excluded when recursively searching for files." + :type '(repeat (string :tag "File regexp"))) + +(defun find-file-recursively (file-regexp directory) + (interactive "sFile name to search for recursively: \nDIn directory: ") + (let ((directory (if (equal (substring directory -1) "/") + directory + (concat directory "/"))) + (matches + (find-recursive-filter-out + find-recursive-exclude-files + (find-recursive-directory-relative-files directory "" file-regexp)))) + (cond ((eq (length matches) 0) (message "No file(s) found!")) + ((eq (length matches) 1) + (find-file (concat directory (car matches)))) + (t + (run-with-timer 0.001 nil + (lambda () + (dispatch-event + (make-event 'key-press '(key tab))))) + (let ((file (completing-read "Choose file: " + (mapcar 'list matches) + nil t))) + (if (or (eq file nil) (equal file "")) + (message "No file selected.") + (find-file (concat directory file)))))))) + +(defun find-recursive-directory-relative-files (directory + relative-directory + file-regexp) + (let* ((full-dir (concat directory "/" relative-directory)) + (matches + (mapcar + (function (lambda (x) + (concat relative-directory x))) + (find-recursive-filter-out '(nil) + (directory-files full-dir nil + file-regexp nil t)))) + (inner + (mapcar + (function + (lambda (dir) + (find-recursive-directory-relative-files directory + (concat relative-directory + dir "/") + file-regexp))) + (find-recursive-filter-out '(nil "\\." "\\.\\.") + (directory-files full-dir nil ".*" + nil 'directories))))) + (mapcar (function (lambda (dir) (setq matches (append matches dir)))) + inner) + matches)) + +(defun find-recursive-filter-out (remove-list list) + "Remove all the elements in *remove-list* from *list*" + (if (eq list nil) + nil + (let ((elem (car list)) + (rest (cdr list))) + (if (some + (lambda (regexp) + (if (or (eq elem nil) (eq regexp nil)) + nil + (not (eq (string-match regexp elem) nil)))) + remove-list) + (find-recursive-filter-out remove-list rest) + (cons elem (find-recursive-filter-out remove-list rest)))))) + +(defvar find-recursive-running-xemacs (string-match "XEmacs\\|Lucid" emacs-version)) + +(if find-recursive-running-xemacs + nil + (defadvice directory-files (after + directory-files-xemacs + (dirname &optional full match nosort files-only) + activate) + "Add an additional argument, FILES-ONLY to the list of arguments +for GNU Emacs. If the symbol is t, then only the files in the +directory will be returned. If FILES-ONLY is nil, then both files and +directories are selected. If FILES-ONLY is not nil and not t, then +only sundirectories are returned." + (setq ad-return-value + (cond ((null files-only) ad-return-value) + ((eq files-only t) + (find-recursive-remove-if (lambda (f) + (file-directory-p + (concat dirname "/" f))) + ad-return-value)) + (t + (find-recursive-remove-if (lambda (f) + (not (file-directory-p + (concat dirname "/" f)))) + ad-return-value))))) + + (defun find-recursive-remove-if (func list) + "Removes all elements satisfying FUNC from LIST." + (let ((result nil)) + (while list + (if (not (funcall func (car list))) + (setq result (cons (car list) result))) + (setq list (cdr list))) + (nreverse result)))) + +(global-set-key [(control x) (meta f)] 'find-file-recursively) + +(provide 'find-recursive) diff --git a/emacs.d/nxhtml/alts/javascript-mozlab.el b/emacs.d/nxhtml/alts/javascript-mozlab.el new file mode 100644 index 0000000..bcec39b --- /dev/null +++ b/emacs.d/nxhtml/alts/javascript-mozlab.el @@ -0,0 +1,712 @@ +;;; javascript.el --- Major mode for editing JavaScript source text + +;; Copyright (C) 2006 Karl Landström + +;; Author: Karl Landström +;; Maintainer: Karl Landström +;; 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. + ;; "\\" 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 "\\" 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 + "\\" + (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 "\\\\([ \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 "[?:{]\\|\\" 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-*\\") + (if (save-excursion + (skip-chars-backward "[ \t\n]*}") + (looking-at "[ \t\n]*}")) + (save-excursion + (backward-list) (backward-word 1) (looking-at "\\")) + (js-re-search-backward "\\" (point-at-bol) t) + (or (looking-at "\\") + (let ((saved-indent (current-indentation))) + (while (and (js-re-search-backward "^[ \t]*\\<" nil t) + (/= (current-indentation) saved-indent))) + (and (looking-at "[ \t]*\\") + (not (js-re-search-forward + "\\" (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 "[]})]\\|\\\\|\\")) + (continued-expr-p (js-continued-expression-p))) + (cond (ctrl-stmt-indent) + ((js-continued-var-decl-list-p) + (js-re-search-backward "\\" 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") + (run-hooks 'javascript-mode-hook)) + + +(provide 'javascript-mode) +;;; javascript.el ends here diff --git a/emacs.d/nxhtml/alts/smarty-mode-vdebout.el b/emacs.d/nxhtml/alts/smarty-mode-vdebout.el new file mode 100644 index 0000000..94d7352 --- /dev/null +++ b/emacs.d/nxhtml/alts/smarty-mode-vdebout.el @@ -0,0 +1,2715 @@ +;;; smarty-mode.el --- major mode for editing Smarty templates + +;; Author: Vincent DEBOUT +;; Maintainer: Vincent DEBOUT +;; Keywords: languages smarty templates +;; WWW: http://deboutv.free.fr/lisp/smarty/ + +;;; License + +;; 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 +;; of the License, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +;;; History + +;; $Log: smarty-mode.el,v $ +;; Revision 1.6 2006/12/16 19:54:26 vincent +;; Update release version +;; +;; Revision 1.5 2006/12/16 19:53:00 vincent +;; Fix bug #15 +;; +;; Revision 1.4 2006/12/16 14:59:46 vincent +;; Fix bugs for release +;; +;; Revision 1.3 2006/11/19 12:29:53 vincent +;; Fix highlight bug, add templates +;; +;; Revision 1.2 2006/11/12 11:44:18 vincent +;; First release commit +;; + +(defconst smarty-version "0.0.4" + "Smarty Mode version number.") + +(defconst smarty-time-stamp "2006-12-16" + "Smarty Mode time stamp for last update.") + +(require 'font-lock) +(require 'cc-mode) +(require 'custom) +(require 'etags) +(eval-when-compile +(require 'regexp-opt)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Customization +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defgroup smarty nil + "Customizations for Smarty mode." + :prefix "smarty-" + :group 'languages) + +(defgroup smarty-mode nil + "Customizations for Smarty mode." + :group 'smarty) + +(defcustom smarty-electric-mode t + "*Non-nil enables electrification (automatic template generation). +If nil, template generators can still be invoked through key bindings and +menu. Is indicated in the modeline by \"/e\" after the mode name and can be +toggled by `\\[smarty-electric-mode]'." + :type 'boolean + :group 'smarty-mode) + +(defcustom smarty-stutter-mode t + "*Non-nil enables stuttering. +Is indicated in the modeline by \"/s\" after the mode name and can be toggled +by `\\[smarty-stutter-mode]'." + :type 'boolean + :group 'smarty-mode) + +(defgroup smarty-menu nil + "Customizations for menues." + :group 'smarty) + +(defcustom smarty-source-file-menu t + "*Non-nil means add a menu of all source files in current directory." + :type 'boolean + :group 'smarty-menu) + +(defgroup smarty-highlight nil + "Customizations for highlight." + :group 'smarty) + +(defcustom smarty-highlight-plugin-functions t + "*Non-nil means highlight the plugin functions in the buffer." + :type 'boolean + :group 'smarty-highlight) + +(defgroup smarty-template nil + "Customizations for templates." + :group 'smarty) + +(defgroup smarty-header nil + "Customizations for header template." + :group 'smarty-template) + +(defcustom smarty-file-header "" + "*String or file to insert as file header. +If the string specifies an existing file name, the contents of the file is +inserted, otherwise the string itself is inserted as file header. +Type `C-j' for newlines. +If the header contains RCS keywords, they may be written as Keyword +if the header needs to be version controlled. + +The following keywords for template generation are supported: + : replaced by the name of the buffer + : replaced by the user name and email address + \(`user-full-name',`mail-host-address', `user-mail-address') + : replaced by user login name (`user-login-name') + : replaced by contents of option `smarty-company-name' + : replaced by the current date + : replaced by the current year + : replaced by copyright string (`smarty-copyright-string') + : final cursor position." + :type 'string + :group 'smarty-header) + +(defcustom smarty-file-footer "" + "*String or file to insert as file footer. +If the string specifies an existing file name, the contents of the file is +inserted, otherwise the string itself is inserted as file footer (i.e. at +the end of the file). +Type `C-j' for newlines. +The same keywords as in option `smarty-file-header' can be used." + :type 'string + :group 'smarty-header) + +(defcustom smarty-company-name "" + "*Name of company to insert in file header. +See option `smarty-file-header'." + :type 'string + :group 'smarty-header) + +(defcustom smarty-copyright-string "" + "*Copyright string to insert in file header. +Can be multi-line string (type `C-j' for newline) and contain other file +header keywords (see option `smarty-file-header')." + :type 'string + :group 'smarty-header) + +(defcustom smarty-date-format "%Y-%m-%d" + "*Specifies the date format to use in the header. +This string is passed as argument to the command `format-time-string'. +For more information on format strings, see the documentation for the +`format-time-string' command (C-h f `format-time-string')." + :type 'string + :group 'smarty-header) + +(defcustom smarty-modify-date-prefix-string "" + "*Prefix string of modification date in Smarty file header. +If actualization of the modification date is called (menu, +`\\[smarty-template-modify]'), this string is searched and the rest +of the line replaced by the current date." + :type 'string + :group 'smarty-header) + +(defcustom smarty-modify-date-on-saving nil + "*Non-nil means update the modification date when the buffer is saved. +Calls function `\\[smarty-template-modify]'). + +NOTE: Activate the new setting in a Smarty buffer by using the menu entry + \"Activate Options\"." + :type 'boolean + :group 'smarty-header) + +(defgroup smarty-misc nil + "Miscellaneous customizations." + :group 'smarty) + +(defcustom smarty-left-delimiter "{" + "Left escaping delimiter." + :type 'string + :group 'smarty-misc) + +(defcustom smarty-right-delimiter "}" + "Right escaping delimiter." + :type 'string + :group 'smarty-misc) + +(defcustom smarty-intelligent-tab t + "*Non-nil means `TAB' does indentation, word completion and tab insertion. +That is, if preceding character is part of a word then complete word, +else if not at beginning of line then insert tab, +else if last command was a `TAB' or `RET' then dedent one step, +else indent current line (i.e. `TAB' is bound to `smarty-electric-tab'). +If nil, TAB always indents current line (i.e. `TAB' is bound to +`indent-according-to-mode'). + +NOTE: Activate the new setting in a Smarty buffer by using the menu entry + \"Activate Options\"." + :type 'boolean + :group 'smarty-misc) + +(defcustom smarty-word-completion-in-minibuffer t + "*Non-nil enables word completion in minibuffer (for template prompts). + +NOTE: Activate the new setting by restarting Emacs." + :type 'boolean + :group 'smarty-misc) + +(defcustom smarty-word-completion-case-sensitive nil + "*Non-nil means word completion using `TAB' is case sensitive. +That is, `TAB' completes words that start with the same letters and case. +Otherwise, case is ignored." + :type 'boolean + :group 'smarty-misc) + +;; Functions + +(defun smarty-customize () + "Call the customize function with `smarty' as argument." + (interactive) + (customize-browse 'smarty)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Variables +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defvar smarty-menu-max-size 20 + "*Specifies the maximum size of a menu before splitting it into submenues.") + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Menu tools functions +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defun smarty-menu-split (list title) + "Split menu LIST into several submenues, if number of +elements > `smarty-menu-max-size'." + (if (> (length list) smarty-menu-max-size) + (let ((remain list) + (result '()) + (sublist '()) + (menuno 1) + (i 0)) + (while remain + (setq sublist (cons (car remain) sublist)) + (setq remain (cdr remain)) + (setq i (+ i 1)) + (if (= i smarty-menu-max-size) + (progn + (setq result (cons (cons (format "%s %s" title menuno) + (nreverse sublist)) result)) + (setq i 0) + (setq menuno (+ menuno 1)) + (setq sublist '())))) + (and sublist + (setq result (cons (cons (format "%s %s" title menuno) + (nreverse sublist)) result))) + (nreverse result)) + list)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Source file menu +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defvar smarty-sources-menu nil) + +;; Create the source menu +(defun smarty-add-source-files-menu () + "Scan directory for all Smarty source files and generate menu. +The directory of the current source file is scanned." + (interactive) + (message "Scanning directory for source files ...") + (let ((newmap (current-local-map)) + (file-list (smarty-get-source-files)) + menu-list found) + ;; Create list for menu + (setq found nil) + (while file-list + (setq found t) + (setq menu-list (cons (vector (car file-list) + (list 'find-file (car file-list)) t) + menu-list)) + (setq file-list (cdr file-list))) + (setq menu-list (smarty-menu-split menu-list "Sources")) + (when found (setq menu-list (cons "--" menu-list))) + (setq menu-list (cons ["*Rescan*" smarty-add-source-files-menu t] menu-list)) + (setq menu-list (cons "Sources" menu-list)) + ;; Create menu + (easy-menu-add menu-list) + (easy-menu-define smarty-sources-menu newmap + "Smarty source files menu" menu-list)) + (message "")) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Smarty menu +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defun smarty-create-mode-menu () + "Create Smarty Mode menu." + `("Smarty" + ("Templates" + ("Built-in Functions" + ["capture" smarty-template-capture t] + ["config_load" smarty-template-config-load t] + ["else" smarty-template-else t] + ["elseif" smarty-template-elseif t] + ["foreach" smarty-template-foreach t] + ["foreachelse" smarty-template-foreachelse t] + ["if" smarty-template-if t] + ["include" smarty-template-include t] + ["include_php" smarty-template-include-php t] + ["insert" smarty-template-insert t] + ["ldelim" smarty-template-ldelim t] + ["literal" smarty-template-literal t] + ["php" smarty-template-php t] + ["rdelim" smarty-template-rdelim t] + ["section" smarty-template-section t] + ["sectionelse" smarty-template-sectionelse t] + ["strip" smarty-template-strip t]) + ("Custom Functions" + ["assign" smarty-template-assign t] + ["counter" smarty-template-counter t] + ["cycle" smarty-template-cycle t] + ["debug" smarty-template-debug t] + ["eval" smarty-template-eval t] + ["fetch" smarty-template-fetch t] + ["html_checkboxes" smarty-template-html-checkboxes t] + ["html_image" smarty-template-html-image t] + ["html_options" smarty-template-html-options t] + ["html_radios" smarty-template-html-radios t] + ["html_select_date" smarty-template-html-select-date t] + ["html_select_time" smarty-template-html-select-time t] + ["html_table" smarty-template-html-table t] + ["mailto" smarty-template-mailto t] + ["math" smarty-template-math t] + ["popup" smarty-template-popup t] + ["popup_init" smarty-template-popup-init t] + ["textformat" smarty-template-textformat t]) + ("Variable Modifiers" + ["capitalize" smarty-template-capitalize t] + ["cat" smarty-template-cat t] + ["count_characters" smarty-template-count-characters t] + ["count_paragraphs" smarty-template-count-paragraphs t] + ["count_sentences" smarty-template-count-sentences t] + ["count_words" smarty-template-count-words t] + ["date_format" smarty-template-date-format t] + ["default" smarty-template-default t] + ["escape" smarty-template-escape t] + ["indent" smarty-template-indent t] + ["lower" smarty-template-lower t] + ["nl2br" smarty-template-nl2br t] + ["regex_replace" smarty-template-regex-replace t] + ["replace" smarty-template-replace t] + ["spacify" smarty-template-spacify t] + ["string_format" smarty-template-string-format t] + ["strip" smarty-template-vstrip t] + ["strip_tags" smarty-template-strip-tags t] + ["truncate" smarty-template-truncate t] + ["upper" smarty-template-upper t] + ["wordwrap" smarty-template-wordwrap t]) + ("Plugins (Functions)" + ("SmartyFormtool" + ["formtool_checkall" smarty-template-formtool-checkall t] + ["formtool_copy" smarty-template-formtool-copy t] + ["formtool_count_chars" smarty-template-formtool-count-chars t] + ["formtool_init" smarty-template-formtool-init t] + ["formtool_move" smarty-template-formtool-move t] + ["formtool_moveall" smarty-template-formtool-moveall t] + ["formtool_movedown" smarty-template-formtool-movedown t] + ["formtool_moveup" smarty-template-formtool-moveup t] + ["formtool_remove" smarty-template-formtool-remove t] + ["formtool_rename" smarty-template-formtool-rename t] + ["formtool_save" smarty-template-formtool-save t] + ["formtool_selectall" smarty-template-formtool-selectall t]) + ("SmartyPaginate" + ["paginate_first" smarty-template-paginate-first t] + ["paginate_last" smarty-template-paginate-last t] + ["paginate_middle" smarty-template-paginate-middle t] + ["paginate_next" smarty-template-paginate-next t] + ["paginate_prev" smarty-template-paginate-prev t]) + ("SmartyValidate" + ["validate" smarty-template-validate t])) + ("Plugins (Variable Modifiers)" + ("AlternativeDateModifierPlugin" + ["date_format2" smarty-template-date-formatto t]) + ("B2Smilies" + ["B2Smilies" smarty-template-btosmilies t]) + ("BBCodePlugin" + ["bbcode2html" smarty-template-bbcodetohtml t]) + ) + "--" + ["Insert Header" smarty-template-header t] + ["Insert Footer" smarty-template-footer t] + ["Insert Date" smarty-template-insert-date t] + ["Modify Date" smarty-template-modify t]) + "--" + ["Show Messages" smarty-show-messages :keys "C-c M-m"] + ["Smarty Mode Documentation" smarty-doc-mode :keys "C-c C-h"] + ["Version" smarty-version :keys "C-c C-v"] + "--" + ("Options" + ("Mode" + ["Electric Mode" + (progn (customize-set-variable 'smarty-electric-mode + (not smarty-electric-mode)) + (smarty-mode-line-update)) + :style toggle :selected smarty-electric-mode :keys "C-c C-m C-e"] + ["Stutter Mode" + (progn (customize-set-variable 'smarty-stutter-mode + (not smarty-stutter-mode)) + (smarty-mode-line-update)) + :style toggle :selected smarty-stutter-mode :keys "C-c C-m C-s"] + "--" + ["Customize Group..." (customize-group 'smarty-mode) t]) + ("Menu" + ["Source Menu" + (customize-set-variable 'smarty-source-file-menu + (not smarty-source-file-menu)) + :style toggle :selected smarty-source-file-menu] + "--" + ["Customize Group..." (customize-group 'smarty-menu) t]) + ("Highlight" + ["Highlight plugin functions" + (progn (customize-set-variable 'smarty-highlight-plugin-functions + (not smarty-highlight-plugin-functions))) + :style toggle :selected smarty-highlight-plugin-functions] + "--" + ["Customize Group..." (customize-group 'smarty-highlight) t]) + ("Template" + ("Header" + ["Header template..." + (customize-option 'smarty-file-header) t] + ["Footer template..." + (customize-option 'smarty-file-footer) t] + ["Company..." + (customize-option 'smarty-company-name) t] + ["Copyright..." + (customize-option 'smarty-copyright-string) t] + ["Date format..." + (customize-option 'smarty-date-format) t] + ["Modify date prefix..." + (customize-option 'smarty-modify-date-prefix-string) t] + ["Modify date on saving" + (customize-set-variable 'smarty-modify-date-on-saving + (not smarty-modify-date-on-saving)) + :style toggle :selected smarty-modify-date-on-saving] + "--" + ["Customize Group..." (customize-group 'smarty-header) t]) + "--" + ["Customize Group..." (customize-group 'smarty-template) t]) + ("Miscellaneous" + ["Left delimiter..." + (customize-option 'smarty-left-delimiter) t] + ["Right delimiter..." + (customize-option 'smarty-right-delimiter) t] + ["Use Intelligent Tab" + (progn (customize-set-variable 'smarty-intelligent-tab + (not smarty-intelligent-tab)) + (smarty-activate-customizations)) + :style toggle :selected smarty-intelligent-tab] + ["Word Completion in Minibuffer" + (progn (customize-set-variable 'smarty-word-completion-in-minibuffer + (not smarty-word-completion-in-minibuffer)) + (message "Activate new setting by saving options and restarting Emacs")) + :style toggle :selected smarty-word-completion-in-minibuffer] + ["Completion is case sensitive" + (customize-set-variable 'smarty-word-completion-case-sensitive + (not smarty-word-completion-case-sensitive)) + :style toggle :selected smarty-word-completion-case-sensitive] + "--" + ["Customize Group..." (customize-group 'smarty-misc) t]) + "--" + ["Save Options" customize-save-customized t] + ["Activate Options" smarty-activate-customizations t] + ["Browse Options..." smarty-customize t]))) + +(defvar smarty-mode-menu-list (smarty-create-mode-menu) + "Smarty Mode menu.") + +(defvar smarty-mode-map nil + "Keymap for Smarty Mode.") + +(defun smarty-update-mode-menu () + "Update Smarty Mode menu." + (interactive) + (easy-menu-remove smarty-mode-menu-list) + (setq smarty-mode-menu-list (smarty-create-mode-menu)) + (easy-menu-add smarty-mode-menu-list) + (easy-menu-define smarty-mode-menu smarty-mode-map + "Menu keymap for Smarty Mode." smarty-mode-menu-list)) + + + + +(defvar smarty-mode-hook nil) + +(defvar smarty-functions nil + "List of Smarty functions.") + +(defvar smarty-functions-regexp nil + "Regexp for Smarty functions.") + +(defconst smarty-01-functions + '("capture" "config_load" "foreach" "foreachelse" "include" + "include_php" "insert" "if" "elseif" "else" "ldelim" "rdelim" + "literal" "php" "section" "sectionelse" "strip" "assign" "counter" + "cycle" "debug" "eval" "fetch" "html_checkboxes" "html_image" + "html_options" "html_radios" "html_select_date" "html_select_time" + "html_table" "math" "mailto" "popup_init" "popup" "textformat") + "Smarty built-in & custom functions.") + +(defvar smarty-modifiers nil + "List of Smarty variable modifiers.") + +(defvar smarty-modifiers-regexp nil + "Regexp for Smarty variable modifiers.") + +(defconst smarty-01-modifiers + '("capitalize" "cat" "count_characters" "count_paragraphs" + "count_sentences" "count_words" "date_format" "default" + "escape" "indent" "lower" "nl2br" "regex_replace" "replace" + "spacify" "string_format" "strip" "strip_tags" "truncate" + "upper" "wordwrap") + "Smarty variable modifiers.") + +(defvar smarty-plugins-functions nil + "List of Smarty functions.") + +(defvar smarty-plugins-functions-regexp nil + "Regexp for Smarty functions.") + +(defconst smarty-01-plugins-functions + '("validate" "formtool_checkall" "formtool_copy" "formtool_count_chars" + "formtool_init" "formtool_move" "formtool_moveall" + "formtool_movedown" "formtool_moveup" "formtool_remove" + "formtool_rename" "formtool_save" "formtool_selectall" + "paginate_first" "paginate_last" "paginate_middle" + "paginate_next" "paginate_prev") + "Smarty plugins functions.") + +(defvar smarty-plugins-modifiers nil + "List of Smarty variable modifiers.") + +(defvar smarty-plugins-modifiers-regexp nil + "Regexp for Smarty functions.") + +(defconst smarty-01-plugins-modifiers + '("B2Smilies" "bbcode2html" "date_format2") + "Smarty plugins modifiers.") + +(defconst smarty-constants + (eval-when-compile + (regexp-opt + '("TRUE" "FALSE" "NULL") t)) + "Smarty constants.") + + +;; Syntax table creation +(defvar smarty-mode-syntax-table nil + "Syntax table for smarty-mode.") + +(defvar smarty-mode-ext-syntax-table nil + "Syntax table extended by `_' used in `smarty-mode' buffers.") + +(defun smarty-create-syntax-table () + (if smarty-mode-syntax-table + () + (setq smarty-mode-syntax-table (make-syntax-table)) + + ;; Make | a punctuation character + (modify-syntax-entry ?| "." smarty-mode-syntax-table) + ;; Make " a punctuation character so highlighing works withing html strings + (modify-syntax-entry ?\" "." smarty-mode-syntax-table) + ;; define parentheses to match + (modify-syntax-entry ?\( "()" smarty-mode-syntax-table) + (modify-syntax-entry ?\) ")(" smarty-mode-syntax-table) + (modify-syntax-entry ?\[ "(]" smarty-mode-syntax-table) + (modify-syntax-entry ?\] ")[" smarty-mode-syntax-table) + (modify-syntax-entry ?\{ "(}" smarty-mode-syntax-table) + (modify-syntax-entry ?\} "){" smarty-mode-syntax-table) + ) + (set-syntax-table smarty-mode-syntax-table) + ;; extended syntax table including '_' (for simpler search regexps) + (setq smarty-mode-ext-syntax-table (copy-syntax-table smarty-mode-syntax-table)) + (modify-syntax-entry ?_ "w" smarty-mode-ext-syntax-table)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; File/directory manipulation +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defun smarty-directory-files (directory &optional full match) + "Call `directory-files' if DIRECTORY exists, otherwise generate error +message." + (if (not (file-directory-p directory)) + (smarty-warning-when-idle "No such directory: \"%s\"" directory) + (let ((dir (directory-files directory full match))) + (setq dir (delete "." dir)) + (setq dir (delete ".." dir)) + dir))) + +(defun smarty-get-source-files (&optional full directory) + "Get list of SMARTY source files in DIRECTORY or current directory." + (let ((mode-alist auto-mode-alist) + filename-regexp) + ;; create regular expressions for matching file names + (setq filename-regexp "\\`[^.].*\\(") + (while mode-alist + (when (eq (cdar mode-alist) 'smarty-mode) + (setq filename-regexp + (concat filename-regexp (caar mode-alist) "\\|"))) + (setq mode-alist (cdr mode-alist))) + (setq filename-regexp + (concat (substring filename-regexp 0 + (string-match "\\\\|$" filename-regexp)) "\\)")) + ;; find files + (smarty-directory-files + (or directory default-directory) full filename-regexp))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Messages reporting +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defvar smarty-warnings nil + "Warnings to tell the user during start up.") + +(defun smarty-run-when-idle (secs repeat function) + "Wait until idle, then run FUNCTION." + (if (fboundp 'start-itimer) + (start-itimer "smarty-mode" function secs repeat t) +; (run-with-idle-timer secs repeat function))) + ;; explicitely activate timer (necessary when Emacs is already idle) + (aset (run-with-idle-timer secs repeat function) 0 nil))) + +(defun smarty-warning-when-idle (&rest args) + "Wait until idle, then print out warning STRING and beep." + (if noninteractive + (smarty-warning (apply 'format args) t) + (unless smarty-warnings + (smarty-run-when-idle .1 nil 'smarty-print-warnings)) + (setq smarty-warnings (cons (apply 'format args) smarty-warnings)))) + +(defun smarty-warning (string &optional nobeep) + "Print out warning STRING and beep." + (message (concat "WARNING: " string)) + (unless (or nobeep noninteractive) (beep))) + +(defun smarty-print-warnings () + "Print out messages in variable `smarty-warnings'." + (let ((no-warnings (length smarty-warnings))) + (setq smarty-warnings (nreverse smarty-warnings)) + (while smarty-warnings + (message (concat "WARNING: " (car smarty-warnings))) + (setq smarty-warnings (cdr smarty-warnings))) + (beep) + (when (> no-warnings 1) + (message "WARNING: See warnings in message buffer (type `C-c M-m').")))) + +(defun smarty-show-messages () + "Get *Messages* buffer to show recent messages." + (interactive) + (display-buffer " *Message-Log*")) + +(defun smarty-version () + "Echo the current version of Smarty Mode in the minibuffer." + (interactive) + (message "Smarty Mode %s (%s)" smarty-version smarty-time-stamp) + (smarty-keep-region-active)) + +;; active regions +(defun smarty-keep-region-active () + "Do whatever is necessary to keep the region active in XEmacs. +Ignore byte-compiler warnings you might see." + (and (boundp 'zmacs-region-stays) + (setq zmacs-region-stays t))) + +(defmacro smarty-prepare-search-1 (&rest body) + "Enable case insensitive search and switch to syntax table that includes '_', +then execute BODY, and finally restore the old environment. Used for +consistent searching." + `(let ((case-fold-search t) ; case insensitive search + (current-syntax-table (syntax-table)) + result + (restore-prog ; program to restore enviroment + '(progn + ;; restore syntax table + (set-syntax-table current-syntax-table)))) + ;; use extended syntax table + (set-syntax-table smarty-mode-ext-syntax-table) + ;; execute BODY safely + (setq result + (condition-case info + (progn ,@body) + (error (eval restore-prog) ; restore environment on error + (error (cadr info))))) ; pass error up + ;; restore environment + (eval restore-prog) + result)) + +(defmacro smarty-prepare-search-2 (&rest body) + "Enable case insensitive search, switch to syntax table that includes '_', +and remove `intangible' overlays, then execute BODY, and finally restore the +old environment. Used for consistent searching." + `(let ((case-fold-search t) ; case insensitive search + (current-syntax-table (syntax-table)) + result overlay-all-list overlay-intangible-list overlay + (restore-prog ; program to restore enviroment + '(progn + ;; restore syntax table + (set-syntax-table current-syntax-table) + ;; restore `intangible' overlays + (when (fboundp 'overlay-lists) + (while overlay-intangible-list + (overlay-put (car overlay-intangible-list) 'intangible t) + (setq overlay-intangible-list + (cdr overlay-intangible-list))))))) + ;; use extended syntax table + (set-syntax-table smarty-mode-ext-syntax-table) + ;; remove `intangible' overlays + (when (fboundp 'overlay-lists) + (setq overlay-all-list (overlay-lists)) + (setq overlay-all-list + (append (car overlay-all-list) (cdr overlay-all-list))) + (while overlay-all-list + (setq overlay (car overlay-all-list)) + (when (memq 'intangible (overlay-properties overlay)) + (setq overlay-intangible-list + (cons overlay overlay-intangible-list)) + (overlay-put overlay 'intangible nil)) + (setq overlay-all-list (cdr overlay-all-list)))) + ;; execute BODY safely + (setq result + (condition-case info + (progn ,@body) + (error (eval restore-prog) ; restore environment on error + (error (cadr info))))) ; pass error up + ;; restore environment + (eval restore-prog) + result)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Enabling/disabling + +(defun smarty-mode-line-update () + "Update the modeline string for Smarty major mode." + (setq mode-name (concat "Smarty" + (and (or smarty-electric-mode smarty-stutter-mode) "/") + (and smarty-electric-mode "e") + (and smarty-stutter-mode "s"))) + (force-mode-line-update t)) + +(defun smarty-electric-mode (arg) + "Toggle Smarty electric mode. +Turn on if ARG positive, turn off if ARG negative, toggle if ARG zero or nil." + (interactive "P") + (setq smarty-electric-mode + (cond ((or (not arg) (zerop arg)) (not smarty-electric-mode)) + ((> arg 0) t) (t nil))) + (smarty-mode-line-update)) + +(defun smarty-stutter-mode (arg) + "Toggle Smarty stuttering mode. +Turn on if ARG positive, turn off if ARG negative, toggle if ARG zero or nil." + (interactive "P") + (setq smarty-stutter-mode + (cond ((or (not arg) (zerop arg)) (not smarty-stutter-mode)) + ((> arg 0) t) (t nil))) + (smarty-mode-line-update)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Smarty code delimitation +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defun smarty-in-literal () + "Determine if point is in a Smarty literal." + (save-excursion + (let ((here (point)) + start state) + (beginning-of-line) + (setq start (point)) + (goto-char here) + (setq state (parse-partial-sexp start (point))) + (cond + ((nth 3 state) 'string) + ((nth 4 state) 'comment) + (t nil))))) + +(defun smarty-in-comment-p () + "Check if point is in a comment." + (let ((result nil) (here (point-marker)) found) + (save-excursion + (setq found (re-search-backward (regexp-quote (concat smarty-left-delimiter "*")) nil t)) + (when found + (setq result (re-search-forward (regexp-quote (concat "*" smarty-right-delimiter)) here t)) + (setq result (not result)))) + result)) + +(defun smarty-after-ldelim () + "Check that the previous character is the left delimiter." + (let ((here (point-marker)) ldelim-found ldelim-point) + (save-excursion + (setq ldelim-found (re-search-backward (regexp-quote smarty-left-delimiter) nil t)) + (re-search-forward (regexp-quote smarty-left-delimiter) here t) + (setq ldelim-point (point-marker)) + (goto-char here) + (if (and (= here ldelim-point) ldelim-found) + t + nil)))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Words to expand +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defun smarty-words-init () + "Initialize reserved words." + (setq smarty-functions smarty-01-functions) + (setq smarty-modifiers smarty-01-modifiers) + (setq smarty-plugins-functions smarty-01-plugins-functions) + (setq smarty-plugins-modifiers smarty-01-plugins-modifiers) + (setq smarty-functions-regexp (concat "\\<\\(" (regexp-opt smarty-functions) "\\)\\>")) + (setq smarty-modifiers-regexp (concat "\\<\\(" (regexp-opt smarty-modifiers) "\\)\\>")) + (setq smarty-plugins-functions-regexp (concat "\\<\\(" (regexp-opt smarty-plugins-functions) "\\)\\>")) + (setq smarty-plugins-modifiers-regexp (concat "\\<\\(" (regexp-opt smarty-plugins-modifiers) "\\)\\>")) + (smarty-abbrev-list-init)) + +(defvar smarty-abbrev-list nil + "Predefined abbreviations for Smarty.") + +(defun smarty-abbrev-list-init () + (setq smarty-abbrev-list + (append + (list nil) smarty-functions + (list nil) smarty-modifiers + (list nil) smarty-plugins-functions + (list nil) smarty-plugins-modifiers))) + +(defvar smarty-expand-upper-case nil) + +(defun smarty-try-expand-abbrev (old) + "Try expanding abbreviations from `smarty-abbrev-list'." + (unless old + (he-init-string (he-dabbrev-beg) (point)) + (setq he-expand-list + (let ((abbrev-list smarty-abbrev-list) + (sel-abbrev-list '())) + (while abbrev-list + ; (if (stringp (car abbrev-list)) + ; (insert (concat " " (car abbrev-list)))) + (when (or (not (stringp (car abbrev-list))) + (string-match + (concat "^" he-search-string) (car abbrev-list))) + (setq sel-abbrev-list + (cons (car abbrev-list) sel-abbrev-list))) + (setq abbrev-list (cdr abbrev-list))) + (nreverse sel-abbrev-list)))) + (while (and he-expand-list + (or (not (stringp (car he-expand-list))) + (he-string-member (car he-expand-list) he-tried-table t))) + (unless (stringp (car he-expand-list)) + (setq smarty-expand-upper-case (car he-expand-list))) + (setq he-expand-list (cdr he-expand-list))) + (if (null he-expand-list) + (progn (when old (he-reset-string)) + nil) + (he-substitute-string + (if smarty-expand-upper-case + (upcase (car he-expand-list)) + (car he-expand-list)) + t) + (setq he-expand-list (cdr he-expand-list)) + t)) + +;; initialize reserved words for Smarty Mode +(smarty-words-init) + +;; function for expanding abbrevs and dabbrevs +(defun smarty-expand-abbrev (arg)) +(fset 'smarty-expand-abbrev (make-hippie-expand-function + '(try-expand-dabbrev + try-expand-dabbrev-all-buffers + smarty-try-expand-abbrev))) + +;; function for expanding parenthesis +(defun smarty-expand-paren (arg)) +(fset 'smarty-expand-paren (make-hippie-expand-function + '(try-expand-list + try-expand-list-all-buffers))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Stuttering +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defun smarty-electric-tab (&optional prefix-arg) + "If preceding character is part of a word or a paren then hippie-expand, +else if right of non whitespace on line then insert tab, +else if last command was a tab or return then dedent one step or if a comment +toggle between normal indent and inline comment indent, +else indent `correctly'." + (interactive "*P") + (smarty-prepare-search-2 + (cond + ;; expand word + ((= (char-syntax (preceding-char)) ?w) + (let ((case-fold-search (not smarty-word-completion-case-sensitive)) + (case-replace nil) + (hippie-expand-only-buffers + (or (and (boundp 'hippie-expand-only-buffers) + hippie-expand-only-buffers) + '(smarty-mode)))) + (smarty-expand-abbrev prefix-arg))) + ;; expand parenthesis + ((or (= (preceding-char) ?\() (= (preceding-char) ?\))) + (let ((case-fold-search (not smarty-word-completion-case-sensitive)) + (case-replace nil)) + (smarty-expand-paren prefix-arg)))) + (setq this-command 'smarty-electric-tab))) + +(defun smarty-electric-space (count) + "Expand abbreviations and self-insert space(s)." + (interactive "p") + (let ((here (point-marker)) ldelim-found ldelim-point rdelim-found rdelim-point + delete-a) + (setq ldelim-found (re-search-backward (regexp-quote smarty-left-delimiter) nil t)) + (re-search-forward (regexp-quote smarty-left-delimiter) here t) + (setq ldelim-point (point-marker)) + (goto-char here) + (setq rdelim-found (re-search-backward (regexp-quote (concat " " smarty-right-delimiter)) nil t)) + (re-search-forward (regexp-quote (concat " " smarty-right-delimiter)) here t) + (setq rdelim-point (point-marker)) + (goto-char here) + (cond ((and (= here ldelim-point) ldelim-found) (insert (concat "ldelim" smarty-right-delimiter))) + ((and (= here rdelim-point) rdelim-found) + (re-search-backward (regexp-quote (concat " " smarty-right-delimiter)) nil t) + (delete-char 1) + (insert (concat " " smarty-left-delimiter "rdelim")) + (goto-char here)) + ((smarty-in-comment-p) + (self-insert-command count) + (cond ((>= (current-column) (+ 2 end-comment-column)) + (backward-char 1) + (skip-chars-backward "^ \t\n") + (indent-new-comment-line) + (skip-chars-forward "^ \t\n") + (forward-char 1)) + ((>= (current-column) end-comment-column) + (indent-new-comment-line)) + (t nil))) + ((or (and (>= (preceding-char) ?a) (<= (preceding-char) ?z)) + (and (>= (preceding-char) ?A) (<= (preceding-char) ?Z)) + (and (>= (preceding-char) ?0) (<= (preceding-char) ?9))) + (progn + (setq here (point-marker)) + (insert " ") + (setq delete-a t) + (if (re-search-backward "|" nil t) + (progn + (setq found (re-search-forward (regexp-quote "B2Smilies") here t)) + (if (and found (= here (point-marker))) + (replace-match "btosmilies") + (setq found (re-search-forward (regexp-quote "bbcode2html") here t)) + (if (and found (= here (point-marker))) + (replace-match "bbcodetohtml") + (setq found (re-search-forward (regexp-quote "date_format2") here t)) + (if (and found (= here (point-marker))) + (replace-match "date_formatto") + (goto-char here) + (setq delete-a nil) + (delete-char 1))))) + (goto-char here) + (setq delete-a nil) + (delete-char 1))) + (smarty-prepare-search-1 (expand-abbrev)) + (self-insert-command count) + (if (and delete-a (looking-at " ")) + (delete-char 1))) + (t (self-insert-command count))))) + +(defun smarty-electric-open-bracket (count) + "'(' --> '(', '((' --> '[', '[(' --> '{'" + (interactive "p") + (if (and smarty-stutter-mode (= count 1) (not (smarty-in-literal))) + (if (= (preceding-char) ?\() + (progn (delete-char -1) (insert-char ?\[ 1)) + (if (= (preceding-char) ?\[) + (progn (delete-char -1) (insert-char ?\{ 1)) + (insert-char ?\( 1))) + (self-insert-command count))) + +(defun smarty-electric-close-bracket (count) + "')' --> ')', '))' --> ']', '])' --> '}'" + (interactive "p") + (if (and smarty-stutter-mode (= count 1) (not (smarty-in-literal))) + (progn + (if (= (preceding-char) ?\)) + (progn (delete-char -1) (insert-char ?\] 1)) + (if (= (preceding-char) ?\]) + (progn (delete-char -1) (insert-char ?} 1)) + (insert-char ?\) 1))) + (blink-matching-open)) + (self-insert-command count))) + +(defun smarty-electric-star (count) + "After a left delimiter add a right delemiter to close the comment" + (interactive "p") + (let ((here (point-marker)) found) + (if (and smarty-stutter-mode (= count 1) (not (smarty-in-literal))) + (progn + (setq found (re-search-backward (regexp-quote smarty-left-delimiter) nil t)) + (re-search-forward (regexp-quote smarty-left-delimiter) here t) + (if (not (and (= here (point-marker)) found)) + (progn (goto-char here) + (self-insert-command count)) + (self-insert-command count) + (insert " ") + (setq here (point-marker)) + (insert " *") + (insert smarty-right-delimiter) + (goto-char here))) + (self-insert-command count)))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Electrification +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defconst smarty-template-prompt-syntax "[^ =<>][^<>@.\n]*[^ =<>]" + "Syntax of prompt inserted by template generators.") + +(defvar smarty-template-invoked-by-hook nil + "Indicates whether a template has been invoked by a hook or by key or menu. +Used for undoing after template abortion.") + +(defun smarty-minibuffer-tab (&optional prefix-arg) + "If preceding character is part of a word or a paren then hippie-expand, +else insert tab (used for word completion in Smarty minibuffer)." + (interactive "P") + (cond + ;; expand word + ((= (char-syntax (preceding-char)) ?w) + (let ((case-fold-search (not smarty-word-completion-case-sensitive)) + (case-replace nil) + (hippie-expand-only-buffers + (or (and (boundp 'hippie-expand-only-buffers) + hippie-expand-only-buffers) + '(smarty-mode)))) + (smarty-expand-abbrev prefix-arg))) + ;; expand parenthesis + ((or (= (preceding-char) ?\() (= (preceding-char) ?\))) + (let ((case-fold-search (not smarty-word-completion-case-sensitive)) + (case-replace nil)) + (smarty-expand-paren prefix-arg))) + ;; insert tab + (t (insert-tab)))) + +;; correct different behavior of function `unread-command-events' in XEmacs +(defun smarty-character-to-event (arg)) +(defalias 'smarty-character-to-event + (if (fboundp 'character-to-event) 'character-to-event 'identity)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Abbrev ook bindings +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defvar smarty-mode-abbrev-table nil + "Abbrev table to use in `smarty-mode' buffers.") + +(defun smarty-mode-abbrev-table-init () + "Initialize `smarty-mode-abbrev-table'." + (when smarty-mode-abbrev-table (clear-abbrev-table smarty-mode-abbrev-table)) + (define-abbrev-table 'smarty-mode-abbrev-table + (append + '( + ("capture" "" smarty-template-capture-hook 0) + ("config_load" "" smarty-template-config-load-hook 0) + ("else" "" smarty-template-else-hook 0) + ("elseif" "" smarty-template-elseif-hook 0) + ("foreach" "" smarty-template-foreach-hook 0) + ("foreachelse" "" smarty-template-foreachelse-hook 0) + ("if" "" smarty-template-if-hook 0) + ("include" "" smarty-template-include-hook 0) + ("include_php" "" smarty-template-include-php-hook 0) + ("insert" "" smarty-template-insert-hook 0) + ("ldelim" "" smarty-template-ldelim-hook 0) + ("literal" "" smarty-template-literal-hook 0) + ("php" "" smarty-template-php-hook 0) + ("rdelim" "" smarty-template-rdelim-hook 0) + ("section" "" smarty-template-section-hook 0) + ("sectionelse" "" smarty-template-sectionelse-hook 0) + ("strip" "" smarty-template-strip-hook 0) + ("assign" "" smarty-template-assign-hook 0) + ("counter" "" smarty-template-counter-hook 0) + ("cycle" "" smarty-template-cycle-hook 0) + ("debug" "" smarty-template-debug-hook 0) + ("eval" "" smarty-template-eval-hook 0) + ("fetch" "" smarty-template-fetch-hook 0) + ("html_checkboxes" "" smarty-template-html-checkboxes-hook 0) + ("html_image" "" smarty-template-html-image-hook 0) + ("html_options" "" smarty-template-html-options-hook 0) + ("html_radios" "" smarty-template-html-radios-hook 0) + ("html_select_date" "" smarty-template-html-select-date-hook 0) + ("html_select_time" "" smarty-template-html-select-time-hook 0) + ("html_table" "" smarty-template-html-table-hook 0) + ("mailto" "" smarty-template-mailto-hook 0) + ("math" "" smarty-template-math-hook 0) + ("popup" "" smarty-template-popup-hook 0) + ("popup_init" "" smarty-template-popup-init-hook 0) + ("textformat" "" smarty-template-textformat-hook 0) + ("capitalize" "" smarty-template-capitalize-hook 0) + ("cat" "" smarty-template-cat-hook 0) + ("count_characters" "" smarty-template-count-characters-hook 0) + ("count_paragraphs" "" smarty-template-count-paragraphs-hook 0) + ("count_sentences" "" smarty-template-count-sentences-hook 0) + ("count_words" "" smarty-template-count-words-hook 0) + ("date_format" "" smarty-template-date-format-hook 0) + ("default" "" smarty-template-default-hook 0) + ("escape" "" smarty-template-escape-hook 0) + ("indent" "" smarty-template-indent-hook 0) + ("lower" "" smarty-template-lower-hook 0) + ("nl2br" "" smarty-template-nl2br-hook 0) + ("regex_replace" "" smarty-template-regex-replace-hook 0) + ("replace" "" smarty-template-replace-hook 0) + ("spacify" "" smarty-template-spacify-hook 0) + ("string_format" "" smarty-template-string-format-hook 0) + ("strip" "" smarty-template-vstrip-hook 0) + ("strip_tags" "" smarty-template-strip-tags-hook 0) + ("truncate" "" smarty-template-truncate-hook 0) + ("upper" "" smarty-template-upper-hook 0) + ("wordwrap" "" smarty-template-wordwrap-hook 0) + ("validate" "" smarty-template-validate-hook 0) + ("formtool_checkall" "" smarty-template-formtool-checkall-hook 0) + ("formtool_copy" "" smarty-template-formtool-copy-hook 0) + ("formtool_count_chars" "" smarty-template-formtool-count-chars-hook 0) + ("formtool_init" "" smarty-template-formtool-init-hook 0) + ("formtool_move" "" smarty-template-formtool-move-hook 0) + ("formtool_moveall" "" smarty-template-formtool-moveall-hook 0) + ("formtool_movedown" "" smarty-template-formtool-movedown-hook 0) + ("formtool_moveup" "" smarty-template-formtool-moveup-hook 0) + ("formtool_remove" "" smarty-template-formtool-remove-hook 0) + ("formtool_rename" "" smarty-template-formtool-rename-hook 0) + ("formtool_save" "" smarty-template-formtool-save-hook 0) + ("formtool_selectall" "" smarty-template-formtool-selectall-hook 0) + ("paginate_first" "" smarty-template-paginate-first-hook 0) + ("paginate_last" "" smarty-template-paginate-last-hook 0) + ("paginate_middle" "" smarty-template-paginate-middle-hook 0) + ("paginate_next" "" smarty-template-paginate-next-hook 0) + ("paginate_prev" "" smarty-template-paginate-prev-hook 0) + ("btosmilies" "" smarty-template-btosmilies-hook 0) + ("bbcodetohtml" "" smarty-template-bbcodetohtml-hook 0) + ("date_formatto" "" smarty-template-date-formatto-hook 0))))) + +;; initialize abbrev table for Smarty Mode +(smarty-mode-abbrev-table-init) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Abbrev hooks +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defun smarty-hooked-abbrev (func) + "Do function, if syntax says abbrev is a keyword, invoked by hooked abbrev, +but not if inside a comment or quote)." + (if (or (smarty-in-literal) + (smarty-in-comment-p)) + (progn + (insert " ") + (unexpand-abbrev) + (delete-char -1)) + (if (not smarty-electric-mode) + (progn + (insert " ") + (unexpand-abbrev) + (backward-word 1) + (delete-char 1)) + (let ((invoke-char last-command-char) + (abbrev-mode -1) + (smarty-template-invoked-by-hook t)) + (let ((caught (catch 'abort + (funcall func)))) + (when (stringp caught) (message caught))) + (when (= invoke-char ?-) (setq abbrev-start-location (point))) + ;; delete CR which is still in event queue + (if (fboundp 'enqueue-eval-event) + (enqueue-eval-event 'delete-char -1) + (setq unread-command-events ; push back a delete char + (list (smarty-character-to-event ?\177)))))))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Fontification +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defvar smarty-font-lock-keywords-1 + (list + + ;; Fontify built-in functions + (cons + (concat (regexp-quote smarty-left-delimiter) "[/]*" smarty-functions-regexp) + '(1 font-lock-keyword-face)) + + (cons + (concat "\\<\\(" smarty-constants "\\)\\>") + 'font-lock-constant-face) + + (cons (concat "\\(" (regexp-quote (concat smarty-left-delimiter "*")) "\\(\\s-\\|\\w\\|\\s.\\|\\s_\\|\\s(\\|\\s)\\|\\s\\\\)*" (regexp-quote (concat "*" smarty-right-delimiter)) "\\)") + 'font-lock-comment-face) + + ) + "Subdued level highlighting for Smarty mode.") + +(defconst smarty-font-lock-keywords-2 + (append + smarty-font-lock-keywords-1 + (list + + ;; Fontify variable names (\\sw\\|\\s_\\) matches any word character + + ;; underscore + '("\\$\\(\\(?:\\sw\\|\\s_\\)+\\)" (1 font-lock-variable-name-face)) ; $variable + '("->\\(\\(?:\\sw\\|\\s_\\)+\\)" (1 font-lock-variable-name-face t t)) ; ->variable + '("\\.\\(\\(?:\\sw\\|\\s_\\)+\\)" (1 font-lock-variable-name-face t t)) ; .variable + '("->\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*(" (1 font-lock-function-name-face t t)) ; ->function_call + '("\\<\\(\\(?:\\sw\\|\\s_\\)+\\s-*\\)(" (1 font-lock-function-name-face)) ; word( + '("\\<\\(\\(?:\\sw\\|\\s_\\)+\\s-*\\)[[]" (1 font-lock-variable-name-face)) ; word[ + '("\\<[0-9]+" . default) ; number (also matches word) + + ;; Fontify strings + ;;'("\"\\([^\"]*\\)\"[^\"]+" (1 font-lock-string-face t t)) + )) + + "Medium level highlighting for Smarty mode.") + +(defconst smarty-font-lock-keywords-3 + (append + smarty-font-lock-keywords-2 + (list + ;; Fontify modifiers + (cons (concat "|\\(" smarty-modifiers-regexp "\\)[:|]+") '(1 font-lock-function-name-face)) + (cons (concat "|\\(" smarty-modifiers-regexp "\\)" (regexp-quote smarty-right-delimiter)) '(1 font-lock-function-name-face)) + + ;; Fontify config vars + (cons (concat (regexp-quote smarty-left-delimiter) "\\(#\\(?:\\sw\\|\\s_\\)+#\\)") '(1 font-lock-constant-face)))) + "Balls-out highlighting for Smarty mode.") + +(defconst smarty-font-lock-keywords-4 + (append + smarty-font-lock-keywords-3 + (list + ;; Fontify plugin functions + (cons + (concat (regexp-quote smarty-left-delimiter) "[/]*" smarty-plugins-functions-regexp) + '(1 font-lock-keyword-face)) + + (cons (concat "|\\(" smarty-plugins-modifiers-regexp "\\)[:|]+") '(1 font-lock-function-name-face)) + (cons (concat "|\\(" smarty-plugins-modifiers-regexp "\\)" (regexp-quote smarty-right-delimiter)) '(1 font-lock-function-name-face))))) + +(defvar smarty-font-lock-keywords smarty-font-lock-keywords-3 + "Default highlighting level for Smarty mode") + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Mode map +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defvar smarty-template-map nil + "Keymap for Smarty templates.") + +(defun smarty-template-map-init () + "Initialize `smarty-template-map'." + (setq smarty-template-map (make-sparse-keymap)) + ;; key bindings for Smarty templates + (define-key smarty-template-map "\C-ba" 'smarty-template-capture) + (define-key smarty-template-map "\C-bc" 'smarty-template-config-load) + (define-key smarty-template-map "\C-b\M-e" 'smarty-template-else) + (define-key smarty-template-map "\C-b\C-e" 'smarty-template-elseif) + (define-key smarty-template-map "\C-b\C-f" 'smarty-template-foreach) + (define-key smarty-template-map "\C-b\M-f" 'smarty-template-foreachelse) + (define-key smarty-template-map "\C-bf" 'smarty-template-if) + (define-key smarty-template-map "\C-b\C-i" 'smarty-template-include) + (define-key smarty-template-map "\C-b\M-i" 'smarty-template-include-php) + (define-key smarty-template-map "\C-bi" 'smarty-template-insert) + (define-key smarty-template-map "\C-bl" 'smarty-template-ldelim) + (define-key smarty-template-map "\C-b\C-l" 'smarty-template-literal) + (define-key smarty-template-map "\C-bp" 'smarty-template-php) + (define-key smarty-template-map "\C-br" 'smarty-template-rdelim) + (define-key smarty-template-map "\C-b\C-s" 'smarty-template-section) + (define-key smarty-template-map "\C-b\M-s" 'smarty-template-sectionelse) + (define-key smarty-template-map "\C-bs" 'smarty-template-strip) + (define-key smarty-template-map "\C-ca" 'smarty-template-assign) + (define-key smarty-template-map "\C-co" 'smarty-template-counter) + (define-key smarty-template-map "\C-cc" 'smarty-template-cycle) + (define-key smarty-template-map "\C-cd" 'smarty-template-debug) + (define-key smarty-template-map "\C-ce" 'smarty-template-eval) + (define-key smarty-template-map "\C-cf" 'smarty-template-fetch) + (define-key smarty-template-map "\C-c\C-hc" 'smarty-template-html-checkboxes) + (define-key smarty-template-map "\C-c\C-hi" 'smarty-template-html-image) + (define-key smarty-template-map "\C-c\C-ho" 'smarty-template-html-options) + (define-key smarty-template-map "\C-c\C-hr" 'smarty-template-html-radios) + (define-key smarty-template-map "\C-c\C-hd" 'smarty-template-html-select-date) + (define-key smarty-template-map "\C-c\C-hm" 'smarty-template-html-select-time) + (define-key smarty-template-map "\C-c\C-ht" 'smarty-template-html-table) + (define-key smarty-template-map "\C-ci" 'smarty-template-mailto) + (define-key smarty-template-map "\C-ch" 'smarty-template-math) + (define-key smarty-template-map "\C-c\C-p" 'smarty-template-popup) + (define-key smarty-template-map "\C-c\M-p" 'smarty-template-popup-init) + (define-key smarty-template-map "\C-ct" 'smarty-template-textformat) + (define-key smarty-template-map "\C-vp" 'smarty-template-capitalize) + (define-key smarty-template-map "\C-vc" 'smarty-template-cat) + (define-key smarty-template-map "\C-v\C-cc" 'smarty-template-count-characters) + (define-key smarty-template-map "\C-v\C-cp" 'smarty-template-count-paragraphs) + (define-key smarty-template-map "\C-v\C-cs" 'smarty-template-count-sentences) + (define-key smarty-template-map "\C-v\C-cw" 'smarty-template-count-words) + (define-key smarty-template-map "\C-vf" 'smarty-template-date-format) + (define-key smarty-template-map "\C-vd" 'smarty-template-default) + (define-key smarty-template-map "\C-ve" 'smarty-template-escape) + (define-key smarty-template-map "\C-vi" 'smarty-template-indent) + (define-key smarty-template-map "\C-vl" 'smarty-template-lower) + (define-key smarty-template-map "\C-vn" 'smarty-template-nl2br) + (define-key smarty-template-map "\C-vx" 'smarty-template-regex-replace) + (define-key smarty-template-map "\C-v\C-p" 'smarty-template-replace) + (define-key smarty-template-map "\C-vy" 'smarty-template-spacify) + (define-key smarty-template-map "\C-vs" 'smarty-template-string-format) + (define-key smarty-template-map "\C-v\C-s" 'smarty-template-vstrip) + (define-key smarty-template-map "\C-v\M-s" 'smarty-template-strip-tags) + (define-key smarty-template-map "\C-vt" 'smarty-template-truncate) + (define-key smarty-template-map "\C-vu" 'smarty-template-upper) + (define-key smarty-template-map "\C-vw" 'smarty-template-wordwrap) + (define-key smarty-template-map "\C-h" 'smarty-template-header) + (define-key smarty-template-map "\C-f" 'smarty-template-footer) + (define-key smarty-template-map "\C-di" 'smarty-template-insert-date) + (define-key smarty-template-map "\C-dm" 'smarty-template-modify)) + +;; initialize template map for Smarty Mode +(smarty-template-map-init) + +(defun smarty-mode-map-init () + "Initialize `smarty-mode-map'." + (setq smarty-mode-map (make-sparse-keymap)) + ;; template key bindings + (define-key smarty-mode-map "\C-c\C-t" smarty-template-map) + ;; mode specific key bindings + (define-key smarty-mode-map "\C-c\C-m\C-e" 'smarty-electric-mode) + (define-key smarty-mode-map "\C-c\C-m\C-s" 'smarty-stutter-mode) + (define-key smarty-mode-map "\C-c\C-s\C-u" 'smarty-add-source-files-menu) + (define-key smarty-mode-map "\C-c\M-m" 'smarty-show-messages) + (define-key smarty-mode-map "\C-c\C-h" 'smarty-doc-mode) + (define-key smarty-mode-map "\C-c\C-v" 'smarty-version) + ;; electric key bindings + (when smarty-intelligent-tab + (define-key smarty-mode-map "\t" 'smarty-electric-tab)) + (define-key smarty-mode-map " " 'smarty-electric-space) + (define-key smarty-mode-map "(" 'smarty-electric-open-bracket) + (define-key smarty-mode-map ")" 'smarty-electric-close-bracket) + (define-key smarty-mode-map "*" 'smarty-electric-star)) + +;; initialize mode map for Smarty Mode +(smarty-mode-map-init) + +(defvar smarty-minibuffer-local-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map minibuffer-local-map) + (when smarty-word-completion-in-minibuffer + (define-key map "\t" 'smarty-minibuffer-tab)) + map) + "Keymap for minibuffer used in Smarty Mode.") + +(mapcar + (function + (lambda (sym) + (put sym 'delete-selection t) ; for `delete-selection-mode' (Emacs) + (put sym 'pending-delete t))) ; for `pending-delete-mode' (XEmacs) + '(smarty-electric-space + smarty-electric-tab + smarty-electric-open-bracket + smarty-electric-close-bracket + smarty-electric-star)) + +;;;###autoload +(defun smarty-mode () + "Smarty Mode +*********** + +Smarty Mode is a GNU XEmacs major mode for editing Smarty templates. + +1 Introduction +************** + +Smarty-Mode is a mode allowing easy edit of Smarty templates: +highlight, templates, navigation into source files... + + + +Features (new features in bold) : + + * Completion + + * Customizable + + * Highlight + + * Menu + + * Stuttering + + * Templates + - Built-in Functions + + - User Functions + + - Variable Modifiers + + - Plugin (Functions) + * Smarty Formtool + + * Smarty Paginate + + * Smarty Validate + + - Plugin (Variable Modifiers) + * AlternativeDateModifierPlugin + + * B2Smilies + + * BBCodePlugin + + - Fonctions Non-Smarty + + + +This manual describes Smarty Mode version 0.0.4. + +2 Installation +************** + +2.1 Requirements +================ + +Smarty Mode is a XEmacs major mode that needs the following +software/packages: + + * XEmacs (http://www.xemacs.org/). + + * `font-lock' mode generaly installed with XEmacs. + + * `assoc' mode generaly installed with XEmacs. + + * `easymenu' mode generaly installed with XEmacs. + + * `hippie-exp' mode generaly installed with XEmacs. + +Before continuing, you must be sure to have all this packages +installed. + +2.2 Download +============ + +Two internet address to download Smarty Mode : + + * Principal: Smarty-Mode 0.0.4 + (http://deboutv.free.fr/lisp/smarty/download/smarty-0.0.4.tar.gz) + (http://deboutv.free.fr/lisp/smarty/) + + * Secondary: Smarty-Mode 0.0.4 + (http://www.morinie.fr/lisp/smarty/download/smarty-0.0.4.tar.gz) + (http://www.morinie.fr/lisp/smarty/) + + * Old releases: Smarty-Mode + (http://deboutv.free.fr/lisp/smarty/download.php) + (http://deboutv.free.fr/lisp/smarty/) + +2.3 Installation +================ + +2.3.1 Installation +------------------ + +To install Smarty Mode you need to choose an installation directory +(for example `/usr/local/share/lisp' or `c:\lisp'). The administrator +must have the write rights on this directory. + +With your favorite unzip software, unzip the archive in the +installation directory. + +Example: + cd /usr/local/share/lisp + tar zxvf smarty-0.0.4.tar.gz +Now you have a `smarty' directory in the installation directory. This +directory contains 2 files `smarty-mode.el' and `smarty-mode.elc' and +another directory `docs' containing the documentation. + +You need to configure XEmacs. open you initialization file `init.el' +(open the file or start XEmacs then choose the Options menu and Edit +Init File). Add the following lines (the installation directory in +this example is `/usr/local/share/lisp') : + + (setq load-path + (append (list \"/usr/local/share/lisp/\") load-path)) + (autoload 'smarty-mode \"smarty-mode\" \"Smarty Mode\" t) + +2.3.2 Update +------------ + +The update is easy. You need to unzip the archive in the installation +directory to remove the old release. + +Example: + cd /usr/local/share/lisp + rm -rf smarty + tar zxvf smarty-0.0.4.tar.gz + +2.4 Invoke Smarty-Mode +====================== + +You have two possibilities to invoke the Smarty Mode. + + - Manually: At each file opening you need to launch Smarty Mode + with the following command: + + `M-x smarty-mode' + + - Automatically: Add the following linesin your initialization + file `init.el' : + + (setq auto-mode-alist + (append + '((\"\\.tpl$\" . smarty-mode)) + auto-mode-alist)) + + +3 Customization +*************** + +This chapter describes the differents parameters and functions that +you can change to customize Smarty Mode. To do that, open a Smarty +file, click on the Smarty menu and choose Options then Browse +Options.... + +3.1 Parameters +============== + +3.1.1 Mode +---------- + +Smarty Mode has 2 modes allowing to simplify the writing of Smarty +templates. You can enable/disable each mode individually. + +`smarty-electric-mode' + Type: boolean + Default value: `t' + Description: If `t'; enable automatic generation of template. + If `nil'; template generators can still be invoked through key + bindings and menu. Is indicated in the modeline by \"/e\" after + the mode name and can be toggled by `smarty-electric-mode'. + +`smarty-stutter-mode' + Type: boolean + Default value: `t' + Description: If `t'; enable the stuttering. Is indicated in the + modeline by \"/s\" after the mode name and can be toggled by + `smarty-stutter-mode'. + +3.1.2 Menu +---------- + +Smarty Mode has also 1 menu that you can enable/disable. The menu +Sources is specific to each Smarty files opened. + +`smarty-source-file-menu' + Type: boolean + Default value: `t' + Description: If `t'; the Sources menu is enabled. This menu + contains the list of Smarty file located in the current + directory. The Sources menu scans the directory when a file is + opened. + +3.1.3 Menu +---------- + +`smarty-highlight-plugin-functions' + Type: boolean + Default value: `t' + Description: If `t'; the functions described in the smarty + plugins are highlighted. + +3.1.4 Templates +--------------- + +3.1.4.1 Header +.............. + +`smarty-file-header' + Type: string + Default value: `\"\"' + Description: String or file to insert as file header. If the + string specifies an existing file name the contents of the file + is inserted; otherwise the string itself is inserted as file + header. + Type `C-j' for newlines. + The follonwing keywords are supported: + : replaced by the file name. + : replaced by the user name and email address. + : replaced by `user-login-name'. + : replaced by `smarty-company-name' content. + : replaced by the current date. + : replaced by the current year. + : replaced by `smarty-copyright-string' content. + : final cursor position. + +`smarty-file-footer' + Type: string + Default value: `\"\"' + Description: String or file to insert as file footer. See + `smarty-file-header' + +`smarty-company-name' + Type: string + Default value: `\"\"' + Description: Name of the company to insert in file header. + +`smarty-copyright-string' + Type: string + Default value: `\"\"' + Description: Coryright string to insert in file header. + +`smarty-date-format' + Type: string + Default value: `\"%Y-%m-%d\"' + Description: Date format. + +`smarty-modify-date-prefix-string' + Type: string + Default value: `\"\"' + Description: Prefix string of modification date in Smarty file + header. + +`smarty-modify-date-on-saving' + Type: bool + Default value: `nil' + Description: If `t'; update the modification date when the + buffer is saved. + +3.1.5 Miscellaneous +------------------- + +`smarty-left-delimiter' + Type: string + Default value: `\"\"' + Description: Left escaping delimiter for Smarty templates. + +`smarty-right-delimiter' + Type: string + Default value: `\"\"' + Description: Right escaping delimiter for Smarty templates. + +`smarty-intelligent-tab' + Type: bool + Default value: `t' + Description: If `t'; TAB does indentation; completion and insert + tabulations. If `nil'; TAB does only indentation. + +`smarty-word-completion-in-minibuffer' + Type: bool + Default value: `t' + Description: If `t'; enable completion in the minibuffer. + +`smarty-word-completion-case-sensitive' + Type: bool + Default value: `nil' + Description: If `t'; completion is case sensitive. + +3.2 Functions +============= + +3.2.1 Mode +---------- + +`smarty-electric-mode' + Menu: Smarty -> Options -> Mode -> Electric Mode + Keybinding: `C-c C-m C-e' + Description: This functions is used to enable/disable the + electric mode. + +`smarty-stutter-mode' + Menu: Smarty -> Options -> Mode -> Stutter Mode + Keybinding: `C-c C-m C-s' + Description: This function is used to enable/disable the stutter + mode. + +4 Menus +******* + +There are 2 menus: Smarty and Sources. All theses menus can be +accessed from the menubar or from the right click. This chapter +describes each menus. + +4.1 Smarty +========== + +This is the main menu of Smarty Mode. It allows an easy access to the +main features of the Smarty Mode: Templates (see *Note Templates::) +and Options (see *Note Customization::). + +This menu contains also 3 functions that are discussed in the next +part. + +4.1.1 Functions +--------------- + +`smarty-show-messages' + Menu: Smarty -> Show Messages + Keybinding: `C-c M-m' + Description: This function opens the *Messages* buffer to + display previous error messages. + +`smarty-doc-mode' + Menu: Smarty -> Smarty Mode Documentation + Keybinding: `C-c C-h' + Description: This function opens the *Help* buffer and prints in + it the Smarty Mode documentation. + +`smarty-version' + Menu: Smarty -> Version + Keybinding: `C-c C-v' + Description: This function displays in the minibuffer the + current Smarty Mode version with the timestamp. + +4.2 Sources +=========== + +The Sources menu shows the Smarty files in the current directory. If +you add or delete a file in the current directory, you need to +refresh the menu. + +4.2.1 Customization +------------------- + +`smarty-source-file-menu' + Type: boolean + Default value: `t' + Description: If `t'; the Sources menu is enabled. This menu + contains the list of Smarty file located in the current + directory. The Sources menu scans the directory when a file is + opened. + +4.2.2 Functions +--------------- + +`smarty-add-source-files-menu' + Menu: Sources -> *Rescan* + Keybinding: `C-c C-s C-u' + Description: This function is used to refresh the Sources menu. + +5 Stuttering +************ + +The stutter mode is a mode that affects a function to a key. For +example, when you use the `ENTER' key, the associated function will +create a new line and indent it. + +5.1 Customization +================= + +`smarty-stutter-mode' + Type: boolean + Default value: `t' + Description: If `t'; enable the stuttering. Is indicated in the + modeline by \"/s\" after the mode name and can be toggled by + `smarty-stutter-mode'. + +5.2 Functions +============= + +`SPACE' + If in comment, indent the comment and add new line if necessary. + In other case, add a space. + +`(' + If the previous character is a `(', the `((' will be replaced by + `['. + If the previous character is a `[', the `[(' will be replaced by + `{'. + In other case, insert a `('. + +`)' + If the previous character is a `)', the `))' will be replaced by + `]'. + If the previous character is a `]', the `])' will be replaced by + `}'. + In other case, insert a `)'. + +6 Templates +*********** + +In the Smarty Mode, the Smarty functions (like if, while, for, fopen, +fclose) are predefined in functions called \"Templates\". + +Each template can be invoked by the function name or by using the + key after the Smarty function name in the buffer (Note, using +`M-' disable the template). + +A template can be aborted by using the `C-g' or by lefting empty the +tempate prompt (in the minibuffer). + +6.1 Customization +================= + +`smarty-electric-mode' + Type: boolean + Default value: `t' + Description: If `t'; enable automatic generation of template. + If `nil'; template generators can still be invoked through key + bindings and menu. Is indicated in the modeline by \"/e\" after + the mode name and can be toggled by `smarty-electric-mode'. + +For a complete description of the template customizable variables, +see *Note Cu01-Pa01-Template:: + +6.2 Functions +============= + +6.2.1 Smarty Functions +---------------------- + +For Smarty functions, see PDF or HTML documentation. + +6.2.2 Non-Smarty Functions +-------------------------- + +`smarty-template-header' + Menu: Smarty -> Templates -> Insert Header + Keybinding: `C-c C-t C-h' + Description: This function is used to insert a header in the + current buffer. + +`smarty-template-footer' + Menu: Smarty -> Templates -> Insert Footer + Keybinding: `C-c C-t C-f' + Description: This function is used to insert a footer in the + current buffer. + +`smarty-template-insert-date' + Menu: Smarty -> Templates -> Insert Date + Keybinding: `C-c C-t C-d i' + Description: This function is used to insert the date in the + current buffer. + +`smarty-template-modify' + Menu: Smarty -> Templates -> Modify Date + Keybinding: `C-c C-t C-d m' + Description: This function is used to modify the last + modification date in the current buffer. + +7 Bugs, Help +************ + + * To report bugs: Bugtracker + (http://bugtracker.morinie.fr/lisp/set_project.php?project_id=2) + + * To obtain help you can post on the dedicated forum: Forum + (http://forum.morinie.fr/lisp/) + +8 Key bindings +************** + +\\{smarty-mode-map}" + (interactive) + (kill-all-local-variables) + (setq major-mode 'smarty-mode) + (setq mode-name "Smarty") + + (smarty-create-syntax-table) + + ;; set maps and tables + (use-local-map smarty-mode-map) + (set-syntax-table smarty-mode-syntax-table) + (setq local-abbrev-table smarty-mode-abbrev-table) + + (set (make-local-variable 'comment-start) (concat smarty-left-delimiter "*")) + (set (make-local-variable 'comment-end) (concat "*" smarty-right-delimiter)) + (set (make-local-variable 'comment-multi-line) t) + (set (make-local-variable 'end-comment-column) 80) + + (make-local-variable 'font-lock-defaults) + (if smarty-highlight-plugin-functions + (setq smarty-font-lock-keywords smarty-font-lock-keywords-4) + (setq smarty-font-lock-keywords smarty-font-lock-keywords-3)) + (setq font-lock-defaults + '((smarty-font-lock-keywords) + nil ; Keywords only (i.e. no comment or string highlighting + t ; case fold + nil ; syntax-alist + nil ; syntax-begin + )) + + (setq font-lock-maximum-decoration t + case-fold-search t) + + ;; add source file menu + (if smarty-source-file-menu (smarty-add-source-files-menu)) + ;; add Smarty menu + (easy-menu-add smarty-mode-menu-list) + (easy-menu-define smarty-mode-menu smarty-mode-map + "Menu keymap for Smarty Mode." smarty-mode-menu-list) + + (message "Smarty Mode %s.%s" smarty-version + (if noninteractive "" " See menu for documentation and release notes.")) + (smarty-mode-line-update) + (run-hooks 'smarty-mode-hook)) + +(defun smarty-doc-mode () + "Display Smarty Mode documentation in *Help* buffer." + (interactive) + (with-output-to-temp-buffer + (if (fboundp 'help-buffer) (help-buffer) "*Help*") + (princ mode-name) + (princ " mode:\n") + (princ (documentation 'smarty-mode)) + (with-current-buffer standard-output + (help-mode)) + (print-help-return-message))) + +(defun smarty-activate-customizations () + "Activate all customizations on local variables." + (interactive) + (smarty-mode-map-init) + (use-local-map smarty-mode-map) + (set-syntax-table smarty-mode-syntax-table) + (smarty-update-mode-menu) + (run-hooks 'menu-bar-update-hook) + (smarty-mode-line-update)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Templates +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defun smarty-template-field (prompt &optional follow-string optional + begin end is-string string-char default) + "Prompt for string and insert it in buffer with optional FOLLOW-STRING. +If OPTIONAL is nil, the prompt is left if an empty string is inserted. If +an empty string is inserted, return nil and call `smarty-template-undo' for +the region between BEGIN and END. IS-STRING indicates whether a string +with double-quotes is to be inserted. DEFAULT specifies a default string." + (let ((position (point)) + string) + (insert "<" prompt ">") + (if (not (> (length string-char) 0)) + (setq string-char "\"")) + (setq string + (condition-case () + (read-from-minibuffer (concat prompt ": ") + (or (and is-string (cons (concat string-char string-char) 1)) default) + smarty-minibuffer-local-map) + (quit (if (and optional begin end) + (progn (beep) "") + (keyboard-quit))))) + (when (or (not (equal string "")) optional) + (delete-region position (point))) + (when (and (equal string "") optional begin end) + (smarty-template-undo begin end) + (message "Template aborted")) + (unless (equal string "") + (insert string)) + (when (or (not (equal string "")) (not optional)) + (insert (or follow-string ""))) + (if (equal string "") nil string))) + +(defun smarty-template-undo (begin end) + "Undo aborted template by deleting region and unexpanding the keyword." + (cond (smarty-template-invoked-by-hook + (goto-char end) + (insert " ") + (delete-region begin end) + (unexpand-abbrev)) + (t (delete-region begin end)))) + +(defun smarty-template-generic-function (label close-label field mandatory-count &optional infinite special-field) + "Generic function template 'label field1= field2=..." + (interactive) + (let ((start (point)) found here result-value elt continue field-count stop prompt) + (if smarty-template-invoked-by-hook + (setq found (smarty-after-ldelim)) + (insert smarty-left-delimiter) + (setq found t)) + (insert label) + (setq here (point-marker)) + (insert " ") + (when found + (setq elt field) + (setq continue t) + (setq field-count 0) + (setq stop nil) + (while (and elt continue) + (setq prompt (car elt)) + (when (not special-field) + (insert prompt "=")) + (setq result-value (smarty-template-field prompt nil t)) + (if (and (not result-value) + (< field-count mandatory-count)) + (progn (setq continue nil) + (delete-region start (point)) + (insert (concat label " ")) + (setq stop t)) + (if (not result-value) + (setq continue nil) + (setq here (point-marker)) + (insert " "))) + (setq field-count (+ 1 field-count)) + (setq elt (cdr elt))) + (when (and infinite continue) + (while continue + (setq result-value (smarty-template-field "var_name" "=" t here)) + (if (not result-value) + (setq continue nil) + (setq continue (smarty-template-field "var_value" nil t here)) + (setq here (point-marker)) + (insert " ")))) + (when (not stop) + (delete-region here (point)) + (if (> 0 mandatory-count) + (delete-char -1)) + (if special-field + (delete-char -1)) + (insert smarty-right-delimiter) + (setq here (point-marker)) + (if close-label + (insert smarty-left-delimiter "/" label smarty-right-delimiter)) + (goto-char here))))) + +(defun smarty-template-generic-modifier (label field mandatory-count) + "Generic modifier template '|label:field1:field2..." + (interactive) + (let ((start (point)) found here result-value elt continue field-count stop prompt) + (setq found (re-search-backward (concat (regexp-quote smarty-left-delimiter) "\\$\\(\\w+\\)" (regexp-quote "|")) nil t)) + (if found + (progn + (setq found (re-search-forward (regexp-quote smarty-right-delimiter) start t)) + (if (not found) + (progn + (goto-char start) + (insert label) + (setq here (point-marker)) + (setq elt field) + (setq continue t) + (setq field-count 0) + (setq stop nil) + (while (and elt continue) + (setq prompt (car elt)) + (insert ":") + (setq result-value (smarty-template-field prompt nil t)) + (if (and (not result-value) + (< field-count mandatory-count)) + (progn (setq continue nil) + (delete-region start (point)) + (insert (concat label " ")) + (setq stop t)) + (if (not result-value) + (setq continue nil) + (setq here (point-marker)) + (insert ":"))) + (setq field-count (+ 1 field-count)) + (setq elt (cdr elt))) + (when (not stop) + (delete-region here (point)) + (if (not (or (looking-at smarty-right-delimiter) + (looking-at "|"))) + (insert smarty-right-delimiter)))) + (goto-char start) + (insert label " "))) + (goto-char start) + (insert label " ")))) + +(defun smarty-template-capture-hook () + (smarty-hooked-abbrev 'smarty-template-capture)) +(defun smarty-template-config-load-hook () + (smarty-hooked-abbrev 'smarty-template-config-load)) +(defun smarty-template-else-hook () + (smarty-hooked-abbrev 'smarty-template-else)) +(defun smarty-template-elseif-hook () + (smarty-hooked-abbrev 'smarty-template-elseif)) +(defun smarty-template-foreach-hook () + (smarty-hooked-abbrev 'smarty-template-foreach)) +(defun smarty-template-foreachelse-hook () + (smarty-hooked-abbrev 'smarty-template-foreachelse)) +(defun smarty-template-if-hook () + (smarty-hooked-abbrev 'smarty-template-if)) +(defun smarty-template-include-hook () + (smarty-hooked-abbrev 'smarty-template-include)) +(defun smarty-template-include-php-hook () + (smarty-hooked-abbrev 'smarty-template-include-php)) +(defun smarty-template-insert-hook () + (smarty-hooked-abbrev 'smarty-template-insert)) +(defun smarty-template-ldelim-hook () + (smarty-hooked-abbrev 'smarty-template-ldelim)) +(defun smarty-template-literal-hook () + (smarty-hooked-abbrev 'smarty-template-literal)) +(defun smarty-template-php-hook () + (smarty-hooked-abbrev 'smarty-template-php)) +(defun smarty-template-rdelim-hook () + (smarty-hooked-abbrev 'smarty-template-rdelim)) +(defun smarty-template-section-hook () + (smarty-hooked-abbrev 'smarty-template-section)) +(defun smarty-template-sectionelse-hook () + (smarty-hooked-abbrev 'smarty-template-sectionelse)) +(defun smarty-template-strip-hook () + (smarty-hooked-abbrev 'smarty-template-strip)) + +(defun smarty-template-assign-hook () + (smarty-hooked-abbrev 'smarty-template-assign)) +(defun smarty-template-counter-hook () + (smarty-hooked-abbrev 'smarty-template-counter)) +(defun smarty-template-cycle-hook () + (smarty-hooked-abbrev 'smarty-template-cycle)) +(defun smarty-template-debug-hook () + (smarty-hooked-abbrev 'smarty-template-debug)) +(defun smarty-template-eval-hook () + (smarty-hooked-abbrev 'smarty-template-eval)) +(defun smarty-template-fetch-hook () + (smarty-hooked-abbrev 'smarty-template-fetch)) +(defun smarty-template-html-checkboxes-hook () + (smarty-hooked-abbrev 'smarty-template-html-checkboxes)) +(defun smarty-template-html-image-hook () + (smarty-hooked-abbrev 'smarty-template-html-image)) +(defun smarty-template-html-options-hook () + (smarty-hooked-abbrev 'smarty-template-html-options)) +(defun smarty-template-html-radios-hook () + (smarty-hooked-abbrev 'smarty-template-html-radios)) +(defun smarty-template-html-select-date-hook () + (smarty-hooked-abbrev 'smarty-template-html-select-date)) +(defun smarty-template-html-select-time-hook () + (smarty-hooked-abbrev 'smarty-template-html-select-time)) +(defun smarty-template-html-table-hook () + (smarty-hooked-abbrev 'smarty-template-html-table)) +(defun smarty-template-mailto-hook () + (smarty-hooked-abbrev 'smarty-template-mailto)) +(defun smarty-template-math-hook () + (smarty-hooked-abbrev 'smarty-template-math)) +(defun smarty-template-popup-hook () + (smarty-hooked-abbrev 'smarty-template-popup)) +(defun smarty-template-popup-init-hook () + (smarty-hooked-abbrev 'smarty-template-popup-init)) +(defun smarty-template-textformat-hook () + (smarty-hooked-abbrev 'smarty-template-textformat)) + +(defun smarty-template-capitalize-hook () + (smarty-hooked-abbrev 'smarty-template-capitalize)) +(defun smarty-template-cat-hook () + (smarty-hooked-abbrev 'smarty-template-cat)) +(defun smarty-template-count-characters-hook () + (smarty-hooked-abbrev 'smarty-template-count-characters)) +(defun smarty-template-count-paragraphs-hook () + (smarty-hooked-abbrev 'smarty-template-count-paragraphs)) +(defun smarty-template-count-sentences-hook () + (smarty-hooked-abbrev 'smarty-template-count-sentences)) +(defun smarty-template-count-words-hook () + (smarty-hooked-abbrev 'smarty-template-count-words)) +(defun smarty-template-date-format-hook () + (smarty-hooked-abbrev 'smarty-template-date-format)) +(defun smarty-template-default-hook () + (smarty-hooked-abbrev 'smarty-template-default)) +(defun smarty-template-escape-hook () + (smarty-hooked-abbrev 'smarty-template-escape)) +(defun smarty-template-indent-hook () + (smarty-hooked-abbrev 'smarty-template-indent)) +(defun smarty-template-lower-hook () + (smarty-hooked-abbrev 'smarty-template-lower)) +(defun smarty-template-nl2br-hook () + (smarty-hooked-abbrev 'smarty-template-nl2br)) +(defun smarty-template-regex-replace-hook () + (smarty-hooked-abbrev 'smarty-template-regex-replace)) +(defun smarty-template-replace-hook () + (smarty-hooked-abbrev 'smarty-template-replace)) +(defun smarty-template-spacify-hook () + (smarty-hooked-abbrev 'smarty-template-spacify)) +(defun smarty-template-string-format-hook () + (smarty-hooked-abbrev 'smarty-template-string-format)) +(defun smarty-template-vstrip-hook () + (smarty-hooked-abbrev 'smarty-template-vstrip)) +(defun smarty-template-strip-tags-hook () + (smarty-hooked-abbrev 'smarty-template-strip-tags)) +(defun smarty-template-truncate-hook () + (smarty-hooked-abbrev 'smarty-template-truncate)) +(defun smarty-template-upper-hook () + (smarty-hooked-abbrev 'smarty-template-upper)) +(defun smarty-template-wordwrap-hook () + (smarty-hooked-abbrev 'smarty-template-wordwrap)) + +(defun smarty-template-validate-hook () + (smarty-hooked-abbrev 'smarty-template-validate)) +(defun smarty-template-formtool-checkall-hook () + (smarty-hooked-abbrev 'smarty-template-formtool-checkall)) +(defun smarty-template-formtool-copy-hook () + (smarty-hooked-abbrev 'smarty-template-formtool-copy)) +(defun smarty-template-formtool-count-chars-hook () + (smarty-hooked-abbrev 'smarty-template-formtool-count-chars)) +(defun smarty-template-formtool-init-hook () + (smarty-hooked-abbrev 'smarty-template-formtool-init)) +(defun smarty-template-formtool-move-hook () + (smarty-hooked-abbrev 'smarty-template-formtool-move)) +(defun smarty-template-formtool-moveall-hook () + (smarty-hooked-abbrev 'smarty-template-formtool-moveall)) +(defun smarty-template-formtool-movedown-hook () + (smarty-hooked-abbrev 'smarty-template-formtool-movedown)) +(defun smarty-template-formtool-moveup-hook () + (smarty-hooked-abbrev 'smarty-template-formtool-moveup)) +(defun smarty-template-formtool-remove-hook () + (smarty-hooked-abbrev 'smarty-template-formtool-remove)) +(defun smarty-template-formtool-rename-hook () + (smarty-hooked-abbrev 'smarty-template-formtool-rename)) +(defun smarty-template-formtool-save-hook () + (smarty-hooked-abbrev 'smarty-template-formtool-save)) +(defun smarty-template-formtool-selectall-hook () + (smarty-hooked-abbrev 'smarty-template-formtool-selectall)) +(defun smarty-template-paginate-first-hook () + (smarty-hooked-abbrev 'smarty-template-paginate-first)) +(defun smarty-template-paginate-last-hook () + (smarty-hooked-abbrev 'smarty-template-paginate-last)) +(defun smarty-template-paginate-middle-hook () + (smarty-hooked-abbrev 'smarty-template-paginate-middle)) +(defun smarty-template-paginate-next-hook () + (smarty-hooked-abbrev 'smarty-template-paginate-next)) +(defun smarty-template-paginate-prev-hook () + (smarty-hooked-abbrev 'smarty-template-paginate-prev)) + +(defun smarty-template-btosmilies-hook () + (smarty-hooked-abbrev 'smarty-template-btosmilies)) +(defun smarty-template-bbcodetohtml-hook () + (smarty-hooked-abbrev 'smarty-template-bbcodetohtml)) +(defun smarty-template-date-formatto-hook () + (smarty-hooked-abbrev 'smarty-template-date-formatto)) + +(defun smarty-template-capture () + "Insert a capture statement." + (interactive) + (smarty-template-generic-function "capture" t '("name" "assign") 0)) + +(defun smarty-template-config-load () + "Insert a config_load statement." + (interactive) + (smarty-template-generic-function "config_load" nil '("file" "section" "scope" "global") 1)) + +(defun smarty-template-else () + "Insert a else statement." + (interactive) + (smarty-template-generic-function "else" nil '() 0)) + +(defun smarty-template-elseif () + "Insert a elseif statement." + (interactive) + (smarty-template-generic-function "elseif" nil '("condition") 1 nil t)) + +(defun smarty-template-foreach () + "Insert a foreach statement." + (interactive) + (smarty-template-generic-function "foreach" t '("from" "item" "key" "name") 2)) + +(defun smarty-template-foreachelse () + "Insert a foreachelse statement." + (interactive) + (smarty-template-generic-function "foreachelse" nil '() 0)) + +(defun smarty-template-if () + "Insert a if statement." + (interactive) + (smarty-template-generic-function "if" t '("condition") 1 nil t)) + +(defun smarty-template-include () + "Insert a include statement." + (interactive) + (smarty-template-generic-function "include" nil '("file" "assign") 1 t)) + +(defun smarty-template-include-php () + "Insert a include_php statement." + (interactive) + (smarty-template-generic-function "include_php" nil '("file" "once" "assign") 1)) + +(defun smarty-template-insert () + "Insert a insert statement." + (interactive) + (smarty-template-generic-function "insert" nil '("name" "assign" "script") 1 t)) + +(defun smarty-template-ldelim () + "Insert a ldelim statement." + (interactive) + (smarty-template-generic-function "ldelim" nil '() 0)) + +(defun smarty-template-literal () + "Insert a literal statement." + (interactive) + (smarty-template-generic-function "literal" t '() 0)) + +(defun smarty-template-php () + "Insert a php statement." + (interactive) + (smarty-template-generic-function "php" t '() 0)) + +(defun smarty-template-rdelim () + "Insert a rdelim statement." + (interactive) + (smarty-template-generic-function "rdelim" nil '() 0)) + +(defun smarty-template-section () + "Insert a section statement." + (interactive) + (smarty-template-generic-function "section" t '("name" "loop" "start" "step" "max" "show") 2)) + +(defun smarty-template-sectionelse () + "Insert a sectionelse statement." + (interactive) + (smarty-template-generic-function "sectionelse" nil '() 0)) + +(defun smarty-template-strip () + "Insert a strip statement." + (interactive) + (smarty-template-generic-function "strip" t '() 0)) + + +(defun smarty-template-assign () + "Insert a assign statement." + (interactive) + (smarty-template-generic-function "assign" nil '("var" "value") 2)) + +(defun smarty-template-counter () + "Insert a counter statement." + (interactive) + (smarty-template-generic-function "counter" nil '("name" "start" "skip" "direction" "print" "assign") 0)) + +(defun smarty-template-cycle () + "Insert a cycle statement." + (interactive) + (smarty-template-generic-function "cycle" nil '("values" "name" "print" "advance" "delimiter" "assign" "reset") 1)) + +(defun smarty-template-debug () + "Insert a debug statement." + (interactive) + (smarty-template-generic-function "debug" nil '("output") 0)) + +(defun smarty-template-eval () + "Insert a eval statement." + (interactive) + (smarty-template-generic-function "eval" nil '("var" "assign") 1)) + +(defun smarty-template-fetch () + "Insert a fetch statement." + (interactive) + (smarty-template-generic-function "fetch" nil '("file" "assign") 1)) + +(defun smarty-template-html-checkboxes () + "Insert a html_checkboxes statement." + (interactive) + (smarty-template-generic-function "html_checkboxes" nil '("name" "values" "output" "selected" "options" "separator" "assign" "labels") 0)) + +(defun smarty-template-html-image () + "Insert a html_image statement." + (interactive) + (smarty-template-generic-function "html_image" nil '("file" "height" "width" "basedir" "alt" "href" "path_prefix") 1)) + +(defun smarty-template-html-options () + "Insert a html_options statement." + (interactive) + (smarty-template-generic-function "html_options" nil '("name" "values" "output" "selected" "options") 0)) + +(defun smarty-template-html-radios () + "Insert a html_radios statement." + (interactive) + (smarty-template-generic-function "html_radios" nil '("name" "values" "output" "selected" "options" "separator" "assign") 0)) + +(defun smarty-template-html-select-date () + "Insert a html_select_date statement." + (interactive) + (smarty-template-generic-function "html_select_date" nil '("prefix" "time" "start_year" "end_year" "display_days" "display_months" "display_years" "month_format" "day_format" "day_value_format" "year_as_text" "reverse_years" "field_array" "day_size" "month_size" "year_size" "all_extra" "day_extra" "month_extra" "year_extra" "field_order" "field_separator" "month_value_format" "year_empty" "month_empty" "day_empty") 0)) + +(defun smarty-template-html-select-time () + "Insert a html_select_time statement." + (interactive) + (smarty-template-generic-function "html_select_time" nil '("prefix" "time" "display_hours" "display_minutes" "display_seconds" "display_meridian" "use_24_hours" "minute_interval" "second_interval" "field_array" "all_extra" "hour_extra" "minute_extra" "second_extra" "meridian_extra") 0)) + +(defun smarty-template-html-table () + "Insert a html_table statement." + (interactive) + (smarty-template-generic-function "html_table" nil '("loop" "cols" "rows" "inner" "caption" "table_attr" "th_attr" "tr_attr" "td_attr" "trailpad" "hdir" "vdir") 1)) + +(defun smarty-template-mailto () + "Insert a mailto statement." + (interactive) + (smarty-template-generic-function "mailto" nil '("address" "text" "encode" "cc" "bcc" "subject" "newsgroups" "followupto" "extra") 1)) + +(defun smarty-template-math () + "Insert a math statement." + (interactive) + (smarty-template-generic-function "math" nil '("equation" "var" "format" "assign") 2 t)) + +(defun smarty-template-popup () + "Insert a popup statement." + (interactive) + (smarty-template-generic-function "popup" nil '("text" "trigger" "sticky" "caption" "fgcolor" "bgcolor" "textcolor" "capcolor" "closecolor" "textfont" "captionfont" "closefont" "textsize" "captionsize" "closesize" "width" "height" "left" "right" "center" "above" "below" "border" "offsetx" "offsety" "fgbackground" "bgbackground" "closetext" "noclose" "status" "autostatus" "autostatuscap" "inarray" "caparray" "capicon" "snapx" "snapy" "fixx" "fixy" "background" "padx" "pady" "fullhtml" "frame" "function" "delay" "hauto" "vauto") 1)) + +(defun smarty-template-popup-init () + "Insert a popup_init statement." + (interactive) + (smarty-template-generic-function "popup_init" nil '("src") 1)) + +(defun smarty-template-textformat () + "Insert a textformat statement." + (interactive) + (smarty-template-generic-function "textformat" t '("style" "indent" "indent_first" "indent_char" "wrap" "wrap_char" "wrap_cut" "assign") 0)) + +(defun smarty-template-capitalize () + "Insert a capitalize statement." + (interactive) + (smarty-template-generic-modifier "capitalize" '("upcase_numeric") 0)) + +(defun smarty-template-cat () + "Insert a cat statement." + (interactive) + (smarty-template-generic-modifier "cat" '("value") 0)) + +(defun smarty-template-count-characters () + "Insert a count_characters statement." + (interactive) + (smarty-template-generic-modifier "count_characters" '("include_whitespace") 0)) + +(defun smarty-template-count-paragraphs () + "Insert a count_paragraphs statement." + (interactive) + (smarty-template-generic-modifier "count_paragraphs" '() 0)) + +(defun smarty-template-count-sentences () + "Insert a count_sentences statement." + (interactive) + (smarty-template-generic-modifier "count_sentences" '() 0)) + +(defun smarty-template-count-words () + "Insert a count_words statement." + (interactive) + (smarty-template-generic-modifier "count_words" '() 0)) + +(defun smarty-template-date-format () + "Insert a date_format statement." + (interactive) + (smarty-template-generic-modifier "date_format" '("format" "default") 0)) + +(defun smarty-template-default () + "Insert a default statement." + (interactive) + (smarty-template-generic-modifier "default" '("value") 0)) + +(defun smarty-template-escape () + "Insert a escape statement." + (interactive) + (smarty-template-generic-modifier "escape" '("html|htmlall|url|urlpathinfo|quotes|hex|hexentity|javascript|mail" "charset") 0)) + +(defun smarty-template-indent () + "Insert a indent statement." + (interactive) + (smarty-template-generic-modifier "indent" '("value" "character") 0)) + +(defun smarty-template-lower () + "Insert a lower statement." + (interactive) + (smarty-template-generic-modifier "lower" '() 0)) + +(defun smarty-template-nl2br () + "Insert a nl2br statement." + (interactive) + (smarty-template-generic-modifier "nl2br" '() 0)) + +(defun smarty-template-regex-replace () + "Insert a regex_replace statement." + (interactive) + (smarty-template-generic-modifier "regex_replace" '("regexp" "string_to_replace") 2)) + +(defun smarty-template-replace () + "Insert a replace statement." + (interactive) + (smarty-template-generic-modifier "replace" '("string" "string_to_replace_with") 2)) + +(defun smarty-template-spacify () + "Insert a spacify statement." + (interactive) + (smarty-template-generic-modifier "spacify" '("character") 0)) + +(defun smarty-template-string-format () + "Insert a string_format statement." + (interactive) + (smarty-template-generic-modifier "string_format" '("format") 1)) + +(defun smarty-template-vstrip () + "Insert a strip statement." + (interactive) + (smarty-template-generic-modifier "strip" '() 0)) + +(defun smarty-template-strip-tags () + "Insert a strip_tags statement." + (interactive) + (smarty-template-generic-modifier "strip_tags" '("replace_by_space") 0)) + +(defun smarty-template-truncate () + "Insert a truncate statement." + (interactive) + (smarty-template-generic-modifier "truncate" '("count" "text_to_replace" "character_boundary" "middle_string") 0)) + +(defun smarty-template-upper () + "Insert a upper statement." + (interactive) + (smarty-template-generic-modifier "upper" '() 0)) + +(defun smarty-template-wordwrap () + "Insert a wordwrap statement." + (interactive) + (smarty-template-generic-modifier "wordwrap" '("count" "string" "character_boundary") 0)) + + +(defun smarty-template-validate () + "Insert a validate statement." + (interactive) + (smarty-template-generic-function "validate" nil '("field" "criteria" "message" "form" "transform" "trim" "empty" "halt" "assign" "append" "page") 3)) + +(defun smarty-template-formtool-checkall () + "Insert a formtool_checkall statement." + (interactive) + (smarty-template-generic-function "formtool_checkall" nil '("name" "class" "style") 1)) + +(defun smarty-template-formtool-copy () + "Insert a formtool_copy statement." + (interactive) + (smarty-template-generic-function "formtool_copy" nil '("from" "to" "save" "button_text" "all" "counter" "class" "style") 3)) + +(defun smarty-template-formtool-count-chars () + "Insert a formtool_count_chars statement." + (interactive) + (smarty-template-generic-function "formtool_count_chars" nil '("name" "limit" "alert") 3)) + +(defun smarty-template-formtool-init () + "Insert a formtool_init statement." + (interactive) + (smarty-template-generic-function "formtool_init" nil '("src") 1)) + +(defun smarty-template-formtool-move () + "Insert a formtool_move statement." + (interactive) + (smarty-template-generic-function "formtool_move" nil '("from" "to" "save_from" "save_to" "all" "count_to" "count_from" "class" "style") 4)) + +(defun smarty-template-formtool-moveall () + "Insert a formtool_moveall statement." + (interactive) + (smarty-template-generic-function "formtool_moveall" nil '("from" "to" "save_from" "save_to" "all" "count_to" "count_from" "class" "style") 4)) + +(defun smarty-template-formtool-movedown () + "Insert a formtool_movedown statement." + (interactive) + (smarty-template-generic-function "formtool_movedown" nil '("save" "name" "class" "style") 2)) + +(defun smarty-template-formtool-moveup () + "Insert a formtool_moveup statement." + (interactive) + (smarty-template-generic-function "formtool_moveup" nil '("save" "name" "class" "style") 2)) + +(defun smarty-template-formtool-remove () + "Insert a formtool_remove statement." + (interactive) + (smarty-template-generic-function "formtool_remove" nil '("from" "save" "all" "counter" "class" "style") 2)) + +(defun smarty-template-formtool-rename () + "Insert a formtool_rename statement." + (interactive) + (smarty-template-generic-function "formtool_rename" nil '("name" "from" "save" "class" "style") 3)) + +(defun smarty-template-formtool-save () + "Insert a formtool_save statement." + (interactive) + (smarty-template-generic-function "formtool_save" nil '("from" "name" "save") 3)) + +(defun smarty-template-formtool-selectall () + "Insert a formtool_selectall statement." + (interactive) + (smarty-template-generic-function "formtool_selectall" nil '("name" "class" "style") 1)) + +(defun smarty-template-paginate-first () + "Insert a paginate_first statement." + (interactive) + (smarty-template-generic-function "paginate_first" nil '("id" "text") 0)) + +(defun smarty-template-paginate-last () + "Insert a paginate_last statement." + (interactive) + (smarty-template-generic-function "paginate_last" nil '("id" "text") 0)) + +(defun smarty-template-paginate-middle () + "Insert a paginate_middle statement." + (interactive) + (smarty-template-generic-function "paginate_middle" nil '("id" "format" "prefix" "page_limit" "link_prefix" "link_suffix") 0)) + +(defun smarty-template-paginate-next () + "Insert a paginate_next statement." + (interactive) + (smarty-template-generic-function "paginate_next" nil '("id" "text") 0)) + +(defun smarty-template-paginate-prev () + "Insert a paginate_prev statement." + (interactive) + (smarty-template-generic-function "paginate_prev" nil '("id" "text") 0)) + + +(defun smarty-template-btosmilies () + "Insert a B2Smilies statement." + (interactive) + (smarty-template-generic-modifier "B2Smilies" '() 0)) + +(defun smarty-template-bbcodetohtml () + "Insert a bbcode2html statement." + (interactive) + (smarty-template-generic-modifier "bbcode2html" '() 0)) + +(defun smarty-template-date-formatto () + "Insert a date_format2 statement." + (interactive) + (smarty-template-generic-modifier "date_format2" '("format" "default") 0)) + +;; + +(defun smarty-resolve-env-variable (string) + "Resolve environment variables in STRING." + (while (string-match "\\(.*\\)${?\\(\\(\\w\\|_\\)+\\)}?\\(.*\\)" string) + (setq string (concat (match-string 1 string) + (getenv (match-string 2 string)) + (match-string 4 string)))) + string) + +(defun smarty-insert-string-or-file (string) + "Insert STRING or file contents if STRING is an existing file name." + (unless (equal string "") + (let ((file-name + (progn (string-match "^\\([^\n]+\\)" string) + (smarty-resolve-env-variable (match-string 1 string))))) + (if (file-exists-p file-name) + (forward-char (cadr (insert-file-contents file-name))) + (insert string))))) + +(defun smarty-template-insert-date () + "Insert date in appropriate format." + (interactive) + (insert + (cond + ;; 'american, 'european, 'scientific kept for backward compatibility + ((eq smarty-date-format 'american) (format-time-string "%m/%d/%Y" nil)) + ((eq smarty-date-format 'european) (format-time-string "%d.%m.%Y" nil)) + ((eq smarty-date-format 'scientific) (format-time-string "%Y/%m/%d" nil)) + (t (format-time-string smarty-date-format nil))))) + +(defun smarty-template-header (&optional file-title) + "Insert a Smarty file header." + (interactive) + (unless (equal smarty-file-header "") + (let (pos) + (save-excursion + (smarty-insert-string-or-file smarty-file-header) + (setq pos (point-marker))) + (smarty-template-replace-header-keywords + (point-min-marker) pos file-title)))) + +(defun smarty-template-footer () + "Insert a Smarty file footer." + (interactive) + (unless (equal smarty-file-footer "") + (let (pos) + (save-excursion + (setq pos (point-marker)) + (smarty-insert-string-or-file smarty-file-footer) + (unless (= (preceding-char) ?\n) + (insert "\n"))) + (smarty-template-replace-header-keywords pos (point-max-marker))))) + +(defun smarty-template-replace-header-keywords (beg end &optional file-title is-model) + "Replace keywords in header and footer." + (let () + (smarty-prepare-search-2 + (save-excursion + (goto-char beg) + (while (search-forward "" end t) + (replace-match (buffer-name) t t)) + (goto-char beg) + (while (search-forward "" end t) + (replace-match smarty-copyright-string t t)) + (goto-char beg) + (while (search-forward "" end t) + (replace-match "" t t) + (insert (user-full-name)) + (when user-mail-address (insert " <" user-mail-address ">"))) + (goto-char beg) + (while (search-forward "" end t) + (replace-match (user-login-name) t t)) + (goto-char beg) + (while (search-forward "" end t) + (replace-match smarty-company-name t t)) + (goto-char beg) + ;; Replace with $, so that RCS for the source is + ;; not over-enthusiastic with replacements + (while (search-forward "" end t) + (replace-match "$" nil t)) + (goto-char beg) + (while (search-forward "" end t) + (replace-match "" t t) + (smarty-template-insert-date)) + (goto-char beg) + (while (search-forward "" end t) + (replace-match (format-time-string "%Y" nil) t t)) + (goto-char beg) + (let (string) + (while + (re-search-forward "<\\(\\(\\w\\|\\s_\\)*\\) string>" end t) + (setq string (read-string (concat (match-string 1) ": "))) + (replace-match string t t))) + (goto-char beg) + (when (and (not is-model) (search-forward "" end t)) + (replace-match "" t t)))))) + +(provide 'smarty-mode) +;;; smarty-mode.el ends here \ No newline at end of file diff --git a/emacs.d/nxhtml/autostart.el b/emacs.d/nxhtml/autostart.el new file mode 100644 index 0000000..44a6901 --- /dev/null +++ b/emacs.d/nxhtml/autostart.el @@ -0,0 +1,194 @@ +;;; autostart.el --- Load nxhtml +;; +;; Author: By: Lennart Borgman +;; Created: Fri Dec 15 2006 +;; Version: +;; Last-Updated: 2009-04-30 Thu +;; Keywords: +;; Compatibility: +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; Commentary: +;; +;; +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; 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., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; Code: + +;; Fix-me: Split out the definitions from this file so it can be +;; loaded during byte compilation. + +;;(eval-when-compile (require 'web-vcs nil t)) +;;(eval-when-compile (require 'nxhtml-web-vcs nil t)) + +(message "Nxml/Nxhtml Autostart.el loading ...") + +(defconst nxhtml-autostart-trace nil) +(defsubst nxhtml-autostart-trace (format-string &rest args) + (when nxhtml-autostart-trace + (apply 'message format-string args))) + +(defconst nxhtml-load-time-start (float-time)) + +;; Add this dir to load-path +(add-to-list 'load-path + (file-name-directory (or load-file-name + (when (boundp 'bytecomp-filename) bytecomp-filename) + buffer-file-name))) + +(require 'nxhtml-base) +(eval-and-compile (when (fboundp 'nxml-mode) + (load (expand-file-name "etc/schema/schema-path-patch" + nxhtml-install-dir)))) + +;; (defun nxhtml-custom-load-and-get-value (symbol) +;; (custom-load-symbol symbol) +;; (symbol-value symbol)) + +(defun nxhtml-list-loaded-features (use-message) + (interactive (list t)) + (let ((buf (when use-message ;(called-interactively-p) + (get-buffer-create "*nXhtml loaded features*")))) + (if buf + (with-current-buffer buf (erase-buffer)) + (message "") + (message "=== Loaded at nxhtml/autostart.el end:")) + (dolist (feature '( + as-external + html-chklnk + html-imenu + html-move + html-pagetoc + html-quote + html-site + html-toc + html-upl + html-wtoc + inlimg + mumamo + nxhtml-bug + nxhtml-menu + nxhtml-mode + nxhtml-mumamo + nxhtml-strval + nxhtml + nxhtml-js + nxml-where + outline-magic + rngalt + tidy-xhtml + xhtml-help + )) + (when (featurep feature) + (if buf + (with-current-buffer buf + (insert (format "(feature '%s)=%s\n" feature (featurep feature)))) + (message "(feature '%s)=%s" feature (featurep feature))))) + (if buf + (display-buffer buf) + (message "")))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Code that will run on loading this file + +(if (< emacs-major-version 23) + (unless (featurep 'autostart22) + (load (expand-file-name "autostart22" nxhtml-install-dir))) + ;; Check that the nxml-mode included with Emacs is used. There + ;; has been some problems on Debian with this. + (let ((nxml-mode-file (locate-library "nxml-mode")) + (help-file (locate-library "help"))) + (unless (string= (expand-file-name ".." help-file) + (expand-file-name "../.." nxml-mode-file)) + (error "Wrong nxml-mode=%s used, please use the one that comes with Emacs" nxml-mode-file)))) + +(let* ((util-dir (file-name-as-directory (expand-file-name "util" nxhtml-install-dir))) + (related-dir (file-name-as-directory (expand-file-name "related" nxhtml-install-dir))) + (nxhtml-dir (file-name-as-directory (expand-file-name "nxhtml" nxhtml-install-dir))) + ;;(company-dir (file-name-as-directory (expand-file-name "util/nxhtml-company-mode" nxhtml-install-dir))) + (tests-dir (file-name-as-directory (expand-file-name "tests" nxhtml-install-dir)))) + (add-to-list 'load-path nxhtml-dir) + (add-to-list 'load-path related-dir) + (add-to-list 'load-path util-dir) + (add-to-list 'load-path nxhtml-install-dir) + ;;(add-to-list 'load-path company-dir) + (add-to-list 'load-path tests-dir) + + (nxhtml-autostart-trace "... nXhtml loading %.1f seconds elapsed ..." (- (float-time) nxhtml-load-time-start)) + + ;; Autoloading etc + ;; (unless (featurep 'web-vcs) + ;; (load (expand-file-name "web-vcs" nxhtml-install-dir) (not nxhtml-autoload-web))) + + ;; (when (catch 'miss + ;; (dolist (file nxhtml-basic-files) + ;; (let ((dl-file (expand-file-name file nxhtml-install-dir))) + ;; (unless (file-exists-p dl-file) + ;; (throw 'miss t)))) + ;; nil) + ;; (nxhtml-setup-auto-download nxhtml-install-dir)) + + (unless (featurep 'web-autoload) + (load (expand-file-name "web-autoload" nxhtml-install-dir) (not nxhtml-autoload-web))) + + (when nxhtml-autoload-web + (ad-activate 'require t)) + + ;; Fix-me: Why must as-external be loaded? Why doesn't it work in batch? + ;;(unless noninteractive (require 'as-external)) + + (unless (featurep 'nxhtml-loaddefs) + (load (expand-file-name "nxhtml-loaddefs" nxhtml-install-dir) nxhtml-autoload-web)) + (nxhtml-autostart-trace "... nXhtml loading %.1f seconds elapsed ..." (- (float-time) nxhtml-load-time-start)) + + ;; Turn on `nxhtml-menu-mode' unconditionally + (nxhtml-autostart-trace "Turn on `nxhtml-menu-mode' unconditionally") + (nxhtml-menu-mode 1) + (nxhtml-autostart-trace "... nXhtml loading %.1f seconds elapsed ..." (- (float-time) nxhtml-load-time-start)) + + ;; Patch the rnc include paths + (when (fboundp 'rncpp-patch-xhtml-loader) (rncpp-patch-xhtml-loader)) + (nxhtml-autostart-trace "... nXhtml loading %.1f seconds elapsed ..." (- (float-time) nxhtml-load-time-start)) + + ;; Load nXhtml + (unless (featurep 'nxhtml-autoload) + (load (expand-file-name "nxhtml/nxhtml-autoload" nxhtml-install-dir)))) +(nxhtml-autostart-trace "... nXhtml loading %.1f seconds elapsed ..." (- (float-time) nxhtml-load-time-start)) + + +(unless (featurep 'nxhtml-autostart) + ;; Provide the feature here to avoid loading looping on error. + (provide 'nxhtml-autostart) + + ;; Tell what have been loaded of nXhtml: + (when nxhtml-autostart-trace (nxhtml-list-loaded-features nil)) + + ;; How long time did it all take? + (message "Nxml/Nxhtml Autostart.el loaded in %.1f seconds" (- (float-time) nxhtml-load-time-start))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; autostart.el ends here diff --git a/emacs.d/nxhtml/autostart22.el b/emacs.d/nxhtml/autostart22.el new file mode 100644 index 0000000..2376d43 --- /dev/null +++ b/emacs.d/nxhtml/autostart22.el @@ -0,0 +1,71 @@ +;;; autostart22.el --- Example of autostart file for Emacs22 +;; +;; Author: Lennart Borgman (lennart O borgman A gmail O com) +;; Created: 2009-01-01 Thu +;; Version: +;; Last-Updated: 2009-01-05 Mon +;; URL: +;; Keywords: +;; Compatibility: +;; +;; Features that might be required by this library: +;; +;; This file is for Emacs 22 only. +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; Commentary: +;; +;; Change this file according to the path of your nxml-mode dir. If +;; you do not use nxml-mode then just use autostart.el. +;; +;; NOTICE: You need to enter the path to your nxml-mode installation +;; below. +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; 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 ((debug-on-error t)) + (if (/= emacs-major-version 22) + (message "This file (autostart22.el) is for Emacs 22 only") + + (defalias 'Custom-mode 'custom-mode) + + (let* ((this-file (or load-file-name buffer-file-name)) + (this-dir (file-name-directory this-file)) + ;; FIX-ME: Download nXml (since it is not included in Emacs + ;; 22) and place the path to rng-auto.el in your downloaded + ;; nXml HERE: + (rng-auto-file (or (locate-library "rng-auto.el") + "c:/emacs/u/081231/EmacsW32/nxhtml/nxml-mode-20041004/rng-auto.el"))) + (unless (file-exists-p rng-auto-file) + (error "Can't find rng-auto.el, please edit %s" this-file)) + (load rng-auto-file)))) + +(provide 'autostart22) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; autostart22.el ends here diff --git a/emacs.d/nxhtml/emacs22.cmd b/emacs.d/nxhtml/emacs22.cmd new file mode 100644 index 0000000..d50ac96 --- /dev/null +++ b/emacs.d/nxhtml/emacs22.cmd @@ -0,0 +1 @@ +c:\emacs\emacs-22.3\bin\emacs.exe -Q --debug-init -l autostart.el diff --git a/emacs.d/nxhtml/etc/img/pause/pause.jpg b/emacs.d/nxhtml/etc/img/pause/pause.jpg new file mode 100644 index 0000000..ff92075 Binary files /dev/null and b/emacs.d/nxhtml/etc/img/pause/pause.jpg differ diff --git a/emacs.d/nxhtml/etc/img/pause/pause2.jpg b/emacs.d/nxhtml/etc/img/pause/pause2.jpg new file mode 100644 index 0000000..6411344 Binary files /dev/null and b/emacs.d/nxhtml/etc/img/pause/pause2.jpg differ diff --git a/emacs.d/nxhtml/etc/schema/FDA-2009-N-0392-0396.1.doc b/emacs.d/nxhtml/etc/schema/FDA-2009-N-0392-0396.1.doc new file mode 100644 index 0000000..aa2eff3 Binary files /dev/null and b/emacs.d/nxhtml/etc/schema/FDA-2009-N-0392-0396.1.doc differ diff --git a/emacs.d/nxhtml/etc/schema/genshi-old.rnc b/emacs.d/nxhtml/etc/schema/genshi-old.rnc new file mode 100644 index 0000000..5384fe1 --- /dev/null +++ b/emacs.d/nxhtml/etc/schema/genshi-old.rnc @@ -0,0 +1,27 @@ +namespace py = "http://genshi.edgewall.org/" + +genshi.expr-type = xsd:string { minLength = "1" } +genshi.with-type = xsd:string { minLength = "1" } +genshi.choose-type = xsd:string +genshi.def-type = xsd:string +genshi.xpath-type = xsd:anyURI + +genshi.attrib = attribute py:if { genshi.expr-type }?, + attribute py:choose { genshi.choose-type }?, + attribute py:when { genshi.expr-type }?, + attribute py:otherwise { genshi.expr-type }?, + attribute py:for { genshi.expr-type }?, + attribute py:def { genshi.def-type }?, + attribute py:match { genshi.xpath-type }?, + attribute py:with { genshi.with-type }?, + attribute py:attrs { genshi.expr-type }?, + attribute py:content { genshi.expr-type }?, + attribute py:replace { genshi.expr-type }?, + attribute py:strip { genshi.expr-type }? + +genshi.if.attlist = attribute expr { genshi.expr-type } +genshi.for.attlist = attribute each { genshi.expr-type } +genshi.def.attlist = attribute each { genshi.expr-type } +genshi.with.attlist = attribute vars { genshi.with-type } + + diff --git a/emacs.d/nxhtml/etc/schema/genshi-schemas.xml b/emacs.d/nxhtml/etc/schema/genshi-schemas.xml new file mode 100644 index 0000000..89fe05f --- /dev/null +++ b/emacs.d/nxhtml/etc/schema/genshi-schemas.xml @@ -0,0 +1,3 @@ + + + diff --git a/emacs.d/nxhtml/etc/schema/genshi.rnc b/emacs.d/nxhtml/etc/schema/genshi.rnc new file mode 100644 index 0000000..b9ddf76 --- /dev/null +++ b/emacs.d/nxhtml/etc/schema/genshi.rnc @@ -0,0 +1,84 @@ +default namespace = "http://genshi.edgewall.org/" +namespace py = "http://genshi.edgewall.org/" + +include "xinclude.rnc" + +# There's no way to just match the text part against a Genshi Python expression +# See: http://relaxng.org/compact-tutorial-20030326.html#id2814737 +python.expression = text + +genshi.expr-type = xsd:string { minLength = "1" } +genshi.xpath-type = xsd:anyURI + +genshi.attrib = + attribute py:if { genshi.expr-type }?, + attribute py:choose { text }?, + attribute py:when { genshi.expr-type }?, + attribute py:otherwise { text }?, + attribute py:for { genshi.expr-type }?, + attribute py:def { genshi.expr-type }?, + attribute py:match { genshi.xpath-type}?, + attribute py:with { genshi.expr-type }?, + attribute py:attrs { genshi.expr-type }?, + attribute py:content { text }?, + attribute py:replace { genshi.expr-type }?, + attribute py:strip { text }? + +genshi.if.attlist = attribute test { genshi.expr-type } +genshi.choose.attlist = attribute test { text } +genshi.when.attlist = attribute test { genshi.expr-type } +genshi.for.attlist = attribute each { genshi.expr-type } +genshi.def.attlist = attribute function { genshi.expr-type } +genshi.with.attlist = attribute vars { genshi.expr-type } +genshi.replace.attlist = attribute value { genshi.expr-type } +genshi.match.attlist = + attribute path { genshi.xpath-type }, + attribute buffer { "true" | "false" }?, + attribute once { "true" | "false" }?, + attribute recursive { "true" | "false" }? + +genshi.choose = + element py:choose { genshi.choose.attlist, + genshi.model + } +genshi.when = + element py:when { genshi.when.attlist, + genshi.model + } +genshi.otherwise = + element py:otherwise { + genshi.model + } +genshi.if = + element py:if { genshi.if.attlist, + genshi.model + } +genshi.for = + element py:for { genshi.for.attlist, + genshi.model + } +genshi.def = + element py:def { genshi.def.attlist, + genshi.model + } +genshi.with = + element py:with { genshi.with.attlist, + genshi.model + } +genshi.match = + element py:match { genshi.match.attlist, + genshi.model + } +genshi.replace = + element py:replace { genshi.replace.attlist, + genshi.model + } + +genshi.allowed.children = text + +genshi.class = genshi.if | genshi.choose | genshi.when | genshi.otherwise + | genshi.for | genshi.def | genshi.with | genshi.match | genshi.replace + | python.expression + | xi.include + +genshi.model = genshi.class* | genshi.allowed.children* \ No newline at end of file diff --git a/emacs.d/nxhtml/etc/schema/mjt.rnc b/emacs.d/nxhtml/etc/schema/mjt.rnc new file mode 100644 index 0000000..b37f01a --- /dev/null +++ b/emacs.d/nxhtml/etc/schema/mjt.rnc @@ -0,0 +1,74 @@ +include "xhtml-loader.rnc" + +MjtAll.attrib = + attribute mjt.def { Text.datatype }?, + attribute mjt.when { Text.datatype }?, + attribute mjt.otherwise { Text.datatype }?, + attribute mjt.for { Text.datatype }?, + attribute mjt.if { Text.datatype }?, + attribute mjt.elif { Text.datatype }?, + attribute mjt.else { Text.datatype }?, + attribute mjt.script { Text.datatype }?, + attribute mjt.choose { Text.datatype }?, + attribute mjt.replace { Text.datatype }?, + attribute mjt.content { Text.datatype }?, + attribute mjt.strip { Text.datatype }?, + attribute mjt.src { Text.datatype }?, + attribute mjt.style { Text.datatype }?, + attribute mjt.class { Text.datatype }?, + attribute mjt.id { Text.datatype }?, + attribute mjt.attrs { Text.datatype }?, + attribute mjt.task { Text.datatype }? + + +a.attlist &= + attribute mjt.onblur { Script.datatype }?, + attribute mjt.onfocus { Script.datatype }? +area.attlist &= + attribute mjt.onblur { Script.datatype }?, + attribute mjt.onfocus { Script.datatype }? +form.attlist &= + attribute mjt.onreset { Script.datatype }?, + attribute mjt.onsubmit { Script.datatype }? +body.attlist &= + attribute mjt.onload { Script.datatype }?, + attribute mjt.onunload { Script.datatype }? +label.attlist &= + attribute mjt.onblur { Script.datatype }?, + attribute mjt.onfocus { Script.datatype }? +input.attlist &= + attribute mjt.onblur { Script.datatype }?, + attribute mjt.onchange { Script.datatype }?, + attribute mjt.onfocus { Script.datatype }?, + attribute mjt.onselect { Script.datatype }? +select.attlist &= + attribute mjt.onblur { Script.datatype }?, + attribute mjt.onchange { Script.datatype }?, + attribute mjt.onfocus { Script.datatype }? +textarea.attlist &= + attribute mjt.onblur { Script.datatype }?, + attribute mjt.onchange { Script.datatype }?, + attribute mjt.onfocus { Script.datatype }?, + attribute mjt.onselect { Script.datatype }? +button.attlist &= + attribute mjt.onblur { Script.datatype }?, + attribute mjt.onfocus { Script.datatype }? + +MjtEvents.attrib = + attribute mjt.onclick { Script.datatype }?, + attribute mjt.ondblclick { Script.datatype }?, + attribute mjt.onmousedown { Script.datatype }?, + attribute mjt.onmouseup { Script.datatype }?, + attribute mjt.onmouseover { Script.datatype }?, + attribute mjt.onmousemove { Script.datatype }?, + attribute mjt.onmouseout { Script.datatype }?, + attribute mjt.onkeypress { Script.datatype }?, + attribute mjt.onkeydown { Script.datatype }?, + attribute mjt.onkeyup { Script.datatype }? + + +Common.attrib &= MjtAll.attrib +CommonIdRequired.attrib &= MjtAll.attrib + +Common.attrib &= MjtEvents.attrib +CommonIdRequired.attrib &= MjtEvents.attrib diff --git a/emacs.d/nxhtml/etc/schema/nxml-erb.patch b/emacs.d/nxhtml/etc/schema/nxml-erb.patch new file mode 100644 index 0000000..362913b --- /dev/null +++ b/emacs.d/nxhtml/etc/schema/nxml-erb.patch @@ -0,0 +1,37 @@ +--- nxml-mode-orig/xmltok.el 2005-10-16 15:32:53.000000000 -0400 ++++ nxml-mode-erb/xmltok.el 2006-09-01 01:02:55.000000000 -0400 +@@ -496,6 +496,9 @@ + (xmltok+ (xmltok-g markup-declaration "!") + (xmltok-g comment-first-dash "-" + (xmltok-g comment-open "-") opt) opt)) ++ (erb-section ++ (xmltok+ "%" ++ (xmltok-g erb-section-open "[^%]") opt)) + (cdata-section + (xmltok+ "!" + (xmltok-g marked-section-open "\\[") +@@ -526,6 +529,7 @@ + ;; by default + or cdata-section + or comment ++ or erb-section + or processing-instruction)) + (xmltok-defregexp + xmltok-attribute +@@ -693,6 +697,16 @@ + nil + "]]>") + 'not-well-formed))) ++ ((xmltok-after-lt start erb-section-open) ++ (setq xmltok-type ++ (if (re-search-forward "[^%]%>" nil t) ++ 'erb-section ++ (xmltok-add-error "No closing %>") ++ (xmltok-add-dependent 'xmltok-unclosed-reparse-p ++ nil ++ nil ++ "%>") ++ 'not-well-formed))) + ((xmltok-after-lt start processing-instruction-question) + (xmltok-scan-after-processing-instruction-open)) + ((xmltok-after-lt start comment-open) diff --git a/emacs.d/nxhtml/etc/schema/old-genshi.rnc b/emacs.d/nxhtml/etc/schema/old-genshi.rnc new file mode 100644 index 0000000..5a50385 --- /dev/null +++ b/emacs.d/nxhtml/etc/schema/old-genshi.rnc @@ -0,0 +1,31 @@ +namespace py = "http://genshi.edgewall.org/" + +genshi.expr-type = xsd:string { minLength = "1" } +genshi.with-type = xsd:string { minLength = "1" } +genshi.choose-type = xsd:string +genshi.def-type = xsd:string +genshi.xpath-type = xsd:anyURI + +genshi.attrib = attribute py:if { genshi.expr-type }?, + attribute py:choose { genshi.choose-type }?, + attribute py:when { genshi.expr-type }?, + attribute py:otherwise { genshi.expr-type }?, + attribute py:for { genshi.expr-type }?, + attribute py:def { genshi.def-type }?, + attribute py:match { genshi.xpath-type }?, + attribute py:with { genshi.with-type }?, + attribute py:attrs { genshi.expr-type }?, + attribute py:content { genshi.expr-type }?, + attribute py:replace { genshi.expr-type }?, + attribute py:strip { genshi.expr-type }? + +genshi.if.attlist = attribute test { genshi.expr-type } +genshi.for.attlist = attribute each { genshi.expr-type } +genshi.def.attlist = attribute function { genshi.expr-type } +genshi.with.attlist = attribute vars { genshi.with-type } +genshi.match.attlist = attribute path { genshi.xpath-type }, + attribute buffer { genshi.expr-type }?, + attribute once { genshi.expr-type }?, + attribute recursive { genshi.expr-type }? + + diff --git a/emacs.d/nxhtml/etc/schema/old-qtmstr-xhtml.rnc b/emacs.d/nxhtml/etc/schema/old-qtmstr-xhtml.rnc new file mode 100644 index 0000000..b5f84bd --- /dev/null +++ b/emacs.d/nxhtml/etc/schema/old-qtmstr-xhtml.rnc @@ -0,0 +1,61 @@ +namespace py = "http://genshi.edgewall.org/" +namespace xi = "http://www.w3.org/2001/XInclude" + +include "genshi.rnc" +include "xinclude.rnc" +include "xhtml-loader.rnc" + +start |= head|body|p|\div|h1|h2|h3|h4|h5|h6|hr|pre|dl|ol|ul|table|form + +Common.attrib &= genshi.attrib +head.attlist &= genshi.attrib +html.attlist &= genshi.attrib + +Head.class = base | isindex | link | meta | script | title | style | + if-head | for-head | def-head | with-head + +Head.model = Head.class* + +head.content &= Head.model* + +if-inline = element py:if { genshi.if.attlist, Inline.model } +if-block = element py:if { genshi.if.attlist, Block.model } +if-head = element py:if { genshi.if.attlist, Head.model } +for-inline = element py:for { genshi.for.attlist, Inline.model } +for-block = element py:for { genshi.for.attlist, Block.model } +for-head = element py:for { genshi.for.attlist, Head.model } +def-inline = element py:def { genshi.def.attlist, Inline.model } +def-block = element py:def { genshi.def.attlist, Block.model } +def-head = element py:def { genshi.def.attlist, Head.model } +with-inline = element py:with { genshi.with.attlist, Inline.model } +with-block = element py:with { genshi.with.attlist, Block.model } +with-head = element py:with { genshi.with.attlist, Head.model } +match-inline = element py:match { genshi.match.attlist, Inline.model } +match-block = element py:match { genshi.match.attlist, Block.model } +match-head = element py:match { genshi.match.attlist, Head.model } + +Inline.class |= if-inline | for-inline | def-inline | with-inline | match-inline +Block.class |= if-block | for-block | def-block | with-block | match-block + +xi-inline = element xi:include { + xinclude.include.attlist, + element xi:fallback { genshi.attrib, + (xi-inline | Inline.model)* + }? + } + +xi-block = element xi:include { xinclude.include.attlist, + element xi:fallback { genshi.attrib, + (xi-block | Block.model)* + }? + } + +xi-head = element xi:include { xinclude.include.attlist, + element xi:fallback { genshi.attrib, + (xi-head | Head.model)* + }? + } + +Inline.class |= xi-inline +Block.class |= xi-block +Head.class |= xi-head diff --git a/emacs.d/nxhtml/etc/schema/old-xinclude.rnc b/emacs.d/nxhtml/etc/schema/old-xinclude.rnc new file mode 100644 index 0000000..c45cf0c --- /dev/null +++ b/emacs.d/nxhtml/etc/schema/old-xinclude.rnc @@ -0,0 +1,11 @@ +namespace xi = "http://www.w3.org/2001/XInclude" +namespace local = "" + +xinclude.include.attlist = + attribute href { xsd:anyURI }?, + attribute parse { xsd:string }?, + attribute xpointer { xsd:string }?, + attribute encoding { xsd:string }?, + attribute accept { xsd:string }?, + attribute accept-language { xsd:string }? + diff --git a/emacs.d/nxhtml/etc/schema/qtmstr-xhtml-old.rnc b/emacs.d/nxhtml/etc/schema/qtmstr-xhtml-old.rnc new file mode 100644 index 0000000..61ab89e --- /dev/null +++ b/emacs.d/nxhtml/etc/schema/qtmstr-xhtml-old.rnc @@ -0,0 +1,58 @@ +namespace py = "http://genshi.edgewall.org/" +namespace xi = "http://www.w3.org/2001/XInclude" + +include "genshi.rnc" +include "xinclude.rnc" +include "xhtml-loader.rnc" + +start |= head|body|p|\div|h1|h2|h3|h4|h5|h6|hr|pre|dl|ol|ul|table|form + +Common.attrib &= genshi.attrib +head.attlist &= genshi.attrib +html.attlist &= genshi.attrib + +Head.class = base | isindex | link | meta | script | title | style | + if-head | for-head | def-head | with-head + +Head.model = Head.class* + +head.content &= Head.model* + +if-inline = element py:if { genshi.if.attlist, Inline.model } +if-block = element py:if { genshi.if.attlist, Block.model } +if-head = element py:if { genshi.if.attlist, Head.model } +for-inline = element py:for { genshi.for.attlist, Inline.model } +for-block = element py:for { genshi.for.attlist, Block.model } +for-head = element py:for { genshi.for.attlist, Head.model } +def-inline = element py:def { genshi.def.attlist, Inline.model } +def-block = element py:def { genshi.def.attlist, Block.model } +def-head = element py:def { genshi.def.attlist, Head.model } +with-inline = element py:with { genshi.with.attlist, Inline.model } +with-block = element py:with { genshi.with.attlist, Block.model } +with-head = element py:with { genshi.with.attlist, Head.model } + +Inline.class |= if-inline | for-inline | def-inline | with-inline +Block.class |= if-block | for-block | def-block | with-block + +xi-inline = element xi:include { + xinclude.include.attlist, + element xi:fallback { genshi.attrib, + (xi-inline | Inline.model)* + }? + } + +xi-block = element xi:include { xinclude.include.attlist, + element xi:fallback { genshi.attrib, + (xi-block | Block.model)* + }? + } + +xi-head = element xi:include { xinclude.include.attlist, + element xi:fallback { genshi.attrib, + (xi-head | Head.model)* + }? + } + +Inline.class |= xi-inline +Block.class |= xi-block +Head.class |= xi-head diff --git a/emacs.d/nxhtml/etc/schema/qtmstr-xhtml.rnc b/emacs.d/nxhtml/etc/schema/qtmstr-xhtml.rnc new file mode 100644 index 0000000..ff5d0a9 --- /dev/null +++ b/emacs.d/nxhtml/etc/schema/qtmstr-xhtml.rnc @@ -0,0 +1,66 @@ +default namespace = "http://www.w3.org/1999/xhtml" + +include "genshi.rnc" +include "xhtml-loader.rnc" { + start = html | head | head.content | body | frameset | frame | noframes | + Block.class | Inline.class | Table.class | Form.extra.class | genshi.class + html = element html { html.attlist, (genshi.model | (head, (body | frameset | genshi.model))) } + frameset = + element frameset { + frameset.attlist, + (((frameset | frame)+ & noframes?) | genshi.model) + } + noframes = element noframes { noframes.attlist, (body | genshi.model) } + title = element title { title.attlist, (text | genshi.model)* } + script = element script { script.attlist, (text | genshi.model)* } + style = element style { style.attlist, (text | genshi.model)* } + dl = element dl { dl.attlist, ((dt | dd)+ | genshi.model) } + ol = element ol { ol.attlist, (li+ | genshi.model) } + ul = element ul { ul.attlist, (li+ | genshi.model) } + dir = element dir { dir.attlist, (li.noblock+ | genshi.model) } + menu = element menu { menu.attlist, (li.noblock+ | genshi.model) } + select = element select { select.attlist, ((option | optgroup)+ | genshi.model) } + option = + element option { + Common.attrib, + attribute selected { "selected" }?, + attribute value { text }?, + (text | genshi.model)* + } + textarea = element textarea { textarea.attlist, (text & genshi.model)* } + optgroup = element optgroup { optgroup.attlist, (option+ | genshi.model) } + table = + element table { + table.attlist, + (caption? | genshi.model), + (col* | colgroup* | genshi.model), + (((thead? | genshi.model), + (tfoot? | genshi.model), + (tbody+ | genshi.model)) | (tr+ | genshi.model)) + } + colgroup = element colgroup { colgroup.attlist, (col* | genshi.model) } + tr = element tr { tr.attlist, ((th | td)+ | genshi.model) } + tbody = element tbody { tbody.attlist, (tr+ | genshi.model) } + thead = element thead { thead.attlist, (tr+ | genshi.model) } + tfoot = element tfoot { tfoot.attlist, (tr+ | genshi.model) } +} + +Table.class = caption | colgroup | col | tbody | thead | tfoot | th | tr | td +Form.extra.class = option | optgroup | legend + +Block.class |= genshi.class +Inline.class |= genshi.class +head.content &= genshi.class + +Core.attrib &= genshi.attrib +html.attlist &= genshi.attrib +head.attlist &= genshi.attrib +title.attlist &= genshi.attrib +base.attlist &= genshi.attrib +meta.attlist &= genshi.attrib +script.attlist &= genshi.attrib +param.attlist &= genshi.attrib +Edit.attrib &= genshi.attrib + +genshi.allowed.children |= html | head | head.content | body | frameset | frame + | noframes | Inline.class | Block.class | Table.class | Form.extra.class diff --git a/emacs.d/nxhtml/etc/schema/schema-path-patch.el b/emacs.d/nxhtml/etc/schema/schema-path-patch.el new file mode 100644 index 0000000..a6d59fc --- /dev/null +++ b/emacs.d/nxhtml/etc/schema/schema-path-patch.el @@ -0,0 +1,95 @@ +;;; schema-path-patch.el --- Patch schema paths +;; +;; Author: Lennart Borgman (lennart O borgman A gmail O com) +;; Created: 2008-08-08T20:21:31+0200 Fri +;; Version: 0.2 +;; Last-Updated: 2008-08-19T00:21:25+0200 Mon +;; URL: +;; Keywords: +;; Compatibility: +;; +;; Features that might be required by this library: +;; +;; Cannot open load file: schema-path-patch. +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; Commentary: +;; +;; Schemas here may include parts from nxml and need to know the path. +;; This file can be used to patch the paths. +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; 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: + +(defvar rncpp-this-dir + (file-name-as-directory + (file-name-directory + (if load-file-name load-file-name buffer-file-name)))) + +(defun rncpp-get-nxml-schema-dir () + ;; First look for nxml-mode included with Emacs + (let ((schema-dir (file-name-as-directory + (expand-file-name "schema" data-directory)))) + (unless (file-directory-p schema-dir) + ;; This is an old nxml-mode, look for its schemas dir. + (let ((nxml-mode-dir (file-name-as-directory + (file-name-directory (locate-library "nxml-mode"))))) + (setq schema-dir (file-name-as-directory + (expand-file-name "schema" nxml-mode-dir))))) + (unless (file-directory-p schema-dir) + (error "Can't find schema-dir=%s" schema-dir)) + schema-dir)) + +;; Use xhtml-loader.rnc (an idea from Bryan Waite): +(defun rncpp-patch-xhtml-loader () + "Patch xhtml-loader.rnc so genshi and mjt rnc files works." + ;;(interactive) + (let* ((default-directory rncpp-this-dir) + (loader-path (expand-file-name "xhtml-loader.rnc")) + (loader-buf (find-buffer-visiting loader-path)) + (schema-dir (rncpp-get-nxml-schema-dir)) + (schema-relative-dir (file-relative-name schema-dir)) + (loader-string (concat "include \"" + schema-relative-dir + "xhtml.rnc\"\n"))) + (when loader-buf (kill-buffer loader-buf)) + (setq loader-buf (find-file-noselect loader-path)) + (with-current-buffer loader-buf + (unless (file-exists-p loader-path) + (insert loader-string)) + ;; Test if correct + (if (string= (buffer-substring-no-properties (point-min) (point-max)) + loader-string) + (message "xhtml-loader.rnc was ok") + (message "Patching xhtml-loader.rnc") + (delete-region (point-min) (point-max)) + (insert loader-string)) + (basic-save-buffer) + (kill-buffer (current-buffer))))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; schema-path-patch.el ends here diff --git a/emacs.d/nxhtml/etc/schema/xhtml-loader.rnc b/emacs.d/nxhtml/etc/schema/xhtml-loader.rnc new file mode 100644 index 0000000..a40f3cf --- /dev/null +++ b/emacs.d/nxhtml/etc/schema/xhtml-loader.rnc @@ -0,0 +1 @@ +include "../../../../../../usr/local/share/emacs/24.0.50/etc/schema/xhtml.rnc" diff --git a/emacs.d/nxhtml/etc/schema/xinclude.rnc b/emacs.d/nxhtml/etc/schema/xinclude.rnc new file mode 100644 index 0000000..cbda979 --- /dev/null +++ b/emacs.d/nxhtml/etc/schema/xinclude.rnc @@ -0,0 +1,35 @@ +default namespace = "http://www.w3.org/2001/XInclude" +namespace xi = "http://www.w3.org/2001/XInclude" + +xi.include.attlist = + attribute href { xsd:anyURI }?, + attribute parse { "xml" | "text" }?, + attribute xpointer { xsd:string }?, + attribute encoding { xsd:string }?, + attribute accept { xsd:string }?, + attribute accept-language { xsd:string }? + +xi.include.attlist.extra = + attribute * - xi.include.attlist { text }* + +xi.include = + element xi:include { + xi.include.attlist, + xi.include.attlist.extra, + (xi.fallback? | xi.include.extra)* + } + +xi.include.extra = notAllowed + +xi.fallback.attlist = + attribute * { text }* + +xi.fallback = + element xi:fallback { + xi.fallback.attlist, + (xi.include | xi.fallback.extra)* + } + +xi.fallback.extra = notAllowed + +xi.class = xi.include | xi.fallback \ No newline at end of file diff --git a/emacs.d/nxhtml/etc/templates/rollover-2v.css b/emacs.d/nxhtml/etc/templates/rollover-2v.css new file mode 100644 index 0000000..ed10a41 --- /dev/null +++ b/emacs.d/nxhtml/etc/templates/rollover-2v.css @@ -0,0 +1,25 @@ +ROLLOVER_SPEC a { + /* Image */ + display: block; + background: transparent url("IMG_URL") 0 0 no-repeat; + overflow: hidden; + width: IMG_WIDTHpx; + /* Text placement and size, etc */ + CENTER_OR_PAD; + padding-top: PADDING_TOPpx; + font-size: FONT_SIZEpx; + padding-bottom: PADDING_BOTTOMpx; + text-decoration: none; + white-space: nowrap; + border: none; + margin: 0; +} +ROLLOVER_SPEC a:hover { + background-position: 0 -IMG_HEIGHT_2px; +} +ROLLOVER_SPEC li { + display: inline; + padding: 0; + margin: 0; + HOR_OR_VER; +} diff --git a/emacs.d/nxhtml/etc/uts39/idnchars.txt b/emacs.d/nxhtml/etc/uts39/idnchars.txt new file mode 100644 index 0000000..369f8f8 --- /dev/null +++ b/emacs.d/nxhtml/etc/uts39/idnchars.txt @@ -0,0 +1,894 @@ +# Recommended Identifier Profiles for IDN +# File: idnchars.txt +# Version: 2.0 +# Generated: 2006-08-15, 04:35:10 GMT +# Checkin: $Revision: 1.11 $ +# +# For documentation and usage, see http://www.unicode.org/reports/tr39/ +# +# Allowed as output characters + +002D ; output # (-) HYPHEN-MINUS +0030..0039 ; output # [10] (0..9) DIGIT ZERO..DIGIT NINE +0041..005A ; output # [26] (A..Z) LATIN CAPITAL LETTER A..LATIN CAPITAL LETTER Z +0061..007A ; output # [26] (a..z) LATIN SMALL LETTER A..LATIN SMALL LETTER Z +00B7 ; output # (·) MIDDLE DOT +00E0..00F6 ; output # [23] (à..ö) LATIN SMALL LETTER A WITH GRAVE..LATIN SMALL LETTER O WITH DIAERESIS +00F8..00FF ; output # [8] (ø..ÿ) LATIN SMALL LETTER O WITH STROKE..LATIN SMALL LETTER Y WITH DIAERESIS +0101 ; output # (ā) LATIN SMALL LETTER A WITH MACRON +0103 ; output # (ă) LATIN SMALL LETTER A WITH BREVE +0105 ; output # (ą) LATIN SMALL LETTER A WITH OGONEK +0107 ; output # (ć) LATIN SMALL LETTER C WITH ACUTE +0109 ; output # (ĉ) LATIN SMALL LETTER C WITH CIRCUMFLEX +010B ; output # (ċ) LATIN SMALL LETTER C WITH DOT ABOVE +010D ; output # (č) LATIN SMALL LETTER C WITH CARON +010F ; output # (ď) LATIN SMALL LETTER D WITH CARON +0111 ; output # (đ) LATIN SMALL LETTER D WITH STROKE +0113 ; output # (ē) LATIN SMALL LETTER E WITH MACRON +0115 ; output # (ĕ) LATIN SMALL LETTER E WITH BREVE +0117 ; output # (ė) LATIN SMALL LETTER E WITH DOT ABOVE +0119 ; output # (ę) LATIN SMALL LETTER E WITH OGONEK +011B ; output # (ě) LATIN SMALL LETTER E WITH CARON +011D ; output # (ĝ) LATIN SMALL LETTER G WITH CIRCUMFLEX +011F ; output # (ğ) LATIN SMALL LETTER G WITH BREVE +0121 ; output # (ġ) LATIN SMALL LETTER G WITH DOT ABOVE +0123 ; output # (ģ) LATIN SMALL LETTER G WITH CEDILLA +0125 ; output # (ĥ) LATIN SMALL LETTER H WITH CIRCUMFLEX +0127 ; output # (ħ) LATIN SMALL LETTER H WITH STROKE +0129 ; output # (ĩ) LATIN SMALL LETTER I WITH TILDE +012B ; output # (ī) LATIN SMALL LETTER I WITH MACRON +012D ; output # (ĭ) LATIN SMALL LETTER I WITH BREVE +012F ; output # (į) LATIN SMALL LETTER I WITH OGONEK +0131 ; output # (ı) LATIN SMALL LETTER DOTLESS I +0135 ; output # (ĵ) LATIN SMALL LETTER J WITH CIRCUMFLEX +0137..0138 ; output # [2] (ķ..ĸ) LATIN SMALL LETTER K WITH CEDILLA..LATIN SMALL LETTER KRA +013A ; output # (ĺ) LATIN SMALL LETTER L WITH ACUTE +013C ; output # (ļ) LATIN SMALL LETTER L WITH CEDILLA +013E ; output # (ľ) LATIN SMALL LETTER L WITH CARON +0142 ; output # (ł) LATIN SMALL LETTER L WITH STROKE +0144 ; output # (ń) LATIN SMALL LETTER N WITH ACUTE +0146 ; output # (ņ) LATIN SMALL LETTER N WITH CEDILLA +0148 ; output # (ň) LATIN SMALL LETTER N WITH CARON +014B ; output # (ŋ) LATIN SMALL LETTER ENG +014D ; output # (ō) LATIN SMALL LETTER O WITH MACRON +014F ; output # (ŏ) LATIN SMALL LETTER O WITH BREVE +0151 ; output # (ő) LATIN SMALL LETTER O WITH DOUBLE ACUTE +0153 ; output # (œ) LATIN SMALL LIGATURE OE +0155 ; output # (ŕ) LATIN SMALL LETTER R WITH ACUTE +0157 ; output # (ŗ) LATIN SMALL LETTER R WITH CEDILLA +0159 ; output # (ř) LATIN SMALL LETTER R WITH CARON +015B ; output # (ś) LATIN SMALL LETTER S WITH ACUTE +015D ; output # (ŝ) LATIN SMALL LETTER S WITH CIRCUMFLEX +015F ; output # (ş) LATIN SMALL LETTER S WITH CEDILLA +0161 ; output # (š) LATIN SMALL LETTER S WITH CARON +0163 ; output # (ţ) LATIN SMALL LETTER T WITH CEDILLA +0165 ; output # (ť) LATIN SMALL LETTER T WITH CARON +0167 ; output # (ŧ) LATIN SMALL LETTER T WITH STROKE +0169 ; output # (ũ) LATIN SMALL LETTER U WITH TILDE +016B ; output # (ū) LATIN SMALL LETTER U WITH MACRON +016D ; output # (ŭ) LATIN SMALL LETTER U WITH BREVE +016F ; output # (ů) LATIN SMALL LETTER U WITH RING ABOVE +0171 ; output # (ű) LATIN SMALL LETTER U WITH DOUBLE ACUTE +0173 ; output # (ų) LATIN SMALL LETTER U WITH OGONEK +0175 ; output # (ŵ) LATIN SMALL LETTER W WITH CIRCUMFLEX +0177 ; output # (ŷ) LATIN SMALL LETTER Y WITH CIRCUMFLEX +017A ; output # (ź) LATIN SMALL LETTER Z WITH ACUTE +017C ; output # (ż) LATIN SMALL LETTER Z WITH DOT ABOVE +017E ; output # (ž) LATIN SMALL LETTER Z WITH CARON +0183 ; output # (ƃ) LATIN SMALL LETTER B WITH TOPBAR +0185 ; output # (ƅ) LATIN SMALL LETTER TONE SIX +0188 ; output # (ƈ) LATIN SMALL LETTER C WITH HOOK +018C ; output # (ƌ) LATIN SMALL LETTER D WITH TOPBAR +0192 ; output # (ƒ) LATIN SMALL LETTER F WITH HOOK +0195 ; output # (ƕ) LATIN SMALL LETTER HV +0199..019B ; output # [3] (ƙ..ƛ) LATIN SMALL LETTER K WITH HOOK..LATIN SMALL LETTER LAMBDA WITH STROKE +019E ; output # (ƞ) LATIN SMALL LETTER N WITH LONG RIGHT LEG +01A1 ; output # (ơ) LATIN SMALL LETTER O WITH HORN +01A3 ; output # (ƣ) LATIN SMALL LETTER OI +01A5 ; output # (ƥ) LATIN SMALL LETTER P WITH HOOK +01A8 ; output # (ƨ) LATIN SMALL LETTER TONE TWO +01AD ; output # (ƭ) LATIN SMALL LETTER T WITH HOOK +01B0 ; output # (ư) LATIN SMALL LETTER U WITH HORN +01B4 ; output # (ƴ) LATIN SMALL LETTER Y WITH HOOK +01B6 ; output # (ƶ) LATIN SMALL LETTER Z WITH STROKE +01BD ; output # (ƽ) LATIN SMALL LETTER TONE FIVE +01CE ; output # (ǎ) LATIN SMALL LETTER A WITH CARON +01D0 ; output # (ǐ) LATIN SMALL LETTER I WITH CARON +01D2 ; output # (ǒ) LATIN SMALL LETTER O WITH CARON +01D4 ; output # (ǔ) LATIN SMALL LETTER U WITH CARON +01D6 ; output # (ǖ) LATIN SMALL LETTER U WITH DIAERESIS AND MACRON +01D8 ; output # (ǘ) LATIN SMALL LETTER U WITH DIAERESIS AND ACUTE +01DA ; output # (ǚ) LATIN SMALL LETTER U WITH DIAERESIS AND CARON +01DC..01DD ; output # [2] (ǜ..ǝ) LATIN SMALL LETTER U WITH DIAERESIS AND GRAVE..LATIN SMALL LETTER TURNED E +01DF ; output # (ǟ) LATIN SMALL LETTER A WITH DIAERESIS AND MACRON +01E1 ; output # (ǡ) LATIN SMALL LETTER A WITH DOT ABOVE AND MACRON +01E3 ; output # (ǣ) LATIN SMALL LETTER AE WITH MACRON +01E5 ; output # (ǥ) LATIN SMALL LETTER G WITH STROKE +01E7 ; output # (ǧ) LATIN SMALL LETTER G WITH CARON +01E9 ; output # (ǩ) LATIN SMALL LETTER K WITH CARON +01EB ; output # (ǫ) LATIN SMALL LETTER O WITH OGONEK +01ED ; output # (ǭ) LATIN SMALL LETTER O WITH OGONEK AND MACRON +01EF..01F0 ; output # [2] (ǯ..ǰ) LATIN SMALL LETTER EZH WITH CARON..LATIN SMALL LETTER J WITH CARON +01F5 ; output # (ǵ) LATIN SMALL LETTER G WITH ACUTE +01F9 ; output # (ǹ) LATIN SMALL LETTER N WITH GRAVE +01FB ; output # (ǻ) LATIN SMALL LETTER A WITH RING ABOVE AND ACUTE +01FD ; output # (ǽ) LATIN SMALL LETTER AE WITH ACUTE +01FF ; output # (ǿ) LATIN SMALL LETTER O WITH STROKE AND ACUTE +0201 ; output # (ȁ) LATIN SMALL LETTER A WITH DOUBLE GRAVE +0203 ; output # (ȃ) LATIN SMALL LETTER A WITH INVERTED BREVE +0205 ; output # (ȅ) LATIN SMALL LETTER E WITH DOUBLE GRAVE +0207 ; output # (ȇ) LATIN SMALL LETTER E WITH INVERTED BREVE +0209 ; output # (ȉ) LATIN SMALL LETTER I WITH DOUBLE GRAVE +020B ; output # (ȋ) LATIN SMALL LETTER I WITH INVERTED BREVE +020D ; output # (ȍ) LATIN SMALL LETTER O WITH DOUBLE GRAVE +020F ; output # (ȏ) LATIN SMALL LETTER O WITH INVERTED BREVE +0211 ; output # (ȑ) LATIN SMALL LETTER R WITH DOUBLE GRAVE +0213 ; output # (ȓ) LATIN SMALL LETTER R WITH INVERTED BREVE +0215 ; output # (ȕ) LATIN SMALL LETTER U WITH DOUBLE GRAVE +0217 ; output # (ȗ) LATIN SMALL LETTER U WITH INVERTED BREVE +0219 ; output # (ș) LATIN SMALL LETTER S WITH COMMA BELOW +021B ; output # (ț) LATIN SMALL LETTER T WITH COMMA BELOW +021F ; output # (ȟ) LATIN SMALL LETTER H WITH CARON +0223 ; output # (ȣ) LATIN SMALL LETTER OU +0225 ; output # (ȥ) LATIN SMALL LETTER Z WITH HOOK +0227 ; output # (ȧ) LATIN SMALL LETTER A WITH DOT ABOVE +0229 ; output # (ȩ) LATIN SMALL LETTER E WITH CEDILLA +022B ; output # (ȫ) LATIN SMALL LETTER O WITH DIAERESIS AND MACRON +022D ; output # (ȭ) LATIN SMALL LETTER O WITH TILDE AND MACRON +022F ; output # (ȯ) LATIN SMALL LETTER O WITH DOT ABOVE +0231 ; output # (ȱ) LATIN SMALL LETTER O WITH DOT ABOVE AND MACRON +0233 ; output # (ȳ) LATIN SMALL LETTER Y WITH MACRON +0253..0254 ; output # [2] (ɓ..ɔ) LATIN SMALL LETTER B WITH HOOK..LATIN SMALL LETTER OPEN O +0256..0257 ; output # [2] (ɖ..ɗ) LATIN SMALL LETTER D WITH TAIL..LATIN SMALL LETTER D WITH HOOK +0259 ; output # (ə) LATIN SMALL LETTER SCHWA +025B ; output # (ɛ) LATIN SMALL LETTER OPEN E +0260 ; output # (ɠ) LATIN SMALL LETTER G WITH HOOK +0263 ; output # (ɣ) LATIN SMALL LETTER GAMMA +0268..0269 ; output # [2] (ɨ..ɩ) LATIN SMALL LETTER I WITH STROKE..LATIN SMALL LETTER IOTA +026F ; output # (ɯ) LATIN SMALL LETTER TURNED M +0272 ; output # (ɲ) LATIN SMALL LETTER N WITH LEFT HOOK +0275 ; output # (ɵ) LATIN SMALL LETTER BARRED O +0280 ; output # (ʀ) LATIN LETTER SMALL CAPITAL R +0283 ; output # (ʃ) LATIN SMALL LETTER ESH +0288 ; output # (ʈ) LATIN SMALL LETTER T WITH RETROFLEX HOOK +028A..028B ; output # [2] (ʊ..ʋ) LATIN SMALL LETTER UPSILON..LATIN SMALL LETTER V WITH HOOK +0292 ; output # (ʒ) LATIN SMALL LETTER EZH +0294 ; output # (ʔ) LATIN LETTER GLOTTAL STOP +0300..033F ; output # [64] (̀..̿) COMBINING GRAVE ACCENT..COMBINING DOUBLE OVERLINE +0342 ; output # (͂) COMBINING GREEK PERISPOMENI +0346..034E ; output # [9] (͆..͎) COMBINING BRIDGE ABOVE..COMBINING UPWARDS ARROW BELOW +0360..036F ; output # [16] (͠..ͯ) COMBINING DOUBLE TILDE..COMBINING LATIN SMALL LETTER X +0390 ; output # (ΐ) GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS +03AC..03C1 ; output # [22] (ά..ρ) GREEK SMALL LETTER ALPHA WITH TONOS..GREEK SMALL LETTER RHO +03C3..03CE ; output # [12] (σ..ώ) GREEK SMALL LETTER SIGMA..GREEK SMALL LETTER OMEGA WITH TONOS +0430..045F ; output # [48] (а..џ) CYRILLIC SMALL LETTER A..CYRILLIC SMALL LETTER DZHE +0461 ; output # (ѡ) CYRILLIC SMALL LETTER OMEGA +0463 ; output # (ѣ) CYRILLIC SMALL LETTER YAT +0465 ; output # (ѥ) CYRILLIC SMALL LETTER IOTIFIED E +0467 ; output # (ѧ) CYRILLIC SMALL LETTER LITTLE YUS +0469 ; output # (ѩ) CYRILLIC SMALL LETTER IOTIFIED LITTLE YUS +046B ; output # (ѫ) CYRILLIC SMALL LETTER BIG YUS +046D ; output # (ѭ) CYRILLIC SMALL LETTER IOTIFIED BIG YUS +046F ; output # (ѯ) CYRILLIC SMALL LETTER KSI +0471 ; output # (ѱ) CYRILLIC SMALL LETTER PSI +0473 ; output # (ѳ) CYRILLIC SMALL LETTER FITA +0475 ; output # (ѵ) CYRILLIC SMALL LETTER IZHITSA +0477 ; output # (ѷ) CYRILLIC SMALL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT +0479 ; output # (ѹ) CYRILLIC SMALL LETTER UK +047B ; output # (ѻ) CYRILLIC SMALL LETTER ROUND OMEGA +047D ; output # (ѽ) CYRILLIC SMALL LETTER OMEGA WITH TITLO +047F ; output # (ѿ) CYRILLIC SMALL LETTER OT +0481 ; output # (ҁ) CYRILLIC SMALL LETTER KOPPA +048B ; output # (ҋ) CYRILLIC SMALL LETTER SHORT I WITH TAIL +048D ; output # (ҍ) CYRILLIC SMALL LETTER SEMISOFT SIGN +048F ; output # (ҏ) CYRILLIC SMALL LETTER ER WITH TICK +0491 ; output # (ґ) CYRILLIC SMALL LETTER GHE WITH UPTURN +0493 ; output # (ғ) CYRILLIC SMALL LETTER GHE WITH STROKE +0495 ; output # (ҕ) CYRILLIC SMALL LETTER GHE WITH MIDDLE HOOK +0497 ; output # (җ) CYRILLIC SMALL LETTER ZHE WITH DESCENDER +0499 ; output # (ҙ) CYRILLIC SMALL LETTER ZE WITH DESCENDER +049B ; output # (қ) CYRILLIC SMALL LETTER KA WITH DESCENDER +049D ; output # (ҝ) CYRILLIC SMALL LETTER KA WITH VERTICAL STROKE +049F ; output # (ҟ) CYRILLIC SMALL LETTER KA WITH STROKE +04A1 ; output # (ҡ) CYRILLIC SMALL LETTER BASHKIR KA +04A3 ; output # (ң) CYRILLIC SMALL LETTER EN WITH DESCENDER +04A5 ; output # (ҥ) CYRILLIC SMALL LIGATURE EN GHE +04A7 ; output # (ҧ) CYRILLIC SMALL LETTER PE WITH MIDDLE HOOK +04A9 ; output # (ҩ) CYRILLIC SMALL LETTER ABKHASIAN HA +04AB ; output # (ҫ) CYRILLIC SMALL LETTER ES WITH DESCENDER +04AD ; output # (ҭ) CYRILLIC SMALL LETTER TE WITH DESCENDER +04AF ; output # (ү) CYRILLIC SMALL LETTER STRAIGHT U +04B1 ; output # (ұ) CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE +04B3 ; output # (ҳ) CYRILLIC SMALL LETTER HA WITH DESCENDER +04B5 ; output # (ҵ) CYRILLIC SMALL LIGATURE TE TSE +04B7 ; output # (ҷ) CYRILLIC SMALL LETTER CHE WITH DESCENDER +04B9 ; output # (ҹ) CYRILLIC SMALL LETTER CHE WITH VERTICAL STROKE +04BB ; output # (һ) CYRILLIC SMALL LETTER SHHA +04BD ; output # (ҽ) CYRILLIC SMALL LETTER ABKHASIAN CHE +04BF..04C0 ; output # [2] (ҿ..Ӏ) CYRILLIC SMALL LETTER ABKHASIAN CHE WITH DESCENDER..CYRILLIC LETTER PALOCHKA +04C2 ; output # (ӂ) CYRILLIC SMALL LETTER ZHE WITH BREVE +04C4 ; output # (ӄ) CYRILLIC SMALL LETTER KA WITH HOOK +04C6 ; output # (ӆ) CYRILLIC SMALL LETTER EL WITH TAIL +04C8 ; output # (ӈ) CYRILLIC SMALL LETTER EN WITH HOOK +04CA ; output # (ӊ) CYRILLIC SMALL LETTER EN WITH TAIL +04CC ; output # (ӌ) CYRILLIC SMALL LETTER KHAKASSIAN CHE +04CE ; output # (ӎ) CYRILLIC SMALL LETTER EM WITH TAIL +04D1 ; output # (ӑ) CYRILLIC SMALL LETTER A WITH BREVE +04D3 ; output # (ӓ) CYRILLIC SMALL LETTER A WITH DIAERESIS +04D5 ; output # (ӕ) CYRILLIC SMALL LIGATURE A IE +04D7 ; output # (ӗ) CYRILLIC SMALL LETTER IE WITH BREVE +04D9 ; output # (ә) CYRILLIC SMALL LETTER SCHWA +04DB ; output # (ӛ) CYRILLIC SMALL LETTER SCHWA WITH DIAERESIS +04DD ; output # (ӝ) CYRILLIC SMALL LETTER ZHE WITH DIAERESIS +04DF ; output # (ӟ) CYRILLIC SMALL LETTER ZE WITH DIAERESIS +04E1 ; output # (ӡ) CYRILLIC SMALL LETTER ABKHASIAN DZE +04E3 ; output # (ӣ) CYRILLIC SMALL LETTER I WITH MACRON +04E5 ; output # (ӥ) CYRILLIC SMALL LETTER I WITH DIAERESIS +04E7 ; output # (ӧ) CYRILLIC SMALL LETTER O WITH DIAERESIS +04E9 ; output # (ө) CYRILLIC SMALL LETTER BARRED O +04EB ; output # (ӫ) CYRILLIC SMALL LETTER BARRED O WITH DIAERESIS +04ED ; output # (ӭ) CYRILLIC SMALL LETTER E WITH DIAERESIS +04EF ; output # (ӯ) CYRILLIC SMALL LETTER U WITH MACRON +04F1 ; output # (ӱ) CYRILLIC SMALL LETTER U WITH DIAERESIS +04F3 ; output # (ӳ) CYRILLIC SMALL LETTER U WITH DOUBLE ACUTE +04F5 ; output # (ӵ) CYRILLIC SMALL LETTER CHE WITH DIAERESIS +04F9 ; output # (ӹ) CYRILLIC SMALL LETTER YERU WITH DIAERESIS +0501 ; output # (ԁ) CYRILLIC SMALL LETTER KOMI DE +0503 ; output # (ԃ) CYRILLIC SMALL LETTER KOMI DJE +0505 ; output # (ԅ) CYRILLIC SMALL LETTER KOMI ZJE +0507 ; output # (ԇ) CYRILLIC SMALL LETTER KOMI DZJE +0509 ; output # (ԉ) CYRILLIC SMALL LETTER KOMI LJE +050B ; output # (ԋ) CYRILLIC SMALL LETTER KOMI NJE +050D ; output # (ԍ) CYRILLIC SMALL LETTER KOMI SJE +050F ; output # (ԏ) CYRILLIC SMALL LETTER KOMI TJE +0561..0586 ; output # [38] (ա..ֆ) ARMENIAN SMALL LETTER AYB..ARMENIAN SMALL LETTER FEH +0591..05A1 ; output # [17] (֑..֡) HEBREW ACCENT ETNAHTA..HEBREW ACCENT PAZER +05A3..05B9 ; output # [23] (֣..ֹ) HEBREW ACCENT MUNAH..HEBREW POINT HOLAM +05BB..05BD ; output # [3] (ֻ..ֽ) HEBREW POINT QUBUTS..HEBREW POINT METEG +05BF ; output # (ֿ) HEBREW POINT RAFE +05C1..05C2 ; output # [2] (ׁ..ׂ) HEBREW POINT SHIN DOT..HEBREW POINT SIN DOT +05C4 ; output # (ׄ) HEBREW MARK UPPER DOT +05D0..05EA ; output # [27] (א..ת) HEBREW LETTER ALEF..HEBREW LETTER TAV +05F0..05F2 ; output # [3] (װ..ײ) HEBREW LIGATURE YIDDISH DOUBLE VAV..HEBREW LIGATURE YIDDISH DOUBLE YOD +0621..063A ; output # [26] (ء..غ) ARABIC LETTER HAMZA..ARABIC LETTER GHAIN +0641..0655 ; output # [21] (ف..ٕ) ARABIC LETTER FEH..ARABIC HAMZA BELOW +0660..0669 ; output # [10] (٠..٩) ARABIC-INDIC DIGIT ZERO..ARABIC-INDIC DIGIT NINE +0670..0674 ; output # [5] (ٰ..ٴ) ARABIC LETTER SUPERSCRIPT ALEF..ARABIC LETTER HIGH HAMZA +0679..068D ; output # [21] (ٹ..ڍ) ARABIC LETTER TTEH..ARABIC LETTER DDAHAL +068F..06D3 ; output # [69] (ڏ..ۓ) ARABIC LETTER DAL WITH THREE DOTS ABOVE DOWNWARDS..ARABIC LETTER YEH BARREE WITH HAMZA ABOVE +06D5..06DC ; output # [8] (ە..ۜ) ARABIC LETTER AE..ARABIC SMALL HIGH SEEN +06DF..06E8 ; output # [10] (۟..ۨ) ARABIC SMALL HIGH ROUNDED ZERO..ARABIC SMALL HIGH NOON +06EA..06ED ; output # [4] (۪..ۭ) ARABIC EMPTY CENTRE LOW STOP..ARABIC SMALL LOW MEEM +06F0..06FC ; output # [13] (۰..ۼ) EXTENDED ARABIC-INDIC DIGIT ZERO..ARABIC LETTER GHAIN WITH DOT BELOW +0710..072C ; output # [29] (ܐ..ܬ) SYRIAC LETTER ALAPH..SYRIAC LETTER TAW +0730..073F ; output # [16] (ܰ..ܿ) SYRIAC PTHAHA ABOVE..SYRIAC RWAHA +0780..07B1 ; output # [50] (ހ..ޱ) THAANA LETTER HAA..THAANA LETTER NAA +0901..0903 ; output # [3] (ँ..ः) DEVANAGARI SIGN CANDRABINDU..DEVANAGARI SIGN VISARGA +0905..0939 ; output # [53] (अ..ह) DEVANAGARI LETTER A..DEVANAGARI LETTER HA +093C..094D ; output # [18] (़..्) DEVANAGARI SIGN NUKTA..DEVANAGARI SIGN VIRAMA +0950..0954 ; output # [5] (ॐ..॔) DEVANAGARI OM..DEVANAGARI ACUTE ACCENT +0960..0963 ; output # [4] (ॠ..ॣ) DEVANAGARI LETTER VOCALIC RR..DEVANAGARI VOWEL SIGN VOCALIC LL +0966..096F ; output # [10] (०..९) DEVANAGARI DIGIT ZERO..DEVANAGARI DIGIT NINE +0981..0983 ; output # [3] (ঁ..ঃ) BENGALI SIGN CANDRABINDU..BENGALI SIGN VISARGA +0985..098C ; output # [8] (অ..ঌ) BENGALI LETTER A..BENGALI LETTER VOCALIC L +098F..0990 ; output # [2] (এ..ঐ) BENGALI LETTER E..BENGALI LETTER AI +0993..09A8 ; output # [22] (ও..ন) BENGALI LETTER O..BENGALI LETTER NA +09AA..09B0 ; output # [7] (প..র) BENGALI LETTER PA..BENGALI LETTER RA +09B2 ; output # (ল) BENGALI LETTER LA +09B6..09B9 ; output # [4] (শ..হ) BENGALI LETTER SHA..BENGALI LETTER HA +09BC ; output # (়) BENGALI SIGN NUKTA +09BE..09C4 ; output # [7] (া..ৄ) BENGALI VOWEL SIGN AA..BENGALI VOWEL SIGN VOCALIC RR +09C7..09C8 ; output # [2] (ে..ৈ) BENGALI VOWEL SIGN E..BENGALI VOWEL SIGN AI +09CB..09CD ; output # [3] (ো..্) BENGALI VOWEL SIGN O..BENGALI SIGN VIRAMA +09D7 ; output # (ৗ) BENGALI AU LENGTH MARK +09E0..09E3 ; output # [4] (ৠ..ৣ) BENGALI LETTER VOCALIC RR..BENGALI VOWEL SIGN VOCALIC LL +09E6..09F1 ; output # [12] (০..ৱ) BENGALI DIGIT ZERO..BENGALI LETTER RA WITH LOWER DIAGONAL +0A02 ; output # (ਂ) GURMUKHI SIGN BINDI +0A05..0A0A ; output # [6] (ਅ..ਊ) GURMUKHI LETTER A..GURMUKHI LETTER UU +0A0F..0A10 ; output # [2] (ਏ..ਐ) GURMUKHI LETTER EE..GURMUKHI LETTER AI +0A13..0A28 ; output # [22] (ਓ..ਨ) GURMUKHI LETTER OO..GURMUKHI LETTER NA +0A2A..0A30 ; output # [7] (ਪ..ਰ) GURMUKHI LETTER PA..GURMUKHI LETTER RA +0A32 ; output # (ਲ) GURMUKHI LETTER LA +0A35 ; output # (ਵ) GURMUKHI LETTER VA +0A38..0A39 ; output # [2] (ਸ..ਹ) GURMUKHI LETTER SA..GURMUKHI LETTER HA +0A3C ; output # (਼) GURMUKHI SIGN NUKTA +0A3E..0A42 ; output # [5] (ਾ..ੂ) GURMUKHI VOWEL SIGN AA..GURMUKHI VOWEL SIGN UU +0A47..0A48 ; output # [2] (ੇ..ੈ) GURMUKHI VOWEL SIGN EE..GURMUKHI VOWEL SIGN AI +0A4B..0A4D ; output # [3] (ੋ..੍) GURMUKHI VOWEL SIGN OO..GURMUKHI SIGN VIRAMA +0A5C ; output # (ੜ) GURMUKHI LETTER RRA +0A66..0A74 ; output # [15] (੦..ੴ) GURMUKHI DIGIT ZERO..GURMUKHI EK ONKAR +0A81..0A83 ; output # [3] (ઁ..ઃ) GUJARATI SIGN CANDRABINDU..GUJARATI SIGN VISARGA +0A85..0A8B ; output # [7] (અ..ઋ) GUJARATI LETTER A..GUJARATI LETTER VOCALIC R +0A8D ; output # (ઍ) GUJARATI VOWEL CANDRA E +0A8F..0A91 ; output # [3] (એ..ઑ) GUJARATI LETTER E..GUJARATI VOWEL CANDRA O +0A93..0AA8 ; output # [22] (ઓ..ન) GUJARATI LETTER O..GUJARATI LETTER NA +0AAA..0AB0 ; output # [7] (પ..ર) GUJARATI LETTER PA..GUJARATI LETTER RA +0AB2..0AB3 ; output # [2] (લ..ળ) GUJARATI LETTER LA..GUJARATI LETTER LLA +0AB5..0AB9 ; output # [5] (વ..હ) GUJARATI LETTER VA..GUJARATI LETTER HA +0ABC..0AC5 ; output # [10] (઼..ૅ) GUJARATI SIGN NUKTA..GUJARATI VOWEL SIGN CANDRA E +0AC7..0AC9 ; output # [3] (ે..ૉ) GUJARATI VOWEL SIGN E..GUJARATI VOWEL SIGN CANDRA O +0ACB..0ACD ; output # [3] (ો..્) GUJARATI VOWEL SIGN O..GUJARATI SIGN VIRAMA +0AD0 ; output # (ૐ) GUJARATI OM +0AE0 ; output # (ૠ) GUJARATI LETTER VOCALIC RR +0AE6..0AEF ; output # [10] (૦..૯) GUJARATI DIGIT ZERO..GUJARATI DIGIT NINE +0B01..0B03 ; output # [3] (ଁ..ଃ) ORIYA SIGN CANDRABINDU..ORIYA SIGN VISARGA +0B05..0B0C ; output # [8] (ଅ..ଌ) ORIYA LETTER A..ORIYA LETTER VOCALIC L +0B0F..0B10 ; output # [2] (ଏ..ଐ) ORIYA LETTER E..ORIYA LETTER AI +0B13..0B28 ; output # [22] (ଓ..ନ) ORIYA LETTER O..ORIYA LETTER NA +0B2A..0B30 ; output # [7] (ପ..ର) ORIYA LETTER PA..ORIYA LETTER RA +0B32..0B33 ; output # [2] (ଲ..ଳ) ORIYA LETTER LA..ORIYA LETTER LLA +0B36..0B39 ; output # [4] (ଶ..ହ) ORIYA LETTER SHA..ORIYA LETTER HA +0B3C..0B43 ; output # [8] (଼..ୃ) ORIYA SIGN NUKTA..ORIYA VOWEL SIGN VOCALIC R +0B47..0B48 ; output # [2] (େ..ୈ) ORIYA VOWEL SIGN E..ORIYA VOWEL SIGN AI +0B4B..0B4D ; output # [3] (ୋ..୍) ORIYA VOWEL SIGN O..ORIYA SIGN VIRAMA +0B56..0B57 ; output # [2] (ୖ..ୗ) ORIYA AI LENGTH MARK..ORIYA AU LENGTH MARK +0B5F..0B61 ; output # [3] (ୟ..ୡ) ORIYA LETTER YYA..ORIYA LETTER VOCALIC LL +0B66..0B6F ; output # [10] (୦..୯) ORIYA DIGIT ZERO..ORIYA DIGIT NINE +0B82..0B83 ; output # [2] (ஂ..ஃ) TAMIL SIGN ANUSVARA..TAMIL SIGN VISARGA +0B85..0B8A ; output # [6] (அ..ஊ) TAMIL LETTER A..TAMIL LETTER UU +0B8E..0B90 ; output # [3] (எ..ஐ) TAMIL LETTER E..TAMIL LETTER AI +0B92..0B95 ; output # [4] (ஒ..க) TAMIL LETTER O..TAMIL LETTER KA +0B99..0B9A ; output # [2] (ங..ச) TAMIL LETTER NGA..TAMIL LETTER CA +0B9C ; output # (ஜ) TAMIL LETTER JA +0B9E..0B9F ; output # [2] (ஞ..ட) TAMIL LETTER NYA..TAMIL LETTER TTA +0BA3..0BA4 ; output # [2] (ண..த) TAMIL LETTER NNA..TAMIL LETTER TA +0BA8..0BAA ; output # [3] (ந..ப) TAMIL LETTER NA..TAMIL LETTER PA +0BAE..0BB5 ; output # [8] (ம..வ) TAMIL LETTER MA..TAMIL LETTER VA +0BB7..0BB9 ; output # [3] (ஷ..ஹ) TAMIL LETTER SSA..TAMIL LETTER HA +0BBE..0BC2 ; output # [5] (ா..ூ) TAMIL VOWEL SIGN AA..TAMIL VOWEL SIGN UU +0BC6..0BC8 ; output # [3] (ெ..ை) TAMIL VOWEL SIGN E..TAMIL VOWEL SIGN AI +0BCA..0BCD ; output # [4] (ொ..்) TAMIL VOWEL SIGN O..TAMIL SIGN VIRAMA +0BD7 ; output # (ௗ) TAMIL AU LENGTH MARK +0BE7..0BEF ; output # [9] (௧..௯) TAMIL DIGIT ONE..TAMIL DIGIT NINE +0C01..0C03 ; output # [3] (ఁ..ః) TELUGU SIGN CANDRABINDU..TELUGU SIGN VISARGA +0C05..0C0C ; output # [8] (అ..ఌ) TELUGU LETTER A..TELUGU LETTER VOCALIC L +0C0E..0C10 ; output # [3] (ఎ..ఐ) TELUGU LETTER E..TELUGU LETTER AI +0C12..0C28 ; output # [23] (ఒ..న) TELUGU LETTER O..TELUGU LETTER NA +0C2A..0C33 ; output # [10] (ప..ళ) TELUGU LETTER PA..TELUGU LETTER LLA +0C35..0C39 ; output # [5] (వ..హ) TELUGU LETTER VA..TELUGU LETTER HA +0C3E..0C44 ; output # [7] (ా..ౄ) TELUGU VOWEL SIGN AA..TELUGU VOWEL SIGN VOCALIC RR +0C46..0C48 ; output # [3] (ె..ై) TELUGU VOWEL SIGN E..TELUGU VOWEL SIGN AI +0C4A..0C4D ; output # [4] (ొ..్) TELUGU VOWEL SIGN O..TELUGU SIGN VIRAMA +0C55..0C56 ; output # [2] (ౕ..ౖ) TELUGU LENGTH MARK..TELUGU AI LENGTH MARK +0C60..0C61 ; output # [2] (ౠ..ౡ) TELUGU LETTER VOCALIC RR..TELUGU LETTER VOCALIC LL +0C66..0C6F ; output # [10] (౦..౯) TELUGU DIGIT ZERO..TELUGU DIGIT NINE +0C82..0C83 ; output # [2] (ಂ..ಃ) KANNADA SIGN ANUSVARA..KANNADA SIGN VISARGA +0C85..0C8C ; output # [8] (ಅ..ಌ) KANNADA LETTER A..KANNADA LETTER VOCALIC L +0C8E..0C90 ; output # [3] (ಎ..ಐ) KANNADA LETTER E..KANNADA LETTER AI +0C92..0CA8 ; output # [23] (ಒ..ನ) KANNADA LETTER O..KANNADA LETTER NA +0CAA..0CB3 ; output # [10] (ಪ..ಳ) KANNADA LETTER PA..KANNADA LETTER LLA +0CB5..0CB9 ; output # [5] (ವ..ಹ) KANNADA LETTER VA..KANNADA LETTER HA +0CBE..0CC4 ; output # [7] (ಾ..ೄ) KANNADA VOWEL SIGN AA..KANNADA VOWEL SIGN VOCALIC RR +0CC6..0CC8 ; output # [3] (ೆ..ೈ) KANNADA VOWEL SIGN E..KANNADA VOWEL SIGN AI +0CCA..0CCD ; output # [4] (ೊ..್) KANNADA VOWEL SIGN O..KANNADA SIGN VIRAMA +0CD5..0CD6 ; output # [2] (ೕ..ೖ) KANNADA LENGTH MARK..KANNADA AI LENGTH MARK +0CE0..0CE1 ; output # [2] (ೠ..ೡ) KANNADA LETTER VOCALIC RR..KANNADA LETTER VOCALIC LL +0CE6..0CEF ; output # [10] (೦..೯) KANNADA DIGIT ZERO..KANNADA DIGIT NINE +0D02..0D03 ; output # [2] (ം..ഃ) MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA +0D05..0D0C ; output # [8] (അ..ഌ) MALAYALAM LETTER A..MALAYALAM LETTER VOCALIC L +0D0E..0D10 ; output # [3] (എ..ഐ) MALAYALAM LETTER E..MALAYALAM LETTER AI +0D12..0D28 ; output # [23] (ഒ..ന) MALAYALAM LETTER O..MALAYALAM LETTER NA +0D2A..0D39 ; output # [16] (പ..ഹ) MALAYALAM LETTER PA..MALAYALAM LETTER HA +0D3E..0D43 ; output # [6] (ാ..ൃ) MALAYALAM VOWEL SIGN AA..MALAYALAM VOWEL SIGN VOCALIC R +0D46..0D48 ; output # [3] (െ..ൈ) MALAYALAM VOWEL SIGN E..MALAYALAM VOWEL SIGN AI +0D4A..0D4D ; output # [4] (ൊ..്) MALAYALAM VOWEL SIGN O..MALAYALAM SIGN VIRAMA +0D57 ; output # (ൗ) MALAYALAM AU LENGTH MARK +0D60..0D61 ; output # [2] (ൠ..ൡ) MALAYALAM LETTER VOCALIC RR..MALAYALAM LETTER VOCALIC LL +0D66..0D6F ; output # [10] (൦..൯) MALAYALAM DIGIT ZERO..MALAYALAM DIGIT NINE +0D82..0D83 ; output # [2] (ං..ඃ) SINHALA SIGN ANUSVARAYA..SINHALA SIGN VISARGAYA +0D85..0D96 ; output # [18] (අ..ඖ) SINHALA LETTER AYANNA..SINHALA LETTER AUYANNA +0D9A..0DB1 ; output # [24] (ක..න) SINHALA LETTER ALPAPRAANA KAYANNA..SINHALA LETTER DANTAJA NAYANNA +0DB3..0DBB ; output # [9] (ඳ..ර) SINHALA LETTER SANYAKA DAYANNA..SINHALA LETTER RAYANNA +0DBD ; output # (ල) SINHALA LETTER DANTAJA LAYANNA +0DC0..0DC6 ; output # [7] (ව..ෆ) SINHALA LETTER VAYANNA..SINHALA LETTER FAYANNA +0DCA ; output # (්) SINHALA SIGN AL-LAKUNA +0DCF..0DD4 ; output # [6] (ා..ු) SINHALA VOWEL SIGN AELA-PILLA..SINHALA VOWEL SIGN KETTI PAA-PILLA +0DD6 ; output # (ූ) SINHALA VOWEL SIGN DIGA PAA-PILLA +0DD8..0DDF ; output # [8] (ෘ..ෟ) SINHALA VOWEL SIGN GAETTA-PILLA..SINHALA VOWEL SIGN GAYANUKITTA +0DF2..0DF3 ; output # [2] (ෲ..ෳ) SINHALA VOWEL SIGN DIGA GAETTA-PILLA..SINHALA VOWEL SIGN DIGA GAYANUKITTA +0E01..0E32 ; output # [50] (ก..า) THAI CHARACTER KO KAI..THAI CHARACTER SARA AA +0E34..0E3A ; output # [7] (ิ..ฺ) THAI CHARACTER SARA I..THAI CHARACTER PHINTHU +0E40..0E4E ; output # [15] (เ..๎) THAI CHARACTER SARA E..THAI CHARACTER YAMAKKAN +0E50..0E59 ; output # [10] (๐..๙) THAI DIGIT ZERO..THAI DIGIT NINE +0E81..0E82 ; output # [2] (ກ..ຂ) LAO LETTER KO..LAO LETTER KHO SUNG +0E84 ; output # (ຄ) LAO LETTER KHO TAM +0E87..0E88 ; output # [2] (ງ..ຈ) LAO LETTER NGO..LAO LETTER CO +0E8A ; output # (ຊ) LAO LETTER SO TAM +0E8D ; output # (ຍ) LAO LETTER NYO +0E94..0E97 ; output # [4] (ດ..ທ) LAO LETTER DO..LAO LETTER THO TAM +0E99..0E9F ; output # [7] (ນ..ຟ) LAO LETTER NO..LAO LETTER FO SUNG +0EA1..0EA3 ; output # [3] (ມ..ຣ) LAO LETTER MO..LAO LETTER LO LING +0EA5 ; output # (ລ) LAO LETTER LO LOOT +0EA7 ; output # (ວ) LAO LETTER WO +0EAA..0EAB ; output # [2] (ສ..ຫ) LAO LETTER SO SUNG..LAO LETTER HO SUNG +0EAD..0EB2 ; output # [6] (ອ..າ) LAO LETTER O..LAO VOWEL SIGN AA +0EB4..0EB9 ; output # [6] (ິ..ູ) LAO VOWEL SIGN I..LAO VOWEL SIGN UU +0EBB..0EBD ; output # [3] (ົ..ຽ) LAO VOWEL SIGN MAI KON..LAO SEMIVOWEL SIGN NYO +0EC0..0EC4 ; output # [5] (ເ..ໄ) LAO VOWEL SIGN E..LAO VOWEL SIGN AI +0EC6 ; output # (ໆ) LAO KO LA +0EC8..0ECD ; output # [6] (່..ໍ) LAO TONE MAI EK..LAO NIGGAHITA +0ED0..0ED9 ; output # [10] (໐..໙) LAO DIGIT ZERO..LAO DIGIT NINE +0F00 ; output # (ༀ) TIBETAN SYLLABLE OM +0F18..0F19 ; output # [2] (༘..༙) TIBETAN ASTROLOGICAL SIGN -KHYUD PA..TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS +0F20..0F29 ; output # [10] (༠..༩) TIBETAN DIGIT ZERO..TIBETAN DIGIT NINE +0F35 ; output # (༵) TIBETAN MARK NGAS BZUNG NYI ZLA +0F37 ; output # (༷) TIBETAN MARK NGAS BZUNG SGOR RTAGS +0F39 ; output # (༹) TIBETAN MARK TSA -PHRU +0F3E..0F42 ; output # [5] (༾..ག) TIBETAN SIGN YAR TSHES..TIBETAN LETTER GA +0F44..0F47 ; output # [4] (ང..ཇ) TIBETAN LETTER NGA..TIBETAN LETTER JA +0F49..0F4C ; output # [4] (ཉ..ཌ) TIBETAN LETTER NYA..TIBETAN LETTER DDA +0F4E..0F51 ; output # [4] (ཎ..ད) TIBETAN LETTER NNA..TIBETAN LETTER DA +0F53..0F56 ; output # [4] (ན..བ) TIBETAN LETTER NA..TIBETAN LETTER BA +0F58..0F5B ; output # [4] (མ..ཛ) TIBETAN LETTER MA..TIBETAN LETTER DZA +0F5D..0F68 ; output # [12] (ཝ..ཨ) TIBETAN LETTER WA..TIBETAN LETTER A +0F6A ; output # (ཪ) TIBETAN LETTER FIXED-FORM RA +0F71..0F72 ; output # [2] (ཱ..ི) TIBETAN VOWEL SIGN AA..TIBETAN VOWEL SIGN I +0F74 ; output # (ུ) TIBETAN VOWEL SIGN U +0F7A..0F80 ; output # [7] (ེ..ྀ) TIBETAN VOWEL SIGN E..TIBETAN VOWEL SIGN REVERSED I +0F82..0F84 ; output # [3] (ྂ..྄) TIBETAN SIGN NYI ZLA NAA DA..TIBETAN MARK HALANTA +0F86..0F8B ; output # [6] (྆..ྋ) TIBETAN SIGN LCI RTAGS..TIBETAN SIGN GRU MED RGYINGS +0F90..0F92 ; output # [3] (ྐ..ྒ) TIBETAN SUBJOINED LETTER KA..TIBETAN SUBJOINED LETTER GA +0F94..0F97 ; output # [4] (ྔ..ྗ) TIBETAN SUBJOINED LETTER NGA..TIBETAN SUBJOINED LETTER JA +0F99..0F9C ; output # [4] (ྙ..ྜ) TIBETAN SUBJOINED LETTER NYA..TIBETAN SUBJOINED LETTER DDA +0F9E..0FA1 ; output # [4] (ྞ..ྡ) TIBETAN SUBJOINED LETTER NNA..TIBETAN SUBJOINED LETTER DA +0FA3..0FA6 ; output # [4] (ྣ..ྦ) TIBETAN SUBJOINED LETTER NA..TIBETAN SUBJOINED LETTER BA +0FA8..0FAB ; output # [4] (ྨ..ྫ) TIBETAN SUBJOINED LETTER MA..TIBETAN SUBJOINED LETTER DZA +0FAD..0FB8 ; output # [12] (ྭ..ྸ) TIBETAN SUBJOINED LETTER WA..TIBETAN SUBJOINED LETTER A +0FBA..0FBC ; output # [3] (ྺ..ྼ) TIBETAN SUBJOINED LETTER FIXED-FORM WA..TIBETAN SUBJOINED LETTER FIXED-FORM RA +0FC6 ; output # (࿆) TIBETAN SYMBOL PADMA GDAN +1000..1021 ; output # [34] (က..အ) MYANMAR LETTER KA..MYANMAR LETTER A +1023..1027 ; output # [5] (ဣ..ဧ) MYANMAR LETTER I..MYANMAR LETTER E +1029..102A ; output # [2] (ဩ..ဪ) MYANMAR LETTER O..MYANMAR LETTER AU +102C..1032 ; output # [7] (ာ..ဲ) MYANMAR VOWEL SIGN AA..MYANMAR VOWEL SIGN AI +1036..1039 ; output # [4] (ံ..္) MYANMAR SIGN ANUSVARA..MYANMAR SIGN VIRAMA +1040..1049 ; output # [10] (၀..၉) MYANMAR DIGIT ZERO..MYANMAR DIGIT NINE +1050..1059 ; output # [10] (ၐ..ၙ) MYANMAR LETTER SHA..MYANMAR VOWEL SIGN VOCALIC LL +10A0..10C5 ; output # [38] (Ⴀ..Ⴥ) GEORGIAN CAPITAL LETTER AN..GEORGIAN CAPITAL LETTER HOE +10D0..10F0 ; output # [33] (ა..ჰ) GEORGIAN LETTER AN..GEORGIAN LETTER HAE +10F7..10F8 ; output # [2] (ჷ..ჸ) GEORGIAN LETTER YN..GEORGIAN LETTER ELIFI +1200..1206 ; output # [7] (ሀ..ሆ) ETHIOPIC SYLLABLE HA..ETHIOPIC SYLLABLE HO +1208..1246 ; output # [63] (ለ..ቆ) ETHIOPIC SYLLABLE LA..ETHIOPIC SYLLABLE QO +1248 ; output # (ቈ) ETHIOPIC SYLLABLE QWA +124A..124D ; output # [4] (ቊ..ቍ) ETHIOPIC SYLLABLE QWI..ETHIOPIC SYLLABLE QWE +1250..1256 ; output # [7] (ቐ..ቖ) ETHIOPIC SYLLABLE QHA..ETHIOPIC SYLLABLE QHO +1258 ; output # (ቘ) ETHIOPIC SYLLABLE QHWA +125A..125D ; output # [4] (ቚ..ቝ) ETHIOPIC SYLLABLE QHWI..ETHIOPIC SYLLABLE QHWE +1260..1286 ; output # [39] (በ..ኆ) ETHIOPIC SYLLABLE BA..ETHIOPIC SYLLABLE XO +1288 ; output # (ኈ) ETHIOPIC SYLLABLE XWA +128A..128D ; output # [4] (ኊ..ኍ) ETHIOPIC SYLLABLE XWI..ETHIOPIC SYLLABLE XWE +1290..12AE ; output # [31] (ነ..ኮ) ETHIOPIC SYLLABLE NA..ETHIOPIC SYLLABLE KO +12B0 ; output # (ኰ) ETHIOPIC SYLLABLE KWA +12B2..12B5 ; output # [4] (ኲ..ኵ) ETHIOPIC SYLLABLE KWI..ETHIOPIC SYLLABLE KWE +12B8..12BE ; output # [7] (ኸ..ኾ) ETHIOPIC SYLLABLE KXA..ETHIOPIC SYLLABLE KXO +12C0 ; output # (ዀ) ETHIOPIC SYLLABLE KXWA +12C2..12C5 ; output # [4] (ዂ..ዅ) ETHIOPIC SYLLABLE KXWI..ETHIOPIC SYLLABLE KXWE +12C8..12CE ; output # [7] (ወ..ዎ) ETHIOPIC SYLLABLE WA..ETHIOPIC SYLLABLE WO +12D0..12D6 ; output # [7] (ዐ..ዖ) ETHIOPIC SYLLABLE PHARYNGEAL A..ETHIOPIC SYLLABLE PHARYNGEAL O +12D8..12EE ; output # [23] (ዘ..ዮ) ETHIOPIC SYLLABLE ZA..ETHIOPIC SYLLABLE YO +12F0..130E ; output # [31] (ደ..ጎ) ETHIOPIC SYLLABLE DA..ETHIOPIC SYLLABLE GO +1310 ; output # (ጐ) ETHIOPIC SYLLABLE GWA +1312..1315 ; output # [4] (ጒ..ጕ) ETHIOPIC SYLLABLE GWI..ETHIOPIC SYLLABLE GWE +1318..131E ; output # [7] (ጘ..ጞ) ETHIOPIC SYLLABLE GGA..ETHIOPIC SYLLABLE GGO +1320..1346 ; output # [39] (ጠ..ፆ) ETHIOPIC SYLLABLE THA..ETHIOPIC SYLLABLE TZO +1348..135A ; output # [19] (ፈ..ፚ) ETHIOPIC SYLLABLE FA..ETHIOPIC SYLLABLE FYA +1369..1371 ; output # [9] (፩..፱) ETHIOPIC DIGIT ONE..ETHIOPIC DIGIT NINE +13A0..13F4 ; output # [85] (Ꭰ..Ᏼ) CHEROKEE LETTER A..CHEROKEE LETTER YV +1401..166C ; output # [620] (ᐁ..ᙬ) CANADIAN SYLLABICS E..CANADIAN SYLLABICS CARRIER TTSA +166F..1676 ; output # [8] (ᙯ..ᙶ) CANADIAN SYLLABICS QAI..CANADIAN SYLLABICS NNGAA +1780..17A2 ; output # [35] (ក..អ) KHMER LETTER KA..KHMER LETTER QA +17A5..17A7 ; output # [3] (ឥ..ឧ) KHMER INDEPENDENT VOWEL QI..KHMER INDEPENDENT VOWEL QU +17A9..17B3 ; output # [11] (ឩ..ឳ) KHMER INDEPENDENT VOWEL QUU..KHMER INDEPENDENT VOWEL QAU +17B6..17D0 ; output # [27] (ា..័) KHMER VOWEL SIGN AA..KHMER SIGN SAMYOK SANNYA +17D2 ; output # (្) KHMER SIGN COENG +17D7 ; output # (ៗ) KHMER SIGN LEK TOO +17DC ; output # (ៜ) KHMER SIGN AVAKRAHASANYA +17E0..17E9 ; output # [10] (០..៩) KHMER DIGIT ZERO..KHMER DIGIT NINE +1810..1819 ; output # [10] (᠐..᠙) MONGOLIAN DIGIT ZERO..MONGOLIAN DIGIT NINE +1820..1877 ; output # [88] (ᠠ..ᡷ) MONGOLIAN LETTER A..MONGOLIAN LETTER MANCHU ZHA +1880..18A9 ; output # [42] (ᢀ..ᢩ) MONGOLIAN LETTER ALI GALI ANUSVARA ONE..MONGOLIAN LETTER ALI GALI DAGALGA +1E01 ; output # (ḁ) LATIN SMALL LETTER A WITH RING BELOW +1E03 ; output # (ḃ) LATIN SMALL LETTER B WITH DOT ABOVE +1E05 ; output # (ḅ) LATIN SMALL LETTER B WITH DOT BELOW +1E07 ; output # (ḇ) LATIN SMALL LETTER B WITH LINE BELOW +1E09 ; output # (ḉ) LATIN SMALL LETTER C WITH CEDILLA AND ACUTE +1E0B ; output # (ḋ) LATIN SMALL LETTER D WITH DOT ABOVE +1E0D ; output # (ḍ) LATIN SMALL LETTER D WITH DOT BELOW +1E0F ; output # (ḏ) LATIN SMALL LETTER D WITH LINE BELOW +1E11 ; output # (ḑ) LATIN SMALL LETTER D WITH CEDILLA +1E13 ; output # (ḓ) LATIN SMALL LETTER D WITH CIRCUMFLEX BELOW +1E15 ; output # (ḕ) LATIN SMALL LETTER E WITH MACRON AND GRAVE +1E17 ; output # (ḗ) LATIN SMALL LETTER E WITH MACRON AND ACUTE +1E19 ; output # (ḙ) LATIN SMALL LETTER E WITH CIRCUMFLEX BELOW +1E1B ; output # (ḛ) LATIN SMALL LETTER E WITH TILDE BELOW +1E1D ; output # (ḝ) LATIN SMALL LETTER E WITH CEDILLA AND BREVE +1E1F ; output # (ḟ) LATIN SMALL LETTER F WITH DOT ABOVE +1E21 ; output # (ḡ) LATIN SMALL LETTER G WITH MACRON +1E23 ; output # (ḣ) LATIN SMALL LETTER H WITH DOT ABOVE +1E25 ; output # (ḥ) LATIN SMALL LETTER H WITH DOT BELOW +1E27 ; output # (ḧ) LATIN SMALL LETTER H WITH DIAERESIS +1E29 ; output # (ḩ) LATIN SMALL LETTER H WITH CEDILLA +1E2B ; output # (ḫ) LATIN SMALL LETTER H WITH BREVE BELOW +1E2D ; output # (ḭ) LATIN SMALL LETTER I WITH TILDE BELOW +1E2F ; output # (ḯ) LATIN SMALL LETTER I WITH DIAERESIS AND ACUTE +1E31 ; output # (ḱ) LATIN SMALL LETTER K WITH ACUTE +1E33 ; output # (ḳ) LATIN SMALL LETTER K WITH DOT BELOW +1E35 ; output # (ḵ) LATIN SMALL LETTER K WITH LINE BELOW +1E37 ; output # (ḷ) LATIN SMALL LETTER L WITH DOT BELOW +1E39 ; output # (ḹ) LATIN SMALL LETTER L WITH DOT BELOW AND MACRON +1E3B ; output # (ḻ) LATIN SMALL LETTER L WITH LINE BELOW +1E3D ; output # (ḽ) LATIN SMALL LETTER L WITH CIRCUMFLEX BELOW +1E3F ; output # (ḿ) LATIN SMALL LETTER M WITH ACUTE +1E41 ; output # (ṁ) LATIN SMALL LETTER M WITH DOT ABOVE +1E43 ; output # (ṃ) LATIN SMALL LETTER M WITH DOT BELOW +1E45 ; output # (ṅ) LATIN SMALL LETTER N WITH DOT ABOVE +1E47 ; output # (ṇ) LATIN SMALL LETTER N WITH DOT BELOW +1E49 ; output # (ṉ) LATIN SMALL LETTER N WITH LINE BELOW +1E4B ; output # (ṋ) LATIN SMALL LETTER N WITH CIRCUMFLEX BELOW +1E4D ; output # (ṍ) LATIN SMALL LETTER O WITH TILDE AND ACUTE +1E4F ; output # (ṏ) LATIN SMALL LETTER O WITH TILDE AND DIAERESIS +1E51 ; output # (ṑ) LATIN SMALL LETTER O WITH MACRON AND GRAVE +1E53 ; output # (ṓ) LATIN SMALL LETTER O WITH MACRON AND ACUTE +1E55 ; output # (ṕ) LATIN SMALL LETTER P WITH ACUTE +1E57 ; output # (ṗ) LATIN SMALL LETTER P WITH DOT ABOVE +1E59 ; output # (ṙ) LATIN SMALL LETTER R WITH DOT ABOVE +1E5B ; output # (ṛ) LATIN SMALL LETTER R WITH DOT BELOW +1E5D ; output # (ṝ) LATIN SMALL LETTER R WITH DOT BELOW AND MACRON +1E5F ; output # (ṟ) LATIN SMALL LETTER R WITH LINE BELOW +1E61 ; output # (ṡ) LATIN SMALL LETTER S WITH DOT ABOVE +1E63 ; output # (ṣ) LATIN SMALL LETTER S WITH DOT BELOW +1E65 ; output # (ṥ) LATIN SMALL LETTER S WITH ACUTE AND DOT ABOVE +1E67 ; output # (ṧ) LATIN SMALL LETTER S WITH CARON AND DOT ABOVE +1E69 ; output # (ṩ) LATIN SMALL LETTER S WITH DOT BELOW AND DOT ABOVE +1E6B ; output # (ṫ) LATIN SMALL LETTER T WITH DOT ABOVE +1E6D ; output # (ṭ) LATIN SMALL LETTER T WITH DOT BELOW +1E6F ; output # (ṯ) LATIN SMALL LETTER T WITH LINE BELOW +1E71 ; output # (ṱ) LATIN SMALL LETTER T WITH CIRCUMFLEX BELOW +1E73 ; output # (ṳ) LATIN SMALL LETTER U WITH DIAERESIS BELOW +1E75 ; output # (ṵ) LATIN SMALL LETTER U WITH TILDE BELOW +1E77 ; output # (ṷ) LATIN SMALL LETTER U WITH CIRCUMFLEX BELOW +1E79 ; output # (ṹ) LATIN SMALL LETTER U WITH TILDE AND ACUTE +1E7B ; output # (ṻ) LATIN SMALL LETTER U WITH MACRON AND DIAERESIS +1E7D ; output # (ṽ) LATIN SMALL LETTER V WITH TILDE +1E7F ; output # (ṿ) LATIN SMALL LETTER V WITH DOT BELOW +1E81 ; output # (ẁ) LATIN SMALL LETTER W WITH GRAVE +1E83 ; output # (ẃ) LATIN SMALL LETTER W WITH ACUTE +1E85 ; output # (ẅ) LATIN SMALL LETTER W WITH DIAERESIS +1E87 ; output # (ẇ) LATIN SMALL LETTER W WITH DOT ABOVE +1E89 ; output # (ẉ) LATIN SMALL LETTER W WITH DOT BELOW +1E8B ; output # (ẋ) LATIN SMALL LETTER X WITH DOT ABOVE +1E8D ; output # (ẍ) LATIN SMALL LETTER X WITH DIAERESIS +1E8F ; output # (ẏ) LATIN SMALL LETTER Y WITH DOT ABOVE +1E91 ; output # (ẑ) LATIN SMALL LETTER Z WITH CIRCUMFLEX +1E93 ; output # (ẓ) LATIN SMALL LETTER Z WITH DOT BELOW +1E95..1E99 ; output # [5] (ẕ..ẙ) LATIN SMALL LETTER Z WITH LINE BELOW..LATIN SMALL LETTER Y WITH RING ABOVE +1EA1 ; output # (ạ) LATIN SMALL LETTER A WITH DOT BELOW +1EA3 ; output # (ả) LATIN SMALL LETTER A WITH HOOK ABOVE +1EA5 ; output # (ấ) LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE +1EA7 ; output # (ầ) LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE +1EA9 ; output # (ẩ) LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE +1EAB ; output # (ẫ) LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE +1EAD ; output # (ậ) LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW +1EAF ; output # (ắ) LATIN SMALL LETTER A WITH BREVE AND ACUTE +1EB1 ; output # (ằ) LATIN SMALL LETTER A WITH BREVE AND GRAVE +1EB3 ; output # (ẳ) LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE +1EB5 ; output # (ẵ) LATIN SMALL LETTER A WITH BREVE AND TILDE +1EB7 ; output # (ặ) LATIN SMALL LETTER A WITH BREVE AND DOT BELOW +1EB9 ; output # (ẹ) LATIN SMALL LETTER E WITH DOT BELOW +1EBB ; output # (ẻ) LATIN SMALL LETTER E WITH HOOK ABOVE +1EBD ; output # (ẽ) LATIN SMALL LETTER E WITH TILDE +1EBF ; output # (ế) LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE +1EC1 ; output # (ề) LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE +1EC3 ; output # (ể) LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE +1EC5 ; output # (ễ) LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE +1EC7 ; output # (ệ) LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW +1EC9 ; output # (ỉ) LATIN SMALL LETTER I WITH HOOK ABOVE +1ECB ; output # (ị) LATIN SMALL LETTER I WITH DOT BELOW +1ECD ; output # (ọ) LATIN SMALL LETTER O WITH DOT BELOW +1ECF ; output # (ỏ) LATIN SMALL LETTER O WITH HOOK ABOVE +1ED1 ; output # (ố) LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE +1ED3 ; output # (ồ) LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE +1ED5 ; output # (ổ) LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE +1ED7 ; output # (ỗ) LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE +1ED9 ; output # (ộ) LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW +1EDB ; output # (ớ) LATIN SMALL LETTER O WITH HORN AND ACUTE +1EDD ; output # (ờ) LATIN SMALL LETTER O WITH HORN AND GRAVE +1EDF ; output # (ở) LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE +1EE1 ; output # (ỡ) LATIN SMALL LETTER O WITH HORN AND TILDE +1EE3 ; output # (ợ) LATIN SMALL LETTER O WITH HORN AND DOT BELOW +1EE5 ; output # (ụ) LATIN SMALL LETTER U WITH DOT BELOW +1EE7 ; output # (ủ) LATIN SMALL LETTER U WITH HOOK ABOVE +1EE9 ; output # (ứ) LATIN SMALL LETTER U WITH HORN AND ACUTE +1EEB ; output # (ừ) LATIN SMALL LETTER U WITH HORN AND GRAVE +1EED ; output # (ử) LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE +1EEF ; output # (ữ) LATIN SMALL LETTER U WITH HORN AND TILDE +1EF1 ; output # (ự) LATIN SMALL LETTER U WITH HORN AND DOT BELOW +1EF3 ; output # (ỳ) LATIN SMALL LETTER Y WITH GRAVE +1EF5 ; output # (ỵ) LATIN SMALL LETTER Y WITH DOT BELOW +1EF7 ; output # (ỷ) LATIN SMALL LETTER Y WITH HOOK ABOVE +1EF9 ; output # (ỹ) LATIN SMALL LETTER Y WITH TILDE +1F00..1F07 ; output # [8] (ἀ..ἇ) GREEK SMALL LETTER ALPHA WITH PSILI..GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI +1F10..1F15 ; output # [6] (ἐ..ἕ) GREEK SMALL LETTER EPSILON WITH PSILI..GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA +1F20..1F27 ; output # [8] (ἠ..ἧ) GREEK SMALL LETTER ETA WITH PSILI..GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI +1F30..1F37 ; output # [8] (ἰ..ἷ) GREEK SMALL LETTER IOTA WITH PSILI..GREEK SMALL LETTER IOTA WITH DASIA AND PERISPOMENI +1F40..1F45 ; output # [6] (ὀ..ὅ) GREEK SMALL LETTER OMICRON WITH PSILI..GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA +1F50..1F57 ; output # [8] (ὐ..ὗ) GREEK SMALL LETTER UPSILON WITH PSILI..GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI +1F60..1F67 ; output # [8] (ὠ..ὧ) GREEK SMALL LETTER OMEGA WITH PSILI..GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI +1F70 ; output # (ὰ) GREEK SMALL LETTER ALPHA WITH VARIA +1F72 ; output # (ὲ) GREEK SMALL LETTER EPSILON WITH VARIA +1F74 ; output # (ὴ) GREEK SMALL LETTER ETA WITH VARIA +1F76 ; output # (ὶ) GREEK SMALL LETTER IOTA WITH VARIA +1F78 ; output # (ὸ) GREEK SMALL LETTER OMICRON WITH VARIA +1F7A ; output # (ὺ) GREEK SMALL LETTER UPSILON WITH VARIA +1F7C ; output # (ὼ) GREEK SMALL LETTER OMEGA WITH VARIA +1FB0..1FB1 ; output # [2] (ᾰ..ᾱ) GREEK SMALL LETTER ALPHA WITH VRACHY..GREEK SMALL LETTER ALPHA WITH MACRON +1FB6 ; output # (ᾶ) GREEK SMALL LETTER ALPHA WITH PERISPOMENI +1FC6 ; output # (ῆ) GREEK SMALL LETTER ETA WITH PERISPOMENI +1FD0..1FD2 ; output # [3] (ῐ..ῒ) GREEK SMALL LETTER IOTA WITH VRACHY..GREEK SMALL LETTER IOTA WITH DIALYTIKA AND VARIA +1FD6..1FD7 ; output # [2] (ῖ..ῗ) GREEK SMALL LETTER IOTA WITH PERISPOMENI..GREEK SMALL LETTER IOTA WITH DIALYTIKA AND PERISPOMENI +1FE0..1FE2 ; output # [3] (ῠ..ῢ) GREEK SMALL LETTER UPSILON WITH VRACHY..GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND VARIA +1FE4..1FE7 ; output # [4] (ῤ..ῧ) GREEK SMALL LETTER RHO WITH PSILI..GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND PERISPOMENI +1FF6 ; output # (ῶ) GREEK SMALL LETTER OMEGA WITH PERISPOMENI +2132 ; output # (Ⅎ) TURNED CAPITAL F +3005..3007 ; output # [3] (々..〇) IDEOGRAPHIC ITERATION MARK..IDEOGRAPHIC NUMBER ZERO +3041..3096 ; output # [86] (ぁ..ゖ) HIRAGANA LETTER SMALL A..HIRAGANA LETTER SMALL KE +3099..309A ; output # [2] (゙..゚) COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK..COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK +309D..309E ; output # [2] (ゝ..ゞ) HIRAGANA ITERATION MARK..HIRAGANA VOICED ITERATION MARK +30A1..30FE ; output # [94] (ァ..ヾ) KATAKANA LETTER SMALL A..KATAKANA VOICED ITERATION MARK +3105..312C ; output # [40] (ㄅ..ㄬ) BOPOMOFO LETTER B..BOPOMOFO LETTER GN +31A0..31B7 ; output # [24] (ㆠ..ㆷ) BOPOMOFO LETTER BU..BOPOMOFO FINAL LETTER H +31F0..31FF ; output # [16] (ㇰ..ㇿ) KATAKANA LETTER SMALL KU..KATAKANA LETTER SMALL RO +3447 ; output # (㑇) CJK UNIFIED IDEOGRAPH-3447 +3473 ; output # (㑳) CJK UNIFIED IDEOGRAPH-3473 +34E4 ; output # (㓤) CJK UNIFIED IDEOGRAPH-34E4 +3577 ; output # (㕷) CJK UNIFIED IDEOGRAPH-3577 +359E ; output # (㖞) CJK UNIFIED IDEOGRAPH-359E +35A1 ; output # (㖡) CJK UNIFIED IDEOGRAPH-35A1 +35AD ; output # (㖭) CJK UNIFIED IDEOGRAPH-35AD +35BF ; output # (㖿) CJK UNIFIED IDEOGRAPH-35BF +35CE ; output # (㗎) CJK UNIFIED IDEOGRAPH-35CE +35F3 ; output # (㗳) CJK UNIFIED IDEOGRAPH-35F3 +35FE ; output # (㗾) CJK UNIFIED IDEOGRAPH-35FE +360E ; output # (㘎) CJK UNIFIED IDEOGRAPH-360E +361A ; output # (㘚) CJK UNIFIED IDEOGRAPH-361A +3918 ; output # (㤘) CJK UNIFIED IDEOGRAPH-3918 +3960 ; output # (㥠) CJK UNIFIED IDEOGRAPH-3960 +396E ; output # (㥮) CJK UNIFIED IDEOGRAPH-396E +39CF..39D0 ; output # [2] (㧏..㧐) CJK UNIFIED IDEOGRAPH-39CF..CJK UNIFIED IDEOGRAPH-39D0 +39DF ; output # (㧟) CJK UNIFIED IDEOGRAPH-39DF +39F8 ; output # (㧸) CJK UNIFIED IDEOGRAPH-39F8 +39FE ; output # (㧾) CJK UNIFIED IDEOGRAPH-39FE +3A18 ; output # (㨘) CJK UNIFIED IDEOGRAPH-3A18 +3A52 ; output # (㩒) CJK UNIFIED IDEOGRAPH-3A52 +3A67 ; output # (㩧) CJK UNIFIED IDEOGRAPH-3A67 +3A73 ; output # (㩳) CJK UNIFIED IDEOGRAPH-3A73 +3B39 ; output # (㬹) CJK UNIFIED IDEOGRAPH-3B39 +3B4E ; output # (㭎) CJK UNIFIED IDEOGRAPH-3B4E +3C6E ; output # (㱮) CJK UNIFIED IDEOGRAPH-3C6E +3CE0 ; output # (㳠) CJK UNIFIED IDEOGRAPH-3CE0 +3DE7 ; output # (㷧) CJK UNIFIED IDEOGRAPH-3DE7 +3DEB ; output # (㷫) CJK UNIFIED IDEOGRAPH-3DEB +3E74 ; output # (㹴) CJK UNIFIED IDEOGRAPH-3E74 +3ED0 ; output # (㻐) CJK UNIFIED IDEOGRAPH-3ED0 +4056 ; output # (䁖) CJK UNIFIED IDEOGRAPH-4056 +4065 ; output # (䁥) CJK UNIFIED IDEOGRAPH-4065 +406A ; output # (䁪) CJK UNIFIED IDEOGRAPH-406A +40BB ; output # (䂻) CJK UNIFIED IDEOGRAPH-40BB +40DF ; output # (䃟) CJK UNIFIED IDEOGRAPH-40DF +4137 ; output # (䄷) CJK UNIFIED IDEOGRAPH-4137 +415F ; output # (䅟) CJK UNIFIED IDEOGRAPH-415F +4337 ; output # (䌷) CJK UNIFIED IDEOGRAPH-4337 +43AC ; output # (䎬) CJK UNIFIED IDEOGRAPH-43AC +43B1 ; output # (䎱) CJK UNIFIED IDEOGRAPH-43B1 +43DD ; output # (䏝) CJK UNIFIED IDEOGRAPH-43DD +44D6 ; output # (䓖) CJK UNIFIED IDEOGRAPH-44D6 +44EA ; output # (䓪) CJK UNIFIED IDEOGRAPH-44EA +4606 ; output # (䘆) CJK UNIFIED IDEOGRAPH-4606 +464C ; output # (䙌) CJK UNIFIED IDEOGRAPH-464C +4661 ; output # (䙡) CJK UNIFIED IDEOGRAPH-4661 +4723 ; output # (䜣) CJK UNIFIED IDEOGRAPH-4723 +4729 ; output # (䜩) CJK UNIFIED IDEOGRAPH-4729 +477C ; output # (䝼) CJK UNIFIED IDEOGRAPH-477C +478D ; output # (䞍) CJK UNIFIED IDEOGRAPH-478D +47F4 ; output # (䟴) CJK UNIFIED IDEOGRAPH-47F4 +48B5 ; output # (䢵) CJK UNIFIED IDEOGRAPH-48B5 +48BC ; output # (䢼) CJK UNIFIED IDEOGRAPH-48BC +48C5 ; output # (䣅) CJK UNIFIED IDEOGRAPH-48C5 +48D3 ; output # (䣓) CJK UNIFIED IDEOGRAPH-48D3 +4947 ; output # (䥇) CJK UNIFIED IDEOGRAPH-4947 +497A ; output # (䥺) CJK UNIFIED IDEOGRAPH-497A +497D ; output # (䥽) CJK UNIFIED IDEOGRAPH-497D +4982..4983 ; output # [2] (䦂..䦃) CJK UNIFIED IDEOGRAPH-4982..CJK UNIFIED IDEOGRAPH-4983 +4985..4986 ; output # [2] (䦅..䦆) CJK UNIFIED IDEOGRAPH-4985..CJK UNIFIED IDEOGRAPH-4986 +499B ; output # (䦛) CJK UNIFIED IDEOGRAPH-499B +499F ; output # (䦟) CJK UNIFIED IDEOGRAPH-499F +49B6..49B7 ; output # [2] (䦶..䦷) CJK UNIFIED IDEOGRAPH-49B6..CJK UNIFIED IDEOGRAPH-49B7 +49D1 ; output # (䧑) CJK UNIFIED IDEOGRAPH-49D1 +4A12 ; output # (䨒) CJK UNIFIED IDEOGRAPH-4A12 +4AB8 ; output # (䪸) CJK UNIFIED IDEOGRAPH-4AB8 +4C77 ; output # (䱷) CJK UNIFIED IDEOGRAPH-4C77 +4C7D ; output # (䱽) CJK UNIFIED IDEOGRAPH-4C7D +4C81 ; output # (䲁) CJK UNIFIED IDEOGRAPH-4C81 +4C85 ; output # (䲅) CJK UNIFIED IDEOGRAPH-4C85 +4C9F..4CA3 ; output # [5] (䲟..䲣) CJK UNIFIED IDEOGRAPH-4C9F..CJK UNIFIED IDEOGRAPH-4CA3 +4CB3 ; output # (䲳) CJK UNIFIED IDEOGRAPH-4CB3 +4D08 ; output # (䴈) CJK UNIFIED IDEOGRAPH-4D08 +4D13..4D19 ; output # [7] (䴓..䴙) CJK UNIFIED IDEOGRAPH-4D13..CJK UNIFIED IDEOGRAPH-4D19 +4DAE ; output # (䶮) CJK UNIFIED IDEOGRAPH-4DAE +4E00..9FA5 ; output # [20902] (一..龥) CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FA5 +A000..A48C ; output # [1165] (ꀀ..ꒌ) YI SYLLABLE IT..YI SYLLABLE YYR +AC00..D7A3 ; output # [11172] (가..힣) HANGUL SYLLABLE GA..HANGUL SYLLABLE HIH +FA0E..FA0F ; output # [2] (﨎..﨏) CJK COMPATIBILITY IDEOGRAPH-FA0E..CJK COMPATIBILITY IDEOGRAPH-FA0F +FA11 ; output # (﨑) CJK COMPATIBILITY IDEOGRAPH-FA11 +FA13..FA14 ; output # [2] (﨓..﨔) CJK COMPATIBILITY IDEOGRAPH-FA13..CJK COMPATIBILITY IDEOGRAPH-FA14 +FA1F ; output # (﨟) CJK COMPATIBILITY IDEOGRAPH-FA1F +FA21 ; output # (﨡) CJK COMPATIBILITY IDEOGRAPH-FA21 +FA23..FA24 ; output # [2] (﨣..﨤) CJK COMPATIBILITY IDEOGRAPH-FA23..CJK COMPATIBILITY IDEOGRAPH-FA24 +FA27..FA29 ; output # [3] (﨧..﨩) CJK COMPATIBILITY IDEOGRAPH-FA27..CJK COMPATIBILITY IDEOGRAPH-FA29 +2070E ; output # (𠜎) CJK UNIFIED IDEOGRAPH-2070E +20731 ; output # (𠜱) CJK UNIFIED IDEOGRAPH-20731 +20779 ; output # (𠝹) CJK UNIFIED IDEOGRAPH-20779 +20C53 ; output # (𠱓) CJK UNIFIED IDEOGRAPH-20C53 +20C78 ; output # (𠱸) CJK UNIFIED IDEOGRAPH-20C78 +20C96 ; output # (𠲖) CJK UNIFIED IDEOGRAPH-20C96 +20CCF ; output # (𠳏) CJK UNIFIED IDEOGRAPH-20CCF +20CD5 ; output # (𠳕) CJK UNIFIED IDEOGRAPH-20CD5 +20D15 ; output # (𠴕) CJK UNIFIED IDEOGRAPH-20D15 +20D7C ; output # (𠵼) CJK UNIFIED IDEOGRAPH-20D7C +20D7F ; output # (𠵿) CJK UNIFIED IDEOGRAPH-20D7F +20E0E..20E0F ; output # [2] (𠸎..𠸏) CJK UNIFIED IDEOGRAPH-20E0E..CJK UNIFIED IDEOGRAPH-20E0F +20E77 ; output # (𠹷) CJK UNIFIED IDEOGRAPH-20E77 +20E9D ; output # (𠺝) CJK UNIFIED IDEOGRAPH-20E9D +20EA2 ; output # (𠺢) CJK UNIFIED IDEOGRAPH-20EA2 +20ED7 ; output # (𠻗) CJK UNIFIED IDEOGRAPH-20ED7 +20EF9..20EFA ; output # [2] (𠻹..𠻺) CJK UNIFIED IDEOGRAPH-20EF9..CJK UNIFIED IDEOGRAPH-20EFA +20F2D..20F2E ; output # [2] (𠼭..𠼮) CJK UNIFIED IDEOGRAPH-20F2D..CJK UNIFIED IDEOGRAPH-20F2E +20F4C ; output # (𠽌) CJK UNIFIED IDEOGRAPH-20F4C +20FB4 ; output # (𠾴) CJK UNIFIED IDEOGRAPH-20FB4 +20FBC ; output # (𠾼) CJK UNIFIED IDEOGRAPH-20FBC +20FEA ; output # (𠿪) CJK UNIFIED IDEOGRAPH-20FEA +2105C ; output # (𡁜) CJK UNIFIED IDEOGRAPH-2105C +2106F ; output # (𡁯) CJK UNIFIED IDEOGRAPH-2106F +21075..21076 ; output # [2] (𡁵..𡁶) CJK UNIFIED IDEOGRAPH-21075..CJK UNIFIED IDEOGRAPH-21076 +2107B ; output # (𡁻) CJK UNIFIED IDEOGRAPH-2107B +210C1 ; output # (𡃁) CJK UNIFIED IDEOGRAPH-210C1 +210C9 ; output # (𡃉) CJK UNIFIED IDEOGRAPH-210C9 +211D9 ; output # (𡇙) CJK UNIFIED IDEOGRAPH-211D9 +220C7 ; output # (𢃇) CJK UNIFIED IDEOGRAPH-220C7 +227B5 ; output # (𢞵) CJK UNIFIED IDEOGRAPH-227B5 +22AD5 ; output # (𢫕) CJK UNIFIED IDEOGRAPH-22AD5 +22B43 ; output # (𢭃) CJK UNIFIED IDEOGRAPH-22B43 +22BCA ; output # (𢯊) CJK UNIFIED IDEOGRAPH-22BCA +22C51 ; output # (𢱑) CJK UNIFIED IDEOGRAPH-22C51 +22C55 ; output # (𢱕) CJK UNIFIED IDEOGRAPH-22C55 +22CC2 ; output # (𢳂) CJK UNIFIED IDEOGRAPH-22CC2 +22D08 ; output # (𢴈) CJK UNIFIED IDEOGRAPH-22D08 +22D4C ; output # (𢵌) CJK UNIFIED IDEOGRAPH-22D4C +22D67 ; output # (𢵧) CJK UNIFIED IDEOGRAPH-22D67 +22EB3 ; output # (𢺳) CJK UNIFIED IDEOGRAPH-22EB3 +23CB7 ; output # (𣲷) CJK UNIFIED IDEOGRAPH-23CB7 +244D3 ; output # (𤓓) CJK UNIFIED IDEOGRAPH-244D3 +24DB8 ; output # (𤶸) CJK UNIFIED IDEOGRAPH-24DB8 +24DEA ; output # (𤷪) CJK UNIFIED IDEOGRAPH-24DEA +2512B ; output # (𥄫) CJK UNIFIED IDEOGRAPH-2512B +26258 ; output # (𦉘) CJK UNIFIED IDEOGRAPH-26258 +267CC ; output # (𦟌) CJK UNIFIED IDEOGRAPH-267CC +269F2 ; output # (𦧲) CJK UNIFIED IDEOGRAPH-269F2 +269FA ; output # (𦧺) CJK UNIFIED IDEOGRAPH-269FA +27A3E ; output # (𧨾) CJK UNIFIED IDEOGRAPH-27A3E +2815D ; output # (𨅝) CJK UNIFIED IDEOGRAPH-2815D +28207 ; output # (𨈇) CJK UNIFIED IDEOGRAPH-28207 +282E2 ; output # (𨋢) CJK UNIFIED IDEOGRAPH-282E2 +28CCA ; output # (𨳊) CJK UNIFIED IDEOGRAPH-28CCA +28CCD ; output # (𨳍) CJK UNIFIED IDEOGRAPH-28CCD +28CD2 ; output # (𨳒) CJK UNIFIED IDEOGRAPH-28CD2 +29D98 ; output # (𩶘) CJK UNIFIED IDEOGRAPH-29D98 + +# Total code points: 37201 + +# Not allowed at start of identifier + +0300..033F ; nonstarting # [64] (̀..̿) COMBINING GRAVE ACCENT..COMBINING DOUBLE OVERLINE +0342 ; nonstarting # (͂) COMBINING GREEK PERISPOMENI +0345..034E ; nonstarting # [10] (ͅ..͎) COMBINING GREEK YPOGEGRAMMENI..COMBINING UPWARDS ARROW BELOW +0360..036F ; nonstarting # [16] (͠..ͯ) COMBINING DOUBLE TILDE..COMBINING LATIN SMALL LETTER X +0591..05A1 ; nonstarting # [17] (֑..֡) HEBREW ACCENT ETNAHTA..HEBREW ACCENT PAZER +05A3..05B9 ; nonstarting # [23] (֣..ֹ) HEBREW ACCENT MUNAH..HEBREW POINT HOLAM +05BB..05BD ; nonstarting # [3] (ֻ..ֽ) HEBREW POINT QUBUTS..HEBREW POINT METEG +05BF ; nonstarting # (ֿ) HEBREW POINT RAFE +05C1..05C2 ; nonstarting # [2] (ׁ..ׂ) HEBREW POINT SHIN DOT..HEBREW POINT SIN DOT +05C4 ; nonstarting # (ׄ) HEBREW MARK UPPER DOT +064B..0655 ; nonstarting # [11] (ً..ٕ) ARABIC FATHATAN..ARABIC HAMZA BELOW +0670 ; nonstarting # (ٰ) ARABIC LETTER SUPERSCRIPT ALEF +06D6..06DC ; nonstarting # [7] (ۖ..ۜ) ARABIC SMALL HIGH LIGATURE SAD WITH LAM WITH ALEF MAKSURA..ARABIC SMALL HIGH SEEN +06DF..06E4 ; nonstarting # [6] (۟..ۤ) ARABIC SMALL HIGH ROUNDED ZERO..ARABIC SMALL HIGH MADDA +06E7..06E8 ; nonstarting # [2] (ۧ..ۨ) ARABIC SMALL HIGH YEH..ARABIC SMALL HIGH NOON +06EA..06ED ; nonstarting # [4] (۪..ۭ) ARABIC EMPTY CENTRE LOW STOP..ARABIC SMALL LOW MEEM +0711 ; nonstarting # (ܑ) SYRIAC LETTER SUPERSCRIPT ALAPH +0730..073F ; nonstarting # [16] (ܰ..ܿ) SYRIAC PTHAHA ABOVE..SYRIAC RWAHA +07A6..07B0 ; nonstarting # [11] (ަ..ް) THAANA ABAFILI..THAANA SUKUN +0901..0903 ; nonstarting # [3] (ँ..ः) DEVANAGARI SIGN CANDRABINDU..DEVANAGARI SIGN VISARGA +093C ; nonstarting # (़) DEVANAGARI SIGN NUKTA +093E..094D ; nonstarting # [16] (ा..्) DEVANAGARI VOWEL SIGN AA..DEVANAGARI SIGN VIRAMA +0951..0954 ; nonstarting # [4] (॑..॔) DEVANAGARI STRESS SIGN UDATTA..DEVANAGARI ACUTE ACCENT +0962..0963 ; nonstarting # [2] (ॢ..ॣ) DEVANAGARI VOWEL SIGN VOCALIC L..DEVANAGARI VOWEL SIGN VOCALIC LL +0981..0983 ; nonstarting # [3] (ঁ..ঃ) BENGALI SIGN CANDRABINDU..BENGALI SIGN VISARGA +09BC ; nonstarting # (়) BENGALI SIGN NUKTA +09BE..09C4 ; nonstarting # [7] (া..ৄ) BENGALI VOWEL SIGN AA..BENGALI VOWEL SIGN VOCALIC RR +09C7..09C8 ; nonstarting # [2] (ে..ৈ) BENGALI VOWEL SIGN E..BENGALI VOWEL SIGN AI +09CB..09CD ; nonstarting # [3] (ো..্) BENGALI VOWEL SIGN O..BENGALI SIGN VIRAMA +09D7 ; nonstarting # (ৗ) BENGALI AU LENGTH MARK +09E2..09E3 ; nonstarting # [2] (ৢ..ৣ) BENGALI VOWEL SIGN VOCALIC L..BENGALI VOWEL SIGN VOCALIC LL +0A02 ; nonstarting # (ਂ) GURMUKHI SIGN BINDI +0A3C ; nonstarting # (਼) GURMUKHI SIGN NUKTA +0A3E..0A42 ; nonstarting # [5] (ਾ..ੂ) GURMUKHI VOWEL SIGN AA..GURMUKHI VOWEL SIGN UU +0A47..0A48 ; nonstarting # [2] (ੇ..ੈ) GURMUKHI VOWEL SIGN EE..GURMUKHI VOWEL SIGN AI +0A4B..0A4D ; nonstarting # [3] (ੋ..੍) GURMUKHI VOWEL SIGN OO..GURMUKHI SIGN VIRAMA +0A70..0A71 ; nonstarting # [2] (ੰ..ੱ) GURMUKHI TIPPI..GURMUKHI ADDAK +0A81..0A83 ; nonstarting # [3] (ઁ..ઃ) GUJARATI SIGN CANDRABINDU..GUJARATI SIGN VISARGA +0ABC ; nonstarting # (઼) GUJARATI SIGN NUKTA +0ABE..0AC5 ; nonstarting # [8] (ા..ૅ) GUJARATI VOWEL SIGN AA..GUJARATI VOWEL SIGN CANDRA E +0AC7..0AC9 ; nonstarting # [3] (ે..ૉ) GUJARATI VOWEL SIGN E..GUJARATI VOWEL SIGN CANDRA O +0ACB..0ACD ; nonstarting # [3] (ો..્) GUJARATI VOWEL SIGN O..GUJARATI SIGN VIRAMA +0B01..0B03 ; nonstarting # [3] (ଁ..ଃ) ORIYA SIGN CANDRABINDU..ORIYA SIGN VISARGA +0B3C ; nonstarting # (଼) ORIYA SIGN NUKTA +0B3E..0B43 ; nonstarting # [6] (ା..ୃ) ORIYA VOWEL SIGN AA..ORIYA VOWEL SIGN VOCALIC R +0B47..0B48 ; nonstarting # [2] (େ..ୈ) ORIYA VOWEL SIGN E..ORIYA VOWEL SIGN AI +0B4B..0B4D ; nonstarting # [3] (ୋ..୍) ORIYA VOWEL SIGN O..ORIYA SIGN VIRAMA +0B56..0B57 ; nonstarting # [2] (ୖ..ୗ) ORIYA AI LENGTH MARK..ORIYA AU LENGTH MARK +0B82 ; nonstarting # (ஂ) TAMIL SIGN ANUSVARA +0BBE..0BC2 ; nonstarting # [5] (ா..ூ) TAMIL VOWEL SIGN AA..TAMIL VOWEL SIGN UU +0BC6..0BC8 ; nonstarting # [3] (ெ..ை) TAMIL VOWEL SIGN E..TAMIL VOWEL SIGN AI +0BCA..0BCD ; nonstarting # [4] (ொ..்) TAMIL VOWEL SIGN O..TAMIL SIGN VIRAMA +0BD7 ; nonstarting # (ௗ) TAMIL AU LENGTH MARK +0C01..0C03 ; nonstarting # [3] (ఁ..ః) TELUGU SIGN CANDRABINDU..TELUGU SIGN VISARGA +0C3E..0C44 ; nonstarting # [7] (ా..ౄ) TELUGU VOWEL SIGN AA..TELUGU VOWEL SIGN VOCALIC RR +0C46..0C48 ; nonstarting # [3] (ె..ై) TELUGU VOWEL SIGN E..TELUGU VOWEL SIGN AI +0C4A..0C4D ; nonstarting # [4] (ొ..్) TELUGU VOWEL SIGN O..TELUGU SIGN VIRAMA +0C55..0C56 ; nonstarting # [2] (ౕ..ౖ) TELUGU LENGTH MARK..TELUGU AI LENGTH MARK +0C82..0C83 ; nonstarting # [2] (ಂ..ಃ) KANNADA SIGN ANUSVARA..KANNADA SIGN VISARGA +0CBE..0CC4 ; nonstarting # [7] (ಾ..ೄ) KANNADA VOWEL SIGN AA..KANNADA VOWEL SIGN VOCALIC RR +0CC6..0CC8 ; nonstarting # [3] (ೆ..ೈ) KANNADA VOWEL SIGN E..KANNADA VOWEL SIGN AI +0CCA..0CCD ; nonstarting # [4] (ೊ..್) KANNADA VOWEL SIGN O..KANNADA SIGN VIRAMA +0CD5..0CD6 ; nonstarting # [2] (ೕ..ೖ) KANNADA LENGTH MARK..KANNADA AI LENGTH MARK +0D02..0D03 ; nonstarting # [2] (ം..ഃ) MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA +0D3E..0D43 ; nonstarting # [6] (ാ..ൃ) MALAYALAM VOWEL SIGN AA..MALAYALAM VOWEL SIGN VOCALIC R +0D46..0D48 ; nonstarting # [3] (െ..ൈ) MALAYALAM VOWEL SIGN E..MALAYALAM VOWEL SIGN AI +0D4A..0D4D ; nonstarting # [4] (ൊ..്) MALAYALAM VOWEL SIGN O..MALAYALAM SIGN VIRAMA +0D57 ; nonstarting # (ൗ) MALAYALAM AU LENGTH MARK +0D82..0D83 ; nonstarting # [2] (ං..ඃ) SINHALA SIGN ANUSVARAYA..SINHALA SIGN VISARGAYA +0DCA ; nonstarting # (්) SINHALA SIGN AL-LAKUNA +0DCF..0DD4 ; nonstarting # [6] (ා..ු) SINHALA VOWEL SIGN AELA-PILLA..SINHALA VOWEL SIGN KETTI PAA-PILLA +0DD6 ; nonstarting # (ූ) SINHALA VOWEL SIGN DIGA PAA-PILLA +0DD8..0DDF ; nonstarting # [8] (ෘ..ෟ) SINHALA VOWEL SIGN GAETTA-PILLA..SINHALA VOWEL SIGN GAYANUKITTA +0DF2..0DF3 ; nonstarting # [2] (ෲ..ෳ) SINHALA VOWEL SIGN DIGA GAETTA-PILLA..SINHALA VOWEL SIGN DIGA GAYANUKITTA +0E31 ; nonstarting # (ั) THAI CHARACTER MAI HAN-AKAT +0E34..0E3A ; nonstarting # [7] (ิ..ฺ) THAI CHARACTER SARA I..THAI CHARACTER PHINTHU +0E47..0E4E ; nonstarting # [8] (็..๎) THAI CHARACTER MAITAIKHU..THAI CHARACTER YAMAKKAN +0EB1 ; nonstarting # (ັ) LAO VOWEL SIGN MAI KAN +0EB4..0EB9 ; nonstarting # [6] (ິ..ູ) LAO VOWEL SIGN I..LAO VOWEL SIGN UU +0EBB..0EBC ; nonstarting # [2] (ົ..ຼ) LAO VOWEL SIGN MAI KON..LAO SEMIVOWEL SIGN LO +0EC8..0ECD ; nonstarting # [6] (່..ໍ) LAO TONE MAI EK..LAO NIGGAHITA +0F18..0F19 ; nonstarting # [2] (༘..༙) TIBETAN ASTROLOGICAL SIGN -KHYUD PA..TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS +0F35 ; nonstarting # (༵) TIBETAN MARK NGAS BZUNG NYI ZLA +0F37 ; nonstarting # (༷) TIBETAN MARK NGAS BZUNG SGOR RTAGS +0F39 ; nonstarting # (༹) TIBETAN MARK TSA -PHRU +0F3E..0F3F ; nonstarting # [2] (༾..༿) TIBETAN SIGN YAR TSHES..TIBETAN SIGN MAR TSHES +0F71..0F72 ; nonstarting # [2] (ཱ..ི) TIBETAN VOWEL SIGN AA..TIBETAN VOWEL SIGN I +0F74 ; nonstarting # (ུ) TIBETAN VOWEL SIGN U +0F76 ; nonstarting # (ྲྀ) TIBETAN VOWEL SIGN VOCALIC R +0F78 ; nonstarting # (ླྀ) TIBETAN VOWEL SIGN VOCALIC L +0F7A..0F80 ; nonstarting # [7] (ེ..ྀ) TIBETAN VOWEL SIGN E..TIBETAN VOWEL SIGN REVERSED I +0F82..0F84 ; nonstarting # [3] (ྂ..྄) TIBETAN SIGN NYI ZLA NAA DA..TIBETAN MARK HALANTA +0F86..0F87 ; nonstarting # [2] (྆..྇) TIBETAN SIGN LCI RTAGS..TIBETAN SIGN YANG RTAGS +0F90..0F97 ; nonstarting # [8] (ྐ..ྗ) TIBETAN SUBJOINED LETTER KA..TIBETAN SUBJOINED LETTER JA +0F99..0FBC ; nonstarting # [36] (ྙ..ྼ) TIBETAN SUBJOINED LETTER NYA..TIBETAN SUBJOINED LETTER FIXED-FORM RA +0FC6 ; nonstarting # (࿆) TIBETAN SYMBOL PADMA GDAN +102C..1032 ; nonstarting # [7] (ာ..ဲ) MYANMAR VOWEL SIGN AA..MYANMAR VOWEL SIGN AI +1036..1039 ; nonstarting # [4] (ံ..္) MYANMAR SIGN ANUSVARA..MYANMAR SIGN VIRAMA +1056..1059 ; nonstarting # [4] (ၖ..ၙ) MYANMAR VOWEL SIGN VOCALIC R..MYANMAR VOWEL SIGN VOCALIC LL +17B6..17D0 ; nonstarting # [27] (ា..័) KHMER VOWEL SIGN AA..KHMER SIGN SAMYOK SANNYA +17D2 ; nonstarting # (្) KHMER SIGN COENG +18A9 ; nonstarting # (ᢩ) MONGOLIAN LETTER ALI GALI DAGALGA +3099..309A ; nonstarting # [2] (゙..゚) COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK..COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK + +# Total code points: 524 diff --git a/emacs.d/nxhtml/etc/viper-tut/0intro b/emacs.d/nxhtml/etc/viper-tut/0intro new file mode 100644 index 0000000..3a37e33 --- /dev/null +++ b/emacs.d/nxhtml/etc/viper-tut/0intro @@ -0,0 +1,59 @@ +Viper tutorial #0: Introduction + +This Viper tutorial is based on the vi tutorial VILEARN. Some things +works differently in Emacs and corresponding parts of the tutorial has +been changed for this. There has also been added some basic +information about Emacs that are useful to get started if you already +are a vi user. + +This tutorial is a hands-on-tutorial for Viper. If you want more +information about Viper, please read the VIPER-MANUAL. + +Note that if you are using Viper you probably still want to know quite +a bit about Emacs to use Emacs efficiently. Therefore you can also +run the Emacs tutorial from here - with special support for +Viper. This is part 6 below. You should run this part also to get to +know which Emacs standard key bindings are shadowed by Viper. + +The tutorial consists of these parts: + + 0 Introduction + (this file) + + 1 Basic Editing + Covers the handful of commands required to both navigate all + five tutorials and do basic editing. + + 2 Moving Efficiently + Covers all of the cursor positioning commands. These are the + commands used later as arguments to editing commands. + + 3 Cutting and Pasting + Introduces the first compound commands, numbering, and copy + buffers. + + 4 Inserting Techniques + Continues the discussion of compound commands, while completing + the list of insertion commands first discussed in tutorial one. + + 5 Tricks and Timesavers + This is less a tutorial than a description of common vi commands + which don't fit correctly into normal logic. + + 6 Emacs Tutorial for Viper Users + Even Viper users use a lot of keys from Emacs. Therefore you can + run the Emacs tutorial here too. It will show you which keys in + the tutorial that are changed because you are using Viper. This + depends of which Viper state you are in, vi state or some insert + state. If you switch Viper state the tutorial will immediately + show which keys are affected. + + +BUGS +Vilearn has the remark that it "Still doesn't cover variables, ex +commands, or tags. At least one more tutorial is necessary for a +complete introduction to vi." - I do not think you have to learn those +parts to use Viper. There are other ways to do these things in Emacs! + +For more information about vilearn see the the README-FILE. + diff --git a/emacs.d/nxhtml/etc/viper-tut/1basics b/emacs.d/nxhtml/etc/viper-tut/1basics new file mode 100644 index 0000000..aea1fc5 --- /dev/null +++ b/emacs.d/nxhtml/etc/viper-tut/1basics @@ -0,0 +1,187 @@ +Viper tutorial #1: The Basics + +This lesson lasts 10-15 minutes and teaches simple editing. Lines +which begin with >>> mark exercises you should try. When you +want to exit this tutorial type 'Z''Z' (type capital Z, twice). + +When you type commands in vi they do not appear on the screen. If the +letters you type unexpectedly appear on the screen, press the ESC key. + + +BASIC CURSOR MOVEMENT +--------------------- +To move through the tutorial use C-d (control d) and C-u (control u). + + C-d Move DOWN one half-screen + (depress the control key and type d) + + C-u Move UP one half-screen + (depress the control key and type u) + +* EMACS-NOTICE: C-u is normally used in Emacs for UNIVERSAL-ARGUMENT. + You can in most cases use DIGIT-ARGUMENT instead. + +>>> Now type C-d (control d) and C-u (control u) to move down and back up. + +When you are done reading a screen, you are expected to type C-d to move +down to the next screen. You must remember to type C-d throughout the +tutorial. + +To move the cursor line by line, or character by character, use the +four keys 'h', 'j', 'k', and 'l'. + + 'h' Move left one character + 'j' Move down one line + 'k' Move up one line + 'l' Move right one character + +You will notice that these keys are in a straight line on the +keyboard. Study the diagram below showing the function of h, j, k, l. + + UP + ....... ....... ....... ....... + : : : : : : : : + LEFT : h : : j : : k : : l : RIGHT + :.....: :.....: :.....: :.....: + + DOWN + +>>> Now type 'j' or 'k' a few times to bring the cursor to this line. + +>>> Try moving off the right end of a line using 'l' . Notice that +>>> vi will not allow you to move off the end of the line using 'l' . +>>> Likewise, you cannot use 'h' and 'l' on a blank line. + +>>> Try moving past the bottom of the screen using 'j' . Notice how +>>> how the screen scrolls downward. + +>>> Now practice using 'k' to move up, and 'h' to move left. + + +DELETION +-------- +To delete characters and lines, use 'x' and 'd''d'. + + 'x' X-OUT one character + 'd''d' DELETE one line + +To undo your changes, use 'u'. + + 'u' UNDO last change only + +>>> Delete this SCRAP line. Move to this line with 'j' or 'k' , now type 'd''d' . +>>> Try undoing the deletion with 'u' . + +>>> Move to this line and x-out the Y's with 'x' : "whY ask whY?" + +>>> Try undoing the deletion with 'u' . Try typing 'u' several times. +>>> Notice that 'u' only undoes the last change. + +* EMACS-NOTICE: In Viper you can use the repeat command '.' (just a dot) + to undo more changes. This goes in both direction, ie undoing and + redoing. Typing just 'u' changes direction. + +Here are more lines on which to practice deleting and undoing (use: 'd''d' 'x' 'u' ) + + Emacs is a nice creation. Emacs is a nice creation. + Emacs is a nice creation. Emacs is a nice creation. + Emacs is a nice creation. Emacs is a nice creation. + + +QUIT COMMANDS +------------- +(DO NOT QUIT the tutorial at this time.) + +To quit a file without saving any changes you have made (for instance, +with the 'd''d' or 'x' commands) use :q! . To quit and save your +changes, use 'Z''Z' . When you are editing your own files, you normally +use 'Z''Z' to quit. + + :q! QUIT without saving changes + (type a colon, then the letter q, then an + exclamation point, and press RETURN) + + 'Z''Z' Exit and save any changes + (type capital Z, twice) + + + +INSERTION +--------- +You enter insert mode with 'i' or 'o' . Anything you type during insert +mode appears on the screen. When you are done inserting, press ESC +to exit insert mode. Type C-[ (control [ ), if you do not have an ESC key. + + 'o' OPEN a line for inserting text + 'i' INSERT starting at the cursor + + ESC ESCAPE from insert mode + +During insert mode, use your erase character (usually backspace or +delete) to delete mistakes. The characters you delete will remain on +the screen until you press ESC. + +>>> Insert your name and phone number below the next blank line. To do this: +>>> Open a line below using 'o' . +>>> Type your first and last name. Press RETURN. +>>> Then type your phone number and press ESC. +>>> Use 'x' to erase part of your phone number. + +>>> Type the date below your phone number. To do this: +>>> Open another line using 'o' . +>>> Type the date and press ESC. + +>>> Type 'u' to undo the insertion. + +>>> Insert a nickname between your first and last names, using 'i'. To do this: +>>> Move the cursor to the spot between your names using 'h', 'j', 'k', 'l'. +>>> Press 'i' . +>>> Type the nickname, use DELETE or BACKSPACE to erase any typos. +>>> Then press ESC. + +On some computers, a line may be longer than the width of the screen. +This means that a very long line may appear to be two lines on the +screen. This happens when you keep typing without pressing RETURN at +the edge of the screen. To avoid any confusion when you're inserting +text, be sure to press RETURN before reaching the right edge of the +screen. + + +SUMMARY +------- +These are the vi commands you should know after tutorial #1: + + C-d Move DOWN one half-screen + (depress the control key and type d) + + C-u Move UP one half-screen + (depress the control key and type u) + + 'h' Move left one character + 'j' Move down one line + 'k' Move up one line + 'l' Move right one character + + 'd''d' DELETE one line + 'x' X-OUT one character + + 'u' UNDO last change + + :q! QUIT without saving changes + (type a colon, then the letter q, then an + exclamation point, and press RETURN) + + 'Z''Z' Exit and save any changes + (type capital Z, twice) + + 'o' OPEN a line for inserting text + 'i' INSERT starting at the cursor + + ESC ESCAPE from insert mode + + +You are now prepared to do simple editing on your own files. Practice +using vi for a few days. Then take the second vi tutorial to learn +more powerful and useful vi commands. + +Copyright (c) 1992 Jill Kliger and Wesley Craig. All Rights Reserved. diff --git a/emacs.d/nxhtml/etc/viper-tut/2moving b/emacs.d/nxhtml/etc/viper-tut/2moving new file mode 100644 index 0000000..8e4148e --- /dev/null +++ b/emacs.d/nxhtml/etc/viper-tut/2moving @@ -0,0 +1,269 @@ +Viper tutorial #2: Moving Through Files Efficiently + +This lesson lasts 15-20 minutes. The material taught here is used in +tutorial #3: Cutting and Pasting. Lines which begin with >>> mark +exercises you should try. When you want to exit this tutorial type 'Z''Z'. + + +WORDS +----- +There are many ways to move from one word to another. Consider these: + + 'w' Move to the beginning of the next WORD + 'e' Move to the END of the next word + 'b' Move BACK to the beginning to the previous word + +For 'w', 'e', and 'b', a word is delimited by any non-alphanumeric +character. The capitalized versions, 'W', 'E', and 'B', also move from word +to word. The difference is that for 'W', 'E', and 'B', a word is delimited +by any blank space. + +>>> Try out 'w', 'b', 'e', on the lines provided below. +>>> Next practice using 'B', 'W', 'b', 'E' on the lines provided below. + + EX-PER-IMENT on these lines;test moving back &forth. + EX-PER-IMENT on these lines;test moving back &forth. + + +ON THE LINE +----------- +You can move immediately to any point on the current line. + + '$' Move to the end of the line + '^' Move to the first non-white character on the line + + '0' Move to the first column on the line (column zero) + #'|' Move to an exact column on the line (column #) e.g. 5| 12| + +>>> Experiment with '$' and '^' on the line provided below. Notice +>>> that '^' moves to the first non-white character, not the beginning. + + This is a PRACTICE LINE. There is white space at the front. END + +'0' (zero) will always take you to the far left edge of the screen. + +#'|' (number vertical-bar) is for moving to an explicit column on a line. +Just type any number 1-80 and press | . For example: 5| 20| 30| +Note that you can't move beyond the last column on a line. + + +FINDING CHARACTERS +------------------ +Often you want to move to a specific letter or character on a line. + + 'f' char FIND the next occurrence of char on the line + 't' char Move 'TIL the next occurrence of char on the line + + 'F' char FIND the previous occurrence of char on the line + 'T' char Move 'TIL the previous occurrence of char on the line + + ';' Repeat the last f, t, F, or T + ',' Reverse the last f, t, F, or T + +'f' and 'F' land on the character. 't' and 'T' land next to the character. +'f' and 't' move forward, while 'F' and 'T' move backward. + +If the specified character is not on the line, vi will beep. + +>>> Move to the beginning of the line below, and try out these commands: +>>> 'f'e 'f'E ';' ';' ',' ',' 't'@ 'T'P 't'e 't'E ',' ';' ',' ';' + + "PRACTICE line?" "Each and Every?" "Find thE char@cter and move to it.END + + +MATCHING +-------- +vi has a handy way to determine if (), {}, and [] pairs match up. + + '%' Move to matching () or {} or [] + +>>> On the practice lines below, move your cursor over a (,),{,},[, or ]. +>>> Then type '%' . + + [TRY THIS. ((Whether) the pairs match up is the question.) [One] + pair is incomplete]. Can you tell {which one? ]} END + + +WINDOW POSITIONS +---------------- +You can move the cursor to the top, middle, or bottom of the vi window. + + 'H' Move to the HIGHEST position in the window + 'M' Move to the MIDDLE position in the window + 'L' Move to the LOWEST position in the window + +>>> Try out these commands: type H then M and L and then M again. + + +MARKING LOCATIONS +----------------- +You can mark positions in the file and return to them. + + 'm' char MARK this location and name it char + ''' char (quote character) return to line named char + '''''' (quote quote) return from last movement + +char can be any lower case letter, a-z. A mark persists until you: + 1) use the same char to mark another location + or 2) delete the marked line + +>>> Move to this line and type ma to mark it a +>>> Move to this line and type mb to mark it b +>>> Move to this line and type mz to mark it z +>>> Type 'a to return to line a +>>> Type 'b to return to line b +>>> Type 'z to return to line z + +Certain commands can move you large distances. These commands cause +your last position to be remembered in the special mark named ' (quote). +To move to this special mark, just type '' (quote quote). + +>>> Try this: 'b to return to line b, and then '' to return here. + + +GO TO A LINE +------------ + + 'G' GO to the last line in the file + #'G' GO to line #. (e.g., 3G , 5G , 124G ) + +Read these directions carefully: +>>> Type '1''G' to go to the top of the file, and then '''''' (quote quote) +>>> to return here. +>>> Now try 'G' to go to the end of the file, and then '''''' to return here. + + +BLOCKS OF TEXT +-------------- +It is often convenient to move through files jumping from one block of +text to the next. To do this use braces and parentheses: + + '{' (left brace) Move to the beginning of a paragraph + '}' (right brace) Move to the end of a paragraph + + '(' (left paren) Move to the beginning of a sentence + ')' (right paren) Move to the beginning of the next sentence + +>>> Experiment with '}' and '{' on the two paragraphs provided below. +>>> Note that paragraphs are separated by a blank line. + + EXPERIMENT on this first paragraph. The quick brown fox jumped + over the seven lazy dogs. The fox must have been very large to + jump over seven dogs! + + EXPERIMENT on this second paragraph. The quick brown dog + jumped over the seven lazy foxes. The dog didn't have to be nearly + as large, since foxes aren't too big. + +>>> Try out ')' and '(' on the two paragraphs provided above. +>>> Notice that sentences are separated by two blank spaces. + +C programmers find it useful to move by sections, since sections may be +delimited by a left brace in the first column. By placing the opening +brace of a C subroutine in the first column, you can move to the top of +the next subroutine, using '[''[' and ']'']' . + + '[''[' Move to the beginning of a section + ']'']' Move to the end of a section + +Note that if vi does not find a left brace at the far left, it will +move to the top or bottom of the file. + +>>> Now try ']'']' then ']'']' and '[''[' on the subroutines provided below: + +main() +{ + helloworld(); +} + +helloworld() +{ + printf( "Hello world\n" ); +} + + +SEARCHING +--------- +This enables you to jump to the next occurrence of a string in a file. +To initially find the string use: + + '/'string Find string looking forward + '?'string Find string looking backward + +To find additional occurrences of the string type: + + 'n' Repeat last / or ? command + 'N' Reverse last / or ? command + +vi may search past the bottom of the file and then start again at the top. +(Or, vi may search past the top and then start again at the bottom.) + +>>> You are going to search for a string, find the next three +>>> occurrences. Then flip directions and find the string until you +>>> return to this location. To do this: +>>> Type '/''t''h''e' then press RETURN. +>>> Type 'n' three times. +>>> Type 'N' until you return to this location. + +* EMACS-NOTICE: Emacs has very powerful SEARCH-COMMANDS which you may + want to use in parallell to those above. One of the first you want + to try is probably C-s (ISEARCH-FORWARD). + + +SUMMARY +------- + + 'w' Move to the beginning of the next WORD + 'e' Move to the END of the next word + 'b' Move BACK to the beginning to the previous word + + '$' Move to the end of the line + '^' Move to the first non-white character on the line + + '0' Move to the first column on the line (column zero) + #'|' Move to an exact column on the line (column #) e.g. 5| 12| + + 'f' char FIND the next occurrence of char on the line + 't' char Move 'TIL the next occurrence of char on the line + + 'F' char FIND the previous occurrence of char on the line + 'T' char Move 'TIL the previous occurrence of char on the line + + ';' Repeat the last f, t, F, or T + ',' Reverse the last f, t, F, or T + + '%' Show matching () or {} or [] + + 'H' Move to the HIGHEST position in the window + 'M' Move to the MIDDLE position in the window + 'L' Move to the LOWEST position in the window + + 'm' char MARK this location and name it char + ''' char (quote character) return to line named char + '''''' (quote quote) return from last movement + + 'G' GO to the last line in the file + #'G' GO to line #. (e.g., 3G , 5G , 175G ) + + '{' (left brace) Move to the beginning of a paragraph + '}' (right brace) Move to the end of a paragraph + + '(' (left paren) Move to the beginning of a sentence + ')' (right paren) Move to the beginning of the next sentence + + '[''[' Move to the beginning of a section + ']'']' Move to the end of a section + + '/'string Find string looking forward + '?'string Find string looking backward + + 'n' Repeat last / or ? command + 'N' Reverse last / or ? command + +You should now be able to move around files very efficiently. These +commands are especially useful if you are using vi over a slow modem. +Practice the material in this lesson for a few days and then take +either the third vi tutorial to learn how to copy, cut, and paste, or +the forth vi tutorial to learn additional insertion techniques. + +Copyright (c) 1992 Jill Kliger and Wesley Craig. All Rights Reserved. diff --git a/emacs.d/nxhtml/etc/viper-tut/3cutpaste b/emacs.d/nxhtml/etc/viper-tut/3cutpaste new file mode 100644 index 0000000..6d531d9 --- /dev/null +++ b/emacs.d/nxhtml/etc/viper-tut/3cutpaste @@ -0,0 +1,318 @@ +Viper tutorial #3: Copying, Cutting, and Pasting + +This lesson lasts 15-20 minutes. This tutorial assumes full knowledge +of tutorial #1, and familiarity with tutorial #2. Lines which begin +with >>> mark exercises you should try. + +When you want to exit this tutorial type 'Z''Z' to exit and save your +changes. Or type :q! to exit without saving changes. +Remember that typing u will UNDO your last change. + + +CUTTING TEXT +------------ +The delete command can be combined with any of the movement commands +taught throughout tutorial #2. The resulting command is of the form: + + 'd'movement DELETE to where the movement command specifies + +Consider the following examples: + + 'd''w' DELETE to the beginning of the next WORD + 'd''$' DELETE to the end of the line + 'd'')' DELETE to the beginning of the next sentence + 'd''t'e DELETE 'TIL the next e + 'd''d' DELETE a line (dd is a special case of the d command) + +>>> Experiment with 'd''w' 'd''$' 'd'')' 'd''t'e 'd''d' on the paragraph provided below: + + PRACTICE here. Now is the time for all good users to learn the + editor. The quick brown fox jumped over the seven lazy fish. Now + is the time for all good users to learn the editor. The quick + brown computer jumped over the seven lazy users. END PRACTICE + +* EMACS-NOTICE: In Viper you can also use 'r' and 'R' for Emacs region and + Viper line extended region. This is very convenient together with + CUA-MODE where the region is visible (it is usually called the + selected text or something similar in other applications). + + +PASTING TEXT +------------ +When text is deleted it is put into a buffer which contains the most +recently deleted text. To paste the contents of this buffer elsewhere +in the file use the p or P command. + + 'P' (upper p) PUT the contents of the buffer before the cursor + 'p' (lower p) PUT the contents of the buffer after the cursor + +>>> Try this sequence of commands on the practice lines below: +>>> 'd''d' to delete one line +>>> 'j' to move down a line +>>> 'p' (lower p) to PUT the deleted text after the cursor +>>> '}' to move to the end of the paragraph +>>> 'P' (upper p) to PUT the deleted text before the cursor + + PRACTICE line. Cut and Paste this line to the bottom of the + paragraph. Here is some filler, feel free to cut and paste the + text in this practice region. Remember that u undoes the last + action. END OF PRACTICE + +>>> Try this sequence of commands at the beginning of a word: +>>> 'd''w' 'w' 'P' + +The fastest way to swap two letters is to type: 'x''p' + +>>> Use xp to correct the misspelled words below: + + PRACTICE. Thier weird quiet recieved an inconvenient shriek. + Thier belief is that to recieve grief from nieghbors outwieghs + all else. Biege skies lead to wierd science. END. + + +NUMBERING +--------- +Consider cutting and pasting 3 words. Based on previous exercises you +would type 'd''w' , move to the new location, and type 'p' , and repeat +this procedure twice more. There is an easier way to do this: + +>>> Using the practice lines below, try the following sequence of commands: +>>> Move to the beginning of the first sentence. +>>> Type 'd''3''w' to DELETE 3 WORDS. +>>> Type 'w' to move ahead one WORD. +>>> Type 'P' (upper p) to PUT the three words before the cursor. + + PRACTICE Numbering vi commands is easy to do. Now is the time for + all good users to learn the editor. The quick brown fox jumped + over the seven lazy dogs. Numbering vi commands is easy to do. + Now is the time for all good users to learn the editor. END PRACTICE + +>>> Type 'd''2''d' to DELETE 2 lines, using the practice paragraph above. +>>> Move to the top of the paragraph. +>>> Type 'p' (lower p) to PUT the two lines after of the cursor. + +Numbering also works for movement commands. + +>>> Now try '4''w' to move ahead 4 WORDs, on the lines provided above. +>>> Then use '3''b' to move BACK 3 words. + +When you type '4''w' THINK "4 words", when you type d4w think "delete 4 +words". In general, we can write + + #movement repeat movement # times + d#movement DELETE to where the #movement command specifies + + +COPYING TEXT +------------ +The YANK command works just like the DELETE command, except 'y' is used +instead of 'd' . + + 'y'movement YANK to where the movement command specifies + +YANK and DELETE are identical except that YANK only copies the specified +text into the buffer. + +>>> Try this sequence of commands on the practice lines below: +>>> 'y''y' to YANK a line (yy is a special case of the y command) +>>> '3''j' to move down 3 lines +>>> 'p' (lower p) to PUT the yanked text after the cursor + + PRACTICE line. Copy and Paste this line to the bottom of the + paragraph. Here is some filler, feel free to copy and paste the + text in this practice region. Remember that u undoes the last + action. END OF PRACTICE + +Please note that copy, cutting, and pasting large blocks of text may +significantly alter the tutorial file. Remember that you can always get +a new copy of the tutorial file and that u UNDOes your last change. + +Here are some examples which show the similarity between y and d . + + 'y''w' YANK to the beginning of the next WORD + 'y''$' YANK to the end of the line + 'y'')' YANK to the beginning of the next sentence + 'y''t'e YANK 'TIL the next e + 'y''y' YANK a line + +Here are some more examples using commands from tutorial #2. + + 'y''L' YANK from here to the lowest point of the window + 'y''/'and YANK from here to the word "and" + 'y''2''}' YANK 2 paragraphs + 'y''''a YANK from here to the marked line "a" (mark line first) + +>>> Experiment with 'y''w' 'y''t'e 'y''4''w' 'y''2''}' 'y''3''y' and 'y''$' on the paragraph +>>> provided below. Copy text AND use 'p' or 'P' to paste it. + + PRACTICE line. Copy and Paste this line to the bottom of the + paragraph. Here is some filler, feel free to copy and paste + the text in this practice region. Remember that u undoes the + last action. END OF PRACTICE + + +NUMBERED BUFFERS +---------------- +In all of the previous pasting exercises you've used the "un-named" +buffer. The un-named buffer contains the text you most recently cut or +copied. When you make a new cut or copy, the old contents of the +un-named buffer are moved to one of the "numbered" buffers. The +buffers are numbered 1-9. Each time you cut or copy text, + + vi saves your current cut or copy in a buffer #1 + vi saves your 2nd to last cut or copy in a buffer #2 + The cut or copy before that is saved in a buffer #3 ... + vi saves your 8th oldest cut or copy in a buffer #8 + vi saves your 9th oldest cut or copy in a buffer #9 + +Note that buffer #1 is the same as the un-named buffer. Here's how to +paste from the numbered buffers: + + "#P (upper p) PUT contents of buffer # before the cursor + "#p (lower p) PUT contents of buffer # after the cursor + +For example: + + "1p PUT buffer 1 after the cursor + "7p PUT buffer 7 after the cursor + +>>> Delete this 1st line with dd +>>> Delete this 2nd line with dd +>>> Delete this 3rd block with d2d +>>> (2nd half of block 3) +>>> Delete this 4th block with dd +>>> Now type "1p "2p "3p "4p + +If you are using vi and have made accidental deletions, just PUT the +contents of each numbered buffer to recover the deleted text. + + +NAMED BUFFERS +------------- +vi maintains the un-named and numbered buffers automatically. You can +maintain your own buffers named a-z. That is, you can cut or copy text +into buffer x and later paste the text from buffer x. + + '"'aDELETE DELETE text into buffer a + "aYANK YANK text into buffer a + "aPUT PUT text from buffer a + +Note, don't actually type 'DELETE', 'YANK', or 'PUT'; type one of the +DELETE commands, YANK commands, or PUT commands. See the examples below: + + "ad} DELETE paragraph into buffer a + "by3y YANK 3 lines into buffer b + "cy200G YANK to line 200 into buffer c + "dp PUT buffer d after the cursor + "zP PUT buffer z before the cursor + +The contents of a named buffer are lost if: + 1) you store new text in a buffer with the same name + or 2) you quit vi (using 'Z''Z' or :q! ) + +>>> Delete this START line into buffer a by typing "add +>>> Paste buffer a by typing "ap + +>>> Delete this INTERMEDIATE line into buffer b by typing "bdd +>>> Paste buffer b by typing "bp + +To put new material into buffer a +>>> Delete this FINAL line into buffer a by typing "add +>>> Paste buffer a by typing "ap + + +SAVING WITHOUT QUITTING +----------------------- +With ZZ you save changes and kill the current buffer. (In vi you also +exit with 'Z''Z'.) With :w you can save and not quit vi. It is a safe +practice to save changes to a file regularly. This reduces re-typing +in the event your computer crashes. + + :w WRITE contents of the file (without quitting) + (type a colon, type w , then press the RETURN key) + +>>> Try :w now. Note the message at the bottom of the screen. + + +PASTING BETWEEN FILES +--------------------- + +* EMACS-NOTICE: In Emacs there are no problems editing several + files. You can however do it in the more complicated vi way below if + you really want to ;-) + +This is an extremely useful procedure in vi. Only one new command is +required for pasting between files, the EDIT command + + :e filename Begin EDITing the file called "filename" + +The EDIT command allows you to edit another file without quitting vi. +This is useful since named buffers are lost when you quit vi. + +Let's say you want to copy 6 lines from the file called "3temp" into +this file which is named "3cutpaste": +(Note that "3temp" has already been created for you) + + 1) WRITE "3cutpaste". vi will not allow :w (press RETURN) + you to edit another file without first + saving any changes you've made. + + 2) EDIT "3temp" without quitting vi. :e 3temp (press RETURN) + + 3) YANK 6 lines from "3temp". "ay6y + + 4) Return to "3cutpaste". :e 3cutpaste (press RETURN) + + 5) PUT from buffer a "ap + +Note that the un-named and numbered buffers are lost when the EDIT +command is used. Only named buffers are preserved with EDIT. + +>>> Follow the 5-step procedure outlined above. Don't be concerned +>>> with remembering all 5 steps, the instructions are repeated in +>>> "3temp". Paste the text from "3temp" near this line of this file, +>>> "3cutpaste". + +You can use this 5-step procedure on any two files, with any cutting or +copying action (here, y6y is the example). + + +SUMMARY +------- + + #movement repeat movement # times + * EMACS-NOTICE: You may also use 'r' or 'R' in Viper. + + 'd'movement DELETE to where "movement" command specifies + 'd'#movement DELETE to where the #movement command specifies + (e.g. 'd''w' 'd''3''w' ) + + 'y'movement YANK to where "movement" command specifies + 'y'#movement YANK to where the #movement command specifies + (e.g. 'y''w' 'y''3''w' ) + + 'P' (upper p) PUT the contents of the buffer before the cursor + 'p' (lower p) PUT the contents of the buffer after the cursor + + '"'#P (upper p) PUT contents of buffer # before the cursor + '"'#p (lower p) PUT contents of buffer # after the cursor + (e.g. '"''2''p' '"''7''P' ) + + '"'aDELETE DELETE text into buffer a + '"'aYANK YANK text into buffer a + '"'aPUT PUT text from named buffer a + (Note, don't actually type 'DELETE', 'YANK', or 'PUT'; + type one of the DELETE commands, YANK commands, or PUT + commands, e.g. '"''a''d''}' '"''b''y''3''y' '"''c''y''2''0''0''G' '"''d''p' '"''z''P' ) + + :w WRITE contents of the file (without quitting) + (type a colon, type w , then press the RETURN key) + + :e filename Begin EDITing the file called "filename" + + +You are now prepared to handle all cutting, copying and pasting tasks +which may arise. If you practice what you've learned you'll find editing +in vi to be fast and convenient. + +Copyright (c) 1992 Jill Kliger and Wesley Craig. All Rights Reserved. diff --git a/emacs.d/nxhtml/etc/viper-tut/4inserting b/emacs.d/nxhtml/etc/viper-tut/4inserting new file mode 100644 index 0000000..ab2c6a5 --- /dev/null +++ b/emacs.d/nxhtml/etc/viper-tut/4inserting @@ -0,0 +1,180 @@ +Viper tutorial #4: Insertion Techniques + +This lesson lasts 5-10 minutes. This tutorial assumes full knowledge +of tutorial #1, and familiarity with tutorial #2. Lines which begin +with >>> mark exercises you should try. When you want to exit this +tutorial type 'Z''Z' . + + +SIMPLE INSERTION +---------------- +You spend most of your time in vi inserting text. As you might expect, +there are several commands to begin insertion. + + 'o' OPEN a line below the cursor + 'O' OPEN a line above the cursor + + 'i' INSERT starting before the cursor + 'I' INSERT at the beginning of the line + + 'a' APPEND starting after the cursor + 'A' APPEND at the end of the line + +Remember to type ESC to leave insert mode. If you don't have an ESC key +type C-[ (control [ ). + + ESC ESCAPE from insert mode + +>>> Move the cursor to this line. Type 'O' , enter your name. Press ESC. +>>> Next type 'o' , enter the date. Press ESC. + +Note that 'O' opens the line above and puts you in insert mode, +while 'o' opens the line below and also puts you in insert mode. + +>>> Type 'a' on any line above, enter your name. Press ESC. Do the +>>> same for 'A'. + +>>> Read the following. Your goal is to take the sentence fragment below: + + BROWN FOX OVER THE SEVEN LAZY + +>>> and convert it to + + THE QUICK BROWN FOX JUMPED OVER THE SEVEN LAZY DOGS. + +>>> To do this type: +>>> 'I' to insert THE QUICK (then press ESC) +>>> move the cursor to after the X in FOX +>>> 'a' to insert JUMPED (then press ESC) +>>> 'A' to insert DOGS. (then press ESC) +>>> Now move to the sentence fragment and make the changes outlined above. + + +JOINING LINES +------------- +Often it is convenient to join two short lines into one line. There +are several ways to do this. The easiest is the J command. Other +methods will be explored in tutorial #5. + + 'J' JOIN two lines + +>>> Go to the first line in the block below. Type J. Type J again. + + Example: NOW IS THE TIME + the walrus said + TO THINK OF MANY THINGS + +In the event that joining lines creates a line which exceeds the width +of the screen, you can break the line by typing i and pressing RETURN. + + +SUBSTITUTING TEXT +----------------- +Substituting combines the delete command and the insert command into a +single step. + + #'s' SUBSTITUTE for # characters + #'S' SUBSTITUTE for # whole lines + + +In order to substitute text you have to know how much text you want to +delete. Consider the following examples: + + '3''s' SUBSTITUTE the next 3 characters for what will be typed + '7''s' SUBSTITUTE the next 7 characters for what will be typed + +>>> Change the SAMPLE DEFINITION below. To do this: +>>> move the cursor to the T in TWO +>>> type '3's +>>> type FOUR then press ESC + + SAMPLE DEFINITION: A string quartet is defined to be + a group of TWO musicians. + + +REPLACING TEXT +-------------- +The 'r' and 'R' commands allow you to directly type over existing text. + + 'r' REPLACE character (NO need to press ESC) + 'R' enter over-type mode + +>>> Correct each of the TYPOs on the sample line below. To do this: +>>> move the cursor to the misspelled character +>>> type 'r' +>>> type the correct character + + SAMPLE: maintanence conveniance complience applience dilagent + +>>> Use the over-type command, 'R' , on the sample line above. +>>> Type 'R' then type the name of a local restaurant. Press ESC. + + +CHANGING TEXT +------------- +The change command combines insertion, deletion, and the movement +commands. (Recall that the movement commands were taught in tutorial +#2.) Change is probably more useful than replace or substitute. The +general form of the change command is: + + 'c'movement CHANGE to where the movement command specifies + +Consider the following examples: + + 'c''w' CHANGE to the beginning of the next WORD + 'c''$' CHANGE to the end of the line + 'c'')' CHANGE to the beginning of the next sentence + 'c''t'e CHANGE 'TIL the next e + 'c''3''w' CHANGE the next 3 WORDS + 'c''c' CHANGE a line (cc is a special case of the c command) + 'c''}' CHANGE to the end of the paragraph + +>>> Follow these steps: +>>> 1. move to the desired location in the practice paragraph below +>>> 2. type 'c''w' (change to the beginning of the next WORD) +>>> 3. type your name +>>> 4. press ESC + + PRACTICE here. Now is the time for all good users to learn the + editor. The quick red fox jumped over the seven lazy fish. Now + is the time for all good users to learn the editor. The quick + brown computer jumped over the seven lazy users. END PRACTICE + +>>> Experiment by using a variety of options for step #2. Try +>>> out 'c''$' 'c'')' 'c''t'e 'c''3''w' 'c''c' 'c''}' on the practice paragraph above. + +Note that the change command follows the same pattern as the delete +and yank commands which were explored in tutorial #3. + + +SUMMARY +------- + + 'o' OPEN a line below the cursor + 'O' OPEN a line above the cursor + + 'i' INSERT starting before the cursor + 'I' INSERT at the beginning of the line + + 'a' APPEND starting after the cursor + 'A' APPEND at the end of the line + + ESC ESCAPE from insert mode + + 'J' JOIN two lines + + #'s' SUBSTITUTE for # characters + #'S' SUBSTITUTE for # whole lines + + 'r' REPLACE character (NO need to press ESC) + 'R' enter over-type mode + + 'c'movement CHANGE to where the movement commands specifies + (e.g. 'c''3''w' 'c''$' 'c''c' ) + + +These commands should improve your ability to insert text efficiently. +The next tutorials deal with advanced commands and tricks which can +further speed up your editing. + +Copyright (c) 1992 Jill Kliger and Wesley Craig. All Rights Reserved. diff --git a/emacs.d/nxhtml/etc/viper-tut/5tricks b/emacs.d/nxhtml/etc/viper-tut/5tricks new file mode 100644 index 0000000..c1e414e --- /dev/null +++ b/emacs.d/nxhtml/etc/viper-tut/5tricks @@ -0,0 +1,229 @@ +Viper tutorial #5: Tricks and Timesavers + +This lesson lasts 10-15 minutes. You should have a strong +understanding of tutorials #1-3 before working through these timesaving +techniques. Lines which begin with >>> mark exercises you should +try. When you want to exit this tutorial type 'Z''Z' . + + +CASE CONVERSION +--------------- +When you want to change an upper-case character to a lower-case +character (or lower-case to upper-case) there is a single command which +does both: + + '~' (tilde) Convert case of current character + +>>> Move the cursor to be OVER the first character in the example +>>> line below. Press '~' until you have changed the case of the +>>> entire line. ( '~' will advance to the right automatically). + + bOB WENT TO pARIS, fRANCE, TO SEE THE #1 CYCLING EVENT. end. + +Note that '~' only affects alphabetic characters. + + +UNDOING +------- +* EMACS-NOTICE: Uppercase U does the same thing as lowercase u in + Viper so this part of the tutorial which was about U has been + removed. + + +REPEAT LAST COMMAND +------------------- +Often you want to make the same change at multiple locations in the +file. To help accomplish this, vi remembers your previous action. + + '.' (dot) repeat last change + +>>> Go through the example below changing "FISH" to "TOAD": +>>> Go to the "F" in the first instance of "FISH" +>>> To change the word: type 'c''w' then type TOAD then press ESC +>>> Move the cursor to "F" in the second occurence of "FISH" +>>> Type '.' (dot) +>>> Move the cursor to "F" in the final occurence of "FISH" +>>> Type '.' (dot) +>>> Now move the cursor to each occurence of "CROW"; Type '.' (dot) + + EXAMPLE: The FISH fed the cat. The CROW fed the cat. Example + text is FISH to make interesting. The man fed the CROW. The + worm fed the FISH. Example text is hard to make CROW. END. + +>>> Go through the example above deleting all occurences of "TOAD": +>>> Move to the beginning of the EXAMPLE paragraph above. +>>> Type '/''T''O''A''D' and press RETURN (recall tutorial #2) +>>> Delete the word by typing 'd''w' +>>> Type 'n' to move to the next occurence of "TOAD" +>>> Type '.' (dot) to repeat the dw command +>>> Use 'n''.' to delete the remaining "TOAD"s + +Note that '.' only repeats changes, not cursor movements. + +* EMACS-NOTICE: In Emacs '.' also repeat undo and redo. + +* EMACS-NOTICE: Emacs KEYBOARD-MACROS are very powerful for repeating + whole sequences of keyboard commands. + + +WINDOW ACTIONS +-------------- +You are already familiar with the C-u (depress the control key and +type u) and C-d commands from tutorial #1. + + C-d Move DOWN one half-screen + C-u Move UP one half-screen + +There are several related commands: + + C-f Move FORWARD one full-screen + C-b Move BACKWARD one full-screen + + C-e Move the window down one line without moving cursor + C-y Move the window up one line without moving cursor + +The C-e and C-y commands may seem obscure; however, notice that on +the keyboard, e and y are close to d and u respectively. This +should help you remember that C-e moves DOWN, and C-y moves UP. + +Recall the 'H' 'M' 'L' (HIGH MIDDLE LOW) window commands from Tutorial 2. +Consider a scenario where you want to yank from the current line to a +line near the top of the window. You could use C-e and C-y to +position the text in the window before you use the yH command. + +The 'z' command also moves the window without moving your cursor: + + 'z' Position the current line to top of window + 'z''.' Position the current line to middle of window + 'z''-' Position the current line to bottom of window + +>>> Move to this line. Type 'z' and press RETURN. Notice that +>>> this text and the cursor have moved to the top of the window. +>>> Try 'z''-' and 'z''.' also. + + +FILE AND DISPLAY CONTROL +------------------------ + +* EMACS-NOTICE: In vi C-g shows the status of the current file, but + C-g in Emacs in most situation stops what Emacs is doing. To get + information about the current file you can use C-c C-g instead when + Viper is in vi state. + +* EMACS-NOTICE: In vi C-l refreshes the screen, but C-l in Emacs calls + the command recenter. + + +SUSPENDING VI +------------- +* EMACS-NOTICE: In vi C-z suspends vi. However in Viper C-z is by + default the VIPER-TOGGLE-KEY. To suspend or iconify Emacs use C-x + C-z. + + +BANG COMMAND +------------ +* EMACS-NOTICE: Emacs has builtin commands to sort etc. + +The exclamation point, '!' (aka BANG), command allows you to feed text +to any Unix command. The output of the Unix command replaces the +original text. Here is a useful Unix command to use from within vi: + + !}fmt Format the paragraph, joining and filling lines to + produce output lines of up to 72 characters + +>>> Move to the example paragraph below. Type !}fmt and press +>>> RETURN. Notice the paragraph will be reformatted such that +>>> the lines are of approximately equal length. + + EXAMPLE: + So we grow together, + Like to a double cherry, seeming parted, + But yet an union in partition; + Two lovely berries moulded on one stem; + So, with two seeming bodies, but one heart; + END. + +Another useful command is: + + !}sort Sort lines of a paragraph alphabetically + +>>> Move to the example text below. Type !}sort and press RETURN. + + OBERON king of the fairies. + PUCK or Robin Goodfellow. + HERMIA daughter to Egeus, in love with Lysander. + HELENA in love with Demetrius. + LYSANDER in love with Hermia. + DEMETRIUS in love with Hermia. + +Remember, any Unix command may be used this way. + + +SHIFTING TEXT +------------- +It is possible to shift large blocks of text right and left with the '>' +and '<' commands. + + '>'movement Shift right to where the movement command specifies + '<'movement Shift left to where the movement command specifies + +These commands work like the 'd' command. For example: + + '>''}' Shift right to the end of the paragraph + '<''}' Shift left to the end of the paragraph + '>''>' Shift the current line right + '<''<' Shift the current line left + +>>> Move the cursor to the first line of the paragraph below. +>>> Type '>''>' and '<''<' to shift the line back and forth. Next +>>> try '>''}' to shift the paragraph to the right, then '<''}' to shift +>>> it left, then type '.' until all four lines start at the left edge. + + THIS IS THE FIRST LINE OF EXAMPLE TEXT + IS + EXAMPLE + TEXT END + + +SUMMARY +------- + + '~' (tilde) Convert case of current character + + 'U' * EMACS-NOTICE: Same as lowercase u undo in Viper. + + '.' (dot) repeat last change + + C-d Move DOWN one half-screen + (depress the control key and type d) + + C-u Move UP one half-screen + (depress the control key and type u) + + C-f Move FORWARD one full-screen + C-b Move BACKWARD one full-screen + + C-e Move the window down one line without moving cursor + C-y Move the window up one line without moving cursor + + 'z' Position the current line to top of window + 'z''.' Position the current line to middle of window + 'z''-' Position the current line to bottom of window + + C-c C-g Show status of current file + C-l Recenter + + '!'}fmt Format the paragraph, joining and filling lines to + produce output lines of up to 72 characters + + '!'}sort Sort lines of a paragraph alphabetically + + '>'movement Shift right to where the movement command specifies + '<'movement Shift left to where the movement command specifies + + +These commands should significantly speed up your editing. Have a nice +day. Tutorial 6 contains even more nifty commands. + +Copyright (c) 1992 Jill Kliger and Wesley Craig. All Rights Reserved. diff --git a/emacs.d/nxhtml/etc/viper-tut/README b/emacs.d/nxhtml/etc/viper-tut/README new file mode 100644 index 0000000..dd39176 --- /dev/null +++ b/emacs.d/nxhtml/etc/viper-tut/README @@ -0,0 +1,49 @@ +Viper Tutorial README +===================== + +To install the Viper tutorial you must do two things: + +1) Put viper-tutorial.el in your Emacs load-path. + +2) Put the tutorial files (0intro, 1basics etc) in subdirectory to + where you put viper-tutorial.el with the name viper-tut. + Optionally you may put those file any where and customize the + option viper-tut-directory. + +The tutorial is started by + + M-x viper-tutorial RET + + + + +Viper tutorial is based on vilearn version 1.0 which was downloaded +from http://vilearn.org. + +Below is the original readme from vilearn. Note that the only part +that applies here is the copyright notice. + +--------------------------------------------------- +This is version 1.0 of vilearn, an interactive vi tutorial. + +Copyright (c) 1992 Jill Kliger and Wesley Craig. All Rights Reserved. + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies and that +the copyright notice, this permission notice, and an explicit record of +any local changes, appear in supporting documentation. This software +is supplied as is without expressed or implied warranties of any kind. + +To install, edit the Makefile and type + + make install + +We have a mailing list, vilearn-admins@terminator.rs.itd.umich.edu. To +be added to the list, send mail to vilearn-admins-request. The list is +intended to discuss the tutorials, coordinate projects relating to +them, and provide help to those who may need it. + +Wesley Craig & Jill Kliger +1317 Packard Street vilearn@terminator.rs.itd.umich.edu +Ann Arbor, MI 48104 diff --git a/emacs.d/nxhtml/etc/viper-tut/outline b/emacs.d/nxhtml/etc/viper-tut/outline new file mode 100644 index 0000000..9eaa3e4 --- /dev/null +++ b/emacs.d/nxhtml/etc/viper-tut/outline @@ -0,0 +1,131 @@ + +* +* tutorial 1 FILENAME: 1basics +* basics +* + +C-d down +C-u up + +h left +j down +k up +l right + +dd delete line +x x-out character + +u undo + +:q! force quit +ZZ good bye + +o open +i insert + +* +* tutorial 2 FILENAME: 2moving +* objects, finds & marks +* + +w W word +b B back +e E end + +{ } paragraph +( ) sentence +[ ] sections + +$ end of line +^ first non-white +| column +0 beginning of line + +f F find +t T to +; repeat fFtT +, reverse fFtT + +G goto + +H high +M middle +L low + +n N next +? / regex + +% match + +' move to marked line +m mark + + +* +* tutorial 3 FILENAME: 3cutpaste & 3temp +* +* cutting, pasting, buffers, and files +* + +d D deletes +y Y yank +p P put +" buffer +:e edit + +* +* tutorial 4 FILENAME: 4inserting +* insertion +* + +a A append +c C change +i I insert +o O open +r R replace +s S substitute + +J join + +* +* tutorial 5 FILENAME: 5tricks +* tricks +* + +~ case + +u U undo + +. do again + +C-b back +C-f forward +C-e down line +C-y up line +z zero + +C-g status +C-l refresh + +C-z suspend + +C-t pop tag proposed +C-] follow tag proposed + +! command + +< > shift + +* +* tutorial 6 PROPOSED +* commands from hell +* + +: colon commands +Q quit +C-r redraw +@ execute buffer as macro +& like :& + +C-t shift (insert) +C-d unshift (insert) diff --git a/emacs.d/nxhtml/nxhtml-base.el b/emacs.d/nxhtml/nxhtml-base.el new file mode 100644 index 0000000..d768a5e --- /dev/null +++ b/emacs.d/nxhtml/nxhtml-base.el @@ -0,0 +1,150 @@ +;;; nxhtml-base.el --- The very, very basic vars... +;; +;; Author: Lennart Borgman (lennart O borgman A gmail O com) +;; Created: 2010-01-13 Wed +;; Version: +;; Last-Updated: +;; URL: +;; Keywords: +;; Compatibility: +;; +;; Features that might be required by this library: +;; +;; None +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; Commentary: +;; +;; Things that always must be loaded and that are often necessary when +;; byte compiling. +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; 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 3, 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: + +;;(eval-when-compile (require 'web-vcs nil t)) +(eval-when-compile (require 'flymake-js nil t)) +(eval-when-compile (require 'flymake-css nil t)) +(eval-when-compile (require 'flymake-java-1 nil t)) + +(defconst nxhtml-menu:version "2.08") +(setq message-log-max t) +(setq debug-on-error t) + +(defconst nxhtml-install-dir + (file-name-directory (or load-file-name + (when (boundp 'bytecomp-filename) bytecomp-filename) + buffer-file-name)) + "Installation directory for nXhtml.") + +(define-minor-mode nxhtml-autoload-web + "If on download elisp files from web when they are needed. +If t then during `require' nXhtml elisp files can be downloaded +from the nXhtml repository on the web. This will currently +download the development sources, latest version. + +Other files that are used by a command may also be downloaded. + +Note that files are not updated automatically. You have to use +`nxhtml-update-existing-files' for that." + :global t + ;;:lighter (propertize " nX" 'face 'font-lock-comment-face) + :lighter " nX" + :group 'nxhtml) + +(defun nxhtml-autoload (fun src &optional docstring interactive type) + "Generalized `autoload'. May setup autoload from the web. +If `nxhtml-autoload-web' is t then setup autoloading from the web. +Otherwise setup for normal local autoloading." + (if nxhtml-autoload-web + (progn + ;; Do not require this until we really need it. + (require 'web-autoload) + (web-autoload fun src docstring interactive type)) + (let ((file src)) + (when (listp file) + (setq file (file-name-nondirectory (nth 2 file)))) + (autoload fun file docstring interactive type)))) + +;; Fix-me: web autoload defcustoms. +;; +;; I have no good idea how to fix this. It looks like I have to +;; defadvice `custom-load-symbol'. I thought that should not be +;; necessary since it does (require load) on line 605 but the web +;; autoload does not start. Why? Hm, you never know since it is inside +;; a (condition-case nil ...). +;; +;; Ah, found it. The require is only done if custom loads contains a +;; symbol, not a string. So I changed this to a symbol instead in +;; nxhtml-loaddefs.el. Maybe `load' instead of `require' should be +;; advised? + +;; What a hell is this below? Have things been rewritten in custom or +;; did I mix somethintg? +(defun nxhtml-custom-autoload (symbol load &optional noset) + "Like `custom-autoload', but also run :set for defcustoms etc." + ;; Fix-me: is-boundp is currently always t because of the order in + ;; loaddefs. Hm, so this worked just by chance... + (let* ((is-boundp (prog1 (boundp symbol) + (custom-autoload symbol load noset))) + (standard (get symbol 'standard-value)) + (saved (get symbol 'saved-value)) + ;; Fix-me: property custom-set etc are not available + (custom-set (get symbol 'custom-set)) + (custom-initialize (get symbol 'custom-initialize)) + (set (or custom-set 'custom-set-default))) ;; Fix-me: initialize + (setq custom-set t) ;; Not available here + (when (or custom-initialize + (and saved + (not (equal (car saved) (symbol-value symbol))) + custom-set)) + (funcall set symbol (car saved)) + (custom-load-symbol symbol)))) + +(defun flymake-init-load-flymakemsg () + (require 'flymakemsg)) + +(define-minor-mode nxhtml-flymake-setup + "Let nXhtml add some addtions to flymake. +This adds support for CSS and JavaScript files. + +It also adds showing of errors in minibuffer when point is on +them. + +If you turn this off you must restart Emacs for it to take +effect." + :group 'nxhtml + :group 'flymake + (when nxhtml-flymake-setup + (flymake-js-load) + (flymake-css-load) + (flymake-java-1-load) + (add-hook 'flymake-mode-hook 'flymake-init-load-flymakemsg))) + + +(provide 'nxhtml-base) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; nxhtml-base.el ends here diff --git a/emacs.d/nxhtml/nxhtml-loaddefs.el b/emacs.d/nxhtml/nxhtml-loaddefs.el new file mode 100644 index 0000000..6ec7284 --- /dev/null +++ b/emacs.d/nxhtml/nxhtml-loaddefs.el @@ -0,0 +1,4502 @@ +;; Autoloads for nXthml +;; +;; This file should be updated by `nxhtmlmaint-get-file-autoloads', +;; `nxhtmlmaint-get-dir-autoloads' or `nxhtmlmaint-get-all-autoloads'. +(eval-when-compile (require 'nxhtml-base)) +(eval-when-compile (require 'web-vcs)) + +;;;### (autoloads (html-chklnk) "../../../../../.emacs.d/nxhtml/nxhtml/html-chklnk" +;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/html-chklnk.el" (19364 +;;;;;; 59816)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/html-chklnk.el +(web-autoload-require 'html-chklnk 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-chklnk" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'html-chklnk 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/nxhtml/html-chklnk" loads) nil (put 'html-chklnk 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/nxhtml/html-chklnk" loads)))) + +;;;*** + +;;;### (autoloads (html-pagetoc-rebuild-toc html-pagetoc-insert-toc +;;;;;; html-pagetoc) "../../../../../.emacs.d/nxhtml/nxhtml/html-pagetoc" +;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/html-pagetoc.el" (19364 +;;;;;; 59816)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/html-pagetoc.el +(web-autoload-require 'html-pagetoc 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-pagetoc" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'html-pagetoc 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/nxhtml/html-pagetoc" loads) nil (put 'html-pagetoc 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/nxhtml/html-pagetoc" loads)))) + +(nxhtml-autoload 'html-pagetoc-insert-toc `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-pagetoc" nxhtml-install-dir) "\ +Inserts a table of contents for the current html file. +The html header tags h1-h6 found in the file are inserted into +this table. MIN-LEVEL and MAX-LEVEL specifies the minimum and +maximum level of h1-h6 to include. They should be integers. + +\(fn &optional MIN-LEVEL MAX-LEVEL)" t nil) + +(nxhtml-autoload 'html-pagetoc-rebuild-toc `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-pagetoc" nxhtml-install-dir) "\ +Update the table of contents inserted by `html-pagetoc-insert-toc'. + +\(fn)" t nil) + +(defconst html-pagetoc-menu-map (let ((map (make-sparse-keymap))) (define-key map [html-pagetoc-rebuild-toc] (list 'menu-item "Update Page TOC" 'html-pagetoc-rebuild-toc)) (define-key map [html-pagetoc-insert-style-guide] (list 'menu-item "Insert CSS Style for Page TOC" 'html-pagetoc-insert-style-guide)) (define-key map [html-pagetoc-insert-toc] (list 'menu-item "Insert Page TOC" 'html-pagetoc-insert-toc)) map)) + +;;;*** + +;;;### (autoloads (html-site-query-replace html-site-rgrep html-site-find-file +;;;;;; html-site-dired-current html-site-set-site html-site-buffer-or-dired-file-name +;;;;;; html-site) "../../../../../.emacs.d/nxhtml/nxhtml/html-site" +;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/html-site.el" (19364 +;;;;;; 59816)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/html-site.el +(web-autoload-require 'html-site 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-site" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'html-site 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/nxhtml/html-site" loads) nil (put 'html-site 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/nxhtml/html-site" loads)))) + +(nxhtml-autoload 'html-site-buffer-or-dired-file-name `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-site" nxhtml-install-dir) "\ +Return buffer file name or file pointed to in dired. + +\(fn)" nil nil) + +(nxhtml-autoload 'html-site-set-site `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-site" nxhtml-install-dir) "\ +Not documented + +\(fn NAME)" t nil) + +(nxhtml-autoload 'html-site-dired-current `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-site" nxhtml-install-dir) "\ +Open `dired' in current site top directory. + +\(fn)" t nil) + +(nxhtml-autoload 'html-site-find-file `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-site" nxhtml-install-dir) "\ +Find file in current site. + +\(fn)" t nil) + +(nxhtml-autoload 'html-site-rgrep `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-site" nxhtml-install-dir) "\ +Search current site's files with `rgrep'. +See `rgrep' for the arguments REGEXP and FILES. + +\(fn REGEXP FILES)" t nil) + +(nxhtml-autoload 'html-site-query-replace `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-site" nxhtml-install-dir) "\ +Query replace in current site's files. + +\(fn FROM TO FILE-REGEXP DELIMITED)" t nil) + +;;;*** + +;;;### (autoloads (html-toc) "../../../../../.emacs.d/nxhtml/nxhtml/html-toc" +;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/html-toc.el" (19364 59816)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/html-toc.el +(web-autoload-require 'html-toc 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-toc" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'html-toc 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/nxhtml/html-toc" loads) nil (put 'html-toc 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/nxhtml/html-toc" loads)))) + +(defconst html-toc-menu-map (let ((map (make-sparse-keymap))) (define-key map [html-toc-browse-frames-file] (list 'menu-item "Browse Frames File" 'html-toc-browse-frames-file)) (define-key map [html-toc-write-frames-file] (list 'menu-item "Write Frames File" 'html-toc-write-frames-file)) (define-key map [html-toc-write-toc-file] (list 'menu-item "Write TOC File for Frames" 'html-toc-write-toc-file)) (define-key map [html-toc-sep1] (list 'menu-item "--")) (define-key map [html-toc-edit-pages-file] (list 'menu-item "Edit List of Pages for TOC" 'html-site-edit-pages-file)) (define-key map [html-toc-create-pages-file] (list 'menu-item "Write List of Pages for TOC" 'html-toc-create-pages-file)) map)) + +;;;*** + +;;;### (autoloads (html-upl-ediff-file html-upl-edit-remote-file-with-toc +;;;;;; html-upl-edit-remote-file html-upl-upload-file html-upl-remote-dired +;;;;;; html-upl-upload-site html-upl-upload-site-with-toc html-upl) +;;;;;; "../../../../../.emacs.d/nxhtml/nxhtml/html-upl" "../../../../.emacs.d/nxhtml/nxhtml/html-upl.el" +;;;;;; (19364 59816)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/html-upl.el +(web-autoload-require 'html-upl 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-upl" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'html-upl 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/nxhtml/html-upl" loads) nil (put 'html-upl 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/nxhtml/html-upl" loads)))) + +(nxhtml-autoload 'html-upl-upload-site-with-toc `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-upl" nxhtml-install-dir) "\ +Not documented + +\(fn)" t nil) + +(nxhtml-autoload 'html-upl-upload-site `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-upl" nxhtml-install-dir) "\ +Not documented + +\(fn)" t nil) + +(nxhtml-autoload 'html-upl-remote-dired `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-upl" nxhtml-install-dir) "\ +Start dired for remote directory or its parent/ancestor. + +\(fn DIRNAME)" t nil) + +(nxhtml-autoload 'html-upl-upload-file `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-upl" nxhtml-install-dir) "\ +Upload a single file in a site. +For the definition of a site see `html-site-current'. + +\(fn FILENAME)" t nil) + +(nxhtml-autoload 'html-upl-edit-remote-file `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-upl" nxhtml-install-dir) "\ +Not documented + +\(fn)" t nil) + +(nxhtml-autoload 'html-upl-edit-remote-file-with-toc `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-upl" nxhtml-install-dir) "\ +Not documented + +\(fn)" t nil) + +(nxhtml-autoload 'html-upl-ediff-file `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-upl" nxhtml-install-dir) "\ +Run ediff on local and remote file. +FILENAME could be either the remote or the local file. + +\(fn FILENAME)" t nil) + +;;;*** + +;;;### (autoloads (html-wtoc) "../../../../../.emacs.d/nxhtml/nxhtml/html-wtoc" +;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/html-wtoc.el" (19364 +;;;;;; 59816)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/html-wtoc.el +(web-autoload-require 'html-wtoc 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/html-wtoc" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'html-wtoc 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/nxhtml/html-wtoc" loads) nil (put 'html-wtoc 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/nxhtml/html-wtoc" loads)))) + +;;;*** + +;;;### (autoloads (nxhtml-features-check nxhtml-customize nxhtml) +;;;;;; "../../../../../.emacs.d/nxhtml/nxhtml/nxhtml" "../../../../.emacs.d/nxhtml/nxhtml/nxhtml.el" +;;;;;; (19412 30366)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/nxhtml.el +(web-autoload-require 'nxhtml 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'nxhtml 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/nxhtml/nxhtml" loads) nil (put 'nxhtml 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/nxhtml/nxhtml" loads)))) + +(nxhtml-autoload 'nxhtml-customize `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml" nxhtml-install-dir) "\ +Customize nXhtml. + +\(fn)" t nil) + +(nxhtml-autoload 'nxhtml-features-check `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml" nxhtml-install-dir) "\ +Check if external modules used by nXhtml are found. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (nxhtml-report-bug) "../../../../../.emacs.d/nxhtml/nxhtml/nxhtml-bug" +;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-bug.el" (19278 +;;;;;; 3420)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/nxhtml-bug.el +(web-autoload-require 'nxhtml-bug 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-bug" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'nxhtml-report-bug `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-bug" nxhtml-install-dir) "\ +Report a bug in nXhtml. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (nxhtml-overview nxhtml-menu-mode nxhtml-browse-region +;;;;;; nxhtml-browse-file nxhtml-edit-with-gimp) "../../../../../.emacs.d/nxhtml/nxhtml/nxhtml-menu" +;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-menu.el" (19412 +;;;;;; 30366)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/nxhtml-menu.el +(web-autoload-require 'nxhtml-menu 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-menu" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'nxhtml-edit-with-gimp `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-menu" nxhtml-install-dir) "\ +Edit with GIMP buffer or file at point. + +\(fn)" t nil) + +(nxhtml-autoload 'nxhtml-browse-file `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-menu" nxhtml-install-dir) "\ +View file in web browser. + +\(fn FILE)" t nil) + +(nxhtml-autoload 'nxhtml-browse-region `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-menu" nxhtml-install-dir) "\ +View region in web browser. + +\(fn)" t nil) + +(defvar nxhtml-menu-mode nil "\ +Non-nil if Nxhtml-Menu mode is enabled. +See the command `nxhtml-menu-mode' for a description of this minor mode.") + +(nxhtml-custom-autoload 'nxhtml-menu-mode '../../../../../.emacs.d/nxhtml/nxhtml/nxhtml-menu nil) + +(nxhtml-autoload 'nxhtml-menu-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-menu" nxhtml-install-dir) "\ +Minor mode to turn on some key and menu bindings. +See `nxhtml-mode' for more information. + +This minor mode adds the entry 'nXhtml' to the menu bar. This +submenu gives easy access to most of the important features of +nXhtml. + +To see an (incomplete) overview in html format do +\\[nxhtml-overview]. + +* Note: Please observe that when loading nXhtml some file + associations are done, see `nxhtml-setup-file-assoc'. + +Here are some important features: + +- multiple major modes, see `define-mumamo-multi-major-mode' +- easy uploading and viewing of files, see for example + `html-upl-upload-file' + +- validation in XHTML part for php etc, see + `nxhtml-validation-header-mode' (you probably also want to know + about `nxhtml-toggle-visible-warnings' for this!) + +- converting of html to xhtml, see `tidy-buffer' + +Some smaller, useful, but easy-to-miss features: + +* Following links. The href and src attribute names are + underlined and a special keymap is bound to + them:\\ + + \\[mlinks-backward-link], \\[mlinks-forward-link] Move + between underlined href/src attributes + + \\[mlinks-goto], Mouse-1 Follow link inside Emacs + (if possible) + + It is even a little bit quicker when the links are in an active + state (marked with the face `isearch'):\\ + + \\[mlinks-backward-link], \\[mlinks-forward-link] Move + between underlined href/src attributes + \\[mlinks-goto], Mouse-1 Follow link inside Emacs (if possible) + + If the link is not into a file that you can edit (a mailto link + for example) you will be prompted for an alternative action. + +* Creating links. To make it easier to create links to id/name + attribute in different files there are two special + functions:\\ + + \\[nxhtml-save-link-to-here] copy link to id/name (you must + be in the tag to get the link) + \\[nxhtml-paste-link-as-a-tag] paste this as an a-tag. + +This minor mode also adds some bindings: + +\\{nxhtml-menu-mode-map} + +--------- +* Note: Some of the features supported are optional and available + only if other Emacs modules are found. Use + \\[nxhtml-features-check] to get a list of these optional + features and modules needed. You should however have no problem + with this if you have followed the installation instructions + for nXhtml. + +\(fn &optional ARG)" t nil) + +(nxhtml-autoload 'nxhtml-overview `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-menu" nxhtml-install-dir) "\ +Show a HTML page with an overview of nXhtml. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (nxhtml-validation-header-mode nxhtml-short-tag-help +;;;;;; nxhtml-mode) "../../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mode" +;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mode.el" (19412 +;;;;;; 30366)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mode.el +(web-autoload-require 'nxhtml-mode 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mode" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(when (fboundp 'nxml-mode) +(nxhtml-autoload 'nxhtml-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mode" nxhtml-install-dir) "\ +Major mode for editing XHTML documents. +It is based on `nxml-mode' and adds some features that are useful +when editing XHTML files.\\ + +The XML menu contains functionality added by `nxml-mode' (on +which this major mode is based). There is also a popup menu +added to the [apps] key. + +The most important features are probably completion and +validation, which is inherited from `nxml-mode' with some small +addtions. In very many situation you can use completion. To +access it type \\[nxml-complete]. Completion has been enhanced in +the following way: + +- If region is active and visible then completion will surround the + region with the chosen tag's start and end tag. However only the + starting point is checked for validity. If something is wrong after + insertion you will however immediately see it if you have validation + on. +- It can in some cases give assistance with attribute values. +- Completion can be customized, see the menus XHTML - Completion: + * You can use a menu popup style completion. + * You can have alternatives grouped. + * You can get a short help text shown for each alternative. +- There does not have to be a '<' before point for tag name + completion. (`nxml-mode' requires a '<' before point for tag name + completion.) +- Completes xml version and encoding. +- Completes in an empty buffer, ie inserts a skeleton. + +Here are all key bindings in nxhtml-mode itself: + +\\{nxhtml-mode-map} + +Notice that other minor mode key bindings may also be active, as +well as emulation modes. Do \\[describe-bindings] to get a list +of all active key bindings. Also, *VERY IMPORTANT*, if mumamo is +used in the buffer each mumamo chunk has a different major mode +with different key bindings. You can however still see all +bindings with \\[describe-bindings], but you have to do that with +point in the mumamo chunk you want to know the key bindings in. + +\(fn)" t nil)) + +(nxhtml-autoload 'nxhtml-short-tag-help `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mode" nxhtml-install-dir) "\ +Display description of tag TAG. If TAG is omitted, try tag at point. + +\(fn TAG)" t nil) + +(when (fboundp 'nxml-mode) +(nxhtml-autoload 'nxhtml-validation-header-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mode" nxhtml-install-dir) "\ +If on use a Fictive XHTML Validation Header for the buffer. +See `nxhtml-set-validation-header' for information about Fictive XHTML Validation Headers. + +This mode may be turned on automatically in two ways: +- If you try to do completion of a XHTML tag or attribute then + `nxthml-mode' may ask you if you want to turn this mode on if + needed. +- You can also choose to have it turned on automatically whenever + a mumamo multi major mode is used, see + `nxhtml-validation-header-if-mumamo' for further information. + +\(fn &optional ARG)" t nil)) + +;;;*** + +;;;### (autoloads (mako-nxhtml-mumamo-mode asp-nxhtml-mumamo-mode +;;;;;; eruby-nxhtml-mumamo-mode jsp-nxhtml-mumamo-mode gsp-nxhtml-mumamo-mode +;;;;;; smarty-nxhtml-mumamo-mode mjt-nxhtml-mumamo-mode genshi-nxhtml-mumamo-mode +;;;;;; mason-nxhtml-mumamo-mode django-nxhtml-mumamo-mode embperl-nxhtml-mumamo-mode +;;;;;; nxhtml-mumamo-mode) "../../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo" +;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo.el" (19390 +;;;;;; 29616)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo.el +(web-autoload-require 'nxhtml-mumamo 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'nxhtml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo" nxhtml-install-dir) "\ +Turn on multiple major modes for (X)HTML with main mode `nxhtml-mode'. +This covers inlined style and javascript and PHP. + +See also `mumamo-alt-php-tags-mode'." t) + +(nxhtml-autoload 'embperl-nxhtml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo" nxhtml-install-dir) "\ +Turn on multiple major modes for Embperl files with main mode `nxhtml-mode'. +This also covers inlined style and javascript." t) + +(nxhtml-autoload 'django-nxhtml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo" nxhtml-install-dir) "\ +Turn on multiple major modes for Django with main mode `nxhtml-mode'. +This also covers inlined style and javascript." t) + +(nxhtml-autoload 'mason-nxhtml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo" nxhtml-install-dir) "\ +Turn on multiple major modes for Mason using main mode `nxhtml-mode'. +This covers inlined style and javascript." t) + +(nxhtml-autoload 'genshi-nxhtml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo" nxhtml-install-dir) "\ +Turn on multiple major modes for Genshi with main mode `nxhtml-mode'. +This also covers inlined style and javascript." t) + +(nxhtml-autoload 'mjt-nxhtml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo" nxhtml-install-dir) "\ +Turn on multiple major modes for MJT with main mode `nxhtml-mode'. +This also covers inlined style and javascript." t) + +(nxhtml-autoload 'smarty-nxhtml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo" nxhtml-install-dir) "\ +Turn on multiple major modes for Smarty with main mode `nxhtml-mode'. +This also covers inlined style and javascript." t) + +(nxhtml-autoload 'gsp-nxhtml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo" nxhtml-install-dir) "\ +Turn on multiple major modes for GSP with main mode `nxhtml-mode'. +This also covers inlined style and javascript." t) + +(nxhtml-autoload 'jsp-nxhtml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo" nxhtml-install-dir) "\ +Turn on multiple major modes for JSP with main mode `nxhtml-mode'. +This also covers inlined style and javascript." t) + +(nxhtml-autoload 'eruby-nxhtml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo" nxhtml-install-dir) "\ +Turn on multiple major modes for eRuby with main mode `nxhtml-mode'. +This also covers inlined style and javascript." t) + +(nxhtml-autoload 'asp-nxhtml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo" nxhtml-install-dir) "\ +Turn on multiple major modes for ASP with main mode `nxhtml-mode'. +This also covers inlined style and javascript." t) + +(nxhtml-autoload 'mako-nxhtml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-mumamo" nxhtml-install-dir) "\ +Turn on multiple major modes for Mako with main mode `nxhtml-mode'. +This also covers inlined style and javascript." t) + +;;;*** + +;;;### (autoloads (nxml-where-global-mode nxml-where-mode nxml-where) +;;;;;; "../../../../../.emacs.d/nxhtml/nxhtml/nxml-where" "../../../../.emacs.d/nxhtml/nxhtml/nxml-where.el" +;;;;;; (19365 37362)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/nxml-where.el +(web-autoload-require 'nxml-where 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxml-where" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'nxml-where 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/nxhtml/nxml-where" loads) nil (put 'nxml-where 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/nxhtml/nxml-where" loads)))) + +(nxhtml-autoload 'nxml-where-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxml-where" nxhtml-install-dir) "\ +Shows path in mode line. + +\(fn &optional ARG)" t nil) + +(defvar nxml-where-global-mode nil "\ +Non-nil if Nxml-Where-Global mode is enabled. +See the command `nxml-where-global-mode' for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `nxml-where-global-mode'.") + +(nxhtml-custom-autoload 'nxml-where-global-mode '../../../../../.emacs.d/nxhtml/nxhtml/nxml-where nil) + +(nxhtml-autoload 'nxml-where-global-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/nxml-where" nxhtml-install-dir) "\ +Toggle Nxml-Where mode in every possible buffer. +With prefix ARG, turn Nxml-Where-Global mode on if and only if +ARG is positive. +Nxml-Where mode is enabled in all buffers where +`nxml-where-turn-on-in-nxml-child' would do it. +See `nxml-where-mode' for more information on Nxml-Where mode. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (rngalt-set-validation-header) "../../../../../.emacs.d/nxhtml/nxhtml/rngalt" +;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/rngalt.el" (19365 37362)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/rngalt.el +(web-autoload-require 'rngalt 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/rngalt" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'rngalt-set-validation-header `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/rngalt" nxhtml-install-dir) "\ +Not documented + +\(fn START-OF-DOC)" nil nil) + +;;;*** + +;;;### (autoloads (tidy-build-menu tidy) "../../../../../.emacs.d/nxhtml/nxhtml/tidy-xhtml" +;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/tidy-xhtml.el" (19364 +;;;;;; 59816)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/tidy-xhtml.el +(web-autoload-require 'tidy-xhtml 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/tidy-xhtml" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'tidy 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/nxhtml/tidy-xhtml" loads) nil (put 'tidy 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/nxhtml/tidy-xhtml" loads)))) + +(nxhtml-autoload 'tidy-build-menu `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/tidy-xhtml" nxhtml-install-dir) "\ +Set up the tidy menu in MAP. +Used to set up a Tidy menu in your favourite mode. + +\(fn &optional MAP)" t nil) + +;;;*** + +;;;### (autoloads (xhtml-help xhtml-help-show-tag-ref xhtml-help-tag-at-point +;;;;;; xhtml-help-show-css-ref) "../../../../../.emacs.d/nxhtml/nxhtml/xhtml-help" +;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/xhtml-help.el" (19364 +;;;;;; 59816)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml/xhtml-help.el +(web-autoload-require 'xhtml-help 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/xhtml-help" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'xhtml-help-show-css-ref `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/xhtml-help" nxhtml-install-dir) "\ +Show CSS reference for CSS property name at point. + +\(fn)" t nil) + +(nxhtml-autoload 'xhtml-help-tag-at-point `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/xhtml-help" nxhtml-install-dir) "\ +Get xhtml tag name at or before point. + +\(fn)" nil nil) + +(nxhtml-autoload 'xhtml-help-show-tag-ref `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml/xhtml-help" nxhtml-install-dir) "\ +Show xhtml reference for tag name at or before point. + +\(fn)" t nil) + +(let ((loads (get 'xhtml-help 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/nxhtml/xhtml-help" loads) nil (put 'xhtml-help 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/nxhtml/xhtml-help" loads)))) + +;;;*** + +;;;### (autoloads (nxhtmlmaint-byte-uncompile-all nxhtmlmaint-byte-recompile +;;;;;; nxhtmlmaint-start-byte-compilation) "../../../../../.emacs.d/nxhtml/nxhtmlmaint" +;;;;;; "../../../../.emacs.d/nxhtml/nxhtmlmaint.el" (19378 49412)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtmlmaint.el +(web-autoload-require 'nxhtmlmaint 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtmlmaint" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'nxhtmlmaint-start-byte-compilation `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtmlmaint" nxhtml-install-dir) "\ +Start byte compilation of nXhtml in new Emacs instance. +Byte compiling in general makes elisp code run 5-10 times faster +which is quite noticeable when you use nXhtml. + +This will also update the file nxhtml-loaddefs.el. + +You must restart Emacs to use the byte compiled files. + +If for some reason the byte compiled files does not work you can +remove then with `nxhtmlmaint-byte-uncompile-all'. + +\(fn)" t nil) + +(nxhtml-autoload 'nxhtmlmaint-byte-recompile `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtmlmaint" nxhtml-install-dir) "\ +Recompile or compile all nXhtml files in current Emacs. + +\(fn)" t nil) + +(nxhtml-autoload 'nxhtmlmaint-byte-uncompile-all `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtmlmaint" nxhtml-install-dir) "\ +Delete byte compiled files in nXhtml. +This will also update the file nxhtml-loaddefs.el. + +See `nxhtmlmaint-start-byte-compilation' for byte compiling. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (csharp-mode csharp-mode-hook) "../../../../../.emacs.d/nxhtml/related/csharp-mode" +;;;;;; "../../../../.emacs.d/nxhtml/related/csharp-mode.el" (19412 +;;;;;; 27328)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/related/csharp-mode.el +(web-autoload-require 'csharp-mode 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/csharp-mode" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(add-to-list 'auto-mode-alist '("\\.cs$" . csharp-mode)) + +(defvar csharp-mode-hook nil "\ +*Hook called by `csharp-mode'.") + +(nxhtml-custom-autoload 'csharp-mode-hook '../../../../../.emacs.d/nxhtml/related/csharp-mode t) + +(nxhtml-autoload 'csharp-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/csharp-mode" nxhtml-install-dir) "\ +Major mode for editing C# code. This mode is derived from CC Mode to +support C#. + +The hook `c-mode-common-hook' is run with no args at mode +initialization, then `csharp-mode-hook'. + +This mode will automatically add a regexp for Csc.exe error and warning +messages to the `compilation-error-regexp-alist'. + +Key bindings: +\\{csharp-mode-map} + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (django-mode) "../../../../../.emacs.d/nxhtml/related/django" +;;;;;; "../../../../.emacs.d/nxhtml/related/django.el" (19411 8712)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/related/django.el +(web-autoload-require 'django 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/django" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'django-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/django" nxhtml-install-dir) "\ +Simple Django mode for use with mumamo. +This mode only provides syntax highlighting. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (flymake-css-load) "../../../../../.emacs.d/nxhtml/related/flymake-css" +;;;;;; "../../../../.emacs.d/nxhtml/related/flymake-css.el" (19292 +;;;;;; 15280)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/related/flymake-css.el +(web-autoload-require 'flymake-css 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/flymake-css" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'flymake-css-load `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/flymake-css" nxhtml-install-dir) "\ +Not documented + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (flymake-java-1-load) "../../../../../.emacs.d/nxhtml/related/flymake-java-1" +;;;;;; "../../../../.emacs.d/nxhtml/related/flymake-java-1.el" (19264 +;;;;;; 30606)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/related/flymake-java-1.el +(web-autoload-require 'flymake-java-1 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/flymake-java-1" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'flymake-java-1-load `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/flymake-java-1" nxhtml-install-dir) "\ +Not documented + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (flymake-js-load flymake-js) "../../../../../.emacs.d/nxhtml/related/flymake-js" +;;;;;; "../../../../.emacs.d/nxhtml/related/flymake-js.el" (19218 +;;;;;; 45782)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/related/flymake-js.el +(web-autoload-require 'flymake-js 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/flymake-js" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'flymake-js 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/related/flymake-js" loads) nil (put 'flymake-js 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/related/flymake-js" loads)))) + +(nxhtml-autoload 'flymake-js-load `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/flymake-js" nxhtml-install-dir) "\ +Not documented + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (iss-mode) "../../../../../.emacs.d/nxhtml/related/iss-mode" +;;;;;; "../../../../.emacs.d/nxhtml/related/iss-mode.el" (19294 +;;;;;; 57644)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/related/iss-mode.el +(web-autoload-require 'iss-mode 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/iss-mode" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'iss-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/iss-mode" nxhtml-install-dir) "\ +Major mode for editing InnoSetup script files. Upon startup iss-mode-hook is run. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (iss-mumamo-mode) "../../../../../.emacs.d/nxhtml/related/iss-mumamo" +;;;;;; "../../../../.emacs.d/nxhtml/related/iss-mumamo.el" (19294 +;;;;;; 57644)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/related/iss-mumamo.el +(web-autoload-require 'iss-mumamo 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/iss-mumamo" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'iss-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/iss-mumamo" nxhtml-install-dir) "\ +Turn on multiple major modes Inno Setup .iss files. +The main major mode will be `iss-mode'. +The [code] section, if any, will be in `pascal-mode'." t) + +;;;*** + +;;;### (autoloads (inferior-moz-mode moz-minor-mode) "../../../../../.emacs.d/nxhtml/related/moz" +;;;;;; "../../../../.emacs.d/nxhtml/related/moz.el" (19048 2104)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/related/moz.el +(web-autoload-require 'moz 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/moz" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'moz-minor-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/moz" nxhtml-install-dir) "\ +MozRepl minor mode for interaction with Firefox. +With no argument, this command toggles the mode. +Non-null prefix argument turns on the mode. +Null prefix argument turns off the mode. + +When this minor mode is enabled, some commands become available +to send current code area (as understood by c-mark-function) or +region or buffer to an inferior MozRepl process (which will be +started as needed). + +The following keys are bound in this minor mode: + +\\{moz-minor-mode-map} + +\(fn &optional ARG)" t nil) + +(nxhtml-autoload 'inferior-moz-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/moz" nxhtml-install-dir) "\ +Major mode for interacting with Firefox via MozRepl. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (global-mozadd-mirror-mode mozadd-mirror-mode global-mozadd-refresh-edited-on-save-mode +;;;;;; mozadd-refresh-edited-on-save-mode) "../../../../../.emacs.d/nxhtml/related/mozadd" +;;;;;; "../../../../.emacs.d/nxhtml/related/mozadd.el" (19235 5252)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/related/mozadd.el +(web-autoload-require 'mozadd 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/mozadd" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'mozadd-refresh-edited-on-save-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/mozadd" nxhtml-install-dir) "\ +Refresh mozadd edited file in Firefox when saving file. +The mozadd edited file is the file in the last buffer visited in +`mozadd-mirror-mode'. + +You can use this for example when you edit CSS files. + +The mozadd edited file must be shown in Firefox and visible. + +\(fn &optional ARG)" t nil) + +(defvar global-mozadd-refresh-edited-on-save-mode nil "\ +Non-nil if Global-Mozadd-Refresh-Edited-On-Save mode is enabled. +See the command `global-mozadd-refresh-edited-on-save-mode' for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `global-mozadd-refresh-edited-on-save-mode'.") + +(nxhtml-custom-autoload 'global-mozadd-refresh-edited-on-save-mode '../../../../../.emacs.d/nxhtml/related/mozadd nil) + +(nxhtml-autoload 'global-mozadd-refresh-edited-on-save-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/mozadd" nxhtml-install-dir) "\ +Toggle Mozadd-Refresh-Edited-On-Save mode in every possible buffer. +With prefix ARG, turn Global-Mozadd-Refresh-Edited-On-Save mode on if and only if +ARG is positive. +Mozadd-Refresh-Edited-On-Save mode is enabled in all buffers where +`(lambda nil (when (or (derived-mode-p (quote css-mode)) (mozadd-html-buffer-file-p)) (mozadd-refresh-edited-on-save-mode 1)))' would do it. +See `mozadd-refresh-edited-on-save-mode' for more information on Mozadd-Refresh-Edited-On-Save mode. + +\(fn &optional ARG)" t nil) + +(nxhtml-autoload 'mozadd-mirror-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/mozadd" nxhtml-install-dir) "\ +Mirror content of current file buffer immediately in Firefox. +When you turn on this mode the file will be opened in Firefox. +Every change you make in the buffer will trigger a redraw in +Firefox - regardless of if you save the file or not. + +For the mirroring to work the edited file must be shown in +Firefox and visible. + +If `nxml-where-mode' is on the marks will also be shown in +Firefox as CSS outline style. You can customize the style +through the option `mozadd-xml-path-outline-style'. + +See also `mozadd-refresh-edited-on-save-mode'. + +\(fn &optional ARG)" t nil) + +(defvar global-mozadd-mirror-mode nil "\ +Non-nil if Global-Mozadd-Mirror mode is enabled. +See the command `global-mozadd-mirror-mode' for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `global-mozadd-mirror-mode'.") + +(nxhtml-custom-autoload 'global-mozadd-mirror-mode '../../../../../.emacs.d/nxhtml/related/mozadd nil) + +(nxhtml-autoload 'global-mozadd-mirror-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/mozadd" nxhtml-install-dir) "\ +Toggle Mozadd-Mirror mode in every possible buffer. +With prefix ARG, turn Global-Mozadd-Mirror mode on if and only if +ARG is positive. +Mozadd-Mirror mode is enabled in all buffers where +`(lambda nil (when (mozadd-html-buffer-file-p) (mozadd-mirror-mode 1)))' would do it. +See `mozadd-mirror-mode' for more information on Mozadd-Mirror mode. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (php-mode php-file-patterns php) "../../../../../.emacs.d/nxhtml/related/php-mode" +;;;;;; "../../../../.emacs.d/nxhtml/related/php-mode.el" (19218 +;;;;;; 45782)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/related/php-mode.el +(web-autoload-require 'php-mode 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/php-mode" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'php 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/related/php-mode" loads) nil (put 'php 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/related/php-mode" loads)))) + +(defvar php-file-patterns '("\\.php[s34]?\\'" "\\.phtml\\'" "\\.inc\\'") "\ +List of file patterns for which to automatically invoke `php-mode'.") + +(nxhtml-custom-autoload 'php-file-patterns '../../../../../.emacs.d/nxhtml/related/php-mode nil) + +(nxhtml-autoload 'php-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/php-mode" nxhtml-install-dir) "\ +Major mode for editing PHP code. + +\\{php-mode-map} + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (smarty-mode smarty) "../../../../../.emacs.d/nxhtml/related/smarty-mode" +;;;;;; "../../../../.emacs.d/nxhtml/related/smarty-mode.el" (19235 +;;;;;; 5252)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/related/smarty-mode.el +(web-autoload-require 'smarty-mode 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/smarty-mode" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'smarty 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/related/smarty-mode" loads) nil (put 'smarty 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/related/smarty-mode" loads)))) + +(nxhtml-autoload 'smarty-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/smarty-mode" nxhtml-install-dir) "\ +Smarty Mode +*********** + +Smarty Mode is a GNU XEmacs major mode for editing Smarty templates. + +1 Introduction +************** + +Smarty-Mode is a mode allowing easy edit of Smarty templates: +highlight, templates, navigation into source files... + + + +Features (new features in bold) : + + * Completion + + * Customizable + + * Highlight + + * Menu + + * Stuttering + + * Templates + - Built-in Functions + + - User Functions + + - Variable Modifiers + + - Plugin (Functions) + * BlockRepeatPlugin + + * ClipCache + + * Smarty Formtool + + * Smarty Paginate + + * Smarty Validate + + - Plugin (Variable Modifiers) + * AlternativeDateModifierPlugin + + * B2Smilies + + * BBCodePlugin + + - Fonctions Non-Smarty + + + +This manual describes Smarty Mode version 0.0.5. + +2 Installation +************** + +2.1 Requirements +================ + +Smarty Mode is a XEmacs major mode that needs the following +software/packages: + + * XEmacs (http://www.xemacs.org/). + + * `font-lock' mode generaly installed with XEmacs. + + * `assoc' mode generaly installed with XEmacs. + + * `easymenu' mode generaly installed with XEmacs. + + * `hippie-exp' mode generaly installed with XEmacs. + +Before continuing, you must be sure to have all this packages +installed. + +2.2 Download +============ + +Two internet address to download Smarty Mode : + + * Principal: Smarty-Mode 0.0.5 + (http://deboutv.free.fr/lisp/smarty/download/smarty-0.0.5.tar.gz) + (http://deboutv.free.fr/lisp/smarty/) + + * Secondary: Smarty-Mode 0.0.5 + (http://www.morinie.fr/lisp/smarty/download/smarty-0.0.5.tar.gz) + (http://www.morinie.fr/lisp/smarty/) + + * Old releases: Smarty-Mode + (http://deboutv.free.fr/lisp/smarty/download.php) + (http://deboutv.free.fr/lisp/smarty/) + +2.3 Installation +================ + +2.3.1 Installation +------------------ + +To install Smarty Mode you need to choose an installation directory +\(for example `/usr/local/share/lisp' or `c:lisp'). The administrator +must have the write rights on this directory. + +With your favorite unzip software, unzip the archive in the +installation directory. + +Example: + cd /usr/local/share/lisp + tar zxvf smarty-0.0.5.tar.gz +Now you have a `smarty' directory in the installation directory. This +directory contains 2 files `smarty-mode.el' and `smarty-mode.elc' and +another directory `docs' containing the documentation. + +You need to configure XEmacs. open you initialization file `init.el' +\(open the file or start XEmacs then choose the Options menu and Edit +Init File). Add the following lines (the installation directory in +this example is `/usr/local/share/lisp') : + + (setq load-path + (append (list \"/usr/local/share/lisp/\") load-path)) + (nxhtml-autoload 'smarty-mode \"smarty-mode\" \"Smarty Mode\" t) + +2.3.2 Update +------------ + +The update is easy. You need to unzip the archive in the installation +directory to remove the old release. + +Example: + cd /usr/local/share/lisp + rm -rf smarty + tar zxvf smarty-0.0.5.tar.gz + +2.4 Invoke Smarty-Mode +====================== + +You have two possibilities to invoke the Smarty Mode. + + - Manually: At each file opening you need to launch Smarty Mode + with the following command: + + `M-x smarty-mode' + + - Automatically: Add the following linesin your initialization + file `init.el' : + + (setq auto-mode-alist + (append + '((\"\\.tpl$\" . smarty-mode)) + auto-mode-alist)) + + +3 Customization +*************** + +This chapter describes the differents parameters and functions that +you can change to customize Smarty Mode. To do that, open a Smarty +file, click on the Smarty menu and choose Options then Browse +Options.... + +3.1 Parameters +============== + +3.1.1 Mode +---------- + +Smarty Mode has 2 modes allowing to simplify the writing of Smarty +templates. You can enable/disable each mode individually. + +`smarty-electric-mode' + Type: boolean + Default value: `t' + Description: If `t'; enable automatic generation of template. + If `nil'; template generators can still be invoked through key + bindings and menu. Is indicated in the modeline by \"/e\" after + the mode name and can be toggled by `smarty-electric-mode'. + +`smarty-stutter-mode' + Type: boolean + Default value: `t' + Description: If `t'; enable the stuttering. Is indicated in the + modeline by \"/s\" after the mode name and can be toggled by + `smarty-stutter-mode'. + +3.1.2 Menu +---------- + +Smarty Mode has also 1 menu that you can enable/disable. The menu +Sources is specific to each Smarty files opened. + +`smarty-source-file-menu' + Type: boolean + Default value: `t' + Description: If `t'; the Sources menu is enabled. This menu + contains the list of Smarty file located in the current + directory. The Sources menu scans the directory when a file is + opened. + +3.1.3 Menu +---------- + +`smarty-highlight-plugin-functions' + Type: boolean + Default value: `t' + Description: If `t'; the functions described in the smarty + plugins are highlighted. + +3.1.4 Templates +--------------- + +3.1.4.1 Header +.............. + +`smarty-file-header' + Type: string + Default value: `\"\"' + Description: String or file to insert as file header. If the + string specifies an existing file name the contents of the file + is inserted; otherwise the string itself is inserted as file + header. + Type `C-j' for newlines. + The follonwing keywords are supported: + : replaced by the file name. + : replaced by the user name and email address. + : replaced by `user-login-name'. + : replaced by `smarty-company-name' content. + : replaced by the current date. + : replaced by the current year. + : replaced by `smarty-copyright-string' content. + : final cursor position. + +`smarty-file-footer' + Type: string + Default value: `\"\"' + Description: String or file to insert as file footer. See + `smarty-file-header' + +`smarty-company-name' + Type: string + Default value: `\"\"' + Description: Name of the company to insert in file header. + +`smarty-copyright-string' + Type: string + Default value: `\"\"' + Description: Coryright string to insert in file header. + +`smarty-date-format' + Type: string + Default value: `\"%Y-%m-%d\"' + Description: Date format. + +`smarty-modify-date-prefix-string' + Type: string + Default value: `\"\"' + Description: Prefix string of modification date in Smarty file + header. + +`smarty-modify-date-on-saving' + Type: bool + Default value: `nil' + Description: If `t'; update the modification date when the + buffer is saved. + +3.1.5 Miscellaneous +------------------- + +`smarty-left-delimiter' + Type: string + Default value: `\"\"' + Description: Left escaping delimiter for Smarty templates. + +`smarty-right-delimiter' + Type: string + Default value: `\"\"' + Description: Right escaping delimiter for Smarty templates. + +`smarty-intelligent-tab' + Type: bool + Default value: `t' + Description: If `t'; TAB does indentation; completion and insert + tabulations. If `nil'; TAB does only indentation. + +`smarty-word-completion-in-minibuffer' + Type: bool + Default value: `t' + Description: If `t'; enable completion in the minibuffer. + +`smarty-word-completion-case-sensitive' + Type: bool + Default value: `nil' + Description: If `t'; completion is case sensitive. + +3.2 Functions +============= + +3.2.1 Mode +---------- + +`smarty-electric-mode' + Menu: Smarty -> Options -> Mode -> Electric Mode + Keybinding: `C-c C-m C-e' + Description: This functions is used to enable/disable the + electric mode. + +`smarty-stutter-mode' + Menu: Smarty -> Options -> Mode -> Stutter Mode + Keybinding: `C-c C-m C-s' + Description: This function is used to enable/disable the stutter + mode. + +4 Menus +******* + +There are 2 menus: Smarty and Sources. All theses menus can be +accessed from the menubar or from the right click. This chapter +describes each menus. + +4.1 Smarty +========== + +This is the main menu of Smarty Mode. It allows an easy access to the +main features of the Smarty Mode: Templates (see *Note Templates::) +and Options (see *Note Customization::). + +This menu contains also 3 functions that are discussed in the next +part. + +4.1.1 Functions +--------------- + +`smarty-show-messages' + Menu: Smarty -> Show Messages + Keybinding: `C-c M-m' + Description: This function opens the *Messages* buffer to + display previous error messages. + +`smarty-doc-mode' + Menu: Smarty -> Smarty Mode Documentation + Keybinding: `C-c C-h' + Description: This function opens the *Help* buffer and prints in + it the Smarty Mode documentation. + +`smarty-version' + Menu: Smarty -> Version + Keybinding: `C-c C-v' + Description: This function displays in the minibuffer the + current Smarty Mode version with the timestamp. + +4.2 Sources +=========== + +The Sources menu shows the Smarty files in the current directory. If +you add or delete a file in the current directory, you need to +refresh the menu. + +4.2.1 Customization +------------------- + +`smarty-source-file-menu' + Type: boolean + Default value: `t' + Description: If `t'; the Sources menu is enabled. This menu + contains the list of Smarty file located in the current + directory. The Sources menu scans the directory when a file is + opened. + +4.2.2 Functions +--------------- + +`smarty-add-source-files-menu' + Menu: Sources -> *Rescan* + Keybinding: `C-c C-s C-u' + Description: This function is used to refresh the Sources menu. + +5 Stuttering +************ + +The stutter mode is a mode that affects a function to a key. For +example, when you use the `ENTER' key, the associated function will +create a new line and indent it. + +5.1 Customization +================= + +`smarty-stutter-mode' + Type: boolean + Default value: `t' + Description: If `t'; enable the stuttering. Is indicated in the + modeline by \"/s\" after the mode name and can be toggled by + `smarty-stutter-mode'. + +5.2 Functions +============= + +`SPACE' + If in comment, indent the comment and add new line if necessary. + In other case, add a space. + +`(' + If the previous character is a `(', the `((' will be replaced by + `['. + If the previous character is a `[', the `[(' will be replaced by + `{'. + In other case, insert a `('. + +`)' + If the previous character is a `)', the `))' will be replaced by + `]'. + If the previous character is a `]', the `])' will be replaced by + `}'. + In other case, insert a `)'. + +6 Templates +*********** + +In the Smarty Mode, the Smarty functions (like if, while, for, fopen, +fclose) are predefined in functions called \"Templates\". + +Each template can be invoked by the function name or by using the + key after the Smarty function name in the buffer (Note, using +`M-' disable the template). + +A template can be aborted by using the `C-g' or by lefting empty the +tempate prompt (in the minibuffer). + +6.1 Customization +================= + +`smarty-electric-mode' + Type: boolean + Default value: `t' + Description: If `t'; enable automatic generation of template. + If `nil'; template generators can still be invoked through key + bindings and menu. Is indicated in the modeline by \"/e\" after + the mode name and can be toggled by `smarty-electric-mode'. + +For a complete description of the template customizable variables, +see *Note Cu01-Pa01-Template:: + +6.2 Functions +============= + +6.2.1 Smarty Functions +---------------------- + +For Smarty functions, see PDF or HTML documentation. + +6.2.2 Non-Smarty Functions +-------------------------- + +`smarty-template-header' + Menu: Smarty -> Templates -> Insert Header + Keybinding: `C-c C-t C-h' + Description: This function is used to insert a header in the + current buffer. + +`smarty-template-footer' + Menu: Smarty -> Templates -> Insert Footer + Keybinding: `C-c C-t C-f' + Description: This function is used to insert a footer in the + current buffer. + +`smarty-template-insert-date' + Menu: Smarty -> Templates -> Insert Date + Keybinding: `C-c C-t C-d i' + Description: This function is used to insert the date in the + current buffer. + +`smarty-template-modify' + Menu: Smarty -> Templates -> Modify Date + Keybinding: `C-c C-t C-d m' + Description: This function is used to modify the last + modification date in the current buffer. + +7 Bugs, Help +************ + + * To report bugs: Bugtracker + (http://bugtracker.morinie.fr/lisp/set_project.php?project_id=2) + + * To obtain help you can post on the dedicated forum: Forum + (http://forum.morinie.fr/lisp/) + +8 Key bindings +************** + +\\{smarty-mode-map} + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (tt-mode) "../../../../../.emacs.d/nxhtml/related/tt-mode" +;;;;;; "../../../../.emacs.d/nxhtml/related/tt-mode.el" (18603 15794)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/related/tt-mode.el +(web-autoload-require 'tt-mode 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/tt-mode" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'tt-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/tt-mode" nxhtml-install-dir) "\ +Major mode for editing Template Toolkit files. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (visual-basic-mode) "../../../../../.emacs.d/nxhtml/related/visual-basic-mode" +;;;;;; "../../../../.emacs.d/nxhtml/related/visual-basic-mode.el" +;;;;;; (19235 5252)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/related/visual-basic-mode.el +(web-autoload-require 'visual-basic-mode 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/visual-basic-mode" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'visual-basic-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/visual-basic-mode" nxhtml-install-dir) "\ +A mode for editing Microsoft Visual Basic programs. +Features automatic indentation, font locking, keyword capitalization, +and some minor convenience functions. +Commands: +\\{visual-basic-mode-map} + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (wikipedia-draft-buffer wikipedia-draft-page wikipedia-draft +;;;;;; wikipedia-mode) "../../../../../.emacs.d/nxhtml/related/wikipedia-mode" +;;;;;; "../../../../.emacs.d/nxhtml/related/wikipedia-mode.el" (19278 +;;;;;; 3422)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/related/wikipedia-mode.el +(web-autoload-require 'wikipedia-mode 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/wikipedia-mode" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'wikipedia-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/wikipedia-mode" nxhtml-install-dir) "\ +Major mode for editing wikimedia style wikis. +Major mode for editing articles written in the markup language +used by Wikipedia, the free on-line +encyclopedia (see URL `http://www.wikipedia.org'). + +There are several ways to use wikipedia-mode: + +- You can simply cut and paste articles between Emacs and your + web browser's text box. +- If you are using Firefox you can use the It's All Text add-on + for Firefox. +- You can use MozEx, a Mozilla/Firefox web browser extension that + allows you to call Emacs from a text + box (see URL `http://mozex.mozdev.org/'). +- Another way is to use the PERL script ee-helper, which allows + you to up and download wiki texts. + +Wikipedia articles are usually unfilled: newline characters are not +used for breaking paragraphs into lines. Unfortunately, Emacs does not +handle word wrapping yet. As a workaround, wikipedia-mode turns on +longlines-mode automatically. In case something goes wrong, the +following commands may come in handy: + +\\[wikipedia-fill-article] fills the buffer. +\\[wikipedia-unfill-article] unfills the buffer. +Be warned that function can be dead slow, better use wikipedia-unfill-paragraph-or-region. +\\[wikipedia-unfill-paragraph-or-region] unfills the paragraph +\\[wikipedia-unfill-paragraph-simple] doehe same but simpler. + + + +The following commands put in markup structures. + +\\[wikipedia-insert-bold-italic] bold+italic +\\[wikipedia-insert-bold] bold text +\\[wikipedia-insert-italics] italics +\\[wikipedia-insert-nowiki] no wiki markup +\\[wikipedia-insert-link-wiki] inserts a link + +The following commands are also defined: +\\[wikipedia-insert-user] inserts user name +\\[wikipedia-insert-signature] inserts ~~~~ +\\[wikipedia-insert-enumerate] inserts enumerate type structures +\\[wikipedia-insert-itemize] inserts itemize type structures +\\[wikipedia-insert-hline] inserts a hline + +The draft functionality +\\[wikipedia-draft] +\\[wikipedia-draft-region] +\\[wikipedia-draft-view-draft] +\\[wikipedia-draft-page] +\\[wikipedia-draft-buffer] + +Replying and sending functionality +\\[wikipedia-reply-at-point-simple] +\\[wikipedia-draft-reply] + + +The register functionality +\\[wikipedia-copy-page-to-register] +\\[defun wikipedia-insert-page-to-register] + + +Some simple editing commands. +\\[wikipedia-enhance-indent] +\\[wikipedia-yank-prefix] +\\[wikipedia-unfill-paragraph-or-region] + + + +\\[wikipedia-terminate-paragraph] starts a new list item or paragraph in a context-aware manner. + +\(fn)" t nil) + +(nxhtml-autoload 'wikipedia-draft `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/wikipedia-mode" nxhtml-install-dir) "\ +Open a temporary buffer in wikipedia mode for editing an + wikipedia draft, which an arbitrary piece of data. After + finishing the editing either use \\[wikipedia-draft-buffer] to + send the data into the wikipedia-draft-data-file, or send the + buffer using `wikipedia-draft-send-to-mozex' and insert it later + into a wikipedia article. + +\(fn)" t nil) + +(nxhtml-autoload 'wikipedia-draft-page `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/wikipedia-mode" nxhtml-install-dir) "\ +Not documented + +\(fn)" t nil) + +(nxhtml-autoload 'wikipedia-draft-buffer `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/related/wikipedia-mode" nxhtml-install-dir) "\ +Wikipedia-draft-buffer sends the contents of the current (temporary) +buffer to the wikipedia-draft-buffer, see the variable +wikipedia-draft-data-file. + +\(fn)" t nil) + +(defvar wikipedia-draft-send-archive t "\ +*Archive the reply.") + +;;;*** + +;;;### (autoloads (ert-run-tests-interactively ert-deftest) "../../../../../.emacs.d/nxhtml/tests/ert" +;;;;;; "../../../../.emacs.d/nxhtml/tests/ert.el" (19173 59742)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/tests/ert.el +(web-autoload-require 'ert 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/tests/ert" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'ert-deftest `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/tests/ert" nxhtml-install-dir) "\ +Define NAME (a symbol) as a test. + +\(fn NAME () [:documentation DOCSTRING] [:expected-result TYPE] BODY...)" nil (quote macro)) + +(put 'ert-deftest 'lisp-indent-function '2) + +(nxhtml-autoload 'ert-run-tests-interactively `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/tests/ert" nxhtml-install-dir) "\ +Run the tests specified by SELECTOR and display the results in a buffer. + +\(fn SELECTOR &optional OUTPUT-BUFFER-NAME MESSAGE-FN)" t nil) + +;;;*** + +;;;### (autoloads (nxhtmltest-run-Q) "../../../../../.emacs.d/nxhtml/tests/nxhtmltest-Q" +;;;;;; "../../../../.emacs.d/nxhtml/tests/nxhtmltest-Q.el" (19264 +;;;;;; 40286)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/tests/nxhtmltest-Q.el +(web-autoload-require 'nxhtmltest-Q 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/tests/nxhtmltest-Q" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'nxhtmltest-run-Q `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/tests/nxhtmltest-Q" nxhtml-install-dir) "\ +Run all tests defined for nXhtml in fresh Emacs. +See `nxhtmltest-run' for more information about the tests. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (nxhtmltest-run nxhtmltest-run-indent) "../../../../../.emacs.d/nxhtml/tests/nxhtmltest-suites" +;;;;;; "../../../../.emacs.d/nxhtml/tests/nxhtmltest-suites.el" +;;;;;; (19360 9896)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/tests/nxhtmltest-suites.el +(web-autoload-require 'nxhtmltest-suites 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/tests/nxhtmltest-suites" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'nxhtmltest-run-indent `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/tests/nxhtmltest-suites" nxhtml-install-dir) "\ +Run indentation tests. + +\(fn)" t nil) + +(nxhtml-autoload 'nxhtmltest-run `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/tests/nxhtmltest-suites" nxhtml-install-dir) "\ +Run all tests defined for nXhtml. +Currently there are only tests using ert.el defined. + +Note that it is currently expected that the following tests will +fail (they corresponds to known errors in nXhtml/Emacs): + + `nxhtml-ert-nxhtml-changes-jump-back-10549' + `nxhtml-ert-nxhtml-changes-jump-back-7014' + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (cancel-secondary-selection set-secondary-selection +;;;;;; anchored-transpose) "../../../../../.emacs.d/nxhtml/util/anchored-transpose" +;;;;;; "../../../../.emacs.d/nxhtml/util/anchored-transpose.el" +;;;;;; (19333 58526)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/anchored-transpose.el +(web-autoload-require 'anchored-transpose 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/anchored-transpose" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'anchored-transpose `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/anchored-transpose" nxhtml-install-dir) "\ +Transpose portions of the region around an anchor phrase. + +`this phrase but not that word' can be transposed into +`that word but not this phrase' + +I want this phrase but not that word. + |----------------------------|. .This is the entire phrase. + |-------|. . . . . . .This is the anchor phrase. + +First select the entire phrase and type \\[anchored-transpose]. +This set the secondary selection. + +Then select the anchor phrase and type \\[anchored-transpose] +again. Alternatively you can do the selections like this: + +I want this phrase but not that word. + |----------| |---------| Separate phrase selection. + +By default the anchor phrase will automatically include +any surrounding whitespace even if you don't explicitly select +it. Also, it won't include certain trailing punctuation. See +`anchored-transpose-do-fuzzy' for details. A prefix arg prior to +either selection means `no fuzzy logic, use selections +literally'. + +You can select the regions to be swapped separately in any +order. + +After swapping both primary and secondary selection are still +active. They will be canceled after second next command if you +do not swap regions again. (Second because this allow you to +adjust the regions and try again.) + +You can also swap text between different buffers this way. + +Typing \\[anchored-transpose] with nothing selected clears any +prior selection, ie secondary selection. + +\(fn BEG1 END1 FLG1 &optional BEG2 END2 FLG2 WIN2)" t nil) + +(nxhtml-autoload 'set-secondary-selection `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/anchored-transpose" nxhtml-install-dir) "\ +Set the secondary selection to the current region. +This must be bound to a mouse drag event. + +\(fn BEG END)" t nil) + +(nxhtml-autoload 'cancel-secondary-selection `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/anchored-transpose" nxhtml-install-dir) "\ +Not documented + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (appmenu-mode appmenu-add appmenu) "../../../../../.emacs.d/nxhtml/util/appmenu" +;;;;;; "../../../../.emacs.d/nxhtml/util/appmenu.el" (19276 1446)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/appmenu.el +(web-autoload-require 'appmenu 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/appmenu" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'appmenu 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/appmenu" loads) nil (put 'appmenu 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/appmenu" loads)))) + +(nxhtml-autoload 'appmenu-add `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/appmenu" nxhtml-install-dir) "\ +Add entry to `appmenu-alist'. +Add an entry to this list with ID, PRIORITY, TEST, TITLE and +DEFINITION as explained there. + +\(fn ID PRIORITY TEST TITLE DEFINITION)" nil nil) + +(defvar appmenu-mode nil "\ +Non-nil if Appmenu mode is enabled. +See the command `appmenu-mode' for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `appmenu-mode'.") + +(nxhtml-custom-autoload 'appmenu-mode '../../../../../.emacs.d/nxhtml/util/appmenu nil) + +(nxhtml-autoload 'appmenu-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/appmenu" nxhtml-install-dir) "\ +Use a context sensitive popup menu. +AppMenu (appmenu.el) is a framework for creating cooperative +context sensitive popup menus with commands from different major +and minor modes. Using this different modes may cooperate about +the use of popup menus. + +There is also the command `appmenu-as-help' that shows the key +bindings at current point in the help buffer. + +The popup menu and the help buffer version are on these keys: + +\\{appmenu-mode-map} + +The variable `appmenu-alist' is where the popup menu entries +comes from. + +If there is a `keymap' property at point then relevant bindings +from this is also shown in the popup menu. + +You can write functions that use whatever information you want in +Emacs to construct these entries. Since this information is only +collected when the popup menu is shown you do not have to care as +much about computation time as for entries in the menu bar. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (as-external-mode as-external-for-wiki as-external-for-mail-mode +;;;;;; as-external-for-xhtml as-external) "../../../../../.emacs.d/nxhtml/util/as-external" +;;;;;; "../../../../.emacs.d/nxhtml/util/as-external.el" (19292 +;;;;;; 53308)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/as-external.el +(web-autoload-require 'as-external 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/as-external" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'as-external 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/as-external" loads) nil (put 'as-external 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/as-external" loads)))) + +(nxhtml-autoload 'as-external-for-xhtml `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/as-external" nxhtml-install-dir) "\ +Setup for Firefox addon It's All Text to edit XHTML. +It's All Text is a Firefox add-on for editing textareas with an +external editor. +See URL `https://addons.mozilla.org/en-US/firefox/addon/4125'. + +In this case Emacs is used to edit textarea fields on a web page. +The text will most often be part of a web page later, like on a +blog. Therefore turn on these: + +- `nxhtml-mode' since some XHTML tags may be allowed. +- `nxhtml-validation-header-mode' since it is not a full page. +- `wrap-to-fill-column-mode' to see what you are writing. +- `html-write-mode' to see it even better. + +Also bypass the question for line end conversion when using +emacsw32-eol. + +\(fn)" t nil) + +(nxhtml-autoload 'as-external-for-mail-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/as-external" nxhtml-install-dir) "\ +Setup for Firefox addon It's All Text to edit mail. +Set normal mail comment markers in column 1 (ie >). + +Set `fill-column' to 90 and enable `wrap-to-fill-column-mode' so +that it will look similar to how it will look in the sent plain +text mail. + +See also `as-external-mode'. + +\(fn)" t nil) + +(nxhtml-autoload 'as-external-for-wiki `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/as-external" nxhtml-install-dir) "\ +Setup for Firefox addon It's All Text to edit MediaWikis. + +\(fn)" t nil) + +(defvar as-external-mode nil "\ +Non-nil if As-External mode is enabled. +See the command `as-external-mode' for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `as-external-mode'.") + +(nxhtml-custom-autoload 'as-external-mode '../../../../../.emacs.d/nxhtml/util/as-external nil) + +(nxhtml-autoload 'as-external-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/as-external" nxhtml-install-dir) "\ +If non-nil check if Emacs is called as external editor. +When Emacs is called as an external editor for example to edit +text areas on a web page viewed with Firefox this library tries +to help to setup the buffer in a useful way. It may for example +set major and minor modes for the buffer. + +This can for example be useful when blogging or writing comments +on blogs. + +See `as-external-alist' for more information. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (buffer-bg-set-color) "../../../../../.emacs.d/nxhtml/util/buffer-bg" +;;;;;; "../../../../.emacs.d/nxhtml/util/buffer-bg.el" (19255 2170)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/buffer-bg.el +(web-autoload-require 'buffer-bg 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/buffer-bg" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'buffer-bg-set-color `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/buffer-bg" nxhtml-install-dir) "\ +Add an overlay with background color COLOR to buffer BUFFER. +If COLOR is nil remove previously added overlay. + +\(fn COLOR BUFFER)" t nil) + +;;;*** + +;;;### (autoloads (chartg-make-chart chartg-complete) "../../../../../.emacs.d/nxhtml/util/chartg" +;;;;;; "../../../../.emacs.d/nxhtml/util/chartg.el" (19278 19348)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/chartg.el +(web-autoload-require 'chartg 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/chartg" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'chartg-complete `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/chartg" nxhtml-install-dir) "\ +Not documented + +\(fn)" t nil) + +(nxhtml-autoload 'chartg-make-chart `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/chartg" nxhtml-install-dir) "\ +Try to make a new chart. +If region is active then make a new chart from data in the +selected region. + +Else if current buffer is in `chartg-mode' then do it from the +chart specifications in this buffer. Otherwise create a new +buffer and initialize it with `chartg-mode'. + +If the chart specifications are complete enough to make a chart +then do it and show the resulting chart image. If not then tell +user what is missing. + +NOTE: This is beta, no alpha code. It is not ready. + +Below are some examples. To test them mark an example and do + + M-x chartg-make-chart + +* Example, simple x-y chart: + + Output-file: \"~/temp-chart.png\" + Size: 200 200 + Data: 3 8 5 | 10 20 30 + Type: line-chartg-xy + +* Example, pie: + + Output-file: \"~/temp-depression.png\" + Size: 400 200 + Data: + 2,160,000 + 3,110,000 + 1,510,000 + 73,600 + 775,000 + 726,000 + 8,180,000 + 419,000 + Type: pie-3-dimensional + Chartg-title: \"Depression hits on Google\" + Legends: + \"SSRI\" + | \"Psychotherapy\" + | \"CBT\" + | \"IPT\" + | \"Psychoanalysis\" + | \"Mindfulness\" + | \"Meditation\" + | \"Exercise\" + + +* Example, pie: + + Output-file: \"~/temp-panic.png\" + Size: 400 200 + Data: + 979,000 + 969,000 + 500,000 + 71,900 + 193,000 + 154,000 + 2,500,000 + 9,310,000 + Type: pie-3-dimensional + Chartg-title: \"Depression hits on Google\" + Legends: + \"SSRI\" + | \"Psychotherapy\" + | \"CBT\" + | \"IPT\" + | \"Psychoanalysis\" + | \"Mindfulness\" + | \"Meditation\" + | \"Exercise\" + + +* Example using raw: + + Output-file: \"~/temp-chartg-slipsen-kostar.png\" + Size: 400 130 + Data: 300 1000 30000 + Type: bar-chartg-horizontal + Chartg-title: \"Vad killen i slips tjänar jämfört med dig och mig\" + Google-chartg-raw: \"&chds=0,30000&chco=00cd00|ff4500|483d8b&chxt=y,x&chxl=0:|Killen+i+slips|Partiledarna|Du+och+jag&chf=bg,s,ffd700\" + + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (css-color-test css-color-global-mode css-color-mode +;;;;;; css-color) "../../../../../.emacs.d/nxhtml/util/css-color" +;;;;;; "../../../../.emacs.d/nxhtml/util/css-color.el" (19266 40216)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/css-color.el +(web-autoload-require 'css-color 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/css-color" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'css-color 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/css-color" loads) nil (put 'css-color 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/css-color" loads)))) + +(nxhtml-autoload 'css-color-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/css-color" nxhtml-install-dir) "\ +Show hex color literals with the given color as background. +In this mode hexadecimal colour specifications like #6600ff are +displayed with the specified colour as background. + +Certain keys are bound to special colour editing commands when +point is at a hexadecimal colour: + +\\{css-color-map} + +\(fn &optional ARG)" t nil) + +(defvar css-color-global-mode nil "\ +Non-nil if Css-Color-Global mode is enabled. +See the command `css-color-global-mode' for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `css-color-global-mode'.") + +(nxhtml-custom-autoload 'css-color-global-mode '../../../../../.emacs.d/nxhtml/util/css-color nil) + +(nxhtml-autoload 'css-color-global-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/css-color" nxhtml-install-dir) "\ +Toggle Css-Color mode in every possible buffer. +With prefix ARG, turn Css-Color-Global mode on if and only if +ARG is positive. +Css-Color mode is enabled in all buffers where +`css-color-turn-on-in-buffer' would do it. +See `css-color-mode' for more information on Css-Color mode. + +\(fn &optional ARG)" t nil) + +(nxhtml-autoload 'css-color-test `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/css-color" nxhtml-install-dir) "\ +Test colors interactively. +The colors are displayed in the echo area. You can specify the +colors as any viable css color. Example: + + red + #f00 + #0C0 + #b0ff00 + hsla(100, 50%, 25%) + rgb(255,100,120) + +\(fn FG-COLOR BG-COLOR)" t nil) + +;;;*** + +;;;### (autoloads (css-palette-global-mode css-palette css-palette-mode) +;;;;;; "../../../../../.emacs.d/nxhtml/util/css-palette" "../../../../.emacs.d/nxhtml/util/css-palette.el" +;;;;;; (19235 5252)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/css-palette.el +(web-autoload-require 'css-palette 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/css-palette" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'css-palette-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/css-palette" nxhtml-install-dir) "\ +Minor mode for palettes in CSS. + +The mode `css-palette-mode' acts on the first COLORS declaration in your + file of the form: + +COLORS: +\( +c0 \"#6f5d25\" ;tainted sand +c1 \"#000000\" ;Black +c2 \"#cca42b\" ;goldenslumber +c3 \"#6889cb\" ;far off sky +c4 \"#fff\" ;strange aeons +) + +Such declarations should appear inside a block comment, in order + to be parsed properly by the LISP reader. + +Type \\[css-palette-update-all], and any occurence of + + color: #f55; /*[c3]*/ + +will be updated with + + color: #6899cb; /*[c3]*/ + +The following commands are available to insert key-value pairs + and palette declarations: + \\{css-palette-mode-map} + +You can extend or redefine the types of palettes by defining a + new palette specification of the form (PATTERN REGEXP + REF-FOLLOWS-VALUE), named according to the naming scheme + css-palette:my-type, where + +PATTERN is a pattern containing two (%s) format directives which + will be filled in with the variable and its value, + +REGEXP is a regular expression to match a value - variable + pattern, + +and REF-FOLLOWS-VALUE defined whether or not the reference comes + after the value. This allows for more flexibility. + +Note that, although the w3c spec at URL + `http://www.w3.org/TR/CSS2/syndata.html#comments' says that + comments \" may occur anywhere between tokens, and their + contents have no influence on the rendering\", Internet + Explorer does not think so. Better keep all your comments after + a \"statement\", as per the default. This means `css-palette' + is ill-suited for use within shorthands. + +See variable `css-palette:colors' for an example of a palette + type. + +The extension mechanism means that palette types can be used to + contain arbitrary key-value mappings. + +Besides the colors palette, css-palette defines the palette + definition variables `css-palette:colors-outside' and + `css-palette:files', for colors with the reference outside and + for file url()'s respectively. + +You can fine-control which palette types css-palette should look + at via the variable `css-palette-types'. + +\(fn &optional ARG)" t nil) + +(let ((loads (get 'css-palette 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/css-palette" loads) nil (put 'css-palette 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/css-palette" loads)))) + +(defvar css-palette-global-mode nil "\ +Non-nil if Css-Palette-Global mode is enabled. +See the command `css-palette-global-mode' for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `css-palette-global-mode'.") + +(nxhtml-custom-autoload 'css-palette-global-mode '../../../../../.emacs.d/nxhtml/util/css-palette nil) + +(nxhtml-autoload 'css-palette-global-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/css-palette" nxhtml-install-dir) "\ +Toggle Css-Palette mode in every possible buffer. +With prefix ARG, turn Css-Palette-Global mode on if and only if +ARG is positive. +Css-Palette mode is enabled in all buffers where +`css-palette-turn-on-in-buffer' would do it. +See `css-palette-mode' for more information on Css-Palette mode. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (cusnu-export-my-skin-options customize-for-new-user) +;;;;;; "../../../../../.emacs.d/nxhtml/util/cus-new-user" "../../../../.emacs.d/nxhtml/util/cus-new-user.el" +;;;;;; (19173 59742)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/cus-new-user.el +(web-autoload-require 'cus-new-user 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/cus-new-user" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'customize-for-new-user `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/cus-new-user" nxhtml-install-dir) "\ +Show special customization page for new user. + +\(fn &optional NAME)" t nil) + +(nxhtml-autoload 'cusnu-export-my-skin-options `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/cus-new-user" nxhtml-install-dir) "\ +Export to file FILE custom options in `cusnu-my-skin-options'. +The options is exported to elisp code that other users can run to +set the options that you have added to `cusnu-my-skin-options'. + +For more information about this see `cusnu-export-cust-group'. + +\(fn FILE)" t nil) + +;;;*** + +;;;### (autoloads (ediff-url) "../../../../../.emacs.d/nxhtml/util/ediff-url" +;;;;;; "../../../../.emacs.d/nxhtml/util/ediff-url.el" (19362 37860)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/ediff-url.el +(web-autoload-require 'ediff-url 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ediff-url" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'ediff-url `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ediff-url" nxhtml-install-dir) "\ +Compare current buffer to a web URL using `ediff-buffers'. +Check URL using `ediff-url-redirects' before fetching the file. + +This is for checking downloaded file. A the file may have a comment +telling the download URL of thise form in the header: + + ;; URL: http://the-server.net/the-path/the-file.el + +If not the user is asked for the URL. + +\(fn URL)" t nil) + +;;;*** + +;;;### (autoloads (ffip-find-file-in-dirtree ffip-set-current-project) +;;;;;; "../../../../../.emacs.d/nxhtml/util/ffip" "../../../../.emacs.d/nxhtml/util/ffip.el" +;;;;;; (19257 29034)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/ffip.el +(web-autoload-require 'ffip 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ffip" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'ffip-set-current-project `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ffip" nxhtml-install-dir) "\ +Setup ffip project NAME with top directory ROOT of type TYPE. +ROOT can either be just a directory or a list of directory where +the first used just for prompting purposes and the files in the +rest are read into the ffip project. + +Type is a type in `ffip-project-file-types'. + +\(fn NAME ROOT TYPE)" nil nil) + +(nxhtml-autoload 'ffip-find-file-in-dirtree `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ffip" nxhtml-install-dir) "\ +Find files in directory tree ROOT. + +\(fn ROOT)" t nil) + +;;;*** + +;;;### (autoloads (fold-dwim-turn-on-outline-and-hide-all fold-dwim-turn-on-hs-and-hide +;;;;;; fold-dwim-unhide-hs-and-outline fold-dwim-mode fold-dwim-toggle +;;;;;; fold-dwim) "../../../../../.emacs.d/nxhtml/util/fold-dwim" +;;;;;; "../../../../.emacs.d/nxhtml/util/fold-dwim.el" (19218 45782)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/fold-dwim.el +(web-autoload-require 'fold-dwim 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/fold-dwim" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'fold-dwim 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/fold-dwim" loads) nil (put 'fold-dwim 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/fold-dwim" loads)))) + +(nxhtml-autoload 'fold-dwim-toggle `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/fold-dwim" nxhtml-install-dir) "\ +Toggle visibility or some other visual things. +Try toggling different visual things in this order: + +- Images shown at point with `inlimg-mode' +- Text at point prettified by `html-write-mode'. + +For the rest it unhides if possible, otherwise hides in this +order: + +- `org-mode' header or something else using that outlines. +- Maybe `fold-dwim-toggle-selective-display'. +- `Tex-fold-mode' things. +- In html if `outline-minor-mode' and after heading hide content. +- `hs-minor-mode' things. +- `outline-minor-mode' things. (Turns maybe on this.) + +It uses `fold-dwim-show' to show any hidden text at point; if no +hidden fold is found, try `fold-dwim-hide' to hide the +construction at the cursor. + +Note: Also first turn on `fold-dwim-mode' to get the keybinding +for this function from it. + +\(fn)" t nil) + +(defvar fold-dwim-mode nil "\ +Non-nil if Fold-Dwim mode is enabled. +See the command `fold-dwim-mode' for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `fold-dwim-mode'.") + +(nxhtml-custom-autoload 'fold-dwim-mode '../../../../../.emacs.d/nxhtml/util/fold-dwim nil) + +(nxhtml-autoload 'fold-dwim-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/fold-dwim" nxhtml-install-dir) "\ +Key binding for `fold-dwim-toggle'. + +\(fn &optional ARG)" t nil) + +(nxhtml-autoload 'fold-dwim-unhide-hs-and-outline `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/fold-dwim" nxhtml-install-dir) "\ +Unhide everything hidden by Hide/Show and Outline. +Ie everything hidden by `hs-minor-mode' and +`outline-minor-mode'. + +\(fn)" t nil) + +(nxhtml-autoload 'fold-dwim-turn-on-hs-and-hide `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/fold-dwim" nxhtml-install-dir) "\ +Turn on minor mode `hs-minor-mode' and hide. +If major mode is derived from `nxml-mode' call `hs-hide-block' +else call `hs-hide-all'. + +\(fn)" t nil) + +(nxhtml-autoload 'fold-dwim-turn-on-outline-and-hide-all `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/fold-dwim" nxhtml-install-dir) "\ +Turn on `outline-minor-mode' and call `hide-body'. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (foldit-global-mode foldit-mode foldit) "../../../../../.emacs.d/nxhtml/util/foldit" +;;;;;; "../../../../.emacs.d/nxhtml/util/foldit.el" (19276 1446)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/foldit.el +(web-autoload-require 'foldit 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/foldit" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'foldit 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/foldit" loads) nil (put 'foldit 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/foldit" loads)))) + +(nxhtml-autoload 'foldit-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/foldit" nxhtml-install-dir) "\ +Minor mode providing visual aids for folding. +Shows some hints about what you have hidden and how to reveal it. + +Supports `hs-minor-mode', `outline-minor-mode' and major modes +derived from `outline-mode'. + +\(fn &optional ARG)" t nil) + +(defvar foldit-global-mode nil "\ +Non-nil if Foldit-Global mode is enabled. +See the command `foldit-global-mode' for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `foldit-global-mode'.") + +(nxhtml-custom-autoload 'foldit-global-mode '../../../../../.emacs.d/nxhtml/util/foldit nil) + +(nxhtml-autoload 'foldit-global-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/foldit" nxhtml-install-dir) "\ +Toggle Foldit mode in every possible buffer. +With prefix ARG, turn Foldit-Global mode on if and only if +ARG is positive. +Foldit mode is enabled in all buffers where +`(lambda nil (foldit-mode 1))' would do it. +See `foldit-mode' for more information on Foldit mode. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (gimpedit-can-edit gimpedit-edit-buffer gimpedit-edit-file +;;;;;; gimpedit) "../../../../../.emacs.d/nxhtml/util/gimpedit" +;;;;;; "../../../../.emacs.d/nxhtml/util/gimpedit.el" (19276 1446)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/gimpedit.el +(web-autoload-require 'gimpedit 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/gimpedit" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'gimpedit 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/gimpedit" loads) nil (put 'gimpedit 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/gimpedit" loads)))) + +(nxhtml-autoload 'gimpedit-edit-file `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/gimpedit" nxhtml-install-dir) "\ +Edit IMAGE-FILE with GIMP. +See also `gimpedit-edit-file'. + +\(fn IMAGE-FILE &optional EXTRA-ARGS)" t nil) + +(nxhtml-autoload 'gimpedit-edit-buffer `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/gimpedit" nxhtml-install-dir) "\ +Edit image file in current buffer with GIMP. +See also `gimpedit-edit-file'. + +You may also be interested in gimpedit-mode with which you can edit +gimp files from within Emacs using GIMP's scripting +possibilities. See + + URL `http://www.emacswiki.org/emacs/GimpMode' + +\(fn)" t nil) + +(nxhtml-autoload 'gimpedit-can-edit `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/gimpedit" nxhtml-install-dir) "\ +Not documented + +\(fn FILE-NAME)" nil nil) + +;;;*** + +;;;### (autoloads (gpl-mode) "../../../../../.emacs.d/nxhtml/util/gpl" +;;;;;; "../../../../.emacs.d/nxhtml/util/gpl.el" (18795 30910)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/gpl.el +(web-autoload-require 'gpl 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/gpl" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'gpl-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/gpl" nxhtml-install-dir) "\ +Mode for font-locking and editing color palettes of the GPL format. + +Such palettes are used and produced by free software applications +such as the GIMP, Inkscape, Scribus, Agave and on-line tools such +as http://colourlovers.com. + +You can also use +URL `http://niels.kicks-ass.org/public/elisp/css-palette.el' to import +such palette into a css-file as hexadecimal color palette. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (hfyview-frame hfyview-window hfyview-region hfyview-buffer +;;;;;; hfyview-quick-print-in-files-menu) "../../../../../.emacs.d/nxhtml/util/hfyview" +;;;;;; "../../../../.emacs.d/nxhtml/util/hfyview.el" (19406 19692)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/hfyview.el +(web-autoload-require 'hfyview 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/hfyview" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(defvar hfyview-quick-print-in-files-menu nil "\ +Add Quick print entries to File menu if non-nil. +If you set this to nil you have to restart Emacs to get rid of +the Quick Print entry.") + +(nxhtml-custom-autoload 'hfyview-quick-print-in-files-menu '../../../../../.emacs.d/nxhtml/util/hfyview nil) + +(nxhtml-autoload 'hfyview-buffer `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/hfyview" nxhtml-install-dir) "\ +Convert buffer to html preserving faces and show in web browser. +With command prefix ARG also show html source in other window. + +\(fn ARG)" t nil) + +(nxhtml-autoload 'hfyview-region `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/hfyview" nxhtml-install-dir) "\ +Convert region to html preserving faces and show in web browser. +With command prefix ARG also show html source in other window. + +\(fn ARG)" t nil) + +(nxhtml-autoload 'hfyview-window `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/hfyview" nxhtml-install-dir) "\ +Convert window to html preserving faces and show in web browser. +With command prefix ARG also show html source in other window. + +\(fn ARG)" t nil) + +(nxhtml-autoload 'hfyview-frame `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/hfyview" nxhtml-install-dir) "\ +Convert frame to html preserving faces and show in web browser. +Make an XHTML view of the current Emacs frame. Put it in a buffer +named *hfyview-frame* and show that buffer in a web browser. + +If WHOLE-BUFFERS is non-nil then the whole content of the buffers +is shown in the XHTML page, otherwise just the part that is +visible currently on the frame. + +If you turn on the minor mode `hfyview-frame-mode' you can also +get the minibuffer/echo area in the output. See this mode for +details. + +With command prefix also show html source in other window. + +\(fn WHOLE-BUFFERS)" t nil) + +;;;*** + +;;;### (autoloads (hl-needed-mode hl-needed) "../../../../../.emacs.d/nxhtml/util/hl-needed" +;;;;;; "../../../../.emacs.d/nxhtml/util/hl-needed.el" (19406 19692)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/hl-needed.el +(web-autoload-require 'hl-needed 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/hl-needed" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'hl-needed 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/hl-needed" loads) nil (put 'hl-needed 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/hl-needed" loads)))) + +(defvar hl-needed-mode nil "\ +Non-nil if Hl-Needed mode is enabled. +See the command `hl-needed-mode' for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `hl-needed-mode'.") + +(nxhtml-custom-autoload 'hl-needed-mode '../../../../../.emacs.d/nxhtml/util/hl-needed nil) + +(nxhtml-autoload 'hl-needed-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/hl-needed" nxhtml-install-dir) "\ +Try to highlight current line and column when needed. +This is a global minor mode. It can operate in some different +ways: + +- Highlighting can be on always, see `hl-needed-always'. + +Or, it can be turned on depending on some conditions. In this +case highlighting is turned off after each command and turned on +again in the current window when either: + +- A new window was selected, see `hl-needed-on-new-window'. +- A new buffer was selected, see `hl-needed-on-new-buffer'. +- Window configuration was changed, see `hl-needed-on-config-change'. +- Buffer was scrolled see `hl-needed-on-scrolling'. +- A window was clicked with the mouse, see `hl-needed-on-mouse'. + +After this highlighting may be turned off again, normally after a +short delay, see `hl-needed-flash'. + +If either highlighting was not turned on or was turned off again +it will be turned on when + +- Emacs has been idle for `hl-needed-idle-time' seconds. + +See also `hl-needed-not-in-modes' and `hl-needed-currently-fun'. + +Note 1: For columns to be highlighted vline.el must be available. + +Note 2: This mode depends on `hl-line-mode' and `vline-mode' and +tries to cooperate with them. If you turn on either of these that +overrides the variables for turning on the respective +highlighting here. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (html-write-mode html-write) "../../../../../.emacs.d/nxhtml/util/html-write" +;;;;;; "../../../../.emacs.d/nxhtml/util/html-write.el" (19276 1446)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/html-write.el +(web-autoload-require 'html-write 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/html-write" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'html-write 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/html-write" loads) nil (put 'html-write 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/html-write" loads)))) + +(nxhtml-autoload 'html-write-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/html-write" nxhtml-install-dir) "\ +Minor mode for convenient display of some HTML tags. +When this mode is on a tag in `html-write-tag-list' is displayed as +the inner text of the tag with a face corresponding to the tag. +By default for example ... is displayed as italic and +... is displayed as an underlined clickable link. + +Only non-nested tags are hidden. The idea is just that it should +be easier to read and write, not that it should look as html +rendered text. + +See the customization group `html-write' for more information about +faces. + +The following keys are defined when you are on a tag handled by +this minor mode: + +\\{html-write-keymap} + +IMPORTANT: Most commands you use works also on the text that is +hidden. The movement commands is an exception, but as soon as +you edit the buffer you may also change the hidden parts. + +Hint: Together with `wrap-to-fill-column-mode' this can make it +easier to see what text you are actually writing in html parts of +a web file. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (inlimg-toggle-slicing inlimg-toggle-display inlimg-global-mode +;;;;;; inlimg-mode inlimg) "../../../../../.emacs.d/nxhtml/util/inlimg" +;;;;;; "../../../../.emacs.d/nxhtml/util/inlimg.el" (19269 36610)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/inlimg.el +(web-autoload-require 'inlimg 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/inlimg" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'inlimg 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/inlimg" loads) nil (put 'inlimg 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/inlimg" loads)))) + +(nxhtml-autoload 'inlimg-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/inlimg" nxhtml-install-dir) "\ +Display images inline. +Search buffer for image tags. Display found images. + +Image tags are setup per major mode in `inlimg-mode-specs'. + +Images are displayed on a line below the tag referencing them. +The whole image or a slice of it may be displayed, see +`inlimg-slice'. Margins relative text are specified in +`inlimg-margins'. + +See also the commands `inlimg-toggle-display' and +`inlimg-toggle-slicing'. + +Note: This minor mode uses `font-lock-mode'. + +\(fn &optional ARG)" t nil) + +(defvar inlimg-global-mode nil "\ +Non-nil if Inlimg-Global mode is enabled. +See the command `inlimg-global-mode' for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `inlimg-global-mode'.") + +(nxhtml-custom-autoload 'inlimg-global-mode '../../../../../.emacs.d/nxhtml/util/inlimg nil) + +(nxhtml-autoload 'inlimg-global-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/inlimg" nxhtml-install-dir) "\ +Toggle Inlimg mode in every possible buffer. +With prefix ARG, turn Inlimg-Global mode on if and only if +ARG is positive. +Inlimg mode is enabled in all buffers where +`inlimg--global-turn-on' would do it. +See `inlimg-mode' for more information on Inlimg mode. + +\(fn &optional ARG)" t nil) + +(nxhtml-autoload 'inlimg-toggle-display `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/inlimg" nxhtml-install-dir) "\ +Toggle display of image at point POINT. +See also the command `inlimg-mode'. + +\(fn POINT)" t nil) + +(nxhtml-autoload 'inlimg-toggle-slicing `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/inlimg" nxhtml-install-dir) "\ +Toggle slicing of image at point POINT. +See also the command `inlimg-mode'. + +\(fn POINT)" t nil) + +;;;*** + +;;;### (autoloads (majmodpri majmodpri-apply-priorities majmodpri-apply +;;;;;; majmodpri-sort-lists) "../../../../../.emacs.d/nxhtml/util/majmodpri" +;;;;;; "../../../../.emacs.d/nxhtml/util/majmodpri.el" (19407 22790)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/majmodpri.el +(web-autoload-require 'majmodpri 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/majmodpri" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'majmodpri-sort-lists `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/majmodpri" nxhtml-install-dir) "\ +Sort the list used when selecting major mode. +Only sort those lists choosen in `majmodpri-lists-to-sort'. +Sort according to priorities in `majmodpri-mode-priorities'. +Keep the old order in the list otherwise. + +The lists can be sorted when loading elisp libraries, see +`majmodpri-sort-after-load'. + +See also `majmodpri-apply-priorities'. + +\(fn)" t nil) + +(nxhtml-autoload 'majmodpri-apply `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/majmodpri" nxhtml-install-dir) "\ +Sort major mode lists and apply to existing buffers. +Note: This function is suitable to add to +`desktop-after-read-hook'. It will restore the multi major modes +in buffers. + +\(fn)" nil nil) + +(nxhtml-autoload 'majmodpri-apply-priorities `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/majmodpri" nxhtml-install-dir) "\ +Apply major mode priorities. +First run `majmodpri-sort-lists' and then if CHANGE-MODES is +non-nil apply to existing file buffers. If interactive ask +before applying. + +\(fn CHANGE-MODES)" t nil) + +(let ((loads (get 'majmodpri 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/majmodpri" loads) nil (put 'majmodpri 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/majmodpri" loads)))) + +;;;*** + +;;;### (autoloads (markchars-global-mode markchars-mode markchars) +;;;;;; "../../../../../.emacs.d/nxhtml/util/markchars" "../../../../.emacs.d/nxhtml/util/markchars.el" +;;;;;; (19376 1954)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/markchars.el +(web-autoload-require 'markchars 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/markchars" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'markchars 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/markchars" loads) nil (put 'markchars 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/markchars" loads)))) + +(nxhtml-autoload 'markchars-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/markchars" nxhtml-install-dir) "\ +Mark special characters. +Which characters to mark are defined by `markchars-keywords'. + +The default is to mark non-IDN, non-ascii chars with a magenta +underline. + +For information about IDN chars see `idn-is-recommended'. + +If you change anything in the customization group `markchars' you +must restart this minor mode for the changes to take effect. + +\(fn &optional ARG)" t nil) + +(defvar markchars-global-mode nil "\ +Non-nil if Markchars-Global mode is enabled. +See the command `markchars-global-mode' for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `markchars-global-mode'.") + +(nxhtml-custom-autoload 'markchars-global-mode '../../../../../.emacs.d/nxhtml/util/markchars nil) + +(nxhtml-autoload 'markchars-global-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/markchars" nxhtml-install-dir) "\ +Toggle Markchars mode in every possible buffer. +With prefix ARG, turn Markchars-Global mode on if and only if +ARG is positive. +Markchars mode is enabled in all buffers where +`(lambda nil (markchars-mode 1))' would do it. +See `markchars-mode' for more information on Markchars mode. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (mlinks-global-mode mlinks-mode mlinks) "../../../../../.emacs.d/nxhtml/util/mlinks" +;;;;;; "../../../../.emacs.d/nxhtml/util/mlinks.el" (19364 59816)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/mlinks.el +(web-autoload-require 'mlinks 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mlinks" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'mlinks 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/mlinks" loads) nil (put 'mlinks 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/mlinks" loads)))) + +(nxhtml-autoload 'mlinks-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mlinks" nxhtml-install-dir) "\ +Recognizes certain parts of a buffer as hyperlinks. +The hyperlinks are created in different ways for different major +modes with the help of the functions in the list +`mlinks-mode-functions'. + +The hyperlinks can be hilighted when point is over them. Use +`mlinks-toggle-hilight' to toggle this feature for the current +buffer. + +All keybindings in this mode are by default done under the prefi§x +key + + C-c RET + +which is supposed to be a kind of mnemonic for link (alluding to +the RET key commonly used in web browser to follow a link). +\(Unfortunately this breaks the rules in info node `Key Binding +Conventions'.) Below are the key bindings defined by this mode: + +\\{mlinks-mode-map} + +For some major modes `mlinks-backward-link' and +`mlinks-forward-link' will take you to the previous/next link. +By default the link moved to will be active, see +`mlinks-active-links'. + +\(fn &optional ARG)" t nil) + +(defvar mlinks-global-mode nil "\ +Non-nil if Mlinks-Global mode is enabled. +See the command `mlinks-global-mode' for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `mlinks-global-mode'.") + +(nxhtml-custom-autoload 'mlinks-global-mode '../../../../../.emacs.d/nxhtml/util/mlinks nil) + +(nxhtml-autoload 'mlinks-global-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mlinks" nxhtml-install-dir) "\ +Toggle Mlinks mode in every possible buffer. +With prefix ARG, turn Mlinks-Global mode on if and only if +ARG is positive. +Mlinks mode is enabled in all buffers where +`mlinks-turn-on-in-buffer' would do it. +See `mlinks-mode' for more information on Mlinks mode. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (mumamo-multi-major-modep mumamo-list-defined-multi-major-modes +;;;;;; mumamo-mark-for-refontification mumamo-hi-lock-faces mumamo +;;;;;; mumamo-add-to-defined-multi-major-modes define-mumamo-multi-major-mode) +;;;;;; "../../../../../.emacs.d/nxhtml/util/mumamo" "../../../../.emacs.d/nxhtml/util/mumamo.el" +;;;;;; (19412 30366)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/mumamo.el +(web-autoload-require 'mumamo 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'define-mumamo-multi-major-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo" nxhtml-install-dir) "\ +Define a function that turn on support for multiple major modes. +Define a function FUN-SYM that set up to divide the current +buffer into chunks with different major modes. + +The documentation string for FUN-SYM should contain the special +documentation in the string SPEC-DOC, general documentation for +functions of this type and information about chunks. + +The new function will use the definitions in CHUNKS (which is +called a \"chunk family\") to make the dividing of the buffer. + +The function FUN-SYM can be used to setup a buffer instead of a +major mode function: + +- The function FUN-SYM can be called instead of calling a major + mode function when you want to use multiple major modes in a + buffer. + +- The defined function can be used instead of a major mode + function in for example `auto-mode-alist'. + +- As the very last thing FUN-SYM will run the hook FUN-SYM-hook, + just as major modes do. + +- There is also a general hook, `mumamo-turn-on-hook', which is + run when turning on mumamo with any of these functions. This + is run right before the hook specific to any of the functions + above that turns on the multiple major mode support. + +- The multi major mode FUN-SYM has a keymap named FUN-SYM-map. + This overrides the major modes' keymaps since it is handled as + a minor mode keymap. + +- There is also a special mumamo keymap, `mumamo-map' that is + active in every buffer with a multi major mode. This is also + handled as a minor mode keymap and therefor overrides the major + modes' keymaps. + +- However when this support for multiple major mode is on the + buffer is divided into chunks, each with its own major mode. + +- The chunks are fontified according the major mode assigned to + them for that. + +- Indenting is also done according to the major mode assigned to + them for that. + +- The actual major mode used in the buffer is changed to the one + in the chunk when moving point between these chunks. + +- When major mode is changed the hooks for the new major mode, + `after-change-major-mode-hook' and `change-major-mode-hook' are + run. + +- There will be an alias for FUN-SYM called mumamo-alias-FUN-SYM. + This can be used to check whic multi major modes have been + defined. + +** A little bit more technical description: + +The dividing of a buffer into chunks is done during fontification +by `mumamo-get-chunk-at'. + +The name of the function is saved in in the buffer local variable +`mumamo-multi-major-mode' when the function is called. + +All functions defined by this macro is added to the list +`mumamo-defined-multi-major-modes'. + +Basically Mumamo handles only major modes that uses jit-lock. +However as a special effort also `nxml-mode' and derivatives +thereof are handled. Since it seems impossible to me to restrict +those major modes fontification to only a chunk without changing +`nxml-mode' the fontification is instead done by +`html-mode'/`sgml-mode' for chunks using `nxml-mode' and its +derivates. + +CHUNKS is a list where each entry have the format + + (CHUNK-DEF-NAME MAIN-MAJOR-MODE SUBMODE-CHUNK-FUNCTIONS) + +CHUNK-DEF-NAME is the key name by which the entry is recognized. +MAIN-MAJOR-MODE is the major mode used when there is no chunks. +If this is nil then `major-mode' before turning on this mode will +be used. + +SUBMODE-CHUNK-FUNCTIONS is a list of the functions that does the +chunk division of the buffer. They are tried in the order they +appear here during the chunk division process. + +If you want to write new functions for chunk divisions then +please see `mumamo-find-possible-chunk'. You can perhaps also +use `mumamo-quick-static-chunk' which is more easy-to-use +alternative. See also the file mumamo-fun.el where there are +many routines for chunk division. + +When you write those new functions you may want to use some of +the functions for testing chunks: + + `mumamo-test-create-chunk-at' `mumamo-test-create-chunks-at-all' + `mumamo-test-easy-make' `mumamo-test-fontify-region' + +These are in the file mumamo-test.el. + +\(fn FUN-SYM SPEC-DOC CHUNKS)" nil (quote macro)) + +(nxhtml-autoload 'mumamo-add-to-defined-multi-major-modes `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo" nxhtml-install-dir) "\ +Not documented + +\(fn ENTRY)" nil nil) + +(let ((loads (get 'mumamo 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/mumamo" loads) nil (put 'mumamo 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/mumamo" loads)))) + +(let ((loads (get 'mumamo-hi-lock-faces 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/mumamo" loads) nil (put 'mumamo-hi-lock-faces 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/mumamo" loads)))) + +(nxhtml-autoload 'mumamo-mark-for-refontification `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo" nxhtml-install-dir) "\ +Mark region between MIN and MAX for refontification. + +\(fn MIN MAX)" nil nil) + +(nxhtml-autoload 'mumamo-list-defined-multi-major-modes `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo" nxhtml-install-dir) "\ +List currently defined multi major modes. +If SHOW-DOC is non-nil show the doc strings added when defining +them. (This is not the full doc string. To show the full doc +string you can click on the multi major mode in the list.) + +If SHOW-CHUNKS is non-nil show the names of the chunk dividing +functions each multi major mode uses. + +If MATCH then show only multi major modes whos names matches. + +\(fn SHOW-DOC SHOW-CHUNKS MATCH)" t nil) + +(nxhtml-autoload 'mumamo-multi-major-modep `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo" nxhtml-install-dir) "\ +Return t if VALUE is a multi major mode function. + +\(fn VALUE)" nil nil) + +;;;*** + +;;;### (autoloads (python-rst-mumamo-mode latex-haskell-mumamo-mode +;;;;;; latex-clojure-mumamo-mode markdown-html-mumamo-mode xsl-sgml-mumamo-mode +;;;;;; xsl-nxml-mumamo-mode mako-html-mumamo-mode org-mumamo-mode +;;;;;; asp-html-mumamo-mode noweb2-mumamo-mode mumamo-noweb2 csound-sgml-mumamo-mode +;;;;;; laszlo-nxml-mumamo-mode metapost-mumamo-mode ruby-heredoc-mumamo-mode +;;;;;; python-heredoc-mumamo-mode cperl-heredoc-mumamo-mode perl-heredoc-mumamo-mode +;;;;;; php-heredoc-mumamo-mode sh-heredoc-mumamo-mode eruby-javascript-mumamo-mode +;;;;;; eruby-html-mumamo-mode eruby-mumamo-mode jsp-html-mumamo-mode +;;;;;; gsp-html-mumamo-mode ssjs-html-mumamo-mode smarty-html-mumamo-mode +;;;;;; mjt-html-mumamo-mode genshi-html-mumamo-mode django-html-mumamo-mode +;;;;;; embperl-html-mumamo-mode mason-html-mumamo-mode nxml-mumamo-mode +;;;;;; html-mumamo-mode mumamo-define-html-file-wide-keys) "../../../../../.emacs.d/nxhtml/util/mumamo-fun" +;;;;;; "../../../../.emacs.d/nxhtml/util/mumamo-fun.el" (19410 23172)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/mumamo-fun.el +(web-autoload-require 'mumamo-fun 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'mumamo-define-html-file-wide-keys `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Define keys in multi major mode keymap for html files. + +\(fn)" nil nil) + +(nxhtml-autoload 'html-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multiple major modes for (X)HTML with main mode `html-mode'. +This covers inlined style and javascript and PHP." t) + +(nxhtml-autoload 'nxml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multiple major modes for (X)HTML with main mode `nxml-mode'. +This covers inlined style and javascript and PHP. + +See also `mumamo-alt-php-tags-mode'." t) + +(nxhtml-autoload 'mason-html-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multiple major modes for Mason using main mode `html-mode'. +This covers inlined style and javascript." t) + +(nxhtml-autoload 'embperl-html-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multiple major modes for Embperl files with main mode `html-mode'. +This also covers inlined style and javascript." t) + +(nxhtml-autoload 'django-html-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multiple major modes for Django with main mode `html-mode'. +This also covers inlined style and javascript." t) + +(nxhtml-autoload 'genshi-html-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multiple major modes for Genshi with main mode `html-mode'. +This also covers inlined style and javascript." t) + +(nxhtml-autoload 'mjt-html-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multiple major modes for MJT with main mode `html-mode'. +This also covers inlined style and javascript." t) + +(nxhtml-autoload 'smarty-html-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multiple major modes for Smarty with main mode `html-mode'. +This also covers inlined style and javascript." t) + +(nxhtml-autoload 'ssjs-html-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multiple major modes for SSJS with main mode `html-mode'. +This covers inlined style and javascript." t) + +(nxhtml-autoload 'gsp-html-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multiple major modes for GSP with main mode `html-mode'. +This also covers inlined style and javascript." t) + +(nxhtml-autoload 'jsp-html-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multiple major modes for JSP with main mode `html-mode'. +This also covers inlined style and javascript." t) + +(nxhtml-autoload 'eruby-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multiple major mode for eRuby with unspecified main mode. +Current major-mode will be used as the main major mode." t) + +(nxhtml-autoload 'eruby-html-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multiple major modes for eRuby with main mode `html-mode'. +This also covers inlined style and javascript." t) + +(nxhtml-autoload 'eruby-javascript-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multiple major modes for eRuby with main mode `javascript-mode'." t) + +(nxhtml-autoload 'sh-heredoc-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multiple major modes for sh heredoc document. +See `mumamo-heredoc-modes' for how to specify heredoc major modes." t) + +(nxhtml-autoload 'php-heredoc-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multiple major modes for PHP heredoc document. +See `mumamo-heredoc-modes' for how to specify heredoc major modes." t) + +(nxhtml-autoload 'perl-heredoc-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multiple major modes for Perl heredoc document. +See `mumamo-heredoc-modes' for how to specify heredoc major modes." t) + +(nxhtml-autoload 'cperl-heredoc-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multiple major modes for Perl heredoc document. +See `mumamo-heredoc-modes' for how to specify heredoc major modes." t) + +(nxhtml-autoload 'python-heredoc-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multiple major modes for Perl heredoc document. +See `mumamo-heredoc-modes' for how to specify heredoc major modes." t) + +(nxhtml-autoload 'ruby-heredoc-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multiple major modes for Ruby heredoc document. +See `mumamo-heredoc-modes' for how to specify heredoc major modes." t) + +(nxhtml-autoload 'metapost-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multiple major modes for MetaPost." t) + +(nxhtml-autoload 'laszlo-nxml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multiple major modes for OpenLaszlo." t) + +(nxhtml-autoload 'csound-sgml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on mutiple major modes for CSound orc/sco Modes." t) + +(let ((loads (get 'mumamo-noweb2 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/mumamo-fun" loads) nil (put 'mumamo-noweb2 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/mumamo-fun" loads)))) + +(nxhtml-autoload 'noweb2-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Multi major mode for noweb files." t) + +(nxhtml-autoload 'asp-html-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multiple major modes for ASP with main mode `html-mode'. +This also covers inlined style and javascript." t) + +(nxhtml-autoload 'org-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multiple major modes for `org-mode' files with main mode `org-mode'. +** Note about HTML subchunks: +Unfortunately this only allows `html-mode' (not `nxhtml-mode') in +sub chunks." t) + +(nxhtml-autoload 'mako-html-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multiple major modes for Mako with main mode `html-mode'. +This also covers inlined style and javascript." t) + +(nxhtml-autoload 'xsl-nxml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multi major mode for XSL with main mode `nxml-mode'. +This covers inlined style and javascript." t) + +(nxhtml-autoload 'xsl-sgml-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multi major mode for XSL with main mode `sgml-mode'. +This covers inlined style and javascript." t) + +(nxhtml-autoload 'markdown-html-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multi major markdown mode in buffer. +Main major mode will be `markdown-mode'. +Inlined html will be in `html-mode'. + +You need `markdown-mode' which you can download from URL +`http://jblevins.org/projects/markdown-mode/'." t) + +(nxhtml-autoload 'latex-clojure-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multi major mode latex+clojure. +Main major mode will be `latex-mode'. +Subchunks will be in `clojure-mode'. + +You will need `clojure-mode' which you can download from URL +`http://github.com/jochu/clojure-mode/tree'." t) + +(nxhtml-autoload 'latex-haskell-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multi major mode latex+haskell. +Main major mode will be `latex-mode'. +Subchunks will be in `haskell-mode'. + +You will need `haskell-mode' which you can download from URL +`http://projects.haskell.org/haskellmode-emacs/'." t) + +(nxhtml-autoload 'python-rst-mumamo-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-fun" nxhtml-install-dir) "\ +Turn on multiple major modes for Python with RestructuredText docstrings." t) + +;;;*** + +;;;### (autoloads (mumamo-add-region-from-string mumamo-add-region) +;;;;;; "../../../../../.emacs.d/nxhtml/util/mumamo-regions" "../../../../.emacs.d/nxhtml/util/mumamo-regions.el" +;;;;;; (19276 1446)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/mumamo-regions.el +(web-autoload-require 'mumamo-regions 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-regions" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'mumamo-add-region `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-regions" nxhtml-install-dir) "\ +Add a mumamo region from selection. +Mumamo regions are like another layer of chunks above the normal chunks. +They does not affect the normal chunks, but they overrides them. + +To create a mumamo region first select a visible region and then +call this function. + +If the buffer is not in a multi major mode a temporary multi +major mode will be created applied to the buffer first. +To get out of this and get back to a single major mode just use + + M-x normal-mode + +\(fn)" t nil) + +(nxhtml-autoload 'mumamo-add-region-from-string `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/mumamo-regions" nxhtml-install-dir) "\ +Add a mumamo region from string at point. +Works as `mumamo-add-region' but for string or comment at point. + +Buffer must be fontified. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (n-back-game n-back) "../../../../../.emacs.d/nxhtml/util/n-back" +;;;;;; "../../../../.emacs.d/nxhtml/util/n-back.el" (19278 19348)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/n-back.el +(web-autoload-require 'n-back 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/n-back" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'n-back 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/n-back" loads) nil (put 'n-back 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/n-back" loads)))) + +(nxhtml-autoload 'n-back-game `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/n-back" nxhtml-install-dir) "\ +Emacs n-Back game. +This game is supposed to increase your working memory and fluid +intelligence. + +In this game something is shown for half a second on the screen +and maybe a sound is played. You should then answer if parts of +it is the same as you have seen or heard before. This is +repeated for about 20 trials. + +You answer with the keys shown in the bottom window. + +In the easiest version of the game you should answer if you have +just seen or heard what is shown now. By default the game gets +harder as you play it with success. Then first the number of +items presented in a trial grows. After that it gets harder by +that you have to somehow remember not the last item, but the item +before that (or even earlier). That is what \"n-Back\" stands +for. + +Note that remember does not really mean remember clearly. The +game is for training your brain getting used to keep those things +in the working memory, maybe as a cross-modal unit. You are +supposed to just nearly be able to do what you do in the game. +And you are supposed to have fun, that is what your brain like. + +You should probably not overdue this. Half an hour a day playing +might be an optimal time according to some people. + +The game is shamelessly modeled after Brain Workshop, see URL +`http://brainworkshop.sourceforge.net/' just for the fun of +getting it into Emacs. The game resembles but it not the same as +that used in the report by Jaeggi mentioned at the above URL. + +Not all features in Brain Workshop are implemented here, but some +new are maybe ... - and you have it available here in Emacs. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (ocr-user-mode) "../../../../../.emacs.d/nxhtml/util/ocr-user" +;;;;;; "../../../../.emacs.d/nxhtml/util/ocr-user.el" (19290 25228)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/ocr-user.el +(web-autoload-require 'ocr-user 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ocr-user" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'ocr-user-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ocr-user" nxhtml-install-dir) "\ +Color up digits three by three. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (ourcomments-warning ourcomments-M-x-menu-mode +;;;;;; ourcomments-paste-with-convert-mode use-custom-style info-open-file +;;;;;; replace-read-files rdir-query-replace ldir-query-replace +;;;;;; grep-query-replace emacs-Q-nxhtml emacs-Q emacs--no-desktop +;;;;;; emacs--debug-init emacs-buffer-file emacs emacs-restart ourcomments-ido-ctrl-tab +;;;;;; ourcomments-ido-buffer-raise-frame ourcomments-ido-buffer-other-frame +;;;;;; ourcomments-ido-buffer-other-window describe-symbol describe-defstruct +;;;;;; describe-custom-group narrow-to-comment buffer-narrowed-p +;;;;;; describe-command ourcomments-ediff-files find-emacs-other-file +;;;;;; ourcomments-insert-date-and-time describe-timers ourcomments-copy+paste-set-point +;;;;;; better-fringes-mode describe-key-and-map-briefly ourcomments-move-end-of-line +;;;;;; ourcomments-move-beginning-of-line ourcomments-mark-whole-buffer-or-field +;;;;;; fill-dwim unfill-individual-paragraphs unfill-region unfill-paragraph +;;;;;; define-toggle-old define-toggle popup-menu-at-point ourcomments-indirect-fun) +;;;;;; "../../../../../.emacs.d/nxhtml/util/ourcomments-util" "../../../../.emacs.d/nxhtml/util/ourcomments-util.el" +;;;;;; (19412 30366)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/ourcomments-util.el +(web-autoload-require 'ourcomments-util 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'ourcomments-indirect-fun `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Get the alias symbol for function FUN if any. + +\(fn FUN)" nil nil) + +(nxhtml-autoload 'popup-menu-at-point `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Popup the given menu at point. +This is similar to `popup-menu' and MENU and PREFIX has the same +meaning as there. The position for the popup is however where +the window point is. + +\(fn MENU &optional PREFIX)" nil nil) + +(nxhtml-autoload 'define-toggle `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Declare SYMBOL as a customizable variable with a toggle function. +The purpose of this macro is to define a defcustom and a toggle +function suitable for use in a menu. + +The arguments have the same meaning as for `defcustom' with these +restrictions: + +- The :type keyword cannot be used. Type is always 'boolean. +- VALUE must be t or nil. + +DOC and ARGS are just passed to `defcustom'. + +A `defcustom' named SYMBOL with doc-string DOC and a function +named SYMBOL-toggle is defined. The function toggles the value +of SYMBOL. It takes no parameters. + +To create a menu item something similar to this can be used: + + (define-key map [SYMBOL] + (list 'menu-item \"Toggle nice SYMBOL\" + 'SYMBOL-toggle + :button '(:toggle . SYMBOL))) + +\(fn SYMBOL VALUE DOC &rest ARGS)" nil (quote macro)) + +(put 'define-toggle 'doc-string-elt '3) + +(nxhtml-autoload 'define-toggle-old `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Not documented + +\(fn SYMBOL VALUE DOC &rest ARGS)" nil (quote macro)) + +(put 'define-toggle-old 'doc-string-elt '3) + +(nxhtml-autoload 'unfill-paragraph `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Unfill the current paragraph. + +\(fn)" t nil) + +(nxhtml-autoload 'unfill-region `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Unfill the current region. + +\(fn)" t nil) + +(nxhtml-autoload 'unfill-individual-paragraphs `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Unfill individual paragraphs in the current region. + +\(fn)" t nil) + +(nxhtml-autoload 'fill-dwim `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Fill or unfill paragraph or region. +With prefix ARG fill only current line. + +\(fn ARG)" t nil) + +(nxhtml-autoload 'ourcomments-mark-whole-buffer-or-field `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Mark whole buffer or editable field at point. + +\(fn)" t nil) + +(nxhtml-autoload 'ourcomments-move-beginning-of-line `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Move point to beginning of line or indentation. +See `beginning-of-line' for ARG. + +If `line-move-visual' is non-nil then the visual line beginning +is first tried. + +If in a widget field stay in that. + +\(fn ARG)" t nil) + +(nxhtml-autoload 'ourcomments-move-end-of-line `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Move point to end of line or after last non blank char. +See `end-of-line' for ARG. + +Similar to `ourcomments-move-beginning-of-line' but for end of +line. + +\(fn ARG)" t nil) + +(nxhtml-autoload 'describe-key-and-map-briefly `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Try to print names of keymap from which KEY fetch its definition. +Look in current active keymaps and find keymap variables with the +same value as the keymap where KEY is bound. Print a message +with those keymap variable names. Return a list with the keymap +variable symbols. + +When called interactively prompt for KEY. + +INSERT and UNTRANSLATED should normall be nil (and I am not sure +what they will do ;-). + +\(fn &optional KEY INSERT UNTRANSLATED)" t nil) + +(defvar better-fringes-mode nil "\ +Non-nil if Better-Fringes mode is enabled. +See the command `better-fringes-mode' for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `better-fringes-mode'.") + +(nxhtml-custom-autoload 'better-fringes-mode '../../../../../.emacs.d/nxhtml/util/ourcomments-util nil) + +(nxhtml-autoload 'better-fringes-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Choose another fringe bitmap color and bottom angle. + +\(fn &optional ARG)" t nil) + +(nxhtml-autoload 'ourcomments-copy+paste-set-point `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Set point for copy+paste here. +Enable temporary minor mode `ourcomments-copy+paste-mode'. +However if point for copy+paste already is set then cancel it and +disable the minor mode. + +The purpose of this command is to make it easy to grab a piece of +text and paste it at current position. After this command you +should select a piece of text to copy and then call the command +`ourcomments-copy+paste'. + +\(fn)" t nil) + +(nxhtml-autoload 'describe-timers `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Show timers with readable time format. + +\(fn)" t nil) + +(nxhtml-autoload 'ourcomments-insert-date-and-time `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Insert date and time. +See option `ourcomments-insert-date-and-time' for how to +customize it. + +\(fn)" t nil) + +(nxhtml-autoload 'find-emacs-other-file `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Find corresponding file to source or installed elisp file. +If you have checked out and compiled Emacs yourself you may have +Emacs lisp files in two places, the checked out source tree and +the installed Emacs tree. If buffer contains an Emacs elisp file +in one of these places then find the corresponding elisp file in +the other place. Return the file name of this file. + +Rename current buffer using your `uniquify-buffer-name-style' if +it is set. + +When DISPLAY-FILE is non-nil display this file in other window +and go to the same line number as in the current buffer. + +\(fn DISPLAY-FILE)" t nil) + +(nxhtml-autoload 'ourcomments-ediff-files `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +In directory DEF-DIR run `ediff-files' on files FILE-A and FILE-B. +The purpose of this function is to make it eaiser to start +`ediff-files' from a shell through Emacs Client. + +This is used in EmacsW32 in the file ediff.cmd where Emacs Client +is called like this: + + @%emacs_client% -e \"(setq default-directory \\\"%emacs_cd%\\\")\" + @%emacs_client% -n -e \"(ediff-files \\\"%f1%\\\" \\\"%f2%\\\")\" + +It can of course be done in a similar way with other shells. + +\(fn DEF-DIR FILE-A FILE-B)" nil nil) + +(nxhtml-autoload 'describe-command `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Like `describe-function', but prompts only for interactive commands. + +\(fn COMMAND)" t nil) + +(nxhtml-autoload 'buffer-narrowed-p `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Return non-nil if the current buffer is narrowed. + +\(fn)" nil nil) + +(nxhtml-autoload 'narrow-to-comment `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Not documented + +\(fn)" t nil) + +(nxhtml-autoload 'describe-custom-group `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Describe customization group SYMBOL. + +\(fn SYMBOL)" t nil) + +(nxhtml-autoload 'describe-defstruct `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Not documented + +\(fn SYMBOL)" t nil) + +(nxhtml-autoload 'describe-symbol `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Show information about SYMBOL. +Show SYMBOL plist and whether is is a variable or/and a +function. + +\(fn SYMBOL)" t nil) + +(nxhtml-autoload 'ourcomments-ido-buffer-other-window `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Show buffer in other window. + +\(fn)" t nil) + +(nxhtml-autoload 'ourcomments-ido-buffer-other-frame `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Show buffer in other frame. + +\(fn)" t nil) + +(nxhtml-autoload 'ourcomments-ido-buffer-raise-frame `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Raise frame showing buffer. + +\(fn)" t nil) + +(defvar ourcomments-ido-ctrl-tab nil "\ +Non-nil if Ourcomments-Ido-Ctrl-Tab mode is enabled. +See the command `ourcomments-ido-ctrl-tab' for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `ourcomments-ido-ctrl-tab'.") + +(nxhtml-custom-autoload 'ourcomments-ido-ctrl-tab '../../../../../.emacs.d/nxhtml/util/ourcomments-util nil) + +(nxhtml-autoload 'ourcomments-ido-ctrl-tab `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Enable buffer switching using C-Tab with function `ido-mode'. +This changes buffer switching with function `ido-mode' the +following way: + +- You can use C-Tab. + +- You can show the selected buffer in three ways independent of + how you entered function `ido-mode' buffer switching: + + * S-return: other window + * C-return: other frame + * M-return: raise frame + +Those keys are selected to at least be a little bit reminiscent +of those in for example common web browsers. + +\(fn &optional ARG)" t nil) + +(nxhtml-autoload 'emacs-restart `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Restart Emacs and start `server-mode' if on before. + +\(fn)" t nil) + +(nxhtml-autoload 'emacs `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Start a new Emacs with default parameters. +Additional ARGS are passed to the new Emacs. + +See also `ourcomments-started-emacs-use-output-buffer'. + +\(fn &rest ARGS)" t nil) + +(nxhtml-autoload 'emacs-buffer-file `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Start a new Emacs showing current buffer file. +Go to the current line and column in that file. +If there is no buffer file then instead start with `dired'. + +This calls the function `emacs' with argument --no-desktop and +the file or a call to dired. + +\(fn)" t nil) + +(nxhtml-autoload 'emacs--debug-init `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Start a new Emacs with --debug-init parameter. +This calls the function `emacs' with added arguments ARGS. + +\(fn &rest ARGS)" t nil) + +(nxhtml-autoload 'emacs--no-desktop `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Start a new Emacs with --no-desktop parameter. +This calls the function `emacs' with added arguments ARGS. + +\(fn &rest ARGS)" t nil) + +(nxhtml-autoload 'emacs-Q `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Start a new Emacs with -Q parameter. +Start new Emacs without any customization whatsoever. +This calls the function `emacs' with added arguments ARGS. + +\(fn &rest ARGS)" t nil) + +(nxhtml-autoload 'emacs-Q-nxhtml `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Start new Emacs with -Q and load nXhtml. +This calls the function `emacs' with added arguments ARGS. + +\(fn &rest ARGS)" t nil) + +(nxhtml-autoload 'grep-query-replace `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Do `query-replace-regexp' of FROM with TO, on all files in *grep*. +Third arg DELIMITED (prefix arg) means replace only word-delimited matches. +If you exit (\\[keyboard-quit], RET or q), you can resume the query replace +with the command \\[tags-loop-continue]. + +\(fn FROM TO &optional DELIMITED)" t nil) + +(nxhtml-autoload 'ldir-query-replace `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Replace FROM with TO in FILES in directory DIR. +This runs `query-replace-regexp' in files matching FILES in +directory DIR. + +See `tags-query-replace' for DELIMETED and more information. + +\(fn FROM TO FILES DIR &optional DELIMITED)" t nil) + +(nxhtml-autoload 'rdir-query-replace `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Replace FROM with TO in FILES in directory tree ROOT. +This runs `query-replace-regexp' in files matching FILES in +directory tree ROOT. + +See `tags-query-replace' for DELIMETED and more information. + +\(fn FROM TO FILE-REGEXP ROOT &optional DELIMITED)" t nil) + +(nxhtml-autoload 'replace-read-files `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Read files arg for replace. + +\(fn REGEXP &optional REPLACE)" nil nil) + +(nxhtml-autoload 'info-open-file `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Open an info file in `Info-mode'. + +\(fn INFO-FILE)" t nil) + +(nxhtml-autoload 'use-custom-style `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Setup like in `Custom-mode', but without things specific to Custom. + +\(fn)" nil nil) + +(defvar ourcomments-paste-with-convert-mode nil "\ +Non-nil if Ourcomments-Paste-With-Convert mode is enabled. +See the command `ourcomments-paste-with-convert-mode' for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `ourcomments-paste-with-convert-mode'.") + +(nxhtml-custom-autoload 'ourcomments-paste-with-convert-mode '../../../../../.emacs.d/nxhtml/util/ourcomments-util nil) + +(nxhtml-autoload 'ourcomments-paste-with-convert-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Pasted text may be automatically converted in this mode. +The functions in `ourcomments-paste-with-convert-hook' are run +after commands in `ourcomments-paste-with-convert-commands' if any +of the functions returns non-nil that text is inserted instead of +the original text. + +For exampel when this mode is on and you paste an html link in an +`org-mode' buffer it will be directly converted to an org style +link. (This is the default behaviour.) + +Tip: The Firefox plugin Copy as HTML Link is handy, see URL + `https://addons.mozilla.org/en-US/firefox/addon/2617'. + +Note: This minor mode will defadvice the paste commands. + +\(fn &optional ARG)" t nil) + +(defvar ourcomments-M-x-menu-mode nil "\ +Non-nil if Ourcomments-M-X-Menu mode is enabled. +See the command `ourcomments-M-x-menu-mode' for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `ourcomments-M-x-menu-mode'.") + +(nxhtml-custom-autoload 'ourcomments-M-x-menu-mode '../../../../../.emacs.d/nxhtml/util/ourcomments-util nil) + +(nxhtml-autoload 'ourcomments-M-x-menu-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Add commands started from Emacs menus to M-x history. +The purpose of this is to make it easier to redo them and easier +to learn how to do them from the command line (which is often +faster if you know how to do it). + +Only commands that are not already in M-x history are added. + +\(fn &optional ARG)" t nil) + +(nxhtml-autoload 'ourcomments-warning `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-util" nxhtml-install-dir) "\ +Not documented + +\(fn FORMAT-STRING &rest ARGS)" nil nil) + +;;;*** + +;;;### (autoloads (major-modep major-or-multi-majorp) "../../../../../.emacs.d/nxhtml/util/ourcomments-widgets" +;;;;;; "../../../../.emacs.d/nxhtml/util/ourcomments-widgets.el" +;;;;;; (19276 1446)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/ourcomments-widgets.el +(web-autoload-require 'ourcomments-widgets 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-widgets" nxhtml-install-dir 'nxhtml-byte-compile-file) + + (nxhtml-autoload 'command "ourcomments-widgets") + +(nxhtml-autoload 'major-or-multi-majorp `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-widgets" nxhtml-install-dir) "\ +Return t if VALUE is a major or multi major mode function. + +\(fn VALUE)" nil nil) + +(nxhtml-autoload 'major-modep `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/ourcomments-widgets" nxhtml-install-dir) "\ +Return t if VALUE is a major mode function. + +\(fn VALUE)" nil nil) + (nxhtml-autoload 'major-mode-function "ourcomments-widgets") + +;;;*** + +;;;### (autoloads (pause-start-in-new-emacs pause-mode pause) "../../../../../.emacs.d/nxhtml/util/pause" +;;;;;; "../../../../.emacs.d/nxhtml/util/pause.el" (19335 62524)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/pause.el +(web-autoload-require 'pause 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/pause" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'pause 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/pause" loads) nil (put 'pause 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/pause" loads)))) + +(defvar pause-mode nil "\ +Non-nil if Pause mode is enabled. +See the command `pause-mode' for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `pause-mode'.") + +(nxhtml-custom-autoload 'pause-mode '../../../../../.emacs.d/nxhtml/util/pause nil) + +(nxhtml-autoload 'pause-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/pause" nxhtml-install-dir) "\ +This minor mode tries to make you take a break. +It will jump up and temporary stop your work - even if you are +not in Emacs. If you are in Emacs it will however try to be +gentle and wait until you have been idle with the keyboard for a +short while. (If you are not in Emacs it can't be gentle. How +could it?) + +Then it will show you a special screen with a link to a yoga +exercise you can do when you pause. + +After the pause you continue your work where you were +interrupted. + +\(fn &optional ARG)" t nil) + +(nxhtml-autoload 'pause-start-in-new-emacs `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/pause" nxhtml-install-dir) "\ +Start pause with interval AFTER-MINUTES in a new Emacs instance. +The new Emacs instance will be started with -Q. However if +`custom-file' is non-nil it will be loaded so you can still +customize pause. + +One way of using this function may be to put in your .emacs +something like + + ;; for just one Emacs running pause + (when server-mode (pause-start-in-new-emacs 15)) + +See `pause-start' for more info. + +\(fn AFTER-MINUTES)" t nil) + +;;;*** + +;;;### (autoloads (global-pointback-mode pointback-mode) "../../../../../.emacs.d/nxhtml/util/pointback" +;;;;;; "../../../../.emacs.d/nxhtml/util/pointback.el" (19023 47098)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/pointback.el +(web-autoload-require 'pointback 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/pointback" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'pointback-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/pointback" nxhtml-install-dir) "\ +Restore previous window point when switching back to a buffer. + +\(fn &optional ARG)" t nil) + +(defvar global-pointback-mode nil "\ +Non-nil if Global-Pointback mode is enabled. +See the command `global-pointback-mode' for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `global-pointback-mode'.") + +(nxhtml-custom-autoload 'global-pointback-mode '../../../../../.emacs.d/nxhtml/util/pointback nil) + +(nxhtml-autoload 'global-pointback-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/pointback" nxhtml-install-dir) "\ +Toggle Pointback mode in every possible buffer. +With prefix ARG, turn Global-Pointback mode on if and only if +ARG is positive. +Pointback mode is enabled in all buffers where +`pointback-on' would do it. +See `pointback-mode' for more information on Pointback mode. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (popcmp-completing-read popcmp-completion-style +;;;;;; popcmp) "../../../../../.emacs.d/nxhtml/util/popcmp" "../../../../.emacs.d/nxhtml/util/popcmp.el" +;;;;;; (19365 37362)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/popcmp.el +(web-autoload-require 'popcmp 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/popcmp" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'popcmp 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/popcmp" loads) nil (put 'popcmp 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/popcmp" loads)))) + +(defvar popcmp-completion-style (cond (t 'popcmp-popup)) "\ +Completion style. +The currently available completion styles are: + +- popcmp-popup: Use OS popup menus (default). +- emacs-default: Emacs default completion. +- Company Mode completion. +- anything: The Anything elisp lib completion style. + +The style of completion set here is not implemented for all +completions. The scope varies however with which completion +style you have choosen. + +For information about Company Mode and how to use it see URL +`http://www.emacswiki.org/emacs/CompanyMode'. + +For information about Anything and how to use it see URL +`http://www.emacswiki.org/emacs/Anything'. + +See also the options `popcmp-short-help-beside-alts' and +`popcmp-group-alternatives' which are also availabe when popup +completion is available.") + +(nxhtml-custom-autoload 'popcmp-completion-style '../../../../../.emacs.d/nxhtml/util/popcmp nil) + +(nxhtml-autoload 'popcmp-completing-read `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/popcmp" nxhtml-install-dir) "\ +Read a string in the minubuffer with completion, or popup a menu. +This function can be used instead `completing-read'. The main +purpose is to provide a popup style menu for completion when +completion is tighed to text at point in a buffer. If a popup +menu is used it will be shown at window point. Whether a popup +menu or minibuffer completion is used is governed by +`popcmp-completion-style'. + +The variables PROMPT, TABLE, PREDICATE, REQUIRE-MATCH, +INITIAL-INPUT, POP-HIST, DEF and INHERIT-INPUT-METHOD all have the +same meaning is for `completing-read'. + +ALT-HELP should be nil or a hash variable or an association list +with the completion alternative as key and a short help text as +value. You do not need to supply help text for all alternatives. +The use of ALT-HELP is set by `popcmp-short-help-beside-alts'. + +ALT-SETS should be nil or an association list that has as keys +groups and as second element an alternative that should go into +this group. + +\(fn PROMPT TABLE &optional PREDICATE REQUIRE-MATCH INITIAL-INPUT POP-HIST DEF INHERIT-INPUT-METHOD ALT-HELP ALT-SETS)" nil nil) + +;;;*** + +;;;### (autoloads (rebind-keys-mode rebind) "../../../../../.emacs.d/nxhtml/util/rebind" +;;;;;; "../../../../.emacs.d/nxhtml/util/rebind.el" (19292 15280)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/rebind.el +(web-autoload-require 'rebind 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/rebind" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'rebind 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/rebind" loads) nil (put 'rebind 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/rebind" loads)))) + +(defvar rebind-keys-mode nil "\ +Non-nil if Rebind-Keys mode is enabled. +See the command `rebind-keys-mode' for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `rebind-keys-mode'.") + +(nxhtml-custom-autoload 'rebind-keys-mode '../../../../../.emacs.d/nxhtml/util/rebind nil) + +(nxhtml-autoload 'rebind-keys-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/rebind" nxhtml-install-dir) "\ +Rebind keys as defined in `rebind-keys'. +The key bindings will override almost all other key bindings +since it is put on emulation level, like for example ``cua-mode' +and `viper-mode'. + +This is for using for example C-a to mark the whole buffer (or a +field). There are some predifined keybindings for this. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (rnc-mode) "../../../../../.emacs.d/nxhtml/util/rnc-mode" +;;;;;; "../../../../.emacs.d/nxhtml/util/rnc-mode.el" (18775 63606)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/rnc-mode.el +(web-autoload-require 'rnc-mode 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/rnc-mode" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'rnc-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/rnc-mode" nxhtml-install-dir) "\ +Major mode for editing RELAX NG Compact Syntax schemas. +\\{rnc-mode-map} + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (search-form) "../../../../../.emacs.d/nxhtml/util/search-form" +;;;;;; "../../../../.emacs.d/nxhtml/util/search-form.el" (19276 +;;;;;; 1446)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/search-form.el +(web-autoload-require 'search-form 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/search-form" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'search-form `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/search-form" nxhtml-install-dir) "\ +Display a form for search and replace. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (sex-mode sex) "../../../../../.emacs.d/nxhtml/util/sex-mode" +;;;;;; "../../../../.emacs.d/nxhtml/util/sex-mode.el" (19218 45784)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/sex-mode.el +(web-autoload-require 'sex-mode 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/sex-mode" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'sex 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/sex-mode" loads) nil (put 'sex 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/sex-mode" loads)))) + +(defvar sex-mode nil "\ +Non-nil if Sex mode is enabled. +See the command `sex-mode' for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `sex-mode'.") + +(nxhtml-custom-autoload 'sex-mode '../../../../../.emacs.d/nxhtml/util/sex-mode nil) + +(nxhtml-autoload 'sex-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/sex-mode" nxhtml-install-dir) "\ +Open certain files in external programs. +See `sex-get-file-open-cmd' for how to determine which files to +open by external applications. Note that this selection is +nearly the same as in `org-mode'. The main difference is that +the fallback always is to open a file in Emacs. (This is +necessary to avoid to disturb many of Emacs operations.) + +This affects all functions that opens files, like `find-file', +`find-file-noselect' etc. + +However it does not affect files opened through Emacs client. + +Urls can also be handled, see `sex-handle-urls'. + +When opening a file with the shell a (temporary) dummy buffer is +created in Emacs with major mode `sex-file-mode' and an external +program is called to handle the file. How this dummy buffer is +handled is governed by `sex-keep-dummy-buffer'. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (sml-modeline-mode sml-modeline) "../../../../../.emacs.d/nxhtml/util/sml-modeline" +;;;;;; "../../../../.emacs.d/nxhtml/util/sml-modeline.el" (19362 +;;;;;; 52688)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/sml-modeline.el +(web-autoload-require 'sml-modeline 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/sml-modeline" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'sml-modeline 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/sml-modeline" loads) nil (put 'sml-modeline 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/sml-modeline" loads)))) + +(defvar sml-modeline-mode nil "\ +Non-nil if Sml-Modeline mode is enabled. +See the command `sml-modeline-mode' for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `sml-modeline-mode'.") + +(nxhtml-custom-autoload 'sml-modeline-mode '../../../../../.emacs.d/nxhtml/util/sml-modeline nil) + +(nxhtml-autoload 'sml-modeline-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/sml-modeline" nxhtml-install-dir) "\ +Show buffer size and position like scrollbar in mode line. +You can customize this minor mode, see option `sml-modeline-mode'. + +Note: If you turn this mode on then you probably want to turn off +option `scroll-bar-mode'. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (tabkey2-emma-without-tabkey2 tabkey2-mode tabkey2) +;;;;;; "../../../../../.emacs.d/nxhtml/util/tabkey2" "../../../../.emacs.d/nxhtml/util/tabkey2.el" +;;;;;; (19278 3422)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/tabkey2.el +(web-autoload-require 'tabkey2 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/tabkey2" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'tabkey2 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/tabkey2" loads) nil (put 'tabkey2 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/tabkey2" loads)))) + +(defvar tabkey2-mode nil "\ +Non-nil if Tabkey2 mode is enabled. +See the command `tabkey2-mode' for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `tabkey2-mode'.") + +(nxhtml-custom-autoload 'tabkey2-mode '../../../../../.emacs.d/nxhtml/util/tabkey2 nil) + +(nxhtml-autoload 'tabkey2-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/tabkey2" nxhtml-install-dir) "\ +More fun with Tab key number two (completion etc). +This global minor mode by default binds Tab in a way that let you +do completion with Tab in all buffers (where it is possible). + +The Tab key is easy to type on your keyboard. Then why not use +it for completion, something that is very useful? Shells usually +use Tab for completion so many are used to it. This was the idea +of Smart Tabs and this is a generalization of that idea. + +However in Emacs the Tab key is usually used for indentation. +The idea here is that if Tab has been pressed once for +indentation, then as long as point stays further Tab keys might +as well do completion. + +So you kind of do Tab-Tab for first completion (and then just +Tab for further completions as long as point is not moved). + +And there is even kind of Tab-Tab-Tab completion: If completion +fails the next completion function will be the one you try with +next Tab. (You get some notification of this, of course.) + +See `tabkey2-first' for more information about usage. + +Note: If you do not want the Tab-Tab behaviour above, but still +want an easy way to reach the available completion functions, +then you can instead of turning on tabkey2-mode enter this in +your .emacs: + + (global-set-key [f8] 'tabkey2-cycle-completion-functions) + +After hitting f8 you will then be in the same state as after the +first in tabkey2-mode. + +\(fn &optional ARG)" t nil) + +(nxhtml-autoload 'tabkey2-emma-without-tabkey2 `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/tabkey2" nxhtml-install-dir) "\ +Not documented + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (tyda-mode) "../../../../../.emacs.d/nxhtml/util/tyda" +;;;;;; "../../../../.emacs.d/nxhtml/util/tyda.el" (19276 1446)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/tyda.el +(web-autoload-require 'tyda 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/tyda" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(defvar tyda-mode nil "\ +Non-nil if Tyda mode is enabled. +See the command `tyda-mode' for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `tyda-mode'.") + +(nxhtml-custom-autoload 'tyda-mode '../../../../../.emacs.d/nxhtml/util/tyda nil) + +(nxhtml-autoload 'tyda-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/tyda" nxhtml-install-dir) "\ +Minor mode for key bindings for `tyda-lookup-word'. +It binds Alt-Mouse-1 just as the Tyda add-on does in Firefox. +Here are all key bindings + +\\{tyda-mode-map} + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (udev-call-first-step) "../../../../../.emacs.d/nxhtml/util/udev" +;;;;;; "../../../../.emacs.d/nxhtml/util/udev.el" (19412 30366)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/udev.el +(web-autoload-require 'udev 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/udev" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'udev-call-first-step `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/udev" nxhtml-install-dir) "\ +Set up and call first step. +Set up buffer LOG-BUFFER to be used for log messages and +controling of the execution of the functions in list STEPS which +are executed one after another. + +Write HEADER at the end of LOG-BUFFER. + +Call first step. + +If FINISH-FUN non-nil it should be a function. This is called +after last step with LOG-BUFFER as parameter. + +\(fn LOG-BUFFER STEPS HEADER FINISH-FUN)" nil nil) + +;;;*** + +;;;### (autoloads (udev-ecb-customize-startup udev-ecb-update) "../../../../../.emacs.d/nxhtml/util/udev-ecb" +;;;;;; "../../../../.emacs.d/nxhtml/util/udev-ecb.el" (19256 9012)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/udev-ecb.el +(web-autoload-require 'udev-ecb 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/udev-ecb" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'udev-ecb-update `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/udev-ecb" nxhtml-install-dir) "\ +Fetch and install ECB from the devel sources. +To determine where to store the sources see `udev-ecb-dir'. +For how to start ECB see `udev-ecb-load-ecb'. + +\(fn)" t nil) + +(nxhtml-autoload 'udev-ecb-customize-startup `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/udev-ecb" nxhtml-install-dir) "\ +Customize ECB dev nXhtml startup group. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (udev-rinari-update) "../../../../../.emacs.d/nxhtml/util/udev-rinari" +;;;;;; "../../../../.emacs.d/nxhtml/util/udev-rinari.el" (19256 +;;;;;; 9012)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/udev-rinari.el +(web-autoload-require 'udev-rinari 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/udev-rinari" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'udev-rinari-update `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/udev-rinari" nxhtml-install-dir) "\ +Fetch and install Rinari from the devel sources. +To determine where to store the sources and how to start rinari +see `udev-rinari-dir' and `udev-rinari-load-rinari'. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (viper-tutorial) "../../../../../.emacs.d/nxhtml/util/viper-tut" +;;;;;; "../../../../.emacs.d/nxhtml/util/viper-tut.el" (19389 13794)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/viper-tut.el +(web-autoload-require 'viper-tut 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/viper-tut" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'viper-tutorial `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/viper-tut" nxhtml-install-dir) "\ +Run a tutorial for Viper. + +A simple classic tutorial in 5 parts that have been used by many +people starting to learn vi keys. You may learn enough to start +using `viper-mode' in Emacs. + +Some people find that vi keys helps against repetetive strain +injury, see URL + + `http://www.emacswiki.org/emacs/RepeatedStrainInjury'. + +Note: There might be a few clashes between vi key binding and +Emacs standard key bindings. You will be notified about those in +the tutorial. Even more, if your own key bindings comes in +between you will be notified about that too. + +\(fn PART &optional DONT-ASK-FOR-REVERT)" t nil) + +;;;*** + +;;;### (autoloads (vline-global-mode vline-mode) "../../../../../.emacs.d/nxhtml/util/vline" +;;;;;; "../../../../.emacs.d/nxhtml/util/vline.el" (19157 2170)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/vline.el +(web-autoload-require 'vline 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/vline" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'vline-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/vline" nxhtml-install-dir) "\ +Display vertical line mode. + +\(fn &optional ARG)" t nil) + +(defvar vline-global-mode nil "\ +Non-nil if Vline-Global mode is enabled. +See the command `vline-global-mode' for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `vline-global-mode'.") + +(nxhtml-custom-autoload 'vline-global-mode '../../../../../.emacs.d/nxhtml/util/vline nil) + +(nxhtml-autoload 'vline-global-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/vline" nxhtml-install-dir) "\ +Display vertical line mode as globally. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (whelp) "../../../../../.emacs.d/nxhtml/util/whelp" +;;;;;; "../../../../.emacs.d/nxhtml/util/whelp.el" (19278 3422)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/whelp.el +(web-autoload-require 'whelp 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/whelp" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'whelp 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/whelp" loads) nil (put 'whelp 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/whelp" loads)))) + +;;;*** + +;;;### (autoloads (winsav-switch-config winsav-save-full-config winsav-save-mode +;;;;;; winsav winsav-put-window-tree) "../../../../../.emacs.d/nxhtml/util/winsav" +;;;;;; "../../../../.emacs.d/nxhtml/util/winsav.el" (19295 41684)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/winsav.el +(web-autoload-require 'winsav 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/winsav" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'winsav-put-window-tree `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/winsav" nxhtml-install-dir) "\ +Put window structure SAVED-TREE into WINDOW. +Restore a structure SAVED-TREE returned from +`winsav-get-window-tree' into window WINDOW. + +If COPY-WIN-OVL is non-nil then overlays having a 'window +property pointing to one of the windows in SAVED-TREE where this +window still is shown will be copied to a new overlay with +'window property pointing to the corresponding new window. + +If WIN-OVL-ALL-BUFS is non-nil then all buffers will be searched +for overlays with a 'window property of the kind above. + +At the very end of this function the hook `winsav-after-put' is +run. + +\(fn SAVED-TREE WINDOW &optional COPY-WIN-OVL WIN-OVL-ALL-BUFS)" nil nil) + +(let ((loads (get 'winsav 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/winsav" loads) nil (put 'winsav 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/winsav" loads)))) + +(defvar winsav-save-mode nil "\ +Non-nil if Winsav-Save mode is enabled. +See the command `winsav-save-mode' for a description of this minor mode.") + +(nxhtml-custom-autoload 'winsav-save-mode '../../../../../.emacs.d/nxhtml/util/winsav nil) + +(nxhtml-autoload 'winsav-save-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/winsav" nxhtml-install-dir) "\ +Toggle winsav configuration saving mode. +With numeric ARG, turn winsav saving on if ARG is positive, off +otherwise. + +When this mode is turned on, winsav configurations are saved from +one session to another. A winsav configuration consists of +frames, windows and visible buffers configurations plus +optionally buffers and files managed by the functions used by +option `desktop-save-mode' + +By default this is integrated with `desktop-save-mode'. If +`desktop-save-mode' is on and `winsav-handle-also-desktop' is +non-nil then save and restore also desktop. + +See the command `winsav-switch-config' for more information and +other possibilities. + +Note: If you want to avoid saving when you exit just turn off +this minor mode. + +For information about what is saved and restored and how to save +and restore additional information see the function +`winsav-save-configuration'. + +\(fn &optional ARG)" t nil) + +(nxhtml-autoload 'winsav-save-full-config `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/winsav" nxhtml-install-dir) "\ +Saved current winsav configuration in directory DIRNAME. +Then change to this configuration. + +See also `winsav-switch-config'. + +\(fn DIRNAME)" nil nil) + +(nxhtml-autoload 'winsav-switch-config `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/winsav" nxhtml-install-dir) "\ +Change to winsav configuration in directory DIRNAME. +If DIRNAME is the current winsav configuration directory then +offer to save it or restore it from saved values. + +Otherwise, before switching offer to save the current winsav +configuration. Then finally switch to the new winsav +configuration, creating it if it does not exist. + +If option `desktop-save-mode' is on then buffers and files are also +restored and saved the same way. + +See also option `winsav-save-mode' and command +`winsav-tell-configuration'. + +\(fn DIRNAME)" t nil) + +;;;*** + +;;;### (autoloads (winsav-rotate winsize-set-mode-line-colors winsize-save-window-configuration +;;;;;; winsize-balance-siblings resize-windows) "../../../../../.emacs.d/nxhtml/util/winsize" +;;;;;; "../../../../.emacs.d/nxhtml/util/winsize.el" (19292 53308)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/winsize.el +(web-autoload-require 'winsize 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/winsize" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'resize-windows `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/winsize" nxhtml-install-dir) "\ +Start window resizing. +During resizing a window is selected. You can move its +borders. In the default configuration the arrow keys moves the +right or bottom border if they are there. To move the opposite +border use S-arrowkeys. + +You can also do other window operations, like splitting, deleting +and balancing the sizes. The keybindings below describes the key +bindings during resizing:\\ + + `balance-windows' \\[balance-windows] + `winsize-balance-siblings' \\[winsize-balance-siblings] + `fit-window-to-buffer' \\[fit-window-to-buffer] + `shrink-window-if-larger-than-buffer' \\[shrink-window-if-larger-than-buffer] + + `winsav-rotate' \\[winsav-rotate] + + `winsize-move-border-up' \\[winsize-move-border-up] + `winsize-move-border-down' \\[winsize-move-border-down] + `winsize-move-border-left' \\[winsize-move-border-left] + `winsize-move-border-right' \\[winsize-move-border-right] + + `winsize-to-border-or-window-left' \\[winsize-to-border-or-window-left] + `winsize-to-border-or-window-up' \\[winsize-to-border-or-window-up] + `winsize-to-border-or-window-right' \\[winsize-to-border-or-window-right] + `winsize-to-border-or-window-down' \\[winsize-to-border-or-window-down] + + Note that you can also use your normal keys for + `forward-char', `backward-char', `next-line', `previous-line' + and what you have on HOME and END to move in the windows. That + might sometimes be necessary to directly select a + window. (You may however also use `other-window' or click + with the mouse, see below.) + + `delete-window' \\[delete-window] + `delete-other-windows' \\[delete-other-windows] + `split-window-vertically' \\[split-window-vertically] + `split-window-horizontally' \\[split-window-horizontally] + `other-window' \\[other-window] + + `winsize-save-window-configuration' \\[winsize-save-window-configuration] + `winsize-next-window-configuration' \\[winsize-next-window-configuration] + `winsize-previous-window-configuration' \\[winsize-previous-window-configuration] + + `mouse-set-point' \\[mouse-set-point] + + `winsize-quit' \\[winsize-quit] + `winsize-stop-go-back' \\[winsize-stop-go-back] + `winsize-stop' \\[winsize-stop] + `winsize-stop-and-execute' \\[winsize-stop-and-execute] + + `winsize-help' \\[winsize-help] + `describe-key' \\[describe-key] + `describe-key-briefly' \\[describe-key-briefly] + (All the normal help keys work, and at least those above will + play well with resizing.) + +Nearly all other keys exits window resizing and they are also +executed. However, the key sequences in `winsize-let-me-use' and +dito for commands there are also executed without exiting +resizing. + +The colors of the modelines are changed to those given in +`winsize-mode-line-colors' to indicate that you are resizing +windows. To make this indication more prominent the text in the +selected window is marked with the face hold in the variable +`winsize-selected-window-face'. + +The option `winsize-juris-way' decides how the borders to move +are selected. If this option is non-nil then the right or bottom +border are the ones that are moved with the arrow keys and the +opposite border with shift arrow keys. + +If `winsize-juris-way' is nil then the following apply: + +As you select other borders or move to new a window the mouse +pointer is moved inside the selected window to show which borders +are beeing moved. The mouse jumps a little bit to make its +position more visible. You can turn this off by customizing +`winsize-make-mouse-prominent'. + +Which borders initially are choosen are controlled by the +variable `winsize-autoselect-borders'. + +** Example: Border selection, movements and windows. + + Suppose you have a frame divided into windows like in the + figure below. If window B is selected when you start resizing + then (with default settings) the borders marked with 'v' and + 'h' will be the ones that the arrow keys moves. To indicate + this the mouse pointer is placed in the right lower corner of + the selected window B. + + +----------+-----------+--------+ + | | v | + | | v | + | A | _B_ v | + | | v | + | | v | + | | x v | + +hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh+ + | | | + | | | + | | | + | | | + | | | + | | | + +----------+---------+----------+ + + Now if you press M- then the picture below shows what has + happened. Note that the selected vertical border is now the one + between A and B. The mouse pointer has moved to the + corresponding corner in the window B, which is still selected. + + +----------+-----------+--------+ + | v | | + | v | | + | A v _B_ | | + | v | | + | v | | + | v x | | + +hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh+ + | | | + | | | + | | | + | | | + | | | + | | | + +----------+---------+----------+ + + Press M- once again. This gives this picture: + + +----------+-----------+--------+ + | v | | + | v | | + | _A_ v B | | + | v | | + | v | | + | x v | | + +hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh+ + | | | + | | | + | | | + | | | + | | | + | | | + +----------+---------+----------+ + + Note that the window A is now selected. However there is no + border that could be moved to the left of this window (which + would otherwise be chosen now) so the border between A and B is + still the one that and moves. The mouse has + moved to A. + + If we now delete window A the new situation will look like + this: + + +----------+-----------+--------+ + | | | + | | | + | _B_ | | + | | | + | | | + | x | | + +hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh+ + | | | + | | | + | | | + | | | + | | | + | | | + +----------+---------+----------+ + + + +>>>> testing stuff >>>> +`help-mode-hook' +`temp-buffer-show-function' +`view-exit-action' +<<<<<<<<<<<<<<<<<<<<<<< + +\(fn)" t nil) + +(nxhtml-autoload 'winsize-balance-siblings `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/winsize" nxhtml-install-dir) "\ +Make current window siblings the same height or width. +It works the same way as `balance-windows', but only for the +current window and its siblings. + +\(fn)" t nil) + +(nxhtml-autoload 'winsize-save-window-configuration `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/winsize" nxhtml-install-dir) "\ +Not documented + +\(fn)" t nil) + +(nxhtml-autoload 'winsize-set-mode-line-colors `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/winsize" nxhtml-install-dir) "\ +Turn mode line colors on if ON is non-nil, otherwise off. + +\(fn ON)" nil nil) + +(nxhtml-autoload 'winsav-rotate `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/winsize" nxhtml-install-dir) "\ +Rotate window configuration on selected frame. +MIRROR should be either 'mirror-left-right, 'mirror-top-bottom or +nil. In the first case the window configuration is mirrored +vertically and in the second case horizontally. If MIRROR is nil +the configuration is not mirrored. + +If TRANSPOSE is non-nil then the window structure is transposed +along the diagonal from top left to bottom right (in analogy with +matrix transosition). + +If called interactively MIRROR will is 'mirror-left-right by +default, but 'mirror-top-bottom if called with prefix. TRANSPOSE +is t. This mean that the window configuration will be turned one +quarter clockwise (or counter clockwise with prefix). + +\(fn MIRROR TRANSPOSE)" t nil) + +;;;*** + +;;;### (autoloads (wrap-to-fill-column-mode wrap-to-fill-left-marg-modes +;;;;;; wrap-to-fill-left-marg wrap-to-fill) "../../../../../.emacs.d/nxhtml/util/wrap-to-fill" +;;;;;; "../../../../.emacs.d/nxhtml/util/wrap-to-fill.el" (19306 +;;;;;; 54112)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/wrap-to-fill.el +(web-autoload-require 'wrap-to-fill 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/wrap-to-fill" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'wrap-to-fill 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/wrap-to-fill" loads) nil (put 'wrap-to-fill 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/wrap-to-fill" loads)))) + +(defvar wrap-to-fill-left-marg nil "\ +Left margin handling for `wrap-to-fill-column-mode'. +Used by `wrap-to-fill-column-mode'. If nil then center the +display columns. Otherwise it should be a number which will be +the left margin.") + +(nxhtml-custom-autoload 'wrap-to-fill-left-marg '../../../../../.emacs.d/nxhtml/util/wrap-to-fill t) + +(defvar wrap-to-fill-left-marg-modes '(text-mode fundamental-mode) "\ +Major modes where `wrap-to-fill-left-margin' may be nil.") + +(nxhtml-custom-autoload 'wrap-to-fill-left-marg-modes '../../../../../.emacs.d/nxhtml/util/wrap-to-fill t) + +(nxhtml-autoload 'wrap-to-fill-column-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/wrap-to-fill" nxhtml-install-dir) "\ +Use `fill-column' display columns in buffer windows. +By default the display columns are centered, but see the option +`wrap-to-fill-left-marg'. + +Fix-me: +Note 1: When turning this on `visual-line-mode' is also turned on. This +is not reset when turning off this mode. + +Note 2: The text properties 'wrap-prefix and 'wrap-to-fill-prefix +is set by this mode to indent continuation lines. + +Key bindings added by this minor mode: + +\\{wrap-to-fill-column-mode-map} + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (zencoding-preview zencoding-expand-yas zencoding-mode +;;;;;; zencoding-expand-line zencoding) "../../../../../.emacs.d/nxhtml/util/zencoding-mode" +;;;;;; "../../../../.emacs.d/nxhtml/util/zencoding-mode.el" (19276 +;;;;;; 1446)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/util/zencoding-mode.el +(web-autoload-require 'zencoding-mode 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/zencoding-mode" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(let ((loads (get 'zencoding 'custom-loads))) (if (member '"../../../../../.emacs.d/nxhtml/util/zencoding-mode" loads) nil (put 'zencoding 'custom-loads (cons '"../../../../../.emacs.d/nxhtml/util/zencoding-mode" loads)))) + +(nxhtml-autoload 'zencoding-expand-line `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/zencoding-mode" nxhtml-install-dir) "\ +Replace the current line's zencode expression with the corresponding expansion. +If prefix ARG is given or region is visible call `zencoding-preview' to start an +interactive preview. + +Otherwise expand line directly. + +For more information see `zencoding-mode'. + +\(fn ARG)" t nil) + +(nxhtml-autoload 'zencoding-mode `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/zencoding-mode" nxhtml-install-dir) "\ +Minor mode for writing HTML and CSS markup. +With zen coding for HTML and CSS you can write a line like + + ul#name>li.item*2 + +and have it expanded to + +
    +
  • +
  • +
+ +This minor mode defines keys for quick access: + +\\{zencoding-mode-keymap} + +Home page URL `http://www.emacswiki.org/emacs/ZenCoding'. + +See also `zencoding-expand-line'. + +\(fn &optional ARG)" t nil) + +(nxhtml-autoload 'zencoding-expand-yas `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/zencoding-mode" nxhtml-install-dir) "\ +Not documented + +\(fn)" t nil) + +(nxhtml-autoload 'zencoding-preview `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/util/zencoding-mode" nxhtml-install-dir) "\ +Expand zencode between BEG and END interactively. +This will show a preview of the expanded zen code and you can +accept it or skip it. + +\(fn BEG END)" t nil) + +;;;*** + +;;;### (autoloads (web-vcs-investigate-elisp-file web-vcs-byte-compile-file +;;;;;; web-vcs-message-with-face web-vcs-get-files-from-root web-vcs-log-edit +;;;;;; web-vcs-default-download-directory) "../../../../../.emacs.d/nxhtml/web-vcs" +;;;;;; "../../../../.emacs.d/nxhtml/web-vcs.el" (19412 30366)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/web-vcs.el +(web-autoload-require 'web-vcs 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/web-vcs" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'web-vcs-default-download-directory `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/web-vcs" nxhtml-install-dir) "\ +Try to find a suitable place. +Considers site-start.el, site- + +\(fn)" nil nil) + +(nxhtml-autoload 'web-vcs-log-edit `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/web-vcs" nxhtml-install-dir) "\ +Open log file. + +\(fn)" t nil) + +(nxhtml-autoload 'web-vcs-get-files-from-root `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/web-vcs" nxhtml-install-dir) "\ +Download a file tree from VCS system using the web interface. +Use WEB-VCS entry in variable `web-vcs-links-regexp' to download +files via http from URL to directory DL-DIR. + +Show URL first and offer to visit the page. That page will give +you information about version control system (VCS) system used +etc. + +\(fn WEB-VCS URL DL-DIR)" nil nil) + +(nxhtml-autoload 'web-vcs-message-with-face `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/web-vcs" nxhtml-install-dir) "\ +Display a colored message at the bottom of the string. +FACE is the face to use for the message. +FORMAT-STRING and ARGS are the same as for `message'. + +Also put FACE on the message in *Messages* buffer. + +\(fn FACE FORMAT-STRING &rest ARGS)" nil nil) + +(nxhtml-autoload 'web-vcs-byte-compile-file `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/web-vcs" nxhtml-install-dir) "\ +Byte compile FILE in a new Emacs sub process. +EXTRA-LOAD-PATH is added to the front of `load-path' during +compilation. + +FILE is set to `buffer-file-name' when called interactively. +If LOAD + +\(fn FILE &optional LOAD EXTRA-LOAD-PATH COMP-DIR)" t nil) + +(nxhtml-autoload 'web-vcs-investigate-elisp-file `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/web-vcs" nxhtml-install-dir) "\ +Not documented + +\(fn FILE-OR-BUFFER)" t nil) + +;;;*** + +;;;### (autoloads nil nil ("../../../../.emacs.d/nxhtml/autostart.el" +;;;;;; "../../../../.emacs.d/nxhtml/autostart22.el" "../../../../.emacs.d/nxhtml/etc/schema/schema-path-patch.el" +;;;;;; "../../../../.emacs.d/nxhtml/nxhtml-base.el" "../../../../.emacs.d/nxhtml/nxhtml-loaddefs.el" +;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/html-imenu.el" "../../../../.emacs.d/nxhtml/nxhtml/html-move.el" +;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/html-quote.el" "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-autoload.el" +;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/nxhtml-strval.el" "../../../../.emacs.d/nxhtml/nxhtml/nxhtmljs.el" +;;;;;; "../../../../.emacs.d/nxhtml/nxhtml/outline-magic.el" "../../../../.emacs.d/nxhtml/nxhtml/wtest.el" +;;;;;; "../../../../.emacs.d/nxhtml/related/flymake-helpers.el" +;;;;;; "../../../../.emacs.d/nxhtml/related/flymakemsg.el" "../../../../.emacs.d/nxhtml/related/flymu.el" +;;;;;; "../../../../.emacs.d/nxhtml/related/php-imenu.el" "../../../../.emacs.d/nxhtml/tests/angus77-setup-jde.el" +;;;;;; "../../../../.emacs.d/nxhtml/tests/emacstest-suites.el" "../../../../.emacs.d/nxhtml/tests/ert2.el" +;;;;;; "../../../../.emacs.d/nxhtml/tests/hfy-test.el" "../../../../.emacs.d/nxhtml/tests/inemacs/bug1013.el" +;;;;;; "../../../../.emacs.d/nxhtml/tests/mumamo-test.el" "../../../../.emacs.d/nxhtml/tests/nxhtmltest-helpers.el" +;;;;;; "../../../../.emacs.d/nxhtml/util/appmenu-fold.el" "../../../../.emacs.d/nxhtml/util/css-simple-completion.el" +;;;;;; "../../../../.emacs.d/nxhtml/util/custsets.el" "../../../../.emacs.d/nxhtml/util/ecb-batch-compile.el" +;;;;;; "../../../../.emacs.d/nxhtml/util/fupd.el" "../../../../.emacs.d/nxhtml/util/idn.el" +;;;;;; "../../../../.emacs.d/nxhtml/util/key-cat.el" "../../../../.emacs.d/nxhtml/util/mumamo-aspnet.el" +;;;;;; "../../../../.emacs.d/nxhtml/util/mumamo-trace.el" "../../../../.emacs.d/nxhtml/util/new-key-seq-widget.el" +;;;;;; "../../../../.emacs.d/nxhtml/util/nxml-mode-os-additions.el" +;;;;;; "../../../../.emacs.d/nxhtml/util/org-panel.el" "../../../../.emacs.d/nxhtml/util/rxi.el" +;;;;;; "../../../../.emacs.d/nxhtml/util/useful-commands.el" "../../../../.emacs.d/nxhtml/web-autoload.el") +;;;;;; (19826 40509 115984)) + +;;;*** + +;;;### (autoloads (nxhtml-byte-recompile-file nxhtml-byte-compile-file +;;;;;; nxhtml-get-missing-files nxhtml-update-existing-files nxhtml-setup-download-all +;;;;;; nxhtml-setup-auto-download nxhtml-setup-install) "../../../../../.emacs.d/nxhtml/nxhtml-web-vcs" +;;;;;; "../../../../.emacs.d/nxhtml/nxhtml-web-vcs.el" (19412 30366)) +;;; Generated autoloads from ../../../../.emacs.d/nxhtml/nxhtml-web-vcs.el +(web-autoload-require 'nxhtml-web-vcs 'lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml-web-vcs" nxhtml-install-dir 'nxhtml-byte-compile-file) + + +(nxhtml-autoload 'nxhtml-setup-install `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml-web-vcs" nxhtml-install-dir) "\ +Setup and start nXhtml installation. + +This is for installation and updating directly from the nXhtml +development sources. + +There are two different ways to install: + + (1) Download all at once: `nxhtml-setup-download-all' + (2) Automatically download part by part: `nxhtml-setup-auto-download' + +You can convert between those ways by calling this function again. +You can also do this by setting the option `nxhtml-autoload-web' yourself. + +When you have nXhtml installed you can update it: + + (3) Update new files in nXhtml: `nxhtml-update-existing-files' + +To learn more about nXhtml visit its home page at URL +`http://www.emacswiki.com/NxhtmlMode/'. + +If you want to test auto download (but not use it further) there +is a special function for that, you answer T here: + + (T) Test automatic download part by part: `nxhtml-setup-test-auto-download' + +====== +*Note* +If you want to download a zip file with latest released version instead then +please see URL `http://ourcomments.org/Emacs/nXhtml/doc/nxhtml.html'. + +\(fn WAY)" t nil) + +(nxhtml-autoload 'nxhtml-setup-auto-download `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml-web-vcs" nxhtml-install-dir) "\ +Set up to autoload nXhtml files from the web. + +This function will download some initial files and then setup to +download the rest when you need them. + +Files will be downloaded under the directory root you specify in +DL-DIR. + +Note that files will not be upgraded automatically. The auto +downloading is just for files you are missing. (This may change a +bit in the future.) If you want to upgrade those files that you +have downloaded you can just call `nxhtml-update-existing-files'. + +You can easily switch between this mode of downloading or +downloading the whole of nXhtml by once. To switch just call the +command `nxhtml-setup-install'. + +See also the command `nxhtml-setup-download-all'. + +Note: If your nXhtml is to old you can't use this function + directly. You have to upgrade first, se the function + above. Version 2.07 or above is good for this. + +\(fn DL-DIR)" t nil) + +(nxhtml-autoload 'nxhtml-setup-download-all `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml-web-vcs" nxhtml-install-dir) "\ +Download or update all of nXhtml. + +You can download all if nXhtml with this command. + +To update existing files use `nxhtml-update-existing-files'. + +If you want to download only those files you are actually using +then call `nxhtml-setup-auto-download' instead. + +See the command `nxhtml-setup-install' for a convenient way to +call these commands. + +For more information about auto download of nXhtml files see +`nxhtml-setup-auto-download'. + +\(fn DL-DIR)" t nil) + +(nxhtml-autoload 'nxhtml-update-existing-files `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml-web-vcs" nxhtml-install-dir) "\ +Update existing nXhtml files from the development sources. +Only files you already have will be updated. + +Note that this works both if you have setup nXhtml to auto +download files as you need them or if you have downloaded all of +nXhtml at once. + +For more information about installing and updating nXhtml see the +command `nxhtml-setup-install'. + +\(fn)" t nil) + +(nxhtml-autoload 'nxhtml-get-missing-files `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml-web-vcs" nxhtml-install-dir) "\ +Not documented + +\(fn SUB-DIR FILE-NAME-LIST)" nil nil) + +(nxhtml-autoload 'nxhtml-byte-compile-file `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml-web-vcs" nxhtml-install-dir) "\ +Not documented + +\(fn FILE &optional LOAD)" nil nil) + +(nxhtml-autoload 'nxhtml-byte-recompile-file `(lp '(nxhtml-download-root-url nil) "../../../../.emacs.d/nxhtml/nxhtml-web-vcs" nxhtml-install-dir) "\ +Byte recompile FILE file if necessary. +For more information see `nxhtml-byte-compile-file'. +Loading is done if recompiled and LOAD is t. + +\(fn FILE &optional LOAD)" t nil) + +;;;*** diff --git a/emacs.d/nxhtml/nxhtml-web-vcs.el b/emacs.d/nxhtml/nxhtml-web-vcs.el new file mode 100644 index 0000000..fb0fb09 --- /dev/null +++ b/emacs.d/nxhtml/nxhtml-web-vcs.el @@ -0,0 +1,689 @@ +;;; nxhtml-web-vcs.el --- nXhtml things for web-vcs.el +;; +;; Author: Lennart Borgman (lennart O borgman A gmail O com) +;; Created: 2010-01-13 Wed +;; Version: +;; Last-Updated: +;; URL: +;; Keywords: +;; Compatibility: +;; +;; Features that might be required by this library: +;; +;; None +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; Commentary: +;; +;; +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; 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 3, 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: + +(eval-when-compile (require 'cl)) +(eval-when-compile (require 'nxhtml-base nil t)) +;;(eval-when-compile (require 'nxhtmlmaint nil t)) +(eval-when-compile (require 'web-vcs nil t)) + +(defvar nxhtml-web-vcs-file (or load-file-name + (when (boundp 'bytecomp-filename) bytecomp-filename) + buffer-file-name) + "This file.") + +(defun nxhtml-require-base () + (require 'nxhtml-base nil t) + (unless (featurep 'nxhtml-base) + ;; At startup, need to load it by hand. + (let ((load-path load-path)) + (add-to-list 'load-path (file-name-directory nxhtml-web-vcs-file)) + (require 'nxhtml-base)))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Repository URL + + +;;(nxhtml-default-download-directory) +(defun nxhtml-default-download-directory () + (let* ((ur (expand-file-name "" "~")) + (ur-len (length ur)) + (full (if (and (boundp 'nxhtml-install-dir) + nxhtml-install-dir) + nxhtml-install-dir + (file-name-as-directory + (expand-file-name "" + (web-vcs-default-download-directory))))) + (full-len (length full))) + (if (and (> full-len ur-len) + (string= ur (substring full 0 ur-len))) + (concat "~" (substring full ur-len)) + full))) + + +(defun nxhtml-web-vcs-read-dl-dir (prompt) + "Return current nXhtml install dir or read dir." + (or (and (boundp 'nxhtml-install-dir) + nxhtml-install-dir) + (let* ((pr (concat + "A directory named 'nxhtml' will be created below the root you give." + "\n" + prompt)) + (root (read-directory-name pr (nxhtml-default-download-directory)))) + (when root + (expand-file-name "nxhtml" root))))) + +;;(call-interactively 'nxhtml-setup-install) +;; (read-key "Prompt: ") +;; (y-or-n-p "Prompt") +;;;###autoload +(defun nxhtml-setup-install (way) + "Setup and start nXhtml installation. + +This is for installation and updating directly from the nXhtml +development sources. + +There are two different ways to install: + + (1) Download all at once: `nxhtml-setup-download-all' + (2) Automatically download part by part: `nxhtml-setup-auto-download' + +You can convert between those ways by calling this function again. +You can also do this by setting the option `nxhtml-autoload-web' yourself. + +When you have nXhtml installed you can update it: + + (3) Update new files in nXhtml: `nxhtml-update-existing-files' + +To learn more about nXhtml visit its home page at URL +`http://www.emacswiki.com/NxhtmlMode/'. + +If you want to test auto download \(but not use it further) there +is a special function for that, you answer T here: + + (T) Test automatic download part by part: `nxhtml-setup-test-auto-download' + +====== +*Note* +If you want to download a zip file with latest released version instead then +please see URL `http://ourcomments.org/Emacs/nXhtml/doc/nxhtml.html'." + (interactive (let ((curr-cfg (current-window-configuration))) + (describe-function 'nxhtml-setup-install) + (select-window (get-buffer-window (help-buffer))) + (delete-other-windows) + (list + (let* ((key nil) + (has-nxhtml (and (boundp 'nxhtml-install-dir) nxhtml-install-dir)) + (current-way (if has-nxhtml + (if (and (boundp 'nxhtml-autoload-web) + nxhtml-autoload-web) + "Your current setup is to download part by part from the web." + "Your current setup it to download all of nXhtml at once.") + "(You have not currently installed nXhtml.)")) + (prompt (concat "Setup nXhtml install." + "\n" current-way + "\n" + "\n(1) Download whole at once, or (2) part by part as needed" + (if has-nxhtml "\n(3) Update your existing nXhtml" "") + "\n(T) For temporary testing downloading part by part" + "\n" + "\n(? for help, q to quit): ")) + (allowed-keys (if has-nxhtml + '(?1 ?2 ?3 ?T ?q 7) + '(?1 ?2 ?T ?q 7))) + (please nil)) + (while (not (member key allowed-keys)) + (if (not (member key '(??))) + (when key + (unless please + (setq prompt (concat "Please answer with one of the alternatives.\n\n" + prompt)) + (setq please t))) + (describe-function 'nxhtml-setup-install) + (select-window (get-buffer-window (help-buffer))) + (delete-other-windows)) + (setq key (web-vcs-read-key prompt)) + ;;(message "key = %S" key) (sit-for 1) + ) + (case key + (7 (set-window-configuration curr-cfg) + nil) + (?1 'whole) + (?2 'part-by-part) + (?3 'update-existing) + (?T 'test-part-by-part) + ))))) + (message "") + (case way + (whole (call-interactively 'nxhtml-setup-download-all)) + (part-by-part (call-interactively 'nxhtml-setup-auto-download)) + (update-existing (call-interactively 'nxhtml-update-existing-files)) + (test-part-by-part (call-interactively 'nxhtml-setup-test-auto-download)) + ((eq nil way) nil) + (t (error "Unknown way = %S" way)))) + +(defvar nxhtml-basic-files '( + "nxhtml-base.el" + "nxhtml-loaddefs.el" + "web-autoload.el" + "etc/schema/schema-path-patch.el" + "nxhtml/nxhtml-autoload.el" + "autostart.el" + )) + +;;;###autoload +(defun nxhtml-setup-auto-download (dl-dir) + "Set up to autoload nXhtml files from the web. + +This function will download some initial files and then setup to +download the rest when you need them. + +Files will be downloaded under the directory root you specify in +DL-DIR. + +Note that files will not be upgraded automatically. The auto +downloading is just for files you are missing. (This may change a +bit in the future.) If you want to upgrade those files that you +have downloaded you can just call `nxhtml-update-existing-files'. + +You can easily switch between this mode of downloading or +downloading the whole of nXhtml by once. To switch just call the +command `nxhtml-setup-install'. + +See also the command `nxhtml-setup-download-all'. + +Note: If your nXhtml is to old you can't use this function + directly. You have to upgrade first, se the function + above. Version 2.07 or above is good for this." + (interactive (progn + (describe-function 'nxhtml-setup-auto-download) + (select-window (get-buffer-window (help-buffer))) + (delete-other-windows) + (nxhtml-check-convert-to-part-by-part) + (list + (progn + (when (and (boundp 'nxhtml-autoload-web) + (not nxhtml-autoload-web)) + (unless (yes-or-no-p "Convert to updating nXhtml part by part? ") + (throw 'command-level nil))) + (nxhtml-web-vcs-read-dl-dir "Download nXhtml part by part to directory: "))))) + (catch 'command-level + (if (not dl-dir) + (unless (with-no-warnings (called-interactively-p)) + (error "dl-dir should be a directory")) + (nxhtml-check-convert-to-part-by-part) + (when (and (boundp 'nxhtml-install-dir) + nxhtml-install-dir) + (unless (string= (file-truename dl-dir) + (file-truename nxhtml-install-dir)) + (error "Download dir must be same as nxhtml-install-dir=%S" nxhtml-install-dir))) + (let* (;; Need some files: + (web-vcs-el-src (concat (file-name-sans-extension web-vcs-el-this) ".el")) + (web-vcs-el (expand-file-name (file-name-nondirectory web-vcs-el-src) + dl-dir)) + (vcs 'lp) + (base-url (nxhtml-download-root-url nil)) + (byte-comp (if (boundp 'web-autoload-autocompile) + web-autoload-autocompile + t)) + (has-nxhtml (and (boundp 'nxhtml-install-dir) + nxhtml-install-dir)) + (web-vcs-folder-cache nil)) + (setq nxhtml-install-dir dl-dir) + (let ((root (file-name-directory dl-dir))) + (unless (file-exists-p root) + (unless (yes-or-no-p (format "Directory %S does not exist, create it? " root)) + (error "Aborted by user")))) + (make-directory dl-dir t) + (setq message-log-max t) + (view-echo-area-messages) + (message "") + (message "") + (web-vcs-message-with-face 'web-vcs-green "==== Starting nXhtml part by part state ====") + (message "has-nxhtml=%s" has-nxhtml) + ;; Fix-me: First copy this file and web-vcs.el to its destination: + (unless (string= (file-truename dl-dir) + (file-truename (file-name-directory nxhtml-web-vcs-file))) + (dolist (f (list web-vcs-el-src nxhtml-web-vcs-file)) + (copy-file f (expand-file-name (file-name-nondirectory f) dl-dir) + 'ok-overwrite))) + (when byte-comp (web-vcs-byte-compile-newer-file web-vcs-el t)) + ;; Get basic file list: + (catch 'web-autoload-comp-restart + ;;(let ((file-mask (regexp-opt nxhtml-basic-files))) + ;; (web-vcs-get-missing-matching-files vcs base-url dl-dir file-mask)) + (dolist (f nxhtml-basic-files) + (web-vcs-get-missing-matching-files vcs base-url dl-dir f)) + ;; Autostart.el has not run yet, add download dir to load-path. + (let ((load-path (cons (file-name-directory web-vcs-el) load-path))) + (when byte-comp + (dolist (file nxhtml-basic-files) + (let ((el-file (expand-file-name file dl-dir))) + (web-vcs-byte-compile-newer-file el-file nil))))) + (let ((autostart-file (expand-file-name "autostart" dl-dir))) + ;;(ad-deactivate 'require) + (web-vcs-set&save-option 'nxhtml-autoload-web t) + (web-vcs-log nil nil "* nXhtml: Download Part by Part as Needed\n") + (load autostart-file) + (unless (ad-is-active 'require) (ad-activate 'require)) + (web-vcs-log-save) + (web-vcs-message-with-face 'web-vcs-green "==== Basic files for nXhtml part by part are now installed ====") + (web-vcs-display-messages t) + (unless has-nxhtml (nxhtml-add-loading-to-custom-file autostart-file t)))))))) + +;;(call-interactively 'nxhtml-download) +;;;###autoload +(defun nxhtml-setup-download-all (dl-dir) + "Download or update all of nXhtml. + +You can download all if nXhtml with this command. + +To update existing files use `nxhtml-update-existing-files'. + +If you want to download only those files you are actually using +then call `nxhtml-setup-auto-download' instead. + +See the command `nxhtml-setup-install' for a convenient way to +call these commands. + +For more information about auto download of nXhtml files see +`nxhtml-setup-auto-download'." + (interactive (progn + (describe-function 'nxhtml-setup-auto-download) + (select-window (get-buffer-window (help-buffer))) + (delete-other-windows) + ;;(nxhtml-check-convert-to-part-by-part) + (list + (nxhtml-web-vcs-read-dl-dir "Download whole nXhtml to directory: ")))) + + (let ((root (file-name-directory dl-dir))) + (unless (file-exists-p root) + (unless (yes-or-no-p (format "Directory %S does not exist, create it? " root)) + (error "Aborted by user")))) + (make-directory dl-dir t) + (let ((msg (concat "Downloading nXhtml through Launchpad web interface will take rather long\n" + "time (5-15 minutes) so you may want to do it in a separate Emacs session.\n\n" + "Do you want to download using this Emacs session? " + ))) + (if (not (y-or-n-p msg)) + (message "Aborted") + (setq message-log-max t) + (let ((do-byte (y-or-n-p "Do you want to byte compile the files after downloading? "))) + (nxhtml-download-1 dl-dir nil do-byte))))) + + +(defun nxhtml-download-1 (dl-dir revision do-byte) + "Download nXhtml to directory DL-DIR. +If REVISION is nil download latest revision, otherwise the +specified one. + +If DO-BYTE is non-nil byte compile nXhtml after download." + (let* ((has-nxhtml (and (boundp 'nxhtml-install-dir) + nxhtml-install-dir)) + (base-url nxhtml-web-vcs-base-url) + (files-url (concat base-url "files/")) + ;;(revs-url (concat base-url "changes/")) + (rev-part (if revision (number-to-string revision) "head%3A/")) + (full-root-url (concat files-url rev-part)) + (web-vcs-folder-cache nil) + (web-autoload-paranoid nil)) + ;;(nxhtml-require-base) + (when (web-vcs-get-files-from-root 'lp full-root-url dl-dir) + (web-vcs-display-messages t) + (web-vcs-log nil nil "* nXhtml: Download All\n") + (web-vcs-set&save-option 'nxhtml-autoload-web nil) + (message "") + (web-vcs-message-with-face 'web-vcs-green "==== Starting downloading whole nXhtml ====") + (let ((autostart-file (expand-file-name "autostart" dl-dir))) + (load autostart-file) + (web-vcs-log-save) + (web-vcs-message-with-face 'web-vcs-green "==== All files for nXhtml are now installed ====") + (nxhtmlmaint-byte-recompile) + (unless has-nxhtml (nxhtml-add-loading-to-custom-file autostart-file nil)))))) + +(defun nxhtml-check-convert-to-part-by-part () + (when (and (boundp 'nxhtml-install-dir) + nxhtml-install-dir) + (unless (and (boundp 'nxhtml-autoload-web) + nxhtml-autoload-web) + (if (not (boundp 'nxhtml-menu:version)) + (error "nxhtml-install-dir set but no version found") + (unless (string-match "[\.0-9]+" nxhtml-menu:version) + (error "Can't find current version nxhtml-menu:version=%S" nxhtml-menu:version)) + (let* ((ver-str (match-string 0 nxhtml-menu:version)) + (ver-num (string-to-number ver-str))) + (when (< ver-num 2.07) + (web-vcs-message-with-face 'web-vcs-red "Too old nXhtml for download part by part.") + (throw 'command-level nil))))))) + + +;;(directory-files default-directory nil "\\el$") +;;(directory-files default-directory nil "[^#~]$") +;;;###autoload +(defun nxhtml-update-existing-files () + "Update existing nXhtml files from the development sources. +Only files you already have will be updated. + +Note that this works both if you have setup nXhtml to auto +download files as you need them or if you have downloaded all of +nXhtml at once. + +For more information about installing and updating nXhtml see the +command `nxhtml-setup-install'." + ;; Fix-me: download new files too if you are not auto downloading. + (interactive) + (when (y-or-n-p "Do you want to update your nXhtml files? ") + (message "") + (web-vcs-display-messages t) + (web-vcs-message-with-face 'web-vcs-yellow "*\nStarting updating your nXhtml files.\n*\n") + (message nil) + (web-vcs-clear-folder-cache) + (let ((vcs 'lp) + (base-url (nxhtml-download-root-url nil)) + (dl-dir nxhtml-install-dir) + web-vcs-folder-cache) + (setq dl-dir (file-name-as-directory dl-dir)) + (web-vcs-update-existing-files vcs base-url dl-dir dl-dir) + (web-vcs-clear-folder-cache)) + (display-buffer (get-buffer-create "*Compile-Log*")) + (nxhtmlmaint-byte-recompile) + (web-vcs-log-save) + (web-vcs-message-with-face 'web-vcs-yellow "*\nFinished updating your nXhtml files.\n*\n") + (message nil))) + + +;;(nxhtml-maybe-download-files (expand-file-name "nxhtml/doc/img/" nxhtml-install-dir) nil) +;;;###autoload +(defun nxhtml-get-missing-files (sub-dir file-name-list) + (let (file-mask + (root-url (nxhtml-download-root-url nil)) + files-regexp + (full-dir (expand-file-name sub-dir nxhtml-install-dir)) + miss-names) + (if file-name-list + (progn + (dolist (f file-name-list) + (let ((full-f (expand-file-name f full-dir))) + (unless (file-exists-p full-f) + (setq miss-names (cons f miss-names))))) + (setq files-regexp (regexp-opt miss-names))) + (setq files-regexp ".*")) + ;;(unless (file-exists-p full-dir) (make-directory full-dir t)) + (setq file-mask + (concat (file-relative-name (file-name-as-directory full-dir) + nxhtml-install-dir) + files-regexp)) + (let ((web-vcs-folder-cache nil)) + (web-vcs-get-missing-matching-files 'lp root-url nxhtml-install-dir + file-mask)))) + +;; Fix-me: Does not work, Emacs Bug +;; Maybe use wget? http://gnuwin32.sourceforge.net/packages/wget.htm +;; http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=5103 +;; (nxhtml-get-release-revision) +(defun nxhtml-get-release-revision () + "Get revision number for last release." + (let* ((all-rev-url "http://code.launchpad.net/%7Enxhtml/nxhtml/main") + (url-buf (url-retrieve-synchronously all-rev-url)) + (vcs-rec (or (assq 'lp web-vcs-links-regexp) + (error "Does not know web-vcs 'lp"))) + (rel-ver-regexp (nth 6 vcs-rec)) + ) + (message "%S" url-buf) + (with-current-buffer url-buf + (when (re-search-forward rel-ver-regexp nil t) + (match-string 1))))) + +;;;###autoload +(defun nxhtml-byte-compile-file (file &optional load) + (let ((extra-load-path (when nxhtml-install-dir + (mapcar (lambda (p) + (file-name-as-directory + (expand-file-name p nxhtml-install-dir))) + '("tests" "related" "nxhtml" "util" "."))))) + ;; (message "nxhtml-byte-compile-file:extra-load-path=%s" extra-load-path) + (web-vcs-byte-compile-file file load extra-load-path))) + +;; fix-me: change web-vcs-byte-compile-file instead +;;;###autoload +(defun nxhtml-byte-recompile-file (file &optional load) + "Byte recompile FILE file if necessary. +For more information see `nxhtml-byte-compile-file'. +Loading is done if recompiled and LOAD is t." + (interactive (list (buffer-file-name) + t)) + (let ((elc-file (byte-compile-dest-file file))) + (if (file-newer-than-file-p file elc-file) + (nxhtml-byte-compile-file file load) + (message "Byte compilation of this file is up to date.")))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Add to custom file + + +(defvar nxhtml-handheld-wincfg nil) +(defun nxhtml-handheld-restore-wincg () + (when nxhtml-handheld-wincfg + (set-window-configuration nxhtml-handheld-wincfg) + (setq nxhtml-handheld-wincfg nil))) + +;;(nxhtml-handheld-add-loading-to-custom-file "TEST-ME") +(defun nxhtml-handheld-add-loading-to-custom-file (file-to-load) + (setq nxhtml-handheld-wincfg (current-window-configuration)) + (delete-other-windows) + (let ((info-buf (get-buffer-create "Information about how to add nXhtml to (custom-file)")) + (load-str (format "(load %S)" file-to-load))) + (with-current-buffer info-buf + (add-hook 'kill-buffer-hook 'nxhtml-handheld-restore-wincg nil t) + (insert "Insert the following line to (custom-file), ie the file in the other window:\n\n") + (let ((here (point))) + (insert " " + (propertize load-str 'face 'secondary-selection) + "\n") + (copy-region-as-kill here (point)) + (insert "\nThe line above is in the clipboard so you can just paste it where you want it.\n") + (insert "When ready kill this buffer.") + (goto-char here)) + (setq buffer-read-only t) + (set-buffer-modified-p nil)) + (set-window-buffer (selected-window) info-buf) + (find-file-other-window (custom-file)))) + +;; (nxhtml-add-loading-to-custom-file "test-file") +(defun nxhtml-add-loading-to-custom-file (file-to-load part-by-part) + (message "") + (require 'cus-edit) + (if (not (condition-case nil (custom-file) (error nil))) + (progn + (message "\n\n") + (web-vcs-message-with-face + 'web-vcs-red + (concat "Since you have started this Emacs session without running your init files" + "\nthey are unknown and the installation can not add the statement below." + "\nTo finish the setup of nXhtml you must add" + "\n\n (load %S)" + "\n\nto your custom-file if you have not done it yet." + "\nYou must also customize the variable `nxhtml-autoload-web' to tell that" + (if part-by-part + "\nyou want to download nXhml files as you need them." + "\nyou do not want to allow automatic downloading of nXhtml files." + ) + "\n") + file-to-load) + (message "") + (web-vcs-display-messages t)) + (let ((prompt (concat "Basic setup of nXhtml is done, but it must be loaded from (custom-file)." + "\nShould I add loading of nXhtml to (custom-file) for you? "))) + (if (yes-or-no-p prompt) + (nxhtml-add-loading-to-custom-file-auto file-to-load) + (if (yes-or-no-p "Should I guide you through how to do it? ") + (nxhtml-handheld-add-loading-to-custom-file file-to-load) + (web-vcs-message-with-face 'web-vcs-green + "OK. You need to add (load %S) to your init file" file-to-load)))))) + +;; Fix-me: really do this? Is it safe enough? +(defun nxhtml-add-loading-to-custom-file-auto (file-to-load) + (unless (file-name-absolute-p file-to-load) + (error "nxhtml-add-loading-to-custom-file: Not abs file name: %S" file-to-load)) + (let ((old-buf (find-buffer-visiting (custom-file))) + (full-to-load (expand-file-name file-to-load))) + (with-current-buffer (or old-buf (find-file-noselect (custom-file))) + (save-restriction + (widen) + (catch 'done + (while (progn + (while (progn (skip-chars-forward " \t\n\^l") + (looking-at ";")) + (forward-line 1)) + (not (eobp))) + (let ((start (point)) + (form (read (current-buffer)))) + (when (eq (nth 0 form) 'load) + (let* ((form-file (nth 1 form)) + (full-form-file (expand-file-name form-file))) + (when (string= full-form-file full-to-load) + (throw 'done nil)) + (when (and (string= (file-name-nondirectory full-form-file) + (file-name-nondirectory full-to-load)) + (not (string= full-form-file full-to-load))) + (if (yes-or-no-p "Replace current nXhtml loading in (custom-file)? ") + (progn + (goto-char start) ;; at form start now + (forward-char (length "(load ")) + (skip-chars-forward " \t\n\^l") ;; at start of string + (setq start (point)) + (setq form (read (current-buffer))) + (delete-region start (point)) + (insert (format "%S" full-to-load)) + (basic-save-buffer)) + (web-vcs-message-with-face 'web-vcs-red "Can't continue then") + (web-vcs-display-messages t) + (throw 'command-level nil))))))) + ;; At end of file + (insert (format "\n(load %S)\n" file-to-load)) + (basic-save-buffer)) + (unless old-buf (kill-buffer old-buf)))))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;; Start Testing function +(defun emacs-Q-no-nxhtml (&rest args) + (let* ((old-env-load-path (getenv "EMACSLOADPATH")) + sub-env-load-path + (elp-list (or (when old-env-load-path + ;;(split-string old-env-load-path ";")) + (split-string old-env-load-path path-separator)) + load-path)) + (sub-elp-list nil) + ret + (this-emacs-exe (locate-file invocation-name + (list invocation-directory) + exec-suffixes))) + (dolist (p elp-list) + (when (file-exists-p p) + (unless (string= nxhtml-install-dir p) + (let* ((dir (file-name-directory p)) + (last (file-name-nondirectory p)) + (last-dir (file-name-nondirectory + (directory-file-name dir)))) + (unless (and (string= "nxhtml" last-dir) + (member last '("util" "test" "nxhtml" "related" "alt"))) + (setq sub-elp-list (cons p sub-elp-list))))))) + ;;(setq sub-env-load-path (mapconcat 'identity (reverse sub-elp-list) ";")) + (setq sub-env-load-path (mapconcat 'identity (reverse sub-elp-list) path-separator)) + (setenv "EMACSLOADPATH" sub-env-load-path) + (setq ret (apply 'call-process this-emacs-exe nil 0 nil "-Q" args)) + (setenv "EMACSLOADPATH" old-env-load-path) + ret)) + +;; (call-interactively-p 'nxhtml-setup-test-auto-download) +;; (nxhtml-setup-test-auto-download "c:/test2/") +(defun nxhtml-setup-test-auto-download (test-dir) + "Test autoload in a new emacs, started with 'emacs -Q'. +You can choose where to download the files and just delete them +when you have tested enough." + (interactive (list (read-directory-name "Directory for test of auto download of nXhtml: "))) + (let ((this-dir (file-name-directory web-vcs-el-this)) + (this-name (file-name-nondirectory web-vcs-el-this)) + that-file) + (when (and (file-exists-p test-dir) + (not (y-or-n-p (format "Directory %S exists, really test there? " test-dir)))) + (error "Aborted")) + (unless (file-exists-p test-dir) (make-directory test-dir)) + (setq that-file (expand-file-name this-name test-dir)) + (when (file-exists-p that-file) (delete-file that-file)) + (copy-file web-vcs-el-this that-file) + (emacs-Q-no-nxhtml "-l" that-file "-f" "nxhtml-setup-test-auto-download-do-it-here"))) + +(defun nxhtml-setup-test-auto-download-do-it-here () + "Helper for `nxhtml-setup-test-auto-down-load'." + (let ((this-dir (file-name-directory web-vcs-el-this))) + (nxhtml-setup-auto-download this-dir))) + +(defun web-vcs-check-if-modified () + (let ( + (t1 (format-time-string "%Y-%m-%dT%T%z" (date-to-time "2010-01-01 18:20"))) + (t2 (format-time-string "%Y-%m-%dT%T%z" (date-to-time "Mon, 28 Dec 2009 08:57:44 GMT"))) + (url-request-extra-headers + (list + (cons "If-Modified-Since" + (format-time-string + ;;"%Y-%m-%dT%T%z" + "%a, %e %b %Y %H:%M:%S GMT" + (nth 5 (file-attributes "c:/test/temp.el" ))) + ))) + xb) + (setq xb (url-retrieve-synchronously "http://www.emacswiki.org/emacs/download/anything.el")) + (switch-to-buffer xb) + )) +;; (emacs-Q-no-nxhtml "web-vcs.el" "-l" "c:/test/d27/web-autostart.el") +;; (emacs-Q-no-nxhtml "web-vcs.el" "-l" "c:/test/d27/autostart.el") +;; (emacs-Q-no-nxhtml "web-vcs.el" "-f" "eval-buffer" "-f" "nxhtml-temp-setup-auto-download") +;; (emacs-Q-no-nxhtml "-l" "c:/test/d27/web-vcs" "-l" "c:/test/d27/nxhtml-web-vcs" "-f" "nxhtml-temp-setup-auto-download") +;; (emacs-Q-no-nxhtml "-l" "c:/test/d27/nxhtml-web-vcs" "-f" "nxhtml-temp-setup-auto-download") +;; (emacs-Q-no-nxhtml "--geometry=200x50+100+100" "-l" "c:/test/d27/web-vcs" "-f" "web-vcs-nxhtml") +(defun nxhtml-temp-setup-auto-download () + ;;(when (fboundp 'w32-send-sys-command) (w32-send-sys-command #xf030) (sit-for 2)) + (set-frame-size (selected-frame) + (/ 1024 (frame-char-width)) + (/ 512 (frame-char-height)) + ) + (tool-bar-mode -1) + (set-frame-position (selected-frame) 100 50) + (when (y-or-n-p "Do nXhtml? ") + (view-echo-area-messages) + (setq truncate-lines t) + (split-window-horizontally) + (let ((load-path (cons default-directory load-path))) + (require 'web-vcs)) + ;(nxhtml-setup-auto-download "c:/test/d27") + (call-interactively 'nxhtml-setup-auto-download) + )) +;;;;;; End Testing function +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + +(provide 'nxhtml-web-vcs) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; nxhtml-web-vcs.el ends here diff --git a/emacs.d/nxhtml/nxhtml/ChangeLog b/emacs.d/nxhtml/nxhtml/ChangeLog new file mode 100644 index 0000000..c24d360 --- /dev/null +++ b/emacs.d/nxhtml/nxhtml/ChangeLog @@ -0,0 +1,17 @@ +2006-04-26 + + * nxhtml.el (nxhtml-insert-skeleton-if-empty) + (nxhtml-insert-frame-skeleton): New functions. + +2006-04-25 + + * nxhtml.el (nxhtml-coding-systems-complete) + (nxhtml-script-url-predicate, nxhtml-script-completion-pattern) + (nxhtml-image-url-predicate, nxhtml-image-completion-pattern) + (nxhtml-mailto-predicate, nxhtml-predicate-error) + (nxhtml-in-xml-attribute-value-regex) + (nxhtml-read-mail-url-history, nxhtml-read-web-url-history) + (nxhtml-read-url-history, nxhtml-read-url-type) + (nxhtml-read-url-type-help, nxhtml-read-url) + (rng-complete-attribute-value): New entries for completion. + diff --git a/emacs.d/nxhtml/nxhtml/doc/demo.html b/emacs.d/nxhtml/nxhtml/doc/demo.html new file mode 100644 index 0000000..8696032 --- /dev/null +++ b/emacs.d/nxhtml/nxhtml/doc/demo.html @@ -0,0 +1,71 @@ + + + + + nXhtml Short Tour + + + + + + + + + +
+ +
+

Popup completion

+

nXhtml can use popup style completion too (for XHTML)

+ + Popup completion + Popup completion (thumbnail) +
+

+ more about popup +

+

+ more about popup +

+
+
+ +
+

Emacs style completion

+

Emacs default style for completion uses the minibuffer and an Emacs window

+ + Emacs style completion + Emacs style completion (thumbnail) +
du
+
+
+ +
+ desc div +
+ + diff --git a/emacs.d/nxhtml/nxhtml/doc/html2xhtml.html b/emacs.d/nxhtml/nxhtml/doc/html2xhtml.html new file mode 100644 index 0000000..2228c80 --- /dev/null +++ b/emacs.d/nxhtml/nxhtml/doc/html2xhtml.html @@ -0,0 +1,39 @@ + + + + + + How to Convert to XHTML + + + + +

+ How to Convert to XHTML +

+

+ With nxhtml-mode you can edit XHTML documents, but not HTML + dito. So what do you do with your old HTML documents? The + answer is simple: You convert them to XHTML! There is today + not many reasons not to convert them to XHTML. You may say + "but what about old browsers?". Most users just do not have + old browsers today. Old browsers are too dangerous to use on the + Internet. +

+

+ You can convert the documents easily from within nxhtml-mode + with Tidy. However + Tidy does not come with nxhtml, you have to install it yourself. +

+

+ When Tidy is called from Emacs you can do a whole directory tree + at once. When a buffer is in nxhtml-mode (and tidy.el is found) + there is an entry on the menus called Tidy from which you + can access tidy and set the options for it. Note especially the + Quick Options Settings where you can set options for + converting to XHTML easily. +

+ + + diff --git a/emacs.d/nxhtml/nxhtml/doc/htmlfontify-example.html b/emacs.d/nxhtml/nxhtml/doc/htmlfontify-example.html new file mode 100644 index 0000000..0eafb8d --- /dev/null +++ b/emacs.d/nxhtml/nxhtml/doc/htmlfontify-example.html @@ -0,0 +1,424 @@ + + + + + + + + + + +

Example of htmlfontify.el output

+ +

+ The following is an example of the output you can get with htmlfontify.el. + The version used here is shipped with nXhtml. + (A new version from the original author is on its way.) +

+ + + + + + + + + + + +
Emacs Icon (patched)  Emacs - Frame Dump
+ + + + + + + + + + + + + + + +
+ + + +
+ +
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
+;; If you want to create a file, visit that file with C-x C-f,
+;; then enter the text in that file's own buffer.
+
+
+ +
+
-- (Unix)-- *scratch* (Lisp Interaction Abbrev hs) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ + + + +
cadr is a compiled Lisp function in `subr.el'.
+(cadr x)
+
+Return the car of the cdr of x.
+
+[back]
+
+ +
+
-- (Unix)%% *Help* (Help View Abbrev) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+ + + +
+ + + + +
comint-highlight-prompt                       abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ
+compilation-column-number                     abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ
+compilation-error                             abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ
+compilation-info                              abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ
+compilation-line-number                       abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ
+compilation-warning                           abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ
+completion-dynamic-face                       abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ
+completion-tooltip-face                       abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ
+
+ + +
Truncated to line 11 - 19!
+
+
-- (Unix)%% *Faces* (Help View Abbrev) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ + + + +
snow                   snow                                                                                                                        #fffafa
+ghost white            GhostWhite                                                                                                                  #f8f8ff
+white smoke            WhiteSmoke                                                                                                                  #f5f5f5
+gainsboro              gainsboro                                                                                                                   #dcdcdc
+floral white           FloralWhite                                                                                                                 #fffaf0
+old lace               OldLace                                                                                                                     #fdf5e6
+linen                  linen                                                                                                                       #faf0e6
+antique white          AntiqueWhite                                                                                                                #faebd7
+
+ + +
Truncated to line 1 - 9!
+
+
-- (Unix)%% *Colors* (Help View Abbrev) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+ + + + +
________________________
+Program and Value Search
+
+When you use Emacs on MS Windows you sometimes want to fetch values
+and program locations from MS Windows.  Many of these values are
+stored in the MS Windows Registry.  Since Emacs is written to be used
+on many platforms (with the emphasis on GPL platforms) the effort to
+let Emacs read the Registry directly has not been made.  Below you can
+
+ + +
Truncated to line 29 - 37!
+
+
-- (Unix)** *Customize EmacsW32* (Custom Abbrev) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ + + + +
  Add quick printing to File menu (htmlize-view-print-visible): t
+  Keep default print entries in File menu (w32-print-menu-show-print): nil
+  Keep default ps print entries in File menu (w32-print-menu-show-ps-print): nil
+  Use keyboard Window keys as Emacs META (w32-meta-style): w32-lr
+  Underlined accelerators in menu bar (menuacc-active): t
+  Inferior shell + path for unix style programs (w32shell-shell): cmd
+
+   Set all to w32 style!   Reset all to default!   Customize EmacsW32 ... 
+
+ + +
Truncated to line 13 - 21!
+
+
-- (Unix)** *Customize EmacsW32* (Custom Abbrev) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ + + +
+ + + + +
-*- mode: grep; default-directory: "c:/emacs/p/070604/EmacsW32/nxml/util/" -*-
+Grep started at Fri Dec 28 22:54:06
+
+grep -i -nH -e "hfy-tmpfont-stack" *.el
+htmlfontify.el:596:(defvar hfy-tmpfont-stack nil
+htmlfontify.el:999:           (entry (assoc key hfy-tmpfont-stack))
+htmlfontify.el:1003:        (setq tag               (format "%04d" (length hfy-tmpfont-stack))
+htmlfontify.el:1005:              hfy-tmpfont-stack (cons entry hfy-tmpfont-stack)))
+
+ + +
Truncated to line 1 - 9!
+
+
-- (Unix)%% *grep* (Grep Abbrev) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ + + + +
5 matches for "hfy-tmpfont-stack" in buffer: htmlfontify.el
+    596:(defvar hfy-tmpfont-stack nil
+    999:           (entry (assoc key hfy-tmpfont-stack))
+   1003:        (setq tag               (format "%04d" (length hfy-tmpfont-stack))
+   1005:              hfy-tmpfont-stack (cons entry hfy-tmpfont-stack)))
+   1228:        ;;(hfy-tmpfont-stack nil)
+
+ +
+
-- (Unix)%% *Occur* (Occur Abbrev) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+
+ M-x  hfyview-frame
+ + diff --git a/emacs.d/nxhtml/nxhtml/doc/img/Las_Medulas.jpg b/emacs.d/nxhtml/nxhtml/doc/img/Las_Medulas.jpg new file mode 100644 index 0000000..694a2c5 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/Las_Medulas.jpg differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/Toco_toucan.jpg b/emacs.d/nxhtml/nxhtml/doc/img/Toco_toucan.jpg new file mode 100644 index 0000000..269886c Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/Toco_toucan.jpg differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/bacchante2.jpg b/emacs.d/nxhtml/nxhtml/doc/img/bacchante2.jpg new file mode 100644 index 0000000..a736099 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/bacchante2.jpg differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/butterflies.jpg b/emacs.d/nxhtml/nxhtml/doc/img/butterflies.jpg new file mode 100644 index 0000000..a7352a6 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/butterflies.jpg differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/butterflies.png b/emacs.d/nxhtml/nxhtml/doc/img/butterflies.png new file mode 100644 index 0000000..8d60637 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/butterflies.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/butterflies.xcf b/emacs.d/nxhtml/nxhtml/doc/img/butterflies.xcf new file mode 100644 index 0000000..9260725 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/butterflies.xcf differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/continue-play.jpg b/emacs.d/nxhtml/nxhtml/doc/img/continue-play.jpg new file mode 100644 index 0000000..587113e Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/continue-play.jpg differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/divine2.jpg b/emacs.d/nxhtml/nxhtml/doc/img/divine2.jpg new file mode 100644 index 0000000..6a8ea51 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/divine2.jpg differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/edit-part.png b/emacs.d/nxhtml/nxhtml/doc/img/edit-part.png new file mode 100644 index 0000000..7c6ab2a Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/edit-part.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/editing-web-files.png b/emacs.d/nxhtml/nxhtml/doc/img/editing-web-files.png new file mode 100644 index 0000000..ce30bdf Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/editing-web-files.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/editing-web-files.xcf b/emacs.d/nxhtml/nxhtml/doc/img/editing-web-files.xcf new file mode 100644 index 0000000..6703882 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/editing-web-files.xcf differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/emacs-style-completion.png b/emacs.d/nxhtml/nxhtml/doc/img/emacs-style-completion.png new file mode 100644 index 0000000..0a404fb Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/emacs-style-completion.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/emacsP.png b/emacs.d/nxhtml/nxhtml/doc/img/emacsP.png new file mode 100644 index 0000000..e0a5ecb Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/emacsP.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/emacsP16.png b/emacs.d/nxhtml/nxhtml/doc/img/emacsP16.png new file mode 100644 index 0000000..54b597b Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/emacsP16.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/embedded-css.png b/emacs.d/nxhtml/nxhtml/doc/img/embedded-css.png new file mode 100644 index 0000000..25c11d4 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/embedded-css.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/embedded-xhtml.png b/emacs.d/nxhtml/nxhtml/doc/img/embedded-xhtml.png new file mode 100644 index 0000000..85b98f3 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/embedded-xhtml.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/foldit-closed.png b/emacs.d/nxhtml/nxhtml/doc/img/foldit-closed.png new file mode 100644 index 0000000..fc1b49c Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/foldit-closed.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/foldit-temp-opened.png b/emacs.d/nxhtml/nxhtml/doc/img/foldit-temp-opened.png new file mode 100644 index 0000000..5e02725 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/foldit-temp-opened.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/fun-brain-2.png b/emacs.d/nxhtml/nxhtml/doc/img/fun-brain-2.png new file mode 100644 index 0000000..a24f0f4 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/fun-brain-2.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons-1.png b/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons-1.png new file mode 100644 index 0000000..5f3c757 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons-1.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons-1.xcf b/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons-1.xcf new file mode 100644 index 0000000..8ec9aaa Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons-1.xcf differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons-2.png b/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons-2.png new file mode 100644 index 0000000..c3615f3 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons-2.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons.png b/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons.png new file mode 100644 index 0000000..b9b0c43 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons.xcf b/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons.xcf new file mode 100644 index 0000000..ce416ce Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/getitbuttons.xcf differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/giraffe.jpg b/emacs.d/nxhtml/nxhtml/doc/img/giraffe.jpg new file mode 100644 index 0000000..6bf9b57 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/giraffe.jpg differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/healthy_feet2.jpg b/emacs.d/nxhtml/nxhtml/doc/img/healthy_feet2.jpg new file mode 100644 index 0000000..ed3ab6f Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/healthy_feet2.jpg differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/itsalltext-pref.png b/emacs.d/nxhtml/nxhtml/doc/img/itsalltext-pref.png new file mode 100644 index 0000000..3b3d9f1 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/itsalltext-pref.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/links-appmenu.png b/emacs.d/nxhtml/nxhtml/doc/img/links-appmenu.png new file mode 100644 index 0000000..a03ba4a Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/links-appmenu.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/nxml-where.png b/emacs.d/nxhtml/nxhtml/doc/img/nxml-where.png new file mode 100644 index 0000000..102d084 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/nxml-where.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/php-in-nxhtml-2.png b/emacs.d/nxhtml/nxhtml/doc/img/php-in-nxhtml-2.png new file mode 100644 index 0000000..c204f4d Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/php-in-nxhtml-2.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/php-in-nxhtml.png b/emacs.d/nxhtml/nxhtml/doc/img/php-in-nxhtml.png new file mode 100644 index 0000000..cda754a Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/php-in-nxhtml.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/php-in-php.png b/emacs.d/nxhtml/nxhtml/doc/img/php-in-php.png new file mode 100644 index 0000000..c7664da Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/php-in-php.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/php-in-xhtml.png b/emacs.d/nxhtml/nxhtml/doc/img/php-in-xhtml.png new file mode 100644 index 0000000..310d07f Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/php-in-xhtml.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/popup-compl.png b/emacs.d/nxhtml/nxhtml/doc/img/popup-compl.png new file mode 100644 index 0000000..a40bd49 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/popup-compl.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/raindrops2.jpg b/emacs.d/nxhtml/nxhtml/doc/img/raindrops2.jpg new file mode 100644 index 0000000..04d0610 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/raindrops2.jpg differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/region-selected-after.png b/emacs.d/nxhtml/nxhtml/doc/img/region-selected-after.png new file mode 100644 index 0000000..c7ea553 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/region-selected-after.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/region-selected-completion.png b/emacs.d/nxhtml/nxhtml/doc/img/region-selected-completion.png new file mode 100644 index 0000000..b971b9d Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/region-selected-completion.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/region-selected.png b/emacs.d/nxhtml/nxhtml/doc/img/region-selected.png new file mode 100644 index 0000000..0a2358b Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/region-selected.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/rembrandt-self-portrait.jpg b/emacs.d/nxhtml/nxhtml/doc/img/rembrandt-self-portrait.jpg new file mode 100644 index 0000000..2689598 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/rembrandt-self-portrait.jpg differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/style-in-nxhtml.png b/emacs.d/nxhtml/nxhtml/doc/img/style-in-nxhtml.png new file mode 100644 index 0000000..151681d Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/style-in-nxhtml.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/use-nXhtml-trans.png b/emacs.d/nxhtml/nxhtml/doc/img/use-nXhtml-trans.png new file mode 100644 index 0000000..4ae2ff8 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/use-nXhtml-trans.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/use-nXhtml-trans2.png b/emacs.d/nxhtml/nxhtml/doc/img/use-nXhtml-trans2.png new file mode 100644 index 0000000..c348c92 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/use-nXhtml-trans2.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/use-nXhtml.png b/emacs.d/nxhtml/nxhtml/doc/img/use-nXhtml.png new file mode 100644 index 0000000..408980f Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/use-nXhtml.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/use-nXhtml.xcf b/emacs.d/nxhtml/nxhtml/doc/img/use-nXhtml.xcf new file mode 100644 index 0000000..d42da0b Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/use-nXhtml.xcf differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/validation-error.png b/emacs.d/nxhtml/nxhtml/doc/img/validation-error.png new file mode 100644 index 0000000..7682642 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/validation-error.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/volga.jpg b/emacs.d/nxhtml/nxhtml/doc/img/volga.jpg new file mode 100644 index 0000000..c11e93c Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/volga.jpg differ diff --git a/emacs.d/nxhtml/nxhtml/doc/img/xml-validation-header.png b/emacs.d/nxhtml/nxhtml/doc/img/xml-validation-header.png new file mode 100644 index 0000000..2093781 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/img/xml-validation-header.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/carrow1.gif b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/carrow1.gif new file mode 100644 index 0000000..316dea7 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/carrow1.gif differ diff --git a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/carrow2.gif b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/carrow2.gif new file mode 100644 index 0000000..24a6be1 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/carrow2.gif differ diff --git a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche1.gif b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche1.gif new file mode 100644 index 0000000..218233d Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche1.gif differ diff --git a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche1.png b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche1.png new file mode 100644 index 0000000..61e8660 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche1.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche2.gif b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche2.gif new file mode 100644 index 0000000..dc91f06 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche2.gif differ diff --git a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche2.png b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche2.png new file mode 100644 index 0000000..bbf66a1 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/fleche2.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/loading-bar-black.gif b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/loading-bar-black.gif new file mode 100644 index 0000000..99368d6 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/loading-bar-black.gif differ diff --git a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/open.gif b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/open.gif new file mode 100644 index 0000000..d145e66 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/open.gif differ diff --git a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/open.png b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/open.png new file mode 100644 index 0000000..aebf498 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/img/open.png differ diff --git a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/jd.gallery.css b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/jd.gallery.css new file mode 100644 index 0000000..b0d87ec --- /dev/null +++ b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/jd.gallery.css @@ -0,0 +1,238 @@ +#myGallery +{ + width: 460px; + height: 345px; + z-index:5; + display: none; + border: 1px solid #000; +} + +.jdGallery +{ + overflow: hidden; + position: relative; +} + +.jdGallery img +{ + border: 0; + margin: 0; +} + +.jdGallery .slideElement +{ + width: 100%; + height: 100%; + background-color: #000; + background-repeat: no-repeat; +} + +.jdGallery .loadingElement +{ + width: 100%; + height: 100%; + position: absolute; + left: 0; + top: 0; + background-color: #000; + background-repeat: no-repeat; + background-position: center center; + background-image: url('img/loading-bar-black.gif'); +} + +.jdGallery .slideInfoZone +{ + position: absolute; + z-index: 10; + width: 100%; + margin: 0px; + left: 0; + bottom: 0; + height: 40px; + background: #333; + color: #fff; + text-indent: 0; + overflow: hidden; +} + +* html .jdGallery .slideInfoZone +{ + bottom: -1px; +} + +.jdGallery .slideInfoZone h2 +{ + padding: 0; + font-size: 80%; + margin: 0; + margin: 2px 5px; + font-weight: bold; + color: inherit; +} + +.jdGallery .slideInfoZone p +{ + padding: 0; + font-size: 80%; + margin: 2px 5px; + color: #eee; +} + +.jdGallery div.carouselContainer +{ + position: absolute; + height: 135px; + width: 100%; + z-index: 10; + margin: 0px; + left: 0; + top: 0; +} + +.jdGallery a.carouselBtn +{ + position: absolute; + bottom: 0; + right: 30px; + height: 20px; + /*width: 100px; background: url('img/carousel_btn.gif') no-repeat;*/ + text-align: center; + padding: 0 10px; + font-size: 13px; + background: #333; + color: #fff; + cursor: pointer; +} + +.jdGallery .carousel +{ + position: absolute; + width: 100%; + margin: 0px; + left: 0; + top: 0; + height: 115px; + background: #333; + color: #fff; + text-indent: 0; + overflow: hidden; +} + +.jdGallery .carousel .carouselWrapper +{ + position: absolute; + width: 100%; + height: 78px; + top: 10px; + left: 0; + overflow: hidden; +} + +.jdGallery .carousel .carouselInner +{ + position: relative; +} + +.jdGallery .carousel .carouselInner .thumbnail +{ + cursor: pointer; + background: #000; + background-position: center center; + float: left; + border: solid 1px #fff; +} + +.jdGallery .carousel .label +{ + font-size: 13px; + position: absolute; + bottom: 5px; + left: 10px; + padding: 0; + margin: 0; +} + +.jdGallery .carousel .label .number +{ + color: #b5b5b5; +} + +.jdGallery a +{ + font-size: 100%; + text-decoration: none; + color: inherit; +} + +.jdGallery a.right, .jdGallery a.left +{ + position: absolute; + height: 99%; + width: 25%; + cursor: pointer; + z-index:10; + filter:alpha(opacity=20); + -moz-opacity:0.2; + -khtml-opacity: 0.2; + opacity: 0.2; +} + +* html .jdGallery a.right, * html .jdGallery a.left +{ + filter:alpha(opacity=50); +} + +.jdGallery a.right:hover, .jdGallery a.left:hover +{ + filter:alpha(opacity=80); + -moz-opacity:0.8; + -khtml-opacity: 0.8; + opacity: 0.8; +} + +.jdGallery a.left +{ + left: 0; + top: 0; + background: url('img/fleche1.png') no-repeat center left; +} + +* html .jdGallery a.left { background: url('img/fleche1.gif') no-repeat center left; } + +.jdGallery a.right +{ + right: 0; + top: 0; + background: url('img/fleche2.png') no-repeat center right; +} + +* html .jdGallery a.right { background: url('img/fleche2.gif') no-repeat center right; } + +.jdGallery a.open +{ + left: 0; + top: 0; + width: 100%; + height: 100%; +} + +.withArrows a.open +{ + position: absolute; + top: 0; + left: 25%; + height: 99%; + width: 50%; + cursor: pointer; + z-index: 10; + background: none; + -moz-opacity:0.8; + -khtml-opacity: 0.8; + opacity: 0.8; +} + +.withArrows a.open:hover { background: url('img/open.png') no-repeat center center; } + +* html .withArrows a.open:hover { background: url('img/open.gif') no-repeat center center; + filter:alpha(opacity=80); } + diff --git a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/layout.css b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/layout.css new file mode 100644 index 0000000..9c807b6 --- /dev/null +++ b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/css/layout.css @@ -0,0 +1,91 @@ +body { + color: #ccc; + font-family: "Trebuchet MS", "Lucida Grande", Arial, Helvetica, sans-serif; + margin: 0 auto; + padding: 0; + font-size: 1.0em; + background: #111 url('../images/bg/gradient1.gif') top left repeat-x; +} + +h1 +{ + color: #fff; + font-size: 47px; + font-weight: bolder; + margin: 0 40px; + padding: 0.08em 0; +} + +h1 sup +{ + color: #ddd; +} + +h1 a +{ + color: #fff; + text-decoration: none; +} + +h1 .company, h1 a .company +{ + color: #d01a71; +} + +h2 +{ + color: #ddd; + font-size: 2.5em; +} + +h3 +{ + color: #fff; + font-size: 1.5em; +} + +h4 +{ + font-size: 1.3em; +} + +.content +{ + margin: 0 20px; +} + +.content a +{ + color: #fff; +} + + +.content p.linkage +{ + margin-top: 2em; + text-align: right; + font-size: 1.7em; + color: #ddd; +} + +.content p.linkage a { color: #fff; } + +/*.content p.linkage a +{ + color: #fff; + background: url('../images/bg/biglink_off.gif') center right no-repeat; + padding: 10px 20px; + text-decoration: none; +} + +.content p.linkage a:hover +{ + background: url('../images/bg/biglink_on.gif') center right no-repeat; + font-style: italic; +}*/ + +#myGallery +{ + text-align: left; + margin: 0 auto; +} diff --git a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/scripts/jd.gallery.js b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/scripts/jd.gallery.js new file mode 100644 index 0000000..af83b13 --- /dev/null +++ b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/scripts/jd.gallery.js @@ -0,0 +1,449 @@ +/* + This file is part of JonDesign's SmoothGallery v1.0.1. + + JonDesign's SmoothGallery 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 of the License, or + (at your option) any later version. + + JonDesign's SmoothGallery 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 JonDesign's SmoothGallery; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + Main Developer: Jonathan Schemoul (JonDesign: http://www.jondesign.net/) + Contributed code by: + - Christian Ehret (bugfix) + - Nitrix (bugfix) + - Valerio from Mad4Milk for his great help with the carousel scrolling and many other things. + - Archie Cowan for helping me find a bugfix on carousel inner width problem. + Many thanks to: + - The mootools team for the great mootools lib, and it's help and support throughout the project. +*/ + + +var $removeEvents = function (object, type) +{ + if (!object.events) return object; + if (type){ + if (!object.events[type]) return object; + for (var fn in object.events[type]) object.removeEvent(type, fn); + object.events[type] = null; + } else { + for (var evType in object.events) object.removeEvents(evType); + object.events = null; + } + return object; +}; + + +// declaring the class +var gallery = new Class({ + initialize: function(element, options) { + this.setOptions({ + showArrows: true, + showCarousel: true, + showInfopane: true, + showDescription: false, + thumbHeight: 75, + thumbWidth: 100, + thumbSpacing: 10, + embedLinks: true, + fadeDuration: 500, + timed: false, + delay: 9000, + preloader: true, + manualData: [], + populateData: true, + elementSelector: "div.imageElement", + titleSelector: "h3", + subtitleSelector: "p", + descriptionSelector: "div", + linkSelector: "a.open", + imageSelector: "img.full", + thumbnailSelector: "img.thumbnail", + slideInfoZoneOpacity: 0.7, + carouselMinimizedOpacity: 0.4, + carouselMinimizedHeight: 20, + carouselMaximizedOpacity: 0.7, + destroyAfterPopulate: true, + baseClass: 'jdGallery', + withArrowsClass: 'withArrows', + textShowCarousel: 'Pictures', + useThumbGenerator: false, + thumbGenerator: 'resizer.php' + }, options); + this.fireEvent('onInit'); + this.currentIter = 0; + this.lastIter = 0; + this.maxIter = 0; + this.galleryElement = element; + this.galleryData = this.options.manualData; + this.galleryInit = 1; + this.galleryElements = Array(); + this.thumbnailElements = Array(); + this.galleryElement.addClass(this.options.baseClass); + if (this.options.populateData) + this.populateData(); + element.style.display="block"; + + if (this.options.embedLinks) + { + this.currentLink = new Element('a').addClass('open').setProperties({ + href: '#', + title: '' + }).injectInside(element); + if ((!this.options.showArrows) && (!this.options.showCarousel)) + this.galleryElement = element = this.currentLink; + else + this.currentLink.setStyle('display', 'none'); + } + + this.constructElements(); + if ((data.length>1)&&(this.options.showArrows)) + { + var leftArrow = new Element('a').addClass('left').addEvent( + 'click', + this.prevItem.bind(this) + ).injectInside(element); + var rightArrow = new Element('a').addClass('right').addEvent( + 'click', + this.nextItem.bind(this) + ).injectInside(element); + this.galleryElement.addClass(this.options.withArrowsClass); + } + this.loadingElement = new Element('div').addClass('loadingElement').injectInside(element); + if (this.options.showInfopane) this.initInfoSlideshow(); + if (this.options.showCarousel) this.initCarousel(); + this.doSlideShow(1); + }, + populateData: function() { + currentArrayPlace = this.galleryData.length; + options = this.options; + data = this.galleryData; + this.galleryElement.getElements(options.elementSelector).each(function(el) { + elementDict = { + image: el.getElement(options.imageSelector).getProperty('src'), + number: currentArrayPlace + }; + if ((options.showInfopane) | (options.showCarousel)) + Object.extend(elementDict, { + title: el.getElement(options.titleSelector).innerHTML, + description: el.getElement(options.subtitleSelector).innerHTML + }); + if ((options.showDescription)) + Object.extend(elementDict, { + outsideDescription: el.getElement(options.descriptionSelector).innerHTML + }); + if (options.embedLinks) + Object.extend(elementDict, { + link: el.getElement(options.linkSelector).href||false, + linkTitle: el.getElement(options.linkSelector).title||false + }); + if ((!options.useThumbGenerator) && (options.showCarousel)) + Object.extend(elementDict, { + thumbnail: el.getElement(options.thumbnailSelector).src + }); + else if (options.useThumbGenerator) + Object.extend(elementDict, { + thumbnail: 'resizer.php?imgfile=' + elementDict.image + '&max_width=' + options.thumbWidth + '&max_height=' + options.thumbHeight + }); + + data[currentArrayPlace] = elementDict; + currentArrayPlace++; + if (this.options.destroyAfterPopulate) + el.remove(); + }); + this.galleryData = data; + this.fireEvent('onPopulated'); + }, + constructElements: function() { + el = this.galleryElement; + this.maxIter = this.galleryData.length; + var currentImg; + for(i=0;i= this.maxIter) + this.nextIter = 0; + this.galleryInit = 0; + this.goTo(this.nextIter); + }, + prevItem: function() { + this.fireEvent('onPreviousCalled'); + this.nextIter = this.currentIter-1; + if (this.nextIter <= -1) + this.nextIter = this.maxIter - 1; + this.galleryInit = 0; + this.goTo(this.nextIter); + }, + goTo: function(num) { + this.clearTimer(); + if (this.options.embedLinks) + this.clearLink(); + if (this.options.showInfopane) + { + this.slideInfoZone.clearChain(); + this.hideInfoSlideShow().chain(this.changeItem.pass(num, this)); + } else + this.changeItem.delay(500, this, num); + if (this.options.embedLinks) + this.makeLink(num); + if (this.options.showDescription) + this.showDescription(num); + this.prepareTimer(); + /*if (this.options.showCarousel) + this.clearThumbnailsHighlights();*/ + }, + changeItem: function(num) { + this.fireEvent('onStartChanging'); + this.galleryInit = 0; + if (this.currentIter != num) + { + for(i=0;i this.currentIter) this.galleryElements[num].custom(1); + else + { + this.galleryElements[num].set(1); + this.galleryElements[this.currentIter].custom(0); + } + this.currentIter = num; + } + this.doSlideShow.bind(this)(); + this.fireEvent('onChanged'); + }, + clearTimer: function() { + if (this.options.timed) + $clear(this.timer); + }, + prepareTimer: function() { + if (this.options.timed) + this.timer = this.nextItem.delay(this.options.delay, this); + }, + doSlideShow: function(position) { + if (this.galleryInit == 1) + { + imgPreloader = new Image(); + imgPreloader.onload=function(){ + this.startSlideShow.delay(10, this); + }.bind(this); + imgPreloader.src = this.galleryData[0].image; + } else { + if (this.options.showInfopane) + { + if (this.options.showInfopane) + { + this.showInfoSlideShow.delay((500 + this.options.fadeDuration), this); + } else + if (this.options.showCarousel) + this.centerCarouselOn(position); + } + } + }, + initCarousel: function () { + var carouselContainerElement = new Element('div').addClass('carouselContainer').injectInside(this.galleryElement); + this.carouselContainer = new Fx.Styles(carouselContainerElement, {transition: Fx.Transitions.expoOut}); + this.carouselContainer.normalHeight = carouselContainerElement.offsetHeight; + this.carouselContainer.set({'opacity': this.options.carouselMinimizedOpacity, 'top': (this.options.carouselMinimizedHeight - this.carouselContainer.normalHeight)}); + + this.carouselBtn = new Element('a').addClass('carouselBtn').setProperties({ + title: this.options.textShowCarousel + }).setHTML(this.options.textShowCarousel).injectInside(carouselContainerElement); + + this.carouselBtn.addEvent( + 'click', + function () { + this.carouselContainer.clearTimer(); + this.toggleCarousel(); + }.bind(this) + ); + this.carouselActive = false; + + var carouselElement = new Element('div').addClass('carousel').injectInside(carouselContainerElement); + this.carousel = new Fx.Styles(carouselElement); + + this.carouselLabel = new Element('p').addClass('label').injectInside(this.carousel.element); + this.carouselWrapper = new Element('div').addClass('carouselWrapper').injectInside(this.carousel.element); + this.carouselInner = new Element('div').addClass('carouselInner').injectInside(this.carouselWrapper); + + this.carouselWrapper.scroller = new Scroller(this.carouselWrapper, { + area: 100, + velocity: 0.2 + }) + + this.carouselWrapper.elementScroller = new Fx.Scroll(this.carouselWrapper, { + duration: 400, + onStart: this.carouselWrapper.scroller.stop.bind(this.carouselWrapper.scroller), + onComplete: this.carouselWrapper.scroller.start.bind(this.carouselWrapper.scroller) + }); + + this.constructThumbnails(); + + this.carouselInner.style.width = ((this.maxIter * (this.options.thumbWidth + this.options.thumbSpacing)) - this.options.thumbSpacing + this.options.thumbWidth) + "px"; + }, + toggleCarousel: function() { + if (this.carouselActive) + this.hideCarousel(); + else + this.showCarousel(); + }, + showCarousel: function () { + this.fireEvent('onShowCarousel'); + this.carouselContainer.custom({ + 'opacity': this.options.carouselMaximizedOpacity, + 'top': 0 + }).addEvent('onComplete', function() { this.carouselActive = true; this.carouselWrapper.scroller.start(); }.bind(this)); + }, + hideCarousel: function () { + this.fireEvent('onHideCarousel'); + this.carouselContainer.custom({ + 'opacity': this.options.carouselMinimizedOpacity, + 'top': (this.options.carouselMinimizedHeight - this.carouselContainer.normalHeight) + }).addEvent('onComplete', function() { this.carouselActive = false; this.carouselWrapper.scroller.stop(); }.bind(this)); + }, + constructThumbnails: function () { + element = this.carouselInner; + for(i=0;i' + (myself.relatedImage.number + 1) + "/" + this.maxIter + ": " + myself.relatedImage.title); + }.pass(currentImg, this), + 'mouseout': function (myself) { + myself.clearTimer(); + myself.custom(0.2); + }.pass(currentImg, this), + 'click': function (myself) { + this.goTo(myself.relatedImage.number); + }.pass(currentImg, this) + }); + + currentImg.relatedImage = this.galleryData[i]; + this.thumbnailElements[parseInt(i)] = currentImg; + } + }, + clearThumbnailsHighlights: function() + { + for(i=0;i, MIT Style License. +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('k 11=f(1S){k 4s=f(){j(9.1e&&Y[0]!=\'7h\')h 9.1e.2m(9,Y);Q h 9};I(k n W 9)4s[n]=9[n];4s.U=1S;h 4s};11.1G=f(){};11.U={N:f(1S){k 4r=M 9(\'7h\');k 7g=f(2s,2f){j(!2s.2m||!2f.2m)h T;h f(){9.1t=2s;h 2f.2m(9,Y)}};I(k n W 1S){k 2s=4r[n];k 2f=1S[n];j(2s&&2s!=2f)2f=7g(2s,2f)||2f;4r[n]=2f}h M 11(4r)},1T:f(1S){I(k n W 1S)9.U[n]=1S[n]}};1H.N=f(){k R=Y;R=(R[1])?[R[0],R[1]]:[9,R[0]];I(k n W R[1])R[0][n]=R[1][n];h R[0]};1H.5p=f(){I(k i=0;i\'));$1o(9.96,f(4e){j(4e.24!=\'24\')l.4d(4e.24,4e.K)});j(9.26)9.6G(l);h l}6F:9.6E(n,K)}h 9},95:f(1L){I(k n W 1L)9.4d(n,1L[n]);h 9},94:f(6D){9.93=6D;h 9},92:f(n){h(n==\'6C\')?9.1d:9.6k(n)},3C:f(){h 9.41.3G()},2O:f(){k l=9,4c=0,4b=0;91{4c+=l.4c||0;4b+=l.4b||0;l=l.90}34(l);h{\'x\':4c,\'y\':4b}},2a:f(x,y){9.3U=x;9.3V=y},3P:f(){h{\'1V\':{\'x\':9.3U,\'y\':9.3V},\'2A\':{\'x\':9.2x,\'y\':9.2v},\'3O\':{\'x\':9.68,\'y\':9.69}}},4D:f(){h 9.2O().y},4F:f(){h 9.2O().x},8Z:f(){k 5i=9.2O();k u={\'3j\':9.2x,\'3i\':9.2v,\'2i\':5i.x,\'2w\':5i.y};u.5a=u.2i+u.3j;u.6B=u.2w+u.3i;h u},2F:f(){2c(9.3C()){1c\'2U\':j(9.6A!=-1)h 9.m[9.6A].K;1P;1c\'8Y\':j(!(9.8X&&[\'8W\',\'8V\'].15(9.q))&&![\'3S\',\'33\',\'8U\'].15(9.q))1P;1c\'8T\':h 9.K}h T}});k 8S=12;12.1a=L.1a=1b.U.1a;12.1E=L.1E=1b.U.1E;k 31={1w:[],6z:f(r){31.1w.18(r)},5g:f(){12.1E(\'6y\',31.5g);31.1w.1o(f(l){l.5h();I(k p W 1b.U)2I[p]=12[p]=L[p]=l[p]=1K;l.N=1K})}};12.1a(\'6y\',31.5g);k 3F=M 11({1e:f(o){9.o=o||12.o;9.q=9.o.q;9.3H=9.o.3H||9.o.8R;j(9.3H.6x==3)9.3H=9.3H.26;9.8Q=9.o.8P;9.8O=9.o.8N;9.8M=9.o.8L;9.8K=9.o.8J;j([\'5f\',\'2M\'].15(9.q)){9.3f=9.o.6w?(9.o.6w/ (12.51 ? -6v : 6v)) : -(9.o.8I || 0) /3}Q j(9.q.15(\'1O\')){9.5d=9.o.6r||9.o.8H;I(k 24 W 3F.1u){j(3F.1u[24]==9.5d)k 6u=24}9.1O=6u||5e.8G(9.5d).3G()}Q j(9.q.15(\'2l\')||9.q==\'8F\'){9.1y={\'x\':9.o.5c||9.o.6t+L.2r.3U,\'y\':9.o.5b||9.o.6s+L.2r.3V};9.5y={\'x\':9.o.5c?9.o.5c-12.66:9.o.6t,\'y\':9.o.5b?9.o.5b-12.67:9.o.6s};9.8E=(9.o.6r==3)||(9.o.8D==2);2c(9.q){1c\'8C\':9.4a=9.o.4a||9.o.8B;1P;1c\'8A\':9.4a=9.o.4a||9.o.5L}}},1s:f(){9.49();9.48();h 9},49:f(){j(9.o.49)9.o.49();Q 9.o.8z=1g;h 9},48:f(){j(9.o.48)9.o.48();Q 9.o.8y=T;h 9}});3F.1u={\'8x\':13,\'8w\':38,\'8v\':40,\'2i\':37,\'5a\':39,\'8u\':27,\'8t\':32,\'8s\':8,\'8r\':46};59.N({2y:f(J,R){h 9.2e({\'J\':J,\'Y\':R,\'o\':3F})}});k 5S=M 11({8q:f(O){9.2H=9.2H||[];9.2H.18(O);h 9},5Z:f(){j(9.2H&&9.2H.14)9.2H.47(0,1)[0].2d(10,9)},8p:f(){9.2H=[]}});k 3c=M 11({1a:f(q,O){j(O!=11.1G){9.V=9.V||{};9.V[q]=9.V[q]||[];j(!9.V[q].15(O))9.V[q].18(O)}h 9},1x:f(q,R,2d){j(9.V&&9.V[q]){9.V[q].1o(f(O){O.2e({\'J\':9,\'2d\':2d,\'Y\':R})()},9)}h 9},1E:f(q,O){j(9.V&&9.V[q])9.V[q].3Z(O);h 9}});k 3b=M 11({2N:f(6q,m){9.m=1H.N(6q,m);j(9.1a){I(k 3E W 9.m){j(($q(9.m[3E])==\'f\')&&3E.15(\'^58[A-Z]\'))9.1a(3E,9.m[3E])}}h 9}});f $E(1v,3D){h($(3D)||L).42(1v)};f $8o(1v,3D){h($(3D)||L).2G(1v)};1b.N({3B:f(1v){k 1Q=[];1v.45().4Y(\' \').1o(f(43,i){k 1q=43.28(\'^(\\\\w*|\\\\*)(?:#([\\\\6p-]+)|\\\\.([\\\\6p-]+))?(?:\\\\[["\\\']?(\\\\w+)["\\\']?(?:([\\\\*\\\\^\\\\$]?=)["\\\']?(\\\\w*)["\\\']?)?\\\\])?$\');j(!1q)h;1q[1]=1q[1]||\'*\';j(i==0){j(1q[2]){k l=9.44(1q[2]);j(!l||((1q[1]!=\'*\')&&(1b.U.3C.1i(l)!=1q[1])))h;1Q=[l]}Q{1Q=$A(9.56(1q[1]))}}Q{1Q=1N.U.6m.1i(1Q,1q[1]);j(1q[2])1Q=1N.U.6o.1i(1Q,1q[2])}j(1q[3])1Q=1N.U.6n.1i(1Q,1q[3]);j(1q[4])1Q=1N.U.6l.1i(1Q,1q[4],1q[6],1q[5])},9);h $$(1Q)},44:f(2Z){k l=L.44(2Z);j(!l)h T;I(k 1t=l.26;1t!=9;1t=1t.26){j(!1t)h T}h l},42:f(1v){h 9.2G(1v)[0]},2G:f(1v){k 57=[];1v.4Y(\',\').1o(f(43){57.N(9.3B(43))},9);h $$(57)}});L.N=1H.N;L.N({8n:f(1d){h L.3B(\'.\'+1d)},42:1b.U.42,3B:1b.U.3B,2G:1b.U.2G});1N.N({6o:f(2Z,8m){k 1p=[];9.1o(f(l){j(l.2Z==2Z)1p.18(l)});h 1p},6n:f(1d){k 1p=[];9.1o(f(l){j(1b.U.3A.1i(l,1d))1p.18(l)});h 1p},6m:f(41){k 1p=[];9.1o(f(l){1p.N(l.56(41))});h 1p},6l:f(24,K,55){k 1p=[];9.1o(f(l){k 30=l.6k(24);j(!30)h 1p;j(!55)h 1p.18(l);2c(55){1c\'*=\':j(30.15(K))1p.18(l);1P;1c\'=\':j(30==K)1p.18(l);1P;1c\'^=\':j(30.15(\'^\'+K))1p.18(l);1P;1c\'$=\':j(30.15(K+\'$\'))1p.18(l)}h 1p});h 1p}});k 6j=M 11({14:0,1e:f(u){9.u={};I(k n W u){9.u[n]=u[n];9.14++}},8l:f(1O){h 9.u[1O]},1U:f(1O,K){j(K==1K)h T;j(9.u[1O]==3z)9.14++;9.u[1O]=K;h 9},3Z:f(1O){j(9.u[1O]==3z)h T;k u={};9.14--;I(k n W 9.u){j(n!=1O)u[n]=9.u[n]}9.u=u;h 9},1o:f(O,J){I(k n W 9.u)O.1i(J||9,n,9.u[n])},N:f(u){9.1e(1H.N(9.u,u));h 9},1G:f(){h(9.14==0)},1u:f(){k 1u=[];I(k n W 9.u)1u.18(n);h 1u},1z:f(){k 1z=[];I(k n W 9.u)1z.18(9.u[n]);h 1z}});f $H(u){h M 6j(u)};k 2q=M 11({1e:f(1A){j(1A.6i&&1A.6h)h 1A;k 1l=(1A.18)?1A:1A.3s(1g);h 1H.N(1l,2q.U)},6i:f(){k 3y=$A(Y);k 3x=50;j($q(3y[3y.14-1])==\'5N\')3x=3y.8k();k 1l=9.54();3y.1o(f(1A){1A=M 2q(1A);I(k i=0;i<3;i++)1l[i]=G.3e((1l[i]/ 3g * (3g - 3x)) + (1A[i] /3g*3x))});h M 2q(1l)},6h:f(){k 1l=[];I(k i=0;i<3;i++)1l.18(8j-9[i]);h M 2q(1l)}});f $C(1A){h M 2q(1A)};12.N=1H.N;12.N({8i:f(){j(9.53)6g{L.8h("8g",T,1g)}6f(e){}},1a:f(q,O){j(q==\'3u\'){j(9.3Y)O();Q j(!9.V||!9.V.3u){k 3v=f(){j(9.3Y)h;9.3Y=1g;j(9.1f)9.1f=$3Q(9.1f);1b.U.1x.1i(9,\'3u\');9.V.3u=1K}.J(9);j(L.3X&&9.3W){9.1f=f(){j([\'3Y\',\'6d\'].15(L.3X))3v()}.2k(50)}Q j(L.3X&&9.3w){L.8f("<52 2Z=6e 8e 8d=8c:8b(0)><\\/52>");$(\'6e\').8a=f(){j(9.3X==\'6d\')3v()}}Q{9.1a("89",3v);L.1a("88",3v)}}}1b.U.1a.1i(9,q,O);h 9},87:f(6c){h 9.1a(\'3u\',6c)}});12.N({63:f(){j(9.3W||9.51)h 9.86;Q h L.2r.6b||L.4N.6b},62:f(){j(9.3W||9.51)h 9.85;h L.2r.6a||L.4N.6a},60:f(){h L.2r.69},61:f(){h L.2r.68},64:f(){h 9.67||L.2r.3V},65:f(){h 9.66||L.2r.3U},3P:f(){h{\'1V\':{\'x\':9.65(),\'y\':9.64()},\'2A\':{\'x\':9.63(),\'y\':9.62()},\'3O\':{\'x\':9.61(),\'y\':9.60()}}},2O:f(){h{\'x\':0,\'y\':0}}});k X={};X.1C=M 11({2j:f(){h{2K:11.1G,2g:11.1G,5T:11.1G,5Y:X.2Q.4U,4Z:84,1J:\'4I\',2T:1g,5U:50}},1e:f(m){9.r=9.r||1K;9.2N(9.2j(),m);j(9.m.1e)9.m.1e.1i(9)},19:f(){k 2Y=M 5W().5V();j(2Y<9.2Y+9.m.4Z){9.5X=2Y-9.2Y;9.2E();9.2o()}Q{9.1s(1g);9.P=9.B;9.2o();9.1x(\'2g\',9.r,10);9.5Z()}},1U:f(B){9.P=B;9.2o();h 9},2E:f(){9.P=9.2D(9.F,9.B)},2D:f(F,B){h 9.m.5Y(9.5X,F,(B-F),9.m.4Z)},1m:f(F,B){j(!9.m.2T)9.1s();Q j(9.1f)h 9;9.F=F;9.B=B;9.2Y=M 5W().5V();9.1f=9.19.2k(G.3e(83/9.m.5U),9);9.1x(\'2K\',9.r);h 9},1s:f(2h){j(!9.1f)h 9;9.1f=$3Q(9.1f);j(!2h)9.1x(\'5T\',9.r);h 9},82:f(F,B){h 9.1m(F,B)},81:f(2h){h 9.1s(2h)}});X.1C.1T(M 5S);X.1C.1T(M 3c);X.1C.1T(M 3b);X.2Q={5F:f(t,b,c,d){h c*t/d+b},4U:f(t,b,c,d){h-c/2*(G.4T(G.1X*t/d)-1)+b}};X.23={2U:f(n,B){j(n.15(\'1A\',\'i\'))h 9.2q;j(B.15&&B.15(\' \'))h 9.3T;h 9.5R},1M:f(l,n,2X){j(!2X.18)2X=[2X];k F=2X[0],B=2X[1];j(!B&&B!=0){B=F;F=l.1W(n)}k 17=9.2U(n,B);h{F:17.1M(F),B:17.1M(B),17:17}}};X.23.5R={1M:f(K){h 3t(K)},2V:f(F,B,2W){h 2W.2D(F,B)},2F:f(K,1J){h K+1J}};X.23.3T={1M:f(K){h K.18?K:K.4Y(\' \').4X(f(v){h 3t(v)})},2V:f(F,B,2W){k P=[];I(k i=0;i9.m.3N){L.1E(\'2P\',9.1I.3l);L.1a(\'2P\',9.1I.29);9.29(o);9.1x(\'5B\',9.r)}o.1s()},29:f(o){9.4O=T;9.2l.P=o.1y;I(k z W 9.m.2u){9.K.P[z]=o.1y[z]-9.2l.1D[z];j(9.1j[z]){j($2B(9.1j[z][1])&&(9.K.P[z]>9.1j[z][1])){9.K.P[z]=9.1j[z][1];9.4O=1g}Q j($2B(9.1j[z][0])&&(9.K.P[z]<9.1j[z][0])){9.K.P[z]=9.1j[z][0];9.4O=1g}}9.r.1F(9.m.2u[z],9.K.P[z]+9.m.1J)}9.1x(\'4A\',9.r);o.1s()},7k:f(){9.3k.1E(\'4H\',9.1I.1m)},1s:f(){L.1E(\'2P\',9.1I.29);L.1E(\'5A\',9.1I.1s);9.1x(\'2g\',9.r)}});2L.1C.1T(M 3c);2L.1C.1T(M 3b);1b.N({7j:f(m){h M 2L.1C(9,1H.N(m||{},{2u:{x:\'3j\',y:\'3i\'}}))}});k 4J=M 11({2j:f(){h{3h:20,4K:1,3K:f(x,y){9.r.2a(x,y)}}},1e:f(r,m){9.2N(9.2j(),m);9.r=$(r);9.4M=([12,L].15(r))?$(L.4N):9.r},1m:f(){9.4L=9.5z.2y(9);9.4M.1a(\'2P\',9.4L)},1s:f(){9.4M.1E(\'2P\',9.4L);9.1f=$3Q(9.1f)},5z:f(o){9.1y=(9.r==12)?o.5y:o.1y;j(!9.1f)9.1f=9.1V.2k(50,9)},1V:f(){k l=9.r.3P();k 1D=9.r.2O();k 2z={\'x\':0,\'y\':0};I(k z W 9.1y){j(9.1y[z]<(9.m.3h+1D[z])&&l.1V[z]!=0)2z[z]=(9.1y[z]-9.m.3h-1D[z])*9.m.4K;Q j(9.1y[z]+9.m.3h>(l.2A[z]+1D[z])&&l.1V[z]+l.2A[z]!=l.3O[z])2z[z]=(9.1y[z]-l.2A[z]+9.m.3h-1D[z])*9.m.4K}j(2z.y||2z.x)9.1x(\'3K\',[l.1V.x+2z.x,l.1V.y+2z.y])}});4J.1T(M 3c);4J.1T(M 3b);k 4t=M 11({2j:f(){h{3K:11.1G,2g:11.1G,4x:f(1D){9.21.1F(9.p,1D+\'4I\')},3d:3g,1k:\'4G\',3f:T}},1e:f(l,21,m){9.r=$(l);9.21=$(21);9.2N(9.2j(),m);9.4w=-1;9.4v=-1;9.19=-1;9.r.1a(\'4H\',9.5w.2y(9));j(9.m.3f)9.r.1a(\'2M\',9.5x.2y(9));j(9.m.1k==\'4G\'){9.z=\'x\';9.p=\'2i\';9.1B=9.r.2x-9.21.2x;9.4y=9.21.2x/2;9.4z=9.r.4F.J(9.r)}Q j(9.m.1k==\'4E\'){9.z=\'y\';9.p=\'2w\';9.1B=9.r.2v-9.21.2v;9.4y=9.21.2v/2;9.4z=9.r.4D.J(9.r)}9.21.1F(\'1Z\',\'7i\').1F(9.p,0);k 4B={},4C={};4C[9.z]=[0,9.1B];4B[9.z]=9.p;9.29=M 2L.1C(9.21,{1j:4C,3N:0,2u:4B,2K:f(){9.3M()}.J(9),4A:f(){9.3M()}.J(9),2g:f(){9.3M();9.2h()}.J(9)});j(9.m.1e)9.m.1e.1i(9)},1U:f(19){j(19>9.m.3d)19=9.m.3d;Q j(19<0)19=0;9.19=19;9.3L();9.2h();9.1x(\'4x\',9.5v(9.19)+\'\');h 9},5x:f(o){j(o.3f<0)9.1U(9.19+1);Q j(o.3f>0)9.1U(9.19-1);o.1s()},5w:f(o){k 1Z=o.1y[9.z]-9.4z()-9.4y;j(1Z>9.1B)1Z=9.1B;Q j(1Z<0)1Z=0;9.19=9.4u(1Z);9.3L();9.2h();9.1x(\'4x\',1Z+\'\')},3M:f(){9.19=9.4u(9.29.K.P[9.z]);9.3L()},3L:f(){j(9.4w!=9.19){9.4w=9.19;9.1x(\'3K\',9.19)}},2h:f(){j(9.4v!==9.19){9.4v=9.19;9.1x(\'2g\',9.19+\'\')}},4u:f(1Z){h G.3e(1Z/9.1B*9.m.3d)},5v:f(19){h(9.1B)*19/9.m.3d}});4t.1T(M 3c);4t.1T(M 3b);',62,619,'|||||||||this||||||function||return||if|var|el|options|property|event||type|element|||obj|||||||to||||from|Math||for|bind|value|document|new|extend|fn|now|else|args||false|prototype|events|in|Fx|arguments|||Class|window||length|test||css|push|step|addEvent|Element|case|className|initialize|timer|true|style|call|limit|mode|rgb|start|parsed|each|found|param|Array|stop|parent|keys|selector|elements|fireEvent|page|values|color|max|Base|pos|removeEvent|setStyle|empty|Object|bound|unit|null|source|parse|Elements|key|break|filters|array|properties|implement|set|scroll|getStyle|PI|opacity|position||knob|pow|CSS|name||parentNode||match|drag|scrollTo|iCss|switch|delay|create|current|onComplete|end|left|getOptions|periodical|mouse|apply|margin|increase|iTo|Color|documentElement|previous|returns|modifiers|offsetHeight|top|offsetWidth|bindWithEvent|change|size|chk|toInt|compute|setNow|getValue|getElementsBySelector|chains|HTMLElement|hex|onStart|Drag|mousewheel|setOptions|getOffsets|mousemove|Transitions|wrapper|offset|wait|select|getNow|fx|fromTo|time|id|att|Garbage||text|while|replace|newArray||||item|Options|Events|steps|round|wheel|100|area|height|width|handle|checkAndDrag|sqrt|sin|min|iNow|iFrom|join|hexToRgb|parseFloat|domready|domReady|ie|alpha|colors|undefined|hasClass|getElements|getTag|filter|option|Event|toLowerCase|target|rgbToHex|items|onChange|checkStep|draggedKnob|snap|scrollSize|getSize|clear|5625|hidden|Multi|scrollLeft|scrollTop|khtml|readyState|loaded|remove||tagName|getElement|sel|getElementById|clean||splice|preventDefault|stopPropagation|relatedTarget|offsetTop|offsetLeft|setProperty|attribute|whitespace|indexOf|currentStyle|visibility|string|appendChild|inject|instanceof|ms|attempt|bit|forEach|pr0t0typ3|klass|Slider|toStep|previousEnd|previousChange|onTick|half|getPos|onDrag|modSlide|limSlide|getTop|vertical|getLeft|horizontal|mousedown|px|Scroller|velocity|coord|mousemover|body|out|bounceOut|70158|asin|abs|cos|sineInOut|layout|iProps|map|split|duration||opera|script|ie6|copy|operator|getElementsByTagName|els|on|Function|right|pageY|pageX|code|String|DOMMouseScroll|trash|removeEvents|offs|getBrother|getNext|what|gecko|camelCase|object|Native|result|typeof|parseInt|charAt|results|toPosition|clickedElement|scrolledElement|client|getCoords|mouseup|onSnap|distance|bounceIn|525|linear|slideOut|slideIn|hide|adopt|injectAfter|toElement|full|number|iParsed|Styles|Style|Single|Chain|onCancel|fps|getTime|Date|cTime|transition|callChain|getScrollHeight|getScrollWidth|getHeight|getWidth|getScrollTop|getScrollLeft|pageXOffset|pageYOffset|scrollWidth|scrollHeight|clientHeight|clientWidth|init|complete|ie_ready|catch|try|invert|mix|Hash|getAttribute|filterByAttribute|filterByTagName|filterByClassName|filterById|w_|defaults|which|clientY|clientX|special|120|wheelDelta|nodeType|unload|collect|selectedIndex|bottom|class|html|setAttribute|default|replaceWith|createElement|setStyles|childNodes|Sibling|evType|removeEventListener|addEventListener|hyphenate|defaultView|visible|setOpacity|cssText|addClass|removeClass|contents|inside|after|before|insertBefore|where|_elements_extended_|_element_extended_|err|toFloat||Number|trim|toUpperCase|params|regex|iterable|some|every|random|picked|parentize|noinit|relative|makeResizable|detach|bounceInOut|984375|625|9375|backInOut|backOut|backIn|elasticInOut|elasticOut|elasticIn|circInOut|circOut|circIn|expoInOut|expoOut|expoIn|sineOut|sineIn|quintInOut|quintOut|quintIn|quartInOut|quartOut|quartIn|cubicInOut|cubicOut|cubicIn|quadInOut|quadOut|quadIn|toggle|show|overflow|div|Slide|toRight|toLeft|toBottom|toTop|Scroll|effects|effect|clearTimer|custom|1000|500|innerHeight|innerWidth|onDomReady|DOMContentLoaded|load|onreadystatechange|void|javascript|src|defer|write|BackgroundImageCache|execCommand|disableImageCache|255|pop|get|tag|getElementsByClassName|ES|clearChain|chain|delete|backspace|space|esc|down|up|enter|returnValue|cancelBubble|mouseout|fromElement|mouseover|button|rightClick|click|fromCharCode|keyCode|detail|metaKey|meta|altKey|alt|ctrlKey|control|shiftKey|shift|srcElement|Window|textarea|password|radio|checkbox|checked|input|getPosition|offsetParent|do|getProperty|innerHTML|setHTML|setProperties|attributes|getChildren|getParent|previousSibling|lastChild|getLast|nextSibling|firstChild|getFirst|next|getPrevious|detachEvent|addEvents|attachEvent|getPropertyValue|getComputedStyle|padding|zoom|hasLayout|toggleClass|createTextNode|styleSheet|appendText|replaceChild|cloneNode|clone|removeChild|injectInside|injectBefore|embed|bindAsEventListener|pass|finally|setInterval|setTimeout|concat|toString|transparent|capitalize|RegExp|associate|getBoxObjectFor|taintEnabled|navigator|all|ie7|XMLHttpRequest|ActiveXObject|clearInterval|clearTimeout|floor|pick|textnode|nodeValue|nodeName'.split('|'),0,{})) diff --git a/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/scripts/mootools.uncompressed.js b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/scripts/mootools.uncompressed.js new file mode 100644 index 0000000..d0ef7e8 --- /dev/null +++ b/emacs.d/nxhtml/nxhtml/doc/js/smoothgallery/scripts/mootools.uncompressed.js @@ -0,0 +1,4078 @@ +/* +Script: Moo.js + My Object Oriented javascript. + +Author: + Valerio Proietti, + +License: + MIT-style license. + +Credits: + - Class is slightly based on Base.js (c) 2006 Dean Edwards, License + - Some functions are based on those found in prototype.js (c) 2005 Sam Stephenson sam [at] conio [dot] net, MIT-style license + - Documentation by Aaron Newton (aaron.newton [at] cnet [dot] com) and Valerio Proietti. +*/ + +/* +Class: Class + The base class object of the framework. + +Arguments: + properties - the collection of properties that apply to the class. Creates a new class, its initialize method will fire upon class instantiation. + +Example: + (start code) + var Cat = new Class({ + initialize: function(name){ + this.name = name; + } + }); + var myCat = new Cat('Micia'); + alert myCat.name; //alerts 'Micia' + (end) +*/ + +var Class = function(properties){ + var klass = function(){ + if (this.initialize && arguments[0] != 'noinit') return this.initialize.apply(this, arguments); + else return this; + }; + for (var property in this) klass[property] = this[property]; + klass.prototype = properties; + return klass; +}; + +/* +Property: empty + Returns an empty function +*/ + +Class.empty = function(){}; + +Class.prototype = { + + /* + Property: extend + Returns the copy of the Class extended with the passed in properties. + + Arguments: + properties - the properties to add to the base class in this new Class. + + Example: + (start code) + var Animal = new Class({ + initialize: function(age){ + this.age = age; + } + }); + var Cat = Animal.extend({ + initialize: function(name, age){ + this.parent(age); //will call the previous initialize; + this.name = name; + } + }); + var myCat = new Cat('Micia', 20); + alert myCat.name; //alerts 'Micia' + alert myCat.age; //alerts 20 + (end) + */ + + extend: function(properties){ + var pr0t0typ3 = new this('noinit'); + + var parentize = function(previous, current){ + if (!previous.apply || !current.apply) return false; + return function(){ + this.parent = previous; + return current.apply(this, arguments); + }; + }; + + for (var property in properties){ + var previous = pr0t0typ3[property]; + var current = properties[property]; + if (previous && previous != current) current = parentize(previous, current) || current; + pr0t0typ3[property] = current; + } + return new Class(pr0t0typ3); + }, + + /* + Property: implement + Implements the passed in properties to the base Class prototypes, altering the base class, unlike . + + Arguments: + properties - the properties to add to the base class. + + Example: + (start code) + var Animal = new Class({ + initialize: function(age){ + this.age = age; + } + }); + Animal.implement({ + setName: function(name){ + this.name = name + } + }); + var myAnimal = new Animal(20); + myAnimal.setName('Micia'); + alert(myAnimal.name); //alerts 'Micia' + (end) + */ + + implement: function(properties){ + for (var property in properties) this.prototype[property] = properties[property]; + } + +}; + +/* Section: Object related Functions */ + +/* +Function: Object.extend + Copies all the properties from the second passed object to the first passed Object. + If you do myWhatever.extend = Object.extend the first parameter will become myWhatever, and your extend function will only need one parameter. + +Example: + (start code) + var firstOb = { + 'name': 'John', + 'lastName': 'Doe' + }; + var secondOb = { + 'age': '20', + 'sex': 'male', + 'lastName': 'Dorian' + }; + Object.extend(firstOb, secondOb); + //firstOb will become: + { + 'name': 'John', + 'lastName': 'Dorian', + 'age': '20', + 'sex': 'male' + }; + (end) + +Returns: + The first object, extended. +*/ + +Object.extend = function(){ + var args = arguments; + args = (args[1]) ? [args[0], args[1]] : [this, args[0]]; + for (var property in args[1]) args[0][property] = args[1][property]; + return args[0]; +}; + +/* +Function: Object.Native + Will add a .extend method to the objects passed as a parameter, equivalent to + +Arguments: + a number of classes/native javascript objects + +*/ + +Object.Native = function(){ + for (var i = 0; i < arguments.length; i++) arguments[i].extend = Class.prototype.implement; +}; + +new Object.Native(Function, Array, String, Number, Class); + +/* +Script: Utility.js + Contains Utility functions + +Author: + Valerio Proietti, + +License: + MIT-style license. +*/ + +//htmlelement mapping + +if (typeof HTMLElement == 'undefined'){ + var HTMLElement = Class.empty; + HTMLElement.prototype = {}; +} + +/* +Function: $type + Returns the type of object that matches the element passed in. + +Arguments: + obj - the object to inspect. + +Example: + >var myString = 'hello'; + >$type(myString); //returns "string" + +Returns: + 'element' - if obj is a DOM element node + 'textnode' - if obj is a DOM text node + 'whitespace' - if obj is a DOM whitespace node + 'array' - if obj is an array + 'object' - if obj is an object + 'string' - if obj is a string + 'number' - if obj is a number + 'boolean' - if obj is a boolean + 'function' - if obj is a function + false - (boolean) if the object is not defined or none of the above. +*/ + +function $type(obj){ + if (obj === null || obj === undefined) return false; + var type = typeof obj; + if (type == 'object'){ + if (obj instanceof HTMLElement) return 'element'; + if (obj instanceof Array) return 'array'; + if (obj.nodeName){ + switch (obj.nodeType){ + case 1: return 'element'; + case 3: return obj.nodeValue.test('\\S') ? 'textnode' : 'whitespace'; + } + } + } + return type; +}; + +/* +Function: $chk + Returns true if the passed in value/object exists or is 0, otherwise returns false. + Useful to accept zeroes. +*/ + +function $chk(obj){ + return !!(obj || obj === 0); +}; + +/* +Function: $pick + Returns the first object if defined, otherwise returns the second. +*/ + +function $pick(obj, picked){ + return ($type(obj)) ? obj : picked; +}; + +/* +Function: $random + Returns a random integer number between the two passed in values. + +Arguments: + min - integer, the minimum value (inclusive). + max - integer, the maximum value (inclusive). + +Returns: + a random integer between min and max. +*/ + +function $random(min, max){ + return Math.floor(Math.random() * (max - min + 1) + min); +}; + +/* +Function: $clear + clears a timeout or an Interval. + +Returns: + null + +Arguments: + timer - the setInterval or setTimeout to clear. + +Example: + >var myTimer = myFunction.delay(5000); //wait 5 seconds and execute my function. + >myTimer = $clear(myTimer); //nevermind + +See also: + , +*/ + +function $clear(timer){ + clearTimeout(timer); + clearInterval(timer); + return null; +}; + +/* Section: Browser Detection */ + +/* +Properties: + window.ie - will be set to true if the current browser is internet explorer (any). + window.ie6 - will be set to true if the current browser is internet explorer 6. + window.ie7 - will be set to true if the current browser is internet explorer 7. + window.khtml - will be set to true if the current browser is Safari/Konqueror. + window.gecko - will be set to true if the current browser is Mozilla/Gecko. +*/ + +if (window.ActiveXObject) window.ie = window[window.XMLHttpRequest ? 'ie7' : 'ie6'] = true; +else if (document.childNodes && !document.all && !navigator.taintEnabled) window.khtml = true; +else if (document.getBoxObjectFor != null) window.gecko = true; + +/* +Script: Array.js + Contains Array prototypes and the function <$A>; + +Author: + Valerio Proietti, + +License: + MIT-style license. +*/ + +/* +Class: Array + A collection of The Array Object prototype methods. +*/ + +//emulated methods + +/* +Property: forEach + Iterates through an array; This method is only available for browsers without native *forEach* support. + For more info see +*/ + +Array.prototype.forEach = Array.prototype.forEach || function(fn, bind){ + for (var i = 0; i < this.length; i++) fn.call(bind, this[i], i, this); +}; + +/* +Property: map + This method is provided only for browsers without native *map* support. + For more info see +*/ + +Array.prototype.map = Array.prototype.map || function(fn, bind){ + var results = []; + for (var i = 0; i < this.length; i++) results[i] = fn.call(bind, this[i], i, this); + return results; +}; + +/* +Property: every + This method is provided only for browsers without native *every* support. + For more info see +*/ + +Array.prototype.every = Array.prototype.every || function(fn, bind){ + for (var i = 0; i < this.length; i++){ + if (!fn.call(bind, this[i], i, this)) return false; + } + return true; +}; + +/* +Property: some + This method is provided only for browsers without native *some* support. + For more info see +*/ + +Array.prototype.some = Array.prototype.some || function(fn, bind){ + for (var i = 0; i < this.length; i++){ + if (fn.call(bind, this[i], i, this)) return true; + } + return false; +}; + +/* +Property: indexOf + This method is provided only for browsers without native *indexOf* support. + For more info see +*/ + +Array.prototype.indexOf = Array.prototype.indexOf || function(item, from){ + from = from || 0; + if (from < 0) from = Math.max(0, this.length + from); + while (from < this.length){ + if(this[from] === item) return from; + from++; + } + return -1; +}; + +//custom methods + +Array.extend({ + + /* + Property: each + Same as . + + Arguments: + fn - the function to execute with each item in the array + bind - optional, the object that the "this" of the function will refer to. + + Example: + >var Animals = ['Cat', 'Dog', 'Coala']; + >Animals.forEach(function(animal){ + > document.write(animal) + >}); + */ + + each: Array.prototype.forEach, + + /* + Property: copy + Copy the array and returns it. + + Returns: + an Array + + Example: + >var letters = ["a","b","c"]; + >var copy = ["a","b","c"].copy(); + */ + + copy: function(){ + var newArray = []; + for (var i = 0; i < this.length; i++) newArray[i] = this[i]; + return newArray; + }, + + /* + Property: remove + Removes all occurrences of an item from the array. + + Arguments: + item - the item to remove + + Returns: + the Array with all occurrences of the item removed. + + Example: + >["1","2","3","2"].remove("2") // ["1","3"]; + */ + + remove: function(item){ + var i = 0; + while (i < this.length){ + if (this[i] == item) this.splice(i, 1); + else i++; + } + return this; + }, + + /* + Property: test + Tests an array for the presence of an item. + + Arguments: + item - the item to search for in the array. + from - optional, the index at which to begin the search, default is 0. If negative, it is taken as the offset from the end of the array. + + Returns: + true - the item was found + false - it wasn't + + Example: + >["a","b","c"].test("a"); // true + >["a","b","c"].test("d"); // false + */ + + test: function(item, from){ + return this.indexOf(item, from) != -1; + }, + + /* + Property: extend + Extends an array with another + + Arguments: + newArray - the array to extend ours with + + Example: + >var Animals = ['Cat', 'Dog', 'Coala']; + >Animals.extend(['Lizard']); + >//Animals is now: ['Cat', 'Dog', 'Coala', 'Lizard']; + */ + + extend: function(newArray){ + for (var i = 0; i < newArray.length; i++) this.push(newArray[i]); + return this; + }, + + /* + Property: associate + Creates an object with key-value pairs based on the array of keywords passed in + and the current content of the array. + + Arguments: + keys - the array of keywords. + + Example: + (start code) + var Animals = ['Cat', 'Dog', 'Coala', 'Lizard']; + var Speech = ['Miao', 'Bau', 'Fruuu', 'Mute']; + var Speeches = Animals.associate(speech); + //Speeches['Miao'] is now Cat. + //Speeches['Bau'] is now Dog. + //... + (end) + */ + + associate: function(keys){ + var obj = {}, length = Math.min(this.length, keys.length); + for (var i = 0; i < length; i++) obj[keys[i]] = this[i]; + return obj; + } + +}); + +/* Section: Utility Functions */ + +/* +Function: $A() + Same as , but as function. + Useful to apply Array prototypes to iterable objects, as a collection of DOM elements or the arguments object. + +Example: + (start code) + function myFunction(){ + $A(arguments).each(argument, function(){ + alert(argument); + }); + }; + //the above will alert all the arguments passed to the function myFunction. + (end) +*/ + +function $A(array){ + return Array.prototype.copy.call(array); +}; + +/* +Function: $each + use to iterate through iterables that are not regular arrays, such as builtin getElementsByTagName calls, or arguments of a function. + +Arguments: + iterable - an iterable element. + function - function to apply to the iterable. + bind - optional, the 'this' of the function will refer to this object. +*/ + +function $each(iterable, fn, bind){ + return Array.prototype.forEach.call(iterable, fn, bind); +}; + +/* +Script: String.js + Contains String prototypes and Number prototypes. + +Author: + Valerio Proietti, + +License: + MIT-style license. +*/ + +/* +Class: String + A collection of The String Object prototype methods. +*/ + +String.extend({ + + /* + Property: test + Tests a string with a regular expression. + + Arguments: + regex - the regular expression you want to match the string with + params - optional, any parameters you want to pass to the regex ('g' has no effect) + + Returns: + true if a match for the regular expression is found in the string, false if not. + See + + Example: + >"I like cookies".test("cookie"); // returns true + >"I like cookies".test("COOKIE", "i") // ignore case, returns true + >"I like cookies".test("cake"); // returns false + */ + + test: function(regex, params){ + return new RegExp(regex, params).test(this); + }, + + /* + Property: toInt + parses a string to an integer. + + Returns: + either an int or "NaN" if the string is not a number. + + Example: + >var value = "10px".toInt(); // value is 10 + */ + + toInt: function(){ + return parseInt(this); + }, + + toFloat: function(){ + return parseFloat(this); + }, + + /* + Property: camelCase + Converts a hiphenated string to a camelcase string. + + Example: + >"I-like-cookies".camelCase(); //"ILikeCookies" + + Returns: + the camel cased string + */ + + camelCase: function(){ + return this.replace(/-\D/g, function(match){ + return match.charAt(1).toUpperCase(); + }); + }, + + /* + Property: hyphenate + Converts a camelCased string to a hyphen-ated string. + + Example: + >"ILikeCookies".hyphenate(); //"I-like-cookies" + */ + + hyphenate: function(){ + return this.replace(/\w[A-Z]/g, function(match){ + return (match.charAt(0)+'-'+match.charAt(1).toLowerCase()); + }); + }, + + /* + Property: capitalize + Converts the first letter in each word of a string to Uppercase. + + Example: + >"i like cookies".capitalize(); //"I Like Cookies" + + Returns: + the capitalized string + */ + + capitalize: function(){ + return this.toLowerCase().replace(/\b[a-z]/g, function(match){ + return match.toUpperCase(); + }); + }, + + /* + Property: trim + Trims the leading and trailing spaces off a string. + + Example: + >" i like cookies ".trim() //"i like cookies" + + Returns: + the trimmed string + */ + + trim: function(){ + return this.replace(/^\s+|\s+$/g, ''); + }, + + /* + Property: clean + trims () a string AND removes all the double spaces in a string. + + Returns: + the cleaned string + + Example: + >" i like cookies \n\n".clean() //"i like cookies" + */ + + clean: function(){ + return this.replace(/\s{2,}/g, ' ').trim(); + }, + + /* + Property: rgbToHex + Converts an RGB value to hexidecimal. The string must be in the format of "rgb(255, 255, 255)" or "rgba(255, 255, 255, 1)"; + + Arguments: + array - boolean value, defaults to false. Use true if you want the array ['FF', '33', '00'] as output instead of #FF3300 + + Returns: + hex string or array. returns transparent if the fourth value of rgba in input string is 0, + + Example: + >"rgb(17,34,51)".rgbToHex(); //"#112233" + >"rgba(17,34,51,0)".rgbToHex(); //"transparent" + >"rgb(17,34,51)".rgbToHex(true); //[11,22,33] + */ + + rgbToHex: function(array){ + var rgb = this.match(/\d{1,3}/g); + return (rgb) ? rgb.rgbToHex(array) : false; + }, + + /* + Property: hexToRgb + Converts a hexidecimal color value to RGB. Input string must be the hex color value (with or without the hash). Also accepts triplets ('333'); + + Arguments: + array - boolean value, defaults to false. Use true if you want the array ['255', '255', '255'] as output instead of "rgb(255,255,255)"; + + Returns: + rgb string or array. + + Example: + >"#112233".hexToRgb(); //"rgb(17,34,51)" + >"#112233".hexToRgb(true); //[17,34,51] + */ + + hexToRgb: function(array){ + var hex = this.match('^#?(\\w{1,2})(\\w{1,2})(\\w{1,2})$'); + return (hex) ? hex.hexToRgb(array) : false; + } + +}); + +Array.extend({ + + rgbToHex: function(array){ + if (this.length < 3) return false; + if (this[3] && this[3] == 0) return 'transparent'; + var hex = []; + for (var i = 0; i < 3; i++){ + var bit = (this[i]-0).toString(16); + hex.push(bit.length == 1 ? '0'+bit : bit); + } + return array ? hex : '#'+hex.join(''); + }, + + hexToRgb: function(array){ + if (this.length != 4) return false; + var rgb = []; + for (var i = 1; i < 4; i++){ + if (this[i].length == 1) this[i] += this[i]; + rgb.push(parseInt(this[i], 16)); + } + return array ? rgb : 'rgb('+rgb.join(',')+')'; + } + +}); + +/* +Class: Number + contains the internal method toInt. +*/ + +Number.extend({ + + /* + Property: toInt + Returns this number; useful because toInt must work on both Strings and Numbers. + */ + + toInt: function(){ + return parseInt(this); + }, + + toFloat: function(){ + return parseFloat(this); + } + +}); + +/* +Script: Function.js + Contains Function prototypes and utility functions . + +Author: + Valerio Proietti, + +License: + MIT-style license. + +Credits: + - Some functions are inspired by those found in prototype.js (c) 2005 Sam Stephenson sam [at] conio [dot] net, MIT-style license +*/ + +/* +Class: Function + A collection of The Function Object prototype methods. +*/ + +Function.extend({ + + create: function(options){ + var fn = this; + options = Object.extend({ + 'bind': fn, + 'event': false, + 'arguments': null, + 'delay': false, + 'periodical': false, + 'attempt': false + }, options || {}); + if (options.arguments != null && typeof options.arguments != 'undefined' && !(options.arguments instanceof Array)) + options.arguments = [options.arguments]; + return function(event){ + var args = options.arguments || arguments; + if (options.event){ + event = (options.event === true) ? event || window.event : new options.event(event); + args = [event].concat(args); + } + var returns = function(){ + return fn.apply(options.bind, args); + }; + if (options.delay) return setTimeout(returns, options.delay); + if (options.periodical) return setInterval(returns, options.periodical); + if (options.attempt){ + try { + var result = returns(); + } catch(err){ + result = err; + } finally { + return result; + } + } else return returns(); + }; + }, + + /* + Property: pass + Shortcut to create closures with arguments and bind. + + Returns: + a function. + + Arguments: + args - the arguments passed. must be an array if arguments > 1 + bind - optional, the object that the "this" of the function will refer to. + + Example: + >myFunction.pass([arg1, arg2], myElement); + */ + + pass: function(args, bind){ + return this.create({'arguments': args, 'bind': bind}); + }, + + /* + Property: attempt + Tries to execute the function, returns either the function results or the error. + + Arguments: + args - the arguments passed. must be an array if arguments > 1 + bind - optional, the object that the "this" of the function will refer to. + + Example: + >myFunction.attempt([arg1, arg2], myElement); + */ + + attempt: function(args, bind){ + return this.create({'arguments': args, 'bind': bind, 'attempt': true})(); + }, + + /* + Property: bind + method to easily create closures with "this" altered. + + Arguments: + bind - optional, the object that the "this" of the function will refer to. + args - optional, the arguments passed. must be an array if arguments > 1 + + Returns: + a function. + + Example: + >function myFunction(){ + > this.setStyle('color', 'red'); + > // note that 'this' here refers to myFunction, not an element + > // we'll need to bind this function to the element we want to alter + >}; + >var myBoundFunction = myFunction.bind(myElement); + >myBoundFunction(); // this will make the element myElement red. + */ + + bind: function(bind, args){ + return this.create({'bind': bind, 'arguments': args}); + }, + + /* + Property: bindAsEventListener + cross browser method to pass event firer + + Arguments: + bind - optional, the object that the "this" of the function will refer to. + args - optional, the arguments passed. must be an array if arguments > 1 + + Returns: + a function with the parameter bind as its "this" and as a pre-passed argument event or window.event, depending on the browser. + + Example: + >function myFunction(event){ + > alert(event.clientx) //returns the coordinates of the mouse.. + >}; + >myElement.onclick = myFunction.bindAsEventListener(myElement); + */ + + bindAsEventListener: function(bind, args){ + return this.create({'bind': bind, 'event': true, 'arguments': args}); + }, + + /* + Property: delay + Delays the execution of a function by a specified duration. + + Arguments: + ms - the duration to wait in milliseconds + bind - optional, the object that the "this" of the function will refer to. + args - optional, the arguments passed. must be an array if arguments > 1 + + Example: + >myFunction.delay(50, myElement) //wait 50 milliseconds, then call myFunction and bind myElement to it + >(function(){alert('one second later...')}).delay(1000); //wait a second and alert + */ + + delay: function(ms, bind, args){ + return this.create({'delay': ms, 'bind': bind, 'arguments': args})(); + }, + + /* + Property: periodical + Executes a function in the specified intervals of time + + Arguments: + ms - the duration of the intervals between executions. + bind - optional, the object that the "this" of the function will refer to. + args - optional, the arguments passed. must be an array if arguments > 1 + */ + + periodical: function(ms, bind, args){ + return this.create({'periodical': ms, 'bind': bind, 'arguments': args})(); + } + +}); + +/* +Script: Element.js + Contains useful Element prototypes, to be used with the dollar function <$>. + +Author: + Valerio Proietti, + +License: + MIT-style license. + +Credits: + - Some functions are inspired by those found in prototype.js (c) 2005 Sam Stephenson sam [at] conio [dot] net, MIT-style license +*/ + +/* +Class: Element + Custom class to allow all of its methods to be used with any DOM element via the dollar function <$>. +*/ + +var Element = new Class({ + + /* + Property: initialize + Creates a new element of the type passed in. + + Arguments: + el - the tag name for the element you wish to create. + + Example: + >var div = new Element('div'); + */ + + initialize: function(el){ + if ($type(el) == 'string') el = document.createElement(el); + return $(el); + } + +}); + +/* +Function: $() + returns the element passed in with all the Element prototypes applied. + +Arguments: + el - a reference to an actual element or a string representing the id of an element + +Example: + >$('myElement') // gets a DOM element by id with all the Element prototypes applied. + >var div = document.getElementById('myElement'); + >$(div) //returns an Element also with all the mootools extentions applied. + + You'll use this when you aren't sure if a variable is an actual element or an id, as + well as just shorthand for document.getElementById(). + +Returns: + a DOM element or false (if no id was found). + +Note: + you need to call $ on an element only once to get all the prototypes. + But its no harm to call it multiple times, as it will detect if it has been already extended. +*/ + +function $(el){ + if (!el) return false; + if (el._element_extended_ || [window, document].test(el)) return el; + if ($type(el) == 'string') el = document.getElementById(el); + if ($type(el) != 'element') return false; + if (['object', 'embed'].test(el.tagName.toLowerCase()) || el.extend) return el; + el._element_extended_ = true; + Garbage.collect(el); + el.extend = Object.extend; + if (!(el instanceof HTMLElement)) el.extend(Element.prototype); + return el; +}; + +//elements class + +var Elements = new Class({}); + +new Object.Native(Elements); + +document.getElementsBySelector = document.getElementsByTagName; + +/* +Function: $$() + Selects, and extends DOM elements. + +Arguments: + HTMLCollection(document.getElementsByTagName, element.childNodes), an array of elements, a string. + +Note: + if you loaded , $$ will also accept CSS Selectors. + +Example: + >$$('a') //an array of all anchor tags on the page + >$$('a', 'b') //an array of all anchor and bold tags on the page + >$$('#myElement') //array containing only the element with id = myElement. (only with ) + >$$('#myElement a.myClass') //an array of all anchor tags with the class "myClass" within the DOM element with id "myElement" (only with ) + +Returns: + array - array of all the dom elements matched +*/ + +function $$(){ + if (!arguments) return false; + if (arguments.length == 1){ + if (!arguments[0]) return false; + if (arguments[0]._elements_extended_) return arguments[0]; + } + var elements = []; + $each(arguments, function(selector){ + switch ($type(selector)){ + case 'element': elements.push($(selector)); break; + case 'string': selector = document.getElementsBySelector(selector); + default: + if (selector.length){ + $each(selector, function(el){ + if ($(el)) elements.push(el); + }); + } + } + }); + elements._elements_extended_ = true; + return Object.extend(elements, new Elements); +}; + +Elements.Multi = function(property){ + return function(){ + var args = arguments; + var items = []; + var elements = true; + $each(this, function(el){ + var returns = el[property].apply(el, args); + if ($type(returns) != 'element') elements = false; + items.push(returns); + }); + if (elements) items = $$(items); + return items; + }; +}; + +Element.extend = function(properties){ + for (var property in properties){ + HTMLElement.prototype[property] = properties[property]; + Element.prototype[property] = properties[property]; + Elements.prototype[property] = Elements.Multi(property); + } +}; + +Element.extend({ + + inject: function(el, where){ + el = $(el) || new Element(el); + switch (where){ + case "before": $(el.parentNode).insertBefore(this, el); break; + case "after": + if (!el.getNext()) $(el.parentNode).appendChild(this); + else $(el.parentNode).insertBefore(this, el.getNext()); + break; + case "inside": el.appendChild(this); + } + return this; + }, + + /* + Property: injectBefore + Inserts the Element before the passed element. + + Parameteres: + el - a string representing the element to be injected in (myElementId, or div), or an element reference. + If you pass div or another tag, the element will be created. + + Example: + >html: + >
+ >
+ >js: + >$('mySecondElement').injectBefore('myElement'); + >resulting html: + >
+ >
+ + */ + + injectBefore: function(el){ + return this.inject(el, 'before'); + }, + + /* + Property: injectAfter + Same as , but inserts the element after. + */ + + injectAfter: function(el){ + return this.inject(el, 'after'); + }, + + /* + Property: injectInside + Same as , but inserts the element inside. + */ + + injectInside: function(el){ + return this.inject(el, 'inside'); + }, + + /* + Property: adopt + Inserts the passed element inside the Element. Works as but in reverse. + + Parameteres: + el - a string representing the element to be injected in (myElementId, or div), or an element reference. + If you pass div or another tag, the element will be created. + */ + + adopt: function(el){ + this.appendChild($(el) || new Element(el)); + return this; + }, + + /* + Property: remove + Removes the Element from the DOM. + + Example: + >$('myElement').remove() //bye bye + */ + + remove: function(){ + this.parentNode.removeChild(this); + return this; + }, + + /* + Property: clone + Clones the Element and returns the cloned one. + + Returns: + the cloned element + + Example: + >var clone = $('myElement').clone().injectAfter('myElement'); + >//clones the Element and append the clone after the Element. + */ + + clone: function(contents){ + var el = this.cloneNode(contents !== false); + return $(el); + }, + + /* + Property: replaceWith + Replaces the Element with an element passed. + + Parameteres: + el - a string representing the element to be injected in (myElementId, or div), or an element reference. + If you pass div or another tag, the element will be created. + + Returns: + the passed in element + + Example: + >$('myOldElement').replaceWith($('myNewElement')); //$('myOldElement') is gone, and $('myNewElement') is in its place. + */ + + replaceWith: function(el){ + el = $(el) || new Element(el); + this.parentNode.replaceChild(el, this); + return el; + }, + + /* + Property: appendText + Appends text node to a DOM element. + + Arguments: + text - the text to append. + + Example: + >
hey
+ >$('myElement').appendText(' howdy'); //myElement innerHTML is now "hey howdy" + */ + + appendText: function(text){ + if (window.ie){ + switch(this.getTag()){ + case 'style': this.styleSheet.cssText = text; return this; + case 'script': this.setProperty('text', text); return this; + } + } + this.appendChild(document.createTextNode(text)); + return this; + }, + + /* + Property: hasClass + Tests the Element to see if it has the passed in className. + + Returns: + true - the Element has the class + false - it doesn't + + Arguments: + className - the class name to test. + + Example: + >
+ >$('myElement').hasClass('testClass'); //returns true + */ + + hasClass: function(className){ + return this.className.test('(?:^|\\s+)' + className + '(?:\\s+|$)'); + }, + + /* + Property: addClass + Adds the passed in class to the Element, if the element doesnt already have it. + + Arguments: + className - the class name to add + + Example: + >
+ >$('myElement').addClass('newClass'); //
+ */ + + addClass: function(className){ + if (!this.hasClass(className)) this.className = (this.className+' '+className).clean(); + return this; + }, + + /* + Property: removeClass + works like , but removes the class from the element. + */ + + removeClass: function(className){ + if (this.hasClass(className)) this.className = this.className.replace(className, '').clean(); + return this; + }, + + /* + Property: toggleClass + Adds or removes the passed in class name to the element, depending on if it's present or not. + + Arguments: + className - the class to add or remove + + Example: + >
+ >$('myElement').toggleClass('myClass'); + >
+ >$('myElement').toggleClass('myClass'); + >
+ */ + + toggleClass: function(className){ + return this.hasClass(className) ? this.removeClass(className) : this.addClass(className); + }, + + /* + Property: setStyle + Sets a css property to the Element. + + Arguments: + property - the property to set + value - the value to which to set it + + Example: + >$('myElement').setStyle('width', '300px'); //the width is now 300px + */ + + setStyle: function(property, value){ + if (property == 'opacity') this.setOpacity(parseFloat(value)); + else this.style[property.camelCase()] = (value.push) ? value.rgbToHex() : value; + return this; + }, + + /* + Property: setStyles + Applies a collection of styles to the Element. + + Arguments: + source - an object or string containing all the styles to apply + + Examples: + >$('myElement').setStyles({ + > border: '1px solid #000', + > width: '300px', + > height: '400px' + >}); + + OR + + >$('myElement').setStyle('border: 1px solid #000; width: 300px; height: 400px;'); + */ + + setStyles: function(source){ + switch ($type(source)){ + case 'object': + for (var property in source) this.setStyle(property, source[property]); + break; + case 'string': + if (window.ie) this.cssText = source; + else this.setAttribute('style', source); + } + return this; + }, + + /* + Property: setOpacity + Sets the opacity of the Element, and sets also visibility == "hidden" if opacity == 0, and visibility = "visible" if opacity == 1. + + Arguments: + opacity - Accepts numbers from 0 to 1. + + Example: + >$('myElement').setOpacity(0.5) //make it 50% transparent + */ + + setOpacity: function(opacity){ + if (opacity == 0){ + if(this.style.visibility != "hidden") this.style.visibility = "hidden"; + } else { + if(this.style.visibility != "visible") this.style.visibility = "visible"; + } + if (!this.currentStyle || !this.currentStyle.hasLayout) this.style.zoom = 1; + if (window.ie) this.style.filter = "alpha(opacity=" + opacity*100 + ")"; + this.style.opacity = this.opacity = opacity; + return this; + }, + + /* + Property: getStyle + Returns the style of the Element given the property passed in. + + Arguments: + property - the css style property you want to retrieve + + Example: + >$('myElement').getStyle('width'); //returns "400px" + >//but you can also use + >$('myElement').getStyle('width').toInt(); //returns "400" + + Returns: + the style as a string + */ + + getStyle: function(property){ + property = property.camelCase(); + var style = this.style[property] || false; + if (!$chk(style)){ + if (property == 'opacity') return $chk(this.opacity) ? this.opacity : 1; + if (['margin', 'padding'].test(property)){ + return [this.getStyle(property+'-top') || 0, this.getStyle(property+'-right') || 0, + this.getStyle(property+'-bottom') || 0, this.getStyle(property+'-left') || 0].join(' '); + } + if (document.defaultView) style = document.defaultView.getComputedStyle(this, null).getPropertyValue(property.hyphenate()); + else if (this.currentStyle) style = this.currentStyle[property]; + } + return (style && property.test('color', 'i') && style.test('rgb')) ? style.rgbToHex() : style; + }, + + /* + Property: addEvent + Attaches an event listener to a DOM element. + + Arguments: + type - the event to monitor ('click', 'load', etc) without the prefix 'on'. + fn - the function to execute + + Example: + >$('myElement').addEvent('click', function(){alert('clicked!')}); + */ + + addEvent: function(type, fn){ + this.events = this.events || {}; + this.events[type] = this.events[type] || {'keys': [], 'values': []}; + if (!this.events[type].keys.test(fn)){ + this.events[type].keys.push(fn); + if (this.addEventListener){ + this.addEventListener((type == 'mousewheel' && window.gecko) ? 'DOMMouseScroll' : type, fn, false); + } else { + fn = fn.bind(this); + this.attachEvent('on'+type, fn); + this.events[type].values.push(fn); + } + } + return this; + }, + + addEvents: function(source){ + if (source){ + for (var type in source) this.addEvent(type, source[type]); + } + return this; + }, + + /* + Property: removeEvent + Works as Element.addEvent, but instead removes the previously added event listener. + */ + + removeEvent: function(type, fn){ + if (this.events && this.events[type]){ + var pos = this.events[type].keys.indexOf(fn); + if (pos == -1) return this; + var key = this.events[type].keys.splice(pos,1)[0]; + if (this.removeEventListener){ + this.removeEventListener((type == 'mousewheel' && window.gecko) ? 'DOMMouseScroll' : type, key, false); + } else { + this.detachEvent('on'+type, this.events[type].values.splice(pos,1)[0]); + } + } + return this; + }, + + /* + Property: removeEvents + removes all events of a certain type from an element. if no argument is passed in, removes all events. + */ + + removeEvents: function(type){ + if (this.events){ + if (type){ + if (this.events[type]){ + this.events[type].keys.each(function(fn){ + this.removeEvent(type, fn); + }, this); + this.events[type] = null; + } + } else { + for (var evType in this.events) this.removeEvents(evType); + this.events = null; + } + } + return this; + }, + + /* + Property: fireEvent + executes all events of the specified type present in the element. + */ + + fireEvent: function(type, args){ + if (this.events && this.events[type]){ + args = args || []; + if ($type(args) != 'array') args = [args]; + this.events[type].keys.each(function(fn){ + fn.apply(this, args); + }, this); + } + }, + + getBrother: function(what){ + var el = this[what+'Sibling']; + while ($type(el) == 'whitespace') el = el[what+'Sibling']; + return $(el); + }, + + /* + Property: getPrevious + Returns the previousSibling of the Element, excluding text nodes. + + Example: + >$('myElement').getPrevious(); //get the previous DOM element from myElement + + Returns: + the sibling element or undefined if none found. + */ + + getPrevious: function(){ + return this.getBrother('previous'); + }, + + /* + Property: getNext + Works as Element.getPrevious, but tries to find the nextSibling. + */ + + getNext: function(){ + return this.getBrother('next'); + }, + + /* + Property: getFirst + Works as , but tries to find the firstChild. + */ + + getFirst: function(){ + var el = this.firstChild; + while ($type(el) == 'whitespace') el = el.nextSibling; + return $(el); + }, + + /* + Property: getLast + Works as , but tries to find the lastChild. + */ + + getLast: function(){ + var el = this.lastChild; + while ($type(el) == 'whitespace') el = el.previousSibling; + return $(el); + }, + + /* + Property: getParent + returns the $(element.parentNode) + */ + + getParent: function(){ + return $(this.parentNode); + }, + + /* + Property: getChildren + returns all the $(element.childNodes), excluding text nodes. Returns as . + */ + + getChildren: function(){ + return $$(this.childNodes); + }, + + /* + Property: setProperty + Sets an attribute for the Element. + + Arguments: + property - the property to assign the value passed in + value - the value to assign to the property passed in + + Example: + >$('myImage').setProperty('src', 'whatever.gif'); //myImage now points to whatever.gif for its source + */ + + setProperty: function(property, value){ + switch (property){ + case 'class': this.className = value; break; + case 'style': this.setStyles(value); break; + case 'name': if (window.ie6){ + var el = $(document.createElement('<'+this.getTag()+' name="'+value+'" />')); + $each(this.attributes, function(attribute){ + if (attribute.name != 'name') el.setProperty(attribute.name, attribute.value); + }); + if (this.parentNode) this.replaceWith(el); + return el; + } + default: this.setAttribute(property, value); + } + return this; + }, + + /* + Property: setProperties + Sets numerous attributes for the Element. + + Arguments: + source - an object with key/value pairs. + + Example: + >$('myElement').setProperties({ + > src: 'whatever.gif', + > alt: 'whatever dude' + >}); + >whatever dude + */ + + setProperties: function(source){ + for (var property in source) this.setProperty(property, source[property]); + return this; + }, + + /* + Property: setHTML + Sets the innerHTML of the Element. + + Arguments: + html - the new innerHTML for the element. + + Example: + >$('myElement').setHTML(newHTML) //the innerHTML of myElement is now = newHTML + */ + + setHTML: function(html){ + this.innerHTML = html; + return this; + }, + + /* + Property: getProperty + Gets the an attribute of the Element. + + Arguments: + property - the attribute to retrieve + + Example: + >$('myImage').getProperty('src') // returns whatever.gif + + Returns: + the value, or an empty string + */ + + getProperty: function(property){ + return (property == 'class') ? this.className : this.getAttribute(property); + }, + + /* + Property: getTag + Returns the tagName of the element in lower case. + + Example: + >$('myImage').getTag() // returns 'img' + + Returns: + The tag name in lower case + */ + + getTag: function(){ + return this.tagName.toLowerCase(); + }, + + getOffsets: function(){ + var el = this, offsetLeft = 0, offsetTop = 0; + do { + offsetLeft += el.offsetLeft || 0; + offsetTop += el.offsetTop || 0; + el = el.offsetParent; + } while (el); + return {'x': offsetLeft, 'y': offsetTop}; + }, + + /* + Property: scrollTo + scrolls the element to the specified coordinated (if the element has an overflow) + + Arguments: + x - the x coordinate + y - the y coordinate + + Example: + >$('myElement').scrollTo(0, 100) + */ + + scrollTo: function(x, y){ + this.scrollLeft = x; + this.scrollTop = y; + }, + + /* + Property: getSize + return an Object representing the size/scroll values of the element. + + Example: + (start code) + $('myElement').getSize(); + (end) + + Returns: + (start code) + { + 'scroll': {'x': 100, 'y': 100}, + 'size': {'x': 200, 'y': 400}, + 'scrollSize': {'x': 300, 'y': 500} + } + (end) + */ + + getSize: function(){ + return { + 'scroll': {'x': this.scrollLeft, 'y': this.scrollTop}, + 'size': {'x': this.offsetWidth, 'y': this.offsetHeight}, + 'scrollSize': {'x': this.scrollWidth, 'y': this.scrollHeight} + }; + }, + + /* + Property: getTop + Returns the distance from the top of the window to the Element. + */ + + getTop: function(){ + return this.getOffsets().y; + }, + + /* + Property: getLeft + Returns the distance from the left of the window to the Element. + */ + + getLeft: function(){ + return this.getOffsets().x; + }, + + /* + Property: getPosition + Returns an object with width, height, left, right, top, and bottom, representing the values of the Element + + Example: + (start code) + var myValues = $('myElement').getPosition(); + (end) + + Returns: + (start code) + { + width: 200, + height: 300, + left: 100, + top: 50, + right: 300, + bottom: 350 + } + (end) + */ + + getPosition: function(){ + var offs = this.getOffsets(); + var obj = { + 'width': this.offsetWidth, + 'height': this.offsetHeight, + 'left': offs.x, + 'top': offs.y + }; + obj.right = obj.left + obj.width; + obj.bottom = obj.top + obj.height; + return obj; + }, + + /* + Property: getValue + Returns the value of the Element, if its tag is textarea, select or input. no multiple select support. + */ + + getValue: function(){ + switch (this.getTag()){ + case 'select': if (this.selectedIndex != -1) return this.options[this.selectedIndex].value; break; + case 'input': if (!(this.checked && ['checkbox', 'radio'].test(this.type)) && !['hidden', 'text', 'password'].test(this.type)) break; + case 'textarea': return this.value; + } + return false; + } + +}); + +var Window = window; + +window.addEvent = document.addEvent = Element.prototype.addEvent; +window.removeEvent = document.removeEvent = Element.prototype.removeEvent; + +var Garbage = { + + elements: [], + + collect: function(element){ + Garbage.elements.push(element); + }, + + trash: function(){ + window.removeEvent('unload', Garbage.trash); + Garbage.elements.each(function(el){ + el.removeEvents(); + for (var p in Element.prototype) HTMLElement[p] = window[p] = document[p] = el[p] = null; + el.extend = null; + }); + } + +}; + +window.addEvent('unload', Garbage.trash); + +/* +Script: Event.js + Event class + +Author: + Valerio Proietti, , Michael Jackson, + +License: + MIT-style license. +*/ + +/* +Class: Event + Cross browser methods to manage events. + +Arguments: + event - the event + +Properties: + shift - true if the user pressed the shift + control - true if the user pressed the control + alt - true if the user pressed the alt + meta - true if the user pressed the meta key + code - the keycode of the key pressed + page.x - the x position of the mouse, relative to the full window + page.y - the y position of the mouse, relative to the full window + client.x - the x position of the mouse, relative to the viewport + client.y - the y position of the mouse, relative to the viewport + key - the key pressed as a lowercase string. key also returns 'enter', 'up', 'down', 'left', 'right', 'space', 'backspace', 'delete', 'esc'. Handy for these special keys. + target - the event target + relatedTarget - the event related target + +Example: + (start code) + $('myLink').onkeydown = function(event){ + var event = new Event(event); + //event is now the Event class. + alert(event.key); //returns the lowercase letter pressed + alert(event.shift); //returns true if the key pressed is shift + if (event.key == 's' && event.control) alert('document saved'); + }; + (end) +*/ + +var Event = new Class({ + + initialize: function(event){ + this.event = event || window.event; + this.type = this.event.type; + this.target = this.event.target || this.event.srcElement; + if (this.target.nodeType == 3) this.target = this.target.parentNode; // Safari + this.shift = this.event.shiftKey; + this.control = this.event.ctrlKey; + this.alt = this.event.altKey; + this.meta = this.event.metaKey; + if (['DOMMouseScroll', 'mousewheel'].test(this.type)){ + this.wheel = this.event.wheelDelta ? (this.event.wheelDelta / (window.opera ? -120 : 120)) : -(this.event.detail || 0) / 3; + } else if (this.type.test('key')){ + this.code = this.event.which || this.event.keyCode; + for (var name in Event.keys){ + if (Event.keys[name] == this.code) var special = name; + } + this.key = special || String.fromCharCode(this.code).toLowerCase(); + + } else if (this.type.test('mouse') || this.type == 'click'){ + this.page = { + 'x': this.event.pageX || this.event.clientX + document.documentElement.scrollLeft, + 'y': this.event.pageY || this.event.clientY + document.documentElement.scrollTop + }; + this.client = { + 'x': this.event.pageX ? this.event.pageX - window.pageXOffset : this.event.clientX, + 'y': this.event.pageY ? this.event.pageY - window.pageYOffset : this.event.clientY + }; + this.rightClick = (this.event.which == 3) || (this.event.button == 2); + switch (this.type){ + case 'mouseover': this.relatedTarget = this.event.relatedTarget || this.event.fromElement; break; + case 'mouseout': this.relatedTarget = this.event.relatedTarget || this.event.toElement; + } + } + }, + + /* + Property: stop + cross browser method to stop an event + */ + + stop: function() { + this.stopPropagation(); + this.preventDefault(); + return this; + }, + + /* + Property: stopPropagation + cross browser method to stop the propagation of an event + */ + + stopPropagation: function(){ + if (this.event.stopPropagation) this.event.stopPropagation(); + else this.event.cancelBubble = true; + return this; + }, + + /* + Property: preventDefault + cross browser method to prevent the default action of the event + */ + + preventDefault: function(){ + if (this.event.preventDefault) this.event.preventDefault(); + else this.event.returnValue = false; + return this; + } + +}); + +Event.keys = { + 'enter': 13, + 'up': 38, + 'down': 40, + 'left': 37, + 'right': 39, + 'esc': 27, + 'space': 32, + 'backspace': 8, + 'delete': 46 +}; + +Function.extend({ + + /* + Property: bindWithEvent + automatically passes mootools Event Class. + + Arguments: + bind - optional, the object that the "this" of the function will refer to. + + Returns: + a function with the parameter bind as its "this" and as a pre-passed argument event or window.event, depending on the browser. + + Example: + >function myFunction(event){ + > alert(event.clientx) //returns the coordinates of the mouse.. + >}; + >myElement.onclick = myFunction.bindWithEvent(myElement); + */ + + bindWithEvent: function(bind, args){ + return this.create({'bind': bind, 'arguments': args, 'event': Event}); + } + +}); + + +/* +Script: Common.js + Contains common implementations for custom classes. In Mootools is implemented in and . + +Author: + Valerio Proietti, + +License: + MIT-style license. +*/ + +/* +Class: Chain + An "Utility" Class. Its methods can be implemented with into any . + Currently implemented in and . In for example, is used to execute a list of function, one after another, once the effect is completed. + The functions will not be fired all togheter, but one every completion, to create custom complex animations. + +Example: + (start code) + var myFx = new Fx.Style('element', 'opacity'); + + myFx.start(1,0).chain(function(){ + myFx.start(0,1); + }).chain(function(){ + myFx.start(1,0); + }).chain(function(){ + myFx.start(0,1); + }); + //the element will appear and disappear three times + (end) +*/ + +var Chain = new Class({ + + /* + Property: chain + adds a function to the Chain instance stack. + + Arguments: + fn - the function to append. + */ + + chain: function(fn){ + this.chains = this.chains || []; + this.chains.push(fn); + return this; + }, + + /* + Property: callChain + Executes the first function of the Chain instance stack, then removes it. The first function will then become the second. + */ + + callChain: function(){ + if (this.chains && this.chains.length) this.chains.splice(0, 1)[0].delay(10, this); + }, + + /* + Property: clearChain + Clears the stack of a Chain instance. + */ + + clearChain: function(){ + this.chains = []; + } + +}); + +/* +Class: Events + An "Utility" Class. Its methods can be implemented with into any . + In Class, for example, is used to give the possibility add any number of functions to the Effects events, like onComplete, onStart, onCancel + +Example: + (start code) + var myFx = new Fx.Style('element', 'opacity').addEvent('onComplete', function(){ + alert('the effect is completed'); + }).addEvent('onComplete', function(){ + alert('I told you the effect is completed'); + }); + + myFx.start(0,1); + //upon completion it will display the 2 alerts, in order. + (end) +*/ + +var Events = new Class({ + + /* + Property: addEvent + adds an event to the stack of events of the Class instance. + */ + + addEvent: function(type, fn){ + if (fn != Class.empty){ + this.events = this.events || {}; + this.events[type] = this.events[type] || []; + if (!this.events[type].test(fn)) this.events[type].push(fn); + } + return this; + }, + + /* + Property: fireEvent + fires all events of the specified type in the Class instance. + */ + + fireEvent: function(type, args, delay){ + if (this.events && this.events[type]){ + this.events[type].each(function(fn){ + fn.create({'bind': this, 'delay': delay, 'arguments': args})(); + }, this); + } + return this; + }, + + /* + Property: removeEvent + removes an event from the stack of events of the Class instance. + */ + + removeEvent: function(type, fn){ + if (this.events && this.events[type]) this.events[type].remove(fn); + return this; + } + +}); + +/* +Class: Options + An "Utility" Class. Its methods can be implemented with into any . + Used to automate the options settings, also adding Class when the option begins with on. +*/ + +var Options = new Class({ + + /* + Property: setOptions + sets this.options + + Arguments: + defaults - the default set of options + options - the user entered options. can be empty too. + + Note: + if your Class has implemented, every option beginning with on, followed by a capital letter (onComplete) becomes an Class instance event. + */ + + setOptions: function(defaults, options){ + this.options = Object.extend(defaults, options); + if (this.addEvent){ + for (var option in this.options){ + if (($type(this.options[option]) == 'function') && option.test('^on[A-Z]')) this.addEvent(option, this.options[option]); + } + } + return this; + } + +}); + +/* +Script: Dom.js + Css Query related function and extensions + +Author: + Valerio Proietti, + +License: + MIT-style license. +*/ + +/* Section: Utility Functions */ + +/* +Function: $E + Selects a single (i.e. the first found) Element based on the selector passed in and an optional filter element. + +Arguments: + selector - the css selector to match + filter - optional; a DOM element to limit the scope of the selector match; defaults to document. + +Example: + >$E('a', 'myElement') //find the first anchor tag inside the DOM element with id 'myElement' + +Returns: + a DOM element - the first element that matches the selector +*/ + +function $E(selector, filter){ + return ($(filter) || document).getElement(selector); +}; + +/* +Function: $ES + Returns a collection of Elements that match the selector passed in limited to the scope of the optional filter. + See Also: for an alternate syntax. + +Returns: + an array of dom elements that match the selector within the filter + +Arguments: + selector - css selector to match + filter - optional; a DOM element to limit the scope of the selector match; defaults to document. + +Examples: + >$ES("a") //gets all the anchor tags; synonymous with $$("a") + >$ES('a','myElement') //get all the anchor tags within $('myElement') +*/ + +function $ES(selector, filter){ + return ($(filter) || document).getElementsBySelector(selector); +}; + +/* +Class: Element + Custom class to allow all of its methods to be used with any DOM element via the dollar function <$>. +*/ + +Element.extend({ + + /* + Property: getElements + Gets all the elements within an element that match the given (single) selector. + + Arguments: + selector - the css selector to match + + Example: + >$('myElement').getElements('a'); // get all anchors within myElement + + Credits: + Say thanks to Christophe Beyls for the new regular expression that rules getElements, a big step forward in terms of speed. + */ + + getElements: function(selector){ + var filters = []; + selector.clean().split(' ').each(function(sel, i){ + var param = sel.match('^(\\w*|\\*)(?:#([\\w_-]+)|\\.([\\w_-]+))?(?:\\[["\']?(\\w+)["\']?(?:([\\*\\^\\$]?=)["\']?(\\w*)["\']?)?\\])?$'); + //PARAM ARRAY: 0 = full string: 1 = tag; 2 = id; 3 = class; 4 = attribute; 5 = operator; 6 = value; + if (!param) return; + param[1] = param[1] || '*'; + if (i == 0){ + if (param[2]){ + var el = this.getElementById(param[2]); + if (!el || ((param[1] != '*') && (Element.prototype.getTag.call(el) != param[1]))) return; + filters = [el]; + } else { + filters = $A(this.getElementsByTagName(param[1])); + } + } else { + filters = Elements.prototype.filterByTagName.call(filters, param[1]); + if (param[2]) filters = Elements.prototype.filterById.call(filters, param[2]); + } + if (param[3]) filters = Elements.prototype.filterByClassName.call(filters, param[3]); + if (param[4]) filters = Elements.prototype.filterByAttribute.call(filters, param[4], param[6], param[5]); + }, this); + return $$(filters); + }, + + /* + Property: getElementById + Targets an element with the specified id found inside the Element. Does not overwrite document.getElementById. + + Arguments: + id - the id of the element to find. + */ + + getElementById: function(id){ + var el = document.getElementById(id); + if (!el) return false; + for (var parent = el.parentNode; parent != this; parent = parent.parentNode){ + if (!parent) return false; + } + return el; + }, + + /* + Property: getElement + Same as , but returns only the first. Alternate syntax for <$E>, where filter is the Element. + */ + + getElement: function(selector){ + return this.getElementsBySelector(selector)[0]; + }, + + /* + Property: getElementsBySelector + Same as , but allows for comma separated selectors, as in css. Alternate syntax for <$$>, where filter is the Element. + + */ + + getElementsBySelector: function(selector){ + var els = []; + selector.split(',').each(function(sel){ + els.extend(this.getElements(sel)); + }, this); + return $$(els); + } + +}); + +document.extend = Object.extend; + +/* Section: document related functions */ + +document.extend({ + /* + Function: document.getElementsByClassName + Returns all the elements that match a specific class name. + Here for compatibility purposes. can also be written: document.getElements('.className'), or $$('.className') + */ + + getElementsByClassName: function(className){ + return document.getElements('.'+className); + }, + getElement: Element.prototype.getElement, + getElements: Element.prototype.getElements, + getElementsBySelector: Element.prototype.getElementsBySelector + +}); + +/* +Class: Elements + Methods for dom queries arrays, as <$$>. +*/ + +Elements.extend({ + + //internal methods + + filterById: function(id, tag){ + var found = []; + this.each(function(el){ + if (el.id == id) found.push(el); + }); + return found; + }, + + filterByClassName: function(className){ + var found = []; + this.each(function(el){ + if (Element.prototype.hasClass.call(el, className)) found.push(el); + }); + return found; + }, + + filterByTagName: function(tagName){ + var found = []; + this.each(function(el){ + found.extend(el.getElementsByTagName(tagName)); + }); + return found; + }, + + filterByAttribute: function(name, value, operator){ + var found = []; + this.each(function(el){ + var att = el.getAttribute(name); + if (!att) return found; + if (!operator) return found.push(el); + + switch (operator){ + case '*=': if (att.test(value)) found.push(el); break; + case '=': if (att == value) found.push(el); break; + case '^=': if (att.test('^'+value)) found.push(el); break; + case '$=': if (att.test(value+'$')) found.push(el); + } + return found; + }); + return found; + } + +}); + +/* +Script: Hash.js + Contains the class Hash. + +Author: + Christophe Beyls + +License: + MIT-style license. +*/ + +/* +Class: Hash + It wraps an object that it uses internally as a map. The user must use put(), get(), and remove() to add/change, retrieve and remove values, it must not access the internal object directly. With this implementation, null values are not allowed. + +Example: + (start code) + var hash = new Hash({a: 'hi', b: 'world', c: 'howdy'}); + hash.remove('b'); // b is removed. + hash.set('c', 'hello'); + hash.get('c'); // returns 'hello' + hash.length // returns 2 (a and b) + (end) +*/ + +var Hash = new Class({ + + length: 0, + + initialize: function(obj) { + this.obj = {}; + for (var property in obj) { + this.obj[property] = obj[property]; + this.length++; + } + }, + + get: function(key) { + return this.obj[key]; + }, + + set: function(key, value) { + if (value == null) return false; + if (this.obj[key] == undefined) this.length++; + this.obj[key] = value; + return this; + }, + + remove: function(key) { + if (this.obj[key] == undefined) return false; + var obj = {}; + this.length--; + for (var property in this.obj){ + if (property != key) obj[property] = this.obj[property]; + } + this.obj = obj; + return this; + }, + + each: function(fn, bind) { + for (var property in this.obj) fn.call(bind || this, property, this.obj[property]); + }, + + extend: function(obj){ + this.initialize(Object.extend(this.obj, obj)); + return this; + }, + + empty: function() { + return (this.length == 0); + }, + + keys: function() { + var keys = []; + for (var property in this.obj) keys.push(property); + return keys; + }, + + values: function() { + var values = []; + for (var property in this.obj) values.push(this.obj[property]); + return values; + } + +}); + +/* +Function: $H + Shortcut to create an Hash from an Object. +*/ + +function $H(obj) { + return new Hash(obj); +}; + +/* +Script: Color.js + Contains the Color class. + +Author: + Michael Jackson + +License: + MIT-style license. +*/ + +/* +Class: Color + Creates a new Color Object, which is an array with some color specific methods. + +Example: + (start code) + var black = new Color('#000'); + var purple = new Color([255,0,255]); + // mix black with white and purple, each time at 10% of the new color + var darkpurple = black.mix('#fff', purple, 10); + $('myDiv').setStyle('background-color', darkpurple); + (end) +*/ + +var Color = new Class({ + + initialize: function(color){ + if (color.mix && color.invert) return color; + var rgb = (color.push) ? color : color.hexToRgb(true); + return Object.extend(rgb, Color.prototype); + }, + + mix: function(){ + var colors = $A(arguments); + var alpha = 50; + if ($type(colors[colors.length-1]) == 'number') alpha = colors.pop(); + var rgb = this.copy(); + colors.each(function(color){ + color = new Color(color); + for (var i = 0; i < 3; i++) rgb[i] = Math.round((rgb[i] / 100 * (100 - alpha)) + (color[i] / 100 * alpha)); + }); + return new Color(rgb); + }, + + invert: function(){ + var rgb = []; + for (var i = 0; i < 3; i++) rgb.push(255 - this[i]); + return new Color(rgb); + } + +}); + +function $C(color){ + return new Color(color); +}; + +/* +Script: Window.Base.js + Contains Window.onDomReady and Window.disableImageCache + +License: + MIT-style license. +*/ + +/* +Class: Window + Cross browser methods to get the window size, onDomReady method. +*/ + +window.extend = Object.extend; + +window.extend({ + + /* + Function: window.disableImageCache + Disables background image chache for internex explorer, to prevent flickering. + To be called if you have effects with background images, and they flicker. + + Example: + Window.disableImageCache(); + */ + + disableImageCache: function(){ + if (this.ie6) try {document.execCommand("BackgroundImageCache", false, true);} catch (e){}; + }, + + addEvent: function(type, fn){ + if (type == 'domready'){ + if (this.loaded) fn(); + else if (!this.events || !this.events.domready){ + var domReady = function(){ + if (this.loaded) return; + this.loaded = true; + if (this.timer) this.timer = $clear(this.timer); + Element.prototype.fireEvent.call(this, 'domready'); + this.events.domready = null; + }.bind(this); + if (document.readyState && this.khtml){ //safari and konqueror + this.timer = function(){ + if (['loaded','complete'].test(document.readyState)) domReady(); + }.periodical(50); + } + else if (document.readyState && this.ie){ //ie + document.write(" + + + + +

My 1st demo

+ + +
+
+
+

Popup completion

+

+ popup stlye completion + popup stlye completion + popup stlye completion + popup stlye completion + popup stlye completion + popup stlye completion + popup stlye completion + popup stlye completion + popup stlye completion +

+ +
+
+

Emacs style completion

+

emacs stlye completion

+ + + +
+
+

Edit part

+

edit part

+ + + +
+
+ + diff --git a/emacs.d/nxhtml/nxhtml/html-chklnk.el b/emacs.d/nxhtml/nxhtml/html-chklnk.el new file mode 100644 index 0000000..6fdbb49 --- /dev/null +++ b/emacs.d/nxhtml/nxhtml/html-chklnk.el @@ -0,0 +1,168 @@ +;;; html-chklnk.el --- Check links in local HTML sites +;; +;; Author: Lennart Borgman (lennart O borgman A gmail O com) +;; Created: Wed Mar 15 14:46:17 2006 +(defconst html-chklnk:version "0.2") ;; Version: +;; Last-Updated: Tue Apr 10 04:12:32 2007 (7200 +0200) +;; Keywords: +;; Compatibility: +;; +;; Features that might be required by this library: +;; +;; None +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; Commentary: +;; +;; +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; 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., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; Code: + +(eval-when-compile (add-to-list 'load-path default-directory load-path)) +(eval-when-compile + (when (> emacs-major-version 22) + (let* ((load-path load-path) + (this-file (or load-file-name + (when (boundp 'bytecomp-filename) bytecomp-filename) + buffer-file-name)) + (this-dir (file-name-directory this-file))) + (add-to-list 'load-path (expand-file-name "../../lisp" this-dir)) + (require 'w32shell nil t)))) + + +(eval-when-compile (require 'html-site nil t)) +(require 'compile) + +;;;###autoload +(defgroup html-chklnk nil + "Customization group for html-chklnk." + :group 'nxhtml) + +(defcustom html-chklnk-dir + (file-name-as-directory + (expand-file-name + "html-chklnk" + (file-name-directory + (if load-file-name load-file-name buffer-file-name)))) + + "Directory where the tools needed are located. +" + :type 'directory + :group 'html-chklnk) + +(defun html-chklnk-check-site-links (start-file) + "Check local file web site links. +Currently only internal links are checked." + (interactive + (progn + (html-site-current-ensure-site-defined) + (if (y-or-n-p "Start from a given file and check links from there? ") + (let* ((default-start (if (html-site-current-contains buffer-file-name) + buffer-file-name + (car (directory-files (html-site-current-site-dir) + nil + "\\.html?$")))) + (start-file + (read-file-name "Start checking from file: " + (html-site-current-site-dir) + nil + nil + default-start))) + (unless (html-site-dir-contains (html-site-current-site-dir) start-file) + (error "File %s is not in the site %s" start-file html-site-current)) + (list start-file)) + (list nil)))) + (let* ((default-directory html-chklnk-dir) + (compile-cmd (concat "perl link_checker.pl " + "--site=" + ;;(html-chklnk-convert-file-name + (html-site-current-site-dir) + ;;) + (if start-file + (concat " --start=" + ;;(html-chklnk-convert-file-name + start-file + ;;) + ) + ""))) + (compilation-buffer-name-function + '(lambda (dummy) (concat "** Checking links in site " + html-site-current " **"))) + (compilation-scroll-output t) + (compilation-error-regexp-alist-alist + '( + (html-chklnk + "^\\(.*\\)\\s-+at line \\([0-9]+\\):" + 1 ;; file + 2 ;; line + ))) + (compilation-error-regexp-alist '(html-chklnk)) + ;;(shell-file-name "cmd") + ;;(explicit-shell-file-name "cmd") + ;;(shell (concat exec-directory "cmdproxy.exe")) + ;;(old-w32shell nil) + ) + ;; There are trouble with perl paths +;; (when (featurep 'w32shell) +;; (when w32shell-current-shell-path +;; (setq old-w32shell w32shell-current-shell-path) +;; (w32shell-set-shell "cmd"))) + ;;(message "uses-cygwin=%s" uses-cygwin)(sit-for 8) + + (if (fboundp 'w32shell-save-shell) + (w32shell-save-shell + "cmd" + (compile compile-cmd)) + (compile compile-cmd)) + +;; (when old-w32shell +;; (cond ((string= old-w32shell w32shell-cygwin-bin) +;; (w32shell-set-shell "cygwin")) +;; ((string= old-w32shell w32shell-msys-bin) +;; (w32shell-set-shell "msys")))) + )) + +(defun html-chklnk-convert-file-name (filename) + (let ((uses-cygwin (and (featurep 'w32shell) + (string= w32shell-current-shell-path + w32shell-cygwin-bin))) + (case-fold-search t) + ) + (save-match-data + (if (and uses-cygwin + (string-match "^\\([a-z]\\):" filename)) + (concat "/cygdrive/" (match-string 1 filename) + (substring filename 2)) + filename)))) + + + + +(provide 'html-chklnk) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; html-chklnk.el ends here diff --git a/emacs.d/nxhtml/nxhtml/html-chklnk/PerlLib/HTML/LinkWalker.pm b/emacs.d/nxhtml/nxhtml/html-chklnk/PerlLib/HTML/LinkWalker.pm new file mode 100644 index 0000000..14b0ccb --- /dev/null +++ b/emacs.d/nxhtml/nxhtml/html-chklnk/PerlLib/HTML/LinkWalker.pm @@ -0,0 +1,774 @@ +### File: LinkWalker.pm +### Author: Lennart Borgman +### All rights reserved + +########################################################## +### UserAgent module +########################################################## +package LWP::WalkerUA; +require LWP::UserAgent; +@ISA = qw(LWP::UserAgent); + +### Mirror to another file (why???) +sub mirror +{ + my($self, $url, $file, $mirr_tmp) = @_; + die "no mirr_tmp" unless defined $mirr_tmp; + + LWP::Debug::trace('()'); + my $request = new HTTP::Request('GET', $url); + + if (-e $file) { + my($mtime) = (stat($file))[9]; + if($mtime) { + $request->header('If-Modified-Since' => + HTTP::Date::time2str($mtime)); + } + } + my $tmpfile = "$file-$$"; + + my $response = $self->request($request, $tmpfile); + if ($response->is_success) { + + my $file_length = (stat($tmpfile))[7]; + my($content_length) = $response->header('Content-length'); + + if (defined $content_length and $file_length < $content_length) { + unlink($tmpfile); + die "Transfer truncated: " . + "only $file_length out of $content_length bytes received\n"; + } elsif (defined $content_length and $file_length > $content_length) { + unlink($tmpfile); + die "Content-length mismatch: " . + "expected $content_length bytes, got $file_length\n"; + } else { + # OK + if (-e $mirr_tmp) { + # Some dosish systems fail to rename if the target exists + chmod 0777, $mirr_tmp; + unlink $mirr_tmp; + } + rename($tmpfile, $mirr_tmp) or + die "Cannot rename '$tmpfile' to '$mirr_tmp': $!\n"; + + if (my $lm = $response->last_modified) { + # make sure the file has the same last modification time + utime $lm, $lm, $mirr_tmp; + } + } + } else { + unlink($tmpfile); + } + return $response; +} + + +########################################################## +### Parser module +########################################################## +package HTML::WalkerParser; +require HTML::ParserTagEnd; +@ISA = qw(HTML::ParserTagEnd); +use strict; +use vars qw(%LINK_ELEMENT); + +# Elements that might contain links and the name of the link attribute +%LINK_ELEMENT = +( + body => 'background', + base => 'href', + a => 'href', + img => [qw(src lowsrc usemap)], # 'lowsrc' is a Netscape invention + form => 'action', + input => 'src', +'link' => 'href', # need quoting since link is a perl builtin + frame => 'src', + applet => [qw(codebase code)], + area => 'href', + iframe => 'src', # Netscape 2.0 extention + embed => 'src', # used in Netscape 2.0 for Shockwave and things like that +); + +my %LINKATTRIBS = ( + "href" => 1, + "src" => 1, + "action" => 1, + "background" => 1, + "usemap" => 1, + "code" => 1, + "codebase" => 1, + "lowsrc" => 1, + ); +my %MAYBECONT = ( + a => 'href', + area => 'href', + form => 'action', + frame => 'src', + iframe => 'src', + ); + +sub maybecont($$) { + my $tag = shift; + my $att = shift; + return unless exists $MAYBECONT{$tag}; + return ($MAYBECONT{$tag} eq $att); +} + +sub new { + my($class, $parsed_fh) = @_; + my $self = $class->SUPER::new; + $self->{parsed_fh} = $parsed_fh; + $self; +} + + + + + + + +########################################################## +### Walker module +########################################################## +package HTML::LinkWalker; +use strict; + +use IO::File; +use File::Copy qw(); +use File::Path qw(); +use PathSubs qw(); +use HTML::Entities; +use FindBin qw(); + + +########################################################## +### Globals +########################################################## +my $ua; +my $m_ua_personality = "LinkWalker/0.9"; +my %m_is_outside; +my %m_is_container; +my $m_bOnlyCont; +my @m_sLinkRoots; +my $m_subReport; +my $m_subAction; +my $m_subMirrorAction; + + +############################# +### Collecting info +############################# +my %m_CheckedLinks; +my %m_MissedLinks; + +sub tell_bad_link($$$$$) { + my $what = shift; + my $file = shift; + my $lnum = shift; + my $link = shift; + my $line = shift; + $file = "START" unless defined $file; + $lnum = "(start)" unless defined $lnum; + my $longMsg = "<<$what>>"; + my $shortMsg = $what; + if (defined $link) { + my @lines = split("\\s+", $line); + my $disp_line = join("\n\t\t ", @lines); + $longMsg .= ",\n\t\tlink=$link\n\t\t$disp_line"; + } + my @msg = ($shortMsg, $longMsg); + $m_CheckedLinks{$file}->{ERR}->{$lnum} = \@msg; + &$m_subReport("\t* Error * " . $what . "\n"); +} # tell_bad_link + + +############################# +### Helpers +############################# + +sub get_contenttype($) { + my $response = shift; + my @rh = $response->header("Content-Type"); + for my $r (@rh) { + my $c = $r; + if ((my $iPos = index($r, ";")) > -1) { + $c = substr($r, 0, $iPos); + } + return $c; + } +} +sub is_linked_contenttype($) { + my $response = shift; + return (get_contenttype($response) eq "text/html"); +} + +sub ending_is_container($) { + my $link_addr = shift; + $link_addr =~ s!#.*$!!; + $link_addr =~ s!\?.*$!!; + return (($link_addr =~ m!\.s?html?$!i) ? 1 : 0); +} + +my $m_sMirrorRoot; +my $m_bMirror = 1; + +sub mk_mirror_name($) { + my $orig_name = shift; + $orig_name =~ tr!\\!/!; + my $mirr_name = $orig_name; + my ($orig_host) = ($orig_name =~ m!(^https?://[^/]*)!i); + if (defined $orig_host) { + my $host = $orig_host; + $host =~ tr!:!_!; + $host =~ tr!/!_!; + $mirr_name =~ s!^$orig_host!$host!; + if (substr($mirr_name, -1) eq "/") { $mirr_name .= "default.html"; } + } else { + die "Can't find host in $orig_name\n"; + } + my $mirr_full = sMirrorRoot() . $mirr_name; + if (!$m_bMirror) { + my $sExt = $mirr_name; $sExt =~ s!.*\.([^\.]*$)!$1!; + $mirr_full = sMirrorRoot() . "temp.$sExt"; + } + my $mirr_fold = $mirr_full; + $mirr_fold =~ s![^/]*$!!; + File::Path::mkpath($mirr_fold, 0, 0777); + return $mirr_full; +} + +############################# +### Checks +############################# +sub is_outside($) { + my $uq_link_addr = shift; + if (!exists $m_is_outside{$uq_link_addr}) { + $m_is_outside{$uq_link_addr} = test_is_outside($uq_link_addr, \@m_sLinkRoots); + } + return $m_is_outside{$uq_link_addr}; +} +sub set_is_container($$) { + my $uq_link_addr = shift; + return if exists $m_is_container{$uq_link_addr}; + $m_is_container{$uq_link_addr} = shift; +} +sub is_outside_container($) { + my $uq_link_addr = shift; + if (exists $m_is_container{$uq_link_addr}) { + if ($m_is_container{$uq_link_addr}) { + return is_outside($uq_link_addr); + } + } +} +sub test_is_outside($$) { + my $uq_link_addr = shift; + my $link_roots = shift; + if (defined $link_roots) { + my $in_roots; + for my $link_root (@$link_roots) { + if (substr($uq_link_addr, 0, length($link_root)) eq $link_root) { + return 0; + } + } + return 1; + } +} # is_outside + + + +########################################################## +### Parsing +########################################################## + + +### Parser subs +sub HTML::WalkerParser::declaration { + my($self, $decl) = @_; + return unless defined $self->{parsed_fh}; + my $fh = $self->{parsed_fh}; + print $fh ""; +} +my $m_start_cb; +sub HTML::WalkerParser::start { + my($self, $tag, $attr, $ended) = @_; + &$m_start_cb($tag, $attr); + return unless defined $self->{parsed_fh}; + my $t = "<$tag"; + for my $k (keys %$attr) { + my $encoded = encode_entities($$attr{$k}); + $t .= qq( $k="$encoded"); + } + if ($ended) { + $t .= " />"; + } else { + $t .= ">"; + } + my $fh = $self->{parsed_fh}; + print $fh $t; +} +sub HTML::WalkerParser::end { + my ($self, $tag) = @_; + return unless defined $self->{parsed_fh}; + my $fh = $self->{parsed_fh}; + print $fh ""; +} +sub HTML::WalkerParser::text { + my ($self, $txt) = @_; + return unless defined $self->{parsed_fh}; + my $fh = $self->{parsed_fh}; + print $fh $txt; +} +sub HTML::WalkerParser::comment { + my($self, $comment) = @_; + return unless defined $self->{parsed_fh}; + my $fh = $self->{parsed_fh}; + print $fh ""; +} + + + + +### Main parsing routine + +sub parse_file($$$$$$$$$) { + my ($file_name, $parsed_fh, $uq_link_addr, $link_roots, + $ref_links, $ref_anchs, $ref_lines, $ref_tagname, $ref_attname) = @_; + my $fh; + if (-d $file_name) { + $file_name = PathSubs::uniq_dir($file_name) . "default.html"; + $uq_link_addr .= "/" unless substr($uq_link_addr, -1) eq "/"; + $uq_link_addr .= "default.html"; + &$m_subReport("dir => $file_name\n"); + } + $fh = new IO::File($file_name); + die "Can't read $file_name: $!\n" unless defined $fh; + my $base_href; + my $n; + my $line; + my $uq_link_fold = $uq_link_addr; $uq_link_fold =~ s![^/]*$!!; + + my $start_cb = + sub { + my ($tag, $attr_hash) = @_; + for my $k (keys %$attr_hash) { + if (($k eq "id") || ($k eq "name")) { + my $v = $$attr_hash{$k}; + $$ref_anchs{$v} = $n; + $$ref_lines{$n} = $line; + } elsif (exists $LINKATTRIBS{$k}) { + my $v = $$attr_hash{$k}; + next if $v =~ m!^javascript:!; + next if $v =~ m!^ftp://!; + next if $v =~ m!^mailto://!; + if ($tag eq "base") { $base_href = $v if $k eq "href"; next; } + my $v_abs; my $v_rel; + my $v_is_abs = PathSubs::is_abs_path($v); + if ($v_is_abs) { + $v_abs = $v; + $v_rel = PathSubs::mk_relative_link($uq_link_addr, $v_abs); + } else { + $v_rel = $v; + if (defined $base_href) { + $v_abs = PathSubs::mk_abs_link($base_href, $v); + } else { + if (substr($v_rel, 0, 1) ne "#") { + $v_abs = $uq_link_fold . $v_rel; + } else { + $v_abs = $uq_link_addr . $v_rel; + } + $v_abs = PathSubs::resolve_dotdot($v_abs); + } + } + next if exists $m_CheckedLinks{$v_abs}; + if (is_outside($v_abs)) { + if (!$v_is_abs) { + if (ending_is_container($v_abs)) { + $m_CheckedLinks{$v_abs} = {}; + tell_bad_link("Outside relative link ($v_rel)", + $uq_link_addr, $n, $v, $line); + } + } + ### Skip outside absolute links + ### Could be things like banners etc... + next; + } + $$ref_links{$v_rel} = $n; + $$ref_lines{$n} = $line; + if (substr($v_rel, 0, 1) ne "#") { + my $v_rel_name = $v_rel; + $v_rel_name =~ s!#.*$!!; + $v_rel_name =~ s!\?.*$!!; + $$ref_tagname{$v_rel_name} = $tag; + $$ref_attname{$v_rel_name} = $k; + } + if ($v_is_abs && ($v_rel ne $v)) { $$attr_hash{$k} = $v_rel; } + } + } + }; # $start_cb + + $m_start_cb = $start_cb; + my $p = HTML::WalkerParser->new($parsed_fh); + while ($line = <$fh>) { + $n++; + $p->parse($line); + } + $fh->close(); +} # parse_file + + + +########################################################## +### Do the walk... +########################################################## +sub walk_link($$;$$$$) { + die "$#_" unless ($#_ == 1 || $#_ == 5); + my $link_fold = shift; + my $link_file = shift; + my $parent_url = shift; + my $parent_lnum = shift; + my $parent_link = shift; + my $parent_line = shift; + + my $link_addr = $link_fold . $link_file; + my $uq_link_addr; + my $is_file = ($link_addr !~ m!^https?://!i); + if ($is_file) { + $uq_link_addr = PathSubs::uniq_file($link_addr); + } else { + $uq_link_addr = PathSubs::resolve_dotdot($link_addr); + } + return if exists $m_CheckedLinks{$uq_link_addr}; + return if exists $m_MissedLinks{$uq_link_addr}; + $m_CheckedLinks{$uq_link_addr} = {}; + my $link_is_container = ending_is_container($uq_link_addr); + if ($link_is_container) { + set_is_container($uq_link_addr, 1); + return if is_outside($uq_link_addr); + } else { + return if $m_bOnlyCont; + } + my $response; + my $contenttype; + my $bDoRewrite; + my $file_name; + if ($is_file) { + if (!-r $uq_link_addr) { + tell_bad_link("Can't read file ($uq_link_addr)", + $parent_url, $parent_lnum, $parent_link, $parent_line); + $m_MissedLinks{$uq_link_addr} = 1; + return; + } + $file_name = $uq_link_addr; + } else { + $file_name = mk_mirror_name($uq_link_addr); + if (!defined $ua) { + $ua = new LWP::UserAgent; + $ua->agent($m_ua_personality); + #$ua->delay(0.1); + } + if ($m_bMirror) { + $response = $ua->mirror($uq_link_addr, $file_name); + &$m_subMirrorAction($uq_link_addr, $file_name, $response); + } else { + my $request = new HTTP::Request('GET', $uq_link_addr); + $response = $ua->request($request, $file_name); + } + #dump_response($response); exit; + if ($response->code != 304) { + if (!$response->is_success) { + tell_bad_link($response->status_line . " ($uq_link_addr)", + $parent_url, $parent_lnum, $parent_link, $parent_line); + $m_MissedLinks{$uq_link_addr} = 1; + return; + } + $bDoRewrite = $m_bMirror; + $contenttype = get_contenttype($response); + $link_is_container = is_linked_contenttype($response); + } + if ($uq_link_addr ne $response->base) { + if ($m_bMirror) { + my $base_file = mk_mirror_name($response->base); + if (!File::Copy::copy($file_name, $base_file)) { + die "Can't copy($file_name, $base_file): $!\n"; + } + if (my $lm = $response->last_modified) { utime $lm, $lm, $base_file; } + $file_name = $base_file; + } + $uq_link_addr = $response->base; + } + } + ### Test again, could be new info from net! + if ($link_is_container) { + set_is_container($uq_link_addr, 1); + return if is_outside($uq_link_addr); + } else { + return if $m_bOnlyCont; + return; + } + &$m_subReport("$uq_link_addr ..."); + + my %links; + my %anchs; + my %lines; + my %tagname; + my %attname; + my $parsed_fh; + my $parsed_file; + my $file_to_parse = $file_name; + if ($bDoRewrite) { + $parsed_file = $file_to_parse . "-p$$"; + &$m_subReport(" < $parsed_file"); + die "Can't create $parsed_file: $!\n" unless defined $parsed_fh; + print $parsed_fh "\n"; + } + &$m_subReport("\n"); + parse_file($file_to_parse, $parsed_fh, $uq_link_addr, + \@m_sLinkRoots, + \%links, \%anchs, \%lines, \%tagname, \%attname); + if (defined $parsed_fh) { + $parsed_fh->close(); + if (-e $file_name) { unlink $file_name or die "Can't unlink $file_name: $!"; } + rename($parsed_file, $file_name) or die "Can't rename($parsed_file, $file_name): $!\n"; + if (my $lm = $response->last_modified) { utime $lm, $lm, $file_name; } + } + ### Now we know... + if ($link_is_container) { return if is_outside($uq_link_addr); } + + $m_CheckedLinks{$uq_link_addr}->{ANC} = \%anchs; + my $file_dir; + if ($is_file) { + $file_dir = $uq_link_addr; + $file_dir =~ s![^/]*$!!; + #chdir $file_dir; + } + my $container_folder = $uq_link_addr; $container_folder =~ s![^/]*$!!; + &$m_subAction($uq_link_addr, $file_name, $contenttype); + for my $link (sort keys %links) { + # Next line is for onclick lines in prepared docs + next if ($link eq "#"); + my $lnum = $links{$link}; + my $line = $lines{$lnum}; + if ($link eq "") { + tell_bad_link("Empty link", $uq_link_addr, $lnum, $link, $line); + next; + } + if ($link =~ m!(.*)\?!) { $link = $1; } + my $anchor; + if ($link =~ m!(.*)#(.*)!) { $link = $1; $anchor = $2; } + if ($link eq "") { + if (!exists $anchs{$anchor}) { + tell_bad_link("Anchor not found ($anchor)", $uq_link_addr, $lnum, $link, $line); + } + next; + } + my $sub_fold; + my $sub_file; + my $uq_sublink; + if ($link =~ m!^https?://!i) { + $sub_fold = ""; + $sub_file = $link; + $uq_sublink = $link; + } else { + $sub_file = $link; + if ($is_file) { + $sub_fold = $file_dir; + $uq_sublink = PathSubs::uniq_file($sub_fold . $sub_file); + } else { + $sub_fold = $container_folder; + $uq_sublink = $sub_fold . $sub_file; + } + } + next if (exists $m_CheckedLinks{$uq_sublink}); + if (defined $anchor) { + $m_CheckedLinks{$uq_link_addr}->{EXTANC}->{$uq_sublink} = + { ANC=> $anchor, LINE=>$line, LNUM=>$lnum}; + } + if ($m_bOnlyCont) { + die "link=$link\tattr=$tagname{$link}\n" unless exists $tagname{$link}; + next unless maybecont($tagname{$link}, $attname{$link}); + } + if (is_outside($uq_link_addr)) { + if (maybecont($tagname{$link}, $attname{$link}) ) { + next; + } + } + walk_link($sub_fold, $sub_file, $uq_link_addr, $lnum, $link, $line); + } +} # walk_link + + + + +############################################ +### Some more checks! +############################################ +sub check_external_anchors() { + &$m_subReport("\nChecking external anchors...\n"); + for my $f (sort keys %m_CheckedLinks) { + my $fnode = $m_CheckedLinks{$f}; + if (exists ${$fnode}{"EXTANC"}) { + my $extanc_hash = ${$fnode}{"EXTANC"}; + for my $fx (keys %$extanc_hash) { + next unless (exists $m_CheckedLinks{$fx}); + my $ea_hash = ${$extanc_hash}{$fx}; + my $ea = ${$ea_hash}{ANC}; + my $fxnode = $m_CheckedLinks{$fx}; + my $fx_anc_hash = ${$fxnode}{"ANC"}; + if (!exists ${$fx_anc_hash}{$ea}) { + my $line = ${$ea_hash}{LINE}; + my $lnum = ${$ea_hash}{LNUM}; + &$m_subReport("From $f\n"); + tell_bad_link("Ext anchor not found ($fx#$ea)", + $f, $lnum, "$fx#$ea", $line); + } + } + } + } +} # check_external_anchors + + + +############################# +### Reporting +############################# +sub report_errors($$) { + my $bSum = shift; + my $bDet = shift; + my $errors_reported; + my $errors_found; + for my $f (sort keys %m_CheckedLinks) { + my $fnode = $m_CheckedLinks{$f}; + if (exists ${$fnode}{ERR}) { + $errors_found = 1; + last unless $bSum; + if (!defined $errors_reported) { + $errors_reported = 1; + &$m_subReport("\n\n*********** Summary ERRORS and WARNINGS **********\n"); + } + &$m_subReport("$f\n"); + my $err_hash = ${$fnode}{ERR}; + for my $e (sort keys %$err_hash) { + my $refE = ${$err_hash}{$e}; + &$m_subReport("\t" . ${$refE}[0] . "\n"); + } + } + } + undef $errors_reported; + if ($bDet) { + for my $f (sort keys %m_CheckedLinks) { + my $fnode = $m_CheckedLinks{$f}; + if (exists ${$fnode}{ERR}) { + if (!defined $errors_reported) { + $errors_reported = 1; + &$m_subReport("\n\n*********** Detailed ERRORS and WARNINGS **********\n"); + } + &$m_subReport("$f\n"); + my $err_hash = ${$fnode}{ERR}; + for my $e (sort keys %$err_hash) { + my $refE = ${$err_hash}{$e}; + &$m_subReport("\tat line $e: " . ${$refE}[1] . "\n"); + } + } + } + } + if ($errors_found) { + die "\n*** There where errors ***\n"; + } else { + &$m_subReport("No errors found\n"); + } +} # report_errors + +sub dump_response($) { + my $response = shift; + &$m_subReport( $response->code . " " . $response->message . "\n"); + &$m_subReport( "****************************************\n"); + #&$m_subReport( $response->request . "\n"); + #&$m_subReport( "****************************************\n"); + #&$m_subReport( $response->previous . "\n"); + #&$m_subReport( "****************************************\n"); + &$m_subReport( " i=" . $response->is_info . + ", s=" . $response->is_success . + ", r=" . $response->is_redirect . + ", e=" . $response->is_error . "\n"); + &$m_subReport( "****************************************\n"); + &$m_subReport( "content: " . $response->content . "\n"); + &$m_subReport( "****************************************\n"); + &$m_subReport( "base: " . $response->base . "\n"); + &$m_subReport( "****************************************\n"); + &$m_subReport( $response->as_string); + &$m_subReport( "****************************************\n"); + &$m_subReport( $response->current_age . "\n"); + &$m_subReport( "****************************************\n"); + my @rh = $response->header("Content-Type"); + for my $r (@rh) { &$m_subReport( "ct: $r\n"); } + &$m_subReport( "****************************************\n"); +} # dump_response + + +############################# +### Parameters +############################# +sub sMirrorRoot() { + my $val = shift; + $m_sMirrorRoot = PathSubs::get_temp_path() . "LinkWalker/" unless defined $m_sMirrorRoot; + my $old = $m_sMirrorRoot; + $m_sMirrorRoot = PathSubs::uniq_dir($val) if defined $val; + return $old; +} +sub bMirror(;$) { + my $val = shift; + my $old = $m_bMirror; + $m_bMirror = $val if defined $val; + $old; +} + +sub subReporter(;$) { + my $val = shift; + my $old = $m_subReport; + $m_subReport = $val if defined $val; + $old +} +sub subAction(;$) { + my $val = shift; + my $old = $m_subAction; + $m_subAction = $val if defined $val; + $old +} +sub bOnlyCont(;$) { + my $val = shift; + my $old = $m_bOnlyCont; + $m_bOnlyCont = $val if defined $val; + $old +} +sub ua_personality(;$) { + my $val = shift; + my $old = $m_ua_personality; + $m_ua_personality = $val if defined $val; + $old +} + +sub clear_roots() { @m_sLinkRoots = (); } +sub get_roots() { return \@m_sLinkRoots; } +sub add_root($) { push @m_sLinkRoots, shift; } +sub add_files_root($) { + my $file = shift; + my $default_root; + my ($host) = ($file =~ m!(^https?://[^/]*)!i); + if (defined $host) { + $default_root = $file; + } else { + die "Can't find $file\n" unless -e $file; + $default_root = PathSubs::uniq_file($file); + } + $default_root =~ s![^/]*$!!; + add_root($default_root); +} + +### Default actions +sub default_sub {} +$m_subReport = \&default_sub; +$m_subAction = \&default_sub; +$m_subMirrorAction = \&default_sub; + +1; diff --git a/emacs.d/nxhtml/nxhtml/html-chklnk/PerlLib/HTML/ParserTagEnd.pm b/emacs.d/nxhtml/nxhtml/html-chklnk/PerlLib/HTML/ParserTagEnd.pm new file mode 100644 index 0000000..32407d6 --- /dev/null +++ b/emacs.d/nxhtml/nxhtml/html-chklnk/PerlLib/HTML/ParserTagEnd.pm @@ -0,0 +1,448 @@ +package HTML::ParserTagEnd; + +# Author address: +### Modified for , Lennart + +use strict; +use HTML::Entities (); + +use vars qw($VERSION); +$VERSION = "2.23"; # $Date: 1999/06/09 10:27:16 $ + + +sub new +{ + my $class = shift; + my $self = bless { '_buf' => '', + '_strict_comment' => 0, + }, $class; + $self; +} + + +# A little note about the observed Netscape behaviour: +# +# It parse in the depreceated 'literal' mode, i.e. no tags are +# recognized until a is found. +# +# is parsed like
, i.e. tags are recognized.  +# are presentend in smaller font than 
+#
+# Netscape does not parse this comment correctly (it terminates the comment
+# too early):
+#
+#     more comment -->
+#
+# Netscape ignores '' within the 
+    
+    
+  
+  
+
+
+    
+      
+        
+
+      
+    
+ + + + + + + + +
+ + + + + +
+ + + + + + + +
%%TOC%%
+
+   +
+
+
+ + diff --git a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/html-toc-template.css b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/html-toc-template.css new file mode 100644 index 0000000..a6ffabb --- /dev/null +++ b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/html-toc-template.css @@ -0,0 +1,141 @@ +/* Main structures >>>>>>>>>>>>>>> */ +.html-wtoc-maintop { + font-size: 1px; + font-size: 1em; + margin-top: 0em; + margin-bottom: 0em; +/* background-color:green; */ +} +.html-wtoc-main { +} + +td.html-wtoc-vdivline { + //background-color: #8be; + width: 0px; +} + +.html-wtoc-search-form { + margin-bottom: 0.1em; +} +.html-wtoc-search { + font-size: 0.8em; + color: green; +} +.html-wtoc-search a { + color: green; +} +/* <<<<<<<<<<<<<<<<<<< */ + + + + +/* Table of content >>>>>>>>>>>>>> */ + +#html-wtoc-id-hidetoc { + height: 20px; + border-bottom: 2px inset #ddf; + border-color: #dff; +} + +#html-wtoc-id-tocdiv { + width: 2.5em; + //background-color: #eff; +} +#html-wtoc-id-logo { + width: 100%; + height: 120px; + padding: 0em; + margin: 0em; + border: 0em; +} +#html-wtoc-id-toc { +} +#html-wtoc-id-tocwidth { + width: 18em; + height: 0em; + padding: 0em; + margin: 0em; + border: 0em; + line-height: 0em; +/* background-color: red; */ +} +#html-wtoc-id-toccol { + width: 18em; +} + +.html-wtoc-contcol { + background-color: #dFEfff; + background-color: #dFEfff; + background-color: #cd950c; + background-color: #eead0e; +} +/* <<<<<<<<<<<<<<<<<<< */ + + + + +/* Buttons etc >>>>>>>>>>>>>>> */ +.html-wtoc-button { + font-size: 0.75em; + font-size: 8pt; + color: #5A5D00; + background-color: #9cf; + background-color: #bcee68; + background-color: #a2cd5a; + padding: 0.2em; + Border-Width: 2px; + Border-Style: outset; + text-align: center; + border-color: #ddf; +} +a.html-wtoc-button { + text-decoration: none; + color: #5A5D00; +} +a.html-wtoc-button:hover { + text-decoration:none; + background-color: #6af; + color:#340; +} + +a.html-wtoc-buttonimg img { + width: 16px; + height: 16px; + padding: 4px; + border: 8px; +} +a.html-wtoc-buttonimg { + border:2px; + margin:2px; + margin-left:2px; + margin-right:2px; +} +a.html-wtoc-buttonimg { + font-size:1px; +} +a.html-wtoc-buttonimg:hover { + margin: 6px; + margin-left:0px; + margin-right:0px; + border-color: #ddf; + border-width: 2px; + border-style: outset; + background-color: #595C00; + background-color: #bef; + background-color: #b9ffb9; +} + +/* <<<<<<<<<<<<<<<<<<< */ + + +#nxhtml-link { + font-size: 0.7em; + text-align: center; + padding-top: 2em; + padding: 1em; +} + +.copyright { + color : #872; +} + diff --git a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/html-toc.css b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/html-toc.css new file mode 100644 index 0000000..a12cb65 --- /dev/null +++ b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/html-toc.css @@ -0,0 +1,84 @@ +body { + margin: 0; +} +td { + font-size: 1em; +} + +/* Added by html-wtoc.pl >>>>>>>>>>>>> */ +.html-wtoc-mark { +/* background-color: #9cf; */ +/* background-color: #bcee68; */ +/* background-color: #a2cd5a; */ + width: 20px; + padding: 0; + border: 0; + text-align: center; +} +.html-wtoc-contline { + width: 100%; +} + +.html-wtoc-margin { + width: 0.6em; +} +.html-wtoc-contents { + font-size: 0.9em; + padding: 1em; + background-color: #9cf; + background-color: #a2cd5a; + background-color: #efffcf; + background-color: #ffffdf; + -moz-border-radius-topleft: 2em; +} +.html-wtoc-contents td { +/* background-color: #9cf; */ +/* background-color: #bcee68; */ +/* background-color: #a2cd5a; */ +} +.html-wtoc-contents-a { + text-decoration: none; + color: #595C00; +/* background-color: #9cf; */ +/* background-color: #bcee68; */ +/* background-color: #a2cd5a; */ + border: 1px #9cf solid; + border: 1px #a2cd5a solid; + border: 1px #ffffc0 solid; + padding-left: 0.25em; + padding-right: 0; + margin: 1px; + display: block; +} +.html-wtoc-contents a:hover { + text-decoration: none; + background-color: #b9ffb9; + border: 1px #6b8e23 solid; +} +.html-wtoc-currcont { + background-color: #738600; + color: #ffff2f; + background-color: #535600; + border: 1px #6b8e23 inset; + padding-left: 0.25em; + padding-right: 0; + margin: 1px; + display: block; +} +a.html-wtoc-currcont { + text-decoration: none; +} +a.html-wtoc-currcont:hover { + background-color: #738600; + background-color: #536600; + background-color: #434620; +} +/* <<<<<<<<<<<<<<<<<<< */ + + + + + + + + diff --git a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/html-toc.js b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/html-toc.js new file mode 100644 index 0000000..7f22db7 --- /dev/null +++ b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/html-toc.js @@ -0,0 +1,361 @@ + +// Copyright 2006 Lennart Borgman, http://www.OurComments.org/. All rights reserved. +// +// 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 3, 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. + + +var HTML_WTOC_NS_sCurrTocId; + + +HTML_WTOC_NS = { + + ///////////////////////////// + //// Basic event functions + ///////////////////////////// + + getEventObject : function (ev) { + var o; + if (window.event) + o = window.event.srcElement; + else if (null != ev) + o = ( ev.target ); + return o; + }, + getEvent : function (ev) { + if (window.event) { + return window.event; + } else if (null != ev) { + return ev; + } + }, + + eventStopPropagation : function (e) { + if (e.stopPropagation) + e.stopPropagation(); + else + e.cancelBubble=true; + }, + + eventPreventDefault : function (e) { + if (e.preventDefault) + e.preventDefault(); + else + e.returnValue=false; + }, + + ///////////////////////////// + //// TOC hide + ///////////////////////////// + + show_content : function (on) { + var toc = document.getElementById("html-wtoc-id-toccol").style; + var tdv = document.getElementById("html-wtoc-id-tocdiv").style; + var shw = document.getElementById("html-wtoc-id-showtoc").style; + var hid = document.getElementById("html-wtoc-id-hidetoc").style; + if (on) { + toc.display = ""; + tdv.display = ""; + shw.display = "none"; + hid.display = ""; + HTML_WTOC_NS.focus_page_link(0); + } else { + toc.display = "none"; + tdv.display = "none"; + shw.display = ""; + hid.display = "none"; + } + }, + + + + + + ///////////////////////////// + //// Open-Close + ///////////////////////////// + onblur_action : function(ev) { + HTML_WTOC_NS_sCurrTocId = null; + }, + onfocus_action : function(ev) { + var o = HTML_WTOC_NS.getEventObject(ev); + if (!o) return; + + HTML_WTOC_NS_sCurrTocId = o.id; + }, + onclick_action : function(ev) { + var o = HTML_WTOC_NS.getEventObject(ev); + var e = HTML_WTOC_NS.getEvent(ev); + if (13 == e.keyCode) return true; + if (!o) return true; + if ("IMG" == o.tagName) o = o.parentNode; + var iId = HTML_WTOC_NS.getIdnumFromId(o.id); + var sChildId = "toc_child_"+iId; + var sOldCurrTocId = HTML_WTOC_NS_sCurrTocId; + HTML_WTOC_NS.toggle_open(sChildId, o); + HTML_WTOC_NS_sCurrTocId = sOldCurrTocId; + return false; + }, + + toggle_open : function (id, parent) { + var child = document.getElementById(id).style; + var sInner = parent.innerHTML; + var re = new RegExp("[^/]*\.gif", "i"); + if ("none" == child.display) { + child.display = ""; + parent.innerHTML = sInner.replace(re, "down.gif")+""; + } else { + child.display = "none"; + parent.innerHTML = sInner.replace(re, "right.gif")+""; + } + }, + + + + ///////////////////////////// + //// Load + ///////////////////////////// + + onload_actions : function (iPageNum) { + document.body.onkeydown = HTML_WTOC_NS.onkeydown_action; + document.body.onmouseover = HTML_WTOC_NS.onmouseover_action; + var aATags = document.getElementsByTagName("a"); + for(var i = 0; i < aATags.length; i++) { + var o = aATags[i]; + if (null != HTML_WTOC_NS.getIdnumFromId(o.id)) { + o.onfocus = HTML_WTOC_NS.onfocus_action; + o.onblur = HTML_WTOC_NS.onblur_action; + if (o.id.substr(0, 12) == "opener_text_") { + o.onclick = HTML_WTOC_NS.onclick_action; + o.title = "Open/Close"; + } else if (o.id.substr(0, 7) == "opener_") { + o.onclick = HTML_WTOC_NS.onclick_action; + o.className = "html-wtoc-mark"; + o.title = "Open/Close"; + } + } + } + HTML_WTOC_NS.focus_page_link(iPageNum); + }, + focus_page_link : function (iPageNum) { + // Element might be hidden + try { + document.getElementById("toc_link_"+iPageNum).focus(); + } catch (exc) { + } + }, + + + + + + + + ///////////////////// + //// Mouse + ///////////////////// + + onmouseover_action : function (ev) { + if (null == HTML_WTOC_NS_sCurrTocId) return true; + var o = HTML_WTOC_NS.getEventObject(ev); + var iId = HTML_WTOC_NS.getIdnumFromId(o.id); + if (null == iId) return true; + o.focus(); + }, + + + + ///////////////////// + //// Key + ///////////////////// + + onkeydown_action: function (ev) { + var keyDown = 40; + var keyUp = 38; + var keyLeft = 37; + var keyRight = 39; + var keyReturn = 13; + var keyF2 = 113; + var keyInsert = 45; + // Opera + var keyOperaDown = 57386; + var keyOperaUp = 57385; + var keyOperaLeft = 57387; + var keyOperaRight = 57388; + var keyOperaF2 = 57346; + var keyOperaInsert = 57394; + + var SwitchKey = keyInsert; + var SwitchKeyOpera = keyOperaInsert; + + var bUp; + var e = HTML_WTOC_NS.getEvent(ev); + if (null == HTML_WTOC_NS_sCurrTocId) { + switch (e.keyCode) { + case SwitchKey: + case SwitchKeyOpera: + HTML_WTOC_NS.focus_page_link(0); + HTML_WTOC_NS.eventStopPropagation(e); + HTML_WTOC_NS.eventPreventDefault(e); + return false; + } + return true; + } + switch (e.keyCode) { + case keyLeft: + case keyOperaLeft: + case keyRight: + case keyOperaRight: + HTML_WTOC_NS.handle_leftright_keys(e); + HTML_WTOC_NS.eventStopPropagation(e); + HTML_WTOC_NS.eventPreventDefault(e); + return false; + case keyDown: + case keyOperaDown: + bUp = false; + break; + case keyUp: + case keyOperaUp: + bUp = true; + break; + case SwitchKey: + case SwitchKeyOpera: + if (null != HTML_WTOC_NS_sCurrTocId) { + var o = document.getElementById(HTML_WTOC_NS_sCurrTocId); + if (o) o.blur(); + HTML_WTOC_NS_sCurrTocId = null; + } + HTML_WTOC_NS.eventStopPropagation(e); + HTML_WTOC_NS.eventPreventDefault(e); + return false; + default: + //alert(e.keyCode); + return true; + } + var oOpener; + oOpener = HTML_WTOC_NS.getNextVisOpener(HTML_WTOC_NS_sCurrTocId, bUp); + oOpener.focus(); + HTML_WTOC_NS.eventStopPropagation(e); + HTML_WTOC_NS.eventPreventDefault(e); + return false; + }, + + handle_leftright_keys: function (e) { + var keyLeft = 37; + var keyRight = 39; + var keyOperaLeft = 57387; + var keyOperaRight = 57388; + var iId = HTML_WTOC_NS.getIdnumFromId(HTML_WTOC_NS_sCurrTocId); + if (null == iId) return; + var sId = "opener_" + iId; + var oOpener = document.getElementById(sId); + var sId = HTML_WTOC_NS_sCurrTocId; // It will be cleared before getNextVis + + var bOpenAction; + var bOpened; + var bUp; + var oChild = document.getElementById("toc_child_"+iId); + if (null == oChild) { + } else { + bOpened = (oChild.style.display != "none"); + } + switch (e.keyCode) { + case keyLeft: + case keyOperaLeft: + bUp = true; + bOpenAction = (null != bOpened) && (bOpened); + break; + case keyRight: + case keyOperaRight: + bUp = false; + bOpenAction = (null != bOpened) && (!bOpened); + break; + default: + alert("bad key handling..."); + } + if (bOpenAction) { + oOpener.click(); + HTML_WTOC_NS_sCurrTocId = sId; + } else { + var oPrev = HTML_WTOC_NS.getNextVisOpener(sId, bUp); + oPrev.focus(); + } + }, + + + + + + + ////////////////////// + //// Util + ////////////////////// + getNameFromId: function (sId) { + var re = new RegExp("(.*?_)(\\d+)", "i"); + if (!re.test(sId)) return null; + var iId = sId.replace(re, "$1"); + return iId; + }, + getIdnumFromId: function (sId) { + var re = new RegExp("(.*?_)(\\d+)", "i"); + if (!re.test(sId)) return null; + var iId = sId.replace(re, "$2"); + return iId; + }, + + + getNextVisOpener: function (sId, bUp, bTrace) { + if (bTrace) alert("getNextVisOpener("+sId+","+bUp+")"); + var iId = HTML_WTOC_NS.getIdnumFromId(sId); + if (null == iId) { + alert("getNextVisOpener err iId==null"); + return; + } + var sIdName = HTML_WTOC_NS.getNameFromId(sId); + if (null == sIdName) { + alert("getNextVisOpener err sIdName==null"); + return; + } + var oOpener; + var iLoop = -2; + while (oOpener == null) { + if (bTrace) alert(iId); + if (iLoop++ > iMaxChildNum) { alert("Child num error"); return; } + if (!bUp) { + iId++; + } else { + iId--; + } + if (iId > iMaxChildNum) { iId = 0; } + if (iId < 0) { iId = iMaxChildNum; } + var s = sIdName+iId; + oOpener = document.getElementById(s); + if (oOpener != null) { + if (bTrace) alert(oOpener.offsetLeft); + if (oOpener.style.display == "none") { // All + oOpener = null; + } else if (oOpener.offsetLeft < 0) { // IE + oOpener = null; + } else if (0 == oOpener.scrollWidth) { // Opera + oOpener = null; + } + } + } + return oOpener; + } + + + +}; //HTML_WTOC_NS diff --git a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/blank12.gif b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/blank12.gif new file mode 100644 index 0000000..0869f9f Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/blank12.gif differ diff --git a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/down.gif b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/down.gif new file mode 100644 index 0000000..30d6ecf Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/down.gif differ diff --git a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/freeCont.gif b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/freeCont.gif new file mode 100644 index 0000000..1c94b60 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/freeCont.gif differ diff --git a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/gnu-m-x-160.png b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/gnu-m-x-160.png new file mode 100644 index 0000000..5254ef1 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/gnu-m-x-160.png differ diff --git a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/gnu-m-x-160.xcf b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/gnu-m-x-160.xcf new file mode 100644 index 0000000..f2ce5ce Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/gnu-m-x-160.xcf differ diff --git a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/hideCont.gif b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/hideCont.gif new file mode 100644 index 0000000..9908895 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/hideCont.gif differ diff --git a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/nailCont.gif b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/nailCont.gif new file mode 100644 index 0000000..4c1bca4 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/nailCont.gif differ diff --git a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/nosearch.gif b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/nosearch.gif new file mode 100644 index 0000000..e824f5b Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/nosearch.gif differ diff --git a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/right.gif b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/right.gif new file mode 100644 index 0000000..2400cf1 Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/right.gif differ diff --git a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/search.gif b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/search.gif new file mode 100644 index 0000000..9f58dfd Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/search.gif differ diff --git a/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/showCont.gif b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/showCont.gif new file mode 100644 index 0000000..7bd2e7d Binary files /dev/null and b/emacs.d/nxhtml/nxhtml/html-toc/html-toc/img/showCont.gif differ diff --git a/emacs.d/nxhtml/nxhtml/html-upl.el b/emacs.d/nxhtml/nxhtml/html-upl.el new file mode 100644 index 0000000..1ce2e98 --- /dev/null +++ b/emacs.d/nxhtml/nxhtml/html-upl.el @@ -0,0 +1,329 @@ +;;; html-upl.el --- Uploading of web sites +;; +;; Author: Lennart Borgman (lennart O borgman A gmail O com) +;; Created: Mon Mar 06 19:09:19 2006 +(defconst html-upl:version "0.3") ;; Version: +;; Last-Updated: 2008-03-22T01:23:01+0100 Sat +;; Keywords: +;; Compatibility: +;; +;; Features that might be required by this library: +;; +;; `cl', `html-site', `html-upl', `mail-prsvr', `mm-util', `timer', +;; `url-c', `url-parse', `url-vars'. +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; Commentary: +;; +;; +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; 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., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; Code: +(eval-when-compile (add-to-list 'load-path default-directory load-path)) +(eval-when-compile (require 'html-site nil t)) + +;;;###autoload +(defgroup html-upl nil + "Customization group for html-upl." + :group 'nxhtml) + +(defcustom html-upl-dir + (file-name-as-directory + (expand-file-name + "html-upl" + (file-name-directory + (if load-file-name load-file-name buffer-file-name)))) + + "Directory where the tools needed are located. +The tools for html-upl includes: + +- ftpsync.pl +" + :type 'directory + :group 'html-upl) + +(defun html-upl-browse-remote () + (interactive) + (let ((url (html-site-local-to-web html-site-current + ;;buffer-file-name + (html-site-buffer-or-dired-file-name) + nil))) + (browse-url url))) +(defun html-upl-browse-remote-with-toc () + (interactive) + (let ((url (html-site-local-to-web html-site-current + ;;buffer-file-name + (html-site-buffer-or-dired-file-name) + t))) + (browse-url url))) +(defun html-upl-browse-remote-frames () + (interactive) + (let ((url (html-site-local-to-web (html-site-current-frames-file) + ;;buffer-file-name + (html-site-buffer-or-dired-file-name) + nil))) + (browse-url url))) + +;;;###autoload +(defun html-upl-upload-site-with-toc () + (interactive) + (html-upl-upload-site1 t)) + +;;;###autoload +(defun html-upl-upload-site () + (interactive) + (html-upl-upload-site1 nil)) +(defun html-upl-upload-site1(with-toc) + (html-site-current-ensure-site-defined) + (html-upl-ensure-site-has-host) + (let ((local-dir (if with-toc + (html-site-current-merge-dir) + (html-site-current-site-dir))) + (ftp-host (html-site-current-ftp-host)) + (ftp-user (html-site-current-ftp-user)) + (ftp-pw (html-site-current-ftp-password)) + (ftp-dir (if with-toc + (html-site-current-ftp-wtoc-dir) + (html-site-current-ftp-dir))) + (ftpsync-pl (expand-file-name "ftpsync.pl" html-upl-dir)) + ) + (unless (< 0 (length ftp-host)) + (error "Ftp host not defined")) + (unless (< 0 (length ftp-user)) + (error "Ftp user not defined")) + (unless (< 0 (length ftp-dir)) + (if with-toc + (error "Ftp remote directory for pages with TOC not defined") + (error "Ftp remote directory not defined"))) + (unless (< 0 (length ftp-pw)) + (setq ftp-pw (html-site-get-ftp-pw))) + (let* ( + (buffer (noshell-procbuf-setup "subprocess for upload")) + (remote-url (concat "ftp://" ftp-user ":" ftp-pw "@" ftp-host ftp-dir)) + (opt (list + "-v" + "-p" + local-dir + remote-url))) + (apply 'noshell-procbuf-run + buffer + "perl" "-w" + ftpsync-pl + opt + )))) + +(defun html-upl-ensure-site-has-host () + (let ((host (html-site-current-ftp-host))) + (unless (and host (< 0 (length host))) + (error "Site %s has no ftp host defined" html-site-current)))) + +;;;###autoload +(defun html-upl-remote-dired (dirname) + "Start dired for remote directory or its parent/ancestor." + (interactive (list + (read-directory-name "Local directory: " nil nil t))) + (html-site-current-ensure-file-in-site dirname) + (html-upl-ensure-site-has-host) + (let* ((local-dir dirname) + (remote-dir (html-site-current-local-to-remote local-dir nil)) + to-parent + res + msg) + (while (not res) + (condition-case err + (progn + (dired remote-dir) + (setq res t)) + (error ;;(lwarn 't :warning "err=%s" err) + (setq msg (error-message-string err)))) + ;; It does not look like we always get an error. Check where we are: + (when res + (unless (string= default-directory remote-dir) + (setq res nil) + (setq msg ""))) + (unless res + ;; 450 Requested file action not taken File unavailable (e.g. file busy). + ;; 550 Requested action not taken File unavailable (e.g. file not found, no access). + (if (or (string= msg "") + (save-match-data (string-match " \\(?:550\\|450\\) " msg))) + (progn + (if (not to-parent) + (setq to-parent (concat + (file-name-nondirectory remote-dir) + "/..")) + (setq to-parent (concat + (file-name-nondirectory remote-dir) + "/" + to-parent "/.."))) + ;;(setq local-dir (directory-file-name (file-name-directory (directory-file-name local-dir)))) + ;;(html-site-current-ensure-file-in-site local-dir) + ;;(setq remote-dir (html-site-current-local-to-remote local-dir nil)) + (setq remote-dir (directory-file-name (file-name-directory remote-dir))) + ) + (setq res msg)))) + (if (stringp res) + (error "%s" msg) + (when to-parent + (message "Remote dir not found, showing ancestor %s" to-parent))))) + +;;;###autoload +(defun html-upl-upload-file (filename) + "Upload a single file in a site. +For the definition of a site see `html-site-current'." + (interactive (list + (let ((use-dialog-box nil) + (f (file-relative-name + ;;(if (derived-mode-p 'dired-mode) (dired-get-file-for-visit) buffer-file-name) + (html-site-buffer-or-dired-file-name) + ))) + (read-file-name "File: " nil nil t f)) + )) + (html-site-current-ensure-file-in-site filename) + (html-upl-ensure-site-has-host) + (let* ((buffer (get-file-buffer filename)) + (remote-file (html-site-current-local-to-remote filename nil)) + (remote-buffer (get-file-buffer remote-file)) + (local-file filename)) + (when (or (not buffer-file-name) + (not (buffer-modified-p buffer)) + (and + (y-or-n-p (format "Buffer %s is modified. Save buffer and copy? " + (buffer-name buffer))) + (with-current-buffer buffer + (save-buffer) + (not (buffer-modified-p))))) + (when (= ?~ (string-to-char local-file)) + (setq local-file (expand-file-name local-file))) + (when (and (fboundp 'w32-short-file-name) + (string-match " " local-file)) + (setq local-file (w32-short-file-name local-file))) + (copy-file local-file + ;;(html-site-current-local-to-remote filename nil) + remote-file + 0) + (when remote-buffer + (with-current-buffer remote-buffer + (revert-buffer nil t t))) + (message "Upload ready") + ))) + +;;;###autoload +(defun html-upl-edit-remote-file () + (interactive) + (html-upl-edit-remote-file1 nil)) + +;;;###autoload +(defun html-upl-edit-remote-file-with-toc () + (interactive) + (html-upl-edit-remote-file1 t)) + +(defun html-upl-edit-remote-file1(with-toc) + (html-site-current-ensure-buffer-in-site) + (html-upl-ensure-site-has-host) + (let* ((remote-root (concat "/ftp:" + (html-site-current-ftp-user) + "@" (html-site-current-ftp-host) + ":" + (if with-toc + (html-site-current-ftp-wtoc-dir) + (html-site-current-ftp-dir)))) +;; (remote-file (html-site-path-in-mirror (html-site-current-site-dir) +;; buffer-file-name +;; remote-root)) + (remote-file (html-site-current-local-to-remote buffer-file-name nil)) + ) + (find-file remote-file))) + +;;;###autoload +(defun html-upl-ediff-file (filename) + "Run ediff on local and remote file. +FILENAME could be either the remote or the local file." + ;;(interactive "fFile (local or remote): ") + (interactive (list + (or (html-site-buffer-or-dired-file-name) + (read-file-name "File: ")))) + (html-upl-ensure-site-has-host) + (let* ((is-local (html-site-file-is-local filename)) + remote-name + local-name) + (if is-local + (progn + (html-site-current-ensure-file-in-site filename) + (setq remote-name (html-site-current-local-to-remote filename nil)) + (setq local-name filename)) + (setq local-name (html-site-current-remote-to-local filename nil)) + (html-site-current-ensure-file-in-site local-name) + (setq remote-name filename)) + (let ((local-buf (find-file local-name)) + (remote-buf (find-file remote-name))) + (ediff-buffers local-buf remote-buf)))) + +;;(defun html-site-buffer-or-dired-file-name () +;; (defun html-upl-ediff-buffer () +;; "Run ediff on local and remote buffer file. +;; The current buffer must contain either the local or the remote file." +;; (interactive) +;; (html-upl-ediff-file (buffer-file-name))) + +(provide 'html-upl) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; html-upl.el ends here + +;; (defun html-site-local-to-remote-path (local-file protocol with-toc) +;; (let ((remote-dir (if (eq protocol 'ftp) +;; (if with-toc +;; (html-site-current-ftp-wtoc-dir) +;; (html-site-current-ftp-dir)) +;; (if with-toc +;; (html-site-current-web-wtoc-dir) +;; (html-site-current-web-dir))))) +;; (html-site-path-in-mirror +;; (html-site-current-site-dir) local-file remote-dir))) + +;; (defun html-site-local-to-web (local-file with-toc) +;; (let ((web-file (html-site-local-to-remote-path local-file 'http with-toc)) +;; (web-host (html-site-current-web-host))) +;; (save-match-data +;; (unless (string-match "^https?://" web-host) +;; (setq web-host (concat "http://" web-host)))) +;; (when (string= "/" (substring web-host -1)) +;; (setq web-host (substring web-host 0 -1))) +;; (concat web-host web-file) +;; )) +;; +;;; Use tramp-tramp-file-p instead: +;; (defun html-upl-file-name-is-local (file-name) +;; "Return nil unless FILE-NAME is a Tramp file name." +;; (save-match-data +;; (not (string-match "^/[a-z]+:" file-name)))) + +;; (defun html-upl-remote-to-local (remote-file) +;; (let ((remote-site-dir (html-site-current-web-dir))) +;; (unless (html-site-dir-contains remote-site-dir remote-file) +;; (error ""))) +;; ) + diff --git a/emacs.d/nxhtml/nxhtml/html-upl/COPYING b/emacs.d/nxhtml/nxhtml/html-upl/COPYING new file mode 100644 index 0000000..5b6e7c6 --- /dev/null +++ b/emacs.d/nxhtml/nxhtml/html-upl/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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 of the License, 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/emacs.d/nxhtml/nxhtml/html-upl/Changes b/emacs.d/nxhtml/nxhtml/html-upl/Changes new file mode 100644 index 0000000..0bfd93c --- /dev/null +++ b/emacs.d/nxhtml/nxhtml/html-upl/Changes @@ -0,0 +1,115 @@ + +1.26 => 1.27 (2004-08-23) +========================= + + * Proposed and partially provided by Samuel Marshall + * enhanced timezone handling, should be perfect now + * new option -c, like -i but then asks interactively to let do it + * if FTP user/password are set to ?, they are asked for interactively + + +1.25 => 1.26 (2004-03-31) +========================= + + * fixed "dangerous" algorithm of synchronization direction + + +1.24 => 1.25 (2004-03-20) +========================= + + * fixed some 1.24 bugs + * clock offset computation now more resistant against very slow connections + * clock offset computation disabled for GET mode, so mirroring of foreign + stuff is now possible again + * default localdir of . disabled, therefore + * using . as localdir parameter does not cause a parsing error any more + * replaced damn indentation tabs in sourcecode by appropriate number of + spaces, so code is readable independent of tab settings + * enabled handling of ftpdir / + * handling of relative ftpdir corrected + + +1.23 => 1.24 (2003-10-11) +========================= + + By Michiel Steltman + + * handle files with blanks etc in names + * clock offset remote-local to reduce unnecessary transfers + * error handling + + +1.22 => 1.23 (2003-09-28) +========================= + + * New parameter timeout + + +1.21 => 1.22 (2003-03-24) +========================= + + * Now cuts of / at directory spec's end, to avoid pwd() being different + from target of cwd() (which lead to unneccesarry abortions) + + +1.20 => 1.21 (2003-03-24) +========================= + + * version information in sourcefile and output of -h command + + +1.11 => 1.20 (2003-03-22) +========================= + + * generally, most foreseeable problems are beeing checked, in particular: + + - unability to connect to FTP server + - unability to login into FTP server + - unability to change to local or remote base directory + - unability to change to remote subdirectory + - unability to create local or remote subdirectory + - unability to remove local or remote subdirectory + - unability to put or get a file within 3 trials + + All these errors (except the last one) leads to immediate abortion. + + +1.10 => 1.11 (2002-05-10) +========================= + + * Some optical corrections concerning output + + * Files are now automatically re-transferred until the size on both ends + matches + + * -? now corrrectly recognized + + +1.00 => 1.10 (2001-10-28) +========================= + + * config file support + This is mportant to avoid putting ftp passwords in the process list! + + * much more informative standard and verbose/debug output, including kind + of a advance information + + * better FTP-URL parsing supporting such without user/password + + * much better default values, e.g. ftp://ftp:anonymous@localhost/., ... + + * softlinks are now detected (locally and remote) and treated somewhat + correctly, i.e. they are ignored correctly ;-)) + + + +=> 1.00 (2001-10-26) +==================== + +* 1.0 created 2001-10-20 23:10 by Christoph Lechleitner + +Quite good for a 5 hour hack, isn't it? +O.K., I have already written similar programs for local file systems +in Pascal for DOS, Win3x and OS/2, and in VisualBasic for Win95b. + + diff --git a/emacs.d/nxhtml/nxhtml/html-upl/README b/emacs.d/nxhtml/nxhtml/html-upl/README new file mode 100644 index 0000000..3f9f505 --- /dev/null +++ b/emacs.d/nxhtml/nxhtml/html-upl/README @@ -0,0 +1,111 @@ +# README file for ftpsync.pl + + +Contents: +========= + +- Overview +- Why use ftpsync.pl instead of mirror, sitecopy, ...? +- Requirements/Restrictions +- Bug reports, Contact +- License +- Updates + + +Overview: +--------- + +ftpsync.pl synchronizes a local directory tree and a remote FTP directory tree. + +It was initally written to automize web publishing, but might be useful for +some other purposes, like mirroring not-too-large public sites, data +replication, and more. + +Call "ftpsync.pl -h" to get a short parameter explanation. + + +Why use ftpsync.pl instead of mirror, sitecopy, ...? +---------------------------------------------------- + +Yes, there are similar projects, so some comments on them: + +Compared to mirror, ftpsync.pl is capable of PUTing, not only GETing stuff +(Don't blame me if mirror is able to PUT, I could'nt find a way). + +Compared to sitecopy, ftpsync.pl has no problems, if the remote site has been +changed since its last run by other tools and activites. Unless network +problems or bugs occur, ftpsync.pl does a reliable synchronization. + +Compared to both, ftpsync.pl is very lightweight ;-)) + + +Requirements / Restrictions: +---------------------------- + +- Perl 5.6+ + ftpsync.pl was initially developed on Perl 5.6.0-81 on SuSE Linux 7.2, + older Perl 5.x version might work. Test reports welcome at ftpsync@ibcl.at! + +- File::Find, IO::Handle + IMHO parts of the basic perl package. + +- Net::FTP + Part of the perl-libnet package. + +- UNIX like operating systems on local system + Porting to DOS based systems should be easily done by changing the + directory separator. + +- Perhaps, the script does not work with all FTP servers + It is beeing tested only against UNIX based FTP servers. + + +Bug-Reports, Contact: +--------------------- + +Besides ftpsync.sourceforge.net, ftpsync@ibcl.at is a good target for comments +of any kind. + + +License: +-------- + +FTPSync.pl is GNU/GPL software and eMail ware. + + +FTPSync.pl as GNU/GPL software: +------------------------------- + +FTPSync.pl (ftpsync.pl) 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 of the License, 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +See attached file COPYING. + + +FTPSync.pl as eMail ware: +------------------------- + +FTPSync.pl is also eMail-Ware, which means that the initial author +(Christoph Lechleitner) would like to get an eMail (to ftpsync@ibcl.at), +- if anyone uses the script on production level, +- if anyone distributes or advertises it in any way, +- if anyone starts to (try to) improve it. + + +Updates +------- + +The software and updates should be available from +http://ftpsync.sourceforge.net/ +http://www.ibcl.at/ossw/FTPSync diff --git a/emacs.d/nxhtml/nxhtml/html-upl/TODO b/emacs.d/nxhtml/nxhtml/html-upl/TODO new file mode 100644 index 0000000..923583d --- /dev/null +++ b/emacs.d/nxhtml/nxhtml/html-upl/TODO @@ -0,0 +1,2 @@ + +Nothing as of now. diff --git a/emacs.d/nxhtml/nxhtml/html-upl/ftpsync.pl b/emacs.d/nxhtml/nxhtml/html-upl/ftpsync.pl new file mode 100644 index 0000000..729d964 --- /dev/null +++ b/emacs.d/nxhtml/nxhtml/html-upl/ftpsync.pl @@ -0,0 +1,700 @@ +#!/usr/bin/perl +# +# ftpsync.pl +# +# See attached README file for any details, or call +# ftpsync.pl -h +# for quick start. +# +# LICENSE +# +# FTPSync.pl (ftpsync) 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 of the License, 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# FTPSync.pl (ftpsync) is also eMail-Ware, which means that the initial author +# (Christoph Lechleitner) would like to get an eMail at ftpsync@ibcl.at, if +# - if anyone uses the script on production level, +# - if anyone distributes or advertises it in any way, +# - if anyone starts to (try to) improve it. +# +# +################################################################################ + +# +# Options etc. +# +#print "Starting imports.\n"; # For major problem debugging +printf STDERR "argv=@ARGV\n"; + +use File::Find; +use File::Listing; +use Net::FTP; +use strict; +# flushing ... +use IO::Handle; +STDOUT->autoflush(1); +STDERR->autoflush(1); + +sub dosync(); +sub print_syntax(); +sub print_options(); +sub buildremotetree(); +sub buildlocaltree(); +sub listremotedirs(); +sub parseRemoteURL(); + +# Option Variables +#print "Defining variables.\n"; # For major problem debugging +# meta +my $returncode=0; +my $configfile=$ENV{"HOME"}."/.ftpsync"; +# basics +my $localdir=""; +my $remoteURL=""; +my $syncdirection=""; +my $ftpuser="ftp"; +my $ftppasswd="anonymous"; +my $ftpserver="localhost"; +my $ftpdir=""; +my $ftptimeout=120; +my $syncoff=0; +# verbosity +my $doverbose=1; +my $dodebug=0; +my $doquiet=0; +my $doinfoonly=0; +my $infotext=""; +my $docheckfirst=0; + +# Read command line options/parameters +#print "Reading command line options.\n"; # For major problem debugging +my $curopt; +my @cloptions=(); +for $curopt (@ARGV) { + if ($curopt =~ /^cfg=/) { + $configfile=$'; + if (! -r $configfile) { print "Config file does not exist: ".$configfile."\n"; $returncode+=1; } + } else { + push @cloptions, $curopt; + } +} + +# Read Config File, if given +my @cfgfoptions=(); +if ($configfile ne "") { + if (-r $configfile) { + #print "Reading config file.\n"; # For major problem debugging + open (CONFIGFILE,"<$configfile"); + while () { + $_ =~ s/([ \n\r]*$|\.\.|#.*$)//gs; + if ($_ eq "") { next; } + if ( ($_ =~ /[^=]+=[^=]+/) || ($_ =~ /^-[a-zA-Z]+$/) ) { push @cfgfoptions, $_; } + } + close (CONFIGFILE); + } # else { print "Config file does not exist.\n"; } # For major problem debugging +} # else { print "No config file to read.\n"; } # For major problem debugging + +# Parse Options/Parameters +print "Parsing all options.\n"; # For major problem debugging +my $noofopts=0; +for $curopt (@cfgfoptions, @cloptions) { + if ($curopt =~ /^-[a-zA-Z]/) { + my $i; + for ($i=1; $i0) { $ftptimeout =$fvalue; } } + } + else { + if ($localdir eq "") { + $localdir = $curopt; + if ( $syncdirection eq "" ) + { $syncdirection="put"; } + } else { + print "ERROR: Unknown parameter: \"".$curopt."\"\n"; $returncode+=1 + } + } +} +if ($noofopts == 0) { print_syntax(); exit 0; } + +if($ftpuser eq "?") { print "User: "; $ftpuser=; chomp($ftpuser); } +if($ftppasswd eq "?") { print "Password: "; $ftppasswd=; chomp($ftppasswd); } + +if ($dodebug) { print_options(); } +# check options +if ( ($localdir eq "") || (! -d $localdir) ) +{ print "ERROR: Local directory does not exist: ".$localdir."\n"; $returncode+=1; } +#if ($localdir eq "") { print "ERROR: No localdir given.\n"; $returncode+=1; } +#if ( ($remoteURL eq "") { print "ERROR: No remoteURL given.\n"; $returncode+=1; } +if ($ftpserver eq "") { print "ERROR: No FTP server given.\n"; $returncode+=1; } +if ($ftpdir eq "") { print "ERROR: No FTP directory given.\n"; $returncode+=1; } +if ($ftpuser eq "") { print "ERROR: No FTP user given.\n"; $returncode+=1; } +if ($ftppasswd eq "") { print "ERROR: No FTP password given.\n"; $returncode+=1; } +if ($returncode > 0) { die "Aborting due to missing or wrong options! Call ftpsync -? for more information.\n"; } + + +#print "Exiting.\n"; exit 0; + +if ($dodebug) { print "\nFind out if ftp server is online & accessible.\n"; } +my $doftpdebug=($doverbose > 2); +my $ftpc = Net::FTP->new($ftpserver,Debug=>$doftpdebug,Timeout=>$ftptimeout) || die "Could not connect to $ftpserver\n"; +if ($dodebug) { print "Logging in as $ftpuser with password $ftppasswd.\n" } +$ftpc->login($ftpuser,$ftppasswd) || die "Could not login to $ftpserver as $ftpuser\n"; +my $ftpdefdir=$ftpc->pwd(); +if ($dodebug) { print "Remote directory is now ".$ftpdefdir."\n"; } +if ($ftpdir !~ /^\//) # insert remote login directory into relative ftpdir specification +{ if ($ftpdefdir eq "/") + { $ftpdir = $ftpdefdir . $ftpdir; } + else + { $ftpdir = $ftpdefdir . "/" . $ftpdir; } + if (!$doquiet) + { print "Absolute remote directory is $ftpdir\n"; } +} +if (substr($ftpdir, -1) eq "/") { + if (!$doquiet) + { print " Remote directory ends in /, removing this\n"; } + chop($ftpdir); +} +if ($dodebug) { print "Changing to remote directory $ftpdir.\n" } +$ftpc->binary() + or die "Cannot set binary mode :\n\t" . $ftpc->message; +$ftpc->cwd($ftpdir) + or die "Cannot cwd to $ftpdir :\n\t" . $ftpc->message; +if ($ftpc->pwd() ne $ftpdir) { + my $pwd = $ftpc->pwd(); + die "Could not change to remote base directory $ftpdir (at $pwd)\n"; } +if ($dodebug) { print "Remote directory is now ".$ftpc->pwd()."\n"; } + +if (! $doquiet) { print "\nDetermine s offset.\n"; } +if ($syncdirection eq "put") { clocksync($ftpc,"syncfile"); } + +# local & remote tree vars +#chdir $localdir; +my $ldl=length($localdir) + 1; +#my $ldl=length($localdir); +my %localfiledates=(); +my %localfilesizes=(); +my %localdirs=(); +my %locallinks=(); + +my %remotefilesizes=(); +my %remotefiledates=(); +my %remotedirs=(); +my %remotelinks=(); +my $curremotesubdir=""; + +# Build local & remote tree +if (! $doquiet) { print "\nBuilding local file tree.\n"; } +buildlocaltree(); +if (! $doquiet) { print "\nBuilding remote file tree.\n"; } +buildremotetree(); +listremotedirs(); +#if ($dodebug) { print "Quitting FTP connection.\n" } +#$ftpc->quit(); + +#print "Exiting.\n"; exit 0; + +# Work ... +if ($doinfoonly) { $docheckfirst=0; } +if ($docheckfirst) +{ print "Simulating synchronization.\n"; + $doinfoonly=1; + dosync(); + $doinfoonly=0; + print "\nOK to really update files? (y/n) [n] "; + my $yn=; + if ($yn =~ /^y/i) + { print "OK, going to do it.\n"; + } + else + { print "OK, exiting without actions.\n"; + exit 1; + } +} +if ($doinfoonly) { print "\nSimulating synchronization.\n"; } +elsif (! $doquiet) { print "\nStarting synchronization.\n"; } +dosync(); + +if (!$doquiet) { print "Done.\n"; } + +if ($dodebug) { print "Quitting FTP connection.\n" } +$ftpc->quit(); + +exit 0; + + + +# +# Subs +# + +sub buildlocaltree() { + find (\¬icelocalfile, $localdir."/"); + sub noticelocalfile { + if ($ldl > length($File::Find::name)) { return; } + #printf "name=%s, length(name)=%d, ldl=$ldl\n", $File::Find::name, length($File::Find::name); + my $relfilename=substr($File::Find::name,$ldl); + if (length($relfilename) == 0) { return; } + if (-d $_) { + if ($dodebug) { print "Directory: ".$File::Find::name."\n"; } + elsif (! $doquiet) { print ":"; } + $localdirs{$relfilename}="$relfilename"; + } + elsif (-f $_) { + #my @curfilestat=lstat $File::Find::name; + my @curfilestat=lstat $_; + my $curfilesize=$curfilestat[7]; + my $curfilemdt=$curfilestat[9]; + if ($dodebug) { print "File: ".$File::Find::name."\n"; + print "Modified ".$curfilemdt."\nSize ".$curfilesize." bytes\n"; } + elsif (! $doquiet) { print "."; } + $localfiledates{$relfilename}=$curfilemdt; + $localfilesizes{$relfilename}=$curfilesize; + } + elsif (-l $_) { + if ($dodebug) { print "Link: ".$File::Find::name."\n"; } + elsif (! $doquiet) { print ","; } + $locallinks{$relfilename}="$relfilename"; + } else { + #print "u ".$File::Find::name."\n"; + if (! $doquiet) { print "Ignoring file of unknown type: ".$File::Find::name."\n"; } + } + #if (! ($doquiet || $dodebug)) { print "\n"; } + #print "File mode is ".@curfilestat[2]."\n"; + } + if ($dodebug) { + print "Local dirs (relative to ".$localdir."/):\n"; + my $curlocaldir=""; + foreach $curlocaldir (keys(%localdirs)) + { print $curlocaldir."/\n"; } + print "Local files (relative to ".$localdir."/):\n"; + my $curlocalfile=""; + foreach $curlocalfile (keys(%localfiledates)) + { print $curlocalfile."\n"; } + } +} + + +sub buildremotetree() { + my @currecursedirs=(); + #$ftpc->ls() + # or die $ftpc->message . "\nCannot ls remote dir " . $ftpc->pwd(); + my @rfl = $ftpc->dir(); + # or @rfl=(); # we have to survive empty remote directories !!! + my $currf=""; + my $curyear = (gmtime(time))[5] + 1900; + my %monthtonr=(); + $monthtonr{"Jan"}=1; $monthtonr{"Feb"}=2; $monthtonr{"Mar"}=3; $monthtonr{"Apr"}=4; $monthtonr{"May"}=5; $monthtonr{"Jun"}=6; + $monthtonr{"Jul"}=7; $monthtonr{"Aug"}=8; $monthtonr{"Sep"}=9; $monthtonr{"Oct"}=10; $monthtonr{"Nov"}=11; $monthtonr{"Dec"}=12; + if ($dodebug) { print "Remote pwd is ".$ftpc->pwd()."\nDIRing.\n"; } + my $curlsline; + foreach $curlsline (parse_dir(\@rfl)) { + my ($cfname,$cftype,$cfsize,$cftime,$mode)=@$curlsline; + #if ($dodebug) { print "Analysing remote file/dir ".$currf."\n" }; + if ( $cftype ) { + if ($cfname eq ".") { next; } + if ($cfname eq "..") { next; } + if (substr($cftype,0,1) eq 'l') { # link, rest of string = linkto + my $curnrl; + if ($curremotesubdir eq "") { $curnrl = $cfname; } + else { $curnrl = $curremotesubdir."/".$cfname; } + $remotelinks{$curnrl}=$cfname; + if ($dodebug) { print "Link: ".$curnrl." -> ".$cfname."\n"; } + } + elsif ($cftype eq 'd') { + my $curnewrsd; + if ($curremotesubdir eq "") { $curnewrsd = $cfname; } + else { $curnewrsd = $curremotesubdir."/".$cfname; } + $remotedirs{$curnewrsd}=$curnewrsd; + if ($dodebug) { print "Directory: ".$curnewrsd."\n"; } + elsif (! $doquiet) { print ":"; } + push @currecursedirs, $cfname; + } + elsif ($cftype eq 'f') { #plain file + my $curnewrf; + if ($curremotesubdir eq "") { $curnewrf = $cfname; } + else { $curnewrf = $curremotesubdir."/".$cfname; } + #$remotefiledates{$curnewrf}=$cftime; + $remotefiledates{$curnewrf}=$ftpc->mdtm($cfname)+$syncoff; + if ($remotefiledates{$curnewrf} le 0) { die "Timeout detecting modification time of $curnewrf\n"; } + $remotefilesizes{$curnewrf}=$cfsize; + if ($remotefilesizes{$curnewrf} lt 0) { die "Timeout detecting size of $curnewrf\n"; } + if ($dodebug) { print "File: ".$curnewrf."\n"; } + elsif (! $doquiet) { print "."; } + } + elsif (! $doquiet) { print "Unkown file: $curlsline\n"; } + } + elsif ($dodebug) { print "Ignoring.\n"; } + } + #recurse + my $currecurseddir; + foreach $currecurseddir (@currecursedirs) + { my $oldcurremotesubdir; + $oldcurremotesubdir=$curremotesubdir; + if ($curremotesubdir eq "") { $curremotesubdir = $currecurseddir; } + else { $curremotesubdir .= "/".$currecurseddir; } + my $curcwddir=""; + if ($ftpdir eq "/") + { $curcwddir=$ftpdir.$curremotesubdir; } + else + { $curcwddir=$ftpdir."/".$curremotesubdir; } + if ($dodebug) { print "Change dir: ".$curcwddir."\n"; } + $ftpc->cwd($curcwddir) + or die "Cannot cwd to $curcwddir :\n\t" . $ftpc->message ; + if ($ftpc->pwd() ne $curcwddir) { + die "Could not cwd to $curcwddir :\n\t" . $ftpc->message ; } + if (! $doquiet) { print "\n"; } + buildremotetree(); + $ftpc->cdup(); + $curremotesubdir = $oldcurremotesubdir; + } +} + + +# Synchronize clocks. +sub clocksync { + my $conn = shift @_; + my $fn = shift @_; + my $fndidexist=1; + + if(! -f $fn) { + open(SF, ">$fn") or die "Cannot create $fn for time sync option"; + close(SF); + $fndidexist=0; + } + -z $fn or + die "File $fn for time sync must be empty."; + my $putsyncok=1; + $conn->put($fn) or $putsyncok=0; + if (!$putsyncok) + { unlink($fn); # cleanup! + die "Cannot send timesync file $fn"; + } + + my $now_here1 = time(); + my $now_there = $conn->mdtm($fn) or + die "Cannot get write time of timesync file $fn"; + my $now_here2 = time(); + + if ($now_here2 < $now_there) # remote is in the future + { $syncoff=($now_there - $now_here1); + $syncoff -= $syncoff % 60; + $syncoff = 0-$syncoff; + } + else + #if ($now_here1 > $now_there) # remote is the past # or equal + { $syncoff=($now_here2 - $now_there); + $syncoff -= $syncoff % 60; + } + + $conn->delete($fn); + + my $hrs = int(abs($syncoff)/3600); + my $mins = int(abs($syncoff)/60) - $hrs*60; + my $secs = abs($syncoff) - $hrs*3600 - $mins*60; + if (! $doquiet) { + printf("Clock sync offset: %d:%02d:%02d\n", $hrs, $mins, $secs); + } + unlink ($fn) unless $fndidexist; +} + + +sub dosync() +{ + chdir $localdir || die "Could not change to local base directory $localdir\n"; + if ($syncdirection eq "put") { + # create dirs missing at the target + if ($doinfoonly) { print "\nWould create new remote directories.\n"; } + elsif (! $doquiet) { print "\nCreating new remote directories.\n"; } + my $curlocaldir; + foreach $curlocaldir (sort { return length($a) <=> length($b); } keys(%localdirs)) + { if (! exists $remotedirs{$curlocaldir}) + { if ($doinfoonly) { print $curlocaldir."\n"; next; } + if ($doverbose) { print $curlocaldir."\n"; } + elsif (! $doquiet) { print "d"; } + if ($ftpc->mkdir($curlocaldir) ne $curlocaldir) { die "Could not create remote subdirectory $curlocaldir\n"; } + } + } + # copy files missing or too old at the target, synchronize timestamp _after_ copying + if ($doinfoonly) { print "\nWould copy new(er) local files.\n"; } + elsif (! $doquiet) { print "\nCopying new(er) local files.\n"; } + my $curlocalfile; + foreach $curlocalfile (sort { return length($b) <=> length($a); } keys(%localfiledates)) + { my $dorefresh=0; + if (! exists $remotefiledates{$curlocalfile}) { + $dorefresh=1; + $infotext="New: ".$curlocalfile." (".$localfilesizes{$curlocalfile}." bytes)\n"; + if ($doinfoonly) { print $infotext; next; } + elsif ($doverbose) { print $infotext; } + elsif (! $doquiet) { print "n"; } + } + elsif ($remotefiledates{$curlocalfile} < $localfiledates{$curlocalfile}) { + $dorefresh=1; + $infotext="Newer: ".$curlocalfile." (".$localfilesizes{$curlocalfile}." bytes, ".$localfiledates{$curlocalfile}." versus ".$remotefiledates{$curlocalfile}.")\n"; + if ($doinfoonly) { print $infotext; next; } + if ($doverbose) { print $infotext; } + elsif (! $doquiet) { print "u"; } + } + elsif ($remotefilesizes{$curlocalfile} != $localfilesizes{$curlocalfile}) { + $dorefresh=1; + $infotext="Changed (different sized): ".$curlocalfile." (".$localfilesizes{$curlocalfile}." versus ".$remotefilesizes{$curlocalfile}." bytes)\n"; + if ($doinfoonly) { print $infotext; next; } + if ($doverbose) { print $infotext; } + elsif (! $doquiet) { print "u"; } + } + if (! $dorefresh) { next; } + if ($dodebug) { print "Really PUTting file ".$curlocalfile."\n"; } + if ($ftpc->put($curlocalfile, $curlocalfile) ne $curlocalfile) + { print STDERR "Could not put localfile $curlocalfile\n"; } + my $retries = 3; + while ( ($ftpc->size($curlocalfile) != (lstat $curlocalfile)[7]) and ($retries-- > 0) ) + { if (! $doquiet) { print "Re-Transfering $curlocalfile\n"; } + if ($ftpc->put($curlocalfile, $curlocalfile) ne $curlocalfile) + { print STDERR "Could not re-put localfile $curlocalfile\n"; } + } + my $newremotemdt=$ftpc->mdtm($curlocalfile)+$syncoff; + utime ($newremotemdt, $newremotemdt, $curlocalfile); + } + # delete files too much at the target + if ($doinfoonly) { print "\nWould delete obsolete remote files.\n"; } + elsif (! $doquiet) { print "\nDeleting obsolete remote files.\n"; } + my $curremotefile; + foreach $curremotefile (keys(%remotefiledates)) + { if (not exists $localfiledates{$curremotefile}) + { if ($doinfoonly) { print $curremotefile."\n"; next; } + if ($doverbose) { print $curremotefile."\n"; } + elsif (! $doquiet) { print "r"; } + if ($ftpc->delete($curremotefile) ne 1) { die "Could not delete remote file $curremotefile\n"; } + } + } + # delete dirs too much at the target + if ($doinfoonly) { print "\nWould delete obsolete remote directories.\n"; } + elsif (! $doquiet) { print "\nDeleting obsolete remote directories.\n"; } + my $curremotedir; + foreach $curremotedir (sort { return length($b) <=> length($a); } keys(%remotedirs)) + { if (! exists $localdirs{$curremotedir}) + { if ($doinfoonly) { print $curremotedir."\n"; next; } + if ($doverbose) { print $curremotedir."\n"; } + elsif (! $doquiet) { print "R"; } + if ($ftpc->rmdir($curremotedir) ne 1) { die "Could not remove remote subdirectory $curremotedir\n"; } + } + } + } else { # $syncdirection eq "GET" + # create dirs missing at the target + if ($doinfoonly) { print "\nWould create new local directories.\n"; } + elsif (! $doquiet) { print "\nCreating new local directories.\n"; } + my $curremotedir; + foreach $curremotedir (sort { return length($a) <=> length($b); } keys(%remotedirs)) + { if (! exists $localdirs{$curremotedir}) + { if ($doinfoonly) { print $curremotedir."\n"; next; } + if ($doverbose) { print $curremotedir."\n"; } + elsif (! $doquiet) { print "d"; } + mkdir($curremotedir) || die "Could not create local subdirectory $curremotedir\n"; + } + } + # copy files missing or too old at the target, synchronize timestamp _after_ copying + if ($doinfoonly) { print "\nWould copy new(er) remote files.\n"; } + elsif (! $doquiet) { print "\nCopying new(er) remote files.\n"; } + my $curremotefile; + foreach $curremotefile (sort { return length($b) <=> length($a); } keys(%remotefiledates)) + { my $dorefresh=0; + if (! exists $localfiledates{$curremotefile}) { + $dorefresh=1; + $infotext="New: ".$curremotefile." (".$remotefilesizes{$curremotefile}." bytes)\n"; + if ($doinfoonly) { print $infotext; next; } + if ($doverbose) { print $infotext; } + elsif (! $doquiet) { print "n"; } + } + elsif ($remotefiledates{$curremotefile} > $localfiledates{$curremotefile}) { + $dorefresh=1; + $infotext="Newer: ".$curremotefile." (".$remotefilesizes{$curremotefile}." bytes, ".$remotefiledates{$curremotefile}." versus ".$localfiledates{$curremotefile}.")\n"; + if ($doinfoonly) { print $infotext; next; } + if ($doverbose) { print $infotext; } + elsif (! $doquiet) { print "u"; } + } + elsif ($remotefilesizes{$curremotefile} != $localfilesizes{$curremotefile}) { + $dorefresh=1; + $infotext="Changed (different sized): ".$curremotefile." (".$remotefilesizes{$curremotefile}." bytes)\n"; + if ($doinfoonly) { print $infotext; next; } + if ($doverbose) { print $infotext; } + elsif (! $doquiet) { print "c"; } + } + if (! $dorefresh) { next; } + if ($dodebug) { print "Really GETting file ".$curremotefile."\n"; } + my $rc=$ftpc->get($curremotefile, $curremotefile); + if ( ($rc eq undef) or ($rc ne $curremotefile) ) + { print STDERR "Could not get file ".$curremotefile."\n"; } + my $retries=3; + while ( ($ftpc->size($curremotefile) != (lstat $curremotefile)[7]) and ($retries-- > 0) ) + { if (! $doquiet) { print "Re-Transfering $curremotefile\n"; } + if ( ($rc eq undef) or ($rc ne $curremotefile) ) + { print STDERR "Could not get file ".$curremotefile."\n"; } + } + my $newlocalmdt=$remotefiledates{$curremotefile}; + utime ($newlocalmdt, $newlocalmdt, $curremotefile); + } + # delete files too much at the target + if ($doinfoonly) { print "\nWould delete obsolete local files.\n"; } + elsif (! $doquiet) { print "\nDeleting obsolete local files.\n"; } + my $curlocalfile; + foreach $curlocalfile (sort { return length($b) <=> length($a); } keys(%localfiledates)) + { if (not exists $remotefiledates{$curlocalfile}) + { if ($doinfoonly) { print $curlocalfile."\n"; next; } + if ($doverbose) { print $curlocalfile."\n"; } + elsif (! $doquiet) { print "r"; } + if (unlink($curlocalfile) ne 1) { die "Could not remove local file $curlocalfile\n"; } + } + } + # delete dirs too much at the target + if ($doinfoonly) { print "\nWould delete obsolete local directories.\n"; } + elsif (! $doquiet) { print "\nDeleting obsolete local directories.\n"; } + my $curlocaldir; + foreach $curlocaldir (keys(%localdirs)) + { if (! exists $remotedirs{$curlocaldir}) + { if ($doinfoonly) { print $curlocaldir."\n"; next; } + if ($doverbose) { print $curlocaldir."\n"; } + elsif (! $doquiet) { print "d"; } + rmdir($curlocaldir) || die "Could not remove local subdirectory $curlocaldir\n"; + } + } + } +} + + +sub listremotedirs() { + if ($dodebug) { + print "Remote dirs (relative to ".$ftpdir."):\n"; + my $curremotedir=""; + foreach $curremotedir (keys(%remotedirs)) + { print $curremotedir."/\n"; } + print "Remote files (relative to ".$ftpdir."):\n"; + my $curremotefile=""; + foreach $curremotefile (keys(%remotefiledates)) + { print $curremotefile."\n"; } + print "Remote links (relative to ".$ftpdir."):\n"; + my $curremotelink=""; + foreach $curremotelink (keys(%remotelinks)) + { print $curremotelink." -> ".$remotelinks{$curremotelink}."\n"; } + } +} +sub parseRemoteURL() { + if ($remoteURL =~ /^ftp:\/\/(([^@\/\\\:]+)(:([^@\/\\\:]+))?@)?([a-zA-Z01-9\.]+)\/(.*)/) { + #print "DEBUG: parsing ".$remoteURL."\n"; + #print "match 1 = ".$1."\n"; + #print "match 2 = ".$2."\n"; + #print "match 3 = ".$3."\n"; + #print "match 4 = ".$4."\n"; + #print "match 5 = ".$5."\n"; + #print "match 6 = ".$6."\n"; + #print "match 7 = ".$7."\n"; + if (length($2) > 0) { $ftpuser=$2; } + if (length($4) > 0) { $ftppasswd=$4; } + $ftpserver=$5; + $ftpdir=$6; + #if ($ftpdir eq "") { $ftpdir="/"; } + } +} + + +sub print_syntax() { + print "\n"; + print "FTPSync.pl 1.27 (2004-08-23)\n"; + print "\n"; + print " ftpsync [ options ] [ localdir remoteURL ]\n"; + print " ftpsync [ options ] [ remoteURL localdir ]\n"; + print " options = [-dgpqv] [ cfg|ftpuser|ftppasswd|ftpserver|ftpdir=value ... ] \n"; + print " localdir local directory, defaults to \".\".\n"; + print " ftpURL full FTP URL, scheme\n"; + print ' ftp://[ftpuser[:ftppasswd]@]ftpserver/ftpdir'."\n"; + print " ftpdir is relative, so double / for absolute paths as well as /\n"; + print " -c | -C like -i, but then prompts whether to actually do work\n"; + print " -d | -D turns debug output (including verbose output) on\n"; + print " -g | -G forces sync direction to GET (remote to local)\n"; + print " -h | -H turns debugging on\n"; + print " -i | -I forces info mode, only telling what would be done\n"; + print " -p | -P forces sync direction to PUT (local to remote)\n"; + print " -q | -Q turnes quiet operation on\n"; + print " -v | -V turnes verbose output on\n"; + print " cfg= read parameters and options from file defined by value.\n"; + print " ftpserver= defines the FTP server, defaults to \"localhost\".\n"; + print " ftpdir= defines the FTP directory, defaults to \".\" (/wo '\"') \n"; + print " ftpuser= defines the FTP user, defaults to \"ftp\".\n"; + print " ftppasswd= defines the FTP password, defaults to \"anonymous\".\n"; + print "\n"; + print " Later mentioned options and parameters overwrite those mentioned earlier.\n"; + print " Command line options and parameters overwrite those in the config file.\n"; + print " Don't use '\"', although mentioned default values might motiviate you to.\n"; + print "\n"; +} + + +sub print_options() { + print "\nPrinting options:\n"; + # meta + print "returncode = ", $returncode , "\n"; + print "configfile = ", $configfile , "\n"; + # basiscs + print "syncdirection = ", $syncdirection , "\n"; + print "localdir = ", $localdir , "\n"; + # FTP stuff + print "remoteURL = ", $remoteURL , "\n"; + print "ftpuser = ", $ftpuser , "\n"; + print "ftppasswd = ", $ftppasswd , "\n"; + print "ftpserver = ", $ftpserver , "\n"; + print "ftpdir = ", $ftpdir , "\n"; + # verbsityosity + print "doverbose = ", $doverbose , "\n"; + print "dodebug = ", $dodebug , "\n"; + print "doquiet = ", $doquiet , "\n"; + # + print "doinfoonly = ", $doinfoonly , "\n"; + print "\n"; +} diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc.el b/emacs.d/nxhtml/nxhtml/html-wtoc.el new file mode 100644 index 0000000..94533da --- /dev/null +++ b/emacs.d/nxhtml/nxhtml/html-wtoc.el @@ -0,0 +1,200 @@ +;;; html-wtoc.el --- Creating pages with site TOC +;; +;; Author: Lennart Borgman (lennart O borgman A gmail O com) +;; Created: Sat Feb 11 00:06:14 2006 +(defconst html-wtoc:version "0.2") ;; Version: +;; Last-Updated: Sun Nov 04 21:49:34 2007 (3600 +0100) +;; Keywords: +;; Compatibility: +;; +;; Features that might be required by this library: +;; +;; None +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; Commentary: +;; +;; +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; 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., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; Code: + +(eval-when-compile (add-to-list 'load-path default-directory load-path)) +(eval-when-compile (require 'html-site nil t)) + +;;;###autoload +(defgroup html-wtoc nil + "Customization group for html-wtoc." + :group 'nxhtml) + +(defcustom html-wtoc-dir + (file-name-as-directory + (expand-file-name + "html-wtoc" + (file-name-directory + (if load-file-name load-file-name buffer-file-name)))) + + "Directory where the tools needed are located. +The tools for html-wtoc includes: + +- html-wtoc.pl +- html-wtoc.js +- html-wtoc.css +- html-wtoc-template.htm +- html-wtoc-template.js +- html-wtoc-template.css +- img/ + +" + :type 'directory + :group 'html-wtoc) + +;; (defun html-wtoc-get-parsed-html-toc () +;; (save-excursion +;; (let ((toc-file (html-toc-file))) +;; (unless (file-exists-p toc-file) +;; (html-toc-write-toc-file)) +;; (with-current-buffer (find-file-noselect toc-file) +;; (goto-char (point-min)) +;; (let ((toc-begin (search-forward html-toc-mark-begin nil t)) +;; (toc-middle (search-forward html-toc-mark-middle nil t)) +;; toc-parsed) +;; (unless (and toc-begin toc-middle) +;; (error "Can't find table of contents in %s" toc-file)) +;; (setq toc-parsed (html-toc-parse-toc +;; (buffer-substring-no-properties +;; toc-begin toc-middle)))))))) + +;; (defun html-wtoc-get-atags (parsed-ul level) +;; (assert (eq 'ul (car parsed-ul))) +;; (let (atags) +;; (dolist (l parsed-ul) +;; (when (and (listp l) +;; (eq 'li (car l))) +;; (dolist (ll l) +;; (when (listp ll) +;; (when (eq 'a (car ll)) +;; (setq atags +;; (cons +;; (list level +;; (caddr ll) +;; (cdaadr ll)) +;; atags))) +;; (when (eq 'ul (car ll)) +;; (let ((subs (html-wtoc-get-atags ll (1+ level)))) +;; (dolist (s subs) +;; (setq atags (cons s atags))))))))) +;; (reverse atags))) + +;; (defcustom html-wtoc-pages-default-name "html-wtoc-pages.txt" +;; "Default file name sans directory for list of pages file. +;; This file is located in the same directory as `html-toc-file'." +;; :type 'string) + +;; (defun html-wtoc-pages-file () +;; (expand-file-name html-wtoc-pages-default-name +;; (file-name-directory (html-toc-file)))) + +(defun html-wtoc-browse-page-with-toc () + (interactive) + (unless buffer-file-name + (error "This buffer is not visiting a file")) + (html-site-current-ensure-site-defined) + (let ((merge-dir (html-site-current-merge-dir)) + merged-file + (in-site (html-site-dir-contains + (html-site-current-site-dir) + buffer-file-name))) + (unless merge-dir + (error "There is no output dir for pages with TOC defined for the site %s" + html-site-current)) + (unless in-site + (error "This buffer's file is not in %s" (html-site-current-site-dir))) + (setq merged-file + (expand-file-name + (file-relative-name buffer-file-name + (html-site-current-site-dir)) + (html-site-current-merge-dir))) + (unless (file-exists-p merged-file) + (error "The file %s does not yet exist.\nPlease do use `html-wtoc-write-merged' to create it." + merged-file)) + (browse-url-of-file merged-file))) + + +(defun html-wtoc-write-pages-with-toc (allow-overwrite) + "Merge the TOC with the pages. + +If an entry with the name MERGE-NAME exists in `html-wtoc-merges' +then this is chosen. Otherwise a new entry is created and added +to `html-wtoc-merges'. The entry has all necessary information to +do the merge. + +If `html-move-site-directory' has a non-nil value then the list +of completions when prompting for MERGE-NAME contains only those +merge names from `html-wtoc-merges' where the site directory has +the same value. Otherwise the completion list contains all merge +names and `html-move-site-directory' will be set to the chosen +merge's site directory. + +The merging of the pages and the table of contents is done in a +subprocess using a Perl script named html-wtoc.pl the directory +`html-wtoc-dir'. +" + (interactive (list (y-or-n-p "Allow overwrite? "))) + (html-site-current-ensure-site-defined) + (let ((pag-file (html-site-current-page-list)) + (out-dir (html-site-current-merge-dir)) + (tpl-file (html-site-current-merge-template)) + (html-wtoc-pl (expand-file-name "html-wtoc.pl" html-wtoc-dir)) + ) + (unless (< 0 (length pag-file)) + (error "Page list file not defined for site %s" html-site-current)) + (unless (file-exists-p pag-file) + (error "Can't find page file for site %s.\nHave you done M-x html-toc-create-pages-file?" + html-site-current)) + (unless (< 0 (length tpl-file)) + ;;(error "Template file not defined for site %s.\nPlease use customize to add this in `html-site-list'." html-site-current) + (setq tpl-file (expand-file-name "html-wtoc-template.html" html-wtoc-dir)) + ) + (let ( + (buffer (noshell-procbuf-setup "*Merging pages and TOC*")) + (opt (list + (concat "pages=" pag-file) + (concat "outroot=" out-dir) + (concat "template=" tpl-file)))) + (when allow-overwrite + (setq opt (cons "update=1" opt))) + (apply 'noshell-procbuf-run + buffer + "perl" "-w" + html-wtoc-pl "merge" + opt + )))) + +(provide 'html-wtoc) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; html-wtoc.el ends here diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/PerlLib/PathSubs.pm b/emacs.d/nxhtml/nxhtml/html-wtoc/PerlLib/PathSubs.pm new file mode 100644 index 0000000..e95b8d5 --- /dev/null +++ b/emacs.d/nxhtml/nxhtml/html-wtoc/PerlLib/PathSubs.pm @@ -0,0 +1,207 @@ +# Copyright 2006 Lennart Borgman, http://OurComments.org/. All rights +# reserved. +# +# 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 3, 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. + +package PathSubs; + +##################################################### +### This package contains general path handling +### routines and some win32 specific dito. +### The latter should ev be moved to a new module! +##################################################### +use strict; + +use File::Spec; + +### Absolute path names + +sub is_abs_path ($) { + my $path = shift; + return 0 if $path eq ""; + return 1 if File::Spec->file_name_is_absolute($path); + #return 1 if substr($path, 1, 1) eq ":"; # MSWin32 + #return 1 if substr($path, 0, 1) eq "/"; + return 1 if $path =~ /^https?:/i; + return 1 if $path =~ /^file:/i; + return 1 if $path =~ /^javascript:/i; + return 1 if $path =~ /^mailto:/i; +} +sub is_abs_netpath($) { + my $path = shift; + return 1 if $path =~ /^https?:/i; + # New + return 1 if $path =~ /^ftp:/i; + return 1 if $path =~ /^mailto:/i; +} + + +sub uniq_file($) { + my $fname = shift; + $fname =~ s!^\s+|\s+$!!g; + return "" if ($fname eq ""); + $fname = File::Spec->rel2abs($fname); + if (!File::Spec->file_name_is_absolute($fname)) { + die "File name is not absolute: $fname"; + } + #print STDERR "uniq_file($fname)\n"; + $fname =~ tr!\\!/!; + if (-e $fname) { + #print STDERR "exists $fname\n"; + ### There is an error in 522, compensate for this! + #die substr($fname, -1); + if (substr($fname, -1) eq "/") { chop $fname; } + #print STDERR "exists $fname\n"; + ### Translate .. + if (substr($fname, 1, 1) eq ":") { + my $ffname = Win32::GetFullPathName($fname); + ### Get case + my $lfname = Win32::GetLongPathName($ffname); + #print STDERR "lexists $lfname\n"; + $fname = $lfname if ($lfname ne ""); + } + } else { + #print STDERR "NOT exists $fname\n"; + if (substr($fname, -1) eq "/") { chop $fname; } + my $head = ""; + if (substr($fname, 0, 2) eq "//") { + $head = "//"; + $fname = substr($fname, 2); + } + my @fname = split("/", $fname); + my $tail = pop @fname; + $fname = uniq_dir($head . join("/", @fname)) . $tail; + } + if (substr($fname, 1, 1) eq ":") { + $fname = uc(substr($fname, 0, 1)) . substr($fname, 1); + #print STDERR "fname $fname\n"; + } + $fname =~ tr!\\!/!; + #print STDERR "fname ($fname)\n"; + return $fname; +} +sub uniq_dir($) { + my $dir = shift; + my $uq_dir = uniq_file($dir); + if (substr($uq_dir, -1) ne "/") { $uq_dir .= "/"; } + return $uq_dir; +} + + + +### Relative paths +sub _get_link_root($) { + my $lnk = shift; + if ($lnk =~ m!^(/|ftp://[^/]*|https?://[^/]*|[a-z]:/)!i) { + return $1; + } else { + return ""; + } +} + +sub resolve_dotdot($) { + my $orig_url = shift; + my $root = _get_link_root($orig_url); + return $orig_url if length($root) == length($orig_url); + my $url = substr($orig_url, length($root)); + if (substr($root, -1) eq "/") { + chop $root; + $url = "/$url"; + } + #die "$root\n$url"; + my $iPosSearch = 2; + #print "url=$url\n"; + while ((my $iPos = index($url, "/../", $iPosSearch)) > -1) { + my $sLeft = substr($url, 0, $iPos); + if (substr($sLeft, -2) eq "..") { + $iPosSearch += 3; + next; + } + my $sRight = substr($url, $iPos+3); + #print "url=$url\n"; + #print "iPos=$iPos\n"; + #print "sLeft=$sLeft\n"; + $sLeft =~ s!/[^/]*$!!; + #print "sLeft=$sLeft\n"; + #print "sRight=$sRight\n"; + $url = $sLeft . $sRight; + #print "\t***url=$url\n"; + #print "url=$url\n"; + } + if (index($url, "../") > -1) { + return $orig_url; + } + return $root . $url; +} + +sub mk_relative_link($$;$) { + my $from = shift; + my $to = shift; + my $norm = shift; + if ($norm) { + $from = uniq_file($from); + $to = uniq_file($to); + } + if (-e $from) { + $from = uniq_file($from); + } else { + $from = resolve_dotdot($from); + } + if (-e $to) { + $to = uniq_file($to); + } else { + $to = resolve_dotdot($to); + } + my $root_from = _get_link_root($from); + my $root_to = _get_link_root($to ); + if ($root_from ne $root_to) { + return $to; + } + my @from = split "/", $from; + my @to = split "/", $to; + while (@to) { + last if ($to[0] ne $from[0]); + shift @to; + shift @from; + } + if (@to == 1 && @from == 1) { + if (length($to[0]) > length($from[0])) { + if (substr($to[0], 0, length($from[0])+1) eq ($from[0] . "#")) { + return substr($to[0], length($from[0])); + } + } + } + my $rl; + for (1..$#from) { $rl .= "../"; } + $rl .= join("/", @to); + + return $rl; +} + + + +sub mk_absolute_link($$) { + my $from = shift; + my $rel_to = shift; + my $abs = $from; + $abs =~ s![^/]*$!!; + $abs .= $rel_to; + if (!is_abs_netpath($abs)) { $abs = uniq_file($abs); } + $abs; +} + + +1; diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/PerlLib/html_tags.pm b/emacs.d/nxhtml/nxhtml/html-wtoc/PerlLib/html_tags.pm new file mode 100644 index 0000000..ecdfd53 --- /dev/null +++ b/emacs.d/nxhtml/nxhtml/html-wtoc/PerlLib/html_tags.pm @@ -0,0 +1,127 @@ +# Copyright 2006 Lennart Borgman, http://OurComments.org/. All rights +# reserved. +# +# 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 3, 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. + + +package html_tags; +use strict; + +use vars qw($AUTOLOAD); + +sub _make_attributes { + my($self,$attr) = @_; + return () unless $attr && ref($attr) && ref($attr) eq 'HASH'; + my(@att); + foreach (keys %{$attr}) { + my($key) = $_; + $key=~s/^\-//; # get rid of initial - if present + #$key=~tr/a-z_/A-Z-/; # parameters are upper case, use dashes + $key=~tr/A-Z_/a-z-/; # parameters are lower case in XHTML + push(@att,defined($attr->{$_}) ? qq/$key="$attr->{$_}"/ : qq/$key/); + } + return @att; +} + +sub _tag { + my $tag_name = shift; + my $part = shift; + my($attr) = ''; + if (ref($_[0]) && ref($_[0]) eq 'HASH') { + my(@attr) = html_tags::_make_attributes( '',shift() ); + $attr = " @attr" if @attr; + } + #return "<$tag_name$attr />" unless @_; + return "<$tag_name$attr />" if $part == 1; + return "<$tag_name$attr>" if $part == 2; + my($tag,$untag) = ("<$tag_name$attr\n>",""); + my @result = map { "$tag$_$untag" } (ref($_[0]) eq 'ARRAY') ? @{$_[0]} : "@_"; + return $result[0] if $part == 1; + return "@result"; +} + +sub _mk_tag_sub($$) { + my $name = shift; + my $package = shift; + my $caller = caller; + my $sep = ($name =~ s/^\*//); + my $lc_name = lc $name; + my $code = + ($lc_name =~ m/^(?:br|hr|input|img)$/ ? + "sub $package\:\:$name(;\$\$) { return $caller\:\:_tag('$lc_name',1,\@_); }\n" + : + "sub $package\:\:$name(\$;\$) { return $caller\:\:_tag('$lc_name',0,\@_); }\n" + ); + if ($sep) { + if ($lc_name eq "html") { + $code .= "sub $package\:\:start_$name(\$;\$\$) + {return $caller\:\:_start_html(\@_);}\n"; + $code .= "sub $package\:\:end_$name {return $caller\:\:_end_html();}\n"; + } else { + $code .= "sub $package\:\:start_$name(;\$\$) + {return $caller\:\:_tag('$lc_name',1,\@_);}\n"; + $code .= "sub $package\:\:end_$name {'';}\n"; + } + } + $code; +} +sub _start_html { + my $title = shift; + my $head_tags = shift; + my $body_attr = shift; + # compensate for perl laziness... (will not detect undef sub) + $head_tags = $head_tags . _tag("title", 0, $title); + my $start = + _tag("html", 2) . + _tag("head", 0, $head_tags) . + _tag("body", 2, $body_attr); +} +sub _end_html { + return ''; +} + +sub header(@) { + my @lines = @_; + my $header; + my $type; + while (@lines) { + my $key = shift @lines; my $value = shift @lines; + $header .= "$key: $value\n"; + $type = $value if $key =~ m/content-type/i; + } + $header .= "Content-type: text/html\n" unless defined $type; + $header .= "\n"; +} +sub import { + shift; + my %exported; + $exported{$_}++ for (@_); + my $caller = caller; + my $to_eval = "package $caller;\n"; + for my $name (keys %exported) { + die "Will not redefine $caller\:\:$name" if $caller->can($name); + my $func; + if ($name eq "header") { + $func = "sub header { html_tags::header(); }"; + } + $func = _mk_tag_sub($name, $caller) unless defined $func; + $to_eval .= "$func\n"; + } + eval $to_eval; + die $@ if $@; +} + +1; diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc-template.css b/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc-template.css new file mode 100644 index 0000000..a6ffabb --- /dev/null +++ b/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc-template.css @@ -0,0 +1,141 @@ +/* Main structures >>>>>>>>>>>>>>> */ +.html-wtoc-maintop { + font-size: 1px; + font-size: 1em; + margin-top: 0em; + margin-bottom: 0em; +/* background-color:green; */ +} +.html-wtoc-main { +} + +td.html-wtoc-vdivline { + //background-color: #8be; + width: 0px; +} + +.html-wtoc-search-form { + margin-bottom: 0.1em; +} +.html-wtoc-search { + font-size: 0.8em; + color: green; +} +.html-wtoc-search a { + color: green; +} +/* <<<<<<<<<<<<<<<<<<< */ + + + + +/* Table of content >>>>>>>>>>>>>> */ + +#html-wtoc-id-hidetoc { + height: 20px; + border-bottom: 2px inset #ddf; + border-color: #dff; +} + +#html-wtoc-id-tocdiv { + width: 2.5em; + //background-color: #eff; +} +#html-wtoc-id-logo { + width: 100%; + height: 120px; + padding: 0em; + margin: 0em; + border: 0em; +} +#html-wtoc-id-toc { +} +#html-wtoc-id-tocwidth { + width: 18em; + height: 0em; + padding: 0em; + margin: 0em; + border: 0em; + line-height: 0em; +/* background-color: red; */ +} +#html-wtoc-id-toccol { + width: 18em; +} + +.html-wtoc-contcol { + background-color: #dFEfff; + background-color: #dFEfff; + background-color: #cd950c; + background-color: #eead0e; +} +/* <<<<<<<<<<<<<<<<<<< */ + + + + +/* Buttons etc >>>>>>>>>>>>>>> */ +.html-wtoc-button { + font-size: 0.75em; + font-size: 8pt; + color: #5A5D00; + background-color: #9cf; + background-color: #bcee68; + background-color: #a2cd5a; + padding: 0.2em; + Border-Width: 2px; + Border-Style: outset; + text-align: center; + border-color: #ddf; +} +a.html-wtoc-button { + text-decoration: none; + color: #5A5D00; +} +a.html-wtoc-button:hover { + text-decoration:none; + background-color: #6af; + color:#340; +} + +a.html-wtoc-buttonimg img { + width: 16px; + height: 16px; + padding: 4px; + border: 8px; +} +a.html-wtoc-buttonimg { + border:2px; + margin:2px; + margin-left:2px; + margin-right:2px; +} +a.html-wtoc-buttonimg { + font-size:1px; +} +a.html-wtoc-buttonimg:hover { + margin: 6px; + margin-left:0px; + margin-right:0px; + border-color: #ddf; + border-width: 2px; + border-style: outset; + background-color: #595C00; + background-color: #bef; + background-color: #b9ffb9; +} + +/* <<<<<<<<<<<<<<<<<<< */ + + +#nxhtml-link { + font-size: 0.7em; + text-align: center; + padding-top: 2em; + padding: 1em; +} + +.copyright { + color : #872; +} + diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc-template.html b/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc-template.html new file mode 100644 index 0000000..440ece7 --- /dev/null +++ b/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc-template.html @@ -0,0 +1,143 @@ + + + + + HEAD + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
+ + + + +
+ Show table of content + + + +
+ + + + + +
+ + + + + + + +
%%TOC%%
+
+
+
+
+ + + + + + +
    +

+ +   +

+ %%PAGE%% +

 

+ +
+
+
 
+
+ + diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc.css b/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc.css new file mode 100644 index 0000000..a12cb65 --- /dev/null +++ b/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc.css @@ -0,0 +1,84 @@ +body { + margin: 0; +} +td { + font-size: 1em; +} + +/* Added by html-wtoc.pl >>>>>>>>>>>>> */ +.html-wtoc-mark { +/* background-color: #9cf; */ +/* background-color: #bcee68; */ +/* background-color: #a2cd5a; */ + width: 20px; + padding: 0; + border: 0; + text-align: center; +} +.html-wtoc-contline { + width: 100%; +} + +.html-wtoc-margin { + width: 0.6em; +} +.html-wtoc-contents { + font-size: 0.9em; + padding: 1em; + background-color: #9cf; + background-color: #a2cd5a; + background-color: #efffcf; + background-color: #ffffdf; + -moz-border-radius-topleft: 2em; +} +.html-wtoc-contents td { +/* background-color: #9cf; */ +/* background-color: #bcee68; */ +/* background-color: #a2cd5a; */ +} +.html-wtoc-contents-a { + text-decoration: none; + color: #595C00; +/* background-color: #9cf; */ +/* background-color: #bcee68; */ +/* background-color: #a2cd5a; */ + border: 1px #9cf solid; + border: 1px #a2cd5a solid; + border: 1px #ffffc0 solid; + padding-left: 0.25em; + padding-right: 0; + margin: 1px; + display: block; +} +.html-wtoc-contents a:hover { + text-decoration: none; + background-color: #b9ffb9; + border: 1px #6b8e23 solid; +} +.html-wtoc-currcont { + background-color: #738600; + color: #ffff2f; + background-color: #535600; + border: 1px #6b8e23 inset; + padding-left: 0.25em; + padding-right: 0; + margin: 1px; + display: block; +} +a.html-wtoc-currcont { + text-decoration: none; +} +a.html-wtoc-currcont:hover { + background-color: #738600; + background-color: #536600; + background-color: #434620; +} +/* <<<<<<<<<<<<<<<<<<< */ + + + + + + + + diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc.js b/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc.js new file mode 100644 index 0000000..7f22db7 --- /dev/null +++ b/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc.js @@ -0,0 +1,361 @@ + +// Copyright 2006 Lennart Borgman, http://www.OurComments.org/. All rights reserved. +// +// 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 3, 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. + + +var HTML_WTOC_NS_sCurrTocId; + + +HTML_WTOC_NS = { + + ///////////////////////////// + //// Basic event functions + ///////////////////////////// + + getEventObject : function (ev) { + var o; + if (window.event) + o = window.event.srcElement; + else if (null != ev) + o = ( ev.target ); + return o; + }, + getEvent : function (ev) { + if (window.event) { + return window.event; + } else if (null != ev) { + return ev; + } + }, + + eventStopPropagation : function (e) { + if (e.stopPropagation) + e.stopPropagation(); + else + e.cancelBubble=true; + }, + + eventPreventDefault : function (e) { + if (e.preventDefault) + e.preventDefault(); + else + e.returnValue=false; + }, + + ///////////////////////////// + //// TOC hide + ///////////////////////////// + + show_content : function (on) { + var toc = document.getElementById("html-wtoc-id-toccol").style; + var tdv = document.getElementById("html-wtoc-id-tocdiv").style; + var shw = document.getElementById("html-wtoc-id-showtoc").style; + var hid = document.getElementById("html-wtoc-id-hidetoc").style; + if (on) { + toc.display = ""; + tdv.display = ""; + shw.display = "none"; + hid.display = ""; + HTML_WTOC_NS.focus_page_link(0); + } else { + toc.display = "none"; + tdv.display = "none"; + shw.display = ""; + hid.display = "none"; + } + }, + + + + + + ///////////////////////////// + //// Open-Close + ///////////////////////////// + onblur_action : function(ev) { + HTML_WTOC_NS_sCurrTocId = null; + }, + onfocus_action : function(ev) { + var o = HTML_WTOC_NS.getEventObject(ev); + if (!o) return; + + HTML_WTOC_NS_sCurrTocId = o.id; + }, + onclick_action : function(ev) { + var o = HTML_WTOC_NS.getEventObject(ev); + var e = HTML_WTOC_NS.getEvent(ev); + if (13 == e.keyCode) return true; + if (!o) return true; + if ("IMG" == o.tagName) o = o.parentNode; + var iId = HTML_WTOC_NS.getIdnumFromId(o.id); + var sChildId = "toc_child_"+iId; + var sOldCurrTocId = HTML_WTOC_NS_sCurrTocId; + HTML_WTOC_NS.toggle_open(sChildId, o); + HTML_WTOC_NS_sCurrTocId = sOldCurrTocId; + return false; + }, + + toggle_open : function (id, parent) { + var child = document.getElementById(id).style; + var sInner = parent.innerHTML; + var re = new RegExp("[^/]*\.gif", "i"); + if ("none" == child.display) { + child.display = ""; + parent.innerHTML = sInner.replace(re, "down.gif")+""; + } else { + child.display = "none"; + parent.innerHTML = sInner.replace(re, "right.gif")+""; + } + }, + + + + ///////////////////////////// + //// Load + ///////////////////////////// + + onload_actions : function (iPageNum) { + document.body.onkeydown = HTML_WTOC_NS.onkeydown_action; + document.body.onmouseover = HTML_WTOC_NS.onmouseover_action; + var aATags = document.getElementsByTagName("a"); + for(var i = 0; i < aATags.length; i++) { + var o = aATags[i]; + if (null != HTML_WTOC_NS.getIdnumFromId(o.id)) { + o.onfocus = HTML_WTOC_NS.onfocus_action; + o.onblur = HTML_WTOC_NS.onblur_action; + if (o.id.substr(0, 12) == "opener_text_") { + o.onclick = HTML_WTOC_NS.onclick_action; + o.title = "Open/Close"; + } else if (o.id.substr(0, 7) == "opener_") { + o.onclick = HTML_WTOC_NS.onclick_action; + o.className = "html-wtoc-mark"; + o.title = "Open/Close"; + } + } + } + HTML_WTOC_NS.focus_page_link(iPageNum); + }, + focus_page_link : function (iPageNum) { + // Element might be hidden + try { + document.getElementById("toc_link_"+iPageNum).focus(); + } catch (exc) { + } + }, + + + + + + + + ///////////////////// + //// Mouse + ///////////////////// + + onmouseover_action : function (ev) { + if (null == HTML_WTOC_NS_sCurrTocId) return true; + var o = HTML_WTOC_NS.getEventObject(ev); + var iId = HTML_WTOC_NS.getIdnumFromId(o.id); + if (null == iId) return true; + o.focus(); + }, + + + + ///////////////////// + //// Key + ///////////////////// + + onkeydown_action: function (ev) { + var keyDown = 40; + var keyUp = 38; + var keyLeft = 37; + var keyRight = 39; + var keyReturn = 13; + var keyF2 = 113; + var keyInsert = 45; + // Opera + var keyOperaDown = 57386; + var keyOperaUp = 57385; + var keyOperaLeft = 57387; + var keyOperaRight = 57388; + var keyOperaF2 = 57346; + var keyOperaInsert = 57394; + + var SwitchKey = keyInsert; + var SwitchKeyOpera = keyOperaInsert; + + var bUp; + var e = HTML_WTOC_NS.getEvent(ev); + if (null == HTML_WTOC_NS_sCurrTocId) { + switch (e.keyCode) { + case SwitchKey: + case SwitchKeyOpera: + HTML_WTOC_NS.focus_page_link(0); + HTML_WTOC_NS.eventStopPropagation(e); + HTML_WTOC_NS.eventPreventDefault(e); + return false; + } + return true; + } + switch (e.keyCode) { + case keyLeft: + case keyOperaLeft: + case keyRight: + case keyOperaRight: + HTML_WTOC_NS.handle_leftright_keys(e); + HTML_WTOC_NS.eventStopPropagation(e); + HTML_WTOC_NS.eventPreventDefault(e); + return false; + case keyDown: + case keyOperaDown: + bUp = false; + break; + case keyUp: + case keyOperaUp: + bUp = true; + break; + case SwitchKey: + case SwitchKeyOpera: + if (null != HTML_WTOC_NS_sCurrTocId) { + var o = document.getElementById(HTML_WTOC_NS_sCurrTocId); + if (o) o.blur(); + HTML_WTOC_NS_sCurrTocId = null; + } + HTML_WTOC_NS.eventStopPropagation(e); + HTML_WTOC_NS.eventPreventDefault(e); + return false; + default: + //alert(e.keyCode); + return true; + } + var oOpener; + oOpener = HTML_WTOC_NS.getNextVisOpener(HTML_WTOC_NS_sCurrTocId, bUp); + oOpener.focus(); + HTML_WTOC_NS.eventStopPropagation(e); + HTML_WTOC_NS.eventPreventDefault(e); + return false; + }, + + handle_leftright_keys: function (e) { + var keyLeft = 37; + var keyRight = 39; + var keyOperaLeft = 57387; + var keyOperaRight = 57388; + var iId = HTML_WTOC_NS.getIdnumFromId(HTML_WTOC_NS_sCurrTocId); + if (null == iId) return; + var sId = "opener_" + iId; + var oOpener = document.getElementById(sId); + var sId = HTML_WTOC_NS_sCurrTocId; // It will be cleared before getNextVis + + var bOpenAction; + var bOpened; + var bUp; + var oChild = document.getElementById("toc_child_"+iId); + if (null == oChild) { + } else { + bOpened = (oChild.style.display != "none"); + } + switch (e.keyCode) { + case keyLeft: + case keyOperaLeft: + bUp = true; + bOpenAction = (null != bOpened) && (bOpened); + break; + case keyRight: + case keyOperaRight: + bUp = false; + bOpenAction = (null != bOpened) && (!bOpened); + break; + default: + alert("bad key handling..."); + } + if (bOpenAction) { + oOpener.click(); + HTML_WTOC_NS_sCurrTocId = sId; + } else { + var oPrev = HTML_WTOC_NS.getNextVisOpener(sId, bUp); + oPrev.focus(); + } + }, + + + + + + + ////////////////////// + //// Util + ////////////////////// + getNameFromId: function (sId) { + var re = new RegExp("(.*?_)(\\d+)", "i"); + if (!re.test(sId)) return null; + var iId = sId.replace(re, "$1"); + return iId; + }, + getIdnumFromId: function (sId) { + var re = new RegExp("(.*?_)(\\d+)", "i"); + if (!re.test(sId)) return null; + var iId = sId.replace(re, "$2"); + return iId; + }, + + + getNextVisOpener: function (sId, bUp, bTrace) { + if (bTrace) alert("getNextVisOpener("+sId+","+bUp+")"); + var iId = HTML_WTOC_NS.getIdnumFromId(sId); + if (null == iId) { + alert("getNextVisOpener err iId==null"); + return; + } + var sIdName = HTML_WTOC_NS.getNameFromId(sId); + if (null == sIdName) { + alert("getNextVisOpener err sIdName==null"); + return; + } + var oOpener; + var iLoop = -2; + while (oOpener == null) { + if (bTrace) alert(iId); + if (iLoop++ > iMaxChildNum) { alert("Child num error"); return; } + if (!bUp) { + iId++; + } else { + iId--; + } + if (iId > iMaxChildNum) { iId = 0; } + if (iId < 0) { iId = iMaxChildNum; } + var s = sIdName+iId; + oOpener = document.getElementById(s); + if (oOpener != null) { + if (bTrace) alert(oOpener.offsetLeft); + if (oOpener.style.display == "none") { // All + oOpener = null; + } else if (oOpener.offsetLeft < 0) { // IE + oOpener = null; + } else if (0 == oOpener.scrollWidth) { // Opera + oOpener = null; + } + } + } + return oOpener; + } + + + +}; //HTML_WTOC_NS diff --git a/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc.pl b/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc.pl new file mode 100644 index 0000000..56c0e21 --- /dev/null +++ b/emacs.d/nxhtml/nxhtml/html-wtoc/html-wtoc.pl @@ -0,0 +1,1395 @@ +#! perl + +# Copyright 2006, 2007 Lennart Borgman, http://OurComments.org/. All +# rights reserved. +# +# 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. + +use strict; +use File::Copy; +use File::Spec; +#use File::Path qw(); +use File::Path; +use File::Find qw(); +use FindBin; + +use lib "$FindBin::Bin/PerlLib"; +use PathSubs qw(); +use html_tags qw( +*html header +div +table Tr td +p hr br +a span img b +); + +### Script start parameters +my $m_param_action; +my $m_param_files = 1; +my $m_param_pnum = 0; +my $m_param_single = 0; +my $m_param_Template; +my $m_param_InPages; +my $m_param_OutRoot; +my @m_param_InRoot; +my $m_param_Overwrite; + +### Globals +my $m_iAlwaysOpenedLevel = 0; +my $m_sCommonIn; +my $m_sInPagesFolder; +my $m_sTemplateFolder; +my $m_sStartTemplate; +my $m_sBodyTemplate; +#my $m_sEndTemplate; +my $m_bBorders = 0; +my @pages; +my %page_num; +my %js_show_page; +my $m_TemplateTime; +my $m_InPagesTime; +my %m_linked_files; + +sub get_params(); +sub get_template(); +sub read_page_list($); +sub find_pages($$); +sub write_pages(); +sub send_page(); +sub find_template_files(); +sub find_linked_from_pages(); +sub copy_wtoc_files(); +sub copy_linked_files(); + +#push @pages, [$ind, $tit, $full_fil, $anc, $hrf, $trg, $tip]; +sub IND { 0 } +sub TIT { 1 } +sub FULL_FIL { 2 } +sub ANC { 3 } +sub HRF { 4 } +sub TRG { 5 } +sub TIP { 6 } + +########################################################## +### Main +########################################################## +print "\n"; +get_params(); +if ($m_param_action eq "FIND") { + find_pages(\@m_param_InRoot, $m_param_InPages); +} elsif($m_param_action eq "MERGE") { + get_template(); + read_page_list($m_param_InPages); + find_template_files(); + copy_wtoc_files(); + if ($m_param_files) { + write_pages(); + } else { + send_page(); + } + find_linked_from_pages(); + copy_linked_files(); +} elsif($m_param_action eq "TOC") { +} +exit; + +sub copy_if_newer_or_overwrite($$) { + my $in_file = shift; + my $out = shift; + my $out_file = $out; + if (-d $out) { + my ($in_v, $in_d, $in_f) = File::Spec->splitpath( $in_file ); + my ($out_v,$out_d,$out_f) = File::Spec->splitpath( $out, 1 ); + $out_file = File::Spec->catpath( $out_v, $out_d, $in_f ); + } + my $should_write = 1; + if (-e $out_file) { + if ($m_param_Overwrite) { + my $in_mdt = (stat $in_file)[9]; + my $outmdt = (stat $out_file)[9]; + if (($outmdt > $in_mdt)) { + $should_write = 0; + } + } else { + $should_write = 0; + } + } + if ($should_write) { + if (!File::Copy::syscopy($in_file, $out_file)) { + die "syscopy($in_file, $out_file): $!"; + } else { + print " $in_file => $out_file\n"; + } + } +} # copy_if_newer_or_overwrite + +sub copy_wtoc_files() { + print "\n**** Copy html-wtoc files\n"; + mkdir $m_param_OutRoot, 0777; + my $css_file = $FindBin::Bin . "/html-wtoc.css"; + copy_if_newer_or_overwrite($css_file, $m_param_OutRoot); + my $js_file = $FindBin::Bin . "/html-wtoc.js"; + copy_if_newer_or_overwrite($js_file, $m_param_OutRoot); + my $OutRootImg = $m_param_OutRoot . "img/"; + mkpath($OutRootImg); + my $imgsrc = $FindBin::Bin . "/img/"; + opendir(IMGDIR, $imgsrc) or die "Can't opendir $imgsrc: $!"; + while (my $imgfile = readdir(IMGDIR)) { + my $outimg = $OutRootImg . $imgfile; + $imgfile = $imgsrc . $imgfile; + #print STDERR ">>>$imgfile\n"; + if (-f $imgfile) { + copy_if_newer_or_overwrite($imgfile, $outimg); + } + } + closedir(IMGDIR); +} # copy_wtoc_files + +sub add_to_linked_files($$) { + my $from_file = shift; + my $to_file = shift; + if (exists $m_linked_files{$to_file}) { + my $old_from = $m_linked_files{$to_file}; + unless ($old_from eq $from_file) { + die "Both $from_file and $old_from should be copied to $to_file"; + } + } + $m_linked_files{$to_file} = $from_file; +} # add_to_linked_files + +sub copy_linked_files() { + print "\n**** Copy linked files\n"; + my %pages; + for my $pnum (0..$#pages) { + $pages{ full_in_name($pnum) } = 1; + } + for my $to_file (keys %m_linked_files) { + my $from_file = $m_linked_files{$to_file}; + unless (exists $pages{$from_file}) { + if (-e $from_file) { + mkpath4file($to_file); + copy_if_newer_or_overwrite($from_file, $to_file); + } + } + } +} # copy_linked_files + +sub find_linked_files($;$) { + my $in_file = shift; + my $out_file = shift; + $out_file = in2out($in_file) unless ($out_file); + my $whole = get_file($in_file); + while ($whole =~ m!(?:\s|^)(?:href|src)="(.*?)"!gis) { + my $l = $1; + next unless $l =~ m!\.(?:css|js|jpg|jpeg|gif|png)$!; + if (!File::Spec->file_name_is_absolute($l)) { + next if $l =~ m!^javascript:!; + next if $l =~ m!^http://!; + next if $l =~ m!^ftp://!; + next if $l =~ m!^mailto:!; + } + my $rel_l = $l; + my $full_in = $l; + if (File::Spec->file_name_is_absolute($l)) { + $rel_l = PathSubs::mk_relative_link($in_file, $l); + } else { + $full_in = PathSubs::mk_absolute_link($in_file, $l); + } + my $full_out = PathSubs::mk_absolute_link($out_file, $rel_l); + add_to_linked_files($full_in, $full_out); + } +} # find_linked_files + +sub find_template_files() { + print "\n**** Find files referenced in template file\n"; + my $in_file = $m_param_Template; + my $out_file = $m_param_OutRoot . "dummy.htm"; + find_linked_files($in_file, $out_file); +} +sub find_linked_from_pages() { + for my $pnum (0..$#pages) { + next unless defined $pages[$pnum][FULL_FIL]; + next unless $pages[$pnum][FULL_FIL] ne ""; + next if defined $pages[$pnum][TRG]; + find_linked_files( full_in_name($pnum) ); + } +} + +sub should_write_merged($$) { + my $pnum = shift; + my $out_file = shift; + my $should_write = 1; + if (-e $out_file) { + if ($m_param_Overwrite) { + my $srcmdt = page_src_time($pnum); + my $outmdt = (stat $out_file)[9]; + if (($outmdt > $srcmdt) + && ($outmdt > $m_TemplateTime) + && ($outmdt > $m_InPagesTime)) { + $should_write = 0; + } + } else { + $should_write = 0; + } + } + return $should_write; +} +sub write_pages() { + #print STDERR "*** param_OutRoot=$m_param_OutRoot\n"; + if ($m_param_single) { + my $out_file = $m_param_OutRoot . "single_$m_param_pnum.html"; + if (should_write_merged($m_param_pnum, $out_file)) { + my $page = create_single_page($m_param_pnum); + $page = shrink($page); + create_file_and_path($out_file, $page); + } + } else { + my $iPages = 0; + print "\n*** Creating pages:\n"; + for my $pnum (0..$#pages) { + next unless defined $pages[$pnum][FULL_FIL]; + next unless $pages[$pnum][FULL_FIL] ne ""; + next if defined $pages[$pnum][TRG]; + $iPages++; + my $out_file = full_out_name($pnum); + if (should_write_merged($pnum, $out_file)) { + my $page = create_page($pnum); + next unless $page; + print " Creating page $iPages: " . full_in_name($pnum) . "\n"; + $page = shrink($page); + print "\t=> $out_file\n"; + create_file_and_path($out_file, $page); + } + } + } +} # write_pages + +sub send_page() { + my $page = ($m_param_single ? + create_single_page($m_param_pnum) + : + create_page($m_param_pnum) ); + print $page; +} # send_page + +########################################################## +### Params +########################################################## +sub die_usage() { + my $sScript = $0; + $sScript =~ tr!\\!/!; + $sScript =~ s!.*/(.*)!$1!; + die qq(Usage: + Making preliminary file list: + $sScript find in="in-dir" pages="pages-file" [overwrite=1] + + Merging pages and table of contents: + $sScript merge pages="pages-file" outroot="out-dir" template="template-file" [overwrite=1] + + \n); +} +#use Getopt::Long; +sub get_params() { + $| = 1; + for my $arg (@ARGV) { print " "; print $arg; } print "\n\n"; + die_usage() unless $#ARGV > 0; + $m_param_action = $ARGV[0]; + $m_param_action =~ tr/a-z/A-Z/; + #push @m_param_InRoot, $FindBin::Bin . "/doc/"; + #$m_param_OutRoot = $FindBin::Bin . "/tmp/"; + #$m_param_Template = $FindBin::Bin . "/doc/home_template.htm"; + #$m_param_InPages = $FindBin::Bin . "/doc/toc_pages.txt"; + for (my $i = 1; $i <= $#ARGV; $i++) { + my ($k, $v) = ($ARGV[$i] =~ m!(.*?)=(.*)!); + $v =~ tr!\\!/!; + if ($k eq "in") { + $v = PathSubs::uniq_file($v); + $v .= "/" unless substr($v, -1) eq "/"; + push @m_param_InRoot, $v; + } elsif( $k eq "outroot") { + $v = PathSubs::uniq_dir($v); + $v .= "/" unless substr($v, -1) eq "/"; + $m_param_OutRoot = $v; + } elsif( $k eq "pages") { + $v = PathSubs::uniq_file($v); + $m_param_InPages = $v; + } elsif( $k eq "template") { + $v = PathSubs::uniq_file($v); + $m_param_Template = $v; + } elsif( $k eq "overwrite" ) { + $m_param_Overwrite = $v; + } elsif( $k eq "openedlevel" ) { + $m_iAlwaysOpenedLevel = $v * 1; + } else { + die "Unknown parameter: $ARGV[$i]\n"; + } + } + if($m_param_action eq "FIND") { + if ($#m_param_InRoot < 0) { die_usage(); } + if (! defined $m_param_InPages) { die_usage(); } + } elsif($m_param_action eq "MERGE") { + if (! defined $m_param_InPages) { die_usage(); } + if (! defined $m_param_OutRoot) { die_usage(); } + if (! defined $m_param_Template) { die_usage(); } + $m_sTemplateFolder = $m_param_Template; + $m_sTemplateFolder =~ s![^/]*$!!; + } else { + die_usage(); + } + + $m_sInPagesFolder = $m_param_InPages; + $m_sInPagesFolder =~ s![^/]*$!!; + print "Parameters:\n"; + print " " . $m_param_action . "\n"; + print " pages=" . $m_param_InPages . "\n"; + print " outroot=" . $m_param_OutRoot . "\n"; + print " template=" . $m_param_Template . "\n"; + if (defined $m_param_Overwrite) { + print " overwrite=" . $m_param_Overwrite . "\n"; + } + #if ($#m_param_InRoot == -1) { push @m_param_InRoot,$m_sInPagesFolder; } +} + +sub get_template() { + my $sTemplate = get_file($m_param_Template, 1); + $m_TemplateTime = (stat $m_param_Template)[9]; + $m_InPagesTime = (stat $m_param_InPages)[9]; + $sTemplate =~ s///gs; + if ( $sTemplate =~ m!(.*?)(.*)!si ) { + $m_sStartTemplate = $1; + $m_sBodyTemplate = $2; + #$m_sEndTemplate = $3; + } else { + die "Can't find body of template\n"; + } +} # get_template + +sub read_page_list($) { + my $sPagesFile = shift; + my @in_files; + open(P,$sPagesFile) or die "Can't open toc list file $sPagesFile: $!\n"; + while (my $sLine =

) { + chomp $sLine; + $sLine =~ s/^\s+|\s+$//g; + next if $sLine eq ""; + next if substr($sLine, 0, 1) eq ";"; + #print STDERR "$sLine\n"; + my ($ind, $tit, $ref, $tip, $trg, $ico) + = map { s/^\s+|\s+$//g; $_; } split("###", $sLine); + #warn "trg=$trg\n" if defined $trg; + my ($fil, $anc) = ("", ""); + my $hrf = ""; + my $full_fil = ""; + #$ref = "" unless defined $ref; + #print STDERR "ref=$ref\n"; + if (defined $ref) { + if (defined $trg) { undef $trg unless $trg ne ""; } + if ((defined $trg) || ($ref =~ m/https?:/i)) { + $hrf = $ref; + } else { + ($fil, $anc) = split('#', $ref); + if ($ind >= 0) { + if (File::Spec->file_name_is_absolute($fil)) { + $full_fil = $fil; + } else { + $full_fil = PathSubs::uniq_file($m_sInPagesFolder . $fil); + } + } + } + } + if ((!$tip) && ($full_fil ne "")) { + $tip = get_title($full_fil); + } + push @pages, [$ind, $tit, $full_fil, $anc, $hrf, $trg, $tip]; + push @in_files, $full_fil if !defined $trg; + } + close P; + $m_sCommonIn = get_common_root(\@in_files). "/"; +} # read_page_list + + + +sub get_common_root($) { + my $psRoots = shift; + my @sCommon; + for my $s (@$psRoots) { + my $full_s = PathSubs::uniq_file($s); + my @full_s = split("/", $full_s); + if ($#sCommon == -1) { + @sCommon = @full_s; + } else { + my $iMax = $#sCommon; if ($#full_s < $iMax) { $iMax = $#full_s; } + for (my $i = 0; $i <= $iMax; $i++) { + if ($sCommon[$i] ne $full_s[$i]) { + #print STDERR "$i: $sCommon[$i] != $full_s[$i]\n"; + @sCommon = @sCommon[0..$i-1]; + last; + } + } + } + } + my $sCommon = join("/", @sCommon); + return $sCommon; +} # get_common_root + + +sub find_pages($$) { + my $pasInRoot = shift; + my $sOutFile = shift; + if (!$m_param_Overwrite) { + die "Don't want to overwrite existing output file $sOutFile!\n" if -e $sOutFile; + } + my $root_level; + my $sList; + my $handle_file = + sub { + return unless m/.html?/i; + return if -d $_; + my $fname = PathSubs::uniq_file($_); + die "Can't read $fname\n" unless -r $_; + my $title = get_title($_); + my $level = $fname =~ tr!/!!; + $level -= $root_level; + my $rel_fname = PathSubs::mk_relative_link($sOutFile, $fname); + $sList .= "$level ### $title ### $rel_fname\n"; + }; + for my $sInRoot (@$pasInRoot) { + $sInRoot = PathSubs::uniq_file($sInRoot); + chop($sInRoot) if (substr($sInRoot, -1) eq "/"); + $root_level = $sInRoot =~ tr!/!!; + File::Find::find($handle_file, $sInRoot); + } + create_file($sOutFile, $sList); +} # find_pages + + +########################################################## +### File - page helpers +########################################################## + +sub file_name($) { + my $num = shift; + return $pages[$num][FULL_FIL]; +} +sub file_anchor($) { + my $num = shift; + return $pages[$num][ANC]; +} +sub file_href($) { + my $num = shift; + #die $pages[$num][HRF] if defined $pages[$num][HRF]; + return $pages[$num][HRF]; +} +sub file_target($) { + my $num = shift; + return $pages[$num][TRG]; +} +sub file_title($) { + my $num = shift; + return $pages[$num][TIT]; +} +sub file_tip($) { + my $num = shift; + return $pages[$num][TIP]; +} +sub full_in_name($) { + my $num = shift; + my $name = file_name($num); + return $name; +} +sub full_out_href($) { + my $num = shift; + my $anchor = file_anchor($num); + my $full_href = full_out_name($num); + warn "full_href is null" unless $full_href; + if ((defined $anchor) && ($anchor ne "")) { $full_href .= "#" . $anchor; } + return $full_href; +} +sub full_out_name($) { + my $num = shift; + my $in_name = file_name($num); + return unless $in_name; + my $anchor = file_anchor($num); + #$m_param_OutRoot . $name; + $anchor = ""; + my $name = substr($in_name, length($m_sCommonIn)); + if ($anchor) { + my $base; + my $ext; + for (my $i = length($name);$i>0;$i--) { + if (substr($name, $i, 1) eq ".") { + $base = substr($name, 0, $i-1); + $ext = substr($name, $i); + $name = $base . "_sharp_" . $anchor . $ext; + last; + } + } + } + $m_param_OutRoot . $name; +} +sub replace_name_link($) { + my $page = shift; + for my $k (keys %page_num) { + my $num = $page_num{$k}; + my $href = ($m_param_single ? "javascript:ShowPage($num)" : file_name($num)); + $page =~ s!%%$k%%!$href!gs; + } + return $page; +} + +########################################################## +### File name helpers +########################################################## +sub in2out($) { + my $in_name = shift; + die "in2out: File name is not abs: $in_name" unless File::Spec->file_name_is_absolute($in_name); + my $name = substr($in_name, length($m_sCommonIn)); + $m_param_OutRoot . $name; +} + +########################################################## +### File reading/writing +########################################################## + +sub mkpath4file($) { + my $file = shift; + my $path = $file; + $path =~ s|[^/]*$||; + File::Path::mkpath($path); +} +sub create_file($$) { + my ($out_file, $page) = @_; + if (!$m_param_Overwrite) { + if (-e $out_file) { die "Will not overwrite $out_file\n"; } + } + open(OUT, ">$out_file") or die "Can't create $out_file: $!"; + print OUT $page; + close OUT; + chmod 0111|((stat $out_file)[2]&07777), $out_file +} +sub create_file_and_path($$) { + my ($out_file, $page) = @_; + mkpath4file($out_file); + create_file($out_file, $page); +} + + +sub get_file($$) { + my ($file, $need) = @_; + if (open(FL, $file)) { + local $/; + my $whole = ; + close FL; + return $whole; + } else { + my $err = $!; + die "Can't open $file: $err\n" if $need; + return ""; + } +} + +sub get_title($) { + my $file = shift; + open(H, $file) or die "Can't open and get title from $file: $!"; + while (my $line = ) { + if ($line =~ m!(.*?)!i) { close H; return $1; } + } + close H; +} + + + +########################################################## +### Html parsing etc +########################################################## + +sub get_head_from_file($) { + my $fname = shift; + my $err; + my $head = get_head(get_file($fname, 1), \$err); + die "\n\n$fname\n\t" . $err if defined $err; + return $head; +} +# BUG: These actually requires parsing of the file, but it does not +# seem very important: +sub get_head($$) { + my $html = shift; + my $perr = shift; + return "" unless $html; + $html =~ s///g; + if ($html =~ m!(.*)!is) { + return $1; + } + $$perr = "Can't find -tag in $html\n"; +} +sub get_body($) { + my $html = shift; + return "" unless $html; + $html =~ s///gs; + if ($html =~ m!]*>(.*)!is) { + return $1; + } + die "Can't find -tag in $html\n"; +} + +sub shrink($) { + my $str = shift; + my $out_str = ""; + my @str = split("\n", $str); + my $in_pre = 0; + for my $s (@str) { + if ($s =~ m!

!i)  { $in_pre = 1; }
+        if ($s =~ m!
!i) { $in_pre = 0; } + $s =~ s!^(\s*)!! unless $in_pre; + $out_str .= $s . "\n"; + } + return $out_str; + $str =~ s!^(\s*)!!gm; + $str; +} + + +########################################################## +### Making what we see +########################################################## + +sub mk_search() { + return "" if ! $m_param_single; + return qq[ + + Sk + ]; +} +sub mk_main_table($$$$$) { + my $left = shift; + my $main = shift; + my $srch_table = shift; + my $sFile = shift; + my $pNum = shift; + my $search_tr = ""; + if ($m_param_single) { + $search_tr = + Tr( + td("  ") + . td({-valign=>'bottom', }, mk_search(), ) ) + } + my $cont_table = + table( + { -border=>"$m_bBorders", -cellpadding=>0, -cellspacing=>0, + -width=>"100%", + -id=>"html-wtoc-contents", + #-style=>"display:", + -summary=>"Table of contents", + }, + Tr( + #td("  ") + td({-class=>"html-wtoc-margin"}) + . td({-valign=>'top'}, $left) ) + . $search_tr + ) + ; + my $page = $m_sBodyTemplate; + $page = replace_template_links($m_sBodyTemplate, $sFile); + $page =~ s!%%TOC%%!$cont_table!; + $page =~ s!%%PAGE%%!$main!; + return $page; +} # mk_main_table + + +sub find_ind_level_prev($) { + my $lThis = shift; + for (my $i = $lThis - 1; $i > 0; $i--) { + my $ind_lev = $pages[$i][IND]; + if ($ind_lev < 50) { return $ind_lev; } + } + return undef; +} +sub find_ind_level_next($) { + my $lThis = shift; + #print "find_ind_level_next($lThis)"; + #print ", "; + #print file_title($lThis); + #print "\n"; + #for (my $i = $lThis; $i < $#pages; $i++) { + for (my $i = $lThis + 1; $i <= $#pages; $i++) { + my $ind_lev = $pages[$i][IND]; + if ($ind_lev < 50) { return $ind_lev; } + } + return undef; +} + + + + + + + + +sub mk_opener_elem($$$) { + my $iPi = shift; + my $sHref = shift; + my $bOpened = shift; + my $Aattrib = + { + -id =>"opener_$iPi", + }; + if ($sHref) { $$Aattrib{href} = $sHref; } + my $sImg; + my $sAlt; + if ($bOpened) { + $sImg = "down"; + $sAlt = "Close"; + } else { + $sImg = "right"; + $sAlt = "Open"; + } + return + a( + $Aattrib, + img({ + -src=>"img/$sImg.gif", + -alt=>$sAlt, + -border=>0, + -width=>12, + -height=>12, + }, + ), + ); +} # mk_opener_elem + +sub mk_content($) { + my $pnum = shift; + if (!$pages[$pnum]) { + return br(); + } + my $cont; + my @father; + my @child_trace; + my $this_indent = $pages[$pnum][IND]; + my $this_file = $pages[$pnum][FULL_FIL]; + if ($this_indent == -2) { + return ""; + } + my $this_href = full_out_name($pnum); + #my $anchor = file_anchor($pnum); + #if (defined $anchor) { $this_href .= "#" . $anchor; } + my @size; + $size[0] = "1em"; + $size[1] = "0.8em"; + $size[2] = "0.8em"; + + + + ### Open all main level nodes + my @opened; # rename to visible!!!!! + for my $pi (0..$#pages) { + my $indent = $pages[$pi][IND]; + if ($indent <= $m_iAlwaysOpenedLevel) { + $opened[$pi] = 1; + } else { + $opened[$pi] = 0; # more simple to handle + } + } + + + + ### Open ancestors and older sisters (if not a standalone node) + my $pnum_indent = $pages[$pnum][IND]; + my $high_open = $pnum_indent; + my $standalone_open = 10; + if ($high_open < $standalone_open) { ### Not a standalone node + for (my $pi = $pnum; $pi >= 0; $pi--) { + my $pi_indent = $pages[$pi][IND]; + if ($high_open >= $pi_indent) { + $opened[$pi] = 1; + $high_open = $pi_indent; + for (my $ps = $pi+1; $ps <= $#pages; $ps++) { + my $ps_indent = $pages[$ps][IND]; + last if $ps_indent < $pi_indent; + $opened[$ps] = 1 if $ps_indent == $pi_indent; + } + } + last if $pi_indent == 0; + } + } + + + + + ### Open direct childs and younger sisters + my $maybe_child = 1; + my $more_sisters = 1; + my $max_open_indent = $pnum_indent; + for my $pi ($pnum+1..$#pages) { + my $pi_indent = $pages[$pi][IND]; + if ($pi_indent <= $max_open_indent) { $maybe_child = 0; } + if ($pi_indent < $pnum_indent) { $more_sisters = 0; } + if ($pi_indent == $pnum_indent) { + if ($more_sisters) { $opened[$pi] = 1; } + $maybe_child = 0; + } elsif ($pi_indent == $pnum_indent+1) { + if ($maybe_child) { $opened[$pi] = 1; } + } + } + #exit if $pnum == 3; + + + + + ### Open all in the same file (necessary for non-JavaScript) + for my $pi (0..$#pages) { + my $file = $pages[$pi][FULL_FIL]; + #printf STDERR "file - open=(%s)\n", $file; + #if ($file eq $this_file) { + if ($file eq $this_file) { + $opened[$pi] = 1; + } + if ($file eq "") { + if ($pi < $#pages) { + if ($pages[$pi][IND] < $pages[$pi+1][IND]) { + $opened[$pi+1] = 1; + } + } + } + if ($pages[$pi][IND] > 10) { + $opened[$pi] = 0; + #print ">>>>>>>>\$opened[$pi] = 0;\n"; + } + #print STDERR "+++++++++\$opened[$pi] = $opened[$pi]\n"; + } + + + + + ### Make the actual contents + my $tooltip; + my $child_id; + for my $pi (0..$#pages) { +# if (!$pages[$pi][FULL_FIL] && !$pages[$pi][HRF]) { +# my $txt = file_title($pi); #$pages[$pi][TIT]; +# $txt = qq(


) if $txt eq "-"; +# $cont .= $txt; +# $cont .= br(); +# next; +# } + my $txt = file_title($pi); #$pages[$pi][TIT]; + if ($txt eq "-") { + $txt = qq(


); + $cont .= $txt; + $cont .= br(); + next; + } + #if ($pages[$pi][TRG]) { + # next; + #} + #next if ! defined $opened[$pi]; + #next if ! $opened[$pi]; + my $ind_lev = $pages[$pi][IND]; + next if $ind_lev > 50; + my $ind_lev_next = find_ind_level_next($pi); + #my $ind_lev_prev = find_ind_level_prev($pi); + + my $this_entry = ""; + + ### Child id from previous row + if (defined $child_id) { + my $display = ""; + if (!$opened[$pi]) { + $display = qq(style="display:none"); + } else { + } + $this_entry .= "\n

\n"; + undef $child_id; + } + my $opener_elem = ""; #qq( ); + my $childs_are_visible = ($pi == $pnum); + if ($pi < $#pages) { + if ($pages[$pi][IND] < $pages[$pi+1][IND]) { + if ($opened[$pi+1]) { $childs_are_visible = 1; } + } + } + #if ($pages[$pi][IND] < $m_iAlwaysOpenedLevel) { $childs_are_visible = 1; } + + my $file_href; + my $target; + my $href; + my $href_self; + my $target_attrib; + my $title = file_title($pi); + my $file_name = file_name($pi); + if ($title) { + $file_href = file_href($pi); # || ""; + $target = file_target($pi); + $href = + ($file_name ? + ($m_param_files ? + ($m_param_single ? "JavaScript:ShowPage($pi);" : + ($file_href ne ""? $file_href + : + PathSubs::mk_relative_link($this_href, full_out_href($pi)))) + : + ($m_param_single ? "JavaScript:ShowPage($pi)" : "?pnum=$pi") + ) + : + (File::Spec->splitpath($this_href))[2]); + if ($pi == $pnum) { + $href_self = $this_href; + if ($href_self =~ m!([^/\\]*$)!) { + $href_self = $1; + } + } + $target_attrib = (defined $target? qq(target="$target"): ""); + } else { + $href = ""; + $target_attrib = ""; + } + + if (defined $ind_lev_next && $ind_lev_next > $ind_lev) { + $child_id = "toc_child_$pi"; + #print " child_id=$child_id\n"; + push @child_trace, $child_id; + $opener_elem = mk_opener_elem($pi, + ($href? $href : $href_self), + $childs_are_visible); + } + $title =~ s/_/ /go; + my $indent = ($ind_lev ? " " x (($ind_lev-1) * 4) : ""); + my $size = $size[$ind_lev]; + $title = b($title) if $ind_lev == 0; + + my $Aattrib = + { + id=>"toc_link_$pi", + onclick=>"html_wtoc_nailing(this)", + }; + if (!$file_name) { + $Aattrib = + { + id=>"opener_text_$pi", + }; + } + if ($pi == $pnum) { + ### Current page + $$Aattrib{class} = "html-wtoc-currcont"; + $$Aattrib{title} = "You are here"; + $$Aattrib{href} = $href_self; + $this_entry .= + table({ + -cellspacing=>0, + -cellpadding=>0, + -class=>"html-wtoc-contline", + -border=>0, + -summary=>"Formatter", + }, + Tr({ + }, + td({ + }, + a( + $Aattrib, + $indent . $title . " " + ) + ) + . td({ + -class=>"html-wtoc-mark", + }, + $opener_elem + ) + ) + ); + + + + + } else { + ### Link to other page + if (file_title($pi)) { + $tooltip = $pages[$pi][TIP]; + if (!defined $tooltip) { $tooltip = "Go to the page $title"; } + $$Aattrib{class} = "html-wtoc-contents-a"; + my $a_or_span; + if (!defined $href) { + $a_or_span = span($Aattrib, $indent . $title); + } else { + $$Aattrib{title} = $tooltip; + $$Aattrib{href} = $href; + if (defined $target) { $$Aattrib{target} = $target; } + $a_or_span = a($Aattrib, $indent . $title); + } + $this_entry .= + table({ + -cellspacing=>0, + -cellpadding=>0, + -class=>"html-wtoc-contline", + -border=>0, + -summary=>"Formatter", + }, + Tr({ + }, + td({ + }, + $a_or_span + ) + . td({ + -class=>"html-wtoc-mark", + }, + $opener_elem + ) + ) + ); + } else { + $this_entry .= $indent . " " . $title; + #die $this_entry; + } + } + if ((!defined $ind_lev_next) || $ind_lev_next <= $ind_lev) { + my $ind_end = $ind_lev; + if (defined $ind_lev_next) { $ind_end = $ind_lev_next+1; } + for (my $i = $ind_end; $i <= $ind_lev; $i++) { + my $end_id = pop @child_trace; + if (defined $end_id) { + $this_entry .= "
"; # end childs' span + #print " end $end_id\n"; + } + } + } + $cont .= $this_entry; + $father[$ind_lev] = $pi; + } #for my $pi (0..$#pages) + + $cont = div({-class=>"html-wtoc-contents"}, $cont) . p(" "); + #$cont =~ s|<|\n<|gms; + #$cont =~ tr!\n\r! !; + $cont =~ s{ + (\ssrc=)"(.*?)" + } + { + my $s1 = $1; + my $src = $2; + if (!PathSubs::is_abs_path($src)) { + my $srcabs = PathSubs::mk_absolute_link(full_out_name(0), $src); + $src = PathSubs::mk_relative_link(full_out_name($pnum), $srcabs); + }; + "${s1}\"$src\""; + }egsmx; + $cont; +} # mk_content + +sub mk_main_window($) { + my $pnum = shift; + my $full_name = full_in_name($pnum); + return unless defined $full_name; + return get_body(get_file($full_name, 1)); +} + + + + + + + + +########################################################## +### The JavaScripts and styles we need +########################################################## + +sub mk_style($) { + return ""; + my $pnum = shift; + my $rel_link = + PathSubs::mk_relative_link(full_out_name($pnum), $m_param_OutRoot . "html-wtoc.css"); + return qq(\n); +} +sub mk_js($) { + my $pnum = shift; + return <<__HTML_END_JS_PNUM__; + +__HTML_END_JS_PNUM__ + return ""; + my $single_js = ""; + if ($m_param_single) { + $single_js = qq[if (!document.all) { navigate("0.html"); }]; + my $page_info = "var page_name = new Array;\n"; + for my $i (0..$#pages) { + my $page_name = file_title($i); #$pages[$i][TIT]; + $page_info .= qq[ page_name[$i] = "$page_name";\n]; + } + $single_js .= $page_info; + } + my $sch_link = + PathSubs::mk_relative_link(full_out_name($pnum), $m_param_OutRoot . "search.js"); + my $top_link = + PathSubs::mk_relative_link(full_out_name($pnum), $m_param_OutRoot . "html-wtoc.js"); + return <<__HTML_END_JS__; + + + +__HTML_END_JS__ +} + +########################################################## +### Page creation +########################################################## + +sub replace_template_links($$) { + my $template = shift; + my $sFile = shift; + $template =~ s{\ssrc="(.*?)"} + { + my $sSrc = $m_param_OutRoot . $1; + my $sRelSrc = PathSubs::mk_relative_link($sFile, $sSrc); + qq( src="$sRelSrc"); + }exg; + $template =~ s{\shref="(.*?)"} + { + my $sOld = $1; + if ((lc substr($sOld, 0, 11)) eq "javascript:") { + qq( href="$sOld"); + } elsif (PathSubs::is_abs_netpath($sOld)) { + qq( href="$sOld"); + } else { + my $sSrc = $m_param_OutRoot . $sOld; + my $sRelSrc = PathSubs::mk_relative_link($sFile, $sSrc); + qq( href="$sRelSrc"); + } + }exg; + return $template; +} # replace_template_links + +sub mk_start_of_page($) { + my $pnum = shift; + my $page = ""; + my $page_style = mk_style($pnum); + my $page_js = mk_js($pnum); + my $sFile = full_out_name($pnum); + my $head = ""; + $head .= $page_js; + $head .= $page_style; + $head .= get_head_from_file(full_in_name($pnum)); + $page .= header if !$m_param_files; + $page .= replace_template_links($m_sStartTemplate, $sFile); + $page =~ s!HEAD!$head!; + my $focus_pnum = $pnum; + my $ind_lev = $pages[$pnum][IND]; + if ($ind_lev > 50) { $focus_pnum = 0; } + $page =~ s!%%PNUM%%!$focus_pnum!; + return $page; +} # mk_start_of_page + +my %m_sCreatedPages; +sub page_src_time($) { + my $pnum = shift; + my $src_file = $pages[$pnum][FULL_FIL]; + return (stat $src_file)[9]; +} +sub create_page($) { + my $pnum = shift; + return unless $pages[$pnum][FULL_FIL]; + + my $out_name = full_out_name($pnum); + return if exists $m_sCreatedPages{$out_name}; + $m_sCreatedPages{$out_name} = 1; + + my $page = mk_start_of_page($pnum); + my $cont_win = mk_content($pnum); + my $main_win = mk_main_window($pnum); + $page .= mk_main_table( + $cont_win, + $main_win, + "", + $out_name, + $pnum, + ); + $page .= end_html; + $page = replace_name_link($page); + return $page; +} # create_page + + +__END__ + + + ########################################################## + ### Unused currently + ########################################################## + + sub build_ShowPage() { + for my $num (0..$#pages) { + $page_num{$pages[$num][FULL_FIL]} = $num; + my $fon = full_out_name($num); + if ($fon) { $js_show_page{$fon} = "ShowPage($num);"; } + } +} +build_ShowPage(); + + +sub mk_meta_enter_exit() { + return <<__HTML_EE__; + + +__HTML_EE__ +} + +########################################################## +### Single page +########################################################## + +sub mk_noscript() { + return <<__HTML_END_NOSCRIPT__; +