From: Neil H. <nh...@us...> - 2013-04-09 14:36:00
|
Update of /cvsroot/cscope/cscope/contrib/xcscope In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv12486/contrib/xcscope Modified Files: xcscope.el Log Message: Add find assignments search to xcscope.el Resolves https://sourceforge.net/p/cscope/patches/79/ Index: xcscope.el =================================================================== RCS file: /cvsroot/cscope/cscope/contrib/xcscope/xcscope.el,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** xcscope.el 10 Apr 2002 16:59:00 -0000 1.14 --- xcscope.el 9 Apr 2013 14:35:57 -0000 1.15 *************** *** 928,931 **** --- 928,932 ---- (define-key cscope-list-entry-keymap "G" 'cscope-find-global-definition-no-prompting) + (define-key cscope-list-entry-keymap "=" 'cscope-find-assignments-to-this-symbol) (define-key cscope-list-entry-keymap "c" 'cscope-find-functions-calling-this-function) (define-key cscope-list-entry-keymap "C" 'cscope-find-called-functions) *************** *** 1120,1123 **** --- 1121,1125 ---- (define-key cscope:map "\C-csg" 'cscope-find-global-definition) (define-key cscope:map "\C-csG" 'cscope-find-global-definition-no-prompting) + (define-key cscope:map "\C-cs=" 'cscope-find-assignments-to-this-symbol) (define-key cscope:map "\C-csc" 'cscope-find-functions-calling-this-function) (define-key cscope:map "\C-csC" 'cscope-find-called-functions) *************** *** 1155,1158 **** --- 1157,1162 ---- [ "Find global definition no prompting" cscope-find-global-definition-no-prompting t ] + [ "Find assignments to symbol" + cscope-find-assignments-to-this-symbol t ] [ "Find functions calling a function" cscope-find-functions-calling-this-function t ] *************** *** 2425,2428 **** --- 2429,2446 ---- + (defun cscope-find-assignments-to-this-symbol (symbol) + "Locate assignments to a symbol in the source code." + (interactive (list + (cscope-prompt-for-symbol "Find assignments to this symbol: " nil) + )) + (let ( (cscope-adjust t) ) ;; Use fuzzy matching. + (setq cscope-symbol symbol) + (cscope-call (format "Finding assignments to symbol: %s" symbol) + (list "-9" symbol) nil 'cscope-process-filter + 'cscope-process-sentinel) + )) + + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |