aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2010-09-17 15:30:30 +0200
committerStefan Monnier2010-09-17 15:30:30 +0200
commit31c381e884e5d93c8e6382aab771aece4d013ed0 (patch)
tree96069cf6584f148b83ee8e75e14dc6d26451d4b5
parente24ad6dd2b3499a367fff0dfd9c9c8a4bdaeb4fd (diff)
downloademacs-31c381e884e5d93c8e6382aab771aece4d013ed0.tar.gz
emacs-31c381e884e5d93c8e6382aab771aece4d013ed0.zip
* lisp/subr.el (y-or-n-p): Add the "(y or n)" that was lost somehow.
-rw-r--r--lisp/ChangeLog37
-rw-r--r--lisp/subr.el13
2 files changed, 29 insertions, 21 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e6dc4c1dd01..e1aeae2e17a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12010-09-17 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * subr.el (y-or-n-p): Add the "(y or n)" that was lost somehow.
4
12010-09-17 Stephen Berman <stephen.berman@gmx.net> 52010-09-17 Stephen Berman <stephen.berman@gmx.net>
2 6
3 * dframe.el (dframe-reposition-frame-emacs): Use tool-bar-pixel-width 7 * dframe.el (dframe-reposition-frame-emacs): Use tool-bar-pixel-width
@@ -11,8 +15,7 @@
11 15
122010-09-16 Chong Yidong <cyd@stupidchicken.com> 162010-09-16 Chong Yidong <cyd@stupidchicken.com>
13 17
14 * mail/sendmail.el: Add "*unsent mail*" to 18 * mail/sendmail.el: Add "*unsent mail*" to same-window-buffer-names.
15 same-window-buffer-names.
16 19
17 * term/x-win.el (x-cut-buffer-or-selection-value): Define as 20 * term/x-win.el (x-cut-buffer-or-selection-value): Define as
18 obsolete alias for x-selection-value. 21 obsolete alias for x-selection-value.
@@ -34,19 +37,19 @@
34 * net/tramp-gvfs.el (top): 37 * net/tramp-gvfs.el (top):
35 * net/tramp-cache.el (top): Use `tramp-compat-font-lock-add-keywords'. 38 * net/tramp-cache.el (top): Use `tramp-compat-font-lock-add-keywords'.
36 39
37 * net/tramp.el (tramp-progress-reporter-update): Use 40 * net/tramp.el (tramp-progress-reporter-update):
38 `tramp-compat-funcall'. 41 Use `tramp-compat-funcall'.
39 42
40 * net/tramp.el (tramp-process-actions): 43 * net/tramp.el (tramp-process-actions):
41 * net/tramp-gvfs.el (tramp-handle-vc-registered): 44 * net/tramp-gvfs.el (tramp-handle-vc-registered):
42 * net/tramp-sh.el (tramp-gvfs-handler-askquestion) 45 * net/tramp-sh.el (tramp-gvfs-handler-askquestion)
43 (tramp-get-remote-stat, tramp-get-remote-readlink): Use 46 (tramp-get-remote-stat, tramp-get-remote-readlink):
44 `tramp-compat-with-temp-message'. 47 Use `tramp-compat-with-temp-message'.
45 48
46 * net/tramp-sh.el (top): Require 'cl. 49 * net/tramp-sh.el (top): Require 'cl.
47 (tramp-handle-start-file-process): Use `tramp-compat-process-get'. 50 (tramp-handle-start-file-process): Use `tramp-compat-process-get'.
48 (tramp-open-connection-setup-interactive-shell): Use 51 (tramp-open-connection-setup-interactive-shell):
49 `tramp-compat-process-put'. 52 Use `tramp-compat-process-put'.
50 53
512010-09-15 Alan Mackenzie <acm@muc.de> 542010-09-15 Alan Mackenzie <acm@muc.de>
52 55
@@ -269,7 +272,7 @@
269 (tramp-dissect-file-name): Don't check anymore for multi-hop 272 (tramp-dissect-file-name): Don't check anymore for multi-hop
270 methods. 273 methods.
271 (tramp-debug-outline-regexp): Add a docstring. 274 (tramp-debug-outline-regexp): Add a docstring.
272 (tramp-debug-outline-level): Renamed from `tramp-outline-level'. 275 (tramp-debug-outline-level): Rename from `tramp-outline-level'.
273 (tramp-get-debug-buffer): Use it. 276 (tramp-get-debug-buffer): Use it.
274 277
275 * net/tramp-cache.el (top): Set tramp-autoload cookie for 278 * net/tramp-cache.el (top): Set tramp-autoload cookie for
@@ -289,9 +292,9 @@
289 * net/tramp-sh.el: New file, derived from tramp.el. 292 * net/tramp-sh.el: New file, derived from tramp.el.
290 (top): Initialize `tramp-methods', `tramp-default-method-alist', 293 (top): Initialize `tramp-methods', `tramp-default-method-alist',
291 `tramp-default-user-alist', `tramp-foreign-file-name-handler-alist'. 294 `tramp-default-user-alist', `tramp-foreign-file-name-handler-alist'.
292 Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use 295 Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old".
293 `ignore-errors' where appropriate. 296 Use `ignore-errors' where appropriate.
294 (tramp-sh-file-name-handler-alist): Renamed from 297 (tramp-sh-file-name-handler-alist): Rename from
295 `tramp-file-name-handler-alist'. 298 `tramp-file-name-handler-alist'.
296 (tramp-send-command-and-check): Return t or nil. Remove all 299 (tramp-send-command-and-check): Return t or nil. Remove all
297 `zerop' checks, where called. 300 `zerop' checks, where called.
@@ -317,7 +320,7 @@
317 320
3182010-09-12 Stefan Monnier <monnier@iro.umontreal.ca> 3212010-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
319 322
320 * subr.el (y-or-n-p): New function, moved from src/fns.c. Use read-key. 323 * subr.el (y-or-n-p): New function, moved from src/fns.c; use read-key.
321 324
3222010-09-12 Leo <sdl.web@gmail.com> 3252010-09-12 Leo <sdl.web@gmail.com>
323 326
@@ -358,12 +361,10 @@
358 (sql-comint-mysql): Handle "sql-port" as a numeric. 361 (sql-comint-mysql): Handle "sql-port" as a numeric.
359 (sql-port-history): Delete unused variable. 362 (sql-port-history): Delete unused variable.
360 (sql-get-login): Default "sql-port" to a number. 363 (sql-get-login): Default "sql-port" to a number.
361 (sql-product-alist): Correct Postgres prompt and terminator 364 (sql-product-alist): Correct Postgres prompt and terminator regexp.
362 regexp.
363 (sql-sqlite-program): Dynamically detect presence of "sqlite" or 365 (sql-sqlite-program): Dynamically detect presence of "sqlite" or
364 "sqlite3" executables. 366 "sqlite3" executables.
365 (sql-sqlite-login-params): Add "*.sqlite[23]?" database name 367 (sql-sqlite-login-params): Add "*.sqlite[23]?" database name pattern.
366 pattern.
367 (sql-buffer-live-p): New function. 368 (sql-buffer-live-p): New function.
368 (sql-mode-menu, sql-send-string): Use it. 369 (sql-mode-menu, sql-send-string): Use it.
369 (sql-mode-oracle-font-lock-keywords): Improve SQL*Plus REMARK 370 (sql-mode-oracle-font-lock-keywords): Improve SQL*Plus REMARK
@@ -373,7 +374,7 @@
373 374
3742010-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org> 3752010-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
375 376
376 * net/netrc.el (netrc-credentials): New conveniency function. 377 * net/netrc.el (netrc-credentials): New convenience function.
377 378
3782010-09-10 Stefan Monnier <monnier@iro.umontreal.ca> 3792010-09-10 Stefan Monnier <monnier@iro.umontreal.ca>
379 380
diff --git a/lisp/subr.el b/lisp/subr.el
index b391f1f0b93..e76a78cdda4 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -3376,19 +3376,26 @@ is nil and `use-dialog-box' is non-nil."
3376 ;; ¡Beware! when I tried to edebug this code, Emacs got into a weird state 3376 ;; ¡Beware! when I tried to edebug this code, Emacs got into a weird state
3377 ;; where all the keys were unbound (i.e. it somehow got triggered 3377 ;; where all the keys were unbound (i.e. it somehow got triggered
3378 ;; within read-key, apparently). I had to kill it. 3378 ;; within read-key, apparently). I had to kill it.
3379 (let ((answer 'none) 3379 (let ((answer 'recenter))
3380 (xprompt prompt))
3381 (if (and (display-popup-menus-p) 3380 (if (and (display-popup-menus-p)
3382 (listp last-nonmenu-event) 3381 (listp last-nonmenu-event)
3383 use-dialog-box) 3382 use-dialog-box)
3384 (setq answer 3383 (setq answer
3385 (x-popup-dialog t `(,prompt ("yes" . act) ("No" . skip)))) 3384 (x-popup-dialog t `(,prompt ("yes" . act) ("No" . skip))))
3385 (setq prompt (concat prompt
3386 (if (eq ?\s (aref prompt (1- (length prompt))))
3387 "" " ")
3388 "(y or n) "))
3386 (while 3389 (while
3387 (let* ((key 3390 (let* ((key
3388 (let ((cursor-in-echo-area t)) 3391 (let ((cursor-in-echo-area t))
3389 (when minibuffer-auto-raise 3392 (when minibuffer-auto-raise
3390 (raise-frame (window-frame (minibuffer-window)))) 3393 (raise-frame (window-frame (minibuffer-window))))
3391 (read-key (propertize xprompt 'face 'minibuffer-prompt))))) 3394 (read-key (propertize (if (eq answer 'recenter)
3395 prompt
3396 (concat "Please answer y or n. "
3397 prompt))
3398 'face 'minibuffer-prompt)))))
3392 (setq answer (lookup-key query-replace-map (vector key) t)) 3399 (setq answer (lookup-key query-replace-map (vector key) t))
3393 (cond 3400 (cond
3394 ((memq answer '(skip act)) nil) 3401 ((memq answer '(skip act)) nil)