diff options
| author | Gerd Moellmann | 2001-05-18 13:10:43 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-05-18 13:10:43 +0000 |
| commit | 0595722b7c732d17c22859ca5327c41e4d93b72e (patch) | |
| tree | 0813b4dc371692d863a0715bb33a1b16c4cc8577 | |
| parent | 1c66d9fb23c8dd7618d38853cfde9d4e3616ccd5 (diff) | |
| download | emacs-0595722b7c732d17c22859ca5327c41e4d93b72e.tar.gz emacs-0595722b7c732d17c22859ca5327c41e4d93b72e.zip | |
(tmm-get-keymap): Fix handling of :filter.
(tmm-add-prompt): Bind buffer-read-only to nil when inserting
text into *Completions*.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/tmm.el | 22 |
2 files changed, 19 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5011b176df6..735ed5f3182 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2001-05-18 Gerd Moellmann <gerd@gnu.org> | 1 | 2001-05-18 Gerd Moellmann <gerd@gnu.org> |
| 2 | 2 | ||
| 3 | * tmm.el (tmm-get-keymap): Fix handling of :filter. | ||
| 4 | (tmm-add-prompt): Bind buffer-read-only to nil when inserting | ||
| 5 | text into *Completions*. | ||
| 6 | |||
| 3 | * net/goto-addr.el (goto-address-at-point): Deal with URLs | 7 | * net/goto-addr.el (goto-address-at-point): Deal with URLs |
| 4 | part of which look like email addresses. | 8 | part of which look like email addresses. |
| 5 | 9 | ||
diff --git a/lisp/tmm.el b/lisp/tmm.el index 188e971a4e6..40462a1785e 100644 --- a/lisp/tmm.el +++ b/lisp/tmm.el | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | ;;; tmm.el --- text mode access to menu-bar | 1 | ;;; tmm.el --- text mode access to menu-bar |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1994, 1995, 1996, 2000 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1994, 1995, 1996, 2000, 2001 |
| 4 | ;; Free Software Foundation, Inc. | ||
| 4 | 5 | ||
| 5 | ;; Author: Ilya Zakharevich <ilya@math.mps.ohio-state.edu> | 6 | ;; Author: Ilya Zakharevich <ilya@math.mps.ohio-state.edu> |
| 6 | ;; Maintainer: FSF | 7 | ;; Maintainer: FSF |
| @@ -339,12 +340,11 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'." | |||
| 339 | (with-output-to-temp-buffer "*Completions*" | 340 | (with-output-to-temp-buffer "*Completions*" |
| 340 | (display-completion-list completions)) | 341 | (display-completion-list completions)) |
| 341 | (remove-hook 'completion-setup-hook 'tmm-completion-delete-prompt)) | 342 | (remove-hook 'completion-setup-hook 'tmm-completion-delete-prompt)) |
| 342 | (if tmm-completion-prompt | 343 | (when tmm-completion-prompt |
| 343 | (progn | 344 | (set-buffer "*Completions*") |
| 344 | (set-buffer "*Completions*") | 345 | (let ((buffer-read-only nil)) |
| 345 | (goto-char 1) | 346 | (goto-char (point-min)) |
| 346 | (insert tmm-completion-prompt))) | 347 | (insert tmm-completion-prompt)))) |
| 347 | ) | ||
| 348 | (save-selected-window | 348 | (save-selected-window |
| 349 | (other-window 1) ; Electric-pop-up-window does | 349 | (other-window 1) ; Electric-pop-up-window does |
| 350 | ; not work in minibuffer | 350 | ; not work in minibuffer |
| @@ -410,12 +410,14 @@ It uses the free variable `tmm-table-undef' to keep undefined keys." | |||
| 410 | (or (keymapp elt) (eq (car elt) 'lambda)) | 410 | (or (keymapp elt) (eq (car elt) 'lambda)) |
| 411 | (fboundp elt)) | 411 | (fboundp elt)) |
| 412 | (setq km elt)) | 412 | (setq km elt)) |
| 413 | |||
| 413 | ((if (listp (cdr-safe elt)) | 414 | ((if (listp (cdr-safe elt)) |
| 414 | (or (keymapp (cdr-safe elt)) | 415 | (or (keymapp (cdr-safe elt)) |
| 415 | (eq (car (cdr-safe elt)) 'lambda)) | 416 | (eq (car (cdr-safe elt)) 'lambda)) |
| 416 | (fboundp (cdr-safe elt))) | 417 | (fboundp (cdr-safe elt))) |
| 417 | (setq km (cdr elt)) | 418 | (setq km (cdr elt)) |
| 418 | (and (stringp (car elt)) (setq str (car elt)))) | 419 | (and (stringp (car elt)) (setq str (car elt)))) |
| 420 | |||
| 419 | ((if (listp (cdr-safe (cdr-safe elt))) | 421 | ((if (listp (cdr-safe (cdr-safe elt))) |
| 420 | (or (keymapp (cdr-safe (cdr-safe elt))) | 422 | (or (keymapp (cdr-safe (cdr-safe elt))) |
| 421 | (eq (car (cdr-safe (cdr-safe elt))) 'lambda)) | 423 | (eq (car (cdr-safe (cdr-safe elt))) 'lambda)) |
| @@ -426,8 +428,12 @@ It uses the free variable `tmm-table-undef' to keep undefined keys." | |||
| 426 | (stringp (cdr (car (cdr elt)))) ; keyseq cache | 428 | (stringp (cdr (car (cdr elt)))) ; keyseq cache |
| 427 | (setq cache (cdr (car (cdr elt)))) | 429 | (setq cache (cdr (car (cdr elt)))) |
| 428 | cache (setq str (concat str cache)))) | 430 | cache (setq str (concat str cache)))) |
| 431 | |||
| 429 | ((eq (car-safe elt) 'menu-item) | 432 | ((eq (car-safe elt) 'menu-item) |
| 433 | ;; (menu-item TITLE COMMAND KEY ...) | ||
| 430 | (setq plist (cdr-safe (cdr-safe (cdr-safe elt)))) | 434 | (setq plist (cdr-safe (cdr-safe (cdr-safe elt)))) |
| 435 | (when (consp (car-safe plist)) | ||
| 436 | (setq plist (cdr-safe plist))) | ||
| 431 | (setq km (nth 2 elt)) | 437 | (setq km (nth 2 elt)) |
| 432 | (setq str (eval (nth 1 elt))) | 438 | (setq str (eval (nth 1 elt))) |
| 433 | (setq filter (plist-get plist :filter)) | 439 | (setq filter (plist-get plist :filter)) |
| @@ -439,6 +445,7 @@ It uses the free variable `tmm-table-undef' to keep undefined keys." | |||
| 439 | (setq cache (cdr (nth 3 elt))) | 445 | (setq cache (cdr (nth 3 elt))) |
| 440 | cache | 446 | cache |
| 441 | (setq str (concat str cache)))) | 447 | (setq str (concat str cache)))) |
| 448 | |||
| 442 | ((if (listp (cdr-safe (cdr-safe (cdr-safe elt)))) | 449 | ((if (listp (cdr-safe (cdr-safe (cdr-safe elt)))) |
| 443 | (or (keymapp (cdr-safe (cdr-safe (cdr-safe elt)))) | 450 | (or (keymapp (cdr-safe (cdr-safe (cdr-safe elt)))) |
| 444 | (eq (car (cdr-safe (cdr-safe (cdr-safe elt)))) 'lambda)) | 451 | (eq (car (cdr-safe (cdr-safe (cdr-safe elt)))) 'lambda)) |
| @@ -450,6 +457,7 @@ It uses the free variable `tmm-table-undef' to keep undefined keys." | |||
| 450 | (stringp (cdr (car (cdr (cdr elt))))) ; keyseq cache | 457 | (stringp (cdr (car (cdr (cdr elt))))) ; keyseq cache |
| 451 | (setq cache (cdr (car (cdr (cdr elt))))) | 458 | (setq cache (cdr (car (cdr (cdr elt))))) |
| 452 | cache (setq str (concat str cache)))) | 459 | cache (setq str (concat str cache)))) |
| 460 | |||
| 453 | ((stringp event) ; x-popup or x-popup element | 461 | ((stringp event) ; x-popup or x-popup element |
| 454 | (if (or in-x-menu (stringp (car-safe elt))) | 462 | (if (or in-x-menu (stringp (car-safe elt))) |
| 455 | (setq str event event nil km elt) | 463 | (setq str event event nil km elt) |