emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] scratch/last-cedet-merge b893e8a 04/11: semantic: Allow em


From: David Engster
Subject: [Emacs-diffs] scratch/last-cedet-merge b893e8a 04/11: semantic: Allow empty type relation separation character
Date: Mon, 23 Jan 2017 21:13:48 +0000 (UTC)

branch: scratch/last-cedet-merge
commit b893e8a66b5599f28bf358ff7bafbc0386e250e1
Author: Eric Ludlam <address@hidden>
Commit: David Engster <address@hidden>

    semantic: Allow empty type relation separation character
    
    * lisp/cedet/semantic/ctxt.el (semantic-ctxt-current-symbol-default):
      Allow the type relation separator to be empty for languages that
      don't have symbol sequences, such as grammars and Lisp.
---
 lisp/cedet/semantic/ctxt.el |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/lisp/cedet/semantic/ctxt.el b/lisp/cedet/semantic/ctxt.el
index 78e5ec5..4ebc68f 100644
--- a/lisp/cedet/semantic/ctxt.el
+++ b/lisp/cedet/semantic/ctxt.el
@@ -454,7 +454,8 @@ This will include a list of type/field names when 
applicable.
 Depends on `semantic-type-relation-separator-character'."
   (save-excursion
     (if point (goto-char point))
-    (let* ((fieldsep1 (mapconcat (lambda (a) (regexp-quote a))
+    (let* ((dosequence (not (null semantic-type-relation-separator-character)))
+          (fieldsep1 (mapconcat (lambda (a) (regexp-quote a))
                                 semantic-type-relation-separator-character
                                 "\\|"))
           ;; NOTE: The [ \n] expression below should used \\s-, but that
@@ -491,9 +492,11 @@ Depends on `semantic-type-relation-separator-character'."
 
          ;; Now that we have gotten started, let's do the rest.
          (condition-case nil
-             (while (save-excursion
-                      (forward-char -1)
-                      (looking-at "\\w\\|\\s_"))
+             (while (and
+                     (or dosequence (not symlist))
+                     (save-excursion
+                       (forward-char -1)
+                       (looking-at "\\w\\|\\s_")))
                ;; We have a symbol.. Do symbol things
                (forward-sexp -1)
                (setq symlist (cons (buffer-substring-no-properties (point) end)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]