r282573 - Fix warnings in clang-completion-mode.el.

Manuel Klimek via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 28 03:20:10 PDT 2016


Author: klimek
Date: Wed Sep 28 05:20:10 2016
New Revision: 282573

URL: http://llvm.org/viewvc/llvm-project?rev=282573&view=rev
Log:
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

Modified:
    cfe/trunk/utils/clang-completion-mode.el

Modified: cfe/trunk/utils/clang-completion-mode.el
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/clang-completion-mode.el?rev=282573&r1=282572&r2=282573&view=diff
==============================================================================
--- cfe/trunk/utils/clang-completion-mode.el (original)
+++ cfe/trunk/utils/clang-completion-mode.el Wed Sep 28 05:20:10 2016
@@ -64,15 +64,15 @@ This variable will typically contain inc
   :group 'clang-completion-mode)
 
 ;;; 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
-(setq clang-completion-substring "")
+(defvar clang-completion-substring "")
 
 ;;; 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	
 (defun current-line ()
@@ -199,14 +199,14 @@ This variable will typically contain inc
 ;; for the currently-active code completion.
 (defun clang-backspace ()
   (interactive)
-  (delete-backward-char 1)
+  (delete-char -1)
   (clang-update-filter))
 
 ;; Invoked when the user types the delete key to update the filter
 ;; for the currently-active code completion.
 (defun clang-delete ()
   (interactive)
-  (delete-backward-char 1)
+  (delete-char -1)
   (clang-update-filter))
 
 ;; Set up the keymap for the Clang minor mode.
@@ -246,4 +246,3 @@ This variable will typically contain inc
   nil
   " Clang"
   clang-completion-mode-map)
-




More information about the cfe-commits mailing list