aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/misc.el
diff options
context:
space:
mode:
authorJuri Linkov2008-12-28 23:50:47 +0000
committerJuri Linkov2008-12-28 23:50:47 +0000
commit0f9568b7a17618f25640d500e49d36f4d7086ca0 (patch)
treed624fa977b5ffe1a9e06fabee1f03aea4fd4f460 /lisp/misc.el
parente8d24e5b0960898e4a93ee2918f677b375b68263 (diff)
downloademacs-0f9568b7a17618f25640d500e49d36f4d7086ca0.tar.gz
emacs-0f9568b7a17618f25640d500e49d36f4d7086ca0.zip
(butterfly): Doc fix. Add `animate-string' and `browse-url'.
Diffstat (limited to 'lisp/misc.el')
-rw-r--r--lisp/misc.el22
1 files changed, 16 insertions, 6 deletions
diff --git a/lisp/misc.el b/lisp/misc.el
index 6dafd2a5e4b..f7a066bef7d 100644
--- a/lisp/misc.el
+++ b/lisp/misc.el
@@ -108,17 +108,27 @@ With argument, do this that many times."
108 108
109;;;###autoload 109;;;###autoload
110(defun butterfly () 110(defun butterfly ()
111 "This function is designed to be used only be the most 111 "Use butterflies to flip the desired bit on the drive platter.
112proficient hackers on earth. If equipped with a butterfly key, 112Open hands and let the delicate wings flap once. The disturbance
113it should be bound to C-x M-c M-butterfly (for further 113ripples outward, changing the flow of the eddy currents in the
114information please refer to http://xkcd.com/378/)." 114upper atmosphere. These cause momentary pockets of higher-pressure
115air to form, which act as lenses that deflect incoming cosmic rays,
116focusing them to strike the drive platter and flip the desired bit.
117You can type `M-x butterfly C-M-c' to run it. This is a permuted
118variation of `C-x M-c M-butterfly' from url `http://xkcd.com/378/'."
115 (interactive) 119 (interactive)
116 (if (yes-or-no-p "Do you really want to unleash the powers of the butterfly? ") 120 (if (yes-or-no-p "Do you really want to unleash the powers of the butterfly? ")
117 (progn 121 (progn
118 (message "Amazing physics going on...") 122 (switch-to-buffer (get-buffer-create "*butterfly*"))
123 (erase-buffer)
124 (sit-for 0)
125 (setq indent-tabs-mode nil)
126 (animate-string "Amazing physics going on..."
127 (/ (window-height) 2) (- (/ (window-width) 2) 12))
119 (sit-for (* 5 (/ (abs (random)) (float most-positive-fixnum)))) 128 (sit-for (* 5 (/ (abs (random)) (float most-positive-fixnum))))
120 (message "Successfully flipped one bit!")) 129 (message "Successfully flipped one bit!"))
121 (message "Well, then go to www.xkcd.com!"))) 130 (message "Well, then go to xkcd.com!")
131 (browse-url "http://xkcd.com/378/")))
122 132
123(provide 'misc) 133(provide 'misc)
124 134