- (let ((newbuf (other-buffer buffer)))
- (bury-buffer buffer)
- (if message-return-action
- (apply (car message-return-action) (cdr message-return-action))
- (switch-to-buffer newbuf))))
+ (if message-return-action
+ (progn
+ (bury-buffer buffer)
+ (apply (car message-return-action) (cdr message-return-action)))
+ (with-current-buffer buffer (bury-buffer))))