Emacs: fixed completion conflict with semantic and Emacs default.
parent
880194c092
commit
f4e5c4caf7
|
@ -29,11 +29,15 @@
|
|||
" "
|
||||
"))
|
||||
|
||||
(defun list-buffers-switch () "Same as list buffers but switch to it afterward."
|
||||
(defun list-buffers-switch () "Same as list-buffers but switch to it afterward."
|
||||
(interactive)
|
||||
(list-buffers)
|
||||
(switch-to-buffer-other-window "*Buffer List*"))
|
||||
(define-key my-keys-minor-mode-map (kbd "C-x C-b") 'list-buffers-switch)
|
||||
(define-key Buffer-menu-mode-map (kbd "RET")
|
||||
(lambda () (interactive)
|
||||
(Buffer-menu-switch-other-window)
|
||||
(delete-window)))
|
||||
|
||||
;;==============================================================================
|
||||
;; Toggle window split
|
||||
|
|
|
@ -132,19 +132,7 @@
|
|||
;; Semantic with ghost display (allows M-n and M-p to brwose completion).
|
||||
(semantic-mode 1)
|
||||
(define-key my-keys-minor-mode-map (kbd "C-c , d") 'semantic-ia-show-summary)
|
||||
(define-key my-keys-minor-mode-map (kbd "M-TAB") 'semantic-complete-analyze-inline)
|
||||
(setq semantic-complete-inline-analyzer-displayor-class 'semantic-displayor-ghost)
|
||||
|
||||
(defun my-c-mode-cedet-hook ()
|
||||
(local-set-key "." 'semantic-complete-self-insert)
|
||||
(local-set-key ">" 'semantic-complete-self-insert))
|
||||
(add-hook 'c-mode-common-hook 'my-c-mode-cedet-hook)
|
||||
|
||||
;; Electric Pairs () [] {} "" etc;
|
||||
(electric-pair-mode 1)
|
||||
|
||||
;; Buffer-mode convenience.
|
||||
(add-hook
|
||||
'Buffer-menu-mode-hook
|
||||
(lambda ()
|
||||
(local-set-key "RET" 'Buffer-menu-switch-other-window)))
|
||||
|
|
|
@ -379,25 +379,31 @@ properly escaped with double-quotes in case it has spaces."
|
|||
;; Identation style
|
||||
(setq c-default-style "linux" c-basic-offset 4)
|
||||
|
||||
(add-hook 'c-mode-hook
|
||||
(lambda ()
|
||||
(unless (file-exists-p "Makefile")
|
||||
(set (make-local-variable 'compile-command)
|
||||
;; emulate make's .c.o implicit pattern rule, but with
|
||||
;; different defaults for the CC, CPPFLAGS, and CFLAGS
|
||||
;; variables:
|
||||
;; $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $<
|
||||
(let ((file (file-name-nondirectory buffer-file-name)))
|
||||
(format "%s -o %s %s %s %s"
|
||||
(or (getenv "CC") "gcc")
|
||||
(file-name-sans-extension file)
|
||||
(or (getenv "CPPFLAGS") "-DDEBUG=9")
|
||||
(or (getenv "CFLAGS") "-ansi -pedantic -std=c99 -Wall -Wextra -Wshadow -lm -g3 -O0")
|
||||
file))))
|
||||
(add-hook
|
||||
'c-mode-hook
|
||||
(lambda ()
|
||||
(unless (file-exists-p "Makefile")
|
||||
(set (make-local-variable 'compile-command)
|
||||
;; emulate make's .c.o implicit pattern rule, but with
|
||||
;; different defaults for the CC, CPPFLAGS, and CFLAGS
|
||||
;; variables:
|
||||
;; $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $<
|
||||
(let ((file (file-name-nondirectory buffer-file-name)))
|
||||
(format "%s -o %s %s %s %s"
|
||||
(or (getenv "CC") "gcc")
|
||||
(file-name-sans-extension file)
|
||||
(or (getenv "CPPFLAGS") "-DDEBUG=9")
|
||||
(or (getenv "CFLAGS") "-ansi -pedantic -std=c99 -Wall -Wextra -Wshadow -lm -pthread -g3 -O0")
|
||||
file))))
|
||||
|
||||
(local-set-key (kbd "C-c C-c") 'compile)
|
||||
;; (global-set-key (kbd "<f12>") 'next-error)
|
||||
))
|
||||
(local-set-key (kbd "C-c C-c") 'compile)
|
||||
(local-set-key (kbd "M-TAB") 'semantic-complete-analyze-inline)
|
||||
(local-set-key "." 'semantic-complete-self-insert)
|
||||
(local-set-key ">" 'semantic-complete-self-insert)
|
||||
(local-set-key (kbd "<f12>") 'next-error)))
|
||||
|
||||
;; (defun my-c-mode-cedet-hook ()
|
||||
;; (add-hook 'c-mode-common-hook 'my-c-mode-cedet-hook)
|
||||
|
||||
;;==============================================================================
|
||||
;; Common LISP
|
||||
|
|
Loading…
Reference in New Issue