diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2010-08-22 16:02:16 -0400 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2010-08-22 16:02:16 -0400 |
commit | b0126eac41487b9bca5af5cbb2212ff5b2c58b80 (patch) | |
tree | 680ba932d259776ebfdb6d424fa8f668e1001f7c /lisp | |
parent | b613941ba003bbf5024415ac4f8c2a0e12434751 (diff) | |
parent | bc7d7ea63ba9d98b3ecc3b6decf4392a651dcbfb (diff) | |
download | emacs-b0126eac41487b9bca5af5cbb2212ff5b2c58b80.tar.gz |
Merge changes from emacs-23 branch.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 73 | ||||
-rw-r--r-- | lisp/align.el | 6 | ||||
-rw-r--r-- | lisp/calendar/diary-lib.el | 4 | ||||
-rw-r--r-- | lisp/emacs-lisp/easy-mmode.el | 30 | ||||
-rw-r--r-- | lisp/files.el | 1 | ||||
-rw-r--r-- | lisp/ido.el | 65 | ||||
-rw-r--r-- | lisp/iswitchb.el | 10 | ||||
-rw-r--r-- | lisp/mail/rmail.el | 13 | ||||
-rw-r--r-- | lisp/menu-bar.el | 3 | ||||
-rw-r--r-- | lisp/progmodes/flymake.el | 3 | ||||
-rw-r--r-- | lisp/progmodes/make-mode.el | 8 | ||||
-rw-r--r-- | lisp/simple.el | 3 | ||||
-rw-r--r-- | lisp/subr.el | 9 | ||||
-rw-r--r-- | lisp/woman.el | 5 |
14 files changed, 158 insertions, 75 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fa5c117be83..12a2ffce5bd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,74 @@ +2010-08-22 Chong Yidong <cyd@stupidchicken.com> + + * emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix (Bug#6880). + +2010-08-22 Leo <sdl.web@gmail.com> + + Fix buffer-list rename&refresh after after killing a buffer in ido. + * lisp/ido.el: Revert Óscar's. + (ido-kill-buffer-at-head): Exit the minibuffer with ido-exit=refresh. + Remember the buffers at head, rather than their name. + * lisp/iswitchb.el (iswitchb-kill-buffer): Re-make the list. + +2010-08-22 Kirk Kelsey <kirk.kelsey@0x4b.net> (tiny change) + Stefan Monnier <monnier@iro.umontreal.ca> + + * progmodes/make-mode.el (makefile-fill-paragraph): Account for the + extra backslash added to each line (bug#6890). + +2010-08-22 Stefan Monnier <monnier@iro.umontreal.ca> + + * subr.el (read-key): Don't echo keystrokes (bug#6883). + +2010-08-22 Glenn Morris <rgm@gnu.org> + + * menu-bar.el (menu-bar-games-menu): Add landmark. + +2010-08-22 Glenn Morris <rgm@gnu.org> + + * align.el (align-regexp): Make group and spacing arguments + use the interactive defaults when non-interactive. (Bug#6698) + + * mail/rmail.el (rmail-forward): Replace mail-text-start with its + expansion, so as not to need sendmail. + (mail-text-start): Remove declaration. + (rmail-retry-failure): Require sendmail. + +2010-08-22 Chong Yidong <cyd@stupidchicken.com> + + * subr.el (read-key): Don't hide the menu-bar entries (bug#6881). + +2010-08-22 Michael Albinus <michael.albinus@gmx.de> + + * progmodes/flymake.el (flymake-start-syntax-check-process): + Use `start-file-process' in order to let it run also on remote hosts. + +2010-08-22 Kenichi Handa <handa@m17n.org> + + * files.el: Add `word-wrap' as safe local variable. + +2010-08-22 Glenn Morris <rgm@gnu.org> + + * woman.el (woman-translate): Case matters. (Bug#6849) + +2010-08-22 Chong Yidong <cyd@stupidchicken.com> + + * simple.el (kill-region): Doc fix (Bug#6787). + +2010-08-22 Glenn Morris <rgm@gnu.org> + + * calendar/diary-lib.el (diary-header-line-format): + Fit it to the window, not the frame. + +2010-08-22 Andreas Schwab <schwab@linux-m68k.org> + + * subr.el (ignore-errors): Add debug declaration. + +2010-08-22 Geoff Gole <geoffgole@gmail.com> (tiny change) + + * whitespace.el (whitespace-color-off): Remove post-command-hook + locally. + 2010-08-21 Stefan Monnier <monnier@iro.umontreal.ca> * vc/add-log.el (add-log-file-name): Don't get confused by symlinks. @@ -346,7 +417,7 @@ (ctext-standard-encodings): New variable. (ctext-non-standard-encodings-table): List only elements for non-standard encodings. - (ctext-pre-write-conversion): Adjusted for the above change. + (ctext-pre-write-conversion): Adjust for the above change. Check ctext-standard-encodings. * international/mule-conf.el (compound-text): Doc fix. diff --git a/lisp/align.el b/lisp/align.el index 9d811327021..0812d362875 100644 --- a/lisp/align.el +++ b/lisp/align.el @@ -1,7 +1,7 @@ ;;; align.el --- align text to a specific column, by regexp -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +;; 2008, 2009, 2010 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> ;; Maintainer: FSF @@ -944,6 +944,8 @@ region, call `align-regexp' and type in that regular expression." (list (concat "\\(\\s-*\\)" (read-string "Align regexp: ")) 1 align-default-spacing nil)))) + (or group (setq group 1)) + (or spacing (setq spacing align-default-spacing)) (let ((rule (list (list nil (cons 'regexp regexp) (cons 'group (abs group)) diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 8fb464aa7e6..39354bd31e3 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -383,14 +383,14 @@ The format of the header is specified by `diary-header-line-format'." "Some text is hidden - press \"s\" in calendar \ before edit/copy" "Diary")) - ?\s (frame-width))) + ?\s (window-width))) "Format of the header line displayed by `diary-simple-display'. Only used if `diary-header-line-flag' is non-nil." :group 'diary :type 'sexp :initialize 'custom-initialize-default :set 'diary-set-header - :version "22.1") + :version "23.3") ; frame-width -> window-width ;; The first version of this also checked for diary-selective-display ;; in the non-fancy case. This was an attempt to distinguish between diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 5a21946183e..337f1d6c402 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -86,25 +86,23 @@ replacing its case-insensitive matches with the literal string in LIGHTER." ;;;###autoload (defmacro define-minor-mode (mode doc &optional init-value lighter keymap &rest body) "Define a new minor mode MODE. -This function defines the associated control variable MODE, keymap MODE-map, -and toggle command MODE. - +This defines the control variable MODE and the toggle command MODE. DOC is the documentation for the mode toggle command. + Optional INIT-VALUE is the initial value of the mode's variable. Optional LIGHTER is displayed in the modeline when the mode is on. -Optional KEYMAP is the default (defvar) keymap bound to the mode keymap. - If it is a list, it is passed to `easy-mmode-define-keymap' - in order to build a valid keymap. It's generally better to use - a separate MODE-map variable than to use this argument. -The above three arguments can be skipped if keyword arguments are -used (see below). - -BODY contains code to execute each time the mode is activated or deactivated. - It is executed after toggling the mode, - and before running the hook variable `MODE-hook'. - Before the actual body code, you can write keyword arguments (alternating - keywords and values). These following keyword arguments are supported (other - keywords will be passed to `defcustom' if the minor mode is global): +Optional KEYMAP is the default keymap bound to the mode keymap. + If non-nil, it should be a variable name (whose value is a keymap), + a keymap, or a list of arguments for `easy-mmode-define-keymap'. + If KEYMAP is a keymap or list, this also defines the variable MODE-map. + +BODY contains code to execute each time the mode is enabled or disabled. + It is executed after toggling the mode, and before running MODE-hook. + Before the actual body code, you can write keyword arguments, i.e. + alternating keywords and values. These following special keywords + are supported (other keywords are passed to `defcustom' if the minor + mode is global): + :group GROUP Custom group name to use in all generated `defcustom' forms. Defaults to MODE without the possible trailing \"-mode\". Don't use this default group name unless you have written a diff --git a/lisp/files.el b/lisp/files.el index 9a07509ed8b..3d9dd9065c2 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2805,6 +2805,7 @@ asking you for confirmation." (no-update-autoloads . booleanp) (tab-width . integerp) ;; C source code (truncate-lines . booleanp) ;; C source code + (word-wrap . booleanp) ;; C source code (bidi-display-reordering . booleanp))) ;; C source code (put 'bidi-paragraph-direction 'safe-local-variable diff --git a/lisp/ido.el b/lisp/ido.el index d34893d708b..ad6c48c01e9 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -1070,11 +1070,11 @@ Only used if `ido-use-virtual-buffers' is non-nil.") ;; Stores the current list of items that will be searched through. ;; The list is ordered, so that the most interesting item comes first, ;; although by default, the files visible in the current frame are put -;; at the end of the list. -(defvar ido-cur-list nil) +;; at the end of the list. Created by `ido-make-item-list'. +(defvar ido-cur-list) ;; Stores the choice list for ido-completing-read -(defvar ido-choice-list nil) +(defvar ido-choice-list) ;; Stores the list of items which are ignored when building ;; `ido-cur-list'. It is in no specific order. @@ -3400,11 +3400,9 @@ for first matching file." (if ido-temp-list (nconc ido-temp-list ido-current-buffers) (setq ido-temp-list ido-current-buffers)) - (when (and default (buffer-live-p (get-buffer default))) - (setq ido-temp-list - (cons default (delete default ido-temp-list)))) - (if ido-use-virtual-buffers - (ido-add-virtual-buffers-to-list)) + (if default + (setq ido-temp-list + (cons default (delete default ido-temp-list)))) (run-hooks 'ido-make-buffer-list-hook) ido-temp-list)) @@ -3672,7 +3670,6 @@ This is to make them appear as if they were \"virtual buffers\"." ;; Used by `ido-get-buffers-in-frames' to walk through all windows (let ((buf (buffer-name (window-buffer win)))) (unless (or (member buf ido-bufs-in-frame) - (minibufferp buf) (member buf ido-ignore-item-temp-list)) ;; Only add buf if it is not already in list. ;; This prevents same buf in two different windows being @@ -3913,27 +3910,6 @@ This is to make them appear as if they were \"virtual buffers\"." ;;(add-hook 'completion-setup-hook 'completion-setup-function) (display-completion-list completion-list))))))) -(defun ido-kill-buffer-internal (buf) - "Kill buffer BUF and rebuild ido's buffer list if needed." - (if (not (kill-buffer buf)) - ;; buffer couldn't be killed. - (setq ido-rescan t) - ;; else buffer was killed so remove name from list. - (setq ido-cur-list (delq buf ido-cur-list)) - ;; Some packages, like uniquify.el, may rename buffers when one - ;; is killed, so we need to test this condition to avoid using - ;; an outdated list of buffer names. We don't want to always - ;; rebuild the list of buffers, as this alters the previous - ;; buffer order that the user was seeing on the prompt. However, - ;; when we rebuild the list, we try to keep the previous second - ;; buffer as the first one. - (catch 'update - (dolist (b ido-cur-list) - (unless (get-buffer b) - (setq ido-cur-list (ido-make-buffer-list (cadr ido-matches))) - (setq ido-rescan t) - (throw 'update nil)))))) - ;;; KILL CURRENT BUFFER (defun ido-kill-buffer-at-head () "Kill the buffer at the head of `ido-matches'. @@ -3942,15 +3918,26 @@ If cursor is not at the end of the user input, delete to end of input." (if (not (eobp)) (delete-region (point) (line-end-position)) (let ((enable-recursive-minibuffers t) - (buf (ido-name (car ido-matches)))) - (when buf - (ido-kill-buffer-internal buf) - ;; Check if buffer still exists. - (if (get-buffer buf) - ;; buffer couldn't be killed. + (buf (ido-name (car ido-matches))) + (nextbuf (cadr ido-matches))) + (when (get-buffer buf) + ;; If next match names a buffer use the buffer object; buffer + ;; name may be changed by packages such as uniquify; mindful + ;; of virtual buffers. + (when (and nextbuf (get-buffer nextbuf)) + (setq nextbuf (get-buffer nextbuf))) + (if (null (kill-buffer buf)) + ;; Buffer couldn't be killed. (setq ido-rescan t) - ;; else buffer was killed so remove name from list. - (setq ido-cur-list (delq buf ido-cur-list))))))) + ;; Else `kill-buffer' succeeds so re-make the buffer list + ;; taking into account packages like uniquify may rename + ;; buffers. + (if (bufferp nextbuf) + (setq nextbuf (buffer-name nextbuf))) + (setq ido-default-item nextbuf + ido-text-init ido-text + ido-exit 'refresh) + (exit-minibuffer)))))) ;;; DELETE CURRENT FILE (defun ido-delete-file-at-head () @@ -3988,7 +3975,7 @@ Record command in `command-history' if optional RECORD is non-nil." ((eq method 'kill) (if record (ido-record-command 'kill-buffer buffer)) - (ido-kill-buffer-internal buffer)) + (kill-buffer buffer)) ((eq method 'other-window) (if record diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el index ea4b00dc90d..081897a89b3 100644 --- a/lisp/iswitchb.el +++ b/lisp/iswitchb.el @@ -1027,8 +1027,8 @@ Return the modified list with the last element prepended to it." (defun iswitchb-kill-buffer () "Kill the buffer at the head of `iswitchb-matches'." (interactive) - (let ( (enable-recursive-minibuffers t) - buf) + (let ((enable-recursive-minibuffers t) + buf) (setq buf (car iswitchb-matches)) ;; check to see if buf is non-nil. @@ -1042,8 +1042,10 @@ Return the modified list with the last element prepended to it." (if (get-buffer buf) ;; buffer couldn't be killed. (setq iswitchb-rescan t) - ;; else buffer was killed so remove name from list. - (setq iswitchb-buflist (delq buf iswitchb-buflist))))))) + ;; Else `kill-buffer' succeeds so re-make the buffer list + ;; taking into account packages like uniquify may rename + ;; buffers + (iswitchb-make-buflist iswitchb-default)))))) ;;; VISIT CHOSEN BUFFER (defun iswitchb-visit-buffer (buffer) diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index fbf5c534a28..fa0b7bef207 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -191,8 +191,6 @@ please report it with \\[report-emacs-bug].") :group 'rmail-retrieve :type '(repeat (directory))) -(declare-function mail-position-on-field "sendmail" (field &optional soft)) -(declare-function mail-text-start "sendmail" ()) (declare-function rmail-dont-reply-to "mail-utils" (destinations)) (declare-function rmail-update-summary "rmailsum" (&rest ignore)) @@ -1643,8 +1641,6 @@ The duplicate copy goes into the Rmail file just after the original." (declare-function rmail-summary-mark-deleted "rmailsum" (&optional n undel)) (declare-function rfc822-addresses "rfc822" (header-text)) (declare-function mail-abbrev-make-syntax-table "mailabbrev.el" ()) -(declare-function mail-sendmail-delimit-header "sendmail" ()) -(declare-function mail-header-end "sendmail" ()) ;; RLK feature not added in this version: ;; argument specifies inbox file or files in various ways. @@ -3686,7 +3682,8 @@ see the documentation of `rmail-resend'." ;; The mail buffer is now current. (save-excursion ;; Insert after header separator--before signature if any. - (goto-char (mail-text-start)) + (rfc822-goto-eoh) + (forward-line 1) (if (or rmail-enable-mime rmail-enable-mime-composing) (funcall rmail-insert-mime-forwarded-message-function forward-buffer) @@ -3841,6 +3838,10 @@ The message should be narrowed to just the headers." (1- (point)) (point-max))))))) +(declare-function mail-sendmail-delimit-header "sendmail" ()) +(declare-function mail-header-end "sendmail" ()) +(declare-function mail-position-on-field "sendmail" (field &optional soft)) + (defun rmail-retry-failure () "Edit a mail message which is based on the contents of the current message. For a message rejected by the mail system, extract the interesting headers and @@ -3932,6 +3933,8 @@ specifying headers which should not be copied into the new message." (goto-char (point-min)) (if bounce-indent (indent-rigidly (point-min) (point-max) bounce-indent)) + ;; FIXME better to replace sendmail functions. + (require 'sendmail) (mail-sendmail-delimit-header) (save-restriction (narrow-to-region (point-min) (mail-header-end)) diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 3c1241237f1..ed5c189252b 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -1272,6 +1272,9 @@ mail status in mode line")) (define-key menu-bar-games-menu [life] `(menu-item ,(purecopy "Life") life :help ,(purecopy "Watch how John Conway's cellular automaton evolves"))) +(define-key menu-bar-games-menu [land] + `(menu-item ,(purecopy "Landmark") landmark + :help ,(purecopy "Watch a neural-network robot learn landmarks"))) (define-key menu-bar-games-menu [hanoi] `(menu-item ,(purecopy "Towers of Hanoi") hanoi :help ,(purecopy "Watch Towers-of-Hanoi puzzle solved by Emacs"))) diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 2a198215536..712af6fd288 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -1152,7 +1152,8 @@ For the format of LINE-ERR-INFO, see `flymake-ler-make-ler'." (when dir (let ((default-directory dir)) (flymake-log 3 "starting process on dir %s" default-directory))) - (setq process (apply 'start-process "flymake-proc" (current-buffer) cmd args)) + (setq process (apply 'start-file-process + "flymake-proc" (current-buffer) cmd args)) (set-process-sentinel process 'flymake-process-sentinel) (set-process-filter process 'flymake-process-filter) (push process flymake-processes) diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index 15664c8e56d..362a1db6c10 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el @@ -1300,7 +1300,9 @@ definition and conveniently use this command." (save-restriction (narrow-to-region beginning end) (makefile-backslash-region (point-min) (point-max) t) - (let ((fill-paragraph-function nil)) + (let ((fill-paragraph-function nil) + ;; Adjust fill-column to allow space for the backslash. + (fill-column (- fill-column 1))) (fill-paragraph nil)) (makefile-backslash-region (point-min) (point-max) nil) (goto-char (point-max)) @@ -1314,7 +1316,9 @@ definition and conveniently use this command." ;; resulting region. (save-restriction (narrow-to-region (point) (line-beginning-position 2)) - (let ((fill-paragraph-function nil)) + (let ((fill-paragraph-function nil) + ;; Adjust fill-column to allow space for the backslash. + (fill-column (- fill-column 1))) (fill-paragraph nil)) (makefile-backslash-region (point-min) (point-max) nil)) ;; Return non-nil to indicate it's been filled. diff --git a/lisp/simple.el b/lisp/simple.el index b998eef88a0..5f62b9d9e73 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3103,7 +3103,8 @@ If the buffer is read-only, Emacs will beep and refrain from deleting the text, but put the text in the kill ring anyway. This means that you can use the killing commands to copy text from a read-only buffer. -This is the primitive for programs to kill text (as opposed to deleting it). +Lisp programs should use this function for killing text. + (To delete text, use `delete-region'.) Supply two arguments, character positions indicating the stretch of text to be killed. Any command that calls this function is a \"kill command\". diff --git a/lisp/subr.el b/lisp/subr.el index 9fb737fd038..90480ea0e7f 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -219,6 +219,7 @@ Treated as a declaration when used at the right place in a (defmacro ignore-errors (&rest body) "Execute BODY; if an error occurs, return nil. Otherwise, return result of last form in BODY." + (declare (debug t) (indent 0)) `(condition-case nil (progn ,@body) (error nil))) ;;;; Basic Lisp functions. @@ -1818,6 +1819,7 @@ When there's an ambiguity because the key looks like the prefix of some sort of escape sequence, the ambiguity is resolved via `read-key-delay'." (let ((overriding-terminal-local-map read-key-empty-map) (overriding-local-map nil) + (echo-keystrokes 0) (old-global-map (current-global-map)) (timer (run-with-idle-timer ;; Wait long enough that Emacs has the time to receive and @@ -1842,7 +1844,12 @@ some sort of escape sequence, the ambiguity is resolved via `read-key-delay'." (throw 'read-key keys))))))) (unwind-protect (progn - (use-global-map read-key-empty-map) + (use-global-map + (let ((map (make-sparse-keymap))) + ;; Don't hide the menu-bar and tool-bar entries. + (define-key map [menu-bar] (lookup-key global-map [menu-bar])) + (define-key map [tool-bar] (lookup-key global-map [tool-bar])) + map)) (aref (catch 'read-key (read-key-sequence-vector prompt nil t)) 0)) (cancel-timer timer) (use-global-map old-global-map)))) diff --git a/lisp/woman.el b/lisp/woman.el index 291ebcee740..1a9d512d302 100644 --- a/lisp/woman.el +++ b/lisp/woman.el @@ -3388,7 +3388,10 @@ Format paragraphs upto TO. Supports special chars. "Translate up to marker TO. Do this last of all transformations." (if translations (let ((matches (car translations)) - (alist (cdr translations))) + (alist (cdr translations)) + ;; Translations are case-sensitive, eg ".tr ab" does not + ;; affect "A" (bug#6849). + (case-fold-search nil)) (while (re-search-forward matches to t) ;; Done like this to retain text properties and ;; support translation of special characters: |