Skip to content

Instantly share code, notes, and snippets.

@hidsh
Created February 22, 2012 06:41
Show Gist options
  • Save hidsh/1882505 to your computer and use it in GitHub Desktop.
Save hidsh/1882505 to your computer and use it in GitHub Desktop.
bak for xyzzy
(defun bak ()
(interactive)
(if (get-buffer-file-name)
(call-interactively #'(lambda (name)
(interactive "FBAK as: " :default0 (concat
(get-buffer-file-name)
".bak"))
(write-file name)))
(call-interactively 'save-buffer)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment