annotate emacs/hist.el @ 13:1cd5c7952aaa default tip

fix failure to read first line of Air/Lava, keep me from swimming in Lava, again!
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Sun, 30 Jan 2022 14:49:33 -0500
parents 509549c55989
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
1 ;;; a tcsh-type history key facility for sub-shells
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
2 ;; Last edited: Wed Nov 14 09:52:12 1990
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
3
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
4 (provide 'hist)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
5 (require 'prompt-for-word)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
6
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
7 (defvar hk-last-mb nil "*begin of last hk match")
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
8
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
9 (defvar hk-last-mark nil "*beginning of last hk insertion")
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
10
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
11 (defvar hk-search-pat nil "*regexp for hk search")
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
12
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
13 (defvar hk-last-point 0 "*end of last hk insertion")
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
14
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
15 (defvar hkr-last-point 0 "*end of last hk pattern search insertion")
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
16
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
17 (defvar hkr-search-pat nil "*regexp for hk user pattern search")
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
18
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
19 (defvar hk-last-user-pat nil "*user part of last pattern search")
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
20
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
21 (make-local-variable 'hk-last-mb)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
22 (make-local-variable 'hk-last-mark)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
23 (make-local-variable 'hk-last-point)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
24 (make-local-variable 'hk-search-pat)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
25 (make-local-variable 'hkr-search-pat)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
26 (make-local-variable 'hkr-last-point)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
27 (make-local-variable 'hk-last-user-pat)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
28
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
29 (defvar hk-pat-table '(("*shell*" . ".*: ")
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
30 ("*prolog*" . "| \\?- ")
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
31 ("*lisp*" . ">")
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
32 ("*inferior-lisp*" . ">"))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
33 "default crux of prompt pattern, by buffer name")
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
34
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
35 (defun hist-key (&optional rpt)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
36 "offer a previous input, a la tcsh ^P"
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
37 (interactive "p")
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
38 (if (not rpt) (setq rpt 1))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
39 (let ((here (point))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
40 (pat (or hk-search-pat
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
41 (setq hk-search-pat
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
42 (concat "^" (or (cdr (assoc (buffer-name
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
43 (current-buffer))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
44 hk-pat-table))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
45 "")
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
46 "\\(.+\\)$")))))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
47 (hk-find-b rpt here pat)))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
48
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
49 (defun hk-find-b (rpt here pat)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
50 "search backwards for pat, no dups, rpt times"
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
51 (while (> rpt 0)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
52 (goto-char (if (= (point) hk-last-point)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
53 hk-last-mb
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
54 (if (eobp)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
55 (progn (beginning-of-line)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
56 (setq hk-last-mark nil)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
57 (point))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
58 (error "nowhere??"))))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
59 (let ((keep-trying t))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
60 (while keep-trying
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
61 (if (re-search-backward pat nil t)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
62 (let ((entry (buffer-substring (match-beginning 1)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
63 (match-end 1))))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
64 (setq hk-last-mb (match-beginning 0))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
65 (goto-char (or hk-last-mark here))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
66 (if (looking-at (regexp-quote entry))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
67 (goto-char hk-last-mb)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
68 (setq keep-trying nil)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
69 (if hk-last-mark (delete-region hk-last-mark hk-last-point))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
70 (setq hk-last-mark (point))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
71 (push-mark (point) t)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
72 (insert entry)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
73 (setq hk-last-point (point))))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
74 (unwind-protect (error "no more??")
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
75 (goto-char (if hk-last-mark
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
76 hk-last-point
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
77 here))))))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
78 (setq rpt (1- rpt))))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
79
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
80 (defun hist-key-back (&optional rpt)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
81 "offer a previous input, a la tcsh ^N"
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
82 (interactive "p")
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
83 (if (not rpt) (setq rpt 1))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
84 (let ((here (point))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
85 (pat (or hk-search-pat
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
86 (error "no pattern"))))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
87 (while (> rpt 0)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
88 (goto-char (if (= (point) hk-last-point)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
89 hk-last-mb
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
90 (error "lost context")))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
91 (let ((keep-trying t))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
92 (while keep-trying
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
93 (end-of-line)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
94 (if (re-search-forward pat nil t)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
95 (let ((entry (buffer-substring (match-beginning 1)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
96 (match-end 1))))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
97 (setq hk-last-mb (match-beginning 0))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
98 (goto-char (or hk-last-mark here))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
99 (if (looking-at (regexp-quote entry))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
100 ;; allow for back to square one
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
101 (if (progn (end-of-line)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
102 (eobp))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
103 (progn (setq keep-trying nil)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
104 (if hk-last-mark
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
105 (delete-region hk-last-mark hk-last-point)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
106 (error "shouldnt"))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
107 (goto-char hk-last-mark))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
108 (goto-char hk-last-mb))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
109 (setq keep-trying nil)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
110 (if hk-last-mark (delete-region hk-last-mark hk-last-point))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
111 (setq hk-last-mark (point))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
112 (push-mark (point) t)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
113 (insert entry)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
114 (setq hk-last-point (point))))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
115 (unwind-protect (error "no more??")
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
116 (goto-char (if hk-last-mark
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
117 hk-last-point
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
118 here))))))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
119 (setq rpt (1- rpt)))))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
120
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
121 (defun hist-key-search (&optional rpt pat)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
122 "offer a previous input, searching backwards for a pattern"
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
123 (interactive "p")
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
124 (if (not rpt) (setq rpt 1))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
125 (let ((here (point))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
126 (full-pat
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
127 (if (= (point) hkr-last-point)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
128 hkr-search-pat
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
129 (setq hkr-search-pat
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
130 (if (eobp)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
131 (concat "^"
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
132 (or (cdr (assoc (buffer-name
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
133 (current-buffer))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
134 hk-pat-table))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
135 "")
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
136 "\\(.*"
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
137 (setq hk-last-user-pat
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
138 (or pat
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
139 (regexp-quote
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
140 (prompt-for-word
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
141 "Pattern: "
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
142 (or hk-last-user-pat "")
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
143 nil nil))))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
144 ".*\\)$")
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
145 (error "nowhere??"))))))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
146 (hk-find-b rpt here full-pat)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
147 (setq hkr-last-point hk-last-point)))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
148
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
149 (require 'shell)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
150
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
151 (define-key shell-mode-map "\ep" 'hist-key)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
152 (define-key shell-mode-map "\en" 'hist-key-back)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
153 (define-key shell-mode-map "\es" 'hist-key-search)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
154 (define-key shell-mode-map "\e\C-i" 'shell-expand-file-name)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
155
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
156 ;;; hack in case we've been given com-int
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
157 (if (not (boundp 'inferior-lisp-mode-map))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
158 (require 'inf-lisp))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
159 (define-key inferior-lisp-mode-map "\ep" 'hist-key)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
160 (define-key inferior-lisp-mode-map "\en" 'hist-key-back)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
161 ;; note that prolog copies shell-mode-map, so no need to fix that