From 2eae9bf03c08b1e21293b9d5b8af96ea1882010f Mon Sep 17 00:00:00 2001 From: John Sullivan Date: Tue, 17 Feb 2009 17:27:15 -0500 Subject: [PATCH] Fix problem introduced by recent commit that broke using SPC as separator. --- ChangeLog | 11 +++++++++++ planner-multi.el | 34 ++++++++++++++++++++-------------- 2 files changed, 31 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index eed366f..1b41813 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2009-02-17 John Sullivan + + * planner-multi.el (planner-multi-read-name): I don't think the + value for `crm-separator' sohuld be regexp quoted. If we're using + crm, then we need to modify its completion map in the same way we + do if we're not. I'm setting up the map inside the function + instead of defvar because I'm concerned about what happens when + people modify `planner-multi-separator' after loading + planner-multi. Better ways of doing this welcome, but it seems to + work. + 2009-02-15 John Sullivan * planner.el (planner-annotation-from-file-relative): Delete this diff --git a/planner-multi.el b/planner-multi.el index f308e30..aa8921e 100644 --- a/planner-multi.el +++ b/planner-multi.el @@ -775,25 +775,31 @@ If PROMPT is specified, use that instead of \"Page:\"." (copy-sequence minibuffer-prompt-properties) 'read-only nil)) (completion-ignore-case t) - (crm-separator (regexp-quote planner-multi-separator)) - (map (make-sparse-keymap)) - (minibuffer-local-completion-map - (progn - (set-keymap-parent map minibuffer-local-completion-map) - (define-key map planner-multi-separator 'self-insert-command) - map)) (prompt (format "%s(default: %s) " (or prompt "Page: ") planner-default-page)) + (crm-separator planner-multi-separator) + (map (make-sparse-keymap)) + (planner-multi-local-completion-map + (progn + (if (featurep 'crm) + (set-keymap-parent map crm-local-completion-map) + (set-keymap-parent map minibuffer-local-completion-map)) + (define-key map planner-multi-separator 'self-insert-command) + map)) str) (setq str (if (fboundp 'completing-read-multiple) - (completing-read-multiple - prompt file-alist nil nil initial - 'planner-history-list - planner-default-page) - (planner-multi-split - (read-string prompt initial 'planner-history-list - planner-default-page)))) + (let ((crm-local-completion-map + planner-multi-local-completion-map)) + (completing-read-multiple + prompt file-alist nil nil initial + 'planner-history-list + planner-default-page)) + (let ((minibuffer-local-completion-map + planner-multi-local-completion-map)) + (planner-multi-split + (read-string prompt initial 'planner-history-list + planner-default-page))))) (cond ((or (null str) (string= (car str) "")) planner-default-page) -- 2.11.4.GIT