[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 164/352: Järjestellään uudelleen funktiota wcheck-choose-suggest
From: |
Stefan Monnier |
Subject: |
[elpa] 164/352: Järjestellään uudelleen funktiota wcheck-choose-suggestion-minibuffer |
Date: |
Mon, 07 Jul 2014 14:03:33 +0000 |
monnier pushed a commit to branch master
in repository elpa.
commit 226a6fe934fa9d9a925674477c8b3228e9ed31f4
Author: Teemu Likonen <address@hidden>
Date: Tue Aug 3 07:10:37 2010 +0000
Järjestellään uudelleen funktiota wcheck-choose-suggestion-minibuffer
---
wcheck-mode.el | 52 ++++++++++++++++++++++++++--------------------------
1 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/wcheck-mode.el b/wcheck-mode.el
index 013a4ae..3fa7446 100644
--- a/wcheck-mode.el
+++ b/wcheck-mode.el
@@ -1143,26 +1143,24 @@ SUGGESTIONS is a list of strings. Return user's choice
(string)."
"Create a text menu to choose a substitute suggestion.
SUGGESTIONS is a list of strings. Return user's choice (string)."
(if suggestions
- (let* ((window-min-height 2)
- (split-window-keep-point t)
- (chars (append (number-sequence 49 57) (list 48)
- (number-sequence 97 122)))
- alist)
+ (let ((chars (append (number-sequence ?1 ?9) (list ?0)
+ (number-sequence ?a ?z)))
+ alist)
(with-temp-buffer
(setq mode-line-format (list "-- Choose a substitute %-")
cursor-type nil
truncate-lines t)
- (let (suggestion string)
+ (let (sug string)
(while (and suggestions chars)
- (setq suggestion (car suggestions)
+ (setq sug (car suggestions)
suggestions (cdr suggestions)
string (concat " "
(propertize (format "(%c)" (car chars))
'face 'bold)
- " " suggestion)
- alist (cons (cons (car chars) suggestion) alist)
+ " " sug)
+ alist (cons (cons (car chars) sug) alist)
chars (cdr chars))
(insert string)
(when (and suggestions chars
@@ -1172,23 +1170,25 @@ SUGGESTIONS is a list of strings. Return user's choice
(string)."
(newline 1))))
(setq buffer-read-only t)
- (let ((window (split-window-vertically
- (1- (- (count-lines (point-min) (point-max))))))
- (prompt
- (apply #'propertize
- (let ((last (caar alist)))
- (format "Number %s(%s):"
- (if (memq last (number-sequence ?a ?z))
- "or letter "
- "")
- (cond ((= last ?1) "1")
- ((memq last (number-sequence ?2 ?9))
- (format "1-%c" last))
- ((= last ?0) "1-9,0")
- ((= last ?a) "1-9,0,a")
- ((memq last (number-sequence ?b ?z))
- (format "1-9,0,a-%c" last)))))
- minibuffer-prompt-properties)))
+ (let* ((window-min-height 2)
+ (split-window-keep-point t)
+ (window (split-window-vertically
+ (- 0 (count-lines (point-min) (point-max)) 1)))
+ (prompt
+ (apply #'propertize
+ (let ((last (caar alist)))
+ (format "Number %s(%s):"
+ (if (memq last (number-sequence ?a ?z))
+ "or letter "
+ "")
+ (cond ((= last ?1) "1")
+ ((memq last (number-sequence ?2 ?9))
+ (format "1-%c" last))
+ ((= last ?0) "1-9,0")
+ ((= last ?a) "1-9,0,a")
+ ((memq last (number-sequence ?b ?z))
+ (format "1-9,0,a-%c" last)))))
+ minibuffer-prompt-properties)))
(set-window-buffer window (current-buffer))
(set-window-dedicated-p window t)
(cond ((cdr (assq (read-char-exclusive prompt) alist)))
- [elpa] 280/352: Add a table of contents to README file, (continued)
- [elpa] 280/352: Add a table of contents to README file, Stefan Monnier, 2014/07/07
- [elpa] 276/352: Put quotes `...' around the example function add-word-to-dictionary, Stefan Monnier, 2014/07/07
- [elpa] 278/352: New feature: the only action menu item can be chosen automatically, Stefan Monnier, 2014/07/07
- [elpa] 269/352: Clarify that OPERATION-MODE can be also be nil, Stefan Monnier, 2014/07/07
- [elpa] 281/352: State that action-autoselect=nil is the default, Stefan Monnier, 2014/07/07
- [elpa] 282/352: Replace nested IF structure with COND in wcheck-actions, Stefan Monnier, 2014/07/07
- [elpa] 284/352: Don't bind variable "language" unnecessarily, Stefan Monnier, 2014/07/07
- [elpa] 288/352: Document where "syntax" and "case-fold" are used, Stefan Monnier, 2014/07/07
- [elpa] 286/352: Make "syntax" and "case-fold" effective with "parser" function, Stefan Monnier, 2014/07/07
- [elpa] 283/352: Use org-mode markup in README and rename it to README.org, Stefan Monnier, 2014/07/07
- [elpa] 164/352: Järjestellään uudelleen funktiota wcheck-choose-suggestion-minibuffer,
Stefan Monnier <=
- [elpa] 323/352: Fix bug in SIGNAL call: add FORMAT, Stefan Monnier, 2014/07/07
- [elpa] 329/352: Add another empty lines before headings, Stefan Monnier, 2014/07/07
- [elpa] 331/352: Remove "mode" from "Speck mode" link text, Stefan Monnier, 2014/07/07
- [elpa] 335/352: Fix typo in the doc string of wcheck-language-date, Stefan Monnier, 2014/07/07
- [elpa] 332/352: Add link to Marmalade package archive, Stefan Monnier, 2014/07/07
- [elpa] 352/352: * wcheck-mode: New package., Stefan Monnier, 2014/07/07
- [elpa] 299/352: Version 2011.07.27, Stefan Monnier, 2014/07/07
- [elpa] 290/352: Change README link to point to a newer commit, Stefan Monnier, 2014/07/07
- [elpa] 259/352: Rephrase documentation and comments, Stefan Monnier, 2014/07/07
- [elpa] 321/352: Make README.org more org-export-friendly, Stefan Monnier, 2014/07/07