-** readline complete fix, replaced with proper solution
-
-update: I need this function here, where INSIDE_EMACS is replaced with RLC_INSIDE_EMACS.
-
-i had commented out a few lines here, but instead I am setting in my profile
-the environment variable I commented out here. Yes, that is not the best explanation, but I will probably delete this as
-old history anyways.
-#+begin_src emacs-lisp
-
-(defun comint-exec-1 (name buffer command switches)
- (let ((process-environment
- (nconc
- ;; If using termcap, we specify `emacs' as the terminal type
- ;; because that lets us specify a width.
- ;; If using terminfo, we specify `dumb' because that is
- ;; a defined terminal type. `emacs' is not a defined terminal type
- ;; and there is no way for us to define it here.
- ;; Some programs that use terminfo get very confused
- ;; if TERM is not a valid terminal type.
- ;; ;; There is similar code in compile.el.
- (if (and (boundp 'system-uses-terminfo) system-uses-terminfo)
- (list "TERM=dumb" "TERMCAP="
- (format "COLUMNS=%d" (window-width)))
- (list "TERM=emacs"
- (format "TERMCAP=emacs:co#%d:tc=unknown:" (window-width))))
- ;; ian: commented this out
- ;;(unless (getenv "EMACS")
- ;; (list "EMACS=t"))
- (list (format "RLC_INSIDE_EMACS=%s,comint" emacs-version))
- process-environment))
- (default-directory
- (if (file-accessible-directory-p default-directory)
- default-directory
- "/"))
- proc decoding encoding changed)
- (let ((exec-path (if (and command (file-name-directory command))
- ;; If the command has slashes, make sure we
- ;; first look relative to the current directory.
- (cons default-directory exec-path) exec-path)))
- (setq proc (apply 'start-file-process name buffer command switches)))
- ;; Some file name handler cannot start a process, fe ange-ftp.
- (unless (processp proc) (error "No process started"))
- (let ((coding-systems (process-coding-system proc)))
- (setq decoding (car coding-systems)
- encoding (cdr coding-systems)))
- ;; Even if start-file-process left the coding system for encoding data
- ;; sent from the process undecided, we had better use the same one
- ;; as what we use for decoding. But, we should suppress EOL
- ;; conversion.
- (if (and decoding (not encoding))
- (setq encoding (coding-system-change-eol-conversion decoding 'unix)
- changed t))
- (if changed
- (set-process-coding-system proc decoding encoding))
- proc))
-#+end_src