<commit_before>(in-package :lem)

(defvar *info-mode-keymap*
  (make-keymap "info" nil *global-keymap*))

(define-major-mode info-mode
  (:name "info-mode"
   :keymap *info-mode-keymap*
   :syntax-table (make-syntax-table))
  (buffer-disable-undo (window-buffer))
  (setf (buffer-read-only-p (window-buffer)) t))

(define-key *info-mode-keymap* (kbd "q") 'info-quit)
(define-command info-quit () ()
  (let ((buffer (current-buffer)))
    (when (buffer-get buffer :popup)
      (delete-current-window))
    (kill-buffer (buffer-name buffer))
    t))

(defun info-popup (buffer &optional fn)
  (let ((one-window-p (one-window-p)))
    (with-buffer-read-only buffer nil
      (setq *current-window*
            (popup buffer fn
                   :goto-bob-p t
                   :erase-p t)))
    (info-mode)
    (buffer-put buffer :popup one-window-p)))<commit_msg>info-popupを修正<commit_after>(in-package :lem)

(defvar *info-mode-keymap*
  (make-keymap "info" nil *global-keymap*))

(define-major-mode info-mode
  (:name "info-mode"
   :keymap *info-mode-keymap*
   :syntax-table (make-syntax-table))
  (buffer-disable-undo (window-buffer))
  (setf (buffer-read-only-p (window-buffer)) t))

(define-key *info-mode-keymap* (kbd "q") 'info-quit)
(define-command info-quit () ()
  (let ((buffer (current-buffer)))
    (when (buffer-get buffer :popup)
      (delete-current-window))
    (kill-buffer (buffer-name buffer))
    t))

(defun info-popup (buffer &optional fn)
  (let ((one-window-p (or (buffer-get buffer :popup)
                          (one-window-p))))
    (with-buffer-read-only buffer nil
      (setq *current-window*
            (popup buffer fn
                   :goto-bob-p t
                   :erase-p t)))
    (info-mode)
    (buffer-put buffer :popup one-window-p)))
{'fraction_non_alphanumeric': 0.17189249720044794, 'fraction_numerical': 0.0, 'mean_word_length': 2.715176715176715, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3165133', 'n_tokens_mistral': 657, 'n_tokens_neox': 643, 'n_words': 135}