Skip to content

Instantly share code, notes, and snippets.

@johnfredcee
Forked from anonymous/misc-emacs.el
Created December 19, 2012 18:54
Show Gist options
  • Save johnfredcee/4339358 to your computer and use it in GitHub Desktop.
Save johnfredcee/4339358 to your computer and use it in GitHub Desktop.
;; assume filename is same as classname
(defun get-class-name ()
(file-name-nondirectory (file-name-sans-extension buffer-file-name)))
;; insert it interactively
(defun insert-class-name ()
(interactive)
(insert (get-class-name)))
(local-set-key [(meta ?#)] 'insert-class-name)
(require 'semantic/find)
(require 'doc-mode)
(defun doc-tag ()
(interactive)
(semantic-mode 1)
(doc-mode 1)
(doc-mode-fix-tag-doc)
(doc-mode -1)
(semantic-mode -1))
(local-set-key [(meta f11)] 'doc-tag)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment