Skip to content

Instantly share code, notes, and snippets.

@miyamuko
Created September 6, 2010 01:53
Show Gist options
  • Save miyamuko/566528 to your computer and use it in GitHub Desktop.
Save miyamuko/566528 to your computer and use it in GitHub Desktop.
save-window-excursion は多値を返さない。
;; save-window-excursion は多値を返さない。 #xyzzy
(save-window-excursion
(values 1 2 3))
;=> 1
(save-excursion
(values 1 2 3))
;=> 1
; 2
; 3
(save-restriction
(values 1 2 3))
;=> 1
; 2
; 3
(with-selected-window
(values 1 2 3))
;=> 1
; 2
; 3
(with-set-buffer
(values 1 2 3))
;=> 1
; 2
; 3
@southly
Copy link

southly commented Sep 11, 2010

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment