diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-01-12 01:16:57 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-01-12 01:16:57 +0000 |
commit | 9f72c385f295637f8c7b3ed7a159cb7cfa9752ef (patch) | |
tree | a8d829705736c91f041d8e0045f64ab389c70131 | |
parent | a9c4c9041bd8ee877e062f93496a03d3c767d6e4 (diff) |
1.2.1 repack
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | configure | 2 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | ext/extmk.rb.in | 2 | ||||
-rw-r--r-- | sample/ruby-mode.el | 28 |
4 files changed, 25 insertions, 9 deletions
@@ -562,7 +562,7 @@ fi if test $rb_thread = yes; then cat >> confdefs.h <<\EOF -#define USE_THREAD 1 +#define THREAD 1 EOF fi diff --git a/configure.in b/configure.in index c6c1d9596e..c7b70a004a 100644 --- a/configure.in +++ b/configure.in @@ -24,7 +24,7 @@ AC_ARG_ENABLE(thread, [--disable-thread never use user-level thread], [ rb_thread=$enableval ]) if test $rb_thread = yes; then - AC_DEFINE(USE_THREAD) + AC_DEFINE(THREAD) fi AC_CANONICAL_HOST diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in index 261aa2fc90..ebbcf84d93 100644 --- a/ext/extmk.rb.in +++ b/ext/extmk.rb.in @@ -75,7 +75,7 @@ end LINK = "@CC@ -o conftest -I#{$topdir} -I#{$top_srcdir} -I@includedir@ " + CFLAGS + " %s @LDFLAGS@ %s conftest.c @LIBS@ %s" CPP = "@CPP@ @CPPFLAGS@ -I#{$topdir} -I#{$top_srcdir} -I@includedir@ " + CFLAGS + " %s conftest.c" -if /win32|djgpp|mingw32|m68k-human/i =~ PLATFORM +if /cygwin|mswin32|djgpp|mingw32|m68k-human/i =~ PLATFORM $null = open("nul", "w") else $null = open("/dev/null", "w") diff --git a/sample/ruby-mode.el b/sample/ruby-mode.el index 8bf843c1ea..cf53574481 100644 --- a/sample/ruby-mode.el +++ b/sample/ruby-mode.el @@ -71,6 +71,7 @@ (define-key ruby-mode-map "\e\C-f" 'ruby-end-of-block) (define-key ruby-mode-map "\e\C-p" 'ruby-beginning-of-block) (define-key ruby-mode-map "\e\C-n" 'ruby-end-of-block) + (define-key ruby-mode-map "\e\C-h" 'ruby-mark-defun) (define-key ruby-mode-map "\t" 'ruby-indent-command) (define-key ruby-mode-map "\C-c\C-e" 'ruby-insert-end) (define-key ruby-mode-map "\C-j" 'ruby-reindent-then-newline-and-indent) @@ -129,7 +130,13 @@ (make-variable-buffer-local 'comment-start-skip) (setq comment-start-skip "\\(^\\|\\s-\\);?#+ *") (make-local-variable 'parse-sexp-ignore-comments) - (setq parse-sexp-ignore-comments t)) + (setq parse-sexp-ignore-comments t) + (make-local-variable 'paragraph-start) + (setq paragraph-start (concat "$\\|" page-delimiter)) + (make-local-variable 'paragraph-separate) + (setq paragraph-separate paragraph-start) + (make-local-variable 'paragraph-ignore-fill-prefix) + (setq paragraph-ignore-fill-prefix t)) (defun ruby-mode () "Major mode for editing ruby scripts. @@ -522,7 +529,7 @@ Returns t unless search stops due to end of buffer." "Move forward to next end of defun. An end of a defun is found by moving forward from the beginning of one." (interactive "p") - (and (re-search-forward (concat "^\\(" ruby-block-end-re "\\)\\b[^_]") + (and (re-search-forward (concat "^\\(" ruby-block-end-re "\\)\\($\\|\\b[^_]\\)") nil 'move (or arg 1)) (progn (beginning-of-line) t)) (forward-line 1)) @@ -590,6 +597,15 @@ An end of a defun is found by moving forward from the beginning of one." (ruby-indent-line t) (end-of-line)) +(defun ruby-mark-defun () + "Put mark at end of this Ruby function, point at beginning." + (interactive) + (push-mark (point)) + (ruby-end-of-defun) + (push-mark (point) nil t) + (ruby-beginning-of-defun) + (re-search-backward "^\n" (- (point) 1) t)) + (cond ((featurep 'hilit19) (hilit-set-mode-patterns @@ -656,8 +672,8 @@ An end of a defun is found by moving forward from the beginning of one." "\\)\\b") 2) ;; variables - '("\\(^\\|[^_]\\)\\b\\(nil\\|self\\|true\\|false\\)\\b\\([^_]\\|$\\)" - 2 font-lock-variable-name-face) + '("\\b\\(nil\\|self\\|true\\|false\\)\\b" + 1 font-lock-variable-name-face) ;; variables '("[$@].[a-zA-Z0-9_]*" 0 font-lock-variable-name-face) @@ -665,8 +681,8 @@ An end of a defun is found by moving forward from the beginning of one." '("\\(^\\|[^_]\\)\\b\\([A-Z]+[a-zA-Z0-9_]*\\)" 2 font-lock-type-face) ;; functions - '("^\\s *def[ \t]+\\([^ \t(]*\\)" - 1 font-lock-function-name-face t)) + '("^\\s *def\\s *\\<\\(\\(\\w\\|\\s_\\)+\\.\\)?\\(\\(\\w\\|\\s_\\)+\\)\\>" + 3 font-lock-function-name-face t)) "*Additional expressions to highlight in ruby mode.") (if (and (>= (string-to-int emacs-version) 19) (not (featurep 'xemacs))) |