Skip to content

Commit

Permalink
Drop old Emacsen support
Browse files Browse the repository at this point in the history
Remove things used for keeping compatibility with Emacs 24 and older;
Drop XEmacs support;
Use cl-lib rather than cl as much as possible;
Use declare-function instead of autoload for non-existent functions;
Remove old face name aliases;
Remove coding cookie for utf-8 as that is Emacs' default for .el files;
Remove "*" from docstring for defcustom and defface

* .travis.yml, Makefile.in, aclocal.m4, configure.in, doc/Makefile.in
* doc/emacs-w3m-ja.texi, doc/emacs-w3m.texi
* attic/addpath.el, bookmark-w3m.el, mew-w3m.el, mime-w3m.el, octet.el
* w3m-antenna.el, w3m-bookmark.el, w3m-bug.el, w3m-cookie.el
* w3m-dtree.el, w3m-ems.el, w3m-favicon.el, w3m-fb.el, w3m-filter.el
* w3m-form.el, w3m-hist.el, w3m-image.el, w3m-lnum.el, w3m-mail.el
* w3m-namazu.el, w3m-perldoc.el, w3m-proc.el, w3m-rss.el, w3m-save.el
* w3m-search.el, w3m-session.el, w3m-symbol.el, w3m-tabmenu.el
* w3m-util.el, w3m-weather.el, w3m.el, w3mhack.el
* shimbun/{mew-shimbun.el, nnshimbun.el, sb-2ch.el, sb-airs.el}
* shimbun/{sb-asahi-mytown.el, sb-asahi.el, sb-atmarkit.el}
* shimbun/{sb-atom-hash.el, sb-atom.el, sb-cgi-board.el, sb-chise.el}
* shimbun/{sb-cnet-jp.el, sb-cnet.el, sb-cnn-jp.el, sb-debian-jp.el}
* shimbun/{sb-debian.el, sb-dennou.el, sb-digiko.el, sb-emacs-w3m.el}
* shimbun/{sb-emacswiki.el, sb-engadget-ja.el, sb-excite.el, sb-fau.el}
* shimbun/{sb-fml.el, sb-geocrawler.el, sb-glimpse.el, sb-gnome.el}
* shimbun/{sb-hns.el, sb-ibm-dev.el, sb-impress.el, sb-itmedia.el}
* shimbun/{sb-javaconf.el, sb-jpo.el, sb-kantei.el, sb-kde.el}
* shimbun/{sb-kyoko-np.el, sb-lotusex.el, sb-m17n.el, sb-mailman.el}
* shimbun/{sb-mainichi.el, sb-meadow.el, sb-mew.el}
* shimbun/{sb-msports-nifty.el, sb-multi.el, sb-netbsd.el}
* shimbun/{sb-nikkangendai.el, sb-nikkansports.el, sb-nikkei.el}
* shimbun/{sb-nytimes.el, sb-orca.el, sb-palmfan.el}
* shimbun/{sb-pcweb-column.el, sb-pocketgames.el, sb-rakuten.el}
* shimbun/{sb-redhat.el, sb-rss.el, sb-ruby.el, sb-sankei.el}
* shimbun/{sb-savannah.el, sb-slashdot-jp.el, sb-sml.el}
* shimbun/{sb-sourceforge-jp.el, sb-tcup.el, sb-tdiary.el}
* shimbun/{sb-tech-on.el, sb-text.el, sb-tigris.el, sb-toshiba.el}
* shimbun/{sb-vinelinux.el, sb-wiki.el, sb-wikimedia.el}
* shimbun/{sb-wincefan.el, sb-wired-jp.el, sb-x51.el}
* shimbun/{sb-yahoo-auctions.el, sb-yahoo.el, sb-yomiuri-html.el}
* shimbun/{sb-yomiuri.el, sb-yoshirin.el, sb-zdnet-jp.el, shimbun.el}

Remove files

* w3m-ccl.el, w3m-ucs.el, w3m-xmas.el, attic/rfc2368.el
* doc/ptexinfmt.el, patches/*

New implementation for w3m-download ([emacs-w3m:13326])

* w3m (w3m-download): Use awk to divide the output of `w3m -dump_extra'
into header fed to Emacs and body to be saved in file;
note that awk should be GNU awk that supports BINMODE and RT.
(w3m-current-process): Modify docstring; now it's a list of processes.
(w3m-buffer-setup): Show downloading indicator in the mode-line.
(w3m--goto-url--valid-url): Treat w3m-current-process as a list.

* w3m-proc.el (w3m-process-filter): Show downloading indicators.
(w3m-process-modeline-string): Modify docstring; now it's an alist of
downloading progress informations.
(w3m-process-start-after): No need to reset w3m-process-modeline-string.
  • Loading branch information
yamaoka committed Jun 17, 2019
1 parent ade27b6 commit b5ec877
Show file tree
Hide file tree
Showing 134 changed files with 2,506 additions and 9,166 deletions.
31 changes: 0 additions & 31 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# .travis.yml for emacs-w3m (http://github.com/emacs-w3m/emacs-w3m/)

## cache could be a time-saver for
## + manually built xemacs21 on osx
## + apel/flim for all emacsen
## + but how to do it?
#cache:
Expand All @@ -28,20 +27,13 @@ matrix:
- os: osx
osx_image: xcode10.1
env: EMACS=emacs-snapshot
- os: linux
dist: xenial
env: EMACS=xemacs21
- os: osx
osx_image: xcode10.1
env: EMACS=xemacs21
- os: osx
osx_image: xcode10.1
env: EMACS=aquamacs
allow_failures:
- os: osx
osx_image: xcode10.1
env: EMACS=emacs-snapshot
- env: EMACS=xemacs21
- env: EMACS=aquamacs

install:
Expand Down Expand Up @@ -83,29 +75,6 @@ install:
brew install emacs --HEAD &&
brew install w3m;
fi
- if [ "$TRAVIS_OS_NAME--${EMACS}" = 'linux--xemacs21' ]; then
export EMACS_EXE=xemacs21;
sudo apt-get -qq update &&
sudo apt-get -qq -f install &&
sudo apt-get -qq install xemacs21;
fi
- if [ "$TRAVIS_OS_NAME--${EMACS}" = 'osx--xemacs21' ]; then
export EMACS_EXE=xemacs21;
brew install gcc &&
orig_dir="${PWD}" &&
file_name="xemacs-21.4.24" &&
wget "http://ftp.xemacs.org/pub/xemacs/stable/${file_name}.tar.gz" &&
gzip -dc "${file_name}.tar.gz" | tar xf - &&
cd "${file_name}" &&
./configure --with-emacs=${EMACS_EXE} && make && sudo make install &&
cd /usr/local/lib/xemacs/xemacs-packages/ &&
pkg_url="http://ftp.xemacs.org/pub/xemacs/packages/" &&
for pkg_name in xemacs-base-2.46 efs-1.37 apel-1.36 ; do
wget "${pkg_url}${pkg_name}-pkg.tar.gz" &&
gzip -dc "${pkg_name}-pkg.tar.gz" | tar xf - ;
done &&
cd "${orig_dir}" ;
fi
- if [ "$TRAVIS_OS_NAME--${EMACS}" = 'osx--aquamacs' ]; then
export EMACS_EXE=aquamacs;
download_path=$(curl -s "https://api.github.com/repos/davidswelt/aquamacs-emacs/releases/latest" | grep 'browser_' | sed 's/.* .//;s/.$//') &&
Expand Down
64 changes: 64 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,67 @@
2019-06-17 Katsumi Yamaoka <yamaoka@jpl.org>

Drop old Emacsen support

Remove things used for keeping compatibility with Emacs 24 and older;
Drop XEmacs support;
Use cl-lib rather than cl as much as possible;
Use declare-function instead of autoload for non-existent functions;
Remove old face name aliases;
Remove coding cookie for utf-8 as that is Emacs' default for .el files;
Remove "*" from docstring for defcustom and defface

* .travis.yml, Makefile.in, aclocal.m4, configure.in, doc/Makefile.in
* doc/emacs-w3m-ja.texi, doc/emacs-w3m.texi
* attic/addpath.el, bookmark-w3m.el, mew-w3m.el, mime-w3m.el, octet.el
* w3m-antenna.el, w3m-bookmark.el, w3m-bug.el, w3m-cookie.el
* w3m-dtree.el, w3m-ems.el, w3m-favicon.el, w3m-fb.el, w3m-filter.el
* w3m-form.el, w3m-hist.el, w3m-image.el, w3m-lnum.el, w3m-mail.el
* w3m-namazu.el, w3m-perldoc.el, w3m-proc.el, w3m-rss.el, w3m-save.el
* w3m-search.el, w3m-session.el, w3m-symbol.el, w3m-tabmenu.el
* w3m-util.el, w3m-weather.el, w3m.el, w3mhack.el
* shimbun/{mew-shimbun.el, nnshimbun.el, sb-2ch.el, sb-airs.el}
* shimbun/{sb-asahi-mytown.el, sb-asahi.el, sb-atmarkit.el}
* shimbun/{sb-atom-hash.el, sb-atom.el, sb-cgi-board.el, sb-chise.el}
* shimbun/{sb-cnet-jp.el, sb-cnet.el, sb-cnn-jp.el, sb-debian-jp.el}
* shimbun/{sb-debian.el, sb-dennou.el, sb-digiko.el, sb-emacs-w3m.el}
* shimbun/{sb-emacswiki.el, sb-engadget-ja.el, sb-excite.el, sb-fau.el}
* shimbun/{sb-fml.el, sb-geocrawler.el, sb-glimpse.el, sb-gnome.el}
* shimbun/{sb-hns.el, sb-ibm-dev.el, sb-impress.el, sb-itmedia.el}
* shimbun/{sb-javaconf.el, sb-jpo.el, sb-kantei.el, sb-kde.el}
* shimbun/{sb-kyoko-np.el, sb-lotusex.el, sb-m17n.el, sb-mailman.el}
* shimbun/{sb-mainichi.el, sb-meadow.el, sb-mew.el}
* shimbun/{sb-msports-nifty.el, sb-multi.el, sb-netbsd.el}
* shimbun/{sb-nikkangendai.el, sb-nikkansports.el, sb-nikkei.el}
* shimbun/{sb-nytimes.el, sb-orca.el, sb-palmfan.el}
* shimbun/{sb-pcweb-column.el, sb-pocketgames.el, sb-rakuten.el}
* shimbun/{sb-redhat.el, sb-rss.el, sb-ruby.el, sb-sankei.el}
* shimbun/{sb-savannah.el, sb-slashdot-jp.el, sb-sml.el}
* shimbun/{sb-sourceforge-jp.el, sb-tcup.el, sb-tdiary.el}
* shimbun/{sb-tech-on.el, sb-text.el, sb-tigris.el, sb-toshiba.el}
* shimbun/{sb-vinelinux.el, sb-wiki.el, sb-wikimedia.el}
* shimbun/{sb-wincefan.el, sb-wired-jp.el, sb-x51.el}
* shimbun/{sb-yahoo-auctions.el, sb-yahoo.el, sb-yomiuri-html.el}
* shimbun/{sb-yomiuri.el, sb-yoshirin.el, sb-zdnet-jp.el, shimbun.el}

Remove files

* w3m-ccl.el, w3m-ucs.el, w3m-xmas.el, attic/rfc2368.el
* doc/ptexinfmt.el, patches/*

New implementation for w3m-download ([emacs-w3m:13326])

* w3m (w3m-download): Use awk to divide the output of `w3m -dump_extra'
into header fed to Emacs and body to be saved in file;
note that awk should be GNU awk that supports BINMODE and RT.
(w3m-current-process): Modify docstring; now it's a list of processes.
(w3m-buffer-setup): Show downloading indicator in the mode-line.
(w3m--goto-url--valid-url): Treat w3m-current-process as a list.

* w3m-proc.el (w3m-process-filter): Show downloading indicators.
(w3m-process-modeline-string): Modify docstring; now it's an alist of
downloading progress informations.
(w3m-process-start-after): No need to reset w3m-process-modeline-string.

2019-06-07 Katsumi Yamaoka <yamaoka@jpl.org>

* w3m.el (w3m-select-buffer-show-this-line)
Expand Down
71 changes: 19 additions & 52 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ datadir = @datadir@
infodir = @infodir@
lispdir = @lispdir@
srcdir = @srcdir@
PACKAGEDIR = @PACKAGEDIR@
ICONDIR = @ICONDIR@
ADDITIONAL_LOAD_PATH = @ADDITIONAL_LOAD_PATH@
GZIP_PROG = @GZIP_PROG@
Expand All @@ -19,12 +18,6 @@ EMACS = @EMACS@
VANILLA_FLAG = @VANILLA_FLAG@
FLAGS = $(VANILLA_FLAG) -batch -l $(srcdir)/w3mhack.el '$(ADDITIONAL_LOAD_PATH)'

## This is used to set the environment variable XEMACSDEBUG for XEmacs
## 21.5 in order to suppress warnings for Lisp shadows when XEmacs 21.5
## starts. This is used also for not installing w3m-ems.el for XEmacs
## and w3m-xmas.el for GNU Emacs.
XEMACSDEBUG = @XEMACSDEBUG@

IGNORES = w3mhack.el

PACKAGE = emacs-w3m
Expand All @@ -42,12 +35,12 @@ all-ja: lisp info-ja
lisp: Makefile
env test ! -f w3m-util.elc -o w3m-util.elc -nt w3m-util.el || $(MAKE) clean
env test ! -f w3m-proc.elc -o w3m-proc.elc -nt w3m-proc.el || $(MAKE) clean
$(XEMACSDEBUG) '$(EMACS)' $(FLAGS) -f w3mhack-compile
'$(EMACS)' $(FLAGS) -f w3mhack-compile

# `w3mhack-what-where' respects DESTDIR
what-where:
@$(XEMACSDEBUG) '$(EMACS)' $(FLAGS) -f w3mhack-what-where\
'$(lispdir)' '$(ICONDIR)' '$(PACKAGEDIR)' '$(infodir)'
@'$(EMACS)' $(FLAGS) -f w3mhack-what-where\
'$(lispdir)' '$(ICONDIR)' '$(infodir)'

info:
cd doc && $(MAKE) EMACS="$(EMACS)"
Expand All @@ -70,12 +63,6 @@ install-lisp: lisp
if test -f "$$p"; then\
case "$$p" in\
$(IGNORES)) ;;\
w3m-ems\.el) if test -z "$(XEMACSDEBUG)"; then\
echo "$(INSTALL_DATA) $$p \"$(DESTDIR)$(lispdir)/$$p\"";\
$(INSTALL_DATA) $$p "$(DESTDIR)$(lispdir)/$$p"; fi;;\
w3m-xmas\.el) if test -n "$(XEMACSDEBUG)"; then\
echo "$(INSTALL_DATA) $$p \"$(DESTDIR)$(lispdir)/$$p\"";\
$(INSTALL_DATA) $$p "$(DESTDIR)$(lispdir)/$$p"; fi;;\
*) echo "$(INSTALL_DATA) $$p \"$(DESTDIR)$(lispdir)/$$p\"";\
$(INSTALL_DATA) $$p "$(DESTDIR)$(lispdir)/$$p";;\
esac;\
Expand Down Expand Up @@ -148,30 +135,6 @@ install-info-ja: info-ja
@echo "cd doc && $(MAKE) EMACS=\"$(EMACS)\" infodir=\"$(DESTDIR)$(infodir)\" install-ja";\
cd doc && $(MAKE) EMACS="$(EMACS)" infodir="$(infodir)" install-ja

install-package:
@if test $(PACKAGEDIR) = NONE; then\
echo "What a pity! Your \"$(EMACS)\" does not support"\
"the package system.";\
else\
$(MAKE) lispdir="$(PACKAGEDIR)/lisp/w3m" install-lisp;\
$(MAKE) ICONDIR="$(PACKAGEDIR)/etc/images/w3m" install-icons30;\
$(MAKE) infodir="$(PACKAGEDIR)/info" install-info;\
echo $(XEMACSDEBUG) \'$(EMACS)\' $(FLAGS) -f w3mhack-make-package $(DESTDIR)$(PACKAGEDIR);\
$(XEMACSDEBUG) '$(EMACS)' $(FLAGS) -f w3mhack-make-package $(DESTDIR)$(PACKAGEDIR);\
fi

install-package-ja:
@if test $(PACKAGEDIR) = NONE; then\
echo "What a pity! Your \"$(EMACS)\" does not support"\
"the package system.";\
else\
$(MAKE) lispdir="$(PACKAGEDIR)/lisp/w3m" install-lisp;\
$(MAKE) ICONDIR="$(PACKAGEDIR)/etc/images/w3m" install-icons30;\
$(MAKE) infodir="$(PACKAGEDIR)/info" install-info-ja;\
echo $(XEMACSDEBUG) \'$(EMACS)\' $(FLAGS) -f w3mhack-make-package $(DESTDIR)$(PACKAGEDIR);\
$(XEMACSDEBUG) '$(EMACS)' $(FLAGS) -f w3mhack-make-package $(DESTDIR)$(PACKAGEDIR);\
fi

Makefile: Makefile.in config.status
$(srcdir)/config.status

Expand All @@ -183,7 +146,7 @@ configure: configure.in aclocal.m4

dist: Makefile w3m.elc
$(MAKE) tarball \
VERSION=`$(XEMACSDEBUG) '$(EMACS)' $(FLAGS) -f w3mhack-version 2>/dev/null` \
VERSION=`'$(EMACS)' $(FLAGS) -f w3mhack-version 2>/dev/null` \
BRANCH=`cvs status Makefile.in|grep "Sticky Tag:"|awk '{print $$3}'|sed 's,(none),HEAD,'`

tarball: CVS/Root CVS/Repository
Expand All @@ -205,8 +168,7 @@ tarball: CVS/Root CVS/Repository
rm -rf $(DISTDIR)

clean:
-rm -rf $(PACKAGE)* ;\
rm -f *~ *.elc shimbun/*.elc w3m-load.el ;\
-rm -f *~ *.elc shimbun/*.elc w3m-load.el;\
cd doc && $(MAKE) clean

distclean: clean
Expand All @@ -217,24 +179,27 @@ distclean: clean
.SUFFIXES: .elc .el

.el.elc:
@echo $(XEMACSDEBUG) \'$(EMACS)\' $(FLAGS) -f batch-byte-compile $*.el;\
$(XEMACSDEBUG) '$(EMACS)' $(FLAGS) -f batch-byte-compile $*.el
@echo $(EMACS) $(FLAGS) -f batch-byte-compile $*.el;\
'$(EMACS)' $(FLAGS) -f batch-byte-compile $*.el

slow: Makefile
@for i in `$(XEMACSDEBUG) '$(EMACS)' $(FLAGS) -f w3mhack-examine-modules 2>/dev/null`;\
@for i in `'$(EMACS)' $(FLAGS) -f w3mhack-examine-modules 2>/dev/null`;\
do $(MAKE) -s $$i; done

very-slow: clean Makefile
@args="$(VANILLA_FLAG) -batch";\
args="$$args -l $(srcdir)/attic/addpath.el '$(ADDITIONAL_LOAD_PATH)'";\
ename=`echo '$(EMACS)'| sed 's:.*/::g'`;\
echo "=============================================";\
echo "Compiling the 1st stage-----without elc files";\
echo "=============================================";\
for i in `$(XEMACSDEBUG) '$(EMACS)' $(FLAGS) -f w3mhack-examine-modules 2>/dev/null`;\
echo "EMACS=$(EMACS)";\
echo "ARGS=$$args";\
for i in `$(EMACS) $(FLAGS) -f w3mhack-examine-modules 2>/dev/null`;\
do\
j=`echo $$i| sed 's/elc$$/el/g'`;\
echo $(XEMACSDEBUG) \'$(EMACS)\' ARGS -f batch-byte-compile $$j;\
$(XEMACSDEBUG) '$(EMACS)' $$args -f batch-byte-compile $$j;\
echo $$ename ARGS -f batch-byte-compile $$j;\
'$(EMACS)' $$args -f batch-byte-compile $$j;\
mv $$i $$j"x";\
done;\
for i in `echo *.elx shimbun/*.elx`; do\
Expand All @@ -244,9 +209,11 @@ very-slow: clean Makefile
echo "==============================================";\
echo "Compiling the 2nd stage-----with all elc files";\
echo "==============================================";\
for i in `$(XEMACSDEBUG) '$(EMACS)' $(FLAGS) -f w3mhack-examine-modules 2>/dev/null`;\
echo "EMACS=$(EMACS)";\
echo "ARGS=$$args";\
for i in `'$(EMACS)' $(FLAGS) -f w3mhack-examine-modules 2>/dev/null`;\
do\
j=`echo $$i| sed 's/elc$$/el/g'`;\
echo $(XEMACSDEBUG) \'$(EMACS)\' ARGS -f batch-byte-compile $$j;\
$(XEMACSDEBUG) '$(EMACS)' $$args -f batch-byte-compile $$j;\
echo $$ename ARGS -f batch-byte-compile $$j;\
'$(EMACS)' $$args -f batch-byte-compile $$j;\
done
Loading

0 comments on commit b5ec877

Please sign in to comment.