1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

Merge from emacs--devo--0

Patches applied:

 * emacs--devo--0  (patch 751-770)

   - Update from CVS
   - Merge from emacs--rel--22
   - Update from CVS: lisp/textmodes/sgml-mode.el: Revert last change.
   - Merge from gnus--rel--5.10

 * emacs--rel--22  (patch 18-25)
 * gnus--rel--5.10  (patch 222-223)

   - Update from CVS

Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-208
This commit is contained in:
Miles Bader 2007-05-24 21:31:10 +00:00
commit 262be72a9a
77 changed files with 41724 additions and 40191 deletions

95
AUTHORS
View File

@ -334,9 +334,9 @@ Cheng Gao: changed MORE.STUFF flymake.el tips.texi url-dired.el
Chong Yidong: changed cus-edit.el simple.el files.el custom.el
display.texi longlines.el xdisp.c files.texi info.el keyboard.c
compile.el custom.texi text.texi frames.texi image-mode.el mouse.el
misc.texi startup.el wid-edit.el xterm.c cus-theme.el
and 295 other files
compile.el custom.texi text.texi xterm.c frames.texi image-mode.el
mouse.el misc.texi startup.el wid-edit.el cus-theme.el
and 296 other files
Chris Hanson: changed xscheme.el scheme.el xterm.c hpux.h x11term.c
hp9000s300.h keyboard.c process.c texinfmt.el emacsclient.c sort.el
@ -456,10 +456,10 @@ Dave Lambert: changed sol2-5.h xfns.c xterm.c xterm.h
Dave Love: wrote autoarg.el autoconf.el benchmark.el cfengine.el
code-pages.el elide-head.el georgian.el hl-line.el latin-8.el
latin-9.el latin1-disp.el python.el refill.el rfc1345.el
sgml-input.el smiley.el subst-big5.el subst-gb2312.el subst-jis.el
subst-ksc.el tool-bar.el ucs-tables.el uni-input.el utf-16.el
utf-7.el utf-8-lang.el welsh.el
latin-9.el latin1-disp.el python.el refill.el rfc1345.el sgml-input.el
smiley.el subst-big5.el subst-gb2312.el subst-jis.el subst-ksc.el
tool-bar.el ucs-tables.el uni-input.el utf-16.el utf-7.el utf-8-lang.el
welsh.el
and changed configure.in Makefile.in help.el fortran.el browse-url.el
mule-cmds.el simple.el xterm.c cus-edit.el files.el info.el mule.el
wid-edit.el fns.c vc.el rfc2047.el bindings.el cus-start.el buffer.c
@ -550,8 +550,8 @@ and changed w32menu.c w32term.c close.png close.xpm empty.png empty.xpm
David Reitter: wrote mailclient.el
and changed commands.h cus-edit.el easy-mmode.el emacsbug.el
emacsclient.c keymap.c macterm.c menu-bar.el minibuf.c sendmail.el
url-http.el
emacsclient.c keymap.c macterm.c menu-bar.el minibuf.c python.el
sendmail.el url-http.el
David Robinson: changed menu-bar.el x-win.el
@ -561,6 +561,8 @@ David Vazquez: changed m4-mode.el
David Z. Maze: changed nnml.el nnrss.el
Davis Herring: changed timeclock.el
Deanna Phillips: changed configure.in
Decklin Foster: changed nngateway.el
@ -597,7 +599,7 @@ Didier Verna: wrote gnus-diary.el nndiary.el
and changed nntp.el gnus-art.el gnus-msg.el gnus-group.el gnus-start.el
gnus-sum.el gnus-xmas.el gnus-picon.el gnus-salt.el cus-edit.el rect.el
dgnushack.el gnus-agent.el gnus-ems.el gnus-fun.el gnus-topic.el
message.el nnmail.el nnmbox.el smiley.el
gnus.texi message.el nnmail.el nnmbox.el smiley.el
Dirk Herrmann: changed bibtex.el
@ -634,7 +636,7 @@ and changed diary.el tex-mode.el cal-tex.el cal-mayan.el holiday.el
Edward O'connor: changed erc.el erc-viper.el erc-log.el erc-track.el
viper.el erc-backend.el erc-chess.el erc-dcc.el erc-ezbounce.el
erc-goodies.el erc-list.el erc-macs.el erc-match.el erc-ring.el
erc-stamp.el goto-addr.el
erc-stamp.el goto-addr.el python.el
Edwin Steiner: changed gnus-nocem.el
@ -649,9 +651,9 @@ Eli Tziperman: wrote rmail-spam-filter.el
Eli Zaretskii: wrote codepage.el rxvt.el tty-colors.el
and changed msdos.c Makefile.in makefile.w32-in files.el info.el fileio.c
startup.el mainmake.v2 config.bat menu-bar.el pc-win.el rmail.el
startup.el mainmake.v2 config.bat rmail.el menu-bar.el pc-win.el
simple.el msdos.h internal.el xfaces.c emacs.c frame.c dosfns.c
faces.el frame.el and 531 other files
faces.el frame.el and 532 other files
Emanuele Giaquinta: changed rxvt.el configure.in etags.c frame.el
sh-script.el text.texi
@ -746,8 +748,8 @@ Francesc Rocher: changed cus-start.el macterm.c w32term.c xdisp.c xterm.c
Francesco Potort,Al(B: wrote cmacexp.el
and changed etags.c man.el delta.h undigest.el etags.1 comint.el
configure.in uniquify.el latin-post.el rmail.el Makefile.in etags.el
latin-alt.el maintaining.texi sgml-mode.el data.c european.el
configure.in uniquify.el latin-post.el maintaining.texi rmail.el
Makefile.in etags.el latin-alt.el sgml-mode.el data.c european.el
filelock.c files.el generic-x.el gud.el and 43 other files
Francis J. Wright: wrote woman.el
@ -852,9 +854,9 @@ Giuseppe Scrivano: changed buffer.c configure.in sysdep.c xsmfns.c
Glenn Morris: changed f90.el diary-lib.el calendar.el fortran.el
calendar.texi appt.el sh-script.el Makefile.in timeclock.el cal-menu.el
files.el complete.el configure.in startup.el MACHINES abbrevs.texi
cal-hebrew.el cal-islam.el emacs.texi fr-refcard.tex holidays.el
and 145 other files
files.el complete.el configure.in programs.texi startup.el MACHINES
abbrevs.texi cal-hebrew.el cal-islam.el emacs.texi faq.texi
and 151 other files
Glynn Clements: wrote gamegrid.el snake.el tetris.el
@ -996,8 +998,8 @@ Ivar Rummelhoff: wrote winner.el
Iwamuro Motonori: changed gnus-kill.el
J.D. Smith: changed idlwave.el idlw-shell.el idlw-help.el idlw-rinfo.el
idlw-toolbar.el comint.el vc.el bibtex.el files.texi hideshow.el
idlw-complete-structtag.el idlwave.texi misc.texi mouse.el
idlw-toolbar.el comint.el idlwave.texi vc.el bibtex.el files.texi
hideshow.el idlw-complete-structtag.el misc.texi mouse.el
Jaap-Henk Hoepman: changed mm-decode.el
@ -1175,8 +1177,8 @@ Joel Ray Holveck: changed gnus-sum.el info.el
Joev Dubach: changed nntp.el
Johan Bockg,Ae(Brd: changed erc.el erc-backend.el cl-macs.el erc-match.el
erc-nickserv.el erc-ring.el erc-speak.el erc-track.el simple.el
align.el bytecomp.el calendar.el cl.texi custom.el dired-aux.el
custom.el erc-nickserv.el erc-ring.el erc-speak.el erc-track.el
simple.el align.el bytecomp.el calendar.el cl.texi dired-aux.el
dired-x.el display.texi erc-bbdb.el erc-button.el erc-compat.el
erc-dcc.el and 16 other files
@ -1281,9 +1283,9 @@ Juan Le,As(Bn Lahoz Garc,Am(Ba: wrote wdired.el
and changed files.el perl-mode.el
Juanma Barranquero: changed makefile.w32-in subr.el faces.el help-fns.el
files.el buffer.c simple.el w32fns.c emacsclient.c replace.el
files.el simple.el buffer.c w32fns.c emacsclient.c replace.el
vhdl-mode.el bs.el cperl-mode.el eval.c org.el process.c xdisp.c
idlwave.el sh-script.el window.c ada-mode.el and 628 other files
idlwave.el sh-script.el window.c ada-mode.el and 629 other files
Juergen Hoetzel: changed url-handlers.el
@ -1328,11 +1330,11 @@ Kailash C. Chowksey: changed HELLO Makefile.in ind-util.el kannada.el
Kanematsu Daiji: changed nnimap.el
Karl Berry: changed info.texi emacs.texi elisp.texi anti.texi
display.texi emacs-xtra.texi filelock.c gnu.texi mule.texi text.texi
building.texi cmdargs.texi copyright.el custom.texi customize.texi
dired.c faq.texi frames.texi help.texi lists.texi loading.texi
and 71 other files
Karl Berry: changed emacs.texi info.texi elisp.texi anti.texi
display.texi emacs-xtra.texi filelock.c gnu.texi mule.texi texinfo.tex
text.texi building.texi cmdargs.texi control.texi copyright.el
custom.texi customize.texi dired.c dired.texi faq.texi frames.texi
and 72 other files
Karl Chen: changed files.el align.el cc-vars.el gnus-art.el help-mode.el
jka-cmpr-hook.el make-mode.el perl-mode.el python.el tex-mode.el
@ -1696,10 +1698,9 @@ Martin Lorentzon: changed vc.el vc-cvs.el vc-hooks.el vc-rcs.el
Martin Neitzel: changed sc.el
Martin Rudalics: changed cus-edit.el wid-edit.el cus-start.el files.el
flyspell.el font-lock.el complete.el insdel.c macmenu.c syntax.c
w32menu.c wdired.el whitespace.el window.el xdisp.c xmenu.c
backups.texi buffer.c buffer.h casefiddle.c cc-mode.el
and 36 other files
flyspell.el font-lock.el complete.el insdel.c ispell.el macmenu.c
syntax.c w32menu.c wdired.el whitespace.el window.el xdisp.c xmenu.c
backups.texi buffer.c buffer.h casefiddle.c and 36 other files
Martin Stjernholm: wrote cc-bytecomp.el
and changed cc-engine.el cc-cmds.el cc-langs.el cc-defs.el cc-mode.el
@ -1838,10 +1839,10 @@ Michal Jankowski: changed insdel.c keyboard.c
Michal Nazarewicz: changed ispell.el
Micha,Ak(Bl Cadilhac: changed ido.el fill.el ispell.el anti.texi battery.el
blackbox.el bs.el cmuscheme.el complete.el cus-edit.el dispnew.c
faq.texi flyspell.el footnote.el glasses.el info.el life.el lpr.el
make-mode.el misc.texi pong.el and 9 other files
Micha,Ak(Bl Cadilhac: changed ido.el fill.el ispell.el Makefile anti.texi
battery.el blackbox.el bs.el cmuscheme.el complete.el cus-edit.el
dispnew.c faq.texi flyspell.el footnote.el fr-refcard.ps fr-refcard.tex
glasses.el info.el life.el lpr.el and 12 other files
Michelangelo Grigni: wrote ffap.el
and changed gnus-score.el
@ -1941,6 +1942,8 @@ Niimi Satoshi: changed pp.el search.c
Niklas Morberg: changed nnweb.el gnus-art.el nnimap.el spam.el
Nikolaj Schumacher: changed compile.el
Noah Friedman: wrote eldoc.el rlogin.el rsz-mini.el type-break.el
and changed comint.el emacs-buffer.gdb files.el mailabbrev.el sendmail.el
subr.el timer.el yow.el battery.el complete.el config.in configure.in
@ -2062,7 +2065,7 @@ and changed iso-acc.el process.c sysdep.c
Per Cederqvist: wrote ewoc.el
and changed vc.el vc-hooks.el diff-mode.el etags.c etags.el forms.el
hexl.el
hexl.el process.c
Per Persson: wrote gnus-vm.el
@ -2399,8 +2402,8 @@ and changed comint.el font-lock.el shell.el rmail.el fortran.el
Skip Collins: changed w32fns.c w32term.c w32term.h
Slawomir Nowaczyk: changed python.el TUTORIAL.pl flyspell.el ls-lisp.el
w32proc.c
Slawomir Nowaczyk: changed emacs.py python.el TUTORIAL.pl flyspell.el
ls-lisp.el w32proc.c
Spencer Thomas: changed dabbrev.el emacsclient.c emacsserver.c gnus.texi
server.el tcp.c unexec.c
@ -2414,7 +2417,7 @@ Stefan Monnier: wrote bibtex.el cvs-status.el diff-mode.el log-edit.el
reveal.el smerge-mode.el
and changed vc.el font-lock.el pcvs.el newcomment.el subr.el lisp.h
keyboard.c keymap.c tex-mode.el fill.el alloc.c compile.el files.el
regex.c simple.el easy-mmode.el info.el syntax.c vc-hooks.el xdisp.c
regex.c simple.el easy-mmode.el vc-hooks.el info.el syntax.c xdisp.c
sh-script.el and 518 other files
Steinar Bang: changed imap.el
@ -2424,7 +2427,7 @@ Stephan Stahl: changed which-func.el buff-menu.el buffer.c dired-x.texi
Stephen A. Wood: changed fortran.el
Stephen Berman: changed allout.el recentf.el
Stephen Berman: changed allout.el find-dired.el recentf.el
Stephen C. Gilardi: changed configure.in
@ -2460,7 +2463,7 @@ Steve Youngs: changed mh-utils.el mh-xemacs-compat.el dgnushack.el
Steven E. Harris: changed nnheader.el
Steven Huwig: changed python.el
Steven Huwig: changed emacs.py python.el
Steven L. Baur: wrote earcon.el footnote.el gnus-audio.el gnus-setup.el
and changed gnus-xmas.el gnus-msg.el add-log.el dgnushack.el edebug.el
@ -2680,7 +2683,7 @@ Werner Lemberg: wrote sisheng.el vntelex.el
and changed TUTORIAL.de Makefile.in calc.texi chinese.el czech.el
european.el idlwave.el reftex-vars.el reftex.el reftex.texi slovak.el
supercite.el .cvsignore advice.el calc-forms.el calc-sel.el calendar.el
china-util.el cl-macs.el cl.texi complete.el and 43 other files
china-util.el cl-macs.el cl.texi complete.el and 44 other files
Wes Hardaker: changed gnus-score.el gnus-art.el gnus-sum.el gnus-win.el
@ -2731,11 +2734,13 @@ Yagi Tatsuya: changed gnus-art.el gnus-start.el
Yamamoto Mitsuharu: changed macterm.c macfns.c mac-win.el mac.c macterm.h
macmenu.c macgui.h image.c macselect.c keyboard.c xdisp.c makefile.MPW
config.h emacs.c Makefile.in macos.texi darwin.h xfaces.c INSTALL
config.h emacs.c Makefile.in macos.texi INSTALL darwin.h xfaces.c
dispnew.c alloc.c and 77 other files
Yann Dirson: changed imenu.el
Yavor Doganov: changed emacs.1 etags.1
Yoichi Nakayama: changed browse-url.el finder.el man.el rfc2368.el
Yoni Rabkin Katzenell: changed faces.el whitespace.el

View File

@ -1,3 +1,26 @@
2007-05-22 Andreas Schwab <schwab@suse.de>
* configure.in: Prefer build_alias over host when host_alias is
not set.
* configure: Regenerate.
2007-05-20 Andreas Schwab <schwab@suse.de>
* configure.in: Remove empty AC_SUBST.
* configure: Regenerate.
2007-05-20 Nick Roberts <nickrob@snap.net.nz>
* configure.in: Use HAVE_GPM instead of HAVE_GPM_H and implement
it like others.
* configure: Regenerate.
2007-05-20 Nick Roberts <nickrob@snap.net.nz>
* configure.in (AC_CHECK_HEADERS) Add gpm.h.
(AC_CHECK_LIB): Add -lgpm.
* configure: Regenerate.
2007-05-03 Glenn Morris <rgm@gnu.org>
* configure: Tweak message about the absence of shell functions.

View File

@ -40,25 +40,24 @@ to the hack introduced on 2005-07-01 to fix some other Cleartype problem.
* BUGS
See the copy of this file on the EMACS_22_BASE branch.
** rcyeske@gmail.com, April 22: Failure to build on OpenBSD macppc.
OpenBSD compilation works on i386.
http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg00932.html
** Spurious redisplay bug not fixed.
http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg00443.html
http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg00732.html
NB the definitive copy of this file for Emacs 22 is on the
EMACS_22_BASE branch. Any entries below are automatically copied from
that branch. Do not make manual changes to this file on the trunk.
** michael.ewe@arcor.de, Apr 24: 22.0.98 not starting on Solaris 10/I386
http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg01113.html
** Takaaki.Ota@am.sony.com, May 2: table cell menu does not appear at the menubar
Bug is intermittent.
* FIXES FOR EMACS 22.2
** Install vc-hooks.el patch from trunk.
Here we list small fixes that arrived too late for Emacs 22.1, but
that should be installed on the release branch after 22.1 is released.
** Move some items from magic-mode-alist to file-start-mode-alist.
** Changes to six pbm icons in etc/images.
Sync change from trunk 2007-05-19.
** viper and tramp should not load cl at run time.
** yamaoka@jpl.org's patch for mail-extract-address-components problem.
* DOCUMENTATION

View File

@ -108,6 +108,11 @@
You may be prompted to rename or overwrite directories when using
djtarnt: simply type return to continue (this is harmless).
The precompiled binaries can be unpacked using unzip.exe from info-zip.org
if you do not already have other tools to do this.
% unzip some.zip
The precompiled binaries can be unpacked using unzip.exe from info-zip.org
if you do not already have other tools to do this.

View File

@ -25,135 +25,36 @@ rem along with GNU Emacs; see the file COPYING. If not, write to the
rem Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
rem Boston, MA 02110-1301, USA.
set ZIP=zip
rem Beware broken ports of tar. Recent cygwin versions work well, older
rem cygwin versions and the current MSys port have problems with DOS
rem line ends when reading file names from a file. Other ports have their
rem own problems too.
set TAR=tar
rem Make a copy of current Emacs source
if (%3) == () goto usage
if not (%4) == () goto %4
if not (%4) == (src) goto :lisp
:src
echo Create full source distribution, excluding leim
%TAR% --exclude leim --exclude _marker --exclude DOC --exclude DOC-X --exclude TAGS --exclude bin --exclude obj --exclude obj-spd --exclude oo --exclude oo-spd --exclude *~ --exclude *.rej -cvf - emacs-%1 | gzip -9 > %2-src.tar.gz
if not (%4) == () goto end
:lisp
echo Create limited elisp source distribution
%TAR% --exclude *.rej --exclude *.elc --exclude *~ -cvf - emacs-%1/lisp | gzip -9 > %2-lisp.tar.gz
if not (%4) == () goto end
:bin
set eld=emacs-%1/lisp
rem List of Lisp files that are not compiled and that should be
rem included in the bin distribution.
rem It would be better to generate this list automatically. It is the
rem list of all .el files for which there is no corresponding .elc
rem file, minus ldefs-boot.el. --lute
set elfiles=%eld%/cus-load.el %eld%/emacs-lisp/cl-specs.el %eld%/eshell/esh-groups.el %eld%/eshell/esh-maint.el %eld%/finder-inf.el %eld%/forms-d2.el %eld%/forms-pass.el %eld%/international/latin-1.el %eld%/international/latin-2.el %eld%/international/latin-3.el %eld%/international/latin-4.el %eld%/international/latin-5.el %eld%/international/latin-8.el %eld%/international/latin-9.el %eld%/international/mule-conf.el %eld%/language/czech.el %eld%/language/devanagari.el %eld%/language/english.el %eld%/language/georgian.el %eld%/language/greek.el %eld%/language/hebrew.el %eld%/language/japanese.el %eld%/language/kannada.el %eld%/language/korean.el %eld%/language/lao.el %eld%/language/malayalam.el %eld%/language/misc-lang.el %eld%/language/romanian.el %eld%/language/slovak.el %eld%/language/tamil.el %eld%/language/thai.el %eld%/language/utf-8-lang.el %eld%/loaddefs.el %eld%/loadup.el %eld%/mail/blessmail.el %eld%/mh-e/mh-acros.el %eld%/mh-e/mh-gnus.el %eld%/mh-e/mh-loaddefs.el %eld%/obsolete/keyswap.el %eld%/patcomp.el %eld%/paths.el %eld%/play/bruce.el %eld%/subdirs.el %eld%/term/AT386.el %eld%/term/apollo.el %eld%/term/bobcat.el %eld%/term/internal.el %eld%/term/iris-ansi.el %eld%/term/linux.el %eld%/term/lk201.el %eld%/term/news.el %eld%/term/vt102.el %eld%/term/vt125.el %eld%/term/vt200.el %eld%/term/vt201.el %eld%/term/vt220.el %eld%/term/vt240.el %eld%/term/vt300.el %eld%/term/vt320.el %eld%/term/vt400.el %eld%/term/vt420.el %eld%/term/wyse50.el %eld%/version.el
set fns_el=
for %%f in (emacs-%1/bin/fns*) do set fns_el=%fns_el% emacs-%1/bin/%%f
echo Create bin distribution
copy %3\README.W32 emacs-%1\README.W32
del #files# #elfiles#
for %%f in (emacs-%1/BUGS emacs-%1/README emacs-%1/README.W32) do echo %%f>>#files#
for %%f in (emacs-%1/bin/fns*) do echo emacs-%1/bin/%%f>>#elfiles#
for %%f in (emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp) do echo %%f>>#files#
for %%f in (emacs-%1/lock emacs-%1/site-lisp) do echo %%f>>#files#
for %%f in (%elfiles% emacs-%1/site-lisp/subdirs.el) do echo %%f>>#elfiles#
%TAR% --exclude temacs.exe --exclude emacs.mdp --exclude *.pdb --exclude *.opt --exclude "*.el" --exclude "*~" -T #files# -cvf %2-bin-i386.tar
%TAR% -T #elfiles# -rvf %2-bin-i386.tar
gzip -9 %2-bin-i386.tar
del emacs-%1\README.W32
rem del #files# #elfiles#
if not (%4) == () goto end
:fullbin
echo Create full bin distribution
copy %3\README.W32 emacs-%1\README.W32
%TAR% --exclude temacs.exe --exclude emacs.mdp --exclude *.pdb --exclude *.opt --exclude *~ -cvf - emacs-%1/BUGS emacs-%1/README emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp emacs-%1/lock emacs-%1/site-lisp | gzip -9 > %2-fullbin-i386.tar.gz
%ZIP% -x emacs.mdp -x *.pdb -x *.opt -x *~ -x CVS -9 emacs-%1/BUGS emacs-%1/README emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp %2-bin-i386.zip
del emacs-%1\README.W32
if not (%4) == () goto end
:leim
echo Create archive with precompiled leim files
%TAR% -cvf - emacs-%1/leim/leim-list.el emacs-%1/leim/quail emacs-%1/leim/ja-dic | gzip -9 > %2-leim.tar.gz
if not (%4) == () goto end
:undumped
echo Create archive with extra files needed for redumping emacs
copy %3\README-UNDUMP.W32 emacs-%1\README-UNDUMP.W32
copy %3\dump.bat emacs-%1\bin
if exist emacs-%1\src\obj-spd\i386\temacs.exe copy emacs-%1\src\obj-spd\i386\temacs.exe emacs-%1\bin
if exist emacs-%1\src\oo-spd\i386\temacs.exe copy emacs-%1\src\oo-spd\i386\temacs.exe emacs-%1\bin
%TAR% -cvf - emacs-%1/README-UNDUMP.W32 emacs-%1/bin/dump.bat emacs-%1/bin/temacs.exe | gzip -9 > %2-undumped-i386.tar.gz
del emacs-%1\bin\temacs.exe
del emacs-%1\bin\dump.bat
del emacs-%1\README-UNDUMP.W32
if not (%4) == () goto end
:barebin
echo Create archive with just the basic binaries and generated files
echo (the user needs to unpack the full source distribution for
echo everything else)
copy %3\README.W32 emacs-%1\README.W32
%TAR% -cvf - emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc/DOC emacs-%1/etc/DOC-X | gzip -9 > %2-barebin-i386.tar.gz
%ZIP% -9 emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc/DOC emacs-%1/etc/DOC-X %2-barebin-i386.zip
del emacs-%1\README.W32
if not (%4) == () goto end
goto end
rem Only do this if explicitly requested
:zipfiles
echo Create zip files for bin and lisp archives
mkdir distrib
cd distrib
gunzip -c ..\%2-bin-i386.tar.gz | %TAR% xf -
rem Need to split emacs.exe into fragments because it is too big now
rem to fit on a floppy even by itself.
copy %3\stitch.bat %2\bin
cd %2\bin
split -b 1000000 emacs.exe emacs
del emacs.exe
cd ..\..
zip -rp9 em%5bin %2
rm -rf %2
zipsplit -n 1400000 -b .. em%5bin.zip
del em%5bin.zip
gunzip -c ..\%2-lisp.tar.gz | %TAR% xf -
zip -rp9 em%5lis %2
rm -rf %2
zipsplit -n 1400000 -b .. em%5lis.zip
del em%5lis.zip
cd ..
goto end
:usage
echo Generate source and binary distributions of emacs.
echo Usage: %0 emacs-version dist-basename distfiles [lisp,bin,undumped,barebin]
echo Usage: %0 emacs-version dist-basename distfiles [bin,barebin]
echo (e.g., %0 19.34 emacs-19.34.5 d:\andrewi\distfiles)
echo Or: %0 emacs-version dist-basename distfiles "zipfiles" short-version
echo (e.g., %0 20.6 emacs-20.6 d:\andrewi\distfiles zipfiles 206)
:end
goto skipArchTag

227
configure vendored
View File

@ -412,10 +412,10 @@ else
fi
test \$exitcode = 0") || {
echo Please tell bug-autoconf@gnu.org about your system,
echo including any error possibly output before this message.
echo This can help us improve future autoconf versions.
echo Configuration will now proceed without shell functions.
echo No shell found that supports shell functions.
echo Please tell autoconf@gnu.org about your system,
echo including any error possibly output before this
echo message
}
@ -683,7 +683,6 @@ LIBSOUND
PKG_CONFIG
ALSA_CFLAGS
ALSA_LIBS
CFLAGS_SOUND
SET_MAKE
XMKMF
@ -1350,6 +1349,7 @@ Optional Packages:
--with-png use -lpng for displaying PNG images
--with-freetype use -lfreetype for local fonts support
--with-xft use -lXft for anti aliased fonts
--with-gpm use -lgpm for mouse support on a GNU/Linux console
--with-gtk use GTK (same as --with-x-toolkit=gtk)
--with-pkg-config-prog Path to pkg-config to use for finding GTK
--without-toolkit-scroll-bars
@ -1964,6 +1964,12 @@ if test "${with_xft+set}" = set; then
fi
# Check whether --with-gpm was given.
if test "${with_gpm+set}" = set; then
withval=$with_gpm;
fi
# Check whether --with-gtk was given.
if test "${with_gtk+set}" = set; then
withval=$with_gtk;
@ -2200,7 +2206,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
canonical=$host
configuration=${host_alias-$host}
configuration=${host_alias-${build_alias-$host}}
@ -6522,7 +6528,6 @@ cat >>confdefs.h <<\_ACEOF
#define HAVE_ALSA 1
_ACEOF
fi
fi
@ -14327,6 +14332,213 @@ _ACEOF
fi
fi
### Use -lgpm if available, unless `--with-gpm=no'.
HAVE_GPM=no
if test "${with_gpm}" != "no"; then
if test "${ac_cv_header_gpm_h+set}" = set; then
{ echo "$as_me:$LINENO: checking for gpm.h" >&5
echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
if test "${ac_cv_header_gpm_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
else
# Is the header compilable?
{ echo "$as_me:$LINENO: checking gpm.h usability" >&5
echo $ECHO_N "checking gpm.h usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <gpm.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }
# Is the header present?
{ echo "$as_me:$LINENO: checking gpm.h presence" >&5
echo $ECHO_N "checking gpm.h presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <gpm.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
{ echo "$as_me:$LINENO: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: gpm.h: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
{ echo "$as_me:$LINENO: WARNING: gpm.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: gpm.h: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: gpm.h: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: gpm.h: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: gpm.h: see the Autoconf documentation" >&5
echo "$as_me: WARNING: gpm.h: see the Autoconf documentation" >&2;}
{ echo "$as_me:$LINENO: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: gpm.h: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: gpm.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: gpm.h: in the future, the compiler will take precedence" >&2;}
;;
esac
{ echo "$as_me:$LINENO: checking for gpm.h" >&5
echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
if test "${ac_cv_header_gpm_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_cv_header_gpm_h=$ac_header_preproc
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
fi
if test $ac_cv_header_gpm_h = yes; then
{ echo "$as_me:$LINENO: checking for Gpm_Open in -lgpm" >&5
echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6; }
if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lgpm $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char Gpm_Open ();
int
main ()
{
return Gpm_Open ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
ac_cv_lib_gpm_Gpm_Open=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_gpm_Gpm_Open=no
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_gpm_Gpm_Open" >&5
echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6; }
if test $ac_cv_lib_gpm_Gpm_Open = yes; then
HAVE_GPM=yes
fi
fi
fi
if test "${HAVE_GPM}" = "yes"; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_GPM 1
_ACEOF
fi
if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
{ echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
@ -23501,6 +23713,7 @@ echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
echo " Does Emacs use -lungif? ${HAVE_GIF}"
echo " Does Emacs use -lpng? ${HAVE_PNG}"
echo " Does Emacs use -lgpm? ${HAVE_GPM}"
echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
echo

View File

@ -117,6 +117,8 @@ AC_ARG_WITH(freetype,
[ --with-freetype use -lfreetype for local fonts support])
AC_ARG_WITH(xft,
[ --with-xft use -lXft for anti aliased fonts])
AC_ARG_WITH(gpm,
[ --with-gpm use -lgpm for mouse support on a GNU/Linux console])
AC_ARG_WITH(gtk,
[ --with-gtk use GTK (same as --with-x-toolkit=gtk)])
AC_ARG_WITH(pkg-config-prog,
@ -207,7 +209,7 @@ fi
AC_CANONICAL_HOST
canonical=$host
configuration=${host_alias-$host}
configuration=${host_alias-${build_alias-$host}}
dnl This used to use changequote, but, apart from `changequote is evil'
dnl per the autoconf manual, we can speed up autoconf somewhat by quoting
@ -1629,7 +1631,6 @@ if test "${with_sound}" != "no"; then
LIBSOUND="$LIBSOUND $ALSA_LIBS"
CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
AC_DEFINE(HAVE_ALSA, 1, [Define to 1 if ALSA is available.])
AC_SUBST()
fi
AC_SUBST(CFLAGS_SOUND)
fi
@ -2572,6 +2573,17 @@ if test "${HAVE_X11}" = "yes"; then
fi
fi
### Use -lgpm if available, unless `--with-gpm=no'.
HAVE_GPM=no
if test "${with_gpm}" != "no"; then
AC_CHECK_HEADER(gpm.h,
AC_CHECK_LIB(gpm, Gpm_Open, HAVE_GPM=yes))
fi
if test "${HAVE_GPM}" = "yes"; then
AC_DEFINE(HAVE_GPM, 1, [Define to 1 if you have the gpm library (-lgpm).])
fi
dnl Check for malloc/malloc.h on darwin
AC_CHECK_HEADER(malloc/malloc.h, AC_DEFINE(HAVE_MALLOC_MALLOC_H, 1, [Define to 1 if you have the <malloc/malloc.h> header file.]))
@ -3332,6 +3344,7 @@ echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
echo " Does Emacs use -lungif? ${HAVE_GIF}"
echo " Does Emacs use -lpng? ${HAVE_PNG}"
echo " Does Emacs use -lgpm? ${HAVE_GPM}"
echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
echo

View File

@ -1,3 +1,20 @@
2007-05-22 Glenn Morris <rgm@gnu.org>
* NEWS.22: New file with entries for Emacs 22.
* NEWS: Move Emacs 22 entries to new file NEWS.22, leave empty
template for next Emacs version.
2007-05-19 Glenn Morris <rgm@gnu.org>
* images/cancel.pbm: Convert from PGM to PBM.
* images/copy.pbm, images/next-node.pbm, images/prev-node.pbm:
* images/save.pbm, images/up-node.pbm: Convert from PPM to PBM.
2007-05-17 Glenn Morris <rgm@gnu.org>
* PROBLEMS (Dumping): Mention OpenBSD macppc problem.
2007-05-15 Micha,Ak(Bl Cadilhac <michael@cadilhac.name>
* fr-refcard.tex: Rewrite using German layout.

5452
etc/NEWS

File diff suppressed because it is too large Load Diff

5490
etc/NEWS.22 Normal file

File diff suppressed because it is too large Load Diff

View File

@ -148,6 +148,20 @@ Reportedly this patch in X fixes the problem.
}
return ret;
** Emacs crashes on startup after a glibc upgrade.
This is caused by a binary incompatible change to the malloc
implementation in glibc 2.5.90-22. As a result, Emacs binaries built
using prior versions of glibc crash when run under 2.5.90-22.
This problem was first seen in pre-release versions of Fedora 7, and
may be fixed in the final Fedora 7 release. To stop the crash from
happening, first try upgrading to the newest version of glibc; if this
does not work, rebuild Emacs with the same version of glibc that you
will run it under. For details, see
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=239344
* Crash bugs
** Emacs crashes in x-popup-dialog.
@ -2442,6 +2456,27 @@ This results from a bug in a VERY old version of GNU Sed. To solve
the problem, install the current version of GNU Sed, then rerun
Emacs's configure script.
*** Compiling on GNU/Linux fails due to a missing left operand in gnu-linux.h.
The error messages have the form:
../src/s/gnu-linux.h:49:24: error: operator '>' has no left operand
This error occurs because your system defines LINUX_VERSION_CODE in
the standard header file linux/version.h but does not give it a value.
As a workaround, you can edit the file src/s/gnu-linux.h to add the
needed definition. On the line after "#include <linux/version.h>",
add a line as shown below:
#include <linux/version.h>
#define LINUX_VERSION_CODE 132626
The number to use depends on your kernel version (the example shown is
for kernel 2.6.18). The number can be obtained by running the
following command in the shell:
uname -r | sed -e 's/\./ /g' -e 's/-.*//' | awk '{print $1*(2^16) + $2*(2^8) + $3}'
*** Building a 32-bit executable on a 64-bit GNU/Linux architecture.
First ensure that the necessary 32-bit system libraries and include
@ -2776,6 +2811,15 @@ Remove the "#if 0" and "#endif" directives which surround this, save
the file, and then reconfigure and rebuild Emacs. The dumping process
should now succeed.
*** OpenBSD 4.0 macppc: Segfault during dumping.
The build aborts with signal 11 when the command `./temacs --batch
--load loadup bootstrap' tries to load files.el. A workaround seems
to be to reduce the level of compiler optimization used during the
build (from -O2 to -O1). It is possible this is an OpenBSD
GCC problem specific to the macppc architecture, possibly only
occurring with older versions of GCC (e.g. 3.3.5).
** Installation
*** Installing Emacs gets an error running `install-info'.
@ -2790,6 +2834,14 @@ with spaces in the value, eg --enable-locallisppath='/path/with\ spaces'.
Using directory paths with spaces is not supported at this time: you
must re-configure without using spaces.
*** Installing to a directory with non-ASCII characters in the name fails.
Installation may fail, or the Emacs executable may not start
correctly, if a directory name containing non-ASCII characters is used
as a `configure' argument (e.g. `--prefix'). The problem can also
occur if a non-ASCII directory is specified in the EMACSLOADPATH
envvar.
*** On Solaris, use GNU Make when installing an out-of-tree build
The Emacs configuration process allows you to configure the

View File

@ -553,6 +553,10 @@ but which can also be used as a modifier).
** Cleanup all the GC_ mark bit stuff -- there is no longer any distinction
since the mark bit is no longer stored in the Lisp_Object itself.
** Refine the `predicate' arg to read-file-name.
Currently, it mixes up the predicate to apply when doing completion and the
one to use when terminating the selection.
** Merge ibuffer.el and buff-menu.el.
More specifically do what's needed to make ibuffer.el the default,
or just an extension of buff-menu.el.

View File

@ -404,6 +404,7 @@ Compilation killed at Wed Jul 20 12:20:10
Compilation terminated at Wed Jul 20 12:20:10
Compilation exited abnormally with code 1 at Wed Jul 20 12:21:12
Compilation finished at Thu Jul 21 15:02:15
Compilation segmentation fault at Thu Jul 13 10:55:49
Copyright (C) 2004, 2005, 2006, 2007

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +1,11 @@
2007-05-18 Francesco Potort,Al(B <pot@gnu.org>
* etags.c: Extern definitions of some more pointer functions for
standalone compilation, especially important for 64bit platforms.
(main, print_help): --members is now the default for etags.
(C_entries): Parse start of C comment as a space == end of token.
This is not necessary for C++ comment, already parsed as newline.
2007-04-26 Glenn Morris <rgm@gnu.org>
* makefile.w32-in (VERSION): Increase to 22.1.50.

View File

@ -60,10 +60,10 @@ University of California, as described above. */
/*
* Authors:
* Ctags originally by Ken Arnold.
* Fortran added by Jim Kleckner.
* Ed Pelegri-Llopart added C typedefs.
* Gnu Emacs TAGS format and modifications by RMS?
* 1983 Ctags originally by Ken Arnold.
* 1984 Fortran added by Jim Kleckner.
* 1984 Ed Pelegri-Llopart added C typedefs.
* 1985 Emacs TAGS format by Richard Stallman.
* 1989 Sam Kendall added C++.
* 1992 Joseph B. Wells improved C and C++ parsing.
* 1993 Francesco Potortì reorganised C and C++.
@ -80,7 +80,7 @@ University of California, as described above. */
* configuration file containing regexp definitions for etags.
*/
char pot_etags_version[] = "@(#) pot revision number is 17.26";
char pot_etags_version[] = "@(#) pot revision number is 17.31";
#define TRUE 1
#define FALSE 0
@ -159,7 +159,14 @@ char pot_etags_version[] = "@(#) pot revision number is 17.26";
# include <stdlib.h>
# include <string.h>
# else /* no standard C headers */
extern char *getenv ();
extern char *getenv ();
extern char *strcpy ();
extern char *strncpy ();
extern char *strcat ();
extern char *strncat ();
extern unsigned long strlen ();
extern PTR malloc ();
extern PTR realloc ();
# ifdef VMS
# define EXIT_SUCCESS 1
# define EXIT_FAILURE 0
@ -483,7 +490,7 @@ static char
*midtk = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz$0123456789";
static bool append_to_tagfile; /* -a: append to tags */
/* The next four default to TRUE for etags, but to FALSE for ctags. */
/* The next five default to TRUE for etags, but to FALSE for ctags. */
static bool typedefs; /* -t: create tags for C and Ada typedefs */
static bool typedefs_or_cplusplus; /* -T: create tags for C typedefs, level */
/* 0 struct/enum/union decls, and C++ */
@ -875,7 +882,7 @@ etags --help --lang=ada.");
# define EMACS_NAME "standalone"
#endif
#ifndef VERSION
# define VERSION "version"
# define VERSION "17.31"
#endif
static void
print_version ()
@ -969,7 +976,11 @@ Relative ones are stored relative to the output file's directory.\n");
puts ("--no-globals\n\
Do not create tag entries for global variables in some\n\
languages. This makes the tags file smaller.");
puts ("--no-members\n\
if (CTAGS)
puts ("--members\n\
Create tag entries for members of structures in some languages.");
else
puts ("--no-members\n\
Do not create tag entries for members of structures\n\
in some languages.");
@ -1215,7 +1226,7 @@ main (argc, argv)
if (!CTAGS)
{
typedefs = typedefs_or_cplusplus = constantypedefs = TRUE;
globals = TRUE;
globals = members = TRUE;
}
/* When the optstring begins with a '-' getopt_long does not rearrange the
@ -3397,17 +3408,15 @@ C_entries (c_ext, inf)
case '/':
if (*lp == '*')
{
lp++;
incomm = TRUE;
continue;
lp++;
c = ' ';
}
else if (/* cplpl && */ *lp == '/')
{
c = '\0';
break;
}
else
break;
break;
case '%':
if ((c_ext & YACC) && *lp == '%')
{

File diff suppressed because it is too large Load Diff

33360
lisp/ChangeLog.12 Normal file

File diff suppressed because it is too large Load Diff

View File

@ -186,33 +186,33 @@ If this contains a %s, that will be replaced by the matching rule."
(completing-read "Keyword, C-h: " v1 nil t))
str ", ") & -2 "
;; This file 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 2, or (at your option)
;; any later version.
\;; This file 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 2, or (at your option)
\;; any later version.
;; This file 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.
\;; This file 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; see the file COPYING. If not, write to
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
\;; You should have received a copy of the GNU General Public License
\;; along with GNU Emacs; see the file COPYING. If not, write to
\;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
\;; Boston, MA 02110-1301, USA.
;;; Commentary:
\;;; Commentary:
;; " _ "
\;; " _ "
;;; Code:
\;;; Code:
\(provide '"
(file-name-sans-extension (file-name-nondirectory (buffer-file-name)))
")
;;; " (file-name-nondirectory (buffer-file-name)) " ends here\n"))
\;;; " (file-name-nondirectory (buffer-file-name)) " ends here\n"))
"A list specifying text to insert by default into a new file.
Elements look like (CONDITION . ACTION) or ((CONDITION . DESCRIPTION) . ACTION).
CONDITION may be a regexp that must match the new file's name, or it may be

View File

@ -102,8 +102,9 @@ as it is by default."
;; This should get updated & resorted when you click on a column heading
(defvar Buffer-menu-sort-column nil
"2 for sorting by buffer names. 5 for sorting by file names.
nil for default sorting by visited order.")
"Which column to sort the menu on.
Use 2 to sort by buffer names, or 5 to sort by file names.
nil means sort by visited order (the default).")
(defconst Buffer-menu-buffer-column 4)

View File

@ -147,7 +147,7 @@ Any other non-nil version means case is not significant."
(defcustom dabbrev-upcase-means-case-search nil
"*The significance of an uppercase character in an abbreviation.
nil means case fold search when searching for possible expansions;
A nil value means case fold search when searching for possible expansions;
non-nil means case sensitive search.
This variable has an effect only when the value of

View File

@ -1360,10 +1360,10 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST."
(define-key map
[menu-bar regexp image-dired-mark-tagged-files]
'(menu-item "Mark From Image Tag..." image-dired-mark-tagged-files
:help "Mark files whose image tags matches regexp"))
:help "Mark files whose image tags matches regexp"))
(define-key map [menu-bar regexp dashes-1]
'("--"))
'("--"))
(define-key map [menu-bar regexp downcase]
'(menu-item "Downcase" dired-downcase
@ -1471,9 +1471,9 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST."
[menu-bar operate image-dired-display-thumbs]
'(menu-item "Display Image-Dired" image-dired-display-thumbs
:help "Display image-dired for current or marked image files"))
(define-key map [menu-bar operate dashes-3]
'("--"))
'("--"))
(define-key map [menu-bar operate query-replace]
'(menu-item "Query Replace in Files..." dired-do-query-replace-regexp
@ -2364,7 +2364,7 @@ Optional argument means return a file name relative to `default-directory'."
(defcustom dired-recursive-deletes nil ; Default only delete empty directories.
"*Decide whether recursive deletes are allowed.
nil means no recursive deletes.
A value of nil means no recursive deletes.
`always' means delete recursively without asking. This is DANGEROUS!
`top' means ask for each directory at top level, but delete its subdirectories
without asking.
@ -3101,7 +3101,7 @@ The idea is to set this buffer-locally in special dired buffers.")
(when (eq major-mode 'dired-mode)
(setq mode-name
(let (case-fold-search)
(cond ((string-match
(cond ((string-match
dired-sort-by-name-regexp dired-actual-switches)
"Dired by name")
((string-match
@ -3208,7 +3208,7 @@ To be called first in body of `dired-sort-other', etc."
(defcustom dired-recursive-copies nil
"*Decide whether recursive copies are allowed.
nil means no recursive copies.
A value of nil means no recursive copies.
`always' means copy recursively without asking.
`top' means ask for each directory at top level.
Anything else means ask for each directory."

View File

@ -92,7 +92,7 @@ against the file name, and TYPE is nil for text, t for binary.")
(defun find-buffer-file-type-coding-system (command)
"Choose a coding system for a file operation in COMMAND.
COMMAND is a list that specifies the operation, and I/O primitive as its
COMMAND is a list that specifies the operation, an I/O primitive, as its
CAR, and the arguments that might be given to that operation as its CDR.
If operation is `insert-file-contents', the coding system is chosen based
upon the filename (the CAR of the arguments beyond the operation), the contents
@ -109,6 +109,10 @@ and whether the file exists:
If the file exists: `undecided'
If the file does not exist: default-buffer-file-coding-system
Note that the CAR of arguments to `insert-file-contents' operation could
be a cons cell of the form \(FILENAME . BUFFER\), where BUFFER is a buffer
into which the file's contents were already read, but not yet decoded.
If operation is `write-region', the coding system is chosen based upon
the value of `buffer-file-coding-system' and `buffer-file-type'. If
`buffer-file-coding-system' is non-nil, its value is used. If it is

View File

@ -103,7 +103,7 @@ used (see below).
BODY contains code to execute each time the mode is activated or deactivated.
It is executed after toggling the mode,
and before running the hook variable `mode-HOOK'.
and before running the hook variable `MODE-hook'.
Before the actual body code, you can write keyword arguments (alternating
keywords and values). These following keyword arguments are supported (other
keywords will be passed to `defcustom' if the minor mode is global):
@ -486,7 +486,7 @@ BASE-next also tries to make sure that the whole entry is visible by
the next entry) and recentering if necessary.
ENDFUN should return the end position (with or without moving point).
NARROWFUN non-nil means to check for narrowing before moving, and if
found, do widen first and then call NARROWFUN with no args after moving."
found, do `widen' first and then call NARROWFUN with no args after moving."
(let* ((base-name (symbol-name base))
(prev-sym (intern (concat base-name "-prev")))
(next-sym (intern (concat base-name "-next")))

View File

@ -584,9 +584,12 @@ GOLD is the ASCII 7-bit escape sequence <ESC>OP.")
"Maps the SS3 function keys on the VT100 keyboard.
SS3 is DEC's name for the sequence <ESC>O.")
(defvar tpu-global-map nil "TPU-edt global keymap.")
(defvar tpu-original-global-map global-map
"Original non-TPU global keymap.")
(defvar tpu-global-map
(let ((map (make-sparse-keymap)))
(define-key map "\e[" CSI-map)
(define-key map "\eO" SS3-map)
map)
"TPU-edt global keymap.")
(and (not (boundp 'minibuffer-local-ns-map))
(defvar minibuffer-local-ns-map (make-sparse-keymap)
@ -2267,46 +2270,43 @@ Accepts a prefix argument for the number of tpu-pan-columns to scroll."
;;;
;;; Functions to set, reset, and toggle the control key bindings
;;;
(defun tpu-set-control-keys nil
(defvar tpu-control-keys-map
(let ((map (make-sparse-keymap)))
(define-key map "\C-\\" 'quoted-insert) ; ^\
(define-key map "\C-a" 'tpu-toggle-overwrite-mode) ; ^A
(define-key map "\C-b" 'repeat-complex-command) ; ^B
(define-key map "\C-e" 'tpu-current-end-of-line) ; ^E
(define-key map "\C-h" 'tpu-next-beginning-of-line) ; ^H (BS)
(define-key map "\C-j" 'tpu-delete-previous-word) ; ^J (LF)
(define-key map "\C-k" 'tpu-define-macro-key) ; ^K
(define-key map "\C-l" 'tpu-insert-formfeed) ; ^L (FF)
(define-key map "\C-r" 'recenter) ; ^R
(define-key map "\C-u" 'tpu-delete-to-bol) ; ^U
(define-key map "\C-v" 'tpu-quoted-insert) ; ^V
(define-key map "\C-w" 'redraw-display) ; ^W
(define-key map "\C-z" 'tpu-exit) ; ^Z
map))
(defun tpu-set-control-keys ()
"Set control keys to TPU style functions."
(define-key global-map "\C-\\" 'quoted-insert) ; ^\
(define-key global-map "\C-a" 'tpu-toggle-overwrite-mode) ; ^A
(define-key global-map "\C-b" 'repeat-complex-command) ; ^B
(define-key global-map "\C-e" 'tpu-current-end-of-line) ; ^E
(define-key global-map "\C-h" 'tpu-next-beginning-of-line) ; ^H (BS)
(define-key global-map "\C-j" 'tpu-delete-previous-word) ; ^J (LF)
(define-key global-map "\C-k" 'tpu-define-macro-key) ; ^K
(define-key global-map "\C-l" 'tpu-insert-formfeed) ; ^L (FF)
(define-key global-map "\C-r" 'recenter) ; ^R
(define-key global-map "\C-u" 'tpu-delete-to-bol) ; ^U
(define-key global-map "\C-v" 'tpu-quoted-insert) ; ^V
(define-key global-map "\C-w" 'redraw-display) ; ^W
(define-key global-map "\C-z" 'tpu-exit) ; ^Z
(setq tpu-control-keys t))
(tpu-reset-control-keys 'tpu))
(defun tpu-reset-control-keys (tpu-style)
"Set control keys to TPU or Emacs style functions."
(let* ((tpu (and tpu-style (not tpu-control-keys)))
(emacs (and (not tpu-style) tpu-control-keys))
(doit (or tpu emacs)))
(cond (doit
(if emacs (setq tpu-global-map (copy-keymap global-map)))
(let ((map (if tpu tpu-global-map tpu-original-global-map)))
(define-key global-map "\C-\\" (lookup-key map "\C-\\")) ; ^\
(define-key global-map "\C-a" (lookup-key map "\C-a")) ; ^A
(define-key global-map "\C-b" (lookup-key map "\C-b")) ; ^B
(define-key global-map "\C-e" (lookup-key map "\C-e")) ; ^E
(define-key global-map "\C-h" (lookup-key map "\C-h")) ; ^H (BS)
(define-key global-map "\C-j" (lookup-key map "\C-j")) ; ^J (LF)
(define-key global-map "\C-k" (lookup-key map "\C-k")) ; ^K
(define-key global-map "\C-l" (lookup-key map "\C-l")) ; ^L (FF)
(define-key global-map "\C-r" (lookup-key map "\C-r")) ; ^R
(define-key global-map "\C-u" (lookup-key map "\C-u")) ; ^U
(define-key global-map "\C-v" (lookup-key map "\C-v")) ; ^V
(define-key global-map "\C-w" (lookup-key map "\C-w")) ; ^W
(define-key global-map "\C-z" (lookup-key map "\C-z")) ; ^Z
(setq tpu-control-keys tpu-style))))))
(let ((parent (keymap-parent tpu-global-map)))
(if tpu-style
(if (eq parent tpu-control-keys-map)
nil ;All done already.
;; Insert tpu-control-keys-map in the global map.
(set-keymap-parent tpu-control-keys-map parent)
(set-keymap-parent tpu-global-map tpu-control-keys-map))
(if (not (eq parent tpu-control-keys-map))
nil ;All done already.
;; Remove tpu-control-keys-map from the global map.
(set-keymap-parent tpu-global-map (keymap-parent parent))
(set-keymap-parent tpu-control-keys-map nil)))
(setq tpu-control-keys tpu-style)))
(defun tpu-toggle-control-keys nil
"Toggles control key bindings between TPU-edt and Emacs."
@ -2447,8 +2447,11 @@ If FILE is nil, try to load a default file. The default file names are
(defun tpu-edt-on ()
"Turn on TPU/edt emulation."
(interactive)
(and window-system (tpu-load-xkeys nil))
(tpu-arrow-history)
;; First, activate tpu-global-map, while protecting the original keymap.
(set-keymap-parent tpu-global-map global-map)
(setq global-map tpu-global-map)
(use-global-map global-map)
;; Then do the normal TPU setup.
(transient-mark-mode t)
(add-hook 'post-command-hook 'tpu-search-highlight)
(tpu-set-mode-line t)
@ -2457,10 +2460,14 @@ If FILE is nil, try to load a default file. The default file names are
(setq-default page-delimiter "\f")
(setq-default truncate-lines t)
(setq scroll-step 1)
(setq global-map (copy-keymap global-map))
(tpu-set-control-keys)
(define-key global-map "\e[" CSI-map)
(define-key global-map "\eO" SS3-map)
(and window-system (tpu-load-xkeys nil))
(tpu-arrow-history)
;; Then protect tpu-global-map from user modifications.
(let ((map (make-sparse-keymap)))
(set-keymap-parent map global-map)
(setq global-map map)
(use-global-map map))
(setq tpu-edt-mode t))
(defun tpu-edt-off ()
@ -2472,8 +2479,13 @@ If FILE is nil, try to load a default file. The default file names are
(setq-default page-delimiter "^\f")
(setq-default truncate-lines nil)
(setq scroll-step 0)
(setq global-map tpu-original-global-map)
(use-global-map global-map)
;; Remove tpu-global-map from the global map.
(let ((map global-map))
(while map
(let ((parent (keymap-parent map)))
(if (eq tpu-global-map parent)
(set-keymap-parent map (keymap-parent parent))
(setq map parent)))))
(setq tpu-edt-mode nil))
(provide 'tpu-edt)

View File

@ -1924,7 +1924,7 @@ since only a single case-insensitive search through the alist is made."
("\\.[sS]\\'" . asm-mode)
("\\.asm\\'" . asm-mode)
("[cC]hange\\.?[lL]og?\\'" . change-log-mode)
("[cC]hange[lL]og[-.][0-9]+\\'" . change-log-mode)
("[cC]hange[lL]og[-.][-0-9a-z]+\\'" . change-log-mode)
("\\$CHANGE_LOG\\$\\.TXT" . change-log-mode)
("\\.scm\\.[0-9]*\\'" . scheme-mode)
("\\.[ck]?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode)
@ -1985,6 +1985,8 @@ since only a single case-insensitive search through the alist is made."
("[:/]_emacs\\'" . emacs-lisp-mode)
("/crontab\\.X*[0-9]+\\'" . shell-script-mode)
("\\.ml\\'" . lisp-mode)
;; Common Lisp ASDF package system.
("\\.asd\\'" . lisp-mode)
("\\.\\(asn\\|mib\\|smi\\)\\'" . snmp-mode)
("\\.\\(as\\|mi\\|sm\\)2\\'" . snmpv2-mode)
("\\.\\(diffs?\\|patch\\|rej\\)\\'" . diff-mode)
@ -2119,7 +2121,19 @@ is assumed to be interpreted by the interpreter matched by the second group
of the regular expression. The mode is then determined as the mode
associated with that interpreter in `interpreter-mode-alist'.")
(defvar magic-mode-alist
(defvar magic-mode-alist nil
"Alist of buffer beginnings vs. corresponding major mode functions.
Each element looks like (REGEXP . FUNCTION) or (MATCH-FUNCTION . FUNCTION).
After visiting a file, if REGEXP matches the text at the beginning of the
buffer, or calling MATCH-FUNCTION returns non-nil, `normal-mode' will
call FUNCTION rather than allowing `auto-mode-alist' to decide the buffer's
major mode.
If FUNCTION is nil, then it is not called. (That is a way of saying
\"allow `auto-mode-alist' to decide for these files.\")")
(put 'magic-mode-alist 'risky-local-variable t)
(defvar magic-fallback-mode-alist
`((image-type-auto-detected-p . image-mode)
;; The < comes before the groups (but the first) to reduce backtracking.
;; TODO: UTF-16 <?xml may be preceded by a BOM 0xff 0xfe or 0xfe 0xff.
@ -2140,19 +2154,6 @@ associated with that interpreter in `interpreter-mode-alist'.")
. sgml-mode)
("%!PS" . ps-mode)
("# xmcd " . conf-unix-mode))
"Alist of buffer beginnings vs. corresponding major mode functions.
Each element looks like (REGEXP . FUNCTION) or (MATCH-FUNCTION . FUNCTION).
After visiting a file, if REGEXP matches the text at the beginning of the
buffer, or calling MATCH-FUNCTION returns non-nil, `normal-mode' will
call FUNCTION rather than allowing `auto-mode-alist' to decide the buffer's
major mode.
If FUNCTION is nil, then it is not called. (That is a way of saying
\"allow `auto-mode-alist' to decide for these files.\")")
(put 'magic-mode-alist 'risky-local-variable t)
(defvar file-start-mode-alist
nil
"Like `magic-mode-alist' but has lower priority than `auto-mode-alist'.
Each element looks like (REGEXP . FUNCTION) or (MATCH-FUNCTION . FUNCTION).
After visiting a file, if REGEXP matches the text at the beginning of the
@ -2161,19 +2162,20 @@ call FUNCTION, provided that `magic-mode-alist' and `auto-mode-alist'
have not specified a mode for this file.
If FUNCTION is nil, then it is not called.")
(put 'file-start-mode-alist 'risky-local-variable t)
(put 'magic-fallback-mode-alist 'risky-local-variable t)
(defvar magic-mode-regexp-match-limit 4000
"Upper limit on `magic-mode-alist' regexp matches.
Also applies to `file-start-mode-alist'.")
Also applies to `magic-fallback-mode-alist'.")
(defun set-auto-mode (&optional keep-mode-if-same)
"Select major mode appropriate for current buffer.
This checks for a -*- mode tag in the buffer's text, checks the
interpreter that runs this file against `interpreter-mode-alist',
compares the buffer beginning against `magic-mode-alist', or
compares the filename against the entries in `auto-mode-alist'.
To find the right major mode, this function checks for a -*- mode tag,
checks if it uses an interpreter listed in `interpreter-mode-alist',
matches the buffer beginning against `magic-mode-alist',
compares the filename against the entries in `auto-mode-alist',
then matches the buffer beginning against `magic-fallback-mode-alist'.
It does not check for the `mode:' local variable in the
Local Variables section of the file; for that, use `hack-local-variables'.
@ -2182,7 +2184,8 @@ If `enable-local-variables' is nil, this function does not check for a
-*- mode tag.
If the optional argument KEEP-MODE-IF-SAME is non-nil, then we
only set the major mode, if that would change it."
set the major mode only if that would change it. In other words
we don't actually set it to the same mode the buffer already has."
;; Look for -*-MODENAME-*- or -*- ... mode: MODENAME; ... -*-
(let (end done mode modes)
;; Find a -*- mode tag
@ -2284,7 +2287,7 @@ only set the major mode, if that would change it."
(when mode
(set-auto-mode-0 mode keep-mode-if-same)
(setq done t))))))
;; Next try matching the buffer beginning against file-start-mode-alist.
;; Next try matching the buffer beginning against magic-fallback-mode-alist.
(unless done
(if (setq done (save-excursion
(goto-char (point-min))
@ -2292,7 +2295,7 @@ only set the major mode, if that would change it."
(narrow-to-region (point-min)
(min (point-max)
(+ (point-min) magic-mode-regexp-match-limit)))
(assoc-default nil file-start-mode-alist
(assoc-default nil magic-fallback-mode-alist
(lambda (re dummy)
(if (functionp re)
(funcall re)

View File

@ -1,3 +1,8 @@
2007-05-24 Katsumi Yamaoka <yamaoka@jpl.org>
* message.el (message-narrow-to-headers-or-head): Ignore
mail-header-separator in the body.
2007-05-10 Reiner Steib <Reiner.Steib@gmx.de>
* gnus-art.el (gnus-article-mode): Fix comment about displaying

View File

@ -2225,14 +2225,12 @@ Point is left at the beginning of the narrowed-to region."
(widen)
(narrow-to-region
(goto-char (point-min))
(cond
((re-search-forward
(concat "^" (regexp-quote mail-header-separator) "\n") nil t)
(match-beginning 0))
((search-forward "\n\n" nil t)
(1- (point)))
(t
(point-max))))
(if (re-search-forward (concat "\\(\n\\)\n\\|^\\("
(regexp-quote mail-header-separator)
"\n\\)")
nil t)
(or (match-end 1) (match-beginning 2))
(point-max)))
(goto-char (point-min)))
(defun message-news-p ()

View File

@ -232,6 +232,23 @@ face (according to `face-differs-from-default-p')."
libname)
file))))
(defun find-source-lisp-file (file-name)
(let* ((elc-file (locate-file (concat file-name
(if (string-match "\\.el" file-name)
"c"
".elc"))
load-path))
(str (if (and elc-file (file-readable-p elc-file))
(with-temp-buffer
(insert-file-contents-literally elc-file nil 0 256)
(buffer-string))))
(src-file (and str
(string-match ";;; from file \\(.*\\.el\\)" str)
(match-string 1 str))))
(if (and src-file (file-readable-p src-file))
src-file
file-name)))
;;;###autoload
(defun describe-function-1 (function)
(let* ((def (if (symbolp function)
@ -309,6 +326,10 @@ face (according to `face-differs-from-default-p')."
;; but that's completely wrong when the user used load-file.
(princ (if (eq file-name 'C-source) "C source code" file-name))
(princ "'")
;; See if lisp files are present where they where installed from.
(if (not (eq file-name 'C-source))
(setq file-name (find-source-lisp-file file-name)))
;; Make a hyperlink to the library.
(with-current-buffer standard-output
(save-excursion

View File

@ -790,17 +790,37 @@ this, eval the following in the buffer to be saved:
(interactive)
;; If not in active mode do nothing but don't complain because this
;; may be bound to a hook.
(if (eq highlight-changes-mode 'active)
(let ((after-change-functions nil))
;; ensure hilit-chg-list is made and up to date
(hilit-chg-make-list)
;; remove our existing overlays
(hilit-chg-hide-changes)
;; for each change text property, increment it
(hilit-chg-map-changes 'hilit-chg-bump-change)
;; and display them all if active
(if (eq highlight-changes-mode 'active)
(hilit-chg-display-changes))))
(when (eq highlight-changes-mode 'active)
(let ((modified (buffer-modified-p))
(inhibit-modification-hooks t))
;; The `modified' related code tries to combine two goals: (1) Record the
;; rotation in `buffer-undo-list' and (2) avoid setting the modified flag
;; of the current buffer due to the rotation. We do this by inserting (in
;; `buffer-undo-list') entries restoring buffer-modified-p to nil before
;; and after the entry for the rotation.
(unless modified
;; Install the "before" entry.
(setq buffer-undo-list
(cons '(apply restore-buffer-modified-p nil)
buffer-undo-list)))
(unwind-protect
(progn
;; ensure hilit-chg-list is made and up to date
(hilit-chg-make-list)
;; remove our existing overlays
(hilit-chg-hide-changes)
;; for each change text property, increment it
(hilit-chg-map-changes 'hilit-chg-bump-change)
;; and display them all if active
(if (eq highlight-changes-mode 'active)
(hilit-chg-display-changes)))
(unless modified
;; Install the "after" entry.
(setq buffer-undo-list
(cons '(apply restore-buffer-modified-p nil)
buffer-undo-list))
(restore-buffer-modified-p nil)))))
;; This always returns nil so it is safe to use in write-file-functions
nil)

View File

@ -144,16 +144,17 @@ and showing the image as an image."
(message "Repeat this command to go back to displaying the image")))
;; Turn the image data into a real image, but only if the whole file
;; was inserted
(let* ((image
(if (and (buffer-file-name)
(not (file-remote-p (buffer-file-name)))
(let* ((filename (buffer-file-name))
(image
(if (and filename
(file-readable-p filename)
(not (file-remote-p filename))
(not (buffer-modified-p))
(not (and (boundp 'archive-superior-buffer)
archive-superior-buffer))
(not (and (boundp 'tar-superior-buffer)
tar-superior-buffer)))
(progn (clear-image-cache)
(create-image (buffer-file-name)))
(create-image filename)
(create-image
(string-make-unibyte
(buffer-substring-no-properties (point-min) (point-max)))
@ -169,6 +170,7 @@ and showing the image as an image."
(inhibit-read-only t)
(buffer-undo-list t)
(modified (buffer-modified-p)))
(image-refresh image)
(add-text-properties (point-min) (point-max) props)
(set-buffer-modified-p modified)
;; Inhibit the cursor when the buffer contains only an image,

View File

@ -292,43 +292,28 @@ be determined."
"Determine the type of image file FILE from its name.
Value is a symbol specifying the image type, or nil if type cannot
be determined."
(let ((types image-type-file-name-regexps)
type)
(while types
(if (string-match (car (car types)) file)
(setq type (cdr (car types))
types nil)
(setq types (cdr types))))
type))
(assoc-default file image-type-file-name-regexps 'string-match))
;;;###autoload
(defun image-type (file-or-data &optional type data-p)
(defun image-type (source &optional type data-p)
"Determine and return image type.
FILE-OR-DATA is an image file name or image data.
SOURCE is an image file name or image data.
Optional TYPE is a symbol describing the image type. If TYPE is omitted
or nil, try to determine the image type from its first few bytes
of image data. If that doesn't work, and FILE-OR-DATA is a file name,
of image data. If that doesn't work, and SOURCE is a file name,
use its file extension as image type.
Optional DATA-P non-nil means FILE-OR-DATA is a string containing image data."
(when (and (not data-p) (not (stringp file-or-data)))
(error "Invalid image file name `%s'" file-or-data))
(cond ((null data-p)
;; FILE-OR-DATA is a file name.
(unless (or type
(setq type (image-type-from-file-header file-or-data)))
(let ((extension (file-name-extension file-or-data)))
(unless extension
(error "Cannot determine image type"))
(setq type (intern extension)))))
(t
;; FILE-OR-DATA contains image data.
(unless type
(setq type (image-type-from-data file-or-data)))))
Optional DATA-P non-nil means SOURCE is a string containing image data."
(when (and (not data-p) (not (stringp source)))
(error "Invalid image file name `%s'" source))
(unless type
(error "Cannot determine image type"))
(unless (symbolp type)
(error "Invalid image type `%s'" type))
(setq type (if data-p
(image-type-from-data source)
(or (image-type-from-file-header source)
(image-type-from-file-name source))))
(or type (error "Cannot determine image type")))
(or (memq type image-types)
(error "Invalid image type `%s'" type))
type)
@ -343,30 +328,15 @@ Image types are symbols like `xbm' or `jpeg'."
;;;###autoload
(defun image-type-auto-detected-p ()
"Return t iff the current buffer contains an auto-detectable image.
This function is intended to be used from `magic-mode-alist' (which see).
This function is intended to be used from `magic-fallback-mode-alist'.
First, compare the beginning of the buffer with `image-type-header-regexps'.
If an appropriate image type is found, check if that image type can be
autodetected using the variable `image-type-auto-detectable'. Finally,
if `buffer-file-name' is non-nil, check if it matches another major mode
in `auto-mode-alist' apart from `image-mode'; if there is another match,
the autodetection is considered to have failed. Return t if all the above
steps succeed."
The buffer is considered to contain an auto-detectable image if
its beginning matches an image type in `image-type-header-regexps',
and that image type is present in `image-type-auto-detectable'."
(let* ((type (image-type-from-buffer))
(auto (and type (cdr (assq type image-type-auto-detectable)))))
(and auto
(or (eq auto t) (image-type-available-p type))
(or (null buffer-file-name)
(not (assoc-default
buffer-file-name
(delq nil (mapcar
(lambda (elt)
(unless (memq (or (car-safe (cdr elt))
(cdr elt))
'(image-mode image-mode-maybe))
elt))
auto-mode-alist))
'string-match))))))
(and type
(or (eq auto t) (image-type-available-p type)))))
;;;###autoload

View File

@ -288,7 +288,7 @@ It doesn't contain directory names or file name extensions added by Info.")
(defvar Info-current-subfile nil
"Info subfile that is actually in the *info* buffer now.
nil if current Info file is not split into subfiles.")
It is nil if current Info file is not split into subfiles.")
(defvar Info-current-node nil
"Name of node that Info is now looking at, or nil.")
@ -4075,7 +4075,8 @@ the variable `Info-file-list-for-emacs'."
;; Fontify http and ftp references
(goto-char (point-min))
(when not-fontified-p
(while (re-search-forward "[hf]t?tp://[^ \t\n\"`({<>})']+" nil t)
(while (re-search-forward "\\(https?\\|ftp\\)://[^ \t\n\"`({<>})']+"
nil t)
(add-text-properties (match-beginning 0) (match-end 0)
'(font-lock-face info-xref
mouse-face highlight

File diff suppressed because it is too large Load Diff

View File

@ -113,7 +113,7 @@ option will have no effect until you restart Emacs."
(t '(links uid gid))) ; GNU ls
"*A list of optional file attributes that ls-lisp should display.
It should contain none or more of the symbols: links, uid, gid.
nil (or an empty list) means display none of them.
A value of nil (or an empty list) means display none of them.
Concepts come from UNIX: `links' means count of names associated with
the file\; `uid' means user (owner) identifier\; `gid' means group

View File

@ -873,7 +873,17 @@ consing a string.)"
(mail-extr-nuke-char-at (point))
(forward-char 1))
(t
(forward-word 1)))
;; Do `(forward-word 1)', recognizing non-ASCII characters
;; except Latin-1 nbsp as words.
(while (progn
(skip-chars-forward "^\000-\177 ")
(and (not (eobp))
(eq ?w (char-syntax (char-after)))
(progn
(forward-word 1)
(and (not (eobp))
(> (char-after) ?\177)
(not (eq (char-after) ? )))))))))
(or (eq char ?\()
;; At the end of first address of a multiple address header.
(and (eq char ?,)

View File

@ -230,7 +230,7 @@ the test is surrounded by calls to `save-excursion' and
`save-match-data'.
The categories are sorted by MENU-SORT-KEY. Smaller keys are on top.
nil means don't display this menu.
A value of nil means don't display this menu.
MENU-TITLE is really a format. If you add %d in it, the %d is
replaced with the number of items in that menu.

View File

@ -95,9 +95,11 @@ Each element looks like (SERVER-REGEXP . CHANNEL-LIST)."
(defcustom rcirc-fill-column nil
"*Column beyond which automatic line-wrapping should happen.
If nil, use value of `fill-column'. If 'frame-width, use the
maximum frame width."
If nil, use value of `fill-column'.
If `window-width', use the window's width as maximum.
If `frame-width', use the frame's width as maximum."
:type '(choice (const :tag "Value of `fill-column'")
(const :tag "Full window width" window-width)
(const :tag "Full frame width" frame-width)
(integer :tag "Number of columns"))
:group 'rcirc)
@ -143,8 +145,7 @@ number. If zero or nil, no truncating is done."
:group 'rcirc)
(defcustom rcirc-scroll-show-maximum-output t
"*If non-nil, scroll buffer to keep the point at the bottom of
the window."
"*If non-nil, scroll buffer to keep the point at the bottom of the window."
:type 'boolean
:group 'rcirc)
@ -1245,6 +1246,8 @@ record activity."
(make-string (- text-start fill-start) ?\s)))
(fill-column (cond ((eq rcirc-fill-column 'frame-width)
(1- (frame-width)))
((eq rcirc-fill-column 'window-width)
(1- (window-width)))
(rcirc-fill-column
rcirc-fill-column)
(t fill-column))))

View File

@ -143,7 +143,6 @@ in `show-paren-style' after `show-paren-delay' seconds of Emacs idle time."
(let ((oldpos (point))
(dir (cond ((eq (syntax-class (syntax-after (1- (point)))) 5) -1)
((eq (syntax-class (syntax-after (point))) 4) 1)))
(window-start (window-start))
pos mismatch face)
;;
;; Find the other end of the sexp.
@ -248,13 +247,7 @@ in `show-paren-style' after `show-paren-delay' seconds of Emacs idle time."
;;
;; Always set the overlay face, since it varies.
(overlay-put show-paren-overlay 'priority show-paren-priority)
(overlay-put show-paren-overlay 'face face))
;; If there are continued lines, the above operations can
;; force redisplay to recenter the window (since there is no
;; way for it to know that the overlay changes to the buffer
;; are harmless). So reset the window-start.
(unless (window-minibuffer-p)
(set-window-start (selected-window) window-start)))
(overlay-put show-paren-overlay 'face face)))
;; show-paren-mode is nil in this buffer.
(and show-paren-overlay
(delete-overlay show-paren-overlay))

View File

@ -2315,7 +2315,7 @@ Sensible values are `cvs-examine', `cvs-status' and `cvs-quickdir'."
;;;###autoload
(defcustom cvs-dired-use-hook '(4)
"Whether or not opening a CVS directory should run PCL-CVS.
nil means never do it.
A value of nil means never do it.
ALWAYS means to always do it unless a prefix argument is given to the
command that prompted the opening of the directory.
Anything else means to do it only if the prefix arg is equal to this value."

View File

@ -1426,7 +1426,8 @@ Turning the mode on runs the normal hook `compilation-minor-mode-hook'."
process-status exit-status msg)
(cons msg exit-status)))
(omax (point-max))
(opoint (point)))
(opoint (point))
(cur-buffer (current-buffer)))
;; Record where we put the message, so we can ignore it later on.
(goto-char omax)
(insert ?\n mode-name " " (car status))
@ -1447,8 +1448,8 @@ Turning the mode on runs the normal hook `compilation-minor-mode-hook'."
(goto-char opoint))
(with-no-warnings
(if compilation-finish-function
(funcall compilation-finish-function (current-buffer) msg)))
(run-hook-with-args compilation-finish-functions (current-buffer) msg)))
(funcall compilation-finish-function cur-buffer msg)))
(run-hook-with-args 'compilation-finish-functions cur-buffer msg)))
;; Called when compilation process changes state.
(defun compilation-sentinel (proc msg)

View File

@ -3204,7 +3204,7 @@ will pop the mark twice, and
C-u \\[set-mark-command] \\[set-mark-command] \\[set-mark-command]
will pop the mark three times.
nil means \\[set-mark-command]'s behavior does not change
A value of nil means \\[set-mark-command]'s behavior does not change
after C-u \\[set-mark-command]."
:type 'boolean
:group 'editing-basics)
@ -3271,12 +3271,11 @@ purposes. See the documentation of `set-mark' for more information."
If the last global mark pushed was not in the current buffer,
also push LOCATION on the global mark ring.
Display `Mark set' unless the optional second arg NOMSG is non-nil.
In Transient Mark mode, activate mark if optional third arg ACTIVATE non-nil.
Novice Emacs Lisp programmers often try to use the mark for the wrong
purposes. See the documentation of `set-mark' for more information.
In Transient Mark mode, this does not activate the mark."
In Transient Mark mode, activate mark if optional third arg ACTIVATE non-nil."
(unless (null (mark t))
(setq mark-ring (cons (copy-marker (mark-marker)) mark-ring))
(when (> (length mark-ring) mark-ring-max)

View File

@ -1,7 +1,7 @@
;;; t-mouse.el --- mouse support within the text terminal
;; Authors: Alessandro Rubini and Ian T Zimmerman
;; Maintainer: Nick Roberts <nickrob@gnu.org>
;; Author: Nick Roberts <nickrob@gnu.org>
;; Maintainer: FSF
;; Keywords: mouse gpm linux
;; Copyright (C) 1994, 1995, 1998, 2006, 2007 Free Software Foundation, Inc.
@ -25,282 +25,43 @@
;;; Commentary:
;; This package provides access to mouse event as reported by the
;; gpm-Linux package. It uses the program "mev" to get mouse events.
;; It tries to reproduce the functionality offered by Emacs under X.
;; This package provides access to mouse event as reported by the gpm-Linux
;; package. It tries to reproduce the functionality offered by Emacs under X.
;; The "gpm" server runs under Linux, so this package is rather
;; Linux-dependent.
;; Modified by Nick Roberts for Emacs 22. In particular, the mode-line is
;; now position sensitive.
(defvar t-mouse-process nil
"Embeds the process which passes mouse events to Emacs.
It is used by the program t-mouse.")
(defvar t-mouse-filter-accumulator ""
"Accumulates input from the mouse reporting process.")
(defvar t-mouse-debug-buffer nil
"Events normally posted to command queue are printed here in debug mode.
See `t-mouse-start-debug'.")
(defvar t-mouse-current-xy '(0 . 0)
"Stores the last mouse position t-mouse has been told about.")
(defvar t-mouse-drag-start nil
"Whenever a drag starts in a special part of a window
\(not the text), the `translated' starting coordinates including the
window and part involved are saved here. This is necessary lest they
get re-translated when the button goes up, at which time window
configuration may have changed.")
(defvar t-mouse-prev-set-selection-function 'x-set-selection)
(defvar t-mouse-prev-get-selection-function 'x-get-selection)
(defvar t-mouse-swap-alt-keys nil
"When set, Emacs will handle mouse events with the right Alt
\(a.k.a. Alt-Ger) modifier, not with the regular left Alt modifier.
Useful for people who play strange games with their keyboard tables.")
(defvar t-mouse-fix-21 nil
"Enable brain-dead chords for 2 button mice.")
;; The file, t-mouse.el was originally written by Alessandro Rubini and Ian T
;; Zimmerman, and Emacs communicated with gpm through a client program called
;; mev. Now the interface with gpm is directly through a Unix socket, so this
;; file is reduced to a single minor mode macro call.
;;
;;; Code:
;; get the number of the current virtual console
(defun t-mouse-tty ()
"Return number of virtual terminal Emacs is running on, as a string.
For example, \"2\" for /dev/tty2."
(with-temp-buffer
(call-process "ps" nil t nil "h" (format "%s" (emacs-pid)))
(goto-char (point-min))
(if (or
;; Many versions of "ps", all different....
(re-search-forward " +tty\\(.?[0-9a-f]\\)" nil t)
(re-search-forward "p \\([0-9a-f]\\)" nil t)
(re-search-forward "v0\\([0-9a-f]\\)" nil t)
(re-search-forward "[0-9]+ +\\([0-9]+\\)" nil t)
(re-search-forward "[\\t ]*[0-9]+[\\t ]+\\([0-9]+\\)" nil t)
(re-search-forward " +vc/\\(.?[0-9a-f]\\)" nil t)
(re-search-forward " +pts/\\(.?[0-9a-f]\\)" nil t))
(buffer-substring (match-beginning 1) (match-end 1)))))
;; due to a horrible kludge in Emacs' keymap handler
;; (read_key_sequence) mouse clicks on funny parts of windows generate
;; TWO events, the first being a dummy of the sort '(mode-line).
;; That's why Per Abrahamsen's code in xt-mouse.el doesn't work for
;; the modeline, for instance.
;; now get this: the Emacs C code that generates these fake events
;; depends on certain things done by the very lowest level input
;; handlers; namely the symbols for the events (for instance
;; 'C-S-double-mouse-2) must have an 'event-kind property, set to
;; 'mouse-click. Since events from unread-command-events do not pass
;; through the low level handlers, they don't get this property unless
;; I set it myself. I imagine this has caused innumerable attempts by
;; hackers to do things similar to t-mouse to lose.
;; The next page of code is devoted to fixing this ugly problem.
;; WOW! a fully general powerset generator
;; (C) Ian Zimmerman Mon Mar 23 12:00:16 PST 1998 :-)
(defun t-mouse-powerset (l)
(if (null l) '(nil)
(let ((l1 (t-mouse-powerset (cdr l)))
(first (nth 0 l)))
(append
(mapcar (function (lambda (l) (cons first l))) l1) l1))))
;; and a slightly less general cartesian product
(defun t-mouse-cartesian (l1 l2)
(if (null l1) l2
(append (mapcar (function (lambda (x) (append (nth 0 l1) x))) l2)
(t-mouse-cartesian (cdr l1) l2))))
(let* ((modifier-sets (t-mouse-powerset '(control meta shift)))
(typed-sets (t-mouse-cartesian '((down) (drag))
'((mouse-1) (mouse-2) (mouse-3))))
(multipled-sets (t-mouse-cartesian '((double) (triple)) typed-sets))
(all-sets (t-mouse-cartesian modifier-sets multipled-sets)))
(while all-sets
(let ((event-sym (event-convert-list (nth 0 all-sets))))
(if (not (get event-sym 'event-kind))
(put event-sym 'event-kind 'mouse-click)))
(setq all-sets (cdr all-sets))))
(defun t-mouse-make-event-element (x-dot-y-avec-time)
(let* ((x-dot-y (nth 0 x-dot-y-avec-time))
(time (nth 1 x-dot-y-avec-time))
(x (car x-dot-y))
(y (cdr x-dot-y))
(w (window-at x y))
(ltrb (window-edges w))
(left (nth 0 ltrb))
(top (nth 1 ltrb))
(event (if w
(posn-at-x-y (- x left) (- y top) w t)
(append (list nil 'menu-bar)
(nthcdr 2 (posn-at-x-y x y))))))
(setcar (nthcdr 3 event) time)
event))
;;; This fun is partly Copyright (C) 1994 Per Abrahamsen <abraham@iesd.auc.dk>
(defun t-mouse-make-event ()
"Make a Lisp style event from the contents of mouse input accumulator.
Also trim the accumulator by all the data used to build the event."
(let (ob (ob-pos (condition-case nil
(progn
;; this test is just needed for Fedora Core 3
(if (string-match "STILL RUNNING_1\n"
t-mouse-filter-accumulator)
(setq t-mouse-filter-accumulator
(substring
t-mouse-filter-accumulator (match-end 0))))
(read-from-string t-mouse-filter-accumulator))
(error nil))))
;; this test is just needed for Fedora Core 3
(if (or (eq (car ob-pos) 'STILL) (eq (car ob-pos) '***) (not ob-pos))
nil
(setq ob (car ob-pos))
(if (string-match "mev:$" (prin1-to-string ob))
(error "Can't open mouse connection"))
(setq t-mouse-filter-accumulator
(substring t-mouse-filter-accumulator (cdr ob-pos)))
;;now the real work
(let ((event-type (nth 0 ob))
(current-xy-avec-time (nth 1 ob))
(type-switch (length ob)))
(if t-mouse-fix-21
(let
;;Acquire the event's symbol's name.
((event-name-string (symbol-name event-type))
end-of-root-event-name
new-event-name-string)
(if (string-match "-\\(21\\|\\12\\)$" event-name-string)
;;Transform the name to what it should have been.
(progn
(setq end-of-root-event-name (match-beginning 0))
(setq new-event-name-string
(concat (substring
event-name-string 0
end-of-root-event-name) "-3"))
;;Change the event to the symbol that corresponds to the
;;name we made. The proper symbol already exists.
(setq event-type
(intern new-event-name-string))))))
;;store current position for mouse-position
(setq t-mouse-current-xy (nth 0 current-xy-avec-time))
;;events have many types but fortunately they differ in length
(cond
((= type-switch 4) ;must be drag
(let ((count (nth 2 ob))
(start-element
(or t-mouse-drag-start
(t-mouse-make-event-element (nth 3 ob))))
(end-element
(t-mouse-make-event-element current-xy-avec-time)))
(setq t-mouse-drag-start nil)
(list event-type start-element end-element count)))
((= type-switch 3) ;down or up
(let ((count (nth 2 ob))
(element
(t-mouse-make-event-element current-xy-avec-time)))
(if (and (not t-mouse-drag-start)
(symbolp (nth 1 element)))
;; OUCH! GOTCHA! emacs uses setc[ad]r on these!
(setq t-mouse-drag-start (copy-sequence element))
(setq t-mouse-drag-start nil))
(list event-type element count)))
((= type-switch 2) ;movement
(list (if (eq 'vertical-scroll-bar
(nth 1 t-mouse-drag-start)) 'scroll-bar-movement
'mouse-movement)
(t-mouse-make-event-element current-xy-avec-time))))))))
(defun t-mouse-process-filter (proc string)
(setq t-mouse-filter-accumulator
(concat t-mouse-filter-accumulator string))
(let ((event (t-mouse-make-event)))
(while event
(if (or track-mouse
(not (eq 'mouse-movement (event-basic-type event))))
(setq unread-command-events
(nconc unread-command-events (list event))))
(if t-mouse-debug-buffer
(print unread-command-events t-mouse-debug-buffer))
(setq event (t-mouse-make-event)))))
(defun t-mouse-mouse-position-function (pos)
"Return the t-mouse-position unless running with a window system.
The (secret) scrollbar interface is not implemented yet."
(setcdr pos t-mouse-current-xy)
pos)
;; It should be possible to just send SIGTSTP to the inferior with
;; stop-process. That doesn't work; mev receives the signal fine but
;; is not really stopped: instead it returns from
;; kill(getpid(), SIGTSTP) immediately. I don't understand what's up
;; itz Tue Mar 24 14:27:38 PST 1998.
(add-hook 'suspend-hook
(function (lambda ()
(and t-mouse-process
;(stop-process t-mouse-process)
(process-send-string
t-mouse-process "push -enone -dall -Mnone\n")))))
(add-hook 'suspend-resume-hook
(function (lambda ()
(and t-mouse-process
;(continue-process t-mouse-process)
(process-send-string t-mouse-process "pop\n")))))
;;;###autoload
(define-minor-mode t-mouse-mode
"Toggle t-mouse mode.
"Toggle t-mouse mode to use the mouse in Linux consoles.
With prefix arg, turn t-mouse mode on iff arg is positive.
Turn it on to use Emacs mouse commands, and off to use t-mouse commands."
nil " Mouse" nil :global t
(unless window-system
This allows the use of the mouse when operating on a Linux console, in the
same way as you can use the mouse under X11.
It requires the `mev' program, part of the `gpm' utilities."
:global t :group 'mouse
(if window-system
(error "t-mouse only works in the console on GNU/Linux")
(if t-mouse-mode
;; Turn it on. Starts getting a stream of mouse events from an
;; asynchronous process. Only works if Emacs is running on a virtual
;; terminal without a window system.
(progn
(setq mouse-position-function #'t-mouse-mouse-position-function)
(let ((tty (t-mouse-tty))
(process-connection-type t))
(if (not (stringp tty))
(error "Cannot find a virtual terminal"))
(setq t-mouse-process
(start-process "t-mouse" nil
"mev" "-i" "-E" "-C" tty
(if t-mouse-swap-alt-keys
"-M-leftAlt" "-M-rightAlt")
"-e-move"
"-dall" "-d-hard"
"-f")))
(setq t-mouse-filter-accumulator "")
(set-process-filter t-mouse-process 't-mouse-process-filter)
(set-process-query-on-exit-flag t-mouse-process nil))
;; Turn it off
(setq mouse-position-function nil)
(delete-process t-mouse-process)
(setq t-mouse-process nil))))
(unless (fboundp 'term-open-connection)
(progn
(setq t-mouse-mode nil)
(error "Emacs must be built with Gpm to use this mode")))
(unless (term-open-connection)
(progn
(setq t-mouse-mode nil)
(error "Can't open mouse connection"))))
;; Turn it off
(term-close-connection))))
(provide 't-mouse)

View File

@ -361,6 +361,7 @@ MODE should be an integer which is a file mode value."
((eq type 29) ?M) ; multivolume continuation
((eq type 35) ?S) ; sparse
((eq type 38) ?V) ; volume header
((eq type 55) ?H) ; extended pax header
(t ?\s)
)
(tar-grind-file-mode mode)
@ -420,7 +421,7 @@ is visible (and the real data of the buffer is hidden)."
(buffer-substring pos (+ pos 512)))))))
(setq pos (+ pos 512))
(progress-reporter-update progress-reporter pos)
(if (eq (tar-header-link-type tokens) 20)
(if (memq (tar-header-link-type tokens) '(20 55))
;; Foo. There's an extra empty block after these.
(setq pos (+ pos 512)))
(let ((size (tar-header-size tokens)))
@ -662,13 +663,14 @@ appear on disk when you save the tar-file's buffer."
(size (tar-header-size tokens))
(link-p (tar-header-link-type tokens)))
(if link-p
(error "This is a %s, not a real file"
(cond ((eq link-p 5) "directory")
((eq link-p 20) "tar directory header")
((eq link-p 28) "next has longname")
((eq link-p 29) "multivolume-continuation")
((eq link-p 35) "sparse entry")
((eq link-p 38) "volume header")
(error "This is a%s, not a real file"
(cond ((eq link-p 5) " directory")
((eq link-p 20) " tar directory header")
((eq link-p 28) " next has longname")
((eq link-p 29) " multivolume-continuation")
((eq link-p 35) " sparse entry")
((eq link-p 38) " volume header")
((eq link-p 55) "n extended pax header")
(t "link"))))
(if (zerop size) (error "This is a zero-length file"))
descriptor))
@ -686,6 +688,12 @@ appear on disk when you save the tar-file's buffer."
(goto-char (posn-point (event-end event)))
(tar-extract))
(defun tar-file-name-handler (op &rest args)
"Helper function for `tar-extract'."
(or (eq op 'file-exists-p)
(let ((file-name-handler-alist nil))
(apply op args))))
(defun tar-extract (&optional other-window-p)
"In Tar mode, extract this entry of the tar file into its own buffer."
(interactive)
@ -727,9 +735,17 @@ appear on disk when you save the tar-file's buffer."
(and set-auto-coding-function
(funcall set-auto-coding-function
name (- end start)))
(car (find-operation-coding-system
'insert-file-contents
(cons name (current-buffer)) t))))
;; The following binding causes
;; find-buffer-file-type-coding-system
;; (defined on dos-w32.el) to act as if
;; the file being extracted existed, so
;; that the file's contents' encoding and
;; EOL format are auto-detected.
(let ((file-name-handler-alist
'(("" . tar-file-name-handler))))
(car (find-operation-coding-system
'insert-file-contents
(cons name (current-buffer)) t)))))
(if (or (not coding)
(eq (coding-system-type coding) 'undecided))
(setq coding (detect-coding-region start end t)))
@ -746,7 +762,9 @@ appear on disk when you save the tar-file's buffer."
(setq buffer-file-name new-buffer-file-name)
(setq buffer-file-truename
(abbreviate-file-name buffer-file-name))
(set-buffer-file-coding-system coding)
;; Force buffer-file-coding-system to what
;; decode-coding-region actually used.
(set-buffer-file-coding-system last-coding-system-used t)
;; Set the default-directory to the dir of the
;; superior buffer.
(setq default-directory

View File

@ -9,6 +9,9 @@
;; It can't really display underlines.
(tty-no-underline)
(condition-case nil (t-mouse-mode 1)
(error nil))
;; Make Latin-1 input characters work, too.
;; Meta will continue to work, because the kernel
;; turns that into Escape.

View File

@ -159,6 +159,11 @@ Leave one space between words, two at end of sentences or after colons
and `sentence-end-without-period').
Remove indentation from each line."
(interactive "*r")
;; Ideally, we'd want to scan the text from the end, so that changes to
;; text don't affect the boundary, but the regexp we match against does
;; not match as eagerly when matching backward, so we instead use
;; a marker.
(unless (markerp end) (setq end (copy-marker end t)))
(let ((end-spc-re (concat "\\(" (sentence-end) "\\) *\\| +")))
(save-excursion
(goto-char beg)

View File

@ -1639,7 +1639,7 @@ quit spell session exited."
;; to avoid collapsing markers before and after
;; into a single place.
(ispell-insert-word new-word)
(delete-region (point) (+ (point) (- end start)))
(delete-region (point) end)
;; It is meaningless to preserve the cursor position
;; inside a word that has changed.
(setq cursor-location (point))
@ -1721,8 +1721,8 @@ which is in `ispell-local-dictionary-alist' or `ispell-dictionary-alist'."
;; return dummy word when just flagging misspellings
(list "" (point) (point))
(error "No word found to check!"))
(setq start (match-beginning 0)
end (point)
(setq start (copy-marker (match-beginning 0))
end (point-marker)
word (buffer-substring-no-properties start end))
(list word start end))))
@ -2453,7 +2453,12 @@ When asynchronous processes are not supported, `run' is always returned."
(defun ispell-start-process ()
"Start the ispell process, with support for no asynchronous processes.
Keeps argument list for future ispell invocations for no async support."
(let (args)
(let ((default-directory default-directory)
args)
(unless (and (file-directory-p default-directory)
(file-readable-p default-directory))
;; Defend against bad `default-directory'.
(setq default-directory (expand-file-name "~/")))
;; Local dictionary becomes the global dictionary in use.
(setq ispell-current-dictionary
(or ispell-local-dictionary ispell-dictionary))

View File

@ -37,7 +37,7 @@
(defcustom display-time-mail-file nil
"*File name of mail inbox file, for indicating existence of new mail.
Non-nil and not a string means don't check for mail. nil means use
Non-nil and not a string means don't check for mail; nil means use
default, which is system-dependent, and is the same as used by Rmail."
:type '(choice (const :tag "None" none)
(const :tag "Default" nil)
@ -94,7 +94,7 @@ past 15 minutes. The default is to display 1 minute load average."
(defcustom display-time-24hr-format nil
"*Non-nil indicates time should be displayed as hh:mm, 0 <= hh <= 23.
nil means 1 <= hh <= 12, and an AM/PM suffix is used."
A value of nil means 1 <= hh <= 12, and an AM/PM suffix is used."
:type 'boolean
:group 'display-time)

View File

@ -406,8 +406,8 @@ where
WHERE is a text describing the key sequences to which DEF-FUN is
bound now (or, if it is remapped, a key sequence
for the function it is remapped to)
REMARK is a list with info about rebinding. It has either of these
formats:
REMARK is a list with info about rebinding. It has either of
these formats:
\(TEXT cua-mode)
\(TEXT current-binding KEY-FUN DEF-FUN KEY WHERE)
@ -912,14 +912,14 @@ See `get-lang-string' for more information.")
(defun get-lang-string (lang stringid &optional no-eng-fallback)
"Get a language specific string for Emacs.
In certain places Emacs can replace a string showed to the user with a language specific string.
This function retrieves such strings.
In certain places Emacs can replace a string shown to the user with
a language specific string. This function retrieves such strings.
LANG is the language specification. It should be one of those
LANG is the language specification. It should be one of those
strings that can be returned by `read-language-name'. STRINGID
is a symbol that specifies the string to retrieve.
If no string is found for STRINGID in the choosen language then
If no string is found for STRINGID in the chosen language then
the English string is returned unless NO-ENG-FALLBACK is non-nil.
See `lang-strings' for more information.

View File

@ -64,13 +64,13 @@
;; is now controlled by the presence of a value in `view-return-to-alist'.
(defcustom view-scroll-auto-exit nil
"*Non-nil means scrolling past the end of buffer exits View mode.
nil means attempting to scroll past the end of the buffer,
A value of nil means attempting to scroll past the end of the buffer,
only rings the bell and gives a message on how to leave."
:type 'boolean
:group 'view)
(defcustom view-try-extend-at-buffer-end nil
"*Non-nil means try load more of file when reaching end of buffer.
"*Non-nil means try to load more of file when reaching end of buffer.
This variable is mainly intended to be temporarily set to non-nil by
the F command in view-mode, but you can set it to t if you want the action
for all scroll commands in view mode."
@ -94,7 +94,7 @@ considered for restoring."
:group 'view)
(defcustom view-inhibit-help-message nil
"*Non-nil inhibits the help message showed upon entering View mode."
"*Non-nil inhibits the help message shown upon entering View mode."
:type 'boolean
:group 'view
:version "22.1")

View File

@ -7,7 +7,7 @@
@c Version of the manual and of Emacs.
@c Please remember to update the edition number in README as well.
@set VERSION 2.9
@set EMACSVER 22.0.99
@set EMACSVER 22.0.990
@dircategory Emacs
@direntry

View File

@ -616,7 +616,7 @@ the text at the beginning of the buffer matches @var{regexp} and
@code{auto-mode-alist} gets to decide the mode.
@end defvar
@defvar file-start-mode-alist
@defvar magic-fallback-mode-alist
This works like @code{magic-mode-alist}, except that it is handled
only if @code{auto-mode-alist} does not specify a mode for this file.
@end defvar

View File

@ -1,3 +1,8 @@
2007-05-24 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* INSTALL: Add note about moving self-contained application bundle
to non-ASCII directory.
2007-04-26 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* INSTALL: Fix description about using colors in terminal.

View File

@ -153,6 +153,11 @@ options to user
For usage of other options, use the --help option.
Note: due to the problem "Installing to a directory with non-ASCII
characters in the name fails" mentioned in etc/PROBLEMS, you may not
move a self-contained Emacs.app application bundle to a non-ASCII
directory.
* BUILDING EMACS ON MAC OS Classic
You can use MPW-GM (Aug. 2001) to build Emacs. MPW-GM can be

View File

@ -1,3 +1,13 @@
2007-05-22 Eli Zaretskii <eliz@gnu.org>
* INSTALL: Add information about where to find GDB, and warn
against --no-debug option to configure.bat.
2007-05-19 Eli Zaretskii <eliz@gnu.org>
* INSTALL: Fix URL of EmacsW32 site where building with image
support is described.
2007-04-26 Glenn Morris <rgm@gnu.org>
* emacs.rc: Increase version to 22.1.50.

View File

@ -227,6 +227,9 @@
To configure Emacs to build with GCC or MSVC, whichever is available,
simply change to the `nt' subdirectory and run `configure.bat' with no
options. To see what options are available, run `configure --help'.
Do NOT use the --no-debug option to configure.bat unless you are
absolutely sure the produced binaries will never need to be run under
a debugger.
N.B. It is normal to see a few error messages output while configure
is running, when gcc support is being tested. These cannot be
@ -271,8 +274,12 @@
Binaries for the image libraries (among many others) can be found at
the GnuWin32 project. These are built with MinGW, but they can be
used with both GCC/MinGW and MSVC builds of Emacs. See the info on
http://ourcomments.org/Emacs/EmacsW32.html for more details about
installing image support libraries.
http://ourcomments.org/Emacs/w32-build-emacs.html, under "How to Get
Images Support", for more details about installing image support
libraries. Note specifically that, due to some packaging snafus in
the GnuWin32-supplied image libraries, you will need to download
_source_ packages for some of the libraries in order to get the
header files necessary for building Emacs with image support.
* Building
@ -376,7 +383,8 @@
You should be able to debug Emacs using the debugger that is
appropriate for the compiler you used, namely DevStudio or Windbg if
compiled with MSVC, or GDB if compiled with GCC.
compiled with MSVC, or GDB if compiled with GCC. (GDB for Windows
is available from the MinGW site, http://www.mingw.org/download.shtml.)
When Emacs aborts due to a fatal internal error, Emacs on Windows
pops up an Emacs Abort Dialog asking you whether you want to debug

View File

@ -1,3 +1,111 @@
2007-05-24 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* macterm.c [USE_CARBON_EVENTS] (mac_handle_window_event):
Call mac_wakeup_from_rne on window size change.
2007-05-23 Johannes Weiner <hannes@saeurebad.de> (tiny change)
* keyboard.c (make_lispy_movement): Condition on HAVE_GPM too.
2007-05-22 Richard Stallman <rms@gnu.org>
* xterm.c (x_connection_closed): Remove NO_RETURN.
2007-05-22 Martin Rudalics <rudalics@gmx.at>
* syntax.c (scan_words): Fix arg to UPDATE_SYNTAX_TABLE_BACKWARD.
2007-05-21 Chong Yidong <cyd@stupidchicken.com>
* image.c (uncache_image): New function.
(Fimage_refresh): New function.
2007-05-20 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
* Makefile.in: Move GPM check outside HAVE_X_WINDOWS.
2007-05-20 Nick Roberts <nickrob@snap.net.nz>
* config.in, keyboard.c, Makefile.in, sysdep.c, term.c,
* termhooks.h: Use HAVE_GPM instead of HAVE_GPM_H.
2007-05-20 Nick Roberts <nickrob@snap.net.nz>
* keyboard.c (make_lispy_event): Make case GPM_CLICK_EVENT
conditional on [HAVE_GPM_H].
2007-05-19 Stefan Monnier <monnier@iro.umontreal.ca>
* syntax.c (skip_chars): Update syntax-table only after we checked that
the new location is valid.
2007-05-19 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* macterm.c (x_calc_absolute_position): Add BLOCK_INPUT around
mac_get_window_bounds.
2007-05-20 Nick Roberts <nickrob@snap.net.nz>
* Makefile.in (LIBGPM): Allow it to be set from configure.
If set then link Emacs with it.
* config.in: Regenerate.
* lisp.h (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
New externs.
* termhooks.h [HAVE_GPM_H] (enum event_kind): Add GPM_CLICK_EVENT.
Include gpm.h.
(handle_one_term_event, term_gpm) New externs.
* sysdep.c [HAVE_GPM_H] (init_sys_modes): Make gpm_fd nonblocking
and allow it to be interrupted by SIGIO.
* process.c (gpm_wait_mask, max_gpm_desc): New variables.
(wait_reading_process_output): Wait on gpm_fd too.
(add_gpm_wait_descriptor, delete_gpm_wait_descriptor)): New functions.
(add_gpm_wait_descriptor_called_flag): New variable.
(delete_keyboard_wait_descriptor): Check gpm_wait_mask.
* keyboard.c [HAVE_GPM_H] (Qmouse_fixup_help_message)
(make_lispy_movement, tracking_off, Ftrack_mouse, some_mouse_moved)
(show_help_echo, readable_events, kbd_buffer_get_event, init_keyboard):
Extend HAVE_MOUSE ifdefs to HAVE_GPM_H.
(make_lispy_event): Add case GPM_CLICK_EVENT.
(read_avail_input): Handle mouse input.
* term.c (write_glyphs_with_face): New function.
[HAVE_GPM_H]: Include buffer.h, sys/fcntl.h.
(mouse_face_beg_row, mouse_face_beg_col, mouse_face_end_row)
(mouse_face_end_col, mouse_face_past_end, mouse_face_window)
(mouse_face_face_id, term_gpm, pos_x, pos_y)
(last_mouse_x, last_mouse_y): New variables.
(term_show_mouse_face, term_clear_mouse_face, fast_find_position)
(term_mouse_highlight, term_mouse_movement, term_mouse_position)
(term_mouse_click, handle_one_term_event, Fterm_open_connection)
(Fterm_close_connection): New functions.
(term_init): Initialise mouse_face_window.
2007-05-19 Chong Yidong <cyd@stupidchicken.com>
* xdisp.c (redisplay_window): If first window line is a
continuation line, recompute the new window start instead of
recentering.
2007-05-18 Glenn Morris <rgm@gnu.org>
* m/alpha.h (ORDINARY_LINK): No longer define on OpenBSD.
Suggested by Alfred M. Szmidt <ams@gnu.org>.
2007-05-17 Glenn Morris <rgm@gnu.org>
* m/macppc.h (ORDINARY_LINK): No longer define on OpenBSD.
2007-05-16 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* macterm.c [USE_CARBON_EVENTS] (mac_convert_event_ref): Also convert
dead key repeat and up events.
2007-05-14 Chong Yidong <cyd@stupidchicken.com>
* image.c (pbm_load): Check image size for monochrome pbm.

View File

@ -458,6 +458,15 @@ LIBX= $(LIBXMENU) LD_SWITCH_X_SITE -lX10 LIBX10_MACHINE LIBX10_SYSTEM
#else /* not HAVE_X_WINDOWS */
#endif /* not HAVE_X_WINDOWS */
#if HAVE_GPM
#ifndef LIBGPM
#define LIBGPM -lgpm
#endif /* not defined LIBGPM */
#else /* not HAVE_GPM */
#define LIBGPM
#endif /* not HAVE_GPM */
LIBSOUND= @LIBSOUND@
CFLAGS_SOUND= @CFLAGS_SOUND@
@ -934,7 +943,7 @@ SOME_MACHINE_LISP = ${dotdot}/lisp/mouse.elc \
Note that SunOS needs -lm to come before -lc; otherwise, you get
duplicated symbols. If the standard libraries were compiled
with GCC, we might need gnulib again after them. */
LIBES = $(LOADLIBES) $(LIBS) $(LIBX) $(LIBSOUND) \
LIBES = $(LOADLIBES) $(LIBS) $(LIBX) $(LIBSOUND) LIBGPM \
LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \
LIBS_DEBUG $(GETLOADAVG_LIBS) \
@FREETYPE_LIBS@ @FONTCONFIG_LIBS@ @LIBOTF_LIBS@ \

View File

@ -234,6 +234,9 @@ Boston, MA 02110-1301, USA. */
/* Define to 1 if you have the ungif library (-lungif). */
#undef HAVE_GIF
/* Define to 1 if you have the gpm library (-lgpm). */
#undef HAVE_GPM
/* Define to 1 if you have the `grantpt' function. */
#undef HAVE_GRANTPT

View File

@ -1631,6 +1631,27 @@ make_image_cache ()
}
/* Search frame F for an images with spec SPEC, and free it. */
static void
uncache_image (f, spec)
struct frame *f;
Lisp_Object spec;
{
struct image_cache *c = FRAME_X_IMAGE_CACHE (f);
struct image *img = IMAGE_FROM_ID (f, lookup_image (f, spec));
unsigned hash = sxhash (spec, 0);
int i = hash % IMAGE_CACHE_BUCKETS_SIZE;
for (img = c->buckets[i]; img; img = img->next)
if (img->hash == hash && !NILP (Fequal (img->spec, spec)))
{
free_image (f, img);
break;
}
}
/* Free image cache of frame F. Be aware that X frames share images
caches. */
@ -1741,6 +1762,36 @@ FRAME t means clear the image caches of all frames. */)
}
DEFUN ("image-refresh", Fimage_refresh, Simage_refresh,
1, 2, 0,
doc: /* Refresh the image with specification SPEC on frame FRAME.
If SPEC specifies an image file, the displayed image is updated with
the current contents of that file.
FRAME nil or omitted means use the selected frame.
FRAME t means refresh the image on all frames. */)
(spec, frame)
Lisp_Object spec, frame;
{
if (!valid_image_p (spec))
error ("Invalid image specification");
if (EQ (frame, Qt))
{
Lisp_Object tail;
FOR_EACH_FRAME (tail, frame)
{
struct frame *f = XFRAME (frame);
if (FRAME_WINDOW_P (f))
uncache_image (f, spec);
}
}
else
uncache_image (check_x_frame (frame), spec);
return Qnil;
}
/* Compute masks and transform image IMG on frame F, as specified
by the image's specification, */
@ -8660,6 +8711,7 @@ non-numeric, there is no explicit limit on the size of images. */);
defsubr (&Sinit_image_library);
defsubr (&Sclear_image_cache);
defsubr (&Simage_refresh);
defsubr (&Simage_size);
defsubr (&Simage_mask_p);
defsubr (&Simage_extension_data);

View File

@ -521,7 +521,7 @@ Lisp_Object Qmake_frame_visible;
Lisp_Object Qselect_window;
Lisp_Object Qhelp_echo;
#ifdef HAVE_MOUSE
#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
Lisp_Object Qmouse_fixup_help_message;
#endif
@ -677,7 +677,7 @@ static Lisp_Object read_char_x_menu_prompt ();
static Lisp_Object read_char_minibuf_menu_prompt P_ ((int, int,
Lisp_Object *));
static Lisp_Object make_lispy_event P_ ((struct input_event *));
#ifdef HAVE_MOUSE
#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
static Lisp_Object make_lispy_movement P_ ((struct frame *, Lisp_Object,
enum scroll_bar_part,
Lisp_Object, Lisp_Object,
@ -1390,7 +1390,7 @@ DEFUN ("abort-recursive-edit", Fabort_recursive_edit, Sabort_recursive_edit, 0,
return Qnil;
}
#ifdef HAVE_MOUSE
#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
/* Restore mouse tracking enablement. See Ftrack_mouse for the only use
of this function. */
@ -1466,7 +1466,7 @@ some_mouse_moved ()
return 0;
}
#endif /* HAVE_MOUSE */
#endif /* HAVE_MOUSE || HAVE_GPM */
/* This is the actual command reading loop,
sans error-handling encapsulation. */
@ -2388,7 +2388,7 @@ show_help_echo (help, window, object, pos, ok_to_overwrite_keystroke_echo)
return;
}
#ifdef HAVE_MOUSE
#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
if (!noninteractive && STRINGP (help))
{
/* The mouse-fixup-help-message Lisp function can call
@ -3640,7 +3640,7 @@ readable_events (flags)
return 1;
}
#ifdef HAVE_MOUSE
#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
if (!(flags & READABLE_EVENTS_IGNORE_SQUEEZABLES)
&& !NILP (do_mouse_tracking) && some_mouse_moved ())
return 1;
@ -3992,7 +3992,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu, end_time)
{
if (kbd_fetch_ptr != kbd_store_ptr)
break;
#ifdef HAVE_MOUSE
#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
if (!NILP (do_mouse_tracking) && some_mouse_moved ())
break;
#endif
@ -4014,7 +4014,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu, end_time)
#endif /* SIGIO */
if (kbd_fetch_ptr != kbd_store_ptr)
break;
#ifdef HAVE_MOUSE
#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
if (!NILP (do_mouse_tracking) && some_mouse_moved ())
break;
#endif
@ -4250,7 +4250,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu, end_time)
}
}
}
#ifdef HAVE_MOUSE
#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
/* Try generating a mouse motion event. */
else if (!NILP (do_mouse_tracking) && some_mouse_moved ())
{
@ -4291,7 +4291,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu, end_time)
if (!NILP (x) && NILP (obj))
obj = make_lispy_movement (f, bar_window, part, x, y, time);
}
#endif /* HAVE_MOUSE */
#endif /* HAVE_MOUSE || HAVE GPM */
else
/* We were promised by the above while loop that there was
something for us to read! */
@ -6008,13 +6008,73 @@ make_lispy_event (event)
}
#endif
#ifdef HAVE_GPM
case GPM_CLICK_EVENT:
{
FRAME_PTR f = XFRAME (event->frame_or_window);
Lisp_Object head, position;
Lisp_Object *start_pos_ptr;
Lisp_Object start_pos;
int button = event->code;
if (button >= ASIZE (button_down_location))
{
button_down_location = larger_vector (button_down_location,
button + 1, Qnil);
mouse_syms = larger_vector (mouse_syms, button + 1, Qnil);
}
start_pos_ptr = &AREF (button_down_location, button);
start_pos = *start_pos_ptr;
position = make_lispy_position (f, &event->x, &event->y,
event->timestamp);
if (event->modifiers & down_modifier)
*start_pos_ptr = Fcopy_alist (position);
else if (event->modifiers & (up_modifier | drag_modifier))
{
if (!CONSP (start_pos))
return Qnil;
event->modifiers &= ~up_modifier;
}
head = modify_event_symbol (button,
event->modifiers,
Qmouse_click, Vlispy_mouse_stem,
NULL,
&mouse_syms,
XVECTOR (mouse_syms)->size);
if (event->modifiers & drag_modifier)
return Fcons (head,
Fcons (start_pos,
Fcons (position,
Qnil)));
else if (event->modifiers & double_modifier)
return Fcons (head,
Fcons (position,
Fcons (make_number (2),
Qnil)));
else if (event->modifiers & triple_modifier)
return Fcons (head,
Fcons (position,
Fcons (make_number (3),
Qnil)));
else
return Fcons (head,
Fcons (position,
Qnil));
}
#endif /* HAVE_GPM */
/* The 'kind' field of the event is something we don't recognize. */
default:
abort ();
}
}
#ifdef HAVE_MOUSE
#if defined(HAVE_MOUSE) || defined(HAVE_GPM)
static Lisp_Object
make_lispy_movement (frame, bar_window, part, x, y, time)
@ -6053,7 +6113,7 @@ make_lispy_movement (frame, bar_window, part, x, y, time)
}
}
#endif /* HAVE_MOUSE */
#endif /* HAVE_MOUSE || HAVE GPM */
/* Construct a switch frame event. */
static Lisp_Object
@ -6865,8 +6925,28 @@ read_avail_input (expected)
if (n_to_read == 0)
return 0;
#else /* not MSDOS */
#ifdef HAVE_GPM
if (term_gpm)
{
Gpm_Event event;
struct input_event hold_quit;
int gpm;
EVENT_INIT (hold_quit);
hold_quit.kind = NO_EVENT;
while (gpm = Gpm_GetEvent (&event), gpm == 1) {
nread += handle_one_term_event (&event, &hold_quit);
}
if (hold_quit.kind != NO_EVENT)
kbd_buffer_store_event (&hold_quit);
if (nread)
return nread;
}
#endif /* HAVE_GPM */
#ifdef FIONREAD
/* Find out how much input is available. */
/* Find out how much input is available. */
if (ioctl (input_fd, FIONREAD, &n_to_read) < 0)
/* Formerly simply reported no input, but that sometimes led to
a failure of Emacs to terminate.
@ -11044,7 +11124,7 @@ init_keyboard ()
recent_keys_index = 0;
kbd_fetch_ptr = kbd_buffer;
kbd_store_ptr = kbd_buffer;
#ifdef HAVE_MOUSE
#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
do_mouse_tracking = Qnil;
#endif
input_pending = 0;
@ -11234,7 +11314,7 @@ syms_of_keyboard ()
Qmenu_bar = intern ("menu-bar");
staticpro (&Qmenu_bar);
#ifdef HAVE_MOUSE
#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
Qmouse_fixup_help_message = intern ("mouse-fixup-help-message");
staticpro (&Qmouse_fixup_help_message);
#endif
@ -11366,7 +11446,7 @@ syms_of_keyboard ()
defsubr (&Sread_key_sequence);
defsubr (&Sread_key_sequence_vector);
defsubr (&Srecursive_edit);
#ifdef HAVE_MOUSE
#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
defsubr (&Strack_mouse);
#endif
defsubr (&Sinput_pending_p);

View File

@ -3134,6 +3134,8 @@ extern int wait_reading_process_output P_ ((int, int, int, int,
int));
extern void add_keyboard_wait_descriptor P_ ((int));
extern void delete_keyboard_wait_descriptor P_ ((int));
extern void add_gpm_wait_descriptor P_ ((int));
extern void delete_gpm_wait_descriptor P_ ((int));
extern void close_process_descs P_ ((void));
extern void init_process P_ ((void));
extern void syms_of_process P_ ((void));

View File

@ -99,10 +99,6 @@ NOTE-END
# endif
#endif
#if defined(__OpenBSD__)
#define ORDINARY_LINK
#endif
#ifdef __ELF__
#undef UNEXEC
#define UNEXEC unexelf.o

View File

@ -66,10 +66,6 @@ Boston, MA 02110-1301, USA. */
/* #define NO_SOCK_SIGIO */
#if defined(__OpenBSD__)
#define ORDINARY_LINK
#endif
#define UNEXEC unexelf.o
#define NO_TERMIO

View File

@ -6103,7 +6103,9 @@ x_calc_absolute_position (f)
/* Find the offsets of the outside upper-left corner of
the inner window, with respect to the outer window. */
BLOCK_INPUT;
mac_get_window_bounds (f, &inner, &outer);
UNBLOCK_INPUT;
width_diff = (outer.right - outer.left) - (inner.right - inner.left);
height_diff = (outer.bottom - outer.top) - (inner.bottom - inner.top);
@ -9185,15 +9187,16 @@ mac_get_mouse_btn (EventRef ref)
/* Normally, ConvertEventRefToEventRecord will correctly handle all
events. However the click of the mouse wheel is not converted to a
mouseDown or mouseUp event. Likewise for dead key down events.
This calls ConvertEventRef, but then checks to see if it is a mouse
up/down, or a dead key down carbon event that has not been
mouseDown or mouseUp event. Likewise for dead key events. This
calls ConvertEventRefToEventRecord, but then checks to see if it is
a mouse up/down, or a dead key Carbon event that has not been
converted, and if so, converts it by hand (to be picked up in the
XTread_socket loop). */
static Boolean mac_convert_event_ref (EventRef eventRef, EventRecord *eventRec)
{
OSStatus err;
Boolean result = ConvertEventRefToEventRecord (eventRef, eventRec);
EventKind action;
if (result)
return result;
@ -9222,6 +9225,14 @@ static Boolean mac_convert_event_ref (EventRef eventRef, EventRecord *eventRec)
switch (GetEventKind (eventRef))
{
case kEventRawKeyDown:
action = keyDown;
goto keystroke_common;
case kEventRawKeyRepeat:
action = autoKey;
goto keystroke_common;
case kEventRawKeyUp:
action = keyUp;
keystroke_common:
{
unsigned char char_codes;
UInt32 key_code;
@ -9235,7 +9246,7 @@ static Boolean mac_convert_event_ref (EventRef eventRef, EventRecord *eventRec)
NULL, &key_code);
if (err == noErr)
{
eventRec->what = keyDown;
eventRec->what = action;
eventRec->message = char_codes | ((key_code & 0xff) << 8);
result = 1;
}
@ -9903,6 +9914,7 @@ mac_handle_window_event (next_handler, event, data)
width = bounds.right - bounds.left;
height = bounds.bottom - bounds.top;
mac_handle_size_change (f, width, height);
mac_wakeup_from_rne ();
}
}

View File

@ -328,14 +328,18 @@ extern int timers_run;
static SELECT_TYPE input_wait_mask;
/* Mask that excludes keyboard input descriptor (s). */
/* Mask that excludes keyboard input descriptor(s). */
static SELECT_TYPE non_keyboard_wait_mask;
/* Mask that excludes process input descriptor (s). */
/* Mask that excludes process input descriptor(s). */
static SELECT_TYPE non_process_wait_mask;
/* Mask for the gpm mouse input descriptor. */
static SELECT_TYPE gpm_wait_mask;
#ifdef NON_BLOCKING_CONNECT
/* Mask of bits indicating the descriptors that we wait for connect to
complete on. Once they complete, they are removed from this mask
@ -357,6 +361,9 @@ static int max_process_desc;
/* The largest descriptor currently in use for keyboard input. */
static int max_keyboard_desc;
/* The largest descriptor currently in use for gpm mouse input. */
static int max_gpm_desc;
/* Nonzero means delete a process right away if it exits. */
static int delete_exited_processes;
@ -4445,7 +4452,8 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display,
IF_NON_BLOCKING_CONNECT (Ctemp = connect_wait_mask);
EMACS_SET_SECS_USECS (timeout, 0, 0);
if ((select (max (max_process_desc, max_keyboard_desc) + 1,
if ((select (max (max (max_process_desc, max_keyboard_desc),
max_gpm_desc) + 1,
&Atemp,
#ifdef NON_BLOCKING_CONNECT
(num_pending_connects > 0 ? &Ctemp : (SELECT_TYPE *)0),
@ -4590,7 +4598,8 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display,
}
#endif
nfds = select (max (max_process_desc, max_keyboard_desc) + 1,
nfds = select (max (max (max_process_desc, max_keyboard_desc),
max_gpm_desc) + 1,
&Available,
#ifdef NON_BLOCKING_CONNECT
(check_connect ? &Connecting : (SELECT_TYPE *)0),
@ -6884,6 +6893,21 @@ add_keyboard_wait_descriptor (desc)
max_keyboard_desc = desc;
}
static int add_gpm_wait_descriptor_called_flag;
void
add_gpm_wait_descriptor (desc)
int desc;
{
if (! add_gpm_wait_descriptor_called_flag)
FD_CLR (0, &input_wait_mask);
add_gpm_wait_descriptor_called_flag = 1;
FD_SET (desc, &input_wait_mask);
FD_SET (desc, &gpm_wait_mask);
if (desc > max_gpm_desc)
max_gpm_desc = desc;
}
/* From now on, do not expect DESC to give keyboard input. */
void
@ -6899,10 +6923,29 @@ delete_keyboard_wait_descriptor (desc)
if (desc == max_keyboard_desc)
for (fd = 0; fd < lim; fd++)
if (FD_ISSET (fd, &input_wait_mask)
&& !FD_ISSET (fd, &non_keyboard_wait_mask))
&& !FD_ISSET (fd, &non_keyboard_wait_mask)
&& !FD_ISSET (fd, &gpm_wait_mask))
max_keyboard_desc = fd;
}
void
delete_gpm_wait_descriptor (desc)
int desc;
{
int fd;
int lim = max_gpm_desc;
FD_CLR (desc, &input_wait_mask);
FD_CLR (desc, &non_process_wait_mask);
if (desc == max_gpm_desc)
for (fd = 0; fd < lim; fd++)
if (FD_ISSET (fd, &input_wait_mask)
&& !FD_ISSET (fd, &non_keyboard_wait_mask)
&& !FD_ISSET (fd, &non_process_wait_mask))
max_gpm_desc = fd;
}
/* Return nonzero if *MASK has a bit set
that corresponds to one of the keyboard input descriptors. */

View File

@ -1299,20 +1299,20 @@ scan_words (from, count)
script = CHAR_TABLE_REF (Vchar_script_table, ch1);
while (1)
{
int temp_byte;
if (from == beg)
break;
temp_byte = dec_bytepos (from_byte);
DEC_BOTH (from, from_byte);
UPDATE_SYNTAX_TABLE_BACKWARD (from);
ch0 = FETCH_CHAR_AS_MULTIBYTE (temp_byte);
ch0 = FETCH_CHAR_AS_MULTIBYTE (from_byte);
code = SYNTAX (ch0);
if ((code != Sword
&& (! words_include_escapes
|| (code != Sescape && code != Scharquote)))
|| ! EQ (CHAR_TABLE_REF (Vchar_script_table, ch0), script))
break;
DEC_BOTH (from, from_byte);
{
INC_BOTH (from, from_byte);
break;
}
ch1 = ch0;
}
}
@ -2031,13 +2031,13 @@ skip_syntaxes (forwardp, string, lim)
p = GPT_ADDR;
stop = endp;
}
UPDATE_SYNTAX_TABLE_BACKWARD (pos - 1);
prev_p = p;
while (--p >= stop && ! CHAR_HEAD_P (*p));
c = STRING_CHAR (p, MAX_MULTIBYTE_LENGTH);
if (! fastmap[(int) SYNTAX (c)])
break;
pos--, pos_byte -= prev_p - p;
UPDATE_SYNTAX_TABLE_BACKWARD (pos);
}
}
else

View File

@ -1675,6 +1675,14 @@ init_sys_modes ()
old_fcntl_owner = fcntl (input_fd, F_GETOWN, 0);
fcntl (input_fd, F_SETOWN, getpid ());
init_sigio (input_fd);
#ifdef HAVE_GPM
if (term_gpm)
{
fcntl (gpm_fd, F_SETOWN, getpid ());
fcntl (gpm_fd, F_SETFL, O_NONBLOCK);
init_sigio (gpm_fd);
}
#endif /* HAVE_GPM */
}
#endif /* F_GETOWN */
#endif /* F_SETOWN_BUG */

View File

@ -147,25 +147,6 @@ int (*read_socket_hook) P_ ((int, int, struct input_event *));
void (*frame_up_to_date_hook) P_ ((struct frame *));
/* Return the current position of the mouse.
Set *f to the frame the mouse is in, or zero if the mouse is in no
Emacs frame. If it is set to zero, all the other arguments are
garbage.
If the motion started in a scroll bar, set *bar_window to the
scroll bar's window, *part to the part the mouse is currently over,
*x to the position of the mouse along the scroll bar, and *y to the
overall length of the scroll bar.
Otherwise, set *bar_window to Qnil, and *x and *y to the column and
row of the character cell the mouse is over.
Set *time to the time the mouse was at the returned position.
This should clear mouse_moved until the next motion
event arrives. */
void (*mouse_position_hook) P_ ((FRAME_PTR *f, int insist,
Lisp_Object *bar_window,
enum scroll_bar_part *part,
@ -416,6 +397,9 @@ static int tty_cursor_hidden;
char *tparam ();
extern char *tgetstr ();
static void term_clear_mouse_face ();
static void term_mouse_highlight (struct frame *f, int x, int y);
#ifdef WINDOWSNT
@ -429,6 +413,33 @@ extern char *tgetstr ();
#define FRAME_TERMCAP_P(_f_) 0
#endif /* WINDOWSNT */
#ifdef HAVE_GPM
#include <sys/fcntl.h>
#include "buffer.h"
/* Nonzero means mouse is enabled on Linux console. */
int term_gpm = 0;
/* These variables describe the range of text currently shown in its
mouse-face, together with the window they apply to. As long as
the mouse stays within this range, we need not redraw anything on
its account. Rows and columns are glyph matrix positions in
MOUSE_FACE_WINDOW. */
static int mouse_face_beg_row, mouse_face_beg_col;
static int mouse_face_end_row, mouse_face_end_col;
static int mouse_face_past_end;
static Lisp_Object mouse_face_window;
static int mouse_face_face_id;
/* FRAME and X, Y position of mouse when last checked for
highlighting. X and Y can be negative or out of range for the frame. */
struct frame *mouse_face_mouse_frame;
int mouse_face_mouse_x, mouse_face_mouse_y;
static int pos_x, pos_y;
static int last_mouse_x, last_mouse_y;
#endif /* HAVE_GPM */
void
ring_bell ()
{
@ -1077,6 +1088,65 @@ write_glyphs (string, len)
cmcheckmagic ();
}
void
write_glyphs_with_face (string, len, face_id)
register struct glyph *string;
register int len, face_id;
{
struct frame *sf = XFRAME (selected_frame);
struct frame *f = updating_frame ? updating_frame : sf;
unsigned char *conversion_buffer;
struct coding_system *coding;
turn_off_insert ();
tty_hide_cursor ();
/* Don't dare write in last column of bottom line, if Auto-Wrap,
since that would scroll the whole frame on some terminals. */
if (AutoWrap
&& curY + 1 == FRAME_LINES (sf)
&& (curX + len) == FRAME_COLS (sf))
len --;
if (len <= 0)
return;
cmplus (len);
/* If terminal_coding does any conversion, use it, otherwise use
safe_terminal_coding. We can't use CODING_REQUIRE_ENCODING here
because it always return 1 if the member src_multibyte is 1. */
coding = (terminal_coding.common_flags & CODING_REQUIRE_ENCODING_MASK
? &terminal_coding : &safe_terminal_coding);
/* The mode bit CODING_MODE_LAST_BLOCK should be set to 1 only at
the tail. */
coding->mode &= ~CODING_MODE_LAST_BLOCK;
/* Turn appearance modes of the face. */
highlight_if_desired ();
turn_on_face (f, face_id);
coding->mode |= CODING_MODE_LAST_BLOCK;
conversion_buffer = encode_terminal_code (string, len, coding);
if (coding->produced > 0)
{
BLOCK_INPUT;
fwrite (conversion_buffer, 1, coding->produced, stdout);
if (ferror (stdout))
clearerr (stdout);
if (termscript)
fwrite (conversion_buffer, 1, coding->produced, termscript);
UNBLOCK_INPUT;
}
/* Turn appearance modes off. */
turn_off_face (f, face_id);
turn_off_highlight ();
cmcheckmagic ();
}
/* If start is zero, insert blanks instead of a string at start */
void
@ -2419,6 +2489,656 @@ set_tty_color_mode (f, val)
#endif /* !WINDOWSNT */
/***********************************************************************
Mouse
***********************************************************************/
#ifdef HAVE_GPM
static void
term_show_mouse_face (enum draw_glyphs_face draw)
{
struct window *w = XWINDOW (mouse_face_window);
int save_x, save_y;
int i, j;
if (/* If window is in the process of being destroyed, don't bother
to do anything. */
w->current_matrix != NULL
/* Recognize when we are called to operate on rows that don't exist
anymore. This can happen when a window is split. */
&& mouse_face_end_row < w->current_matrix->nrows)
{
/* write_glyphs writes at cursor position, so we need to
temporarily move cursor coordinates to the beginning of
the highlight region. */
/* Save current cursor co-ordinates */
save_y = curY;
save_x = curX;
/* Note that mouse_face_beg_row etc. are window relative. */
for (i = mouse_face_beg_row; i <= mouse_face_end_row; i++)
{
int start_hpos, end_hpos, nglyphs;
struct glyph_row *row = MATRIX_ROW (w->current_matrix, i);
/* Don't do anything if row doesn't have valid contents. */
if (!row->enabled_p)
continue;
/* For all but the first row, the highlight starts at column 0. */
if (i == mouse_face_beg_row)
start_hpos = mouse_face_beg_col;
else
start_hpos = 0;
if (i == mouse_face_end_row)
end_hpos = mouse_face_end_col;
else
{
end_hpos = row->used[TEXT_AREA];
if (draw == DRAW_NORMAL_TEXT)
row->fill_line_p = 1; /* Clear to end of line */
}
if (end_hpos <= start_hpos)
continue;
/* Record that some glyphs of this row are displayed in
mouse-face. */
row->mouse_face_p = draw > 0;
nglyphs = end_hpos - start_hpos;
if (end_hpos >= row->used[TEXT_AREA])
nglyphs = row->used[TEXT_AREA] - start_hpos;
pos_y = row->y + WINDOW_TOP_EDGE_Y (w);
pos_x = row->used[LEFT_MARGIN_AREA] + start_hpos
+ WINDOW_LEFT_EDGE_X (w);
cursor_to (pos_y, pos_x);
if (draw == DRAW_MOUSE_FACE)
{
write_glyphs_with_face (row->glyphs[TEXT_AREA] + start_hpos,
nglyphs, mouse_face_face_id);
}
else /* draw == DRAW_NORMAL_TEXT */
write_glyphs (row->glyphs[TEXT_AREA] + start_hpos, nglyphs);
}
cursor_to (save_y, save_x);
}
}
static void
term_clear_mouse_face ()
{
if (!NILP (mouse_face_window))
term_show_mouse_face (DRAW_NORMAL_TEXT);
mouse_face_beg_row = mouse_face_beg_col = -1;
mouse_face_end_row = mouse_face_end_col = -1;
mouse_face_window = Qnil;
}
/* Find the glyph matrix position of buffer position POS in window W.
*HPOS and *VPOS are set to the positions found. W's current glyphs
must be up to date. If POS is above window start return (0, 0).
If POS is after end of W, return end of last line in W.
- taken from msdos.c */
static int
fast_find_position (struct window *w, int pos, int *hpos, int *vpos)
{
int i, lastcol, line_start_position, maybe_next_line_p = 0;
int yb = window_text_bottom_y (w);
struct glyph_row *row = MATRIX_ROW (w->current_matrix, 0), *best_row = row;
while (row->y < yb)
{
if (row->used[TEXT_AREA])
line_start_position = row->glyphs[TEXT_AREA]->charpos;
else
line_start_position = 0;
if (line_start_position > pos)
break;
/* If the position sought is the end of the buffer,
don't include the blank lines at the bottom of the window. */
else if (line_start_position == pos
&& pos == BUF_ZV (XBUFFER (w->buffer)))
{
maybe_next_line_p = 1;
break;
}
else if (line_start_position > 0)
best_row = row;
/* Don't overstep the last matrix row, lest we get into the
never-never land... */
if (row->y + 1 >= yb)
break;
++row;
}
/* Find the right column within BEST_ROW. */
lastcol = 0;
row = best_row;
for (i = 0; i < row->used[TEXT_AREA]; i++)
{
struct glyph *glyph = row->glyphs[TEXT_AREA] + i;
int charpos;
charpos = glyph->charpos;
if (charpos == pos)
{
*hpos = i;
*vpos = row->y;
return 1;
}
else if (charpos > pos)
break;
else if (charpos > 0)
lastcol = i;
}
/* If we're looking for the end of the buffer,
and we didn't find it in the line we scanned,
use the start of the following line. */
if (maybe_next_line_p)
{
++row;
lastcol = 0;
}
*vpos = row->y;
*hpos = lastcol + 1;
return 0;
}
static void
term_mouse_highlight (struct frame *f, int x, int y)
{
enum window_part part;
Lisp_Object window;
struct window *w;
struct buffer *b;
if (NILP (Vmouse_highlight)
|| !f->glyphs_initialized_p)
return;
mouse_face_mouse_x = x;
mouse_face_mouse_y = y;
mouse_face_mouse_frame = f;
/* Which window is that in? */
window = window_from_coordinates (f, x, y, &part, &x, &y, 0);
/* Not on a window -> return. */
if (!WINDOWP (window))
return;
if (!EQ (window, mouse_face_window))
term_clear_mouse_face ();
w = XWINDOW (window);
/* Are we in a window whose display is up to date?
And verify the buffer's text has not changed. */
b = XBUFFER (w->buffer);
if (part == ON_TEXT
&& EQ (w->window_end_valid, w->buffer)
&& XFASTINT (w->last_modified) == BUF_MODIFF (b)
&& XFASTINT (w->last_overlay_modified) == BUF_OVERLAY_MODIFF (b))
{
int pos, i, nrows = w->current_matrix->nrows;
struct glyph_row *row;
struct glyph *glyph;
/* Find the glyph under X/Y. */
glyph = NULL;
if (y >= 0 && y < nrows)
{
row = MATRIX_ROW (w->current_matrix, y);
/* Give up if some row before the one we are looking for is
not enabled. */
for (i = 0; i <= y; i++)
if (!MATRIX_ROW (w->current_matrix, i)->enabled_p)
break;
if (i > y /* all rows upto and including the one at Y are enabled */
&& row->displays_text_p
&& x < window_box_width (w, TEXT_AREA))
{
glyph = row->glyphs[TEXT_AREA];
if (x >= row->used[TEXT_AREA])
glyph = NULL;
else
{
glyph += x;
if (!BUFFERP (glyph->object))
glyph = NULL;
}
}
}
/* Clear mouse face if X/Y not over text. */
if (glyph == NULL)
{
term_clear_mouse_face ();
return;
}
if (!BUFFERP (glyph->object))
abort ();
pos = glyph->charpos;
/* Check for mouse-face. */
{
extern Lisp_Object Qmouse_face;
Lisp_Object mouse_face, overlay, position, *overlay_vec;
int noverlays, obegv, ozv;;
struct buffer *obuf;
/* If we get an out-of-range value, return now; avoid an error. */
if (pos > BUF_Z (b))
return;
/* Make the window's buffer temporarily current for
overlays_at and compute_char_face. */
obuf = current_buffer;
current_buffer = b;
obegv = BEGV;
ozv = ZV;
BEGV = BEG;
ZV = Z;
/* Is this char mouse-active? */
XSETINT (position, pos);
/* Put all the overlays we want in a vector in overlay_vec. */
GET_OVERLAYS_AT (pos, overlay_vec, noverlays, NULL, 0);
/* Sort overlays into increasing priority order. */
noverlays = sort_overlays (overlay_vec, noverlays, w);
/* Check mouse-face highlighting. */
if (!(EQ (window, mouse_face_window)
&& y >= mouse_face_beg_row
&& y <= mouse_face_end_row
&& (y > mouse_face_beg_row
|| x >= mouse_face_beg_col)
&& (y < mouse_face_end_row
|| x < mouse_face_end_col
|| mouse_face_past_end)))
{
/* Clear the display of the old active region, if any. */
term_clear_mouse_face ();
/* Find the highest priority overlay that has a mouse-face
property. */
overlay = Qnil;
for (i = noverlays - 1; i >= 0; --i)
{
mouse_face = Foverlay_get (overlay_vec[i], Qmouse_face);
if (!NILP (mouse_face))
{
overlay = overlay_vec[i];
break;
}
}
/* If no overlay applies, get a text property. */
if (NILP (overlay))
mouse_face = Fget_text_property (position, Qmouse_face,
w->buffer);
/* Handle the overlay case. */
if (!NILP (overlay))
{
/* Find the range of text around this char that
should be active. */
Lisp_Object before, after;
int ignore;
before = Foverlay_start (overlay);
after = Foverlay_end (overlay);
/* Record this as the current active region. */
fast_find_position (w, XFASTINT (before),
&mouse_face_beg_col,
&mouse_face_beg_row);
mouse_face_past_end
= !fast_find_position (w, XFASTINT (after),
&mouse_face_end_col,
&mouse_face_end_row);
mouse_face_window = window;
mouse_face_face_id
= face_at_buffer_position (w, pos, 0, 0,
&ignore, pos + 1, 1);
/* Display it as active. */
term_show_mouse_face (DRAW_MOUSE_FACE);
}
/* Handle the text property case. */
else if (!NILP (mouse_face))
{
/* Find the range of text around this char that
should be active. */
Lisp_Object before, after, beginning, end;
int ignore;
beginning = Fmarker_position (w->start);
XSETINT (end, (BUF_Z (b) - XFASTINT (w->window_end_pos)));
before
= Fprevious_single_property_change (make_number (pos + 1),
Qmouse_face,
w->buffer, beginning);
after
= Fnext_single_property_change (position, Qmouse_face,
w->buffer, end);
/* Record this as the current active region. */
fast_find_position (w, XFASTINT (before),
&mouse_face_beg_col,
&mouse_face_beg_row);
mouse_face_past_end
= !fast_find_position (w, XFASTINT (after),
&mouse_face_end_col,
&mouse_face_end_row);
mouse_face_window = window;
mouse_face_face_id
= face_at_buffer_position (w, pos, 0, 0,
&ignore, pos + 1, 1);
/* Display it as active. */
term_show_mouse_face (DRAW_MOUSE_FACE);
}
}
/* Look for a `help-echo' property. */
{
Lisp_Object help;
extern Lisp_Object Qhelp_echo;
/* Check overlays first. */
help = Qnil;
for (i = noverlays - 1; i >= 0 && NILP (help); --i)
{
overlay = overlay_vec[i];
help = Foverlay_get (overlay, Qhelp_echo);
}
if (!NILP (help))
{
help_echo_string = help;
help_echo_window = window;
help_echo_object = overlay;
help_echo_pos = pos;
}
/* Try text properties. */
else if (NILP (help)
&& ((STRINGP (glyph->object)
&& glyph->charpos >= 0
&& glyph->charpos < SCHARS (glyph->object))
|| (BUFFERP (glyph->object)
&& glyph->charpos >= BEGV
&& glyph->charpos < ZV)))
{
help = Fget_text_property (make_number (glyph->charpos),
Qhelp_echo, glyph->object);
if (!NILP (help))
{
help_echo_string = help;
help_echo_window = window;
help_echo_object = glyph->object;
help_echo_pos = glyph->charpos;
}
}
}
BEGV = obegv;
ZV = ozv;
current_buffer = obuf;
}
}
}
static int
term_mouse_movement (FRAME_PTR frame, Gpm_Event *event)
{
/* Has the mouse moved off the glyph it was on at the last sighting? */
if (event->x != last_mouse_x || event->y != last_mouse_y)
{
frame->mouse_moved = 1;
term_mouse_highlight (frame, event->x - 1, event->y - 1);
/* Remember which glyph we're now on. */
last_mouse_x = event->x;
last_mouse_y = event->y;
return 1;
}
return 0;
}
/* Return the current position of the mouse.
Set *f to the frame the mouse is in, or zero if the mouse is in no
Emacs frame. If it is set to zero, all the other arguments are
garbage.
Set *bar_window to Qnil, and *x and *y to the column and
row of the character cell the mouse is over.
Set *time to the time the mouse was at the returned position.
This should clear mouse_moved until the next motion
event arrives.
NOT CURRENTLY INVOKED: see mouse_position_hook below. */
static void
term_mouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window,
enum scroll_bar_part *part, Lisp_Object *x,
Lisp_Object *y, unsigned long *time)
{
Gpm_Event event;
struct timeval now;
int i;
BLOCK_INPUT;
*fp = SELECTED_FRAME ();
*bar_window = Qnil;
*part = 0;
i = Gpm_GetSnapshot (&event);
XSETINT (*x, event.x);
XSETINT (*y, event.y);
gettimeofday(&now, 0);
*time = (now.tv_sec * 1000) + (now.tv_usec / 1000);
UNBLOCK_INPUT;
}
/* Prepare a mouse-event in *RESULT for placement in the input queue.
If the event is a button press, then note that we have grabbed
the mouse. */
static Lisp_Object
term_mouse_click (struct input_event *result, Gpm_Event *event,
struct frame *f)
{
struct timeval now;
int i, j;
result->kind = GPM_CLICK_EVENT;
for (i = 0, j = GPM_B_LEFT; i < 3; i++, j >>= 1 )
{
if (event->buttons & j) {
result->code = i; /* button number */
break;
}
}
gettimeofday(&now, 0);
result->timestamp = (now.tv_sec * 1000) + (now.tv_usec / 1000);
if (event->type & GPM_UP)
result->modifiers = up_modifier;
else if (event->type & GPM_DOWN)
result->modifiers = down_modifier;
else
result->modifiers = 0;
if (event->type & GPM_SINGLE)
result->modifiers |= click_modifier;
if (event->type & GPM_DOUBLE)
result->modifiers |= double_modifier;
if (event->type & GPM_TRIPLE)
result->modifiers |= triple_modifier;
if (event->type & GPM_DRAG)
result->modifiers |= drag_modifier;
if (!(event->type & (GPM_MOVE|GPM_DRAG))) {
/* 1 << KG_SHIFT */
if (event->modifiers & (1 << 0))
result->modifiers |= shift_modifier;
/* 1 << KG_CTRL */
if (event->modifiers & (1 << 2))
result->modifiers |= ctrl_modifier;
/* 1 << KG_ALT || KG_ALTGR */
if (event->modifiers & (1 << 3)
|| event->modifiers & (1 << 1))
result->modifiers |= meta_modifier;
}
XSETINT (result->x, event->x - 1);
XSETINT (result->y, event->y - 1);
XSETFRAME (result->frame_or_window, f);
result->arg = Qnil;
return Qnil;
}
int
handle_one_term_event (Gpm_Event *event, struct input_event* hold_quit)
{
struct frame *f = SELECTED_FRAME ();
int i, j, fd;
struct input_event ie;
int do_help = 0;
int count = 0;
EVENT_INIT (ie);
ie.kind = NO_EVENT;
ie.arg = Qnil;
if (event->type & GPM_MOVE) {
unsigned char buf[6 * sizeof (short)];
unsigned short *arg = (unsigned short *) buf + 1;
const char *name;
previous_help_echo_string = help_echo_string;
help_echo_string = Qnil;
/* Display mouse pointer */
buf[sizeof(short) - 1] = 2; /* set selection */
arg[0] = arg[2] = (unsigned short) event->x;
arg[1] = arg[3] = (unsigned short) event->y;
arg[4] = (unsigned short) 3;
name = (const char *) ttyname (0);
fd = open (name, O_WRONLY);
ioctl (fd, TIOCLINUX, buf + sizeof (short) - 1);
close(fd);
term_mouse_movement (f, event);
/* If the contents of the global variable help_echo_string
has changed, generate a HELP_EVENT. */
if (!NILP (help_echo_string)
|| !NILP (previous_help_echo_string))
do_help = 1;
goto done;
}
else {
f->mouse_moved = 0;
term_mouse_click (&ie, event, f);
//kbd_buffer_store_event_hold (&ie, hold_quit);
}
done:
if (ie.kind != NO_EVENT)
{
kbd_buffer_store_event_hold (&ie, hold_quit);
count++;
}
if (do_help
&& !(hold_quit && hold_quit->kind != NO_EVENT))
{
Lisp_Object frame;
if (f)
XSETFRAME (frame, f);
else
frame = Qnil;
gen_help_event (help_echo_string, frame, help_echo_window,
help_echo_object, help_echo_pos);
count++;
}
return count;
}
DEFUN ("term-open-connection", Fterm_open_connection, Sterm_open_connection,
0, 0, 0,
doc: /* Open a connection to Gpm. */)
()
{
Gpm_Connect connection;
connection.eventMask = ~0;
connection.defaultMask = ~GPM_HARD;
connection.maxMod = ~0;
connection.minMod = 0;
if (Gpm_Open (&connection, 0) < 0)
return Qnil;
else
{
term_gpm = 1;
reset_sys_modes ();
init_sys_modes ();
add_gpm_wait_descriptor (gpm_fd);
return Qt;
}
}
DEFUN ("term-close-connection", Fterm_close_connection, Sterm_close_connection,
0, 0, 0,
doc: /* Close a connection to Gpm. */)
()
{
delete_gpm_wait_descriptor (gpm_fd);
while (Gpm_Close()); /* close all the stack */
term_gpm = 0;
return Qnil;
}
#endif /* HAVE_GPM */
/***********************************************************************
Initialization
@ -2439,6 +3159,14 @@ term_init (terminal_type)
encode_terminal_src_size = 0;
encode_terminal_dst_size = 0;
#ifdef HAVE_GPM
/* TODO: Can't get Gpm_Snapshot in term_mouse_position to work: test with
(mouse-position). Also set-mouse-position won't work as is. */
/* mouse_position_hook = term_mouse_position; */
mouse_face_window = Qnil;
#endif
#ifdef WINDOWSNT
initialize_w32_display ();
@ -2886,6 +3614,10 @@ bigger, or it may make it blink, or it may do nothing at all. */);
defsubr (&Stty_display_color_p);
defsubr (&Stty_display_color_cells);
defsubr (&Stty_no_underline);
#ifdef HAVE_GPM
defsubr (&Sterm_open_connection);
defsubr (&Sterm_close_connection);
#endif /* HAVE_GPM */
fullscreen_hook = NULL;
}

View File

@ -340,7 +340,11 @@ enum event_kind
symbols, respectively. Member `arg' is a Lisp object converted
from the received Apple event. Parameters for non-Apple events
are converted to those in Apple events. */
MAC_APPLE_EVENT
MAC_APPLE_EVENT,
#endif
#ifdef HAVE_GPM
GPM_CLICK_EVENT
#endif
};
@ -446,6 +450,14 @@ enum {
meta_modifier = CHAR_META /* Under X, the XK_Meta_[LR] keysyms. */
};
#ifdef HAVE_GPM
#include <gpm.h>
extern int handle_one_term_event (Gpm_Event *, struct input_event *);
/* Nonzero means mouse is enabled on Linux console */
extern int term_gpm;
#endif
#endif
/* arch-tag: 33a00ecc-52b5-4186-a410-8801ac9f087d

View File

@ -12926,7 +12926,7 @@ redisplay_window (window, just_this_one_p)
int rc;
int centering_position = -1;
int last_line_misfit = 0;
int save_beg_unchanged, save_end_unchanged;
int beg_unchanged, end_unchanged;
SET_TEXT_POS (lpoint, PT, PT_BYTE);
opoint = lpoint;
@ -12991,8 +12991,8 @@ redisplay_window (window, just_this_one_p)
set_buffer_internal_1 (XBUFFER (w->buffer));
SET_TEXT_POS (opoint, PT, PT_BYTE);
save_beg_unchanged = BEG_UNCHANGED;
save_end_unchanged = END_UNCHANGED;
beg_unchanged = BEG_UNCHANGED;
end_unchanged = END_UNCHANGED;
current_matrix_up_to_date_p
= (!NILP (w->window_end_valid)
@ -13117,6 +13117,8 @@ redisplay_window (window, just_this_one_p)
w->force_start = Qt;
}
force_start:
/* Handle case where place to start displaying has been specified,
unless the specified location is outside the accessible range. */
if (!NILP (w->force_start)
@ -13296,40 +13298,16 @@ redisplay_window (window, just_this_one_p)
than a simple mouse-click. */
if (NILP (w->start_at_line_beg)
&& NILP (do_mouse_tracking)
&& CHARPOS (startp) > BEGV)
&& CHARPOS (startp) > BEGV
&& CHARPOS (startp) > BEG + beg_unchanged
&& CHARPOS (startp) <= Z - end_unchanged)
{
#if 0
/* The following code tried to make BEG_UNCHANGED and
END_UNCHANGED up to date (similar to try_window_id).
Is it important to do so?
The trouble is that it's a little too strict when it
comes to overlays: modify_overlay can call
BUF_COMPUTE_UNCHANGED, which alters BUF_BEG_UNCHANGED and
BUF_END_UNCHANGED directly without moving the gap.
This can result in spurious recentering when overlays are
altered in the buffer. So unless it's proven necessary,
let's leave this commented out for now. -- cyd. */
if (MODIFF > SAVE_MODIFF
|| BEG_UNCHANGED + END_UNCHANGED > Z_BYTE)
{
if (GPT - BEG < BEG_UNCHANGED)
BEG_UNCHANGED = GPT - BEG;
if (Z - GPT < END_UNCHANGED)
END_UNCHANGED = Z - GPT;
}
#endif
if (CHARPOS (startp) > BEG + save_beg_unchanged
&& CHARPOS (startp) <= Z - save_end_unchanged)
{
/* There doesn't seems to be a simple way to find a new
window start that is near the old window start, so
we just recenter. */
goto recenter;
}
}
w->force_start = Qt;
if (XMARKER (w->start)->buffer == current_buffer)
compute_window_start_on_continuation_line (w);
SET_TEXT_POS_FROM_MARKER (startp, w->start);
goto force_start;
}
#if GLYPH_DEBUG
debug_method_add (w, "same window start");

View File

@ -371,7 +371,9 @@ static void x_check_expected_move P_ ((struct frame *, int, int));
static void x_sync_with_move P_ ((struct frame *, int, int, int));
static int handle_one_xevent P_ ((struct x_display_info *, XEvent *,
int *, struct input_event *));
static SIGTYPE x_connection_closed P_ ((Display *, char *)) NO_RETURN;
/* Don't declare this NO_RETURN because we want no
interference with debugging failing X calls. */
static SIGTYPE x_connection_closed P_ ((Display *, char *));
/* Flush display of frame F, or of all frames if F is null. */