Thanks for this idea too. (Which I adapted and checked in.)
Eric
>>> Nikolaj Schumacher <n_schumacher@...> seems to think that:
>--=-=-=
>
>Hello
>
>`semantic-ctxt-current-symbol-default' currently fails on any whitespace
>around separators. It would be nice, if it didn't, as the occasional Java
>line gets so long it requires breaking there.
>
>I'm using the attached version, which works on every whitespace
>combination I could think of ...
>
>
>--=-=-=
>Content-Type: text/x-patch
>Content-Disposition: attachment;
> filename=semantic-current-symbol-whitespace.patch
>Content-Description: patch
>
>diff -du /Users/nik/etc/emacs.d/packages/cedet/semantic/semantic-ctxt.el /Users/nik/etc/emacs.d/packages/cedet_/semantic/semantic-ctxt.el
>--- cedet/semantic/semantic-ctxt.el 2007-06-26 00:28:52.000000000 +0200
>+++ cedet/semantic/semantic-ctxt.el 2007-07-06 15:59:41.000000000 +0200
>@@ -345,12 +345,13 @@
> (let* ((fieldsep1 (mapconcat (lambda (a) (regexp-quote a))
> semantic-type-relation-separator-character
> "\\|"))
>- (fieldsep (concat "\\(" fieldsep1 "\\)\\(\\w\\|\\s_\\)"))
>+ (fieldsep (concat "\\(" fieldsep1 "\\)[ \t\n\r]*\\(\\w\\|\\s_\\)"))
> (case-fold-search semantic-case-fold)
> (symlist nil)
> end)
> (with-syntax-table semantic-lex-syntax-table
> (save-excursion
>+ (skip-chars-forward " \t\n\r")
> (if (looking-at "\\w\\|\\s_")
> (forward-sexp 1)
> ;; Not on a sym, are we at a separator char with no field
>@@ -367,7 +368,8 @@
> (forward-sexp -1)
> ;; Skip array expressions.
> (while (looking-at "\\s(") (forward-sexp -1))
>- (forward-sexp 1)))
>+ (forward-sexp 1))
>+ (skip-chars-backward " \t\n\r"))
> (setq end (point))
> (condition-case nil
> (while (save-excursion
>@@ -385,6 +387,8 @@
> ;; beginning of a buffer, or narrowed to a command and
> ;; have to stop.
> (if (<= cp (point)) (error nil)))
>+ ;; Skip whitespace.
>+ (skip-chars-forward " \t\n\r")
> (if (looking-at fieldsep)
> (progn
> (forward-sexp -1)
>
>Diff finished. Fri Jul 6 16:01:06 2007
>
>--=-=-=
>
>
>
>regards,
>Nikolaj Schumacher
>
>--=-=-=
>Content-Type: text/plain; charset="us-ascii"
>MIME-Version: 1.0
>Content-Transfer-Encoding: 7bit
>Content-Disposition: inline
>
>-------------------------------------------------------------------------
>This SF.net email is sponsored by DB2 Express
>Download DB2 Express C - the FREE version of DB2 express and take
>control of your XML. No limits. Just data. Click to get it now.
>http://sourceforge.net/powerbar/db2/
>--=-=-=
>Content-Type: text/plain; charset="us-ascii"
>MIME-Version: 1.0
>Content-Transfer-Encoding: 7bit
>Content-Disposition: inline
>
>_______________________________________________
>cedet-semantic mailing list
>cedet-semantic@...
>https://lists.sourceforge.net/lists/listinfo/cedet-semantic
>
>--=-=-=--
>
|