forked from technomancy/emacs-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added nXhtml-Mode, with erb handling.
- Loading branch information
Showing
516 changed files
with
131,335 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
;; find-recursive.el -- Find files recursively into a directory | ||
;; | ||
;; Copyright (C) 2001 Ovidiu Predescu | ||
;; | ||
;; Author: Ovidiu Predescu <[email protected]> | ||
;; 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) |
Oops, something went wrong.