;; If there are four numbers in emacs-version, this is a pretest
;; version.
(let ((pretest-p (string-match "\\..*\\..*\\." emacs-version))
+ (from-buffer (current-buffer))
user-point prompt-beg-point message-end-point)
(setq message-end-point
(with-current-buffer (get-buffer-create "*Messages*")
(insert (format " default-enable-multibyte-characters: %s\n"
default-enable-multibyte-characters))
(insert "\n")
- (insert (format "Major mode: %s\n" mode-name))
+ (insert (format "Major mode: %s\n"
+ (buffer-local-value 'mode-name from-buffer)))
(insert "\n")
(insert "Minor modes in effect:\n")
(dolist (mode minor-mode-list)
- (and (boundp mode) (symbol-value mode)
- (insert (format " %s: %s\n" mode (symbol-value mode)))))
+ (and (boundp mode) (buffer-local-value mode from-buffer)
+ (insert (format " %s: %s\n" mode
+ (buffer-local-value mode from-buffer)))))
(insert "\n")
(insert "Recent input:\n")
(let ((before-keys (point)))