aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/completion.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/completion.el')
-rw-r--r--lisp/completion.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/completion.el b/lisp/completion.el
index 64bf8026e9d..53dfd7521a5 100644
--- a/lisp/completion.el
+++ b/lisp/completion.el
@@ -1885,7 +1885,7 @@ Prefix args ::
1885 (save-excursion 1885 (save-excursion
1886 (goto-char (point-min)) 1886 (goto-char (point-min))
1887 (catch 'finish-add-completions 1887 (catch 'finish-add-completions
1888 (with-syntax-table completion-c-def-syntax-table 1888 (with-syntax-table completion-c-def-syntax-table
1889 (while t 1889 (while t
1890 ;; we loop here only when scan-sexps fails 1890 ;; we loop here only when scan-sexps fails
1891 ;; (i.e. unbalance exps.) 1891 ;; (i.e. unbalance exps.)
@@ -1895,8 +1895,7 @@ Prefix args ::
1895 (cond 1895 (cond
1896 ((= (preceding-char) ?#) 1896 ((= (preceding-char) ?#)
1897 ;; preprocessor macro, see if it's one we handle 1897 ;; preprocessor macro, see if it's one we handle
1898 (setq string (buffer-substring (point) (+ (point) 6))) 1898 (cond ((looking-at "\\(define\\|ifdef\\)\\>")
1899 (cond ((member string '("define" "ifdef "))
1900 ;; skip forward over definition symbol 1899 ;; skip forward over definition symbol
1901 ;; and add it to database 1900 ;; and add it to database
1902 (and (forward-word 2) 1901 (and (forward-word 2)
@@ -1944,9 +1943,9 @@ Prefix args ::
1944 (throw 'finish-add-completions t)) 1943 (throw 'finish-add-completions t))
1945 (error 1944 (error
1946 ;; Check for failure in scan-sexps 1945 ;; Check for failure in scan-sexps
1947 (if (or (string-equal (nth 1 e) 1946 (if (member (nth 1 e)
1948 "Containing expression ends prematurely") 1947 '("Containing expression ends prematurely"
1949 (string-equal (nth 1 e) "Unbalanced parentheses")) 1948 "Unbalanced parentheses"))
1950 ;; unbalanced paren., keep going 1949 ;; unbalanced paren., keep going
1951 ;;(ding) 1950 ;;(ding)
1952 (forward-line 1) 1951 (forward-line 1)