File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 177177 (let ((use-dialog-box nil )
178178 (type (if type (intern type) value-type)))
179179 (cl-case type
180+ (confirm (if (y-or-n-p label) t
181+ (error " Action cancelled " )))
180182 (file (read-file-name label nil default ))
181183 (text (read-string label default ))
182184 (choice (completing-read label
257259 (view-mode 1 ))
258260 (pop-to-buffer buffer)))
259261
262+ (cl-defun phpactor-action-collection (&key actions )
263+ " Executes a collection of actions."
264+ (mapc
265+ (lambda (action )
266+ (apply #'phpactor-action-dispatch (list :action (plist-get action :name ) :parameters (plist-get action :parameters ))))
267+ actions))
268+
260269(cl-defun phpactor-action-open-file (&key path offset )
261270 " Open file from Phpactor."
262271 (unless (and path offset)
270279 (find-file path)
271280 (goto-char (1+ offset)))
272281
282+ (cl-defun phpactor-action-close-file (&key path )
283+ " Close file from Phpactor."
284+ (kill-buffer (find-file-noselect path t )))
285+
273286; ; this function was adapted from go-mode
274287(defun phpactor--goto-line (line )
275288 " Goto line LINE."
You can’t perform that action at this time.
0 commit comments