forked from OSchip/llvm-project
Fix warnings in clang-completion-mode.el.
- Use defvar to declare variables - Don't use delete-backward-char, which is for interactive use only Patch by Philipp Stephani llvm-svn: 282573
This commit is contained in:
parent
a693b37e14
commit
e6d01e08c6
|
@ -64,15 +64,15 @@ This variable will typically contain include paths, e.g., -I~/MyProject."
|
||||||
:group 'clang-completion-mode)
|
:group 'clang-completion-mode)
|
||||||
|
|
||||||
;;; The prefix header to use with Clang code completion.
|
;;; The prefix header to use with Clang code completion.
|
||||||
(setq clang-completion-prefix-header "")
|
(defvar clang-completion-prefix-header "")
|
||||||
|
|
||||||
;;; The substring we will use to filter completion results
|
;;; The substring we will use to filter completion results
|
||||||
(setq clang-completion-substring "")
|
(defvar clang-completion-substring "")
|
||||||
|
|
||||||
;;; The current completion buffer
|
;;; The current completion buffer
|
||||||
(setq clang-completion-buffer nil)
|
(defvar clang-completion-buffer nil)
|
||||||
|
|
||||||
(setq clang-result-string "")
|
(defvar clang-result-string "")
|
||||||
|
|
||||||
;;; Compute the current line in the buffer
|
;;; Compute the current line in the buffer
|
||||||
(defun current-line ()
|
(defun current-line ()
|
||||||
|
@ -199,14 +199,14 @@ This variable will typically contain include paths, e.g., -I~/MyProject."
|
||||||
;; for the currently-active code completion.
|
;; for the currently-active code completion.
|
||||||
(defun clang-backspace ()
|
(defun clang-backspace ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(delete-backward-char 1)
|
(delete-char -1)
|
||||||
(clang-update-filter))
|
(clang-update-filter))
|
||||||
|
|
||||||
;; Invoked when the user types the delete key to update the filter
|
;; Invoked when the user types the delete key to update the filter
|
||||||
;; for the currently-active code completion.
|
;; for the currently-active code completion.
|
||||||
(defun clang-delete ()
|
(defun clang-delete ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(delete-backward-char 1)
|
(delete-char -1)
|
||||||
(clang-update-filter))
|
(clang-update-filter))
|
||||||
|
|
||||||
;; Set up the keymap for the Clang minor mode.
|
;; Set up the keymap for the Clang minor mode.
|
||||||
|
@ -246,4 +246,3 @@ This variable will typically contain include paths, e.g., -I~/MyProject."
|
||||||
nil
|
nil
|
||||||
" Clang"
|
" Clang"
|
||||||
clang-completion-mode-map)
|
clang-completion-mode-map)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue