Now on revision 108497. ------------------------------------------------------------ revno: 108497 committer: Chong Yidong branch nick: trunk timestamp: Wed 2012-06-06 14:39:24 +0800 message: * buffer.c (word_wrap): Doc fix. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-06-04 06:03:19 +0000 +++ src/ChangeLog 2012-06-06 06:39:24 +0000 @@ -1,3 +1,7 @@ +2012-06-06 Chong Yidong + + * buffer.c (word_wrap): Doc fix. + 2012-06-04 Paul Eggert * xdisp.c (note_mode_line_or_margin_highlight): Pacify gcc -Wall. === modified file 'src/buffer.c' --- src/buffer.c 2012-06-03 09:03:23 +0000 +++ src/buffer.c 2012-06-06 06:39:24 +0000 @@ -5522,7 +5522,13 @@ `truncate-lines' and `truncate-partial-width-windows'). If you use word-wrapping, you might want to reduce the value of `truncate-partial-width-windows', since wrapping can make text readable -in narrower windows. */); +in narrower windows. + +Instead of setting this variable directly, most users should use +Visual Line mode . Visual Line mode, when enabled, sets `word-wrap' +to t, and additionally redefines simple editing commands to act on +visual lines rather than logical lines. See the documentation of +`visual-line-mode'. */); DEFVAR_PER_BUFFER ("default-directory", &BVAR (current_buffer, directory), make_number (Lisp_String), ------------------------------------------------------------ revno: 108496 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-06-05 21:38:04 -0400 message: Remove script stamping in lib-src/ rcs2log no longer needs it, and grep-changelog never really has (nothing in Emacs runs that, I don't know why Emacs includes it, if you are using an uninstalled out-of-tree build you can just as easily run it from the source directory). * lib-src/Makefile.in (STAMP_INST_SCRIPTS, STAMP_SCRIPTS, insrcdir) (stamp-rcs2log, stamp-grep-changelog): Remove. (all, clean): Remove references to stamps. * .bzrignore: Do not ignore lib-src/stamp*. diff: === modified file '.bzrignore' --- .bzrignore 2012-05-28 03:42:18 +0000 +++ .bzrignore 2012-06-06 01:38:04 +0000 @@ -108,7 +108,6 @@ lib/time.in-h lib/unistd.in-h lib/cxxdefs.h -lib-src/stamp-* lib-src/ctags lib-src/ctags.c lib-src/ebrowse === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2012-06-06 01:06:54 +0000 +++ lib-src/ChangeLog 2012-06-06 01:38:04 +0000 @@ -1,5 +1,9 @@ 2012-06-06 Glenn Morris + * Makefile.in (STAMP_INST_SCRIPTS, STAMP_SCRIPTS, insrcdir) + (stamp-rcs2log, stamp-grep-changelog): Remove. + (all, clean): Remove references to stamps. + * vcdiff: Remove file. * Makefile.in (SCRIPTS, STAMP_SCRIPTS): Remove vcdiff. (stamp-vcdiff): Remove. === modified file 'lib-src/Makefile.in' --- lib-src/Makefile.in 2012-06-06 01:06:54 +0000 +++ lib-src/Makefile.in 2012-06-06 01:38:04 +0000 @@ -118,7 +118,6 @@ ebrowse${EXEEXT} INSTALLABLE_SCRIPTS = grep-changelog -STAMP_INST_SCRIPTS = stamp-grep-changelog # Things that Emacs runs internally, or during the build process, # which should not be installed in bindir. @@ -130,7 +129,6 @@ # Like UTILITIES, but they're not system-dependent, and should not be # deleted by the distclean target. SCRIPTS= rcs2log -STAMP_SCRIPTS= stamp-rcs2log # All files that are created by the linker, i.e., whose names end in ${EXEEXT}. EXE_FILES = ${INSTALLABLES} ${UTILITIES} ${DONT_INSTALL} @@ -181,24 +179,11 @@ LINK_CFLAGS = ${BASE_CFLAGS} ${LDFLAGS} ${CFLAGS} CPP_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${CPPFLAGS} ${CFLAGS} -all: ${EXE_FILES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS} ${STAMP_INST_SCRIPTS} ${STAMP_SCRIPTS} +all: ${EXE_FILES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS} LOADLIBES = ../lib/libgnu.a $(LIBS_SYSTEM) $(EXE_FILES): ../lib/libgnu.a -## These targets copy the scripts into the build directory so that -## they can be run from there in an uninstalled Emacs. -## Nothing to do if pwd = srcdir. -insrcdir=[ "`/bin/pwd`" = "`cd $(srcdir) && /bin/pwd`" ] - -stamp-rcs2log: $(srcdir)/rcs2log - $(insrcdir) || cp -p $(srcdir)/rcs2log rcs2log - touch $@ - -stamp-grep-changelog: $(srcdir)/grep-changelog - $(insrcdir) || cp -p $(srcdir)/grep-changelog grep-changelog - touch $@ - ## Only used if we need blessmail, but no harm in always defining. ## This makes the actual blessmail executable. blessmail: @@ -273,7 +258,6 @@ clean: mostlyclean -rm -f ${EXE_FILES} - -rm -f ${STAMP_INST_SCRIPTS} ${STAMP_SCRIPTS} distclean: clean -rm -f TAGS ------------------------------------------------------------ revno: 108495 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-06-05 21:28:08 -0400 message: Find rcs2log in the source-directory when running uninstalled This is preparation for getting rid of lib-src's "stamp-*" files. * lisp/vc/vc-rcs.el (vc-rcs-rcs2log-program): New. (vc-rcs-update-changelog): Use it. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-06 01:06:54 +0000 +++ lisp/ChangeLog 2012-06-06 01:28:08 +0000 @@ -1,5 +1,8 @@ 2012-06-06 Glenn Morris + * vc/vc-rcs.el (vc-rcs-rcs2log-program): New. + (vc-rcs-update-changelog): Use it. + * emacs-lisp/authors.el (authors-fixed-entries): Remove vcdiff * vc/vc-sccs.el (vc-sccs-write-revision): New function. === modified file 'lisp/vc/vc-rcs.el' --- lisp/vc/vc-rcs.el 2012-02-25 04:29:09 +0000 +++ lisp/vc/vc-rcs.el 2012-06-06 01:28:08 +0000 @@ -1,6 +1,6 @@ ;;; vc-rcs.el --- support for RCS version-control -;; Copyright (C) 1992-2012 Free Software Foundation, Inc. +;; Copyright (C) 1992-2012 Free Software Foundation, Inc. ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Andre Spiegel @@ -868,6 +868,23 @@ (minor-num (string-to-number (vc-rcs-minor-part rev)))) (concat branch "." (number-to-string (1+ minor-num)))))) +;; Note that most GNU/Linux distributions seem to supply rcs2log in a +;; standard bin directory. Eg both Red Hat and Debian include it in +;; their cvs packages. It's not obvious why Emacs still needs to +;; provide it as well... +(defvar vc-rcs-rcs2log-program + (let (exe) + (cond ((file-executable-p + (setq exe (expand-file-name "rcs2log" exec-directory))) + exe) + ;; In the unlikely event that someone is running an + ;; uninstalled Emacs and wants to do something RCS-related. + ((file-executable-p + (setq exe (expand-file-name "lib-src/rcs2log" source-directory))) + exe) + (t "rcs2log"))) + "Path to the `rcs2log' program (normally in `exec-directory').") + (defun vc-rcs-update-changelog (files) "Default implementation of update-changelog. Uses `rcs2log' which only works for RCS and CVS." @@ -898,9 +915,7 @@ (unwind-protect (progn (setq default-directory odefault) - (if (eq 0 (apply 'call-process - (expand-file-name "rcs2log" - exec-directory) + (if (eq 0 (apply 'call-process vc-rcs-rcs2log-program nil (list t tempfile) nil "-c" changelog "-u" (concat login-name ------------------------------------------------------------ revno: 108494 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-06-05 21:06:54 -0400 message: Remove lib-src/vcdiff * lib-src/vcdiff: Remove file. * lib-src/Makefile.in (SCRIPTS, STAMP_SCRIPTS): Remove vcdiff. (stamp-vcdiff): Remove. * INSTALL, make-dist: Remove vcdiff. * lisp/emacs-lisp/authors.el (authors-fixed-entries): Remove vcdiff diff: === modified file 'ChangeLog' --- ChangeLog 2012-06-03 23:49:12 +0000 +++ ChangeLog 2012-06-06 01:06:54 +0000 @@ -1,3 +1,7 @@ +2012-06-06 Glenn Morris + + * INSTALL, make-dist: Remove vcdiff. + 2012-06-03 Glenn Morris * INSTALL, make-dist: Remove rcs-checkin. === modified file 'INSTALL' --- INSTALL 2012-06-03 23:49:12 +0000 +++ INSTALL 2012-06-06 01:06:54 +0000 @@ -719,7 +719,7 @@ in `./lib-src' to their final destinations, as selected in `./src/epaths.h'. Strictly speaking, not all of the executables in `./lib-src' need be copied. -- The programs `hexl', `movemail', `profile', `rcs2log', and `vcdiff' +- The programs `hexl', `movemail', `profile', and `rcs2log' are used by Emacs; they do need to be copied. - The programs `etags', `ctags', and `emacsclient' are intended to be run by users; they are handled below. === modified file 'etc/NEWS' --- etc/NEWS 2012-06-05 17:47:27 +0000 +++ etc/NEWS 2012-06-06 01:06:54 +0000 @@ -44,6 +44,11 @@ ** On Mac OS X, configure no longer automatically adds the Fink /sw directories to the search path. You must add them yourself if you want them. +--- +** The standalone scripts rcs-checkin and vcdiff have been removed +(from the bin and libexec directories, respectively). The former is +no longer relevant, the latter is replaced by lisp (in vc-sccs.el). + * Startup Changes in Emacs 24.2 === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2012-06-05 17:56:38 +0000 +++ lib-src/ChangeLog 2012-06-06 01:06:54 +0000 @@ -1,3 +1,9 @@ +2012-06-06 Glenn Morris + + * vcdiff: Remove file. + * Makefile.in (SCRIPTS, STAMP_SCRIPTS): Remove vcdiff. + (stamp-vcdiff): Remove. + 2012-06-05 Glenn Morris * makefile.w32-in ($(BLD)/getdate.$(O), $(BLD)/leditcfns.$(O)): === modified file 'lib-src/Makefile.in' --- lib-src/Makefile.in 2012-06-03 23:49:12 +0000 +++ lib-src/Makefile.in 2012-06-06 01:06:54 +0000 @@ -129,8 +129,8 @@ # Like UTILITIES, but they're not system-dependent, and should not be # deleted by the distclean target. -SCRIPTS= rcs2log vcdiff -STAMP_SCRIPTS= stamp-rcs2log stamp-vcdiff +SCRIPTS= rcs2log +STAMP_SCRIPTS= stamp-rcs2log # All files that are created by the linker, i.e., whose names end in ${EXEEXT}. EXE_FILES = ${INSTALLABLES} ${UTILITIES} ${DONT_INSTALL} @@ -199,10 +199,6 @@ $(insrcdir) || cp -p $(srcdir)/grep-changelog grep-changelog touch $@ -stamp-vcdiff: $(srcdir)/vcdiff - $(insrcdir) || cp -p $(srcdir)/vcdiff vcdiff - touch $@ - ## Only used if we need blessmail, but no harm in always defining. ## This makes the actual blessmail executable. blessmail: === removed file 'lib-src/vcdiff' --- lib-src/vcdiff 2012-01-19 07:21:25 +0000 +++ lib-src/vcdiff 1970-01-01 00:00:00 +0000 @@ -1,114 +0,0 @@ -#! /bin/sh - -# Enhanced sccs diff utility for use with vc mode. -# This version is more compatible with rcsdiff(1). - -# Copyright (C) 1992-1993, 1995, 1997, 2001-2012 -# Free Software Foundation, Inc. - -# Author: Paul Eggert -# (according to authors.el) - -# This file is part of GNU Emacs. - -# GNU Emacs is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# GNU Emacs is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with GNU Emacs. If not, see . - - -DIFF="diff" -usage="$0: Usage: vcdiff [--brief] [-q] [-r] [-r] [diffopts] sccsfile..." - -# Now that we use `sccs get' rather than just `get', we don't need this. -# PATH=$PATH:/usr/ccs/bin:/usr/sccs:/usr/xpg4/bin # common SCCS hangouts - -echo="echo" -sid1= sid2= - -for f -do - case $f in - -*) - case $f in - --brief) - DIFF=cmp;; - -q) - echo=:;; - -r?*) - case $sid1 in - '') - sid1=$f - ;; - *) - case $sid2 in - ?*) echo "$usage" >&2; exit 2 ;; - esac - sid2=$f - ;; - esac - ;; - *) - options="$options $f" - ;; - esac - shift - ;; - *) - break - ;; - esac -done - -case $# in -0) - echo "$usage" >&2 - exit 2 -esac - - -rev1= rev2= status=0 -trap 'status=2; exit' 1 2 13 15 -trap 'rm -f $rev1 $rev2 || status=2; exit $status' 0 - -for f -do - s=2 - - case $f in - s.* | */s.*) - if - rev1=`mktemp /tmp/geta.XXXXXXXX` - sccs get -s -p -k $sid1 "$f" > $rev1 && - case $sid2 in - '') - workfile=`expr " /$f" : '.*/s.\(.*\)'` - ;; - *) - rev2=`mktemp /tmp/getb.XXXXXXXX` - sccs get -s -p -k $sid2 "$f" > $rev2 - workfile=$rev2 - esac - then - $echo $DIFF $options $rev1 $workfile >&2 - $DIFF $options $rev1 $workfile - s=$? - fi - ;; - *) - echo "$0: $f is not an SCCS file" >&2 - esac - - if test $status -lt $s - then status=$s - fi -done - === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-06 00:29:10 +0000 +++ lisp/ChangeLog 2012-06-06 01:06:54 +0000 @@ -1,5 +1,7 @@ 2012-06-06 Glenn Morris + * emacs-lisp/authors.el (authors-fixed-entries): Remove vcdiff + * vc/vc-sccs.el (vc-sccs-write-revision): New function. (vc-sccs-workfile-unchanged-p): Use vc-sccs-write-revision. (vc-sccs-diff): Replace use of the external vcdiff script. === modified file 'lisp/emacs-lisp/authors.el' --- lisp/emacs-lisp/authors.el 2012-06-03 23:31:45 +0000 +++ lisp/emacs-lisp/authors.el 2012-06-06 01:06:54 +0000 @@ -399,7 +399,7 @@ ("Lawrence R. Dodd" :cowrote "dired-x.el") ;; No longer distributed. ;;; ("Viktor Dukhovni" :wrote "unexsunos4.c") - ("Paul Eggert" :wrote "rcs2log" "vcdiff") + ("Paul Eggert" :wrote "rcs2log") ; "vcdiff" ("Fred Fish" :changed "unexcoff.c") ;; No longer distributed. ;;; ("Tim Fleehart" :wrote "makefile.nt") === modified file 'make-dist' --- make-dist 2012-06-03 23:49:12 +0000 +++ make-dist 2012-06-06 01:06:54 +0000 @@ -386,7 +386,7 @@ echo "Making links to \`lib-src'" (cd lib-src ln [a-zA-Z]*.[ch] ../${tempdir}/lib-src - ln ChangeLog Makefile.in README testfile vcdiff ../${tempdir}/lib-src + ln ChangeLog Makefile.in README testfile ../${tempdir}/lib-src ln grep-changelog rcs2log ../${tempdir}/lib-src ln makefile.w32-in ../${tempdir}/lib-src) ------------------------------------------------------------ revno: 108493 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-06-05 20:29:10 -0400 message: Replace the last use of the external vcdiff script * lisp/vc/vc-sccs.el (vc-sccs-write-revision): New function. (vc-sccs-workfile-unchanged-p): Use vc-sccs-write-revision. (vc-sccs-diff): Replace use of the external vcdiff script. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-05 17:47:27 +0000 +++ lisp/ChangeLog 2012-06-06 00:29:10 +0000 @@ -1,3 +1,9 @@ +2012-06-06 Glenn Morris + + * vc/vc-sccs.el (vc-sccs-write-revision): New function. + (vc-sccs-workfile-unchanged-p): Use vc-sccs-write-revision. + (vc-sccs-diff): Replace use of the external vcdiff script. + 2012-06-05 Glenn Morris * ledit.el: Move to obsolete/. === modified file 'lisp/vc/vc-sccs.el' --- lisp/vc/vc-sccs.el 2012-06-05 01:05:51 +0000 +++ lisp/vc/vc-sccs.el 2012-06-06 00:29:10 +0000 @@ -23,10 +23,6 @@ ;;; Commentary: -;; Proper function of the SCCS diff commands requires the shellscript vcdiff -;; to be installed somewhere on Emacs's path for executables. -;; - ;;; Code: (eval-when-compile @@ -37,15 +33,13 @@ ;;; ;; ;; Maybe a better solution is to not use "get" but "sccs get". -;; (defcustom vc-sccs-path -;; (let ((path ())) -;; (dolist (dir '("/usr/sccs" "/usr/lib/sccs" "/usr/libexec/sccs")) -;; (if (file-directory-p dir) -;; (push dir path))) -;; path) -;; "List of extra directories to search for SCCS commands." -;; :type '(repeat directory) -;; :group 'vc) +;; ;; Note for GNU CSSC, you can parse sccs -V to get the libexec path. +;; (defcustom vc-sccs-path +;; (prune-directory-list '("/usr/ccs/bin" "/usr/sccs" "/usr/lib/sccs" +;; "/usr/libexec/sccs")) +;; "List of extra directories to search for SCCS commands." +;; :type '(repeat directory) +;; :group 'vc) (defgroup vc-sccs nil "VC SCCS backend." @@ -186,17 +180,22 @@ (vc-insert-file (vc-name file) "^\001e\n\001[^s]") (vc-parse-buffer "^\001d D \\([^ ]+\\)" 1))) +;; Cf vc-sccs-find-revision. +(defun vc-sccs-write-revision (file outfile &optional rev) + "Write the SCCS version of input file FILE to output file OUTFILE. +Optional string REV is a revision." + (with-temp-buffer + (apply 'vc-sccs-do-command t 0 "get" (vc-name file) + (append '("-s" "-p" "-k") ; -k: no keyword expansion + (if rev (list (concat "-r" rev))))) + (write-region nil nil outfile nil 'silent))) + (defun vc-sccs-workfile-unchanged-p (file) "SCCS-specific implementation of `vc-workfile-unchanged-p'." (let ((tempfile (make-temp-file "vc-sccs"))) (unwind-protect (progn - (with-temp-buffer - ;; Cf vc-sccs-find-revision. - (vc-sccs-do-command t 0 "get" (vc-name file) - "-s" "-p" "-k" ; no keyword expansion - (concat "-r" (vc-working-revision file))) - (write-region nil nil tempfile nil 'silent)) + (vc-sccs-write-revision file tempfile (vc-working-revision file)) (zerop (vc-do-command "*vc*" 1 "cmp" file tempfile))) (delete-file tempfile)))) @@ -354,17 +353,75 @@ (vc-sccs-do-command buffer 0 "prs" (mapcar 'vc-name files)) (when limit 'limit-unsupported)) +;; FIXME use sccsdiff if present? (defun vc-sccs-diff (files &optional oldvers newvers buffer) "Get a difference report using SCCS between two filesets." (setq files (vc-expand-dirs files)) (setq oldvers (vc-sccs-lookup-triple (car files) oldvers)) (setq newvers (vc-sccs-lookup-triple (car files) newvers)) - (apply 'vc-do-command (or buffer "*vc-diff*") - 1 "vcdiff" (mapcar 'vc-name (vc-expand-dirs files)) - (append (list "-q" - (and oldvers (concat "-r" oldvers)) - (and newvers (concat "-r" newvers))) - (vc-switches 'SCCS 'diff)))) + (or buffer (setq buffer "*vc-diff*")) + ;; We have to reimplement pieces of vc-do-command, because + ;; we want to run multiple external commands, and only do the setup + ;; and exit pieces once. + (save-current-buffer + (unless (or (eq buffer t) + (and (stringp buffer) (string= (buffer-name) buffer)) + (eq buffer (current-buffer))) + (vc-setup-buffer buffer)) + (let* ((fake-flags (append (vc-switches 'SCCS 'diff) + (if oldvers (list (concat " -r" oldvers))) + (if newvers (list (concat " -r" newvers))))) + (fake-command + (format "diff%s %s" + (if fake-flags + (concat " " (mapconcat 'identity fake-flags " ")) + "") + (vc-delistify files))) + (status 0) + (oldproc (get-buffer-process (current-buffer)))) + (when vc-command-messages + (message "Running %s in foreground..." fake-command)) + (if oldproc (delete-process oldproc)) + (dolist (file files) + (let ((oldfile (make-temp-file "vc-sccs")) + newfile) + (unwind-protect + (progn + (vc-sccs-write-revision file oldfile oldvers) + (if newvers + (vc-sccs-write-revision file (setq newfile + (make-temp-file "vc-sccs")) + newvers)) + (let* ((inhibit-read-only t) + (buffer-undo-list t) + (process-environment + (cons "LC_MESSAGES=C" process-environment)) + (w32-quote-process-args t) + (this-status + (apply 'process-file "diff" nil t nil + (append (vc-switches 'SCCS 'diff) + (list oldfile + (or newfile + (file-relative-name file))))))) + (or (integerp this-status) (setq status 'error)) + (and (integerp status) + (> this-status status) + (setq status this-status)))) + (delete-file oldfile) + (if newfile (delete-file newfile))))) + (when (or (not (integerp status)) (> status 1)) + (unless (eq ?\s (aref (buffer-name (current-buffer)) 0)) + (pop-to-buffer (current-buffer)) + (goto-char (point-min)) + (shrink-window-if-larger-than-buffer)) + (error "Running %s...FAILED (%s)" fake-command + (if (integerp status) (format "status %d" status) status))) + (when vc-command-messages + (message "Running %s...OK = %d" fake-command status)) + ;; Should we pretend we ran sccsdiff instead? + ;; This might not actually be a valid diff command. + (run-hook-with-args 'vc-post-command-functions "diff" files fake-flags) + status))) ;;; ------------------------------------------------------------ revno: 108492 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-06-05 14:47:12 -0400 message: * etc/TODO: Remove some obsolete/deleted packages. diff: === modified file 'etc/TODO' --- etc/TODO 2012-05-01 19:31:18 +0000 +++ etc/TODO 2012-06-05 18:47:12 +0000 @@ -522,15 +522,15 @@ artist, ansi-color, array, battery, calculator, cdl, cmuscheme, completion, cua, delim-col, dirtrack, double, echistory, elide-head, easymenu, expand, flow-ctrl, format [format-alist], - generic/generic-x [various modes], kermit, log-edit, ledit - [obsolete?], makesum, midnight [other than in Kill Buffer node], + generic/generic-x [various modes], kermit, log-edit, + makesum, midnight [other than in Kill Buffer node], mouse-copy [?], mouse-drag, mouse-sel, net-utils, rcompile, snmp-mode [?], soundex [should be interactive?], strokes [start from the web page], talk, thingatpt [interactive functions?], type-break, - vcursor, xscheme, zone-mode [?], mlconvert [?], iso-cvt, iso-swed, - swedish, feedmail [?], uce, bruce, gametree, meese, page-ext, + vcursor, xscheme, zone-mode [?], mlconvert [?], iso-cvt, + feedmail [?], uce, gametree, meese, page-ext, refbib, refer, scribe, sgml-mode, spell, texinfo, underline, - cmacexp, hideif, mantemp [obsolete?], pcomplete, assoc, xml, + cmacexp, hideif, mantemp [obsolete?], pcomplete, xml, cvs-status (should be described in PCL-CVS manual); other progmodes, probably in separate manual. ------------------------------------------------------------ revno: 108491 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-06-05 13:56:38 -0400 message: Remove some cruft from lib-src/makefile.w32-in * lib-src/makefile.w32-in ($(BLD)/getdate.$(O), $(BLD)/leditcfns.$(O)): ($(BLD)/make-path.$(O), $(BLD)/qsort.$(O)): ($(BLD)/timer.$(O)): Remove; unused. diff: === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2012-06-03 23:49:12 +0000 +++ lib-src/ChangeLog 2012-06-05 17:56:38 +0000 @@ -1,3 +1,9 @@ +2012-06-05 Glenn Morris + + * makefile.w32-in ($(BLD)/getdate.$(O), $(BLD)/leditcfns.$(O)): + ($(BLD)/make-path.$(O), $(BLD)/qsort.$(O)): + ($(BLD)/timer.$(O)): Remove cruft. + 2012-06-03 Glenn Morris * rcs-checkin: Remove file. === modified file 'lib-src/makefile.w32-in' --- lib-src/makefile.w32-in 2012-05-31 06:06:42 +0000 +++ lib-src/makefile.w32-in 2012-06-05 17:56:38 +0000 @@ -387,25 +387,13 @@ $(SRC)/ntlib.h \ $(EMACS_ROOT)/lib/getopt.h -$(BLD)/getdate.$(O) : \ - $(SRC)/getdate.c \ - $(EMACS_ROOT)/src/s/ms-w32.h \ - $(EMACS_ROOT)/src/config.h \ - $(MSTOOLS_SYS)/types.h - $(BLD)/hexl.$(O) : \ $(SRC)/hexl.c -$(BLD)/leditcfns.$(O) : \ - $(SRC)/leditcfns.c - $(BLD)/make-docfile.$(O) : \ $(SRC)/make-docfile.c \ $(EMACS_ROOT)/src/config.h -$(BLD)/make-path.$(O) : \ - $(SRC)/make-path.c - $(BLD)/movemail.$(O) : \ $(SRC)/movemail.c \ $(EMACS_ROOT)/src/s/ms-w32.h \ @@ -435,20 +423,12 @@ $(EMACS_ROOT)/lib-src/../src/config.h \ $(EMACS_ROOT)/lib-src/../src/systime.h -$(BLD)/qsort.$(O) : \ - $(SRC)/qsort.c - $(BLD)/tcp.$(O) : \ $(SRC)/tcp.c $(BLD)/test-distrib.$(O) : \ $(SRC)/test-distrib.c -$(BLD)/timer.$(O) : \ - $(SRC)/timer.c \ - $(EMACS_ROOT)/src/s/ms-w32.h \ - $(EMACS_ROOT)/lib-src/../src/config.h - # The following dependencies are for supporting parallel builds, where # we must make sure $(BLD) exists before any compilation starts. # ------------------------------------------------------------ revno: 108490 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-06-05 13:47:27 -0400 message: Make ledit.el obsolete. Also, etc/LEDIT was removed some time ago. diff: === modified file 'etc/NEWS' --- etc/NEWS 2012-06-05 16:50:28 +0000 +++ etc/NEWS 2012-06-05 17:47:27 +0000 @@ -296,6 +296,8 @@ *** bruce.el +*** ledit.el + *** mailpost.el *** mouse-sel.el === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-05 17:33:10 +0000 +++ lisp/ChangeLog 2012-06-05 17:47:27 +0000 @@ -1,3 +1,7 @@ +2012-06-05 Glenn Morris + + * ledit.el: Move to obsolete/. + 2012-06-05 Sam Steingold * calendar/calendar.el (calendar-exit): reinstate the 2012-03-28 === renamed file 'lisp/ledit.el' => 'lisp/obsolete/ledit.el' --- lisp/ledit.el 2012-01-19 07:21:25 +0000 +++ lisp/obsolete/ledit.el 2012-06-05 17:47:27 +0000 @@ -4,6 +4,7 @@ ;; Maintainer: FSF ;; Keywords: languages +;; Obsolete-since: 24.2 ;; This file is part of GNU Emacs. @@ -22,7 +23,7 @@ ;;; Commentary: -;; This is a major mode for editing Liszt. See etc/LEDIT for details. +;; This is a major mode for editing Liszt. ;;; Code: ------------------------------------------------------------ revno: 108489 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-06-05 13:42:37 -0400 message: Add Obsolete-since: header. diff: === modified file 'lisp/obsolete/cust-print.el' --- lisp/obsolete/cust-print.el 2012-06-05 16:50:28 +0000 +++ lisp/obsolete/cust-print.el 2012-06-05 17:42:37 +0000 @@ -1,10 +1,11 @@ ;;; cust-print.el --- handles print-level and print-circle -;; Copyright (C) 1992, 2001-2012 Free Software Foundation, Inc. +;; Copyright (C) 1992, 2001-2012 Free Software Foundation, Inc. ;; Author: Daniel LaLiberte ;; Adapted-By: ESR ;; Keywords: extensions +;; Obsolete-since: 24.2 ;; LCD Archive Entry: ;; cust-print|Daniel LaLiberte|liberte@holonexus.org ------------------------------------------------------------ revno: 108488 fixes bug(s): http://debbugs.gnu.org/11140 committer: Sam Steingold branch nick: trunk timestamp: Tue 2012-06-05 13:33:10 -0400 message: * lisp/calendar/calendar.el (calendar-exit): reinstate the 2012-03-28 patch. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-05 16:50:28 +0000 +++ lisp/ChangeLog 2012-06-05 17:33:10 +0000 @@ -1,3 +1,8 @@ +2012-06-05 Sam Steingold + + * calendar/calendar.el (calendar-exit): reinstate the 2012-03-28 + patch (Bug#11140). + 2012-06-05 Stefan Monnier * emacs-list/cust-print.el: Move to obsolete. === modified file 'lisp/calendar/calendar.el' --- lisp/calendar/calendar.el 2012-05-04 23:16:47 +0000 +++ lisp/calendar/calendar.el 2012-06-05 17:33:10 +0000 @@ -1793,19 +1793,6 @@ ?\s (- calendar-right-margin (1- start)))))) (force-mode-line-update)))) -(defun calendar-window-list () - "List of all calendar-related windows." - (let ((calendar-buffers (calendar-buffer-list)) - list) - ;; Using 0 rather than t for last argument - see bug#2199. - ;; This is only used with calendar-hide-window, which ignores - ;; iconified frames anyway, so could use 'visible rather than 0. - (walk-windows (lambda (w) - (if (memq (window-buffer w) calendar-buffers) - (push w list))) - nil 0) - list)) - (defun calendar-buffer-list () "List of all calendar-related buffers (as buffers, not strings)." (let (buffs) @@ -1817,41 +1804,29 @@ (push b buffs))) buffs)) -(defun calendar-exit () +(defun calendar-exit (&optional kill) "Get out of the calendar window and hide it and related buffers." - (interactive) - (let ((diary-buffer (get-file-buffer diary-file))) - (if (or (not diary-buffer) - (not (buffer-modified-p diary-buffer)) - (yes-or-no-p - "Diary modified; do you really want to exit the calendar? ")) - ;; Need to do this multiple times because one time can replace some - ;; calendar-related buffers with other calendar-related buffers. - (mapc (lambda (x) - (mapc 'calendar-hide-window (calendar-window-list))) - (calendar-window-list))))) + (interactive "P") + (let ((diary-buffer (get-file-buffer diary-file)) + (calendar-buffers (calendar-buffer-list))) + (when (or (not diary-buffer) + (not (buffer-modified-p diary-buffer)) + (yes-or-no-p + "Diary modified; do you really want to exit the calendar? ")) + (if (and calendar-setup (display-multi-frame-p)) + ;; FIXME: replace this cruft with the `quit-restore' window property + (dolist (w (window-list-1 nil nil t)) + (if (and (memq (window-buffer w) calendar-buffers) + (window-dedicated-p w)) + (if calendar-remove-frame-by-deleting + (delete-frame (window-frame w)) + (iconify-frame (window-frame w))) + (quit-window kill w))) + (dolist (b calendar-buffers) + (quit-windows-on b kill)))))) (define-obsolete-function-alias 'exit-calendar 'calendar-exit "23.1") -(defun calendar-hide-window (window) - "Hide WINDOW if it is calendar-related." - (let ((buffer (if (window-live-p window) (window-buffer window)))) - (if (memq buffer (calendar-buffer-list)) - (cond - ((and (display-multi-frame-p) - (eq 'icon (cdr (assoc 'visibility - (frame-parameters - (window-frame window)))))) - nil) - ((and (display-multi-frame-p) (window-dedicated-p window)) - (if calendar-remove-frame-by-deleting - (delete-frame (window-frame window)) - (iconify-frame (window-frame window)))) - ((not (and (select-window window) (one-window-p window))) - (delete-window window)) - (t (set-buffer buffer) - (bury-buffer)))))) - (defun calendar-current-date (&optional offset) "Return the current date in a list (month day year). Optional integer OFFSET is a number of days from the current date." ------------------------------------------------------------ revno: 108487 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2012-06-05 12:50:28 -0400 message: * emacs-list/cust-print.el: Move to obsolete. diff: === modified file 'etc/NEWS' --- etc/NEWS 2012-06-05 09:11:06 +0000 +++ etc/NEWS 2012-06-05 16:50:28 +0000 @@ -302,6 +302,8 @@ *** patcomp.el +*** cust-print.el + * New Modes and Packages in Emacs 24.2 === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-05 16:43:43 +0000 +++ lisp/ChangeLog 2012-06-05 16:50:28 +0000 @@ -1,5 +1,7 @@ 2012-06-05 Stefan Monnier + * emacs-list/cust-print.el: Move to obsolete. + * emacs-lisp/macroexp.el (macroexpand-all-1): Tolerate errors during compiler-macro expansion. === renamed file 'lisp/emacs-lisp/cust-print.el' => 'lisp/obsolete/cust-print.el' ------------------------------------------------------------ revno: 108486 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2012-06-05 12:43:43 -0400 message: * lisp/emacs-lisp/macroexp.el (macroexpand-all-1): Tolerate errors during compiler-macro expansion. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-05 15:41:12 +0000 +++ lisp/ChangeLog 2012-06-05 16:43:43 +0000 @@ -1,5 +1,8 @@ 2012-06-05 Stefan Monnier + * emacs-lisp/macroexp.el (macroexpand-all-1): Tolerate errors during + compiler-macro expansion. + Add native compiler-macro support. * emacs-lisp/macroexp.el (macroexpand-all-1): Support compiler-macros directly. Properly follow aliases and apply === modified file 'lisp/emacs-lisp/cl-loaddefs.el' --- lisp/emacs-lisp/cl-loaddefs.el 2012-06-04 14:00:32 +0000 +++ lisp/emacs-lisp/cl-loaddefs.el 2012-06-05 16:43:43 +0000 @@ -289,7 +289,7 @@ ;;;;;; cl-return cl-block cl-etypecase cl-typecase cl-ecase cl-case ;;;;;; cl-load-time-value cl-eval-when cl-destructuring-bind cl-function ;;;;;; cl-defmacro cl-defun cl-gentemp cl-gensym) "cl-macs" "cl-macs.el" -;;;;;; "35e128b3ab7780c4f9c25da5a0adea7a") +;;;;;; "f3973150add70d26cadb8530147dfc99") ;;; Generated autoloads from cl-macs.el (autoload 'cl-gensym "cl-macs" "\ === modified file 'lisp/emacs-lisp/macroexp.el' --- lisp/emacs-lisp/macroexp.el 2012-06-05 15:41:12 +0000 +++ lisp/emacs-lisp/macroexp.el 2012-06-05 16:43:43 +0000 @@ -187,7 +187,8 @@ (fboundp func) (or (not (eq (car-safe (symbol-function func)) 'autoload)) - (load (nth 1 (symbol-function func))))) + (ignore-errors + (load (nth 1 (symbol-function func)))))) ;; Follow the sequence of aliases. (setq func (symbol-function func))) (if (null handler) @@ -195,15 +196,21 @@ ;; setq/setq-default this works alright because the variable names ;; are symbols). (macroexpand-all-forms form 1) - (let ((newform (apply handler form (cdr form)))) + (let ((newform (condition-case err + (apply handler form (cdr form)) + (error (message "Compiler-macro error: %S" err) + form)))) (if (eq form newform) ;; The compiler macro did not find anything to do. (if (equal form (setq newform (macroexpand-all-forms form 1))) form ;; Maybe after processing the args, some new opportunities ;; appeared, so let's try the compiler macro again. - (if (eq newform - (setq form (apply handler newform (cdr newform)))) + (setq form (condition-case err + (apply handler newform (cdr newform)) + (error (message "Compiler-macro error: %S" err) + newform))) + (if (eq newform form) newform (macroexpand-all-1 newform))) (macroexpand-all-1 newform)))))) ------------------------------------------------------------ revno: 108485 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2012-06-05 11:41:12 -0400 message: Add native compiler-macro support. * lisp/emacs-lisp/macroexp.el (macroexpand-all-1): Support compiler-macros directly. Properly follow aliases and apply the compiler macros more thoroughly. * lisp/emacs-lisp/cl.el: Don't copy compiler-macro properties any more since macroexpand now properly follows aliases. * lisp/emacs-lisp/cl-macs.el (toplevel, cl-define-compiler-macro) (cl-compiler-macroexpand): Use new prop. * lisp/emacs-lisp/byte-opt.el (featurep): Optimize earlier. * lisp/emacs-lisp/cl-lib.el (custom-print-functions): Add compatibility alias. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-05 09:11:06 +0000 +++ lisp/ChangeLog 2012-06-05 15:41:12 +0000 @@ -1,3 +1,17 @@ +2012-06-05 Stefan Monnier + + Add native compiler-macro support. + * emacs-lisp/macroexp.el (macroexpand-all-1): + Support compiler-macros directly. Properly follow aliases and apply + the compiler macros more thoroughly. + * emacs-lisp/cl.el: Don't copy compiler-macro properties any more since + macroexpand now properly follows aliases. + * emacs-lisp/cl-macs.el (toplevel, cl-define-compiler-macro) + (cl-compiler-macroexpand): Use new prop. + * emacs-lisp/byte-opt.el (featurep): Optimize earlier. + + * emacs-lisp/cl-lib.el (custom-print-functions): Add alias. + 2012-06-05 Martin Rudalics * window.el (get-lru-window, get-mru-window, get-largest-window): @@ -5,8 +19,8 @@ (window--display-buffer-1, window--display-buffer-2): Replace by new function window--display-buffer (display-buffer-same-window, display-buffer-reuse-window) - (display-buffer-pop-up-frame, display-buffer-pop-up-window): Use - window--display-buffer. + (display-buffer-pop-up-frame, display-buffer-pop-up-window): + Use window--display-buffer. (display-buffer-use-some-window): Remove temporary dedication hack by calling get-lru-window and get-largest-window with NOT-SELECTED argument non-nil. Call window--display-buffer. === modified file 'lisp/emacs-lisp/byte-opt.el' --- lisp/emacs-lisp/byte-opt.el 2012-05-30 03:59:42 +0000 +++ lisp/emacs-lisp/byte-opt.el 2012-06-05 15:41:12 +0000 @@ -1159,15 +1159,15 @@ ;; optimize string-as-unibyte, string-as-multibyte, string-make-unibyte, ;; string-make-multibyte for constant args. -(put 'featurep 'byte-optimizer 'byte-optimize-featurep) -(defun byte-optimize-featurep (form) - ;; Emacs-21's byte-code doesn't run under XEmacs or SXEmacs anyway, so we - ;; can safely optimize away this test. - (if (member (cdr-safe form) '(((quote xemacs)) ((quote sxemacs)))) - nil - (if (member (cdr-safe form) '(((quote emacs)))) - t - form))) +(put 'featurep 'compiler-macro + (lambda (form &rest _ignore) + ;; Emacs-21's byte-code doesn't run under XEmacs or SXEmacs anyway, so + ;; we can safely optimize away this test. + (if (member (cdr-safe form) '(((quote xemacs)) ((quote sxemacs)))) + nil + (if (member (cdr-safe form) '(((quote emacs)))) + t + form)))) (put 'set 'byte-optimizer 'byte-optimize-set) (defun byte-optimize-set (form) === modified file 'lisp/emacs-lisp/bytecomp.el' --- lisp/emacs-lisp/bytecomp.el 2012-06-01 19:47:54 +0000 +++ lisp/emacs-lisp/bytecomp.el 2012-06-05 15:41:12 +0000 @@ -2874,14 +2874,12 @@ (byte-compile-log-warning (format "Forgot to expand macro %s" (car form)) nil :error)) (if (and handler - ;; Make sure that function exists. This is important - ;; for CL compiler macros since the symbol may be - ;; `cl-byte-compile-compiler-macro' but if CL isn't - ;; loaded, this function doesn't exist. - (and (not (eq handler - ;; Already handled by macroexpand-all. - 'cl-byte-compile-compiler-macro)) - (functionp handler))) + ;; Make sure that function exists. + (and (functionp handler) + ;; Ignore obsolete byte-compile function used by former + ;; CL code to handle compiler macros (we do it + ;; differently now). + (not (eq handler 'cl-byte-compile-compiler-macro)))) (funcall handler form) (byte-compile-normal-call form)) (if (byte-compile-warning-enabled-p 'cl-functions) === modified file 'lisp/emacs-lisp/cl-lib.el' --- lisp/emacs-lisp/cl-lib.el 2012-06-04 14:08:33 +0000 +++ lisp/emacs-lisp/cl-lib.el 2012-06-05 15:41:12 +0000 @@ -94,6 +94,11 @@ (defvar cl-optimize-speed 1) (defvar cl-optimize-safety 1) +;;;###autoload +(define-obsolete-variable-alias + ;; This alias is needed for compatibility with .elc files that use defstruct + ;; and were compiled with Emacs<24.2. + 'custom-print-functions 'cl-custom-print-functions "24.2") ;;;###autoload (defvar cl-custom-print-functions nil === modified file 'lisp/emacs-lisp/cl-macs.el' --- lisp/emacs-lisp/cl-macs.el 2012-06-04 01:05:17 +0000 +++ lisp/emacs-lisp/cl-macs.el 2012-06-05 15:41:12 +0000 @@ -2922,28 +2922,24 @@ (setq args (nconc (nreverse res) (and p (list '&rest p))))) `(cl-eval-when (compile load eval) ,(cl-transform-function-property - func 'cl-compiler-macro + func 'compiler-macro (cons (if (memq '&whole args) (delq '&whole args) (cons '_cl-whole-arg args)) body)) - (or (get ',func 'byte-compile) - (progn - (put ',func 'byte-compile - 'cl-byte-compile-compiler-macro) - ;; This is so that describe-function can locate - ;; the macro definition. - (let ((file ,(or buffer-file-name - (and (boundp 'byte-compile-current-file) - (stringp byte-compile-current-file) - byte-compile-current-file)))) - (if file (put ',func 'compiler-macro-file - (purecopy (file-name-nondirectory file))))))))) + ;; This is so that describe-function can locate + ;; the macro definition. + (let ((file ,(or buffer-file-name + (and (boundp 'byte-compile-current-file) + (stringp byte-compile-current-file) + byte-compile-current-file)))) + (if file (put ',func 'compiler-macro-file + (purecopy (file-name-nondirectory file))))))) ;;;###autoload (defun cl-compiler-macroexpand (form) (while (let ((func (car-safe form)) (handler nil)) (while (and (symbolp func) - (not (setq handler (get func 'cl-compiler-macro))) + (not (setq handler (get func 'compiler-macro))) (fboundp func) (or (not (eq (car-safe (symbol-function func)) 'autoload)) (load (nth 1 (symbol-function func))))) @@ -3106,9 +3102,8 @@ (mapc (lambda (y) (put (car y) 'side-effect-free t) - (put (car y) 'byte-compile 'cl-byte-compile-compiler-macro) - (put (car y) 'cl-compiler-macro - `(lambda (w x) + (put (car y) 'compiler-macro + `(lambda (_w x) ,(if (symbolp (cadr y)) `(list ',(cadr y) (list ',(cl-caddr y) x)) === modified file 'lisp/emacs-lisp/cl.el' --- lisp/emacs-lisp/cl.el 2012-06-04 01:05:17 +0000 +++ lisp/emacs-lisp/cl.el 2012-06-05 15:41:12 +0000 @@ -321,13 +321,11 @@ (intern (format "cl-%s" fun))))) (defalias fun new) ;; If `cl-foo' is declare inline, then make `foo' inline as well, and - ;; similarly, if `cl-foo' has a compiler-macro, make it available for `foo' - ;; as well. Same for edebug specifications, indent rules and + ;; similarly. Same for edebug specifications, indent rules and ;; doc-string position. ;; FIXME: For most of them, we should instead follow aliases ;; where applicable. - (dolist (prop '(byte-optimizer byte-compile cl-compiler-macro - doc-string-elt edebug-form-spec + (dolist (prop '(byte-optimizer doc-string-elt edebug-form-spec lisp-indent-function)) (if (get new prop) (put fun prop (get new prop)))))) === modified file 'lisp/emacs-lisp/macroexp.el' --- lisp/emacs-lisp/macroexp.el 2012-06-04 01:05:17 +0000 +++ lisp/emacs-lisp/macroexp.el 2012-06-05 15:41:12 +0000 @@ -177,25 +177,37 @@ (cons (macroexpand-all-1 (list 'function f)) (macroexpand-all-forms args))))) - ;; Macro expand compiler macros. This cannot be delayed to - ;; byte-optimize-form because the output of the compiler-macro can - ;; use macros. - ;; FIXME: Don't depend on CL. - (`(,(pred (lambda (fun) - (and (symbolp fun) - (eq (get fun 'byte-compile) - 'cl-byte-compile-compiler-macro) - (functionp 'cl-compiler-macroexpand)))) - . ,_) - (let ((newform (with-no-warnings (cl-compiler-macroexpand form)))) - (if (eq form newform) + (`(,func . ,_) + ;; Macro expand compiler macros. This cannot be delayed to + ;; byte-optimize-form because the output of the compiler-macro can + ;; use macros. + (let ((handler nil)) + (while (and (symbolp func) + (not (setq handler (get func 'compiler-macro))) + (fboundp func) + (or (not (eq (car-safe (symbol-function func)) + 'autoload)) + (load (nth 1 (symbol-function func))))) + ;; Follow the sequence of aliases. + (setq func (symbol-function func))) + (if (null handler) + ;; No compiler macro. We just expand each argument (for + ;; setq/setq-default this works alright because the variable names + ;; are symbols). (macroexpand-all-forms form 1) - (macroexpand-all-1 newform)))) - (`(,_ . ,_) - ;; For every other list, we just expand each argument (for - ;; setq/setq-default this works alright because the variable names - ;; are symbols). - (macroexpand-all-forms form 1)) + (let ((newform (apply handler form (cdr form)))) + (if (eq form newform) + ;; The compiler macro did not find anything to do. + (if (equal form (setq newform (macroexpand-all-forms form 1))) + form + ;; Maybe after processing the args, some new opportunities + ;; appeared, so let's try the compiler macro again. + (if (eq newform + (setq form (apply handler newform (cdr newform)))) + newform + (macroexpand-all-1 newform))) + (macroexpand-all-1 newform)))))) + (t form)))) ;;;###autoload ------------------------------------------------------------ revno: 108484 committer: martin rudalics branch nick: trunk timestamp: Tue 2012-06-05 11:11:06 +0200 message: Clean up and simplify buffer display routines. * window.el (get-lru-window, get-mru-window, get-largest-window): New argument NOT-SELECTED to avoid picking the selected window. (window--display-buffer-1, window--display-buffer-2): Replace by new function window--display-buffer (display-buffer-same-window, display-buffer-reuse-window) (display-buffer-pop-up-frame, display-buffer-pop-up-window): Use window--display-buffer. (display-buffer-use-some-window): Remove temporary dedication hack by calling get-lru-window and get-largest-window with NOT-SELECTED argument non-nil. Call window--display-buffer. diff: === modified file 'etc/NEWS' --- etc/NEWS 2012-06-04 01:05:17 +0000 +++ etc/NEWS 2012-06-05 09:11:06 +0000 @@ -340,6 +340,9 @@ ** New error type and new function `user-error'. Doesn't trigger the debugger. +** The functions get-lru-window, get-mru-window and get-largest-window +now accept a third argument to avoid chosing the selected window. + ** Completion *** New function `completion-table-with-quoting' to handle completion === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-05 01:05:51 +0000 +++ lisp/ChangeLog 2012-06-05 09:11:06 +0000 @@ -1,3 +1,16 @@ +2012-06-05 Martin Rudalics + + * window.el (get-lru-window, get-mru-window, get-largest-window): + New argument NOT-SELECTED to avoid picking the selected window. + (window--display-buffer-1, window--display-buffer-2): Replace by + new function window--display-buffer + (display-buffer-same-window, display-buffer-reuse-window) + (display-buffer-pop-up-frame, display-buffer-pop-up-window): Use + window--display-buffer. + (display-buffer-use-some-window): Remove temporary dedication + hack by calling get-lru-window and get-largest-window with + NOT-SELECTED argument non-nil. Call window--display-buffer. + 2012-06-05 Glenn Morris * vc/vc-sccs.el (vc-sccs-workfile-unchanged-p): === modified file 'lisp/window.el' --- lisp/window.el 2012-06-02 10:56:09 +0000 +++ lisp/window.el 2012-06-05 09:11:06 +0000 @@ -1256,12 +1256,14 @@ (defalias 'some-window 'get-window-with-predicate) -(defun get-lru-window (&optional all-frames dedicated) +(defun get-lru-window (&optional all-frames dedicated not-selected) "Return the least recently used window on frames specified by ALL-FRAMES. Return a full-width window if possible. A minibuffer window is never a candidate. A dedicated window is never a candidate unless DEDICATED is non-nil, so if all windows are dedicated, the value is nil. Avoid returning the selected window if possible. +Optional argument NOT-SELECTED non-nil means never return the +selected window. The following non-nil values of the optional argument ALL-FRAMES have special meanings: @@ -1280,7 +1282,8 @@ selected frame and no others." (let (best-window best-time second-best-window second-best-time time) (dolist (window (window-list-1 nil 'nomini all-frames)) - (when (or dedicated (not (window-dedicated-p window))) + (when (and (or dedicated (not (window-dedicated-p window))) + (or (not not-selected) (not (eq window (selected-window))))) (setq time (window-use-time window)) (if (or (eq window (selected-window)) (not (window-full-width-p window))) @@ -1292,9 +1295,12 @@ (setq best-window window))))) (or best-window second-best-window))) -(defun get-mru-window (&optional all-frames) +(defun get-mru-window (&optional all-frames dedicated not-selected) "Return the most recently used window on frames specified by ALL-FRAMES. -Do not return a minibuffer window. +A minibuffer window is never a candidate. A dedicated window is +never a candidate unless DEDICATED is non-nil, so if all windows +are dedicated, the value is nil. Optional argument NOT-SELECTED +non-nil means never return the selected window. The following non-nil values of the optional argument ALL-FRAMES have special meanings: @@ -1314,16 +1320,19 @@ (let (best-window best-time time) (dolist (window (window-list-1 nil 'nomini all-frames)) (setq time (window-use-time window)) - (when (or (not best-time) (> time best-time)) + (when (and (or dedicated (not (window-dedicated-p window))) + (or (not not-selected) (not (eq window (selected-window)))) + (or (not best-time) (> time best-time))) (setq best-time time) (setq best-window window))) best-window)) -(defun get-largest-window (&optional all-frames dedicated) +(defun get-largest-window (&optional all-frames dedicated not-selected) "Return the largest window on frames specified by ALL-FRAMES. A minibuffer window is never a candidate. A dedicated window is never a candidate unless DEDICATED is non-nil, so if all windows -are dedicated, the value is nil. +are dedicated, the value is nil. Optional argument NOT-SELECTED +non-nil means never return the selected window. The following non-nil values of the optional argument ALL-FRAMES have special meanings: @@ -1343,7 +1352,8 @@ (let ((best-size 0) best-window size) (dolist (window (window-list-1 nil 'nomini all-frames)) - (when (or dedicated (not (window-dedicated-p window))) + (when (and (or dedicated (not (window-dedicated-p window))) + (or (not not-selected) (not (eq window (selected-window))))) (setq size (* (window-total-size window) (window-total-size window t))) (when (> size best-size) @@ -4253,17 +4263,11 @@ special-display-buffer-names special-display-regexps) (display-buffer buffer))) ;; If no window yet, make one in a new frame. - (let* ((frame - (with-current-buffer buffer - (make-frame (append args special-display-frame-alist)))) - (window (frame-selected-window frame))) - (display-buffer-record-window 'frame window buffer) - ;; FIXME: Use window--display-buffer-2? - (set-window-buffer window buffer) - ;; Reset list of WINDOW's previous buffers to nil. - (set-window-prev-buffers window nil) - (set-window-dedicated-p window t) - window))))) + (let ((frame + (with-current-buffer buffer + (make-frame (append args special-display-frame-alist))))) + (window--display-buffer + buffer (frame-selected-window frame) 'frame t)))))) (defcustom special-display-function 'special-display-popup-frame "Function to call for displaying special buffers. @@ -4574,30 +4578,34 @@ (enlarge-window (/ (- (window-height window) (window-height)) 2)) (error nil))))) -(defun window--display-buffer-1 (window) - "Raise the frame containing WINDOW. -Do not raise the selected frame. Return WINDOW." - (let* ((frame (window-frame window)) - (visible (frame-visible-p frame))) - (unless (or (not visible) - ;; Assume the selected frame is already visible enough. - (eq frame (selected-frame)) - ;; Assume the frame from which we invoked the minibuffer - ;; is visible. - (and (minibuffer-window-active-p (selected-window)) - (eq frame (window-frame (minibuffer-selected-window))))) - (raise-frame frame)) - window)) - -(defun window--display-buffer-2 (buffer window &optional dedicated) +(defun window--display-buffer (buffer window type &optional dedicated) "Display BUFFER in WINDOW and make its frame visible. -Set `window-dedicated-p' to DEDICATED if non-nil. -Return WINDOW." +TYPE must be one of the symbols `reuse', `window' or `frame' and +is passed unaltered to `display-buffer-record-window'. Set +`window-dedicated-p' to DEDICATED if non-nil. Return WINDOW if +BUFFER and WINDOW are live." (when (and (buffer-live-p buffer) (window-live-p window)) - (set-window-buffer window buffer) - (when dedicated - (set-window-dedicated-p window dedicated)) - (window--display-buffer-1 window))) + (let* ((frame (window-frame window)) + (visible (frame-visible-p frame))) + (unless (eq buffer (window-buffer window)) + (set-window-dedicated-p window nil) + (display-buffer-record-window type window buffer) + (set-window-buffer window buffer) + (when dedicated + (set-window-dedicated-p window dedicated)) + (when (memq type '(window frame)) + (set-window-prev-buffers window nil))) + + (unless (or (not visible) + ;; Assume the selected frame is already visible enough. + (eq frame (selected-frame)) + ;; Assume the frame from which we invoked the minibuffer + ;; is visible. + (and (minibuffer-window-active-p (selected-window)) + (eq frame (window-frame (minibuffer-selected-window))))) + (raise-frame frame)) + + window))) ;; FIXME: Not implemented. ;; FIXME: By the way, there could be more levels of dedication: @@ -4819,8 +4827,7 @@ (unless (or (cdr (assq 'inhibit-same-window alist)) (window-minibuffer-p) (window-dedicated-p)) - (display-buffer-record-window 'reuse (selected-window) buffer) - (window--display-buffer-2 buffer (selected-window)))) + (window--display-buffer buffer (selected-window) 'reuse))) (defun display-buffer--maybe-same-window (buffer alist) "Conditionally display BUFFER in the selected window. @@ -4864,8 +4871,7 @@ (get-buffer-window-list buffer 'nomini frames)))))) (when window - (display-buffer-record-window 'reuse window buffer) - (window--display-buffer-1 window)))) + (window--display-buffer buffer window 'reuse)))) (defun display-buffer--special-action (buffer) "Return special display action for BUFFER, if any. @@ -4891,11 +4897,8 @@ (when (and fun (setq frame (funcall fun)) (setq window (frame-selected-window frame))) - (display-buffer-record-window 'frame window buffer) - (window--display-buffer-2 buffer window display-buffer-mark-dedicated) - ;; Reset list of WINDOW's previous buffers to nil. - (set-window-prev-buffers window nil) - window))) + (window--display-buffer + buffer window 'frame display-buffer-mark-dedicated)))) (defun display-buffer-pop-up-window (buffer _alist) "Display BUFFER by popping up a new window. @@ -4917,11 +4920,8 @@ (get-largest-window frame t)) (window--try-to-split-window (get-lru-window frame t))))) - (display-buffer-record-window 'window window buffer) - (window--display-buffer-2 buffer window display-buffer-mark-dedicated) - ;; Reset list of WINDOW's previous buffers to nil. - (set-window-prev-buffers window nil) - window))) + (window--display-buffer + buffer window 'window display-buffer-mark-dedicated)))) (defun display-buffer--maybe-pop-up-frame-or-window (buffer alist) "Try displaying BUFFER based on `pop-up-frames' or `pop-up-windows'. @@ -4943,40 +4943,26 @@ Search for a usable window, set that window to the buffer, and return the window. If no suitable window is found, return nil." (let* ((not-this-window (cdr (assq 'inhibit-same-window alist))) - (window-to-undedicate - ;; When NOT-THIS-WINDOW is non-nil, temporarily dedicate the - ;; selected window to its buffer, to prevent any of the - ;; `get-' routines below from choosing it. (Bug#1415) - (and not-this-window (not (window-dedicated-p)) - (set-window-dedicated-p (selected-window) t) - (selected-window))) (frame (or (window--frame-usable-p (selected-frame)) (window--frame-usable-p (last-nonminibuffer-frame)))) - window) - (unwind-protect - (setq window - ;; Reuse an existing window. - (or (get-lru-window frame) - (let ((window (get-buffer-window buffer 'visible))) - (unless (and not-this-window - (eq window (selected-window))) - window)) - (get-largest-window 'visible) - (let ((window (get-buffer-window buffer 0))) - (unless (and not-this-window - (eq window (selected-window))) - window)) - (get-largest-window 0))) - (when (window-live-p window-to-undedicate) - ;; Restore dedicated status of selected window. - (set-window-dedicated-p window-to-undedicate nil))) + (window + ;; Reuse an existing window. + (or (get-lru-window frame nil not-this-window) + (let ((window (get-buffer-window buffer 'visible))) + (unless (and not-this-window + (eq window (selected-window))) + window)) + (get-largest-window 'visible nil not-this-window) + (let ((window (get-buffer-window buffer 0))) + (unless (and not-this-window + (eq window (selected-window))) + window)) + (get-largest-window 0 not-this-window)))) (when window - (display-buffer-record-window 'reuse window buffer) (window--even-window-heights window) - (window--display-buffer-2 buffer window)))) + (window--display-buffer buffer window 'reuse)))) ;;; Display + selection commands: - (defun pop-to-buffer (buffer &optional action norecord) "Select buffer BUFFER in some window, preferably a different one. BUFFER may be a buffer, a string (a buffer name), or nil. If it ------------------------------------------------------------ revno: 108483 committer: Glenn Morris branch nick: trunk timestamp: Mon 2012-06-04 21:05:51 -0400 message: * vc-sccs.el (vc-sccs-workfile-unchanged-p): Replace external vcdiff script. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-04 14:08:33 +0000 +++ lisp/ChangeLog 2012-06-05 01:05:51 +0000 @@ -1,3 +1,8 @@ +2012-06-05 Glenn Morris + + * vc/vc-sccs.el (vc-sccs-workfile-unchanged-p): + Replace external vcdiff script. + 2012-06-04 Stefan Monnier * emacs-lisp/cl-lib.el (cl-values, cl-values-list): Fix up last change. === modified file 'lisp/vc/vc-sccs.el' --- lisp/vc/vc-sccs.el 2012-02-25 04:29:09 +0000 +++ lisp/vc/vc-sccs.el 2012-06-05 01:05:51 +0000 @@ -1,6 +1,6 @@ ;;; vc-sccs.el --- support for SCCS version-control -;; Copyright (C) 1992-2012 Free Software Foundation, Inc. +;; Copyright (C) 1992-2012 Free Software Foundation, Inc. ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Andre Spiegel @@ -188,9 +188,17 @@ (defun vc-sccs-workfile-unchanged-p (file) "SCCS-specific implementation of `vc-workfile-unchanged-p'." - (zerop (apply 'vc-do-command "*vc*" 1 "vcdiff" (vc-name file) - (list "--brief" "-q" - (concat "-r" (vc-working-revision file)))))) + (let ((tempfile (make-temp-file "vc-sccs"))) + (unwind-protect + (progn + (with-temp-buffer + ;; Cf vc-sccs-find-revision. + (vc-sccs-do-command t 0 "get" (vc-name file) + "-s" "-p" "-k" ; no keyword expansion + (concat "-r" (vc-working-revision file))) + (write-region nil nil tempfile nil 'silent)) + (zerop (vc-do-command "*vc*" 1 "cmp" file tempfile))) + (delete-file tempfile)))) ;;;