Skip to content

Commit

Permalink
function-args.el: Add
Browse files Browse the repository at this point in the history
  • Loading branch information
abo-abo committed Oct 31, 2017
1 parent bb0f764 commit 609b253
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions function-args.el
Expand Up @@ -1064,6 +1064,23 @@ Currently, the class has to be in the current buffer."
(ivy-read "class: " cands
:action 'moo-implement-action))))

(defun moo-new-class ()
(interactive)
(let ((name (read-string "name: "))
(parent (ivy-read "parent: "
(cl-delete-duplicates
(cl-remove-if-not
(lambda (x) (moo-typep (cdr x)))
(moo-fetch-tags))
:test (lambda (x y) (string= (car x) (car y))))))
(beg (point)))
(unless (string= parent "")
(setq parent (concat ": public " parent)))
(insert
(format "class %s%s\n{\n\n};" name parent))
(indent-region beg (point))
(forward-line -1)
(insert " ")))

(defun moo-jump-directory (arg &optional initial-input)
"Select a tag to jump to from tags defined in current directory.
Expand Down

0 comments on commit 609b253

Please sign in to comment.