Kaydet (Commit) 32a03967 authored tarafından Barry Warsaw's avatar Barry Warsaw

(py-imenu-create-index-function): Skip over stuff that looks like code

but which is in a comment or string.  Closes SF bug # 572341 reported
by Adrian van den Dries.
üst 5086e49a
...@@ -945,6 +945,8 @@ of the first definition found." ...@@ -945,6 +945,8 @@ of the first definition found."
;; what level is the next definition on? must be same, deeper ;; what level is the next definition on? must be same, deeper
;; or shallower indentation ;; or shallower indentation
(cond (cond
;; Skip code in comments and strings
((py-in-literal))
;; at the same indent level, add it to the list... ;; at the same indent level, add it to the list...
((= start-indent cur-indent) ((= start-indent cur-indent)
(push (cons def-name def-pos) index-alist)) (push (cons def-name def-pos) index-alist))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment