Skip to content
Snippets Groups Projects
Commit e47398ab authored by Gabor Greif's avatar Gabor Greif
Browse files

Add a FIXME for uncomplete comment

fix a typo
add punctuation


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155443 91177308-0d34-0410-b5e6-96231b3b80d8
parent e70372d8
No related branches found
No related tags found
No related merge requests found
...@@ -95,7 +95,7 @@ This variable will typically contain include paths, e.g., -I~/MyProject." ...@@ -95,7 +95,7 @@ This variable will typically contain include paths, e.g., -I~/MyProject."
(delq nil (delq nil
(mapcar (lambda (x) (and (funcall condp x) x)) lst))) (mapcar (lambda (x) (and (funcall condp x) x)) lst)))
;; Determine whether ;; Determine whether FIXME: explain better
(defun is-completion-line (line) (defun is-completion-line (line)
(or (string-match "OVERLOAD:" line) (or (string-match "OVERLOAD:" line)
(string-match (concat "COMPLETION: " clang-completion-substring) line))) (string-match (concat "COMPLETION: " clang-completion-substring) line)))
...@@ -105,14 +105,14 @@ This variable will typically contain include paths, e.g., -I~/MyProject." ...@@ -105,14 +105,14 @@ This variable will typically contain include paths, e.g., -I~/MyProject."
(completion-lines (filter 'is-completion-line all-lines))) (completion-lines (filter 'is-completion-line all-lines)))
(if (consp completion-lines) (if (consp completion-lines)
(progn (progn
;; Erase the process buffer ;; Erase the process buffer.
(let ((cur (current-buffer))) (let ((cur (current-buffer)))
(set-buffer buffer) (set-buffer buffer)
(goto-char (point-min)) (goto-char (point-min))
(erase-buffer) (erase-buffer)
(set-buffer cur)) (set-buffer cur))
;; Display the process buffer ;; Display the process buffer.
(display-buffer buffer) (display-buffer buffer)
;; Insert the code-completion string into the process buffer. ;; Insert the code-completion string into the process buffer.
...@@ -120,7 +120,7 @@ This variable will typically contain include paths, e.g., -I~/MyProject." ...@@ -120,7 +120,7 @@ This variable will typically contain include paths, e.g., -I~/MyProject."
(insert (mapconcat 'identity completion-lines "\n"))) (insert (mapconcat 'identity completion-lines "\n")))
)))) ))))
;; Process "sentinal" that, on successful code completion, replaces the ;; Process "sentinel" that, on successful code completion, replaces the
;; contents of the code-completion buffer with the new code-completion results ;; contents of the code-completion buffer with the new code-completion results
;; and ensures that the buffer is visible. ;; and ensures that the buffer is visible.
(defun clang-completion-sentinel (proc event) (defun clang-completion-sentinel (proc event)
...@@ -128,14 +128,14 @@ This variable will typically contain include paths, e.g., -I~/MyProject." ...@@ -128,14 +128,14 @@ This variable will typically contain include paths, e.g., -I~/MyProject."
(completion-lines (filter 'is-completion-line all-lines))) (completion-lines (filter 'is-completion-line all-lines)))
(if (consp completion-lines) (if (consp completion-lines)
(progn (progn
;; Erase the process buffer ;; Erase the process buffer.
(let ((cur (current-buffer))) (let ((cur (current-buffer)))
(set-buffer (process-buffer proc)) (set-buffer (process-buffer proc))
(goto-char (point-min)) (goto-char (point-min))
(erase-buffer) (erase-buffer)
(set-buffer cur)) (set-buffer cur))
;; Display the process buffer ;; Display the process buffer.
(display-buffer (process-buffer proc)) (display-buffer (process-buffer proc))
;; Insert the code-completion string into the process buffer. ;; Insert the code-completion string into the process buffer.
...@@ -159,7 +159,7 @@ This variable will typically contain include paths, e.g., -I~/MyProject." ...@@ -159,7 +159,7 @@ This variable will typically contain include paths, e.g., -I~/MyProject."
`("-code-completion-at" ,cc-point) `("-code-completion-at" ,cc-point)
(list (buffer-file-name)))) (list (buffer-file-name))))
(cc-buffer-name (concat "*Clang Completion for " (buffer-name) "*"))) (cc-buffer-name (concat "*Clang Completion for " (buffer-name) "*")))
;; Start the code-completion process ;; Start the code-completion process.
(if (buffer-file-name) (if (buffer-file-name)
(progn (progn
;; If there is already a code-completion process, kill it first. ;; If there is already a code-completion process, kill it first.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment