1. Ivan Andrus
  2. gap-mode


Ivan Andrus  committed 16eeaf4

Apply ansi-colors and don't show trailing whitespace in help buffers

  • Participants
  • Parent commits 63dcad1
  • Branches default

Comments (0)

Files changed (1)

File gap-process.el

View file
  • Ignore whitespace
   (let ((cbuf (current-buffer)))
     (set-buffer "*Help*")
     (setq buffer-read-only nil)                                     ;; GEZ: so we can put help info into the buffer
+    (set (make-local-variable 'show-trailing-whitespace) nil)
     (goto-char (point-max))
     (insert string)
-    (ansi-color-filter-region (point-min) (point-max))
     (if (re-search-forward
          "  -- <space> page, <n> next line, <b> back, <p> back line, <q> quit --"
          )                    ;;GEZ: Add to handle GAP 4.4.x output
           (delete-region (match-beginning 0) (point))
+          (ansi-color-apply-on-region (point-min) (point-max))
           (comint-send-string proc " ")))                           ;;NOTE: tell GAP to continue with next page
                                         ;(if (looking-at gap-prompt-regexp)                             ;;GEZ: original
     (if (looking-at (concat gap-prompt-regexp "$"))                ;;GEZ: make sure get the end of it all
           (delete-region (point) (point-max))
+          (ansi-color-apply-on-region (point-min) (point-max))
 ;;; NOTE: this section is only needed for NTEmacs
           (goto-char (point-min))
           (while (re-search-forward
                   "^\\( *\^H\\)\\|\\(\C-m\\)" nil t)              ;;GEZ: get rid of ^H ^H and ^M
             (replace-match ""))
           ;; turn numbers into buttons so that we can click on them as well
           (goto-char (point-min))
           (while (re-search-forward