Annotation of 43BSDReno/contrib/mh/miscellany/mhe/mh-shell.ml, revision 1.1

1.1     ! root        1: ; These functions are used to run shell commands and check for errors.
        !             2: ; this file is loaded from mh-e with an explicit load command.
        !             3: (defun
        !             4:     (send-to-shell pname progress
        !             5:        (save-excursion
        !             6:            (temp-use-buffer "mh-temp") (erase-buffer)
        !             7:            (insert-string (arg 1))
        !             8:            (beginning-of-file) (setq progress -1)
        !             9:            (while (& (! (eobp)) (< progress 50))
        !            10:                   (beginning-of-line)
        !            11:                   (setq progress (+ progress 1))
        !            12:                   (if (! (eolp))
        !            13:                       (progn 
        !            14:                              (set-mark) (end-of-line)
        !            15:                              (setq pname (region-to-string))
        !            16:                              (delete-to-killbuffer)
        !            17:                              (fast-filter-region pname)
        !            18:                       )
        !            19:                   )
        !            20:                   (next-line)
        !            21:            )
        !            22:        )
        !            23:     )
        !            24:     
        !            25:     (show-shell-errors
        !            26:        (save-excursion 
        !            27:            (temp-use-buffer "mh-temp")
        !            28:            (if (!= (buffer-size) 0)
        !            29:                (progn
        !            30:                      (pop-to-buffer "mh-temp")
        !            31:                      (sit-for 0)
        !            32:                      (beginning-of-file) (set-mark)
        !            33:                      (error-occured (re-replace-string "\n\n* *" "; "))
        !            34:                      (end-of-line)
        !            35:                      (backward-character) (backward-character)
        !            36:                      (kill-to-end-of-line)
        !            37:                      (send-string-to-terminal "\")
        !            38:                      (message (region-to-string))
        !            39:                      (send-string-to-terminal "\")
        !            40:                      (sit-for 15)
        !            41:                )
        !            42:            )
        !            43:        )
        !            44:     )
        !            45: )

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.