Changeset 45
- Timestamp:
- 01/18/08 14:08:07 (7 months ago)
- Files:
-
- incubator/.elisp/dot.emacs (modified) (2 diffs)
- incubator/.elisp/ini/ini-testing.el (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
incubator/.elisp/dot.emacs
r44 r45 3 3 (setq shell-file-name "/bin/bash") 4 4 5 ;;; Jim Weirich's GNU-Emacs Initialization File5 ;;; Relevance GNU-Emacs Initialization File (A Modified Version of Jim Weirich's GNU-Emacs Initialization File) 6 6 7 7 (setq ini-directory (expand-file-name "~/.elisp/ini")) … … 27 27 (custom-set-variables 28 28 '(init-face-from-resources nil) 29 '(mm-inline-media-tests (quote (("image/jpeg" mm-inline-image (lambda (handle) (mm-valid-and-fit-image-p (quote jpeg) handle))) ("image/png" mm-inline-image (lambda (handle) (mm-valid-and-fit-image-p (quote png) handle))) ("image/gif" mm-inline-image (lambda (handle) (mm-valid-and-fit-image-p (quote gif) handle))) ("image/tiff" mm-inline-image (lambda (handle) (mm-valid-and-fit-image-p (quote tiff) handle))) ("image/xbm" mm-inline-image (lambda (handle) (mm-valid-and-fit-image-p (quote xbm) handle))) ("image/x-xbitmap" mm-inline-image (lambda (handle) (mm-valid-and-fit-image-p (quote xbm) handle))) ("image/xpm" mm-inline-image (lambda (handle) (mm-valid-and-fit-image-p (quote xpm) handle))) ("image/x-pixmap" mm-inline-image (lambda (handle) (mm-valid-and-fit-image-p (quote xpm) handle))) ("image/bmp" mm-inline-image (lambda (handle) (mm-valid-and-fit-image-p (quote bmp) handle))) ("text/plain" mm-inline-text identity) ("text/enriched" mm-inline-text identity) ("text/richtext" mm-inline-text identity) ("text/x-patch" mm-display-patch-inline (lambda (handle) (locate-library "diff-mode"))) ("application/emacs-lisp" mm-display-elisp-inline identity) ("text/x-vcard" mm-inline-text (lambda (handle) (or (featurep (quote vcard)) (locate-library "vcard")))) ("message/delivery-status" mm-inline-text identity) ("message/rfc822" mm-inline-message identity) ("message/partial" mm-inline-partial identity) ("text/.*" mm-inline-text identity) ("audio/wav" mm-inline-audio (lambda (handle) (and (or (featurep (quote nas-sound)) (featurep (quote native-sound))) (device-sound-enabled-p)))) ("audio/au" mm-inline-audio (lambda (handle) (and (or (featurep (quote nas-sound)) (featurep (quote native-sound))) (device-sound-enabled-p)))) ("application/pgp-signature" ignore identity) ("multipart/alternative" ignore identity) ("multipart/mixed" ignore identity) ("multipart/related" ignore identity)))) 30 '(load-home-init-file t t) 31 '(gnuserv-program (concat exec-directory "/gnuserv")) 32 '(toolbar-news-reader (quote gnus)) 33 '(toolbar-mail-reader (quote gnus)) 34 '(ecb-source-path (quote (("/home/jim/working/rubyforge/rubygems" "RubyGems") ("/home/jim/working/rubyforge/rake" "Rake"))))) 29 '(mm-inline-media-tests (quote (("image/jpeg" mm-inline-image (lambda (handle) (mm-valid-and-fit-image-p (quote jpeg) handle))) ("image/png" mm-inline-image (lambda (handle) (mm-valid-and-fit-image-p (quote png) handle))) ("image/gif" mm-inline-image (lambda (handle) (mm-valid-and-fit-image-p (quote gif) handle))) ("image/tiff" mm-inline-image (lambda (handle) (mm-valid-and-fit-image-p (quote tiff) handle))) ("image/xbm" mm-inline-image (lambda (handle) (mm-valid-and-fit-image-p (quote xbm) handle))) ("image/x-xbitmap" mm-inline-image (lambda (handle) (mm-valid-and-fit-image-p (quote xbm) handle))) ("image/xpm" mm-inline-image (lambda (handle) (mm-valid-and-fit-image-p (quote xpm) handle))) ("image/x-pixmap" mm-inline-image (lambda (handle) (mm-valid-and-fit-image-p (quote xpm) handle))) ("image/bmp" mm-inline-image (lambda (handle) (mm-valid-and-fit-image-p (quote bmp) handle))) ("text/plain" mm-inline-text identity) ("text/enriched" mm-inline-text identity) ("text/richtext" mm-inline-text identity) ("text/x-patch" mm-display-patch-inline (lambda (handle) (locate-library "diff-mode"))) ("application/emacs-lisp" mm-display-elisp-inline identity) ("text/x-vcard" mm-inline-text (lambda (handle) (or (featurep (quote vcard)) (locate-library "vcard")))) ("message/delivery-status" mm-inline-text identity) ("message/rfc822" mm-inline-message identity) ("message/partial" mm-inline-partial identity) ("text/.*" mm-inline-text identity) ("audio/wav" mm-inline-audio (lambda (handle) (and (or (featurep (quote nas-sound)) (featurep (quote native-sound))) (device-sound-enabled-p)))) ("audio/au" mm-inline-audio (lambda (handle) (and (or (featurep (quote nas-sound)) (featurep (quote native-sound))) (device-sound-enabled-p)))) ("application/pgp-signature" ignore identity) ("multipart/alternative" ignore identity) ("multipart/mixed" ignore identity) ("multipart/related" ignore identity))))) 30 35 31 (custom-set-faces 36 32 '(default ((t (:size "12pt" :family "Fixed"))) t)) incubator/.elisp/ini/ini-testing.el
r44 r45 159 159 (next-line) 160 160 (re-search-backward "^ *def *\\(test_[a-zA-Z_]+\\)") 161 (buffer-substring (match-beginning 1) (match-end 1)))) 162 163 (defun rel-find-test-spec-method-name () 164 "Return the name of the current test/spec method." 165 (save-excursion 166 (next-line) 167 (re-search-backward "^ *it \\([a-zA-Z]+\\)") 161 168 (buffer-substring (match-beginning 1) (match-end 1)))) 162 169 … … 299 306 file-name "--" (concat "-n" method-name))) )))) 300 307 308 (defun rel-run-test-spec-method (arg) 309 "Run the current focused test method." 310 (interactive "P") 311 (jw-take-down-test-buffer) 312 (let* ((file-name (buffer-file-name)) 313 (default-directory (jw-find-project-top file-name)) ) 314 (if (not (jw-test-file-name-p file-name)) 315 (progn 316 (jw-toggle-buffer) 317 (setq file-name (buffer-file-name)) )) 318 (save-buffer) 319 (setq jw-testing-last-test-buffer (buffer-name)) 320 (let ((method-name (rel-find-test-spec-method-name))) 321 (cond ((null default-directory) (message "Cannot find project top")) 322 ((null arg) 323 (jw-prep-test-buffer) 324 (jw-test-start-process 325 jw-ruby-command jw-test-options 326 file-name (concat "-n" method-name)) 327 (jw-insert_headers 328 "= Test Method ...\n" 329 "== File: " (file-name-nondirectory file-name) "\n" 330 "== Method: " method-name "\n\n")) 331 (t (jw-prep-test-buffer) 332 (jw-test-start-debugging 333 jw-rdebug-command jw-test-options 334 file-name "--" (concat "-n" method-name))) )))) 335 301 336 ;;; -- Toggle Enhancements ------------------------------------------- 302 337 … … 390 425 (global-set-key "\C-Ctf" 'jw-run-test-file) 391 426 (global-set-key "\C-Ctm" 'jw-run-test-method) 427 (global-set-key "\C-Ctp" 'rel-run-test-spec-method) 392 428 393 429 (global-set-key "\C-Ct1" (lambda () (interactive)(setq jw-testing-single-window t)))
