Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 99904. ------------------------------------------------------------ revno: 99904 committer: Glenn Morris branch nick: trunk timestamp: Wed 2010-04-14 19:10:20 -0700 message: * admin/notes/BRANCH: Update. diff: === modified file 'admin/notes/BRANCH' --- admin/notes/BRANCH 2010-01-17 03:03:59 +0000 +++ admin/notes/BRANCH 2010-04-15 02:10:20 +0000 @@ -1,29 +1,26 @@ -This file describes the bzr branch in which it is maintained. -Everything below the line is branch-specific. +You can view the available Emacs branches at + +http://bzr.savannah.gnu.org/r/emacs/ + +Development normally takes places on the trunk. +Sometimes specialized features are developed on separate branches +before possibly being merged to the trunk. + +Development is discussed on the emacs-devel mailing list. + +Sometime before the release of a new major version of Emacs (eg 23.2), +a "feature freeze" is imposed on the trunk. No new features may be +added after this point. This is usually some months before the release. + +Shortly before the release, a release branch is created, and the +trunk is then free for development. +For example, "emacs-23" for Emacs 23.2 and later, "EMACS_23_1_RC" for +23.1, "EMACS_22_BASE" for 22.x, and "EMACS_21_1_RC" for 21.x. + +Traditionally only bug-fixes were allowed in minor releases. +Recently (22.x, 23.2), self-contained new features were allowed on a +case-by-case basis. + +If you are looking at this file in a branch other than the trunk, +there may be some branch-specific documentation below this line. ________________________________________________________________________ - -This is the trunk (sometimes mistakenly called "HEAD"). -When people say "use the development version of Emacs" or the -"bzr version of Emacs", this is the branch they are talking about. - -Emacs development takes place on the trunk. Most of the time, Emacs -hackers add to it relatively free of constraint (aside from proper -legal / accounting practices), although sometimes there is related -discussion on the emacs-devel mailing list. - -Sometime before the release of a new major version of Emacs (eg 22.1), -a "feature freeze" is imposed on the trunk. No new features may be -added after this point. This is usually many months before the release. -During this time, there is no official place for development of new features. - -Shortly before the release, a release branch is created. For example, -EMACS_22_BASE or EMACS_21_1_RC for Emacs 22.x and 21.x, respectively. -(Unfortunately the naming scheme has not always been consistent.) - -The release branch is used to make the release (22.1), and all later -members of the series (22.2, 22.3, etc). Generally, only bug-fixes have -been allowed in the minor releases, although in 22.x, self-contained -new features were allowed on a case-by-case basis. - -From the point that a release branch is created, the trunk is free for -development for the next major version. ------------------------------------------------------------ revno: 99903 committer: Juanma Barranquero branch nick: trunk timestamp: Thu 2010-04-15 03:12:20 +0200 message: Simplify by using `define-derived-mode'. * info.el (Info-mode): * calendar/todo-mode.el (todo-mode): * play/gomoku.el (gomoku-mode): Define with `define-derived-mode'. (gomoku-mode-map): Move initialization into declaration. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-04-14 22:05:14 +0000 +++ lisp/ChangeLog 2010-04-15 01:12:20 +0000 @@ -1,3 +1,11 @@ +2010-04-15 Juanma Barranquero + + Simplify by using `define-derived-mode'. + * info.el (Info-mode): + * calendar/todo-mode.el (todo-mode): + * play/gomoku.el (gomoku-mode): Define with `define-derived-mode'. + (gomoku-mode-map): Move initialization into declaration. + 2010-04-14 Michael Albinus Fix Bug#5840. === modified file 'lisp/calendar/todo-mode.el' --- lisp/calendar/todo-mode.el 2010-01-13 08:35:10 +0000 +++ lisp/calendar/todo-mode.el 2010-04-15 01:12:20 +0000 @@ -918,17 +918,9 @@ ;; As calendar reads .todo-do before todo-mode is loaded. ;;;###autoload -(defun todo-mode () - "Major mode for editing TODO lists. - -\\{todo-mode-map}" - (interactive) - (kill-all-local-variables) - (setq major-mode 'todo-mode) - (setq mode-name "TODO") - (use-local-map todo-mode-map) - (easy-menu-add todo-menu) - (run-mode-hooks 'todo-mode-hook)) +(define-derived-mode todo-mode nil "TODO" + "Major mode for editing TODO lists." + (easy-menu-add todo-menu)) (defvar date) (defvar entry) === modified file 'lisp/info.el' --- lisp/info.el 2010-03-23 07:11:50 +0000 +++ lisp/info.el 2010-04-15 01:12:20 +0000 @@ -3833,7 +3833,7 @@ ;; Autoload cookie needed by desktop.el ;;;###autoload -(defun Info-mode () +(define-derived-mode Info-mode nil "Info" "Info mode provides commands for browsing through the Info documentation tree. Documentation in Info is divided into \"nodes\", each of which discusses one topic and contains references to other nodes which discuss related @@ -3895,23 +3895,17 @@ \\[clone-buffer] Select a new cloned Info buffer in another window. \\[universal-argument] \\[info] Move to new Info file with completion. \\[universal-argument] N \\[info] Select Info buffer with prefix number in the name *info*." - (kill-all-local-variables) - (setq major-mode 'Info-mode) - (setq mode-name "Info") + :syntax-table text-mode-syntax-table + :abbrev-table text-mode-abbrev-table (setq tab-width 8) - (use-local-map Info-mode-map) (add-hook 'activate-menubar-hook 'Info-menu-update nil t) - (set-syntax-table text-mode-syntax-table) - (setq local-abbrev-table text-mode-abbrev-table) (setq case-fold-search t) (setq buffer-read-only t) (make-local-variable 'Info-current-file) (make-local-variable 'Info-current-subfile) (make-local-variable 'Info-current-node) - (make-local-variable 'Info-tag-table-marker) - (setq Info-tag-table-marker (make-marker)) - (make-local-variable 'Info-tag-table-buffer) - (setq Info-tag-table-buffer nil) + (set (make-local-variable 'Info-tag-table-marker) (make-marker)) + (set (make-local-variable 'Info-tag-table-buffer) nil) (make-local-variable 'Info-history) (make-local-variable 'Info-history-forward) (make-local-variable 'Info-index-alternatives) @@ -3920,12 +3914,10 @@ '(:eval (get-text-property (point-min) 'header-line)))) (set (make-local-variable 'tool-bar-map) info-tool-bar-map) ;; This is for the sake of the invisible text we use handling titles. - (make-local-variable 'line-move-ignore-invisible) - (setq line-move-ignore-invisible t) - (make-local-variable 'desktop-save-buffer) - (make-local-variable 'widen-automatically) - (setq widen-automatically nil) - (setq desktop-save-buffer 'Info-desktop-buffer-misc-data) + (set (make-local-variable 'line-move-ignore-invisible) t) + (set (make-local-variable 'desktop-save-buffer) + 'Info-desktop-buffer-misc-data) + (set (make-local-variable 'widen-automatically) nil) (add-hook 'kill-buffer-hook 'Info-kill-buffer nil t) (add-hook 'clone-buffer-hook 'Info-clone-buffer nil t) (add-hook 'change-major-mode-hook 'font-lock-defontify nil t) @@ -3944,8 +3936,7 @@ 'Info-revert-buffer-function) (Info-set-mode-line) (set (make-local-variable 'bookmark-make-record-function) - 'Info-bookmark-make-record) - (run-mode-hooks 'Info-mode-hook)) + 'Info-bookmark-make-record)) ;; When an Info buffer is killed, make sure the associated tags buffer ;; is killed too. === modified file 'lisp/play/gomoku.el' --- lisp/play/gomoku.el 2010-01-13 08:35:10 +0000 +++ lisp/play/gomoku.el 2010-04-15 01:12:20 +0000 @@ -102,59 +102,60 @@ "*Number of lines between the Gomoku board and the top of the window.") -(defvar gomoku-mode-map nil +(defvar gomoku-mode-map + (let ((map (make-sparse-keymap))) + + ;; Key bindings for cursor motion. + (define-key map "y" 'gomoku-move-nw) ; y + (define-key map "u" 'gomoku-move-ne) ; u + (define-key map "b" 'gomoku-move-sw) ; b + (define-key map "n" 'gomoku-move-se) ; n + (define-key map "h" 'backward-char) ; h + (define-key map "l" 'forward-char) ; l + (define-key map "j" 'gomoku-move-down) ; j + (define-key map "k" 'gomoku-move-up) ; k + + (define-key map [kp-7] 'gomoku-move-nw) + (define-key map [kp-9] 'gomoku-move-ne) + (define-key map [kp-1] 'gomoku-move-sw) + (define-key map [kp-3] 'gomoku-move-se) + (define-key map [kp-4] 'backward-char) + (define-key map [kp-6] 'forward-char) + (define-key map [kp-2] 'gomoku-move-down) + (define-key map [kp-8] 'gomoku-move-up) + + (define-key map "\C-n" 'gomoku-move-down) ; C-n + (define-key map "\C-p" 'gomoku-move-up) ; C-p + + ;; Key bindings for entering Human moves. + (define-key map "X" 'gomoku-human-plays) ; X + (define-key map "x" 'gomoku-human-plays) ; x + (define-key map " " 'gomoku-human-plays) ; SPC + (define-key map "\C-m" 'gomoku-human-plays) ; RET + (define-key map "\C-c\C-p" 'gomoku-human-plays) ; C-c C-p + (define-key map "\C-c\C-b" 'gomoku-human-takes-back) ; C-c C-b + (define-key map "\C-c\C-r" 'gomoku-human-resigns) ; C-c C-r + (define-key map "\C-c\C-e" 'gomoku-emacs-plays) ; C-c C-e + + (define-key map [kp-enter] 'gomoku-human-plays) + (define-key map [insert] 'gomoku-human-plays) + (define-key map [down-mouse-1] 'gomoku-click) + (define-key map [drag-mouse-1] 'gomoku-click) + (define-key map [mouse-1] 'gomoku-click) + (define-key map [down-mouse-2] 'gomoku-click) + (define-key map [mouse-2] 'gomoku-mouse-play) + (define-key map [drag-mouse-2] 'gomoku-mouse-play) + + (define-key map [remap previous-line] 'gomoku-move-up) + (define-key map [remap next-line] 'gomoku-move-down) + (define-key map [remap move-beginning-of-line] 'gomoku-beginning-of-line) + (define-key map [remap move-end-of-line] 'gomoku-end-of-line) + (define-key map [remap undo] 'gomoku-human-takes-back) + (define-key map [remap advertised-undo] 'gomoku-human-takes-back) + map) + "Local keymap to use in Gomoku mode.") -(if gomoku-mode-map nil - (setq gomoku-mode-map (make-sparse-keymap)) - - ;; Key bindings for cursor motion. - (define-key gomoku-mode-map "y" 'gomoku-move-nw) ; y - (define-key gomoku-mode-map "u" 'gomoku-move-ne) ; u - (define-key gomoku-mode-map "b" 'gomoku-move-sw) ; b - (define-key gomoku-mode-map "n" 'gomoku-move-se) ; n - (define-key gomoku-mode-map "h" 'backward-char) ; h - (define-key gomoku-mode-map "l" 'forward-char) ; l - (define-key gomoku-mode-map "j" 'gomoku-move-down) ; j - (define-key gomoku-mode-map "k" 'gomoku-move-up) ; k - - (define-key gomoku-mode-map [kp-7] 'gomoku-move-nw) - (define-key gomoku-mode-map [kp-9] 'gomoku-move-ne) - (define-key gomoku-mode-map [kp-1] 'gomoku-move-sw) - (define-key gomoku-mode-map [kp-3] 'gomoku-move-se) - (define-key gomoku-mode-map [kp-4] 'backward-char) - (define-key gomoku-mode-map [kp-6] 'forward-char) - (define-key gomoku-mode-map [kp-2] 'gomoku-move-down) - (define-key gomoku-mode-map [kp-8] 'gomoku-move-up) - - (define-key gomoku-mode-map "\C-n" 'gomoku-move-down) ; C-n - (define-key gomoku-mode-map "\C-p" 'gomoku-move-up) ; C-p - - ;; Key bindings for entering Human moves. - (define-key gomoku-mode-map "X" 'gomoku-human-plays) ; X - (define-key gomoku-mode-map "x" 'gomoku-human-plays) ; x - (define-key gomoku-mode-map " " 'gomoku-human-plays) ; SPC - (define-key gomoku-mode-map "\C-m" 'gomoku-human-plays) ; RET - (define-key gomoku-mode-map "\C-c\C-p" 'gomoku-human-plays) ; C-c C-p - (define-key gomoku-mode-map "\C-c\C-b" 'gomoku-human-takes-back) ; C-c C-b - (define-key gomoku-mode-map "\C-c\C-r" 'gomoku-human-resigns) ; C-c C-r - (define-key gomoku-mode-map "\C-c\C-e" 'gomoku-emacs-plays) ; C-c C-e - - (define-key gomoku-mode-map [kp-enter] 'gomoku-human-plays) - (define-key gomoku-mode-map [insert] 'gomoku-human-plays) - (define-key gomoku-mode-map [down-mouse-1] 'gomoku-click) - (define-key gomoku-mode-map [drag-mouse-1] 'gomoku-click) - (define-key gomoku-mode-map [mouse-1] 'gomoku-click) - (define-key gomoku-mode-map [down-mouse-2] 'gomoku-click) - (define-key gomoku-mode-map [mouse-2] 'gomoku-mouse-play) - (define-key gomoku-mode-map [drag-mouse-2] 'gomoku-mouse-play) - - (define-key gomoku-mode-map [remap previous-line] 'gomoku-move-up) - (define-key gomoku-mode-map [remap next-line] 'gomoku-move-down) - (define-key gomoku-mode-map [remap move-beginning-of-line] 'gomoku-beginning-of-line) - (define-key gomoku-mode-map [remap move-end-of-line] 'gomoku-end-of-line) - (define-key gomoku-mode-map [remap undo] 'gomoku-human-takes-back) - (define-key gomoku-mode-map [remap advertised-undo] 'gomoku-human-takes-back)) (defvar gomoku-emacs-won () "For making font-lock use the winner's face for the line.") @@ -182,28 +183,20 @@ ;; allow View Mode to be activated in its buffer. (put 'gomoku-mode 'mode-class 'special) -(defun gomoku-mode () +(define-derived-mode gomoku-mode nil "Gomoku" "Major mode for playing Gomoku against Emacs. You and Emacs play in turn by marking a free square. You mark it with X and Emacs marks it with O. The winner is the first to get five contiguous marks horizontally, vertically or in diagonal. - +\\ You play by moving the cursor over the square you choose and hitting \\[gomoku-human-plays]. -Other useful commands: -\\{gomoku-mode-map} -Entry to this mode calls the value of `gomoku-mode-hook' if that value -is non-nil." - (interactive) - (kill-all-local-variables) - (setq major-mode 'gomoku-mode - mode-name "Gomoku") +Other useful commands:\n +\\{gomoku-mode-map}" (gomoku-display-statistics) - (use-local-map gomoku-mode-map) (make-local-variable 'font-lock-defaults) (setq font-lock-defaults '(gomoku-font-lock-keywords t)) - (toggle-read-only t) - (run-mode-hooks 'gomoku-mode-hook)) + (toggle-read-only t)) ;;; ;;; THE BOARD. ------------------------------------------------------------ revno: 99902 committer: Michael Albinus branch nick: trunk timestamp: Thu 2010-04-15 00:05:14 +0200 message: Fix Bug#5840. * ido.el (ido-file-name-all-completions-1): * minibuffer.el (minibuffer-completion-help): * net/tramp.el (tramp-completion-mode-p): Use `non-essential'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-04-14 15:24:17 +0000 +++ lisp/ChangeLog 2010-04-14 22:05:14 +0000 @@ -1,3 +1,10 @@ +2010-04-14 Michael Albinus + + Fix Bug#5840. + * ido.el (ido-file-name-all-completions-1): + * minibuffer.el (minibuffer-completion-help): + * net/tramp.el (tramp-completion-mode-p): Use `non-essential'. + 2010-04-14 Stefan Monnier * simple.el (non-essential): New var. === modified file 'lisp/ido.el' --- lisp/ido.el 2010-04-06 18:17:55 +0000 +++ lisp/ido.el 2010-04-14 22:05:14 +0000 @@ -3458,7 +3458,7 @@ ;; Strip method:user@host: part of tramp completions. ;; Tramp completions do not include leading slash. (let* ((len (1- (length dir))) - (tramp-completion-mode t) + (non-essential t) (compl (or (file-name-all-completions "" dir) ;; work around bug in ange-ftp. === modified file 'lisp/minibuffer.el' --- lisp/minibuffer.el 2010-03-24 18:02:56 +0000 +++ lisp/minibuffer.el 2010-04-14 22:05:14 +0000 @@ -1028,7 +1028,8 @@ "Display a list of possible completions of the current minibuffer contents." (interactive) (message "Making completion list...") - (let* ((start (field-beginning)) + (let* ((non-essential t) + (start (field-beginning)) (string (field-string)) (completions (completion-all-completions string === modified file 'lisp/net/tramp.el' --- lisp/net/tramp.el 2010-04-10 15:51:46 +0000 +++ lisp/net/tramp.el 2010-04-14 22:05:14 +0000 @@ -5527,7 +5527,9 @@ ;; disable this part of the completion, unless the user implicitly ;; indicated his interest in using a fancier completion system. (or (eq tramp-syntax 'sep) - (featurep 'tramp) ; If it's loaded, we may as well use it. + (featurep 'tramp) ;; If it's loaded, we may as well use + ;; it. `partial-completion-mode' does not exist in + ;; XEmacs. It is obsoleted with Emacs 24.1. (and (boundp 'partial-completion-mode) partial-completion-mode) ;; FIXME: These may have been loaded even if the user never ;; intended to use them. @@ -5603,7 +5605,8 @@ (defun tramp-completion-mode-p () "Checks whether method / user name / host name completion is active." (or - ;; Signal from outside. + ;; Signal from outside. `non-essential' has been introduced in Emacs 24. + (and (boundp 'non-essential) (symbol-value 'non-essential)) tramp-completion-mode ;; Emacs. (equal last-input-event 'tab) @@ -8651,6 +8654,7 @@ ;; * Let `shell-dynamic-complete-*' and `comint-dynamic-complete' work ;; on remote hosts. ;; * Use secrets.el for password handling. +;; * Load ~/.emacs_SHELLNAME on the remote host for `shell'. ;; Functions for file-name-handler-alist: ;; diff-latest-backup-file -- in diff.el ------------------------------------------------------------ revno: 99901 committer: Dan Nicolaescu branch nick: trunk timestamp: Wed 2010-04-14 08:36:25 -0700 message: Reduce cpp use in Makefile.in. * Makefile.in (DBUS_CFLAGS, DBUS_LIBS, GCONF_CFLAGS, GCONF_LIBS) (LIBSOUND, CFLAGS_SOUND, RSVG_LIBS, RSVG_CFLAGS, INTERVALS_H) (GETLOADAVG_LIBS, RUN_TEMACS): Move to the autoconf section. (ORDINARY_LINK): Remove, defined in src/s/gnu.h. (CRT0_COMPILE): Remove, inline it in the only user. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-04-14 00:33:32 +0000 +++ src/ChangeLog 2010-04-14 15:36:25 +0000 @@ -1,3 +1,12 @@ +2010-04-14 Dan Nicolaescu + + Reduce cpp use in Makefile.in. + * Makefile.in (DBUS_CFLAGS, DBUS_LIBS, GCONF_CFLAGS, GCONF_LIBS) + (LIBSOUND, CFLAGS_SOUND, RSVG_LIBS, RSVG_CFLAGS, INTERVALS_H) + (GETLOADAVG_LIBS, RUN_TEMACS): Move to the autoconf section. + (ORDINARY_LINK): Remove, defined in src/s/gnu.h. + (CRT0_COMPILE): Remove, inline it in the only user. + 2010-04-14 Juri Linkov * window.c (keys_of_window): Rebind `C-v' from `scroll-up' to === modified file 'src/Makefile.in' --- src/Makefile.in 2010-04-12 14:32:10 +0000 +++ src/Makefile.in 2010-04-14 15:36:25 +0000 @@ -80,6 +80,24 @@ C_SWITCH_X_SITE=@C_SWITCH_X_SITE@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ + +GCONF_CFLAGS = @GCONF_CFLAGS@ +GCONF_LIBS = @GCONF_LIBS@ + +LIBSOUND= @LIBSOUND@ +CFLAGS_SOUND= @CFLAGS_SOUND@ + +RSVG_LIBS= @RSVG_LIBS@ +RSVG_CFLAGS= @RSVG_CFLAGS@ + +INTERVALS_H = dispextern.h intervals.h composite.h + +GETLOADAVG_LIBS = @GETLOADAVG_LIBS@ + +RUN_TEMACS = `/bin/pwd`/temacs + # ========================== start of cpp stuff ======================= /* From here on, comments must be done in C syntax. */ @@ -117,14 +135,6 @@ do not let it interfere with this file. */ #undef register -/* GNU libc requires ORDINARY_LINK so that its own crt0 is used. - GNU/Linux is an exception because it uses a funny variant of GNU libc. */ -#ifdef __GNU_LIBRARY__ -#ifndef GNU_LINUX -#define ORDINARY_LINK -#endif -#endif - /* Some machines do not find the standard C libraries in the usual place. */ #ifndef ORDINARY_LINK #ifndef LIB_STANDARD @@ -201,10 +211,6 @@ #ifndef ORDINARY_LINK -#ifndef CRT0_COMPILE -#define CRT0_COMPILE $(CC) -c $(ALL_CFLAGS) -#endif - #ifndef START_FILES #ifdef NO_REMAP #define START_FILES pre-crt0.o /lib/crt0.o @@ -234,16 +240,9 @@ #endif #ifdef HAVE_DBUS -DBUS_CFLAGS = @DBUS_CFLAGS@ -DBUS_LIBS = @DBUS_LIBS@ DBUS_OBJ = dbusbind.o #endif -#ifdef HAVE_GCONF -GCONF_CFLAGS = @GCONF_CFLAGS@ -GCONF_LIBS = @GCONF_LIBS@ -#endif - /* DO NOT use -R. There is a special hack described in lastfile.c which is used instead. Some initialized data areas are modified at initial startup, then labeled as part of the text area when @@ -370,12 +369,6 @@ #endif /* not HAVE_X11 */ #endif /* not HAVE_X_WINDOWS */ -LIBSOUND= @LIBSOUND@ -CFLAGS_SOUND= @CFLAGS_SOUND@ - -RSVG_LIBS= @RSVG_LIBS@ -RSVG_CFLAGS= @RSVG_CFLAGS@ - #ifndef ORDINARY_LINK /* Fix linking if compiled with GCC. */ #ifdef __GNUC__ @@ -445,15 +438,6 @@ #define YMF_PASS_LDFLAGS(flags) flags #endif -/* Allow config.h to specify a replacement file for unexec.c. */ -#ifndef UNEXEC -#define UNEXEC unexec.o -#endif - -INTERVALS_H = dispextern.h intervals.h composite.h - -GETLOADAVG_LIBS = @GETLOADAVG_LIBS@ - #ifdef MSDOS #ifdef HAVE_X_WINDOWS MSDOS_OBJ = dosfns.o msdos.o xmenu.o @@ -844,8 +828,6 @@ @FREETYPE_LIBS@ @FONTCONFIG_LIBS@ @LIBOTF_LIBS@ @M17N_FLT_LIBS@ \ $(GNULIB_VAR) LIB_MATH LIB_STANDARD $(GNULIB_VAR) -RUN_TEMACS = `/bin/pwd`/temacs - all: emacs${EXEEXT} $(OTHER_FILES) emacs${EXEEXT}: temacs${EXEEXT} ${etc}DOC ${lisp} @@ -961,7 +943,7 @@ #ifdef AUTO_DEPEND @-test -d deps || mkdir deps #endif - CRT0_COMPILE ${srcdir}/ecrt0.c + $(CC) -c $(ALL_CFLAGS) ${srcdir}/ecrt0.c doc.o: buildobj.h #ifndef AUTO_DEPEND ------------------------------------------------------------ revno: 99900 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2010-04-14 11:24:17 -0400 message: (non-essential): New var. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-04-14 15:07:53 +0000 +++ lisp/ChangeLog 2010-04-14 15:24:17 +0000 @@ -1,5 +1,7 @@ 2010-04-14 Stefan Monnier + * simple.el (non-essential): New var. + Add a new field `location' to bookmarks for non-file bookmarks. * bookmark.el (bookmark-location): Use the new field, if present. (bookmark-insert-location): Undo last change, not needed any more. === modified file 'lisp/simple.el' --- lisp/simple.el 2010-04-14 00:43:54 +0000 +++ lisp/simple.el 2010-04-14 15:24:17 +0000 @@ -3940,6 +3940,14 @@ If `widen-automatically' is nil, these commands will do something else as a fallback, and won't change the buffer bounds.") +(defvar non-essential nil + "Whether the currently executing code is performing an essential task. +This variable should be non-nil only when running code which should not +disturb the user. E.g. it can be used to prevent Tramp from prompting the +user for a password when we are simply scanning a set of files in the +background or displaying possible completions before the user even asked +for it.") + (defun pop-global-mark () "Pop off global mark ring and jump to the top location." (interactive) ------------------------------------------------------------ revno: 99899 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2010-04-14 11:07:53 -0400 message: Add a new field `location' to bookmarks for non-file bookmarks. * bookmark.el (bookmark-location): Use the new field, if present. (bookmark-insert-location): Undo last change, not needed any more. * man.el (Man-bookmark-make-record): * woman.el (woman-bookmark-make-record): * gnus-sum.el (gnus-summary-bookmark-make-record): Add `location' field. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-04-14 00:43:54 +0000 +++ lisp/ChangeLog 2010-04-14 15:07:53 +0000 @@ -1,3 +1,11 @@ +2010-04-14 Stefan Monnier + + Add a new field `location' to bookmarks for non-file bookmarks. + * bookmark.el (bookmark-location): Use the new field, if present. + (bookmark-insert-location): Undo last change, not needed any more. + * man.el (Man-bookmark-make-record): + * woman.el (woman-bookmark-make-record): Add `location' field. + 2010-04-14 Juri Linkov * simple.el (scroll-error-top-bottom): New defcustom. === modified file 'lisp/bookmark.el' --- lisp/bookmark.el 2010-04-12 19:12:36 +0000 +++ lisp/bookmark.el 2010-04-14 15:07:53 +0000 @@ -1176,9 +1176,7 @@ (or no-history (bookmark-maybe-historicize-string bookmark)) (let ((start (point))) (prog1 - ;; FIXME: Each bookmark should come with a `location' method - ;; rather than just say "-- no file --". - (insert (or (bookmark-location bookmark) " -- no file --")) + (insert (bookmark-location bookmark)) (if (display-mouse-p) (add-text-properties start @@ -1193,10 +1191,16 @@ (defalias 'bookmark-locate 'bookmark-insert-location) (defun bookmark-location (bookmark) - "Return the name of the file associated with BOOKMARK, or nil if none. + "Return a description of the location of BOOKMARK. BOOKMARK may be a bookmark name (a string) or a bookmark record." (bookmark-maybe-load-default-file) - (bookmark-get-filename bookmark)) + ;; We could call the `handler' and ask for it to construct a description + ;; dynamically: it would open up several new possibilities, but it + ;; would have the major disadvantage of forcing to load each and + ;; every handler when the user calls bookmark-menu. + (or (bookmark-prop-get bookmark 'location) + (bookmark-get-filename bookmark) + "-- Unknown location --")) ;;;###autoload === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-04-12 16:09:47 +0000 +++ lisp/gnus/ChangeLog 2010-04-14 15:07:53 +0000 @@ -1,3 +1,7 @@ +2010-04-14 Stefan Monnier + + * gnus-sum.el (gnus-summary-bookmark-make-record): Add `location' field. + 2010-04-12 Stefan Monnier * gnus-sum.el: Add bookmark declarations to silence the compiler. === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2010-04-12 16:09:47 +0000 +++ lisp/gnus/gnus-sum.el 2010-04-14 15:07:53 +0000 @@ -12657,8 +12657,9 @@ (id (mail-header-id head))) `(,subject ,@(bookmark-make-record-default 'point-only) - (group . ,grp) (article . ,art) - (message-id . ,id) (handler . gnus-summary-bookmark-jump)))) + (location . ,(format "Gnus %s:%d:%s" grp art id)) + (group . ,grp) (article . ,art) + (message-id . ,id) (handler . gnus-summary-bookmark-jump)))) ;;;###autoload (defun gnus-summary-bookmark-jump (bookmark) === modified file 'lisp/man.el' --- lisp/man.el 2010-04-12 16:09:47 +0000 +++ lisp/man.el 2010-04-14 15:07:53 +0000 @@ -1689,8 +1689,9 @@ "Make a bookmark entry for a Man buffer." `(,(Man-default-bookmark-title) ,@(bookmark-make-record-default 'point-only) - (man-args . ,Man-arguments) - (handler . Man-bookmark-jump))) + (location . ,(concat "man " Man-arguments)) + (man-args . ,Man-arguments) + (handler . Man-bookmark-jump))) ;;;###autoload (defun Man-bookmark-jump (bookmark) === modified file 'lisp/woman.el' --- lisp/woman.el 2010-04-12 16:09:47 +0000 +++ lisp/woman.el 2010-04-14 15:07:53 +0000 @@ -4533,6 +4533,7 @@ "Make a bookmark entry for a Woman buffer." `(,(Man-default-bookmark-title) ,@(bookmark-make-record-default 'point-only) + (location . ,(concat "woman " woman-last-file-name)) ;; Use the same form as man's bookmarks, as much as possible. (man-args . ,woman-last-file-name) (handler . woman-bookmark-jump))) ------------------------------------------------------------ revno: 99898 committer: Juri Linkov branch nick: trunk timestamp: Wed 2010-04-14 03:43:54 +0300 message: Add variable scroll-error-top-bottom. http://lists.gnu.org/archive/html/emacs-devel/2010-04/msg00403.html * simple.el (scroll-error-top-bottom): New defcustom. (scroll-up-command, scroll-down-command): Use it. Doc fix. * emulation/pc-select.el (pc-select-override-scroll-error): Obsolete in favor of `scroll-error-top-bottom'. diff: === modified file 'etc/NEWS' --- etc/NEWS 2010-04-14 00:11:21 +0000 +++ etc/NEWS 2010-04-14 00:43:54 +0000 @@ -69,8 +69,9 @@ with Xft. ** New scrolling commands `scroll-up-command' and `scroll-down-command' -(bound to [next] and [prior]) does not signal errors at top/bottom -of buffer at first key-press (instead moves to top/bottom of buffer). +(bound to C-v/[next] and M-v/[prior]) does not signal errors at top/bottom +of buffer at first key-press (instead moves to top/bottom of buffer) +when a new variable `scroll-error-top-bottom' is non-nil. ** New scrolling commands `scroll-up-line' and `scroll-down-line' scroll a line instead of full screen. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-04-14 00:33:32 +0000 +++ lisp/ChangeLog 2010-04-14 00:43:54 +0000 @@ -1,5 +1,13 @@ 2010-04-14 Juri Linkov + * simple.el (scroll-error-top-bottom): New defcustom. + (scroll-up-command, scroll-down-command): Use it. Doc fix. + + * emulation/pc-select.el (pc-select-override-scroll-error): + Obsolete in favor of `scroll-error-top-bottom'. + +2010-04-14 Juri Linkov + * tutorial.el (tutorial--default-keys): Rebind `C-v' to `scroll-up-command' and `M-v' to `scroll-down-command'. === modified file 'lisp/emulation/pc-select.el' --- lisp/emulation/pc-select.el 2010-03-12 17:47:22 +0000 +++ lisp/emulation/pc-select.el 2010-04-14 00:43:54 +0000 @@ -93,6 +93,9 @@ errors are suppressed." :type 'boolean :group 'pc-select) +(define-obsolete-variable-alias 'pc-select-override-scroll-error + 'scroll-error-top-bottom + "24.1") (defcustom pc-select-selection-keys-only nil "*Non-nil means only bind the basic selection keys when started. === modified file 'lisp/simple.el' --- lisp/simple.el 2010-04-14 00:11:21 +0000 +++ lisp/simple.el 2010-04-14 00:43:54 +0000 @@ -4744,20 +4744,34 @@ ;;; of buffer at first key-press (instead moves to top/bottom ;;; of buffer). +(defcustom scroll-error-top-bottom nil + "Move point to top/bottom of buffer before signalling a scrolling error. +A value of nil means just signal an error if no more scrolling possible. +A value of t means point moves to the beginning or the end of the buffer +\(depending on scrolling direction) when no more scrolling possible. +When point is already on that position, then signal an error." + :type 'boolean + :group 'scrolling + :version "24.1") + (defun scroll-up-command (&optional arg) "Scroll text of selected window upward ARG lines; or near full screen if no ARG. -If `scroll-up' cannot scroll window further, move cursor to the bottom line. +If `scroll-error-top-bottom' is non-nil and `scroll-up' cannot +scroll window further, move cursor to the bottom line. When point is already on that position, then signal an error. A near full screen is `next-screen-context-lines' less than a full screen. Negative ARG means scroll downward. If ARG is the atom `-', scroll downward by nearly full screen." (interactive "^P") (cond - ((eq arg '-) (scroll-down-command nil)) + ((null scroll-error-top-bottom) + (scroll-up arg)) + ((eq arg '-) + (scroll-down-command nil)) ((< (prefix-numeric-value arg) 0) (scroll-down-command (- (prefix-numeric-value arg)))) ((eobp) - (scroll-up arg)) ; signal error + (scroll-up arg)) ; signal error (t (condition-case nil (scroll-up arg) @@ -4775,18 +4789,22 @@ (defun scroll-down-command (&optional arg) "Scroll text of selected window down ARG lines; or near full screen if no ARG. -If `scroll-down' cannot scroll window further, move cursor to the top line. +If `scroll-error-top-bottom' is non-nil and `scroll-down' cannot +scroll window further, move cursor to the top line. When point is already on that position, then signal an error. A near full screen is `next-screen-context-lines' less than a full screen. Negative ARG means scroll upward. If ARG is the atom `-', scroll upward by nearly full screen." (interactive "^P") (cond - ((eq arg '-) (scroll-up-command nil)) + ((null scroll-error-top-bottom) + (scroll-down arg)) + ((eq arg '-) + (scroll-up-command nil)) ((< (prefix-numeric-value arg) 0) (scroll-up-command (- (prefix-numeric-value arg)))) ((bobp) - (scroll-down arg)) ; signal error + (scroll-down arg)) ; signal error (t (condition-case nil (scroll-down arg)