Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 101927. ------------------------------------------------------------ revno: 101927 committer: Glenn Morris branch nick: trunk timestamp: Mon 2010-10-11 23:38:34 -0700 message: * make-dist: Simplify creation of lisp/MANIFEST. diff: === modified file 'make-dist' --- make-dist 2010-10-12 04:32:20 +0000 +++ make-dist 2010-10-12 06:38:34 +0000 @@ -279,21 +279,17 @@ $EMACS -batch -f batch-byte-recompile-directory lisp leim fi +## What is this file for? It goes in srcdir, not the tarfile. +## Why does it exclude term/ ? echo "Making lisp/MANIFEST" -(cd lisp; - files=`echo [!=]*.el | sed -e 's/ subdirs.el / /' -e 's/ default.el / /'` - for dir in [!=]*; do - if [ -d $dir ] && [ $dir != term ] - then - echo $dir - thisdir=`echo $dir/[!=]*.el | sed -e 's/ subdirs.el / /'` - files="$files $thisdir" - fi - done - for file in $files - do sed -n 's/^;;; //p; q' $file - done | sort > MANIFEST) +files=`find lisp -type f -name '*.el'` +for file in $files; do + case "$file" in + */subdirs.el|*/default.el|*/loaddefs.el|*/term/*) continue ;; + esac + sed -n 's/^;;; //p; q' $file +done | sort > lisp/MANIFEST echo "Creating staging directory: \`${tempparent}'" @@ -319,6 +315,8 @@ ln config.bat make-dist update-subdirs vpath.sed .dir-locals.el ${tempdir} ln mkinstalldirs config.sub config.guess install-sh ${tempdir} +## FIXME why do we bother doing this? set-version in admin/admin.el +## does this, and more besides. echo "Updating version number in README" (cd ${tempdir} awk \ @@ -448,7 +446,7 @@ echo "Making links to \`lib-src'" (cd lib-src - ln [a-zA-Z]*.[chmy] ../${tempdir}/lib-src + ln [a-zA-Z]*.[ch] ../${tempdir}/lib-src ln ChangeLog Makefile.in README testfile vcdiff ../${tempdir}/lib-src ln grep-changelog rcs2log rcs-checkin ../${tempdir}/lib-src ln makefile.w32-in ../${tempdir}/lib-src ------------------------------------------------------------ revno: 101926 committer: Glenn Morris branch nick: trunk timestamp: Mon 2010-10-11 21:32:20 -0700 message: * make-dist: Update and simplify. Eg: there are no symlinks in the tree for a long time Check for version in emacsver.texi. Clean up *~ etc files using a find at the end. Add etc/srecode. diff: === modified file 'ChangeLog' --- ChangeLog 2010-10-11 23:57:49 +0000 +++ ChangeLog 2010-10-12 04:32:20 +0000 @@ -1,3 +1,7 @@ +2010-10-12 Glenn Morris + + * make-dist: Update and simplify. + 2010-10-12 Eli Zaretskii * make-dist: Don't distribute src/buildobj.h. (Bug#7167) === modified file 'make-dist' --- make-dist 2010-10-11 23:57:49 +0000 +++ make-dist 2010-10-12 04:32:20 +0000 @@ -1,29 +1,32 @@ #!/bin/sh - -#### make-dist: create an Emacs distribution tar file from the current -#### source tree. This basically creates a duplicate directory -#### structure, and then hard links into it only those files that should -#### be distributed. This means that if you add a file with an odd name, -#### you should make sure that this script will include it. - -# Copyright (C) 1995, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. - -# 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 . - +### make-dist: create an Emacs distribution tar file from current srcdir + +## Copyright (C) 1995, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, +## 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + +## 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 . + +### Commentary: + +## This basically creates a duplicate directory structure, and then +## hard links into it only those files that should be distributed. +## This means that if you add a file with an odd name, you should make +## sure that this script will include it. + +### Code: progname="$0" @@ -163,10 +166,10 @@ if [ $update = yes ]; then - if grep -s "@set EMACSVER *${shortversion}" ./doc/emacs/emacs.texi > /dev/null; then + if grep -s "@set EMACSVER *${shortversion}" ./doc/emacs/emacsver.texi > /dev/null; then true else - echo "You must update the version number in \`./doc/emacs/emacs.texi'" + echo "You must update the version number in \`./doc/emacs/emacsver.texi'" sleep 5 fi fi @@ -247,7 +250,7 @@ autoconf || { x=$?; echo Autoconf FAILED! >&2; exit $x; } fi -### Make sure src/config-in.stamp is newer than configure.in. +### Make sure src/stamp-h.in is newer than configure.in. if [ "x`ls -t src/stamp-h.in configure.in | sed q`" != "xsrc/stamp-h.in" ]; then echo "\`./configure.in' is newer than \`./src/stamp-h.in'" >&2 echo "Running autoheader" >&2 @@ -259,10 +262,10 @@ if [ $update = yes ]; then echo "Updating Info files" - (cd doc/emacs; make -f Makefile.in srcdir=. info) - (cd doc/misc; make -f Makefile.in srcdir=. info) - (cd doc/lispref; make -f Makefile.in srcdir=. info) - (cd doc/lispintro; make -f Makefile.in SHELL=/bin/sh srcdir=. info VPATH=.) + (cd doc/emacs; make info) + (cd doc/misc; make info) + (cd doc/lispref; make info) + (cd doc/lispintro; make info) echo "Updating finder, custom and autoload data" (cd lisp; make updates EMACS="$EMACS") @@ -314,11 +317,7 @@ ln INSTALL README BUGS move-if-change ${tempdir} ln ChangeLog Makefile.in configure configure.in ${tempdir} ln config.bat make-dist update-subdirs vpath.sed .dir-locals.el ${tempdir} -### Copy these files; they're cross-filesystem symlinks. -cp mkinstalldirs ${tempdir} -cp config.sub ${tempdir} -cp config.guess ${tempdir} -cp install-sh ${tempdir} +ln mkinstalldirs config.sub config.guess install-sh ${tempdir} echo "Updating version number in README" (cd ${tempdir} @@ -344,7 +343,7 @@ etc/images/smilies etc/images/smilies/grayscale \ etc/images/smilies/medium etc/images/tree-widget \ etc/images/tree-widget/default etc/images/tree-widget/folder \ - etc/refcards etc/schema etc/tutorials info doc doc/emacs \ + etc/refcards etc/schema etc/srecode etc/tutorials info doc doc/emacs \ doc/misc doc/man doc/lispref doc/lispintro m4 msdos \ nextstep nextstep/Cocoa nextstep/Cocoa/Emacs.base \ nextstep/Cocoa/Emacs.base/Contents \ @@ -363,17 +362,14 @@ done echo "Making links to \`lisp' and its subdirectories" -### Don't distribute TAGS, =*.el files, site-init.el, site-load.el, or default.el. +### Don't distribute site-init.el, site-load.el, or default.el. (cd lisp ln [a-zA-Z]*.el ../${tempdir}/lisp ln [a-zA-Z]*.elc ../${tempdir}/lisp - ## simula.el doesn't keep abbreviations in simula.defns any more. - ## ln [a-zA-Z]*.defns ../${tempdir}/lisp ln ChangeLog ChangeLog.*[0-9] ../${tempdir}/lisp ln Makefile.in makefile.w32-in ../${tempdir}/lisp - test -f README && ln README ../${tempdir}/lisp + ln README ../${tempdir}/lisp (cd ../${tempdir}/lisp - rm -f TAGS =* rm -f site-init site-init.el site-init.elc rm -f site-load site-load.el site-load.elc rm -f site-start site-start.el site-start.elc @@ -398,22 +394,18 @@ mkdir -p ../${tempdir}/lisp/$file ln $file/[a-zA-Z0-9]*.el ../${tempdir}/lisp/$file ln $file/[a-zA-Z0-9]*.elc ../${tempdir}/lisp/$file - ## calc/README.priv - for f in $file/[a-zA-Z]*.xpm $file/[a-zA-Z]*.[xp]bm \ - $file/README $file/ChangeLog $file/ChangeLog.*[0-9] \ + ## calc/README.prev + for f in $file/README $file/ChangeLog $file/ChangeLog.*[0-9] \ $file/README.prev; do - if [ -f $f ]; then - ln $f ../${tempdir}/lisp/$file - fi + [ -f $f ] || continue + ln $f ../${tempdir}/lisp/$file done done ) echo "Making links to \`leim' and its subdirectories" -### Don't distribute TAGS, or =*.el files. (cd leim ln makefile.w32-in ../${tempdir}/leim ln ChangeLog README ../${tempdir}/leim - ln CXTERM-DIC/README CXTERM-DIC/*.tit ../${tempdir}/leim/CXTERM-DIC ln SKK-DIC/README SKK-DIC/SKK-JISYO.L ../${tempdir}/leim/SKK-DIC ln MISC-DIC/README MISC-DIC/*.* ../${tempdir}/leim/MISC-DIC @@ -426,43 +418,21 @@ rm -f ../${tempdir}/leim/quail/quick-b5.* rm -f ../${tempdir}/leim/quail/quick-cns.* rm -f ../${tempdir}/leim/quail/tsang-b5.* - rm -f ../${tempdir}/leim/quail/tsang-cns.* - - cd ../${tempdir}/leim - rm -f TAGS =* */=*) + rm -f ../${tempdir}/leim/quail/tsang-cns.*) echo "Making links to \`src'" ### Don't distribute =*.[ch] files, or the configured versions of ### config.in, paths.in, or Makefile.in, or TAGS. (cd src echo " (It is ok if ln fails in some cases.)" - ln [a-zA-Z]*.c ../${tempdir}/src - ln [a-zA-Z]*.h ../${tempdir}/src - ln [a-zA-Z]*.m ../${tempdir}/src + ln [a-zA-Z]*.[chm] ../${tempdir}/src ln [a-zA-Z]*.in ../${tempdir}/src ln [a-zA-Z]*.mk ../${tempdir}/src - ## If we ended up with a symlink, or if we did not get anything - ## due to a cross-device symlink, copy the file. - for file in [a-zA-Z]*.[hcs] [a-zA-Z]*.in; do - if test -f ../${tempdir}/src/$file; then - # test -f appears to succeed for a symlink - if test -L ../${tempdir}/src/$file; then - rm ../${tempdir}/src/$file - cp -p $file ../${tempdir}/src - chmod a-w ../${tempdir}/src/$file - fi - else - rm ../${tempdir}/src/$file - cp -p $file ../${tempdir}/src - chmod a-w ../${tempdir}/src/$file - fi - done ln README ChangeLog ChangeLog.*[0-9] ../${tempdir}/src ln makefile.w32-in ../${tempdir}/src ln .gdbinit .dbxinit ../${tempdir}/src cd ../${tempdir}/src - rm -f config.h epaths.h Makefile buildobj.h - rm -f =* TAGS) + rm -f config.h epaths.h Makefile buildobj.h) echo "Making links to \`src/bitmaps'" (cd src/bitmaps @@ -482,25 +452,8 @@ ln ChangeLog Makefile.in README testfile vcdiff ../${tempdir}/lib-src ln grep-changelog rcs2log rcs-checkin ../${tempdir}/lib-src ln makefile.w32-in ../${tempdir}/lib-src - ## If we ended up with a symlink, or if we did not get anything - ## due to a cross-device symlink, copy the file. - for file in [a-zA-Z]*.[chy]; do - if test -f ../${tempdir}/lib-src/$file; then - # test -f appears to succeed for a symlink - if test -L ../${tempdir}/lib-src/$file; then - rm ../${tempdir}/lib-src/$file - cp $file ../${tempdir}/lib-src - chmod a-w ../${tempdir}/lib-src/$file - fi - else - rm ../${tempdir}/lib-src/$file - cp $file ../${tempdir}/lib-src - chmod a-w ../${tempdir}/lib-src/$file - fi - done cd ../${tempdir}/lib-src - rm -f getopt.h - rm -f =* TAGS) + rm -f getopt.h) echo "Making links to \`m4'" (cd m4 @@ -508,10 +461,10 @@ echo "Making links to \`nt'" (cd nt - ln emacs.manifest emacs.rc emacsclient.rc config.nt [a-z]*.c ../${tempdir}/nt - ln nmake.defs gmake.defs subdirs.el ../${tempdir}/nt - ln [a-z]*.bat [a-z]*.h ../${tempdir}/nt - ln ChangeLog INSTALL README makefile.w32-in ../${tempdir}/nt) + ln emacs.manifest emacs.rc emacsclient.rc config.nt ../${tempdir}/nt + ln emacs-src.tags nmake.defs gmake.defs subdirs.el ../${tempdir}/nt + ln [a-z]*.bat [a-z]*.[ch] ../${tempdir}/nt + ln ChangeLog INSTALL README README.W32 makefile.w32-in ../${tempdir}/nt) echo "Making links to \`nt/inc'" (cd nt/inc @@ -537,14 +490,12 @@ echo "Making links to \`msdos'" (cd msdos ln ChangeLog INSTALL README emacs.ico emacs.pif ../${tempdir}/msdos - ln is_exec.c sigaction.c mainmake.v2 sed*.inp ../${tempdir}/msdos - cd ../${tempdir}/msdos - rm -f =*) + ln is_exec.c sigaction.c mainmake.v2 sed*.inp ../${tempdir}/msdos) ## FIXME are DEV-NOTES and FOR-RELEASE appropriate? echo "Making links to \`nextstep'" (cd nextstep - ln AUTHORS ChangeLog DEV-NOTES FOR-RELEASE README INSTALL ../${tempdir}/nextstep) + ln AUTHORS ChangeLog README INSTALL ../${tempdir}/nextstep) echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents'" (cd nextstep/Cocoa/Emacs.base/Contents @@ -568,83 +519,57 @@ echo "Making links to \`oldXMenu'" (cd oldXMenu - ln *.c *.h *.in ../${tempdir}/oldXMenu + ln *.[ch] *.in ../${tempdir}/oldXMenu ln README ChangeLog ../${tempdir}/oldXMenu) echo "Making links to \`lwlib'" (cd lwlib - ln *.c *.h *.in ../${tempdir}/lwlib + ln *.[ch] *.in ../${tempdir}/lwlib ln README ChangeLog ../${tempdir}/lwlib) echo "Making links to \`etc'" -### Don't distribute = files, TAGS, DOC files, backups, autosaves, or -### tex litter. (cd etc - files=`ls -d * | grep -v '^e$' \ - | grep -v '^charsets$' | grep -v '^gnus$' | grep -v '^images$' | grep -v '^nxml$' \ - | grep -v '^refcards$' | grep -v '^tutorials$'| grep -v '^schema$'` - ln $files ../${tempdir}/etc - ## If we ended up with a symlink, or if we did not get anything - ## due to a cross-device symlink, copy the file. - for file in $files; do - if test -f ../${tempdir}/etc/$file; then - # test -f appears to succeed for a symlink - if test -L ../${tempdir}/etc/$file; then - rm ../${tempdir}/etc/$file - cp $file ../${tempdir}/etc - chmod a-w ../${tempdir}/etc/$file - fi - else - rm ../${tempdir}/etc/$file - cp $file ../${tempdir}/etc - chmod a-w ../${tempdir}/etc/$file - fi - done - cd ../${tempdir}/etc - rm -f fns*.el - rm -f DOC* *~ \#*\# *.dvi *.log *.orig *.rej *,v =* core - rm -f TAGS) + for f in *; do + [ -f "$f" ] || continue + case "$f" in + DOC*) continue ;; + esac + ln $f ../${tempdir}/etc + done) -for dir in etc/charsets etc/e etc/gnus etc/nxml etc/tutorials etc/refcards etc/schema ; do +for dir in etc/*/; do + case "$dir" in + etc/images/) continue ;; + esac echo "Making links to \`${dir}'" (cd ${dir} - ln `ls -d *` ../../${tempdir}/${dir} - cd ../../${tempdir}/${dir} - rm -f *~ \#*\# *,v =* core) + ln * ../../${tempdir}/${dir}) done echo "Making links to \`etc/images'" (cd etc/images for f in *; do [ -f "$f" ] || continue - case $f in - (*~|\#*\#|*,v|=*|core) continue ;; - esac ln $f ../../${tempdir}/etc/images done) -for dir in etc/images/custom etc/images/ezimage etc/images/gnus \ - etc/images/gud etc/images/icons etc/images/low-color etc/images/mail \ - etc/images/mpc etc/images/smilies ; do +for dir in etc/images/*/; do echo "Making links to \`${dir}'" (cd ${dir} for f in *; do [ -f "$f" ] || continue - case $f in - (*~|\#*\#|*,v|=*|core) continue ;; - esac ln $f ../../../${tempdir}/${dir} done ) done -for dir in etc/images/tree-widget/default etc/images/tree-widget/folder \ - etc/images/smilies/grayscale etc/images/smilies/medium; do +for dir in etc/images/*/*/; do + case "$dir" in + etc/images/icons/hicolor/) continue ;; + esac echo "Making links to \`${dir}'" (cd ${dir} - ln `ls -d *` ../../../../${tempdir}/${dir} - cd ../../../../${tempdir}/${dir} - rm -f *~ \#*\# *,v =* core) + ln `ls -d *` ../../../../${tempdir}/${dir}) done for dir in etc/images/icons/hicolor/*/apps \ @@ -652,73 +577,37 @@ echo "Making links to \`${dir}'" (cd ${dir} ln `ls -d *` ../../../../../../${tempdir}/${dir} - cd ../../../../../../${tempdir}/${dir} - rm -f *~ \#*\# *,v =* core) + cd ../../../../../../${tempdir}/${dir}) done echo "Making links to \`info'" -# Don't distribute backups or autosaves. (cd info - ln `find . -type f -print` ../${tempdir}/info - #ln [a-zA-Z]* ../${tempdir}/info - cd ../${tempdir}/info - # Avoid an error when expanding the wildcards later. - ln emacs dummy~ ; ln emacs \#dummy\# - rm -f *~ \#*\# core .arch-inventory .gitignore) + ln `find . -type f -print` ../${tempdir}/info) -# FIXME ? Why including *.aux etc? echo "Making links to \`doc/emacs'" (cd doc/emacs - ln *.texi *.aux *.fns *.kys *.vrs ../../${tempdir}/doc/emacs - ln makefile.w32-in ../../${tempdir}/doc/emacs - test -f Makefile.in && ln Makefile.in ../../${tempdir}/doc/emacs - ln ChangeLog ../../${tempdir}/doc/emacs - cd ../../${tempdir}/doc/emacs - rm -f \#*\# =* *~ core emacs-index* *.Z *.z xmail - rm -f emacs.?? termcap.?? gdb.?? *.log *.toc *.dvi *.oaux) + ln *.texi *.in makefile.w32-in ChangeLog* ../../${tempdir}/doc/emacs) echo "Making links to \`doc/misc'" (cd doc/misc - ln *.texi *.aux *.fns *.kys *.vrs ../../${tempdir}/doc/misc - ln makefile.w32-in ../../${tempdir}/doc/misc - ln gnus-news.el ../../${tempdir}/doc/misc - test -f README && ln README ../../${tempdir}/doc/misc - test -f Makefile.in && ln Makefile.in ../../${tempdir}/doc/misc - ln ChangeLog ../../${tempdir}/doc/misc - cp texinfo.tex ../../${tempdir}/doc/misc - cd ../../${tempdir}/doc/misc - rm -f \#*\# =* *~ core emacs-index* *.Z *.z xmail - rm -f emacs.?? termcap.?? gdb.?? *.log *.toc *.dvi *.oaux) + ln *.texi *.tex *.in makefile.w32-in gnus-news.el ChangeLog* ../../${tempdir}/doc/misc) -## FIXME book-spine.texinfo unused? echo "Making links to \`doc/lispref'" (cd doc/lispref - ln *.texi *.aux *.fns *.kys *.vrs ../../${tempdir}/doc/lispref + ln *.texi *.in makefile.w32-in README ChangeLog* ../../${tempdir}/doc/lispref ln *.txt *.el spellfile tindex.pl ../../${tempdir}/doc/lispref - ln makefile.w32-in ../../${tempdir}/doc/lispref - ln book-spine.texinfo two-volume.make ../../${tempdir}/doc/lispref - test -f README && ln README ../../${tempdir}/doc/lispref - test -f Makefile.in && ln Makefile.in ../../${tempdir}/doc/lispref - ln ChangeLog ../../${tempdir}/doc/lispref - cd ../../${tempdir}/doc/lispref - rm -f \#*\# =* *~ core elisp-index* *.Z *.z xmail - rm -f elisp.?? *.log *.toc *.dvi *.oaux) + ln two-volume.make ../../${tempdir}/doc/lispref) echo "Making links to \`doc/lispintro'" (cd doc/lispintro - ln *.texi *.aux *.fns *.kys *.vrs *.eps *.pdf ../../${tempdir}/doc/lispintro - ln makefile.w32-in ../../${tempdir}/doc/lispintro - test -f README && ln README ../../${tempdir}/doc/lispintro - test -f Makefile.in && ln Makefile.in ../../${tempdir}/doc/lispintro - ln ChangeLog ../../${tempdir}/doc/lispintro - cd ../../${tempdir}/doc/lispintro - rm -f \#*\# =* *~ core *.Z *.z xmail - rm -f emacs-lisp-intro.?? *.log *.toc *.dvi *.oaux) + ln *.texi *.in makefile.w32-in *.eps *.pdf ../../${tempdir}/doc/lispintro + ln README ChangeLog* ../../${tempdir}/doc/lispintro + cd ../../${tempdir}/doc/lispintro) echo "Making links to \`doc/man'" (cd doc/man - ln *.1 ../../${tempdir}/doc/man - ln ChangeLog ../../${tempdir}/doc/man) + ln ChangeLog* *.1 ../../${tempdir}/doc/man + cd ../../${tempdir}/doc/man) ### It would be nice if they could all be symlinks to top-level copy, but ### you're not supposed to have any symlinks in distribution tar files. @@ -736,6 +625,10 @@ find ${tempparent} \( -name '*.elc' -o ! -newer ${newer} \) -exec rm -f {} \; fi +## Don't distribute backups, autosaves, etc. +echo "Removing unwanted files" +find ${tempparent} \( -name '*~' -o -name '#*#' -o -name '.*ignore' -o -name '=*' -o -name 'TAGS' \) -exec rm -f {} \; + if [ "${make_tar}" = yes ]; then if [ "${default_gzip}" = "" ]; then echo "Looking for gzip" ------------------------------------------------------------ revno: 101925 committer: Glenn Morris branch nick: trunk timestamp: Mon 2010-10-11 21:01:55 -0700 message: Merge nextstep/FOR-RELEASE outstanding issues into etc/TODO. diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2010-10-12 03:50:06 +0000 +++ etc/ChangeLog 2010-10-12 04:01:55 +0000 @@ -1,5 +1,7 @@ 2010-10-12 Glenn Morris + * TODO: Merge ../nextstep/FOR-RELEASE into this file. + * BABYL: Remove file. 2010-09-21 Eric Ludlam === modified file 'etc/TODO' --- etc/TODO 2010-09-09 02:34:25 +0000 +++ etc/TODO 2010-10-12 04:01:55 +0000 @@ -627,6 +627,35 @@ * Things to be done for specific packages or features +** NeXTstep port + +*** Bugs + +**** (mouse-avoidance-mode 'banish) then minimize Emacs, will pop window back +up on top of all others + +**** free_frame_resources, face colors + +**** Numeric keysetting bug. + +*** Mac-related + +**** Open file:/// URLs. + +**** Put frame autopositioning into C code somewhere -- if loc = same, offset. + +**** Automap ctrl-mouse-1 to mouse-3. + +**** Deal with Finder aliases somehow. + +**** Ctrl-F2 won't pull up menus. + +*** Other / Low Priority: + +**** Better recognition of unicode scripts / Greek / composition. + +**** Undo for color-drag face customization. + ** ImageMagick support *** image-type-header-regexps priorities the jpeg loader over the === modified file 'nextstep/ChangeLog' --- nextstep/ChangeLog 2010-10-12 03:55:21 +0000 +++ nextstep/ChangeLog 2010-10-12 04:01:55 +0000 @@ -1,5 +1,7 @@ 2010-10-12 Glenn Morris + * FOR-RELEASE: Merge into ../etc/TODO. + * DEV-NOTES: Move to ../admin/notes/nextstep. 2010-05-07 Chong Yidong === removed file 'nextstep/FOR-RELEASE' --- nextstep/FOR-RELEASE 2009-12-17 04:16:25 +0000 +++ nextstep/FOR-RELEASE 1970-01-01 00:00:00 +0000 @@ -1,38 +0,0 @@ --*- outline -*- - - -* CURSOR BUGS: - -** (mouse-avoidance-mode 'banish) then minimize Emacs, will pop window back up - on top of all others - - -* OTHER BUGS - -** free_frame_resources, face colors - -** numeric keysetting bug - -** http://debbugs.gnu.org/ns - - -* MAC-RELATED: - -** open file:/// URLs - -** put frame autopositioning into C code somewhere -- if loc = same, offset - -** automap ctrl-mouse-1 to mouse-3 - -** deal with Finder aliases somehow - -** Ctrl-F2 won't pull up menus - - -* OTHER / LOW PRIORITY: - -** better recog of unicode scripts / Greek / composition - -** Exec-dump not working on GNUstep (so slow startup). - -** undo for color-drag face customization ------------------------------------------------------------ revno: 101924 committer: Glenn Morris branch nick: trunk timestamp: Mon 2010-10-11 20:55:21 -0700 message: Move nextstep/DEV-NOTES to admin/notes/nextstep. diff: === modified file 'admin/ChangeLog' --- admin/ChangeLog 2010-10-09 17:59:55 +0000 +++ admin/ChangeLog 2010-10-12 03:55:21 +0000 @@ -1,3 +1,7 @@ +2010-10-12 Glenn Morris + + * notes/nextstep: Move here from ../nextstep/DEV-NOTES. + 2010-10-09 Glenn Morris * admin.el (set-version): Add doc/emacs/emacsver.texi. === renamed file 'nextstep/DEV-NOTES' => 'admin/notes/nextstep' === modified file 'nextstep/ChangeLog' --- nextstep/ChangeLog 2010-05-08 18:47:07 +0000 +++ nextstep/ChangeLog 2010-10-12 03:55:21 +0000 @@ -1,3 +1,7 @@ +2010-10-12 Glenn Morris + + * DEV-NOTES: Move to ../admin/notes/nextstep. + 2010-05-07 Chong Yidong * Version 23.2 released. ------------------------------------------------------------ revno: 101923 committer: Glenn Morris branch nick: trunk timestamp: Mon 2010-10-11 20:52:07 -0700 message: * doc/lispref/book-spine.texinfo: Rename to book-spine.texi. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2010-10-11 01:57:48 +0000 +++ doc/lispref/ChangeLog 2010-10-12 03:52:07 +0000 @@ -1,3 +1,7 @@ +2010-10-12 Glenn Morris + + * book-spine.texinfo: Rename to book-spine.texi. + 2010-10-11 Glenn Morris * Makefile.in (MAKEINFO): Add explicit -I$srcdir. === renamed file 'doc/lispref/book-spine.texinfo' => 'doc/lispref/book-spine.texi' ------------------------------------------------------------ revno: 101922 committer: Glenn Morris branch nick: trunk timestamp: Mon 2010-10-11 20:50:06 -0700 message: * etc/BABYL: Remove file. diff: === removed file 'etc/BABYL' --- etc/BABYL 2009-01-26 02:48:23 +0000 +++ etc/BABYL 1970-01-01 00:00:00 +0000 @@ -1,179 +0,0 @@ -Format of Version 5 Babyl Files: - -(Babyl was the storage format used by Rmail before Emacs 23.1. -Since then it uses mbox format.) - -Warning: - - This was written Tuesday, 12 April 1983 (by Eugene Ciccarelli), -based on looking at a particular Babyl file and recalling various -issues. Therefore it is not guaranteed to be complete, but it is a -start, and I will try to point the reader to various Babyl functions -that will serve to clarify certain format questions. - - Also note that this file will not contain control-characters, -but instead have two-character sequences starting with Uparrow. -Unless otherwise stated, an Uparrow is to be read as -Control-, e.g. ^L is a Control-L. - -Versions: - - First, note that each Babyl file contains in its BABYL OPTIONS -section the version for the Babyl file format. In principle, the -format can be changed in any way as long as we increment the format -version number; then programs can support both old and new formats. - - In practice, version 5 is the only format version used, and the -previous versions have been obsolete for so long that Emacs does not -support them. - - -Overall Babyl File Structure: - - A Babyl file consists of a BABYL OPTIONS section followed by -0 or more message sections. The BABYL OPTIONS section starts -with the line "BABYL OPTIONS:". Message sections start with -Control-Underscore Control-L Newline. Each section ends -with a Control-Underscore. (That is also the first character -of the starter for the next section, if any.) Thus, a three -message Babyl file looks like: - -BABYL OPTIONS: -...the stuff within the Babyl Options section... -^_^L -...the stuff within the 1st message section... -^_^L -...the stuff within the 2nd message section... -^_^L -...the stuff within the last message section... -^_ - - Babyl is tolerant about some whitespace at the end of the -file -- the file may end with the final ^_ or it may have some -whitespace, e.g. a newline, after it. - - -The BABYL OPTIONS Section: - - Each Babyl option is specified on one line (thus restricting -string values these options can currently have). Values are -either numbers or strings. The format is name, colon, and the -value, with whitespace after the colon ignored, e.g.: - -Mail: ~/special-inbox - - Unrecognized options are ignored. - - Here are those options and the kind of values currently expected: - - MAIL Filename, the input mail file for this - Babyl file. You may also use several file names - separated by commas. - Version Number. This should always be 5. - Labels String, list of labels, separated by commas. - - -Message Sections: - - A message section contains one message and information -associated with it. The first line is the "status line", which -contains a bit (0 or 1 character) saying whether the message has -been reformed yet, and a list of the labels attached to this -message. Certain labels, called basic labels, are built into -Babyl in a fundamental way, and are separated in the status line -for convenience of operation. For example, consider the status -line: - -1, answered,, zval, bug, - - The 1 means this message has been reformed. This message is -labeled "answered", "zval", and "bug". The first, "answered", is -a basic label, and the other two are user labels. The basic -labels come before the double-comma in the line. Each label is -preceded by ", " and followed by ",". (The last basic label is -in fact followed by ",,".) If this message had no labels at all, -it would look like: - -1,, - - Or, if it had two basic labels, "answered" and "deleted", it -would look like: - -1, answered, deleted,, zval, bug, - - The & Label Babyl Message knows which are the basic labels. -Currently they are: deleted, unseen, recent, and answered. - - After the status line comes the original header if any. -Following that is the EOOH line, which contains exactly the -characters "*** EOOH ***" (which stands for "end of original -header"). Note that the original header, if a network format -header, includes the trailing newline. And finally, following the -EOOH line is the visible message, header and text. For example, -here is a complete message section, starting with the message -starter, and ending with the terminator: - -^_^L -1,, wordab, eccmacs, -Date: 11 May 1982 21:40-EDT -From: Eugene C. Ciccarelli -Subject: notes -To: ECC at MIT-AI - -*** EOOH *** -Date: Tuesday, 11 May 1982 21:40-EDT -From: Eugene C. Ciccarelli -To: ECC -Re: notes - -Remember to pickup check at cashier's office, and deposit it -soon. Pay rent. -^_ - -;;; Babyl File BNF: - -;;; Overall Babyl file structure: - - -Babyl-File ::= Babyl-Options-Section (Message-Section)* - - -;;; Babyl Options section: - - -Babyl-Options-Section - ::= "BABYL OPTIONS:" newline (Babyl-Option)* Terminator - -Babyl-Option ::= Option-Name ":" Horiz-Whitespace BOptValue newline - -BOptValue ::= Number | 1-Line-String - - - -;;; Message section: - - -Message-Section ::= Message-Starter Status-Line Orig-Header - EOOH-Line Message Terminator - -Message-Starter ::= "^L" newline - -Status-Line ::= Bit-Char "," (Basic-Label)* "," (User-Label)* newline - -Basic-Label ::= Space BLabel-Name "," - -User-Label ::= Space ULabel-Name "," - -EOOH-Line ::= "*** EOOH ***" newline - -Message ::= Visible-Header Message-Text - - -;;; Utilities: - -Terminator ::= "^_" - -Horiz-Whitespace - ::= (Space | Tab)* - -Bit-Char ::= "0" | "1" === modified file 'etc/ChangeLog' --- etc/ChangeLog 2010-09-23 19:00:31 +0000 +++ etc/ChangeLog 2010-10-12 03:50:06 +0000 @@ -1,3 +1,7 @@ +2010-10-12 Glenn Morris + + * BABYL: Remove file. + 2010-09-21 Eric Ludlam * srecode/java.srt: Make NAME be a prompt. ------------------------------------------------------------ revno: 101921 committer: Chong Yidong branch nick: trunk timestamp: Mon 2010-10-11 23:12:33 -0400 message: Placeholder entry for Custom theme changes. diff: === modified file 'etc/NEWS' --- etc/NEWS 2010-10-08 03:17:31 +0000 +++ etc/NEWS 2010-10-12 03:12:33 +0000 @@ -195,6 +195,10 @@ `package-enable-at-startup' to nil. To change which packages are loaded, customize `package-load-list'. +** Custom Themes + +*** `M-x customize-themes' lists Custom themes which can be enabled. + ** The user option `remote-file-name-inhibit-cache' controls whether the remote file-name cache is used for read access. ------------------------------------------------------------ revno: 101920 committer: Chong Yidong branch nick: trunk timestamp: Mon 2010-10-11 23:10:21 -0400 message: New interface for choosing Custom themes. * lisp/cus-edit.el (custom--initialize-widget-variables): New function. (Custom-mode): Use it. * lisp/cus-face.el (custom-theme-set-faces): Remove dead code. Obey custom--inhibit-theme-enable. * lisp/cus-theme.el (describe-theme, customize-themes) (custom-theme-save): New commands. (custom-new-theme-mode-map): Bind C-x C-s. (custom-new-theme-mode): Use custom--initialize-widget-variables. (customize-create-theme): New optional arg THEME. (custom-theme-revert): Use it. (custom-theme-visit-theme): Remove dead code. (custom-theme-merge-theme): Use custom-available-themes. (custom-theme-write): Make interactive. (custom-theme-write): Use custom-theme-name-valid-p. (describe-theme-1, custom-theme-choose-revert) (custom-theme-checkbox-toggle, custom-theme-selections-toggle): New funs. (custom-theme-allow-multiple-selections): New option. (custom-theme-choose-mode): New major mode. * lisp/custom.el (custom-theme-set-variables): Remove dead code. Obey custom--inhibit-theme-enable. (custom--inhibit-theme-enable): New var. (provide-theme): Obey it. (load-theme): Replace load with manual read/eval, in order to check for correctness. Use custom-theme-name-valid-p. (custom-theme-name-valid-p): New function. (custom-available-themes): Use it. * lisp/help-mode.el (help-theme-def, help-theme-edit): New buttons. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-10-12 02:31:16 +0000 +++ lisp/ChangeLog 2010-10-12 03:10:21 +0000 @@ -1,3 +1,38 @@ +2010-10-12 Chong Yidong + + * cus-theme.el (describe-theme, customize-themes) + (custom-theme-save): New commands. + (custom-new-theme-mode-map): Bind C-x C-s. + (custom-new-theme-mode): Use custom--initialize-widget-variables. + (customize-create-theme): New optional arg THEME. + (custom-theme-revert): Use it. + (custom-theme-visit-theme): Remove dead code. + (custom-theme-merge-theme): Use custom-available-themes. + (custom-theme-write): Make interactive. + (custom-theme-write): Use custom-theme-name-valid-p. + (describe-theme-1, custom-theme-choose-revert) + (custom-theme-checkbox-toggle, custom-theme-selections-toggle): + New funs. + (custom-theme-allow-multiple-selections): New option. + (custom-theme-choose-mode): New major mode. + + * custom.el (custom-theme-set-variables): Remove dead code. Obey + custom--inhibit-theme-enable. + (custom--inhibit-theme-enable): New var. + (provide-theme): Obey it. + (load-theme): Replace load with manual read/eval, in order to + check for correctness. Use custom-theme-name-valid-p. + (custom-theme-name-valid-p): New function. + (custom-available-themes): Use it. + + * cus-edit.el (custom--initialize-widget-variables): New function. + (Custom-mode): Use it. + + * cus-face.el (custom-theme-set-faces): Remove dead code. Obey + custom--inhibit-theme-enable. + + * help-mode.el (help-theme-def, help-theme-edit): New buttons. + 2010-10-12 Juanma Barranquero * net/telnet.el (telnet-mode-map): Fix previous change (bug#7193). === modified file 'lisp/cus-edit.el' --- lisp/cus-edit.el 2010-10-11 04:49:59 +0000 +++ lisp/cus-edit.el 2010-10-12 03:10:21 +0000 @@ -439,9 +439,6 @@ ;;; Custom mode keymaps (defvar custom-mode-map - ;; This keymap should be dense, but a dense keymap would prevent inheriting - ;; "\r" bindings from the parent map. - ;; Actually, this misfeature of dense keymaps was fixed on 2001-11-26. (let ((map (make-keymap))) (set-keymap-parent map widget-keymap) (define-key map [remap self-insert-command] 'Custom-no-edit) @@ -4706,6 +4703,25 @@ (if (eq (widget-get (widget-get widget :parent) :custom-state) 'modified) (message "To install your edits, invoke [State] and choose the Set operation"))) +(defun custom--initialize-widget-variables () + (set (make-local-variable 'widget-documentation-face) 'custom-documentation) + (set (make-local-variable 'widget-button-face) custom-button) + (set (make-local-variable 'widget-button-pressed-face) custom-button-pressed) + (set (make-local-variable 'widget-mouse-face) custom-button-mouse) + ;; We need this because of the "More" button on docstrings. + ;; Otherwise clicking on "More" can push point offscreen, which + ;; causes the window to recenter on point, which pushes the + ;; newly-revealed docstring offscreen; which is annoying. -- cyd. + (set (make-local-variable 'widget-button-click-moves-point) t) + ;; When possible, use relief for buttons, not bracketing. This test + ;; may not be optimal. + (when custom-raised-buttons + (set (make-local-variable 'widget-push-button-prefix) "") + (set (make-local-variable 'widget-push-button-suffix) "") + (set (make-local-variable 'widget-link-prefix) "") + (set (make-local-variable 'widget-link-suffix) "")) + (setq show-trailing-whitespace nil)) + (define-derived-mode Custom-mode nil "Custom" "Major mode for editing customization buffers. @@ -4743,28 +4759,7 @@ (setq custom-tool-bar-map map)))) (make-local-variable 'custom-options) (make-local-variable 'custom-local-buffer) - (make-local-variable 'widget-documentation-face) - (setq widget-documentation-face 'custom-documentation) - (make-local-variable 'widget-button-face) - (setq widget-button-face custom-button) - (setq show-trailing-whitespace nil) - - ;; We need this because of the "More" button on docstrings. - ;; Otherwise clicking on "More" can push point offscreen, which - ;; causes the window to recenter on point, which pushes the - ;; newly-revealed docstring offscreen; which is annoying. -- cyd. - (set (make-local-variable 'widget-button-click-moves-point) t) - - (set (make-local-variable 'widget-button-pressed-face) custom-button-pressed) - (set (make-local-variable 'widget-mouse-face) custom-button-mouse) - - ;; When possible, use relief for buttons, not bracketing. This test - ;; may not be optimal. - (when custom-raised-buttons - (set (make-local-variable 'widget-push-button-prefix) "") - (set (make-local-variable 'widget-push-button-suffix) "") - (set (make-local-variable 'widget-link-prefix) "") - (set (make-local-variable 'widget-link-suffix) "")) + (custom--initialize-widget-variables) (add-hook 'widget-edit-functions 'custom-state-buffer-message nil t)) (put 'Custom-mode 'mode-class 'special) === modified file 'lisp/cus-face.el' --- lisp/cus-face.el 2010-08-29 16:17:13 +0000 +++ lisp/cus-face.el 2010-10-12 03:10:21 +0000 @@ -319,42 +319,32 @@ FACE's list property `theme-face' \(using `custom-push-theme')." (custom-check-theme theme) (let ((immediate (get theme 'theme-immediate))) - (while args - (let ((entry (car args))) - (if (listp entry) - (let ((face (nth 0 entry)) - (spec (nth 1 entry)) - (now (nth 2 entry)) - (comment (nth 3 entry)) - oldspec) - ;; If FACE is actually an alias, customize the face it - ;; is aliased to. - (if (get face 'face-alias) - (setq face (get face 'face-alias))) - - (setq oldspec (get face 'theme-face)) - (when (not (and oldspec (eq 'user (caar oldspec)))) - (put face 'saved-face spec) - (put face 'saved-face-comment comment)) - - (custom-push-theme 'theme-face face theme 'set spec) - (when (or now immediate) - (put face 'force-face (if now 'rogue 'immediate))) - (when (or now immediate (facep face)) - (unless (facep face) - (make-empty-face face)) - (put face 'face-comment comment) - (put face 'face-override-spec nil) - (face-spec-set face spec t)) - (setq args (cdr args))) - ;; Old format, a plist of FACE SPEC pairs. - (let ((face (nth 0 args)) - (spec (nth 1 args))) - (if (get face 'face-alias) - (setq face (get face 'face-alias))) - (put face 'saved-face spec) - (custom-push-theme 'theme-face face theme 'set spec)) - (setq args (cdr (cdr args)))))))) + (dolist (entry args) + (unless (listp entry) + (error "Incompatible Custom theme spec")) + (let ((face (car entry)) + (spec (nth 1 entry))) + ;; If FACE is actually an alias, customize the face it + ;; is aliased to. + (if (get face 'face-alias) + (setq face (get face 'face-alias))) + (custom-push-theme 'theme-face face theme 'set spec) + (unless custom--inhibit-theme-enable + ;; Now set the face spec. + (let ((now (nth 2 entry)) + (comment (nth 3 entry)) + (oldspec (get face 'theme-face))) + (when (not (and oldspec (eq 'user (caar oldspec)))) + (put face 'saved-face spec) + (put face 'saved-face-comment comment)) + (when (or now immediate) + (put face 'force-face (if now 'rogue 'immediate))) + (when (or now immediate (facep face)) + (unless (facep face) + (make-empty-face face)) + (put face 'face-comment comment) + (put face 'face-override-spec nil) + (face-spec-set face spec t)))))))) ;; XEmacs compability function. In XEmacs, when you reset a Custom ;; Theme, you have to specify the theme to reset it to. We just apply === modified file 'lisp/cus-theme.el' --- lisp/cus-theme.el 2010-10-09 21:54:20 +0000 +++ lisp/cus-theme.el 2010-10-12 03:10:21 +0000 @@ -35,27 +35,18 @@ (let ((map (make-keymap))) (set-keymap-parent map widget-keymap) (suppress-keymap map) + (define-key map "\C-x\C-s" 'custom-theme-write) (define-key map "n" 'widget-forward) (define-key map "p" 'widget-backward) map) "Keymap for `custom-new-theme-mode'.") -(define-derived-mode custom-new-theme-mode nil "New-Theme" - "Major mode for the buffer created by `customize-create-theme'. -Do not call this mode function yourself. It is only meant for internal -use by `customize-create-theme'." +(define-derived-mode custom-new-theme-mode nil "Cus-Theme" + "Major mode for editing Custom themes. +Do not call this mode function yourself. It is meant for internal use." (use-local-map custom-new-theme-mode-map) - (define-key custom-new-theme-mode-map [mouse-1] 'widget-move-and-invoke) - (set (make-local-variable 'widget-documentation-face) 'custom-documentation) - (set (make-local-variable 'widget-button-face) custom-button) - (set (make-local-variable 'widget-button-pressed-face) custom-button-pressed) - (set (make-local-variable 'widget-mouse-face) custom-button-mouse) - (set (make-local-variable 'revert-buffer-function) 'custom-theme-revert) - (when custom-raised-buttons - (set (make-local-variable 'widget-push-button-prefix) "") - (set (make-local-variable 'widget-push-button-suffix) "") - (set (make-local-variable 'widget-link-prefix) "") - (set (make-local-variable 'widget-link-suffix) ""))) + (custom--initialize-widget-variables) + (set (make-local-variable 'revert-buffer-function) 'custom-theme-revert)) (put 'custom-new-theme-mode 'mode-class 'special) (defvar custom-theme-name nil) @@ -82,17 +73,21 @@ query-replace) "Faces listed by default in the *Custom Theme* buffer.") +(defvar custom-theme--save-name) + ;;;###autoload -(defun customize-create-theme (&optional buffer) - "Create a custom theme. +(defun customize-create-theme (&optional theme buffer) + "Create or edit a custom theme. +THEME, if non-nil, should be an existing theme to edit. BUFFER, if non-nil, should be a buffer to use." (interactive) - (switch-to-buffer (or buffer (generate-new-buffer "*Custom Theme*"))) + (switch-to-buffer (get-buffer-create (or buffer "*Custom Theme*"))) ;; Save current faces (let ((inhibit-read-only t)) (erase-buffer)) (custom-new-theme-mode) (make-local-variable 'custom-theme-name) + (set (make-local-variable 'custom-theme--save-name) theme) (set (make-local-variable 'custom-theme-faces) nil) (set (make-local-variable 'custom-theme-variables) nil) (set (make-local-variable 'custom-theme-description) "") @@ -116,7 +111,8 @@ (widget-insert "\n\nTheme name : ") (setq custom-theme-name - (widget-create 'editable-field)) + (widget-create 'editable-field + :value (if theme (symbol-name theme) ""))) (widget-insert "Description: ") (setq custom-theme-description (widget-create 'text @@ -164,14 +160,15 @@ :action (lambda (widget &optional event) (call-interactively 'custom-theme-add-variable))) (widget-insert ?\n) + (if theme + (custom-theme-merge-theme theme)) (widget-setup) (goto-char (point-min)) (message "")) (defun custom-theme-revert (ignore-auto noconfirm) (when (or noconfirm (y-or-n-p "Discard current changes? ")) - (erase-buffer) - (customize-create-theme (current-buffer)))) + (customize-create-theme custom-theme--save-name (current-buffer)))) ;;; Theme variables @@ -318,10 +315,8 @@ (defun custom-theme-visit-theme () (interactive) - (when (or (and (null custom-theme-variables) - (null custom-theme-faces)) - (and (y-or-n-p "Discard current changes? ") - (progn (revert-buffer) t))) + (when (and (y-or-n-p "Discard current changes? ") + (progn (revert-buffer) t)) (let ((theme (call-interactively 'custom-theme-merge-theme))) (unless (eq theme 'user) (widget-value-set custom-theme-name (symbol-name theme))) @@ -331,9 +326,14 @@ (widget-setup)))) (defun custom-theme-merge-theme (theme) - (interactive "SCustom theme name: ") - (unless (eq theme 'user) - (load-theme theme)) + (interactive + (list + (intern (completing-read "Merge custom theme: " + (mapcar 'symbol-name + (custom-available-themes)))))) + (unless (custom-theme-name-valid-p theme) + (error "Invalid theme name `%s'" theme)) + (load-theme theme) (let ((settings (get theme 'theme-settings))) (dolist (setting settings) (if (eq (car setting) 'theme-value) @@ -343,6 +343,7 @@ theme) (defun custom-theme-write (&rest ignore) + (interactive) (let* ((name (widget-value custom-theme-name)) (doc (widget-value custom-theme-description)) (vars custom-theme-variables) @@ -351,12 +352,8 @@ (when (string-equal name "") (setq name (read-from-minibuffer "Theme name: " (user-login-name))) (widget-value-set custom-theme-name name)) - (cond ((or (string-equal name "") - (string-equal name "user") - (string-equal name "changed")) - (error "Custom themes cannot be named `%s'" name)) - ((string-match " " name) - (error "Custom theme names should not contain spaces"))) + (unless (custom-theme-name-valid-p (intern name)) + (error "Custom themes cannot be named `%s'" name)) (setq filename (expand-file-name (concat name "-theme.el") custom-theme-directory)) @@ -384,7 +381,8 @@ (dolist (face custom-theme-faces) (when (widget-get (cdr face) :children) (widget-put (cdr face) :custom-state 'saved) - (custom-redraw-magic (cdr face)))))) + (custom-redraw-magic (cdr face)))) + (message "Theme written to %s" filename))) (defun custom-theme-write-variables (theme vars) "Write a `custom-theme-set-variables' command for THEME. @@ -456,5 +454,196 @@ (unless (looking-at "\n") (princ "\n"))))) + +;;; Describing Custom themes. + +;;;###autoload +(defun describe-theme (theme) + "Display a description of the Custom theme THEME (a symbol)." + (interactive + (list + (intern (completing-read "Describe custom theme: " + (mapcar 'symbol-name + (custom-available-themes)))))) + (unless (custom-theme-name-valid-p theme) + (error "Invalid theme name `%s'" theme)) + (help-setup-xref (list 'describe-theme theme) + (called-interactively-p 'interactive)) + (with-help-window (help-buffer) + (with-current-buffer standard-output + (describe-theme-1 theme)))) + +(defun describe-theme-1 (theme) + (prin1 theme) + (princ " is a custom theme") + (let ((fn (locate-file (concat (symbol-name theme) "-theme.el") + (cons custom-theme-directory load-path) + '("" "c")))) + (when fn + (princ " in `") + (help-insert-xref-button (file-name-nondirectory fn) + 'help-theme-def fn) + (princ "'")) + (princ ".\n")) + (if (not (memq theme custom-known-themes)) + (princ "It is not loaded.") + (if (custom-theme-enabled-p theme) + (princ "It is loaded and enabled.\n") + (princ "It is loaded but disabled.\n")) + (princ "\nDocumentation:\n") + (princ (or (get theme 'theme-documentation) + "No documentation available."))) + (princ "\n\nYou can ") + (help-insert-xref-button "customize" 'help-theme-edit theme) + (princ " this theme.")) + + +;;; Theme chooser + +(defvar custom--listed-themes) + +(defcustom custom-theme-allow-multiple-selections nil + "Whether to allow multi-selections in the *Custom Themes* buffer." + :type 'boolean + :group 'custom-buffer) + +(defvar custom-theme-choose-mode-map + (let ((map (make-keymap))) + (set-keymap-parent map widget-keymap) + (suppress-keymap map) + (define-key map "\C-x\C-s" 'custom-theme-save) + (define-key map "n" 'widget-forward) + (define-key map "p" 'widget-backward) + (define-key map "?" 'custom-describe-theme) + map) + "Keymap for `custom-theme-choose-mode'.") + +(define-derived-mode custom-theme-choose-mode nil "Cus-Theme" + "Major mode for selecting Custom themes. +Do not call this mode function yourself. It is meant for internal use." + (use-local-map custom-theme-choose-mode-map) + (custom--initialize-widget-variables) + (set (make-local-variable 'revert-buffer-function) + (lambda (ignore-auto noconfirm) + (when (or noconfirm (y-or-n-p "Discard current choices? ")) + (customize-themes (current-buffer)))))) +(put 'custom-theme-choose-mode 'mode-class 'special) + +;;;###autoload +(defun customize-themes (&optional buffer) + "Display a selectable list of Custom themes. +When called from Lisp, BUFFER should be the buffer to use; if +omitted, a buffer named *Custom Themes* is used." + (interactive) + (pop-to-buffer (get-buffer-create (or buffer "*Custom Themes*"))) + (let ((inhibit-read-only t)) + (erase-buffer)) + (custom-theme-choose-mode) + (set (make-local-variable 'custom--listed-themes) nil) + (make-local-variable 'custom-theme-allow-multiple-selections) + (and (null custom-theme-allow-multiple-selections) + (> (length custom-enabled-themes) 1) + (setq custom-theme-allow-multiple-selections t)) + + (widget-insert + (substitute-command-keys + "Type RET or click to enable/disable listed custom themes. +Type \\[custom-describe-theme] to describe the theme at point. +Theme files are named *-theme.el in `")) + (when (stringp custom-theme-directory) + (widget-create 'link :value custom-theme-directory + :button-face 'custom-link + :mouse-face 'highlight + :pressed-face 'highlight + :help-echo "Describe `custom-theme-directory'." + :keymap custom-mode-link-map + :follow-link 'mouse-face + :action (lambda (widget &rest ignore) + (describe-variable 'custom-theme-directory))) + (widget-insert "' or `")) + (widget-create 'link :value "load-path" + :button-face 'custom-link + :mouse-face 'highlight + :pressed-face 'highlight + :help-echo "Describe `load-path'." + :keymap custom-mode-link-map + :follow-link 'mouse-face + :action (lambda (widget &rest ignore) + (describe-variable 'load-path))) + (widget-insert "'.\n\n") + (widget-create 'push-button + :tag " Save Theme Settings " + :help-echo "Save the selected themes for future sessions." + :action 'custom-theme-save) + (widget-insert ?\n) + (widget-create 'checkbox + :value custom-theme-allow-multiple-selections + :action 'custom-theme-selections-toggle) + (widget-insert (propertize " Allow more than one theme at a time" + 'face '(variable-pitch (:height 0.9)))) + + (widget-insert "\n\nAvailable Custom Themes:\n") + (let (widget) + (dolist (theme (custom-available-themes)) + (setq widget (widget-create 'checkbox + :value (custom-theme-enabled-p theme) + :theme-name theme + :action 'custom-theme-checkbox-toggle)) + (push (cons theme widget) custom--listed-themes) + (widget-create-child-and-convert widget 'push-button + :button-face-get 'ignore + :mouse-face-get 'ignore + :value (format " %s" theme) + :action 'widget-parent-action) + (widget-insert ?\n))) + (goto-char (point-min)) + (widget-setup)) + +(defun custom-theme-checkbox-toggle (widget &optional event) + (let ((this-theme (widget-get widget :theme-name))) + (if (widget-value widget) + ;; Disable the theme. + (disable-theme this-theme) + ;; Enable the theme. + (unless custom-theme-allow-multiple-selections + ;; If only one theme is allowed, disable all other themes and + ;; uncheck their boxes. + (dolist (theme custom-enabled-themes) + (and (not (eq theme this-theme)) + (assq theme custom--listed-themes) + (disable-theme theme))) + (dolist (theme custom--listed-themes) + (unless (eq (car theme) this-theme) + (widget-value-set (cdr theme) nil) + (widget-apply (cdr theme) :notify (cdr theme) event)))) + (load-theme this-theme))) + ;; Mark `custom-enabled-themes' as "set for current session". + (put 'custom-enabled-themes 'customized-value + (list (custom-quote custom-enabled-themes))) + ;; Check/uncheck the widget. + (widget-toggle-action widget event)) + +(defun custom-describe-theme () + "Describe the Custom theme on the current line." + (interactive) + (let ((widget (widget-at (line-beginning-position)))) + (and widget + (describe-theme (widget-get widget :theme-name))))) + +(defun custom-theme-save (&rest ignore) + (interactive) + (customize-save-variable 'custom-enabled-themes custom-enabled-themes) + (message "Custom themes saved for future sessions.")) + +(defun custom-theme-selections-toggle (widget &optional event) + (when (widget-value widget) + ;; Deactivate multiple-selections. + (if (> (length (delq nil (mapcar (lambda (x) (widget-value (cdr x))) + custom--listed-themes))) + 1) + (error "More than one theme is currently selected"))) + (widget-toggle-action widget event) + (setq custom-theme-allow-multiple-selections (widget-value widget))) + ;; arch-tag: cd6919bc-63af-410e-bae2-b6702e762344 ;;; cus-theme.el ends here === modified file 'lisp/custom.el' --- lisp/custom.el 2010-10-11 04:49:59 +0000 +++ lisp/custom.el 2010-10-12 03:10:21 +0000 @@ -959,48 +959,39 @@ (t (or (nth 3 a2) (eq (get sym2 'custom-set) 'custom-set-minor-mode)))))))) - (while args - (let ((entry (car args))) - (if (listp entry) - (let* ((symbol (indirect-variable (nth 0 entry))) - (value (nth 1 entry)) - (now (nth 2 entry)) - (requests (nth 3 entry)) - (comment (nth 4 entry)) - set) - (when requests - (put symbol 'custom-requests requests) - (mapc 'require requests)) - (setq set (or (get symbol 'custom-set) 'custom-set-default)) - (put symbol 'saved-value (list value)) - (put symbol 'saved-variable-comment comment) - (custom-push-theme 'theme-value symbol theme 'set value) - ;; Allow for errors in the case where the setter has - ;; changed between versions, say, but let the user know. - (condition-case data - (cond (now - ;; Rogue variable, set it now. - (put symbol 'force-value t) - (funcall set symbol (eval value))) - ((default-boundp symbol) - ;; Something already set this, overwrite it. - (funcall set symbol (eval value)))) - (error - (message "Error setting %s: %s" symbol data))) - (setq args (cdr args)) - (and (or now (default-boundp symbol)) - (put symbol 'variable-comment comment))) - ;; I believe this is dead-code, because the `sort' code above would - ;; have burped before we could get here. --Stef - ;; Old format, a plist of SYMBOL VALUE pairs. - (message "Warning: old format `custom-set-variables'") - (ding) - (sit-for 2) - (let ((symbol (indirect-variable (nth 0 args))) - (value (nth 1 args))) + + (dolist (entry args) + (unless (listp entry) + (error "Incompatible Custom theme spec")) + (let* ((symbol (indirect-variable (nth 0 entry))) + (value (nth 1 entry))) + (custom-push-theme 'theme-value symbol theme 'set value) + (unless custom--inhibit-theme-enable + ;; Now set the variable. + (let* ((now (nth 2 entry)) + (requests (nth 3 entry)) + (comment (nth 4 entry)) + set) + (when requests + (put symbol 'custom-requests requests) + (mapc 'require requests)) + (setq set (or (get symbol 'custom-set) 'custom-set-default)) (put symbol 'saved-value (list value)) - (custom-push-theme 'theme-value symbol theme 'set value)) - (setq args (cdr (cdr args))))))) + (put symbol 'saved-variable-comment comment) + ;; Allow for errors in the case where the setter has + ;; changed between versions, say, but let the user know. + (condition-case data + (cond (now + ;; Rogue variable, set it now. + (put symbol 'force-value t) + (funcall set symbol (eval value))) + ((default-boundp symbol) + ;; Something already set this, overwrite it. + (funcall set symbol (eval value)))) + (error + (message "Error setting %s: %s" symbol data))) + (and (or now (default-boundp symbol)) + (put symbol 'variable-comment comment))))))) ;;; Defining themes. @@ -1072,6 +1063,12 @@ :group 'customize :version "22.1") +(defvar custom--inhibit-theme-enable nil + "If non-nil, loading a theme does not enable it. +This internal variable is set by `load-theme' when its NO-ENABLE +argument is non-nil, and it affects `custom-theme-set-variables', +`custom-theme-set-faces', and `provide-theme'." ) + (defun provide-theme (theme) "Indicate that this file provides THEME. This calls `provide' to provide the feature name stored in THEME's @@ -1081,35 +1078,83 @@ (error "Custom theme cannot be named %S" theme)) (custom-check-theme theme) (provide (get theme 'theme-feature)) - ;; Loading a theme also enables it. - (push theme custom-enabled-themes) - ;; `user' must always be the highest-precedence enabled theme. - ;; Make that remain true. (This has the effect of making user settings - ;; override the ones just loaded, too.) - (let ((custom-enabling-themes t)) - (enable-theme 'user))) + (unless custom--inhibit-theme-enable + ;; Loading a theme also enables it. + (push theme custom-enabled-themes) + ;; `user' must always be the highest-precedence enabled theme. + ;; Make that remain true. (This has the effect of making user settings + ;; override the ones just loaded, too.) + (let ((custom-enabling-themes t)) + (enable-theme 'user)))) -(defun load-theme (theme) +(defun load-theme (theme &optional no-enable) "Load a theme's settings from its file. -This also enables the theme; use `disable-theme' to disable it." +Normally, this also enables the theme; use `disable-theme' to +disable it. If optional arg NO-ENABLE is non-nil, don't enable +the theme." ;; Note we do no check for validity of the theme here. ;; This allows to pull in themes by a file-name convention (interactive (list (intern (completing-read "Load custom theme: " - (mapcar 'symbol-name (custom-available-themes)))))) + (mapcar 'symbol-name + (custom-available-themes)))))) + (unless (custom-theme-name-valid-p theme) + (error "Invalid theme name `%s'" theme)) ;; If reloading, clear out the old theme settings. (when (custom-theme-p theme) (disable-theme theme) (put theme 'theme-settings nil) (put theme 'theme-feature nil) (put theme 'theme-documentation nil)) - (let ((load-path (if (file-directory-p custom-theme-directory) - (cons custom-theme-directory load-path) - load-path))) - (load (symbol-name (custom-make-theme-feature theme))))) + (let ((fn (locate-file (concat (symbol-name theme) "-theme.el") + (cons custom-theme-directory load-path) + '("" "c")))) + (unless fn + (error "Unable to find theme file for `%s'." theme)) + ;; Instead of simply loading the theme file, read it manually. + (with-temp-buffer + (insert-file-contents fn) + (let ((custom--inhibit-theme-enable no-enable) + sexp scar) + (while (setq sexp (let ((read-circle nil)) + (condition-case nil + (read (current-buffer)) + (end-of-file nil)))) + ;; Perform some checks on each sexp before evaluating it. + (cond + ((not (listp sexp))) + ((eq (setq scar (car sexp)) 'deftheme) + (unless (eq (cadr sexp) theme) + (error "Incorrect theme name in `deftheme'")) + (and (symbolp (nth 1 sexp)) + (stringp (nth 2 sexp)) + (eval (list scar (nth 1 sexp) (nth 2 sexp))))) + ((or (eq scar 'custom-theme-set-variables) + (eq scar 'custom-theme-set-faces)) + (unless (equal (nth 1 sexp) `(quote ,theme)) + (error "Incorrect theme name in theme settings")) + (dolist (entry (cddr sexp)) + (unless (eq (car-safe entry) 'quote) + (error "Unsafe expression in theme settings"))) + (eval sexp)) + ((and (eq scar 'provide-theme) + (equal (cadr sexp) `(quote ,theme)) + (= (length sexp) 2)) + (eval sexp)))))))) + +(defun custom-theme-name-valid-p (name) + "Return t if NAME is a valid name for a Custom theme, nil otherwise. +NAME should be a symbol." + (and (symbolp name) + name + (not (or (zerop (length (symbol-name name))) + (eq name 'cus) + (eq name 'user) + (eq name 'changed))))) (defun custom-available-themes () + "Return a list of available Custom themes (symbols)." (let* ((load-path (if (file-directory-p custom-theme-directory) (cons custom-theme-directory load-path) load-path)) @@ -1120,7 +1165,7 @@ (setq file (file-name-nondirectory file)) (and (string-match "\\`\\(.+\\)-theme.el\\'" file) (setq sym (intern (match-string 1 file))) - (not (memq sym '(cus user changed color))) + (custom-theme-name-valid-p sym) (push sym themes)))) (delete-dups themes))) === modified file 'lisp/help-mode.el' --- lisp/help-mode.el 2010-08-29 16:17:13 +0000 +++ lisp/help-mode.el 2010-10-12 03:10:21 +0000 @@ -255,6 +255,15 @@ 'help-function (lambda (file) (dired file)) 'help-echo (purecopy "mouse-2, RET: visit package directory")) +(define-button-type 'help-theme-def + :supertype 'help-xref + 'help-function 'find-file + 'help-echo (purecopy "mouse-2, RET: visit theme file")) + +(define-button-type 'help-theme-edit + :supertype 'help-xref + 'help-function 'customize-create-theme + 'help-echo (purecopy "mouse-2, RET: edit this theme file")) ;;;###autoload (defun help-mode () ------------------------------------------------------------ revno: 101919 committer: Juanma Barranquero branch nick: trunk timestamp: Tue 2010-10-12 04:45:24 +0200 message: lisp/net/telnet.el: "Fix" commented code. diff: === modified file 'lisp/net/telnet.el' --- lisp/net/telnet.el 2010-10-12 01:48:58 +0000 +++ lisp/net/telnet.el 2010-10-12 02:45:24 +0000 @@ -64,7 +64,7 @@ (defvar telnet-mode-map (let ((map (nconc (make-sparse-keymap) comint-mode-map))) (define-key map "\C-m" 'telnet-send-input) - ;; (define-key telnet-mode-map "\C-j" 'telnet-send-input) + ;; (define-key map "\C-j" 'telnet-send-input) (define-key map "\C-c\C-q" 'send-process-next-char) (define-key map "\C-c\C-c" 'telnet-interrupt-subjob) (define-key map "\C-c\C-z" 'telnet-c-z) ------------------------------------------------------------ revno: 101918 committer: Juanma Barranquero branch nick: trunk timestamp: Tue 2010-10-12 04:31:16 +0200 message: lisp/cedet/ChangeLog: Move entries for emacs-lisp/ files back to lisp/ChangeLog. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-10-12 01:51:31 +0000 +++ lisp/ChangeLog 2010-10-12 02:31:16 +0000 @@ -12059,6 +12059,12 @@ (tar-header-block-tokenize): Decode the username and groupname. (tar-chown-entry, tar-chgrp-entry): Encode the names (bug#4730). +2009-10-17 Eric Ludlam + + * emacs-lisp/eieio-base.el (eieio-persistent-save): If buffer + contains multibyte characters, choose first applicable coding + system automatically. + 2009-10-17 Stefan Monnier * international/mule-cmds.el (select-safe-coding-system): If the file @@ -13005,6 +13011,10 @@ * term/w32-win.el (setup-default-fontset, set-fontset-font): Remove unused declarations. +2009-09-30 Eric Ludlam + + * emacs-lisp/eieio.el (boolean-p): Delete. + 2009-09-30 Glenn Morris * emacs-lisp/authors.el (authors-ignored-files): Add "js2-mode.el". @@ -13094,6 +13104,17 @@ * net/tramp-imap.el: New package. +2009-09-28 Eric Ludlam + + * emacs-lisp/chart.el: + * emacs-lisp/eieio-base.el: + * emacs-lisp/eieio-comp.el: + * emacs-lisp/eieio-custom.el: + * emacs-lisp/eieio-datadebug.el: + * emacs-lisp/eieio-opt.el: + * emacs-lisp/eieio-speedbar.el: + * emacs-lisp/eieio.el: New files. + 2009-09-27 Vinicius Jose Latorre * whitespace.el (whitespace-trailing-regexp) === modified file 'lisp/cedet/ChangeLog' --- lisp/cedet/ChangeLog 2010-10-08 10:14:47 +0000 +++ lisp/cedet/ChangeLog 2010-10-12 02:31:16 +0000 @@ -1082,10 +1082,6 @@ * semantic/idle.el (semantic-idle-tag-highlight): Use semantic-idle-summary-highlight-face as the highlighting. - * emacs-lisp/eieio-base.el (eieio-persistent-save): If buffer - contains multibyte characters, choose first applicable coding - system automatically. - * ede/project-am.el (project-run-target): New method. (project-run-target): New method. @@ -1413,10 +1409,6 @@ * srecode/expandproto.el: Fix provide statement. -2009-09-30 Eric Ludlam - - * emacs-lisp/eieio.el (boolean-p): Delete. - 2009-09-30 Sascha Wilde * ede/srecode.el: Fix provide statement. @@ -1462,15 +1454,6 @@ 2009-09-28 Eric Ludlam - * emacs-lisp/chart.el: - * emacs-lisp/eieio-base.el: - * emacs-lisp/eieio-comp.el: - * emacs-lisp/eieio-custom.el: - * emacs-lisp/eieio-datadebug.el: - * emacs-lisp/eieio-opt.el: - * emacs-lisp/eieio-speedbar.el: - * emacs-lisp/eieio.el: New files. - * cedet-cscope.el: * cedet-files.el: * cedet-global.el: ------------------------------------------------------------ revno: 101917 committer: Juanma Barranquero branch nick: trunk timestamp: Tue 2010-10-12 03:51:31 +0200 message: lisp/ChangeLog: Add missing bug reference. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-10-12 01:48:58 +0000 +++ lisp/ChangeLog 2010-10-12 01:51:31 +0000 @@ -1,6 +1,6 @@ 2010-10-12 Juanma Barranquero - * net/telnet.el (telnet-mode-map): Fix previous change. + * net/telnet.el (telnet-mode-map): Fix previous change (bug#7193). 2010-10-12 Jan Djärv ------------------------------------------------------------ revno: 101916 committer: Juanma Barranquero branch nick: trunk timestamp: Tue 2010-10-12 03:48:58 +0200 message: lisp/net/telnet.el (telnet-mode-map): Fix previous change. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-10-11 23:57:49 +0000 +++ lisp/ChangeLog 2010-10-12 01:48:58 +0000 @@ -1,3 +1,7 @@ +2010-10-12 Juanma Barranquero + + * net/telnet.el (telnet-mode-map): Fix previous change. + 2010-10-12 Jan Djärv * term/ns-win.el (ns-right-alternate-modifier): New defvar. === modified file 'lisp/net/telnet.el' --- lisp/net/telnet.el 2010-10-10 23:12:30 +0000 +++ lisp/net/telnet.el 2010-10-12 01:48:58 +0000 @@ -63,7 +63,7 @@ (defvar telnet-new-line "\r") (defvar telnet-mode-map (let ((map (nconc (make-sparse-keymap) comint-mode-map))) - (define-key telnet-mode-map "\C-m" 'telnet-send-input) + (define-key map "\C-m" 'telnet-send-input) ;; (define-key telnet-mode-map "\C-j" 'telnet-send-input) (define-key map "\C-c\C-q" 'send-process-next-char) (define-key map "\C-c\C-c" 'telnet-interrupt-subjob) ------------------------------------------------------------ revno: 101915 committer: Daiki Ueno branch nick: trunk timestamp: Tue 2010-10-12 10:49:05 +0900 message: Clarify the doc about caching passphrases. * epa.texi (Caching Passphrases): * auth.texi (GnuPG and EasyPG Assistant Configuration): Clarify some configurations require to set up gpg-agent. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2010-10-11 00:30:34 +0000 +++ doc/misc/ChangeLog 2010-10-12 01:49:05 +0000 @@ -1,3 +1,9 @@ +2010-10-12 Daiki Ueno + + * epa.texi (Caching Passphrases): + * auth.texi (GnuPG and EasyPG Assistant Configuration): Clarify + some configurations require to set up gpg-agent. + 2010-10-11 Glenn Morris * Makefile.in (.texi.dvi): Remove unnecessary suffix rule. === modified file 'doc/misc/auth.texi' --- doc/misc/auth.texi 2010-10-08 23:55:33 +0000 +++ doc/misc/auth.texi 2010-10-12 01:49:05 +0000 @@ -267,24 +267,24 @@ @node GnuPG and EasyPG Assistant Configuration @appendix GnuPG and EasyPG Assistant Configuration +If you don't customize @code{auth-sources}, the auth-source library +reads @code{~/.authinfo.gpg}, which is a GnuPG encrypted file. + In Emacs 23 or later there is an option @code{auto-encryption-mode} to -automatically decrypt @code{*.gpg} files and it is enabled by default -so there is no setting is needed. If you are using earlier versions -of Emacs for some reason, you will need: +automatically decrypt @code{*.gpg} files. It is enabled by default so +there is no setting is needed. If you are using earlier versions of +Emacs, you will need: @lisp (require 'epa-file) (epa-file-enable) @end lisp -If you want your GnuPG passwords to be cached, setup @code{gpg-agent} +If you want your GnuPG passwords to be cached, set up @code{gpg-agent} or EasyPG Assitant @pxref{Caching Passphrases, , Caching Passphrases, epa} -For those who are using older vesions of Emacs, here are some portion -copied from the EasyPG Assitant manual: - -Here are some questions: +To quick start, here are some questions: @enumerate @item Do you use GnuPG version 2 instead of GnuPG version 1? @@ -296,17 +296,17 @@ @multitable {111} {222} {333} {configuration configuration configuration} @item @b{1} @tab @b{2} @tab @b{3} @tab Configuration -@item Yes @tab Yes @tab Yes @tab Nothing to do. +@item Yes @tab Yes @tab Yes @tab Set up gpg-agent. @item Yes @tab Yes @tab No @tab You can't, without gpg-agent. -@item Yes @tab No @tab Yes @tab Nothing to do. +@item Yes @tab No @tab Yes @tab Set up gpg-agent. @item Yes @tab No @tab No @tab You can't, without gpg-agent. @item No @tab Yes @tab Yes @tab Set up elisp passphrase cache. @item No @tab Yes @tab No @tab Set up elisp passphrase cache. -@item No @tab No @tab Yes @tab Nothing to do. +@item No @tab No @tab Yes @tab Set up gpg-agent. @item No @tab No @tab No @tab You can't, without gpg-agent. @end multitable -To setup gpg-agent, follow the instruction in GnuPG manual. +To set up gpg-agent, follow the instruction in GnuPG manual. @pxref{Invoking GPG-AGENT, , Invoking GPG-AGENT, gnupg}. To set up elisp passphrase cache, set === modified file 'doc/misc/epa.texi' --- doc/misc/epa.texi 2010-10-06 07:12:42 +0000 +++ doc/misc/epa.texi 2010-10-12 01:49:05 +0000 @@ -420,17 +420,17 @@ @multitable {111} {222} {333} {configuration configuration configuration} @item @b{1} @tab @b{2} @tab @b{3} @tab Configuration -@item Yes @tab Yes @tab Yes @tab Nothing to do. +@item Yes @tab Yes @tab Yes @tab Set up gpg-agent. @item Yes @tab Yes @tab No @tab You can't, without gpg-agent. -@item Yes @tab No @tab Yes @tab Nothing to do. +@item Yes @tab No @tab Yes @tab Set up gpg-agent. @item Yes @tab No @tab No @tab You can't, without gpg-agent. @item No @tab Yes @tab Yes @tab Set up elisp passphrase cache. @item No @tab Yes @tab No @tab Set up elisp passphrase cache. -@item No @tab No @tab Yes @tab Nothing to do. +@item No @tab No @tab Yes @tab Set up gpg-agent. @item No @tab No @tab No @tab You can't, without gpg-agent. @end multitable -To setup gpg-agent, follow the instruction in GnuPG manual. +To set up gpg-agent, follow the instruction in GnuPG manual. @pxref{Invoking GPG-AGENT, , Invoking GPG-AGENT, gnupg}. To set up elisp passphrase cache, set ------------------------------------------------------------ revno: 101914 committer: Katsumi Yamaoka branch nick: trunk timestamp: Tue 2010-10-12 00:25:50 +0000 message: Fix last change. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-10-11 23:29:33 +0000 +++ lisp/gnus/ChangeLog 2010-10-12 00:25:50 +0000 @@ -1,7 +1,5 @@ 2010-10-11 Katsumi Yamaoka - * lpath.el: Fbind gnutls-negotiate for Emacs 22 and XEmacsen. - * nnimap.el (gnutls-negotiate): Silence the byte compiler. * gnus-art.el, gnus-cache.el, gnus-fun.el, gnus-group.el, ------------------------------------------------------------ revno: 101913 [merge] committer: Juanma Barranquero branch nick: trunk timestamp: Tue 2010-10-12 01:57:49 +0200 message: Merge changes from emacs-23 branch. diff: === modified file 'ChangeLog' --- ChangeLog 2010-10-10 15:35:04 +0000 +++ ChangeLog 2010-10-11 23:57:49 +0000 @@ -1,3 +1,7 @@ +2010-10-12 Eli Zaretskii + + * make-dist: Don't distribute src/buildobj.h. (Bug#7167) + 2010-10-10 Dan Nicolaescu * configure.in (PROFILING_LDFLAGS): Do not define, remove all uses. === modified file 'doc/man/ChangeLog' --- doc/man/ChangeLog 2010-10-09 18:51:21 +0000 +++ doc/man/ChangeLog 2010-10-11 23:57:49 +0000 @@ -1,3 +1,11 @@ +2010-10-12 Glenn Morris + + * emacs.1: Small fixes. + +2010-10-12 Ulrich Mueller + + * emacs.1: Update license description. + 2010-10-09 Glenn Morris * b2m.1: Remove file. === modified file 'doc/man/emacs.1' --- doc/man/emacs.1 2010-09-01 07:13:21 +0000 +++ doc/man/emacs.1 2010-10-11 23:57:49 +0000 @@ -41,9 +41,9 @@ Help Tutorial (CTRL-h t) starts an interactive tutorial to quickly teach beginners the fundamentals of .I Emacs. -Help Apropos (CTRL-h a) helps you find a command given its -functionality, Help Key (CTRL-h k) describes a given key sequence, and -Help Function (CTRL-h f) describes a given Lisp function. +Help Apropos (CTRL-h a) helps you find a command with a name matching +a given pattern, Help Key (CTRL-h k) describes a given key sequence, +and Help Function (CTRL-h f) describes a given Lisp function. .PP .IR "GNU Emacs" 's many special packages handle mail reading (RMail) and sending (Mail), @@ -531,12 +531,12 @@ .SH MANUALS You can order printed copies of the GNU Emacs Manual from the Free Software Foundation, which develops GNU software. -See the file ORDERS for ordering information. +See the online store at . .br -Your local Emacs maintainer might also have copies available. +Your local administrator might also have copies available. As with all software and publications from FSF, everyone is permitted to make and distribute copies of the Emacs manual. -The TeX source to the manual is also included in the Emacs source +The Texinfo source to the manual is also included in the Emacs source distribution. . . @@ -545,7 +545,8 @@ The complete text of the Emacs reference manual is included in a convenient tree structured form. Also includes the Emacs Lisp Reference Manual, useful to anyone -wishing to write programs in the Emacs Lisp extension language. +wishing to write programs in the Emacs Lisp extension language, +and the Introduction to Programming in Emacs Lisp. /usr/local/share/emacs/$VERSION/lisp \(em Lisp source files and compiled files that define most editing commands. @@ -572,9 +573,8 @@ bugs and fixes. But before reporting something as a bug, please try to be sure that it really is a bug, not a misunderstanding or a deliberate feature. -We ask you to read the section ``Reporting Emacs Bugs'' near the -end of the reference manual (or Info system) for hints on how and -when to report bugs. +We ask you to read the section ``Reporting Bugs'' in the Emacs manual +for hints on how and when to report bugs. Also, include the version number of the Emacs you are running in \fIevery\fR bug report that you send in. Bugs tend actually to be fixed if they can be isolated, so it is @@ -596,10 +596,7 @@ .I Emacs is free; anyone may redistribute copies of .I Emacs -to -anyone under the terms stated in the -.I Emacs -General Public License, +to anyone under the terms stated in the GNU General Public License, a copy of which accompanies each copy of .I Emacs and which also @@ -611,7 +608,7 @@ but it is never included in the scope of any license covering those systems. Such inclusion violates the terms on which distribution is permitted. -In fact, the primary purpose of the General Public License is to +In fact, the primary purpose of the GNU General Public License is to prohibit anyone from attaching any other restrictions to redistribution of .IR Emacs . === modified file 'etc/NEWS.23' --- etc/NEWS.23 2010-09-23 19:00:31 +0000 +++ etc/NEWS.23 2010-10-11 23:57:49 +0000 @@ -21,6 +21,9 @@ * Changes in Emacs 23.3 +** The nextstep port can have different modifiers for the left and right +alt/option key by customizing the value for ns-right-alternate-modifier. + * Editing Changes in Emacs 23.3 === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-10-11 23:29:33 +0000 +++ lisp/ChangeLog 2010-10-11 23:57:49 +0000 @@ -1,3 +1,32 @@ +2010-10-12 Jan Djärv + + * term/ns-win.el (ns-right-alternate-modifier): New defvar. + (ns-right-option-modifier): New alias for ns-right-alternate-modifier. + (mac-right-option-modifier): New alias for ns-right-option-modifier. + + * cus-start.el (all): ns-right-alternate-modifier is new. + +2010-10-12 Stefan Monnier + + * emacs-lisp/lisp.el (lisp-completion-at-point): + Use emacs-lisp-mode-syntax-table for the whole function. + +2010-10-12 David Koppelman + + * hi-lock.el (hi-lock-font-lock-hook): Check font-lock-fontified + instead of font-lock-mode before adding keywords. + Remove hi-lock-mode off code. Remove inhibit hack. + (hi-lock-set-pattern): Only add keywords if font-lock-fontified + non-nil; removed hook inhibit hack. + +2010-10-12 Glenn Morris + + * emacs-lisp/shadow.el (find-emacs-lisp-shadows): Rename it... + (load-path-shadows-find): ... to this. + (list-load-path-shadows): Update for above change. + + * mail/mail-utils.el (mail-mbox-from): Also try return-path. + 2010-10-11 Katsumi Yamaoka * mail/hashcash.el, net/imap.el, pgg-parse.el, pgg.el: === modified file 'lisp/cus-start.el' --- lisp/cus-start.el 2010-08-29 16:17:13 +0000 +++ lisp/cus-start.el 2010-10-11 23:57:49 +0000 @@ -272,6 +272,14 @@ (const control) (const meta) (const alt) (const hyper) (const super)) "23.1") + (ns-right-alternate-modifier + ns + (choice (const :tag "No modifier (work as alternate/option)" none) + (const :tag "Use the value of ns-alternate-modifier" + left) + (const control) (const meta) + (const alt) (const hyper) + (const super)) "23.3") (ns-function-modifier ns (choice (const :tag "No modifier (work as function)" none) === modified file 'lisp/emacs-lisp/lisp.el' --- lisp/emacs-lisp/lisp.el 2010-09-20 21:45:09 +0000 +++ lisp/emacs-lisp/lisp.el 2010-10-11 23:57:49 +0000 @@ -646,49 +646,49 @@ (defun lisp-completion-at-point (&optional predicate) "Function used for `completion-at-point-functions' in `emacs-lisp-mode'." ;; FIXME: the `end' could be after point? - (let* ((pos (point)) - (beg (with-syntax-table emacs-lisp-mode-syntax-table - (condition-case nil - (save-excursion - (backward-sexp 1) - (skip-syntax-forward "'") - (point)) - (scan-error pos)))) - (predicate - (or predicate - (save-excursion - (goto-char beg) - (if (not (eq (char-before) ?\()) - (lambda (sym) ;why not just nil ? -sm - (or (boundp sym) (fboundp sym) - (symbol-plist sym))) - ;; Looks like a funcall position. Let's double check. - (if (condition-case nil - (progn (up-list -2) (forward-char 1) - (eq (char-after) ?\()) - (error nil)) - ;; If the first element of the parent list is an open - ;; parenthesis we are probably not in a funcall position. - ;; Maybe a `let' varlist or something. - nil - ;; Else, we assume that a function name is expected. - 'fboundp))))) - (end - (unless (or (eq beg (point-max)) - (member (char-syntax (char-after beg)) '(?\" ?\( ?\)))) - (condition-case nil - (save-excursion - (goto-char beg) - (forward-sexp 1) - (when (>= (point) pos) - (point))) - (scan-error pos))))) - (when end - (list beg end obarray - :predicate predicate - :annotate-function - (unless (eq predicate 'fboundp) - (lambda (str) (if (fboundp (intern-soft str)) " "))))))) + (with-syntax-table emacs-lisp-mode-syntax-table + (let* ((pos (point)) + (beg (condition-case nil + (save-excursion + (backward-sexp 1) + (skip-syntax-forward "'") + (point)) + (scan-error pos))) + (predicate + (or predicate + (save-excursion + (goto-char beg) + (if (not (eq (char-before) ?\()) + (lambda (sym) ;why not just nil ? -sm + (or (boundp sym) (fboundp sym) + (symbol-plist sym))) + ;; Looks like a funcall position. Let's double check. + (if (condition-case nil + (progn (up-list -2) (forward-char 1) + (eq (char-after) ?\()) + (error nil)) + ;; If the first element of the parent list is an open + ;; paren we are probably not in a funcall position. + ;; Maybe a `let' varlist or something. + nil + ;; Else, we assume that a function name is expected. + 'fboundp))))) + (end + (unless (or (eq beg (point-max)) + (member (char-syntax (char-after beg)) '(?\" ?\( ?\)))) + (condition-case nil + (save-excursion + (goto-char beg) + (forward-sexp 1) + (when (>= (point) pos) + (point))) + (scan-error pos))))) + (when end + (list beg end obarray + :predicate predicate + :annotate-function + (unless (eq predicate 'fboundp) + (lambda (str) (if (fboundp (intern-soft str)) " ")))))))) ;; arch-tag: aa7fa8a4-2e6f-4e9b-9cd9-fef06340e67e ;;; lisp.el ends here === modified file 'lisp/emacs-lisp/shadow.el' --- lisp/emacs-lisp/shadow.el 2010-10-08 10:14:47 +0000 +++ lisp/emacs-lisp/shadow.el 2010-10-11 23:57:49 +0000 @@ -24,7 +24,7 @@ ;;; Commentary: -;; The functions in this file detect (`find-emacs-lisp-shadows') +;; The functions in this file detect (`load-path-shadows-find') ;; and display (`list-load-path-shadows') potential load-path ;; problems that arise when Emacs Lisp files "shadow" each other. ;; @@ -65,7 +65,7 @@ :type 'boolean :group 'lisp-shadow) -(defun find-emacs-lisp-shadows (&optional path) +(defun load-path-shadows-find (&optional path) "Return a list of Emacs Lisp files that create shadows. This function does the work for `list-load-path-shadows'. @@ -141,6 +141,9 @@ ;; Return the list of shadowings. shadows)) +(define-obsolete-function-alias 'find-emacs-lisp-shadows + 'load-path-shadows-find "23.3") + ;; Return true if neither file exists, or if both exist and have identical ;; contents. (defun load-path-shadows-same-file-or-nonexistent (f1 f2) @@ -224,7 +227,7 @@ considered to shadow a later file XXX.el, and vice-versa. Shadowings are located by calling the (non-interactive) companion -function, `find-emacs-lisp-shadows'." +function, `load-path-shadows-find'." (interactive) (let* ((path (copy-sequence load-path)) (tem path) @@ -248,7 +251,7 @@ (setq tem nil))) (setq tem (cdr tem))))) - (let* ((shadows (find-emacs-lisp-shadows path)) + (let* ((shadows (load-path-shadows-find path)) (n (/ (length shadows) 2)) (msg (format "%s Emacs Lisp load-path shadowing%s found" (if (zerop n) "No" (concat "\n" (number-to-string n))) === modified file 'lisp/hi-lock.el' --- lisp/hi-lock.el 2010-01-13 08:35:10 +0000 +++ lisp/hi-lock.el 2010-10-09 04:09:19 +0000 @@ -564,23 +564,15 @@ 'face-name-history (cdr hi-lock-face-defaults)))) -(defvar hi-lock--inhibit-font-lock-hook nil - "Inhibit the action of `hi-lock-font-lock-hook'. -This is used by `hi-lock-set-pattern'.") - (defun hi-lock-set-pattern (regexp face) "Highlight REGEXP with face FACE." - (let ((pattern (list regexp (list 0 (list 'quote face) t))) - ;; The call to `font-lock-add-keywords' below might disable - ;; and re-enable font-lock mode. If so, we don't want - ;; `hi-lock-font-lock-hook' to run. This can be removed once - ;; Bug#635 is fixed. -- cyd - (hi-lock--inhibit-font-lock-hook t)) + (let ((pattern (list regexp (list 0 (list 'quote face) t)))) (unless (member pattern hi-lock-interactive-patterns) - (font-lock-add-keywords nil (list pattern) t) (push pattern hi-lock-interactive-patterns) (if font-lock-fontified - (font-lock-fontify-buffer) + (progn + (font-lock-add-keywords nil (list pattern) t) + (font-lock-fontify-buffer)) (let* ((serial (hi-lock-string-serialize regexp)) (range-min (- (point) (/ hi-lock-highlight-range 2))) (range-max (+ (point) (/ hi-lock-highlight-range 2))) @@ -641,12 +633,9 @@ (defun hi-lock-font-lock-hook () "Add hi-lock patterns to font-lock's." - (unless hi-lock--inhibit-font-lock-hook - (if font-lock-mode - (progn - (font-lock-add-keywords nil hi-lock-file-patterns t) - (font-lock-add-keywords nil hi-lock-interactive-patterns t)) - (hi-lock-mode -1)))) + (when font-lock-fontified + (font-lock-add-keywords nil hi-lock-file-patterns t) + (font-lock-add-keywords nil hi-lock-interactive-patterns t))) (defvar hi-lock-string-serialize-hash (make-hash-table :test 'equal) === modified file 'lisp/mail/mail-utils.el' --- lisp/mail/mail-utils.el 2010-02-04 05:05:37 +0000 +++ lisp/mail/mail-utils.el 2010-10-09 00:41:03 +0000 @@ -401,6 +401,7 @@ (let ((from (or (mail-fetch-field "from") (mail-fetch-field "really-from") (mail-fetch-field "sender") + (mail-fetch-field "return-path") "unknown")) (date (mail-fetch-field "date"))) (format "From %s %s\n" (mail-strip-quoted-names from) @@ -411,5 +412,4 @@ (provide 'mail-utils) -;; arch-tag: b24aec2f-fd65-4ceb-9e39-3cc2827036fd ;;; mail-utils.el ends here === modified file 'lisp/term/ns-win.el' --- lisp/term/ns-win.el 2010-09-02 10:17:02 +0000 +++ lisp/term/ns-win.el 2010-10-11 23:57:49 +0000 @@ -66,6 +66,7 @@ ;; nsterm.m (defvar ns-version-string) (defvar ns-alternate-modifier) +(defvar ns-right-alternate-modifier) ;;;; Command line argument handling. @@ -284,6 +285,7 @@ (defvaralias 'mac-command-modifier 'ns-command-modifier) (defvaralias 'mac-control-modifier 'ns-control-modifier) (defvaralias 'mac-option-modifier 'ns-option-modifier) +(defvaralias 'mac-right-option-modifier 'ns-right-option-modifier) (defvaralias 'mac-function-modifier 'ns-function-modifier) (declare-function ns-do-applescript "nsfns.m" (script)) (defalias 'do-applescript 'ns-do-applescript) @@ -815,6 +817,7 @@ ;; You say tomAYto, I say tomAHto.. (defvaralias 'ns-option-modifier 'ns-alternate-modifier) +(defvaralias 'ns-right-option-modifier 'ns-right-alternate-modifier) (defun ns-do-hide-emacs () (interactive) === modified file 'make-dist' --- make-dist 2010-10-09 18:46:57 +0000 +++ make-dist 2010-10-11 23:57:49 +0000 @@ -461,7 +461,7 @@ ln makefile.w32-in ../${tempdir}/src ln .gdbinit .dbxinit ../${tempdir}/src cd ../${tempdir}/src - rm -f config.h epaths.h Makefile + rm -f config.h epaths.h Makefile buildobj.h rm -f =* TAGS) echo "Making links to \`src/bitmaps'" === modified file 'src/ChangeLog' --- src/ChangeLog 2010-10-10 18:47:45 +0000 +++ src/ChangeLog 2010-10-11 23:57:49 +0000 @@ -1,3 +1,14 @@ +2010-10-12 Jan Djärv + + * nsterm.m (Qleft): Declare. + (ns_right_alternate_modifier): New variable + (NSRightAlternateKeyMask): New define. + (EV_MODIFIERS): Parse NSRightAlternateKeyMask if + ns_right_alternate_modifier isn't Qleft. + (keyDown): If ns_right_alternate_modifier isn't Qleft, use it + as emacs modifier for NSRightAlternateKeyMask. + (syms_of_nsterm): DEFVAR_LISP ns-right-alternate-modifier. + 2010-10-10 Lars Magne Ingebrigtsen * gnutls.c (emacs_gnutls_write): If we're trying to write before === modified file 'src/nsterm.m' --- src/nsterm.m 2010-08-29 10:30:45 +0000 +++ src/nsterm.m 2010-10-11 23:57:49 +0000 @@ -142,13 +142,18 @@ Lisp_Object Vx_toolkit_scroll_bars; static Lisp_Object Qmodifier_value; Lisp_Object Qalt, Qcontrol, Qhyper, Qmeta, Qsuper, Qnone; -extern Lisp_Object Qcursor_color, Qcursor_type, Qns; +extern Lisp_Object Qcursor_color, Qcursor_type, Qns, Qleft; /* Specifies which emacs modifier should be generated when NS receives the Alternate modifer. May be Qnone or any of the modifier lisp symbols. */ Lisp_Object ns_alternate_modifier; /* Specifies which emacs modifier should be generated when NS receives + the right Alternate modifer. Has same values as ns_alternate_modifier plus + the value Qleft which means whatever value ns_alternate_modifier has. */ +Lisp_Object ns_right_alternate_modifier; + +/* Specifies which emacs modifier should be generated when NS receives the Command modifer. May be any of the modifier lisp symbols. */ Lisp_Object ns_command_modifier; @@ -218,12 +223,17 @@ /* Convert modifiers in a NeXTSTEP event to emacs style modifiers. */ #define NS_FUNCTION_KEY_MASK 0x800000 +#define NSRightAlternateKeyMask (0x000040 | NSAlternateKeyMask) #define EV_MODIFIERS(e) \ ((([e modifierFlags] & NSHelpKeyMask) ? \ hyper_modifier : 0) \ - | (([e modifierFlags] & NSAlternateKeyMask) ? \ + | (!EQ (ns_right_alternate_modifier, Qleft) && \ + (([e modifierFlags] & NSRightAlternateKeyMask) \ + == NSRightAlternateKeyMask) ? \ + parse_solitary_modifier (ns_right_alternate_modifier) : 0) \ + | (([e modifierFlags] & NSAlternateKeyMask) ? \ parse_solitary_modifier (ns_alternate_modifier) : 0) \ - | (([e modifierFlags] & NSShiftKeyMask) ? \ + | (([e modifierFlags] & NSShiftKeyMask) ? \ shift_modifier : 0) \ | (([e modifierFlags] & NSControlKeyMask) ? \ parse_solitary_modifier (ns_control_modifier) : 0) \ @@ -4440,7 +4450,13 @@ emacs_event->modifiers |= parse_solitary_modifier (ns_function_modifier); - if (flags & NSAlternateKeyMask) /* default = meta */ + if (!EQ (ns_right_alternate_modifier, Qleft) + && ((flags & NSRightAlternateKeyMask) == NSRightAlternateKeyMask)) + { + emacs_event->modifiers |= parse_solitary_modifier + (ns_right_alternate_modifier); + } + else if (flags & NSAlternateKeyMask) /* default = meta */ { if ((NILP (ns_alternate_modifier) || EQ (ns_alternate_modifier, Qnone)) && !fnKeysym) @@ -6203,6 +6219,14 @@ at all, allowing it to be used at a lower level for accented character entry."); ns_alternate_modifier = Qmeta; + DEFVAR_LISP ("ns-right-alternate-modifier", &ns_right_alternate_modifier, + "This variable describes the behavior of the right alternate or option key.\n\ +Set to control, meta, alt, super, or hyper means it is taken to be that key.\n\ +Set to left means be the same key as `ns-alternate-modifier'.\n\ +Set to none means that the alternate / option key is not interpreted by Emacs\n\ +at all, allowing it to be used at a lower level for accented character entry."); + ns_right_alternate_modifier = Qleft; + DEFVAR_LISP ("ns-command-modifier", &ns_command_modifier, "This variable describes the behavior of the command key.\n\ Set to control, meta, alt, super, or hyper means it is taken to be that key."); ------------------------------------------------------------ revno: 101912 committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2010-10-11 23:29:33 +0000 message: nnimap.el (gnutls-negotiate): Silence the byte compiler. *.el: Fix comment for declare-function. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-10-11 04:49:59 +0000 +++ lisp/ChangeLog 2010-10-11 23:29:33 +0000 @@ -1,3 +1,8 @@ +2010-10-11 Katsumi Yamaoka + + * mail/hashcash.el, net/imap.el, pgg-parse.el, pgg.el: + Fix comment for declare-function. + 2010-10-11 Chong Yidong * custom.el (custom-fix-face-spec): New function; code moved from === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-10-11 22:27:28 +0000 +++ lisp/gnus/ChangeLog 2010-10-11 23:29:33 +0000 @@ -1,3 +1,17 @@ +2010-10-11 Katsumi Yamaoka + + * lpath.el: Fbind gnutls-negotiate for Emacs 22 and XEmacsen. + + * nnimap.el (gnutls-negotiate): Silence the byte compiler. + + * gnus-art.el, gnus-cache.el, gnus-fun.el, gnus-group.el, + gnus-picon.el, gnus-spec.el, gnus-sum.el, gnus-util.el, gnus.el, + mail-source.el, message.el, mm-bodies.el, mm-decode.el, mm-extern.el, + mm-util.el, mm-view.el, mml-smime.el, mml.el, mml1991.el, mml2015.el, + nnfolder.el, nnheader.el, nnmail.el, nnmaildir.el, nnrss.el, nntp.el, + rfc1843.el, sieve-manage.el, smime.el, spam.el: + Fix comment for declare-function. + 2010-10-11 Lars Magne Ingebrigtsen * nnimap.el (nnimap-request-rename-group): Select group read-only === modified file 'lisp/gnus/gnus-art.el' --- lisp/gnus/gnus-art.el 2010-10-08 02:12:56 +0000 +++ lisp/gnus/gnus-art.el 2010-10-11 23:29:33 +0000 @@ -25,7 +25,7 @@ ;;; Code: -;; For Emacs < 22.2. +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) (eval-when-compile === modified file 'lisp/gnus/gnus-cache.el' --- lisp/gnus/gnus-cache.el 2010-09-24 22:33:34 +0000 +++ lisp/gnus/gnus-cache.el 2010-10-11 23:29:33 +0000 @@ -25,7 +25,7 @@ ;;; Code: -;; For Emacs < 22.2. +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) === modified file 'lisp/gnus/gnus-fun.el' --- lisp/gnus/gnus-fun.el 2010-09-02 00:55:51 +0000 +++ lisp/gnus/gnus-fun.el 2010-10-11 23:29:33 +0000 @@ -24,7 +24,7 @@ ;;; Code: -;; For Emacs < 22.2. +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) === modified file 'lisp/gnus/gnus-group.el' --- lisp/gnus/gnus-group.el 2010-10-08 23:55:33 +0000 +++ lisp/gnus/gnus-group.el 2010-10-11 23:29:33 +0000 @@ -25,7 +25,7 @@ ;;; Code: -;; For Emacs < 22.2. +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) === modified file 'lisp/gnus/gnus-picon.el' --- lisp/gnus/gnus-picon.el 2010-09-26 23:01:31 +0000 +++ lisp/gnus/gnus-picon.el 2010-10-11 23:29:33 +0000 @@ -38,7 +38,7 @@ ;; ;;; Code: -;; For Emacs < 22.2. +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) === modified file 'lisp/gnus/gnus-spec.el' --- lisp/gnus/gnus-spec.el 2010-09-02 00:55:51 +0000 +++ lisp/gnus/gnus-spec.el 2010-10-11 23:29:33 +0000 @@ -25,7 +25,7 @@ ;;; Code: -;; For Emacs < 22.2. +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) (eval-when-compile (require 'cl)) === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2010-10-10 22:48:40 +0000 +++ lisp/gnus/gnus-sum.el 2010-10-11 23:29:33 +0000 @@ -25,7 +25,7 @@ ;;; Code: -;; For Emacs < 22.2. +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) (eval-when-compile === modified file 'lisp/gnus/gnus-util.el' --- lisp/gnus/gnus-util.el 2010-10-08 23:55:33 +0000 +++ lisp/gnus/gnus-util.el 2010-10-11 23:29:33 +0000 @@ -33,7 +33,7 @@ ;;; Code: -;; For Emacs < 22.2. +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) (eval-when-compile === modified file 'lisp/gnus/gnus.el' --- lisp/gnus/gnus.el 2010-10-10 00:15:21 +0000 +++ lisp/gnus/gnus.el 2010-10-11 23:29:33 +0000 @@ -30,7 +30,7 @@ (eval '(run-hooks 'gnus-load-hook)) -;; For Emacs < 22.2. +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) === modified file 'lisp/gnus/mail-source.el' --- lisp/gnus/mail-source.el 2010-10-01 00:25:50 +0000 +++ lisp/gnus/mail-source.el 2010-10-11 23:29:33 +0000 @@ -25,7 +25,7 @@ ;;; Code: -;; For Emacs < 22.2. +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) === modified file 'lisp/gnus/message.el' --- lisp/gnus/message.el 2010-10-06 12:38:45 +0000 +++ lisp/gnus/message.el 2010-10-11 23:29:33 +0000 @@ -29,6 +29,7 @@ ;;; Code: +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) (eval-when-compile === modified file 'lisp/gnus/mm-bodies.el' --- lisp/gnus/mm-bodies.el 2010-09-02 00:55:51 +0000 +++ lisp/gnus/mm-bodies.el 2010-10-11 23:29:33 +0000 @@ -24,7 +24,7 @@ ;;; Code: -;; For Emacs < 22.2. +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) === modified file 'lisp/gnus/mm-decode.el' --- lisp/gnus/mm-decode.el 2010-10-08 23:55:33 +0000 +++ lisp/gnus/mm-decode.el 2010-10-11 23:29:33 +0000 @@ -24,7 +24,7 @@ ;;; Code: -;; For Emacs < 22.2. +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) === modified file 'lisp/gnus/mm-extern.el' --- lisp/gnus/mm-extern.el 2010-09-02 00:55:51 +0000 +++ lisp/gnus/mm-extern.el 2010-10-11 23:29:33 +0000 @@ -25,7 +25,7 @@ ;;; Code: -;; For Emacs < 22.2. +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) === modified file 'lisp/gnus/mm-util.el' --- lisp/gnus/mm-util.el 2010-09-30 08:39:23 +0000 +++ lisp/gnus/mm-util.el 2010-10-11 23:29:33 +0000 @@ -24,7 +24,7 @@ ;;; Code: -;; For Emacs < 22.2. +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) === modified file 'lisp/gnus/mm-view.el' --- lisp/gnus/mm-view.el 2010-10-04 00:17:16 +0000 +++ lisp/gnus/mm-view.el 2010-10-11 23:29:33 +0000 @@ -22,6 +22,8 @@ ;;; Commentary: ;;; Code: + +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) (eval-when-compile (require 'cl)) === modified file 'lisp/gnus/mml-smime.el' --- lisp/gnus/mml-smime.el 2010-10-04 22:26:51 +0000 +++ lisp/gnus/mml-smime.el 2010-10-11 23:29:33 +0000 @@ -25,7 +25,7 @@ ;;; Code: -;; For Emacs < 22.2. +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) === modified file 'lisp/gnus/mml.el' --- lisp/gnus/mml.el 2010-09-30 08:39:23 +0000 +++ lisp/gnus/mml.el 2010-10-11 23:29:33 +0000 @@ -23,7 +23,7 @@ ;;; Code: -;; For Emacs < 22.2. +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) === modified file 'lisp/gnus/mml1991.el' --- lisp/gnus/mml1991.el 2010-09-26 04:03:19 +0000 +++ lisp/gnus/mml1991.el 2010-10-11 23:29:33 +0000 @@ -26,8 +26,8 @@ ;;; Code: -;; For Emacs < 22.2. (eval-and-compile + ;; For Emacs <22.2 and XEmacs. (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))) (if (locate-library "password-cache") === modified file 'lisp/gnus/mml2015.el' --- lisp/gnus/mml2015.el 2010-09-28 12:35:18 +0000 +++ lisp/gnus/mml2015.el 2010-10-11 23:29:33 +0000 @@ -28,8 +28,8 @@ ;;; Code: -;; For Emacs < 22.2. (eval-and-compile + ;; For Emacs <22.2 and XEmacs. (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))) (if (locate-library "password-cache") === modified file 'lisp/gnus/nnfolder.el' --- lisp/gnus/nnfolder.el 2010-09-23 23:14:02 +0000 +++ lisp/gnus/nnfolder.el 2010-10-11 23:29:33 +0000 @@ -29,7 +29,7 @@ ;;; Code: -;; For Emacs < 22.2. +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) === modified file 'lisp/gnus/nnheader.el' --- lisp/gnus/nnheader.el 2010-09-26 04:03:19 +0000 +++ lisp/gnus/nnheader.el 2010-10-11 23:29:33 +0000 @@ -27,6 +27,7 @@ ;;; Code: +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) (eval-when-compile (require 'cl)) === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2010-10-11 22:27:28 +0000 +++ lisp/gnus/nnimap.el 2010-10-11 23:29:33 +0000 @@ -26,6 +26,10 @@ ;;; Code: +;; For Emacs <22.2 and XEmacs. +(eval-and-compile + (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) + (eval-and-compile (require 'nnheader)) @@ -284,6 +288,8 @@ (* 5 60))) (nnimap-send-command "NOOP"))))))) +(declare-function gnutls-negotiate "subr" (fn file &optional arglist fileonly)) + (defun nnimap-open-connection (buffer) (unless nnimap-keepalive-timer (setq nnimap-keepalive-timer (run-at-time (* 60 15) (* 60 15) === modified file 'lisp/gnus/nnmail.el' --- lisp/gnus/nnmail.el 2010-10-10 00:15:21 +0000 +++ lisp/gnus/nnmail.el 2010-10-11 23:29:33 +0000 @@ -25,7 +25,7 @@ ;;; Code: -;; For Emacs < 22.2. +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) === modified file 'lisp/gnus/nnmaildir.el' --- lisp/gnus/nnmaildir.el 2010-09-23 23:14:02 +0000 +++ lisp/gnus/nnmaildir.el 2010-10-11 23:29:33 +0000 @@ -59,7 +59,7 @@ ) ] -;; For Emacs < 22.2. +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) === modified file 'lisp/gnus/nnrss.el' --- lisp/gnus/nnrss.el 2010-10-06 12:38:45 +0000 +++ lisp/gnus/nnrss.el 2010-10-11 23:29:33 +0000 @@ -25,7 +25,7 @@ ;;; Code: -;; For Emacs < 22.2. +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) === modified file 'lisp/gnus/nntp.el' --- lisp/gnus/nntp.el 2010-10-01 00:25:50 +0000 +++ lisp/gnus/nntp.el 2010-10-11 23:29:33 +0000 @@ -26,7 +26,7 @@ ;;; Code: -;; For Emacs < 22.2. +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) === modified file 'lisp/gnus/rfc1843.el' --- lisp/gnus/rfc1843.el 2010-09-25 13:28:07 +0000 +++ lisp/gnus/rfc1843.el 2010-10-11 23:29:33 +0000 @@ -32,7 +32,7 @@ ;;; Code: -;; For Emacs < 22.2. +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) === modified file 'lisp/gnus/sieve-manage.el' --- lisp/gnus/sieve-manage.el 2010-10-11 22:27:28 +0000 +++ lisp/gnus/sieve-manage.el 2010-10-11 23:29:33 +0000 @@ -70,7 +70,7 @@ ;;; Code: -;; For Emacs < 22.2. +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) === modified file 'lisp/gnus/smime.el' --- lisp/gnus/smime.el 2010-10-03 02:09:53 +0000 +++ lisp/gnus/smime.el 2010-10-11 23:29:33 +0000 @@ -119,7 +119,7 @@ ;;; Code: -;; For Emacs < 22.2. +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) (require 'dig) === modified file 'lisp/gnus/spam.el' --- lisp/gnus/spam.el 2010-10-10 00:15:21 +0000 +++ lisp/gnus/spam.el 2010-10-11 23:29:33 +0000 @@ -39,7 +39,7 @@ ;;{{{ compilation directives and autoloads/requires -;; For Emacs < 22.2. +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) === modified file 'lisp/mail/hashcash.el' --- lisp/mail/hashcash.el 2010-09-07 00:04:11 +0000 +++ lisp/mail/hashcash.el 2010-10-11 23:29:33 +0000 @@ -48,6 +48,7 @@ ;;; Code: +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) === modified file 'lisp/net/imap.el' --- lisp/net/imap.el 2010-09-14 23:14:44 +0000 +++ lisp/net/imap.el 2010-10-11 23:29:33 +0000 @@ -139,6 +139,7 @@ (eval-when-compile (require 'cl)) (eval-and-compile + ;; For Emacs <22.2 and XEmacs. (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))) (autoload 'starttls-open-stream "starttls") (autoload 'starttls-negotiate "starttls") === modified file 'lisp/pgg-parse.el' --- lisp/pgg-parse.el 2010-09-02 00:55:51 +0000 +++ lisp/pgg-parse.el 2010-10-11 23:29:33 +0000 @@ -36,6 +36,7 @@ ;;; Code: (eval-when-compile + ;; For Emacs <22.2 and XEmacs. (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))) (require 'cl)) === modified file 'lisp/pgg.el' --- lisp/pgg.el 2010-09-29 01:09:50 +0000 +++ lisp/pgg.el 2010-10-11 23:29:33 +0000 @@ -36,6 +36,7 @@ ;; Don't merge these two `eval-when-compile's. (eval-when-compile + ;; For Emacs <22.2 and XEmacs. (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))) (require 'cl)) ------------------------------------------------------------ revno: 101911 author: Gnus developers committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2010-10-11 22:27:28 +0000 message: Merge changes made in Gnus trunk. shr.el (shr-tag-hr): Use shr-hr-line to specify which character to use to display hr lines. shr.el (shr-max-columns): Do not change state to nil if we just inserting spaces. sieve-manage.el (sieve-manage-open): Allow port names as well as port numbers. shr.el (shr-current-column, shr-find-fill-point): New functions; start thinking about breaking CJVK text. nnimap.el (nnimap-transform-split-mail): Not all articles have bodies. Protect against this. shr.el (shr-insert): Fix up the white space only regexp. nnimap.el (nnimap-request-rename-group): Select group read-only before renaming it. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-10-11 11:02:17 +0000 +++ lisp/gnus/ChangeLog 2010-10-11 22:27:28 +0000 @@ -1,5 +1,31 @@ 2010-10-11 Lars Magne Ingebrigtsen + * nnimap.el (nnimap-request-rename-group): Select group read-only + before renaming it. + + * shr.el (shr-insert): Fix up the white space only regexp. + + * nnimap.el (nnimap-transform-split-mail): Not all articles have + bodies. Protect against this. Reported by Michael Welsh Duggan. + + * shr.el (shr-current-column): New function. + (shr-find-fill-point): New function. + +2010-10-11 Michael Welsh Duggan (tiny change) + + * sieve-manage.el (sieve-manage-open): Allow port names as well as port + numbers. + +2010-10-11 Julien Danjou + + * shr.el (shr-hr-line): Add. + (shr-tag-hr): Use shr-hr-line to specify which character to use to + display hr lines. + (shr-max-columns): Do not change state to nil if we just inserting + spaces. + +2010-10-11 Lars Magne Ingebrigtsen + * gnus-topic.el (gnus-topic-read-group): If after the last group, select the last group. === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2010-10-10 22:48:40 +0000 +++ lisp/gnus/nnimap.el 2010-10-11 22:27:28 +0000 @@ -667,6 +667,9 @@ (deffoo nnimap-request-rename-group (group new-name &optional server) (when (nnimap-possibly-change-group nil server) (with-current-buffer (nnimap-buffer) + ;; Make sure we don't have this group open read/write. + (nnimap-command "EXAMINE %S" (utf7-encode group 7)) + (setf (nnimap-group nnimap-object) nil) (car (nnimap-command "RENAME %S %S" (utf7-encode group t) (utf7-encode new-name t)))))) @@ -1627,8 +1630,10 @@ (forward-char (1+ bytes)) (setq bytes (nnimap-get-length)) (delete-region (line-beginning-position) (line-end-position)) - (forward-char (1+ bytes)) - (delete-region (line-beginning-position) (line-end-position)))))) + ;; There's a body; skip past that. + (when bytes + (forward-char (1+ bytes)) + (delete-region (line-beginning-position) (line-end-position))))))) (defun nnimap-dummy-active-number (group &optional server) 1) === modified file 'lisp/gnus/shr.el' --- lisp/gnus/shr.el 2010-10-10 00:15:21 +0000 +++ lisp/gnus/shr.el 2010-10-11 22:27:28 +0000 @@ -59,7 +59,12 @@ :type 'char) (defcustom shr-table-corner ?+ - "Charater used to draw table corner." + "Character used to draw table corner." + :group 'shr + :type 'char) + +(defcustom shr-hr-line ?- + "Character used to draw hr line." :group 'shr :type 'char) @@ -188,7 +193,8 @@ (shr-descend sub))))) (defun shr-insert (text) - (when (eq shr-state 'image) + (when (and (eq shr-state 'image) + (not (string-match "\\`[ \t\n]+\\'" text))) (insert "\n") (setq shr-state nil)) (cond @@ -211,7 +217,7 @@ (unless shr-start (setq shr-start (point))) (insert elem) - (when (> (current-column) shr-width) + (when (> (shr-current-column) shr-width) (if (not (search-backward " " (line-beginning-position) t)) (insert "\n") (delete-char 1) @@ -224,6 +230,26 @@ (unless (string-match "[ \t\n]\\'" text) (delete-char -1)))))) +(defun shr-find-fill-point () + (let ((found nil)) + (while (and (not found) + (not (bolp))) + (when (or (eq (preceding-char) ? ) + (aref fill-find-break-point-function-table (preceding-char))) + (setq found (point))) + (backward-char 1)) + (or found + (end-of-line)))) + +(defun shr-current-column () + (let ((column 0)) + (save-excursion + (beginning-of-line) + (while (not (eolp)) + (incf column (char-width (following-char))) + (forward-char 1))) + column)) + (defun shr-ensure-newline () (unless (zerop (current-column)) (insert "\n"))) @@ -468,7 +494,7 @@ (defun shr-tag-hr (cont) (shr-ensure-newline) - (insert (make-string shr-width ?-) "\n")) + (insert (make-string shr-width shr-hr-line) "\n")) ;;; Table rendering algorithm. === modified file 'lisp/gnus/sieve-manage.el' --- lisp/gnus/sieve-manage.el 2010-10-06 14:02:39 +0000 +++ lisp/gnus/sieve-manage.el 2010-10-11 22:27:28 +0000 @@ -150,7 +150,7 @@ :group 'sieve-manage) (defcustom sieve-manage-default-port 2000 - "Default port number for managesieve protocol." + "Default port number or service name for managesieve protocol." :type 'integer :group 'sieve-manage) @@ -389,7 +389,7 @@ If nil, chooses the best stream the server is capable of. Optional argument BUFFER is buffer (buffer, or string naming buffer) to work in." - (setq buffer (or buffer (format " *sieve* %s:%d" server (or port sieve-manage-default-port)))) + (setq buffer (or buffer (format " *sieve* %s:%s" server (or port sieve-manage-default-port)))) (with-current-buffer (get-buffer-create buffer) (mapc 'make-local-variable sieve-manage-local-variables) (sieve-manage-disable-multibyte) ------------------------------------------------------------ revno: 101910 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2010-10-11 11:02:17 +0000 message: gnus-topic.el (gnus-topic-read-group): If after the last group, select the last group. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-10-11 10:03:07 +0000 +++ lisp/gnus/ChangeLog 2010-10-11 11:02:17 +0000 @@ -1,3 +1,8 @@ +2010-10-11 Lars Magne Ingebrigtsen + + * gnus-topic.el (gnus-topic-read-group): If after the last group, + select the last group. + 2010-10-11 Teodor Zlatanov * gnus-int.el (gnus-run-hook-with-args): Autoload from gnus-util.el. === modified file 'lisp/gnus/gnus-topic.el' --- lisp/gnus/gnus-topic.el 2010-10-02 10:30:06 +0000 +++ lisp/gnus/gnus-topic.el 2010-10-11 11:02:17 +0000 @@ -1255,6 +1255,8 @@ If performed over a topic line, toggle folding the topic." (interactive "P") + (when (and (eobp) (not (gnus-group-group-name))) + (forward-line -1)) (if (gnus-group-topic-p) (let ((gnus-group-list-mode (if all (cons (if (numberp all) all 7) t) gnus-group-list-mode))) ------------------------------------------------------------ revno: 101909 author: Teodor Zlatanov committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2010-10-11 10:03:07 +0000 message: gnus-int.el (gnus-run-hook-with-args): Autoload from gnus-util.el. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-10-10 22:48:40 +0000 +++ lisp/gnus/ChangeLog 2010-10-11 10:03:07 +0000 @@ -1,3 +1,7 @@ +2010-10-11 Teodor Zlatanov + + * gnus-int.el (gnus-run-hook-with-args): Autoload from gnus-util.el. + 2010-10-10 Lars Magne Ingebrigtsen * nnimap.el (nnimap-update-qresync-info): \Flagged messages are read === modified file 'lisp/gnus/gnus-int.el' --- lisp/gnus/gnus-int.el 2010-10-07 03:49:38 +0000 +++ lisp/gnus/gnus-int.el 2010-10-11 10:03:07 +0000 @@ -31,6 +31,7 @@ (require 'message) (require 'gnus-range) +(autoload 'gnus-run-hook-with-args "gnus-util") (autoload 'gnus-agent-expire "gnus-agent") (autoload 'gnus-agent-regenerate-group "gnus-agent") (autoload 'gnus-agent-read-servers-validate-native "gnus-agent") ------------------------------------------------------------ revno: 101908 committer: Chong Yidong branch nick: trunk timestamp: Mon 2010-10-11 00:49:59 -0400 message: More cleanups and minor fixes for Customize. * cus-edit.el (custom-face-edit-fix-value): Use custom-fix-face-spec. * custom.el (custom-push-theme): Cleanup (use cond). (disable-theme): Recompute the saved-face property. (custom-theme-recalc-face): Follow face alias before setting prop. * custom.el (custom-fix-face-spec): New function; code moved from custom-face-edit-fix-value. (custom-push-theme): Use it when checking if a face has been changed outside customize. (custom-available-themes): New function. (load-theme): Use it. * image.el (image-checkbox-checked, image-checkbox-unchecked): New variables, containing checkbox images. * startup.el (fancy-startup-tail): * wid-edit.el (checkbox): Use them. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-10-10 23:12:30 +0000 +++ lisp/ChangeLog 2010-10-11 04:49:59 +0000 @@ -1,3 +1,25 @@ +2010-10-11 Chong Yidong + + * custom.el (custom-fix-face-spec): New function; code moved from + custom-face-edit-fix-value. + (custom-push-theme): Use it when checking if a face has been + changed outside customize. + (custom-available-themes): New function. + (load-theme): Use it. + + * cus-edit.el (custom-face-edit-fix-value): Use + custom-fix-face-spec. + + * custom.el (custom-push-theme): Cleanup (use cond). + (disable-theme): Recompute the saved-face property. + (custom-theme-recalc-face): Follow face alias before setting prop. + + * image.el (image-checkbox-checked, image-checkbox-unchecked): New + variables, containing checkbox images. + + * startup.el (fancy-startup-tail): + * wid-edit.el (checkbox): Use them. + 2010-10-10 Dan Nicolaescu * shell.el (shell-mode-map): === modified file 'lisp/cus-edit.el' --- lisp/cus-edit.el 2010-10-09 21:54:20 +0000 +++ lisp/cus-edit.el 2010-10-11 04:49:59 +0000 @@ -3102,27 +3102,7 @@ (defun custom-face-edit-fix-value (widget value) "Ignoring WIDGET, convert :bold and :italic in VALUE to new form. Also change :reverse-video to :inverse-video." - (if (listp value) - (let (result) - (while value - (let ((key (car value)) - (val (car (cdr value)))) - (cond ((eq key :italic) - (push :slant result) - (push (if val 'italic 'normal) result)) - ((eq key :bold) - (push :weight result) - (push (if val 'bold 'normal) result)) - ((eq key :reverse-video) - (push :inverse-video result) - (push val result)) - (t - (push key result) - (push val result)))) - (setq value (cdr (cdr value)))) - (setq result (nreverse result)) - result) - value)) + (custom-fix-face-spec value)) (defun custom-face-edit-convert-widget (widget) "Convert :args as widget types in WIDGET." === modified file 'lisp/custom.el' --- lisp/custom.el 2010-08-29 16:17:13 +0000 +++ lisp/custom.el 2010-10-11 04:49:59 +0000 @@ -819,48 +819,80 @@ (setting (assq theme old)) ; '(theme value) (theme-settings ; '(prop symbol theme value) (get theme 'theme-settings))) - (if (eq mode 'reset) - ;; Remove a setting. - (when setting - (let (res) - (dolist (theme-setting theme-settings) - (if (and (eq (car theme-setting) prop) - (eq (cadr theme-setting) symbol)) - (setq res theme-setting))) - (put theme 'theme-settings (delq res theme-settings))) - (put symbol prop (delq setting old))) - (if setting - ;; Alter an existing setting. - (let (res) - (dolist (theme-setting theme-settings) - (if (and (eq (car theme-setting) prop) - (eq (cadr theme-setting) symbol)) - (setq res theme-setting))) - (put theme 'theme-settings - (cons (list prop symbol theme value) - (delq res theme-settings))) - (setcar (cdr setting) value)) - ;; Add a new setting. + (cond + ;; Remove a setting: + ((eq mode 'reset) + (when setting + (let (res) + (dolist (theme-setting theme-settings) + (if (and (eq (car theme-setting) prop) + (eq (cadr theme-setting) symbol)) + (setq res theme-setting))) + (put theme 'theme-settings (delq res theme-settings))) + (put symbol prop (delq setting old)))) + ;; Alter an existing setting: + (setting + (let (res) + (dolist (theme-setting theme-settings) + (if (and (eq (car theme-setting) prop) + (eq (cadr theme-setting) symbol)) + (setq res theme-setting))) + (put theme 'theme-settings + (cons (list prop symbol theme value) + (delq res theme-settings))) + (setcar (cdr setting) value))) + ;; Add a new setting: + (t + (unless old ;; If the user changed the value outside of Customize, we ;; first save the current value to a fake theme, `changed'. ;; This ensures that the user-set value comes back if the ;; theme is later disabled. - (if (null old) - (if (and (eq prop 'theme-value) - (boundp symbol)) - (let ((sv (get symbol 'standard-value))) - (unless (and sv - (equal (eval (car sv)) (symbol-value symbol))) - (setq old (list (list 'changed (symbol-value symbol)))))) - (if (and (facep symbol) - (not (face-spec-match-p symbol (get symbol 'face-defface-spec)))) - (setq old (list (list 'changed (list - (append '(t) (custom-face-attributes-get symbol nil))))))))) - (put symbol prop (cons (list theme value) old)) - (put theme 'theme-settings - (cons (list prop symbol theme value) - theme-settings)))))) + (cond ((and (eq prop 'theme-value) + (boundp symbol)) + (let ((sv (get symbol 'standard-value))) + (unless (and sv + (equal (eval (car sv)) (symbol-value symbol))) + (setq old (list (list 'changed (symbol-value symbol))))))) + ((and (facep symbol) + (not (face-attr-match-p + symbol + (custom-fix-face-spec + (face-spec-choose + (get symbol 'face-defface-spec)))))) + (setq old `((changed + (,(append '(t) (custom-face-attributes-get + symbol nil))))))))) + (put symbol prop (cons (list theme value) old)) + (put theme 'theme-settings + (cons (list prop symbol theme value) theme-settings)))))) +(defun custom-fix-face-spec (spec) + "Convert face SPEC, replacing obsolete :bold and :italic attributes. +Also change :reverse-video to :inverse-video." + (when (listp spec) + (if (or (memq :bold spec) + (memq :italic spec) + (memq :inverse-video spec)) + (let (result) + (while spec + (let ((key (car spec)) + (val (car (cdr spec)))) + (cond ((eq key :italic) + (push :slant result) + (push (if val 'italic 'normal) result)) + ((eq key :bold) + (push :weight result) + (push (if val 'bold 'normal) result)) + ((eq key :reverse-video) + (push :inverse-video result) + (push val result)) + (t + (push key result) + (push val result)))) + (setq spec (cddr spec))) + (nreverse result)) + spec))) (defun custom-set-variables (&rest args) "Install user customizations of variable values specified in ARGS. @@ -895,7 +927,7 @@ EXP itself is saved unevaluated as SYMBOL property `saved-value' and in SYMBOL's list property `theme-value' \(using `custom-push-theme')." (custom-check-theme theme) - + ;; Process all the needed autoloads before anything else, so that the ;; subsequent code has all the info it needs (e.g. which var corresponds ;; to a minor mode), regardless of the ordering of the variables. @@ -1062,7 +1094,10 @@ This also enables the theme; use `disable-theme' to disable it." ;; Note we do no check for validity of the theme here. ;; This allows to pull in themes by a file-name convention - (interactive "SCustom theme name: ") + (interactive + (list + (intern (completing-read "Load custom theme: " + (mapcar 'symbol-name (custom-available-themes)))))) ;; If reloading, clear out the old theme settings. (when (custom-theme-p theme) (disable-theme theme) @@ -1073,6 +1108,21 @@ (cons custom-theme-directory load-path) load-path))) (load (symbol-name (custom-make-theme-feature theme))))) + +(defun custom-available-themes () + (let* ((load-path (if (file-directory-p custom-theme-directory) + (cons custom-theme-directory load-path) + load-path)) + sym themes) + (dolist (dir load-path) + (dolist (file (file-expand-wildcards + (expand-file-name "*-theme.el" dir) t)) + (setq file (file-name-nondirectory file)) + (and (string-match "\\`\\(.+\\)-theme.el\\'" file) + (setq sym (intern (match-string 1 file))) + (not (memq sym '(cus user changed color))) + (push sym themes)))) + (delete-dups themes))) ;;; Enabling and disabling loaded themes. @@ -1085,7 +1135,10 @@ If THEME does not specify any theme settings, this tries to load the theme from its theme file, by calling `load-theme'." - (interactive "SEnable Custom theme: ") + (interactive (list (intern + (completing-read + "Enable custom theme: " + obarray (lambda (sym) (get sym 'theme-settings)))))) (if (not (custom-theme-p theme)) (load-theme theme) ;; This could use a bit of optimization -- cyd @@ -1143,21 +1196,28 @@ See `custom-enabled-themes' for a list of enabled themes." (interactive (list (intern (completing-read - "Disable Custom theme: " + "Disable custom theme: " (mapcar 'symbol-name custom-enabled-themes) nil t)))) (when (custom-theme-enabled-p theme) (let ((settings (get theme 'theme-settings))) (dolist (s settings) - (let* ((prop (car s)) + (let* ((prop (car s)) (symbol (cadr s)) - (spec-list (get symbol prop))) - (put symbol prop (assq-delete-all theme spec-list)) - (if (eq prop 'theme-value) - (custom-theme-recalc-variable symbol) + (val (assq-delete-all theme (get symbol prop)))) + (put symbol prop val) + (cond + ((eq prop 'theme-value) + (custom-theme-recalc-variable symbol)) + ((eq prop 'theme-face) + ;; If the face spec specified by this theme is in the + ;; saved-face property, reset that property. + (when (equal (nth 3 s) (get symbol 'saved-face)) + (put symbol 'saved-face + (and val (cadr (car val))))) (custom-theme-recalc-face symbol))))) - (setq custom-enabled-themes - (delq theme custom-enabled-themes)))) + (setq custom-enabled-themes + (delq theme custom-enabled-themes))))) (defun custom-variable-theme-value (variable) "Return (list VALUE) indicating the custom theme value of VARIABLE. @@ -1183,10 +1243,10 @@ (defun custom-theme-recalc-face (face) "Set FACE according to currently enabled custom themes." - (if (facep face) - (face-spec-set face - (get (or (get face 'face-alias) face) - 'face-override-spec)))) + (if (get face 'face-alias) + (setq face (get face 'face-alias))) + (face-spec-set face (get face 'face-override-spec))) + ;;; XEmacs compability functions === modified file 'lisp/image.el' --- lisp/image.el 2010-09-09 02:25:12 +0000 +++ lisp/image.el 2010-10-11 04:49:59 +0000 @@ -721,7 +721,20 @@ (cons (concat "\\." extension "\\'") 'imagemagick) image-type-file-name-regexps))))) - + +;;; Inline stock images + +(defvar image-checkbox-checked + (create-image "\300\300\141\143\067\076\034\030" + 'xbm t :width 8 :height 8 :background "grey75" + :foreground "black" :relief -2 :ascent 'center) + "Image of a checked checkbox.") + +(defvar image-checkbox-unchecked + (create-image (make-string 8 0) + 'xbm t :width 8 :height 8 :background "grey75" + :foreground "black" :relief -2 :ascent 'center) + "Image of an unchecked checkbox.") (provide 'image) === modified file 'lisp/startup.el' --- lisp/startup.el 2010-08-29 16:17:13 +0000 +++ lisp/startup.el 2010-10-11 04:49:59 +0000 @@ -1563,23 +1563,21 @@ (kill-buffer "*GNU Emacs*"))) " ") (when (or user-init-file custom-file) - (let ((checked (create-image "\300\300\141\143\067\076\034\030" - 'xbm t :width 8 :height 8 :background "grey75" - :foreground "black" :relief -2 :ascent 'center)) - (unchecked (create-image (make-string 8 0) - 'xbm t :width 8 :height 8 :background "grey75" - :foreground "black" :relief -2 :ascent 'center))) - (insert-button - " " :on-glyph checked :off-glyph unchecked 'checked nil - 'display unchecked 'follow-link t - 'action (lambda (button) - (if (overlay-get button 'checked) - (progn (overlay-put button 'checked nil) - (overlay-put button 'display (overlay-get button :off-glyph)) - (setq startup-screen-inhibit-startup-screen nil)) - (overlay-put button 'checked t) - (overlay-put button 'display (overlay-get button :on-glyph)) - (setq startup-screen-inhibit-startup-screen t))))) + (insert-button + " " + :on-glyph image-checkbox-checked + :off-glyph image-checkbox-unchecked + 'checked nil 'display image-checkbox-unchecked 'follow-link t + 'action (lambda (button) + (if (overlay-get button 'checked) + (progn (overlay-put button 'checked nil) + (overlay-put button 'display + (overlay-get button :off-glyph)) + (setq startup-screen-inhibit-startup-screen nil)) + (overlay-put button 'checked t) + (overlay-put button 'display + (overlay-get button :on-glyph)) + (setq startup-screen-inhibit-startup-screen t)))) (fancy-splash-insert :face '(variable-pitch (:height 0.9)) " Never show it again."))))) === modified file 'lisp/wid-edit.el' --- lisp/wid-edit.el 2010-10-09 03:23:38 +0000 +++ lisp/wid-edit.el 2010-10-11 04:49:59 +0000 @@ -2195,19 +2195,9 @@ ;; We could probably do the same job as the images using single ;; space characters in a boxed face with a stretch specification to ;; make them square. - :on-glyph '(create-image "\300\300\141\143\067\076\034\030" - 'xbm t :width 8 :height 8 - :background "grey75" ; like default mode line - :foreground "black" - :relief -2 - :ascent 'center) + :on-glyph image-checkbox-checked :off "[ ]" - :off-glyph '(create-image (make-string 8 0) - 'xbm t :width 8 :height 8 - :background "grey75" - :foreground "black" - :relief -2 - :ascent 'center) + :off-glyph image-checkbox-unchecked :help-echo "Toggle this item." :action 'widget-checkbox-action) ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.